/* Square Up theme: "Trailhead". Every colour, font, size, space and corner
   the app uses is set here, so the look can be changed in one place.

   Light colours are the defaults. Dark colours switch in with the
   prefers-color-scheme media query, which every browser supports, so there's
   no dependence on light-dark() and older phones still get proper colours.
   All text colours below pass WCAG AA (4.5:1) on the backgrounds they're used on. */

:root {
  color-scheme: light dark;

  /* fonts */
  --font-head: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --fs-xs: 12px;
  --fs-s: 13px;
  --fs-m: 15px;
  --fs-base: 16px;
  --fs-l: 20px;
  --fs-xl: 26px;
  --fs-h1: clamp(32px, 8vw, 44px);

  /* spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* shape */
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --r-pill: 999px;
  --tap: 44px;               /* smallest tap target */
  --shadow-card: 0 1px 2px rgb(0 0 0 / .04), 0 6px 18px rgb(0 0 0 / .06);
  --shadow-pop: 0 20px 50px rgb(0 0 0 / .28);  /* pop-ups */

  /* colours: light */
  --c-bg: #F5F3EE;           /* page */
  --c-surface: #FFFFFF;      /* cards, dialogs, fields */
  --c-surface-2: #ECE9E1;    /* hover, quiet fills */
  --c-ink: #1B2420;          /* main text */
  --c-muted: #5C6661;        /* secondary text */
  --c-line: #E2DED4;         /* borders, dividers */
  --c-primary: #1F4D3A;      /* forest: main buttons */
  --c-on-primary: #FFFFFF;
  --c-owe: #A3461A;          /* sunset: money owed */
  --c-owe-soft: #FBE7DB;
  --c-ok: #276B4E;           /* square / gets back */
  --c-ok-soft: #DDF0E6;
  --c-accent: #3B7EA1;       /* lake */
  --c-focus: #3B7EA1;        /* keyboard focus ring (its own colour, not "owed") */
  --c-danger: #B3261E;       /* delete, remove */
  --c-backdrop: rgb(15 25 20 / .5);
  /* scenery strips */
  --c-sky-1: #CFE3EA;
  --c-sky-2: #F6D7B8;
  --c-hill-1: #7FA88F;
  --c-hill-2: #2F5E48;
  --c-water: #6FA3BE;
}

@media (prefers-color-scheme: dark) {
  :root {
    --shadow-card: 0 1px 2px rgb(0 0 0 / .3), 0 6px 18px rgb(0 0 0 / .25);
    --c-bg: #121A16;
    --c-surface: #1A2520;
    --c-surface-2: #22302A;
    --c-ink: #EAF0EC;
    --c-muted: #9DABA4;
    --c-line: #2A3832;
    --c-primary: #7FC4A0;
    --c-on-primary: #0E1A14;
    --c-owe: #FF9D66;
    --c-owe-soft: #3A2418;
    --c-ok: #7FD6A8;
    --c-ok-soft: #183528;
    --c-accent: #7DB8D8;
    --c-focus: #7DB8D8;
    --c-danger: #FF8A80;
    --c-backdrop: rgb(0 0 0 / .6);
    --c-sky-1: #1E3340;
    --c-sky-2: #4A3326;
    --c-hill-1: #2E4A3C;
    --c-hill-2: #17302A;
    --c-water: #24485C;
  }
}
