/* FoamSignal design tokens. The only palette and dimension definitions; see docs/BRAND.md. */
:root {
  color-scheme: light dark;

  /* Neutrals: the brand's off-white and midnight navy, and greys that lean to the navy. */
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #0b1420;
  --muted: #4a5a6b;
  --line: #d7dee6;
  /* The edge of a control, in the brand's pencil blue: 3:1 against the card and the page. A line, never words. */
  --edge: #5d7a94;
  --well: #e8edf2;

  /* The top bar and the sign-in band: industrial navy in both sets, under the lockup made for dark backgrounds. */
  --bar: #1b2a3a;
  --bar-ink: #f5f7fa;
  --bar-muted: #b9c5d1;
  --bar-well: #0b1420;

  /* The one accent, signal yellow: what to tap next. A fill with navy words on it, never the colour of words (yellow
     on white is 1.4:1). Where the accent has to be a line on the page (a ticked box, the step he is on) it is
     --accent-line: navy here, yellow in the dark set. */
  --accent: #ffd343;
  --accent-ink: #0b1420;
  --accent-line: #1b2a3a;
  /* Focus: a yellow band, and outside it a line that is 3:1 on the page. */
  --focus: #ffd343;
  --focus-edge: #0b1420;

  /* The one alarm: do not spray, and what failed. */
  --alarm: #b3261e;
  --alarm-ink: #ffffff;

  /* Status, as words on a tint (flags, pills)... Amber is an orange amber, a clear step from the brand's yellow. */
  --ok: #146c2e;
  --ok-bg: #e2f3e6;
  --warn: #7a3b00;
  --warn-bg: #fde6cf;
  --err: #b3261e;
  --err-bg: #fce9e7;
  /* ...and as a solid chip that reads at arm's length. */
  --good-chip: #146c2e;
  --good-chip-ink: #ffffff;
  --marginal-chip: #f28c0f;
  --marginal-chip-ink: #0b1420;
  --marginal-chip-edge: #7a3b00;
  --none-chip: #b3261e;
  --none-chip-ink: #ffffff;

  /* The plan viewer is a dark room in both sets: a drawing is read against the midnight navy. */
  --viewer-bg: #0b1420;
  --viewer-stage: #1b2a3a;
  --viewer-ink: #ffffff;
  /* A sheet of paper stays white in both sets: thumbnails, signatures, the logo. */
  --paper: #ffffff;
  --paper-ink: #0b1420;

  /* One system stack for words and numbers; the locked logo is always an image. */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: var(--font);

  /* The 8px grid. */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;

  /* Comfortable height for the main controls, and the least anything tappable may be. */
  --tap: 48px;
  --tap-min: 44px;
  /* Crew screens: a gloved thumb. */
  --tap-crew: 56px;
  --tap-big: 64px;
  --radius: 16px;
  --radius-control: 10px;
  --fade: 120ms;
  --tabbar-h: 72px;

  /* Typography: readable labels, calm headings, one prominent number. */
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-md: 0.9375rem;
  --text-base: 1rem;
  --text-body: 17px;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-title: 1.5rem;
  --text-price: 2rem;
  --text-hero: clamp(2.75rem, 12vw, 4rem);
  --leading: 1.5;
  --leading-tight: 1.2;
  --tracking-tight: -0.025em;
  --tracking-label: 0.04em;

  /* Fine spacing belongs inside controls; the page uses the 8px grid above. */
  --s-hair: 2px;
  --s-half: 4px;
  --s-mid: 12px;
  --s6: 64px;
  --rule: 1px;
  --rule-strong: 2px;
  --focus-width: 3px;
  --radius-small: 6px;
  --radius-pill: 999px;
  --radius-sheet: 24px;
  --shadow-card: 0 2px 8px rgb(11 20 32 / 4%);
  --shadow-raised: 0 12px 36px rgb(11 20 32 / 18%);
  --shadow-bar: 0 -4px 16px rgb(11 20 32 / 6%);
  --ease: ease-out;

  /* Layout dimensions (breakpoints remain literal in media queries). */
  --page: 600px;
  --page-desk: 800px;
  --page-wide: 1040px;
  --page-inner: calc(var(--page) - var(--s4));
  --desk-inner: calc(var(--page-desk) - var(--s4));
  --page-bottom: 136px;
  --footer-bottom: 112px;
  --logo-min: 140px;
  --logo-max: 207px;
  --logo-reserve: 220px;
  --logo-signin: 280px;
  --mark: 36px;
  --icon: 24px;
  --check: 26px;
  --tick: 28px;
  --dot: 12px;
  --date-min: 160px;
  --chat-max: 160px;
  --photo-max: 320px;
  --logo-height: 120px;
  --demo-cover-width: 420px;
  --spot-offset: 96px;
  --viewer-mark: 4px;
  --job-row-basis: 14em;
  --name-basis: 8em;
  --day-width: 3.5em;
  --table-label: 9rem;

  /* Canvas exports are paper in either theme, including the existing reader annotation colours. */
  --paper-signature: #1b2a3a;
  --paper-mark: #d00000;
  --paper-wash: rgba(255, 255, 255, 0.85);

}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1420;
    --card: #1b2a3a;
    --ink: #f5f7fa;
    --muted: #b3c0cd;
    --line: #31455a;
    --edge: #7f99b0;
    --well: #263a4f;

    --bar: #1b2a3a;
    --bar-ink: #f5f7fa;
    --bar-muted: #b9c5d1;
    --bar-well: #0b1420;

    --accent: #ffd343;
    --accent-ink: #0b1420;
    --accent-line: #ffd343;
    --focus: #ffd343;
    --focus-edge: #ffd343;

    --alarm: #c62828;
    --alarm-ink: #ffffff;

    --ok: #7fdc93;
    --ok-bg: #12301a;
    --warn: #ffb561;
    --warn-bg: #3d2408;
    --err: #ffb4ab;
    --err-bg: #451815;
    --good-chip: #4cd47a;
    --good-chip-ink: #0b1420;
    --marginal-chip: #ff9f2e;
    --marginal-chip-ink: #0b1420;
    --marginal-chip-edge: #ff9f2e;
    --none-chip: #ff7b6e;
    --none-chip-ink: #0b1420;
    --shadow-card: none;
    --shadow-raised: 0 12px 36px rgb(0 0 0 / 45%);
    --shadow-bar: 0 -4px 16px rgb(0 0 0 / 20%);
  }
}
