/* Reckon design tokens, v1: the Friend direction (chat 4 of card #110, 2026-10-05).
   Source: docs/design/direction/directions/b2/tokens.css, adapted. Spec: docs/design/system.md.
   Format rule: one token per line, "  --name: value;", no shorthand across lines, no braces in
   comments. docs/design/palette_check.py parses this file: the first rule block is the light theme,
   the second (the prefers-color-scheme: dark block) is the dark theme. Check:
   python3 docs/design/palette_check.py
   The @font-face rules sit at the end so the checker's block order holds. */

:root {
  /* Brand palette (brand/README.txt). Signal is the reckon point: the wordmark's point and the
     "your place" pin, never a ground, never a level. */
  --brand-ink: #0F1E2E;
  --brand-storm: #2F80D6;
  --brand-sky: #5BA3F0;
  --brand-signal: #F2A33A;
  --brand-paper: #F7F8FA;

  /* Slate: neutrals derived from ink. */
  --slate-900: #0F1E2E;
  --slate-800: #172A3D;
  --slate-700: #2E4459;
  --slate-600: #51606F;
  --slate-400: #7D8B99;
  --slate-300: #A7B4C2;
  --slate-200: #D5DCE4;
  --slate-100: #EDF0F4;
  --slate-50: #F7F8FA;
  --white: #FFFFFF;

  /* Storm blue steps. */
  --storm-700: #1A5CA3;
  --storm-600: #1F6DBF;
  --storm-500: #2F80D6;
  --sky-400: #5BA3F0;
  --sky-300: #8CC0F5;

  /* Storm Reckon levels 0-4. Theme-independent.
     Level 0 (Nothing) has no colour. A fill always holds or sits beside its number and name, edged
     by --level-edge, and in this direction always sits on an opaque surface, never on the sky. */
  --level-0: transparent;
  --level-0-label: currentColor;
  --level-1: #F5E394;
  --level-1-label: #101A26;
  --level-2: #D9661A;
  --level-2-label: #101A26;
  --level-3: #B02A34;
  --level-3-label: #FFFFFF;
  --level-4: #7C1D63;
  --level-4-label: #FFFFFF;
  --level-edge: #7D8B99;

  /* Type: Manrope only, 300 to 800. Six levels by role; phone sizes, then laptop (-wide). */
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 800;
  --text-display: 4.5rem;
  --text-number: 2rem;
  --text-head: 1.25rem;
  --text-body: 1.0625rem;
  --text-sub: 0.875rem;
  --text-small: 0.75rem;
  --text-display-wide: 6rem;
  --text-number-wide: 2.5rem;
  --text-head-wide: 1.5rem;
  --text-body-wide: 1.125rem;
  --text-sub-wide: 0.9375rem;
  --text-small-wide: 0.8125rem;
  --text-meta: 0.875rem;
  --text-lead: 1.125rem;
  --text-h3: 1.25rem;
  --text-h2: 1.5rem;
  --text-h1: 1.875rem;
  --text-level: 1.375rem;
  --leading-body: 1.5;
  --leading-tight: 1.2;
  --tracking-display: -0.02em;
  --tracking-small: 0.06em;
  --measure: 36rem;

  /* Space, on a 4 px base. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Shape and handling. */
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius-xl: 24px;
  --radius-sheet: 28px;
  --radius-pill: 999px;
  --tap: 48px;
  --tap-gap: 8px;
  --rule: 1px;
  --rule-strong: 4px;
  --page-max: 40rem;
  --page-wide: 80rem;
  --gutter: 16px;
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-rise: 300ms;
  --dur-frame: 500ms;
  --dur-drift: 40s;

  /* Semantic, light theme. Components use these, not the raw steps above. */
  --bg: #F3F5F8;
  --surface: #FFFFFF;
  --surface-2: #E9EDF2;
  --text: #101A26;
  --text-muted: #55637A;
  --line: #D7DEE7;
  --line-strong: #7D8B99;
  --action: #1F6DBF;
  --action-label: #FFFFFF;
  --action-soft: #E3EEF9;
  --focus: #1F6DBF;
  --focus-halo: #FFFFFF;
  --pin: #F2A33A;
  --pin-ring: #101A26;

  /* The NWS line: a paper notice above the sky (round 1 put an ink bar there; on the storm day it
     ran into the rain sky). Ink words, a 4 px ink rule, hairlines above and below. */
  --official-bg: #FFFFFF;
  --official-text: #101A26;
  --official-muted: #55637A;
  --official-rule: #101A26;
  --official-action: #1F6DBF;
  --official-edge: #C3CCD8;

  /* Depth: cards below the sky. One soft shadow in light; a 1 px line in dark. */
  --shadow-card: 0 8px 24px rgb(16 26 38 / 0.08);
  --shadow-float: 0 18px 44px rgb(12 22 36 / 0.22);
  --shadow-pop: 0 12px 32px rgb(12 22 36 / 0.22);
  --card-edge: transparent;

  /* The sky (layer 0), drawn from the `now` document, never from a forecast or the display theme.
     None of these are redefined for the dark theme: at 7:41 am the sky is a dawn sky whatever the
     reader's setting; only now.is_day false draws the night set. Every text colour is checked on
     every stop by palette_check.py (section 6). */
  /* Overcast dawn: pale grey-blue, lighter toward the horizon, a faint warm band low in the east. */
  --sky-top: #C9D3DC;
  --sky-mid: #D9E0E7;
  --sky-bottom: #E9EDF1;
  --sky-band: #EEE4D8;
  --sky-text: #101A26;
  --sky-text-muted: #3B4859;
  --sky-link: #17549A;
  --sky-rule: rgb(16 26 38 / 0.16);
  --sky-faint: rgb(16 26 38 / 0.42);
  --sky-wash: rgb(255 255 255 / 0.42);
  --sky-shadow: none;
  /* Rain at dawn: darker, still a sky (slate, not black), white words, streaks you can see. */
  --sky-rain-top: #3B4A5D;
  --sky-rain-mid: #485769;
  --sky-rain-bottom: #55647A;
  --sky-rain-text: #FFFFFF;
  --sky-rain-text-muted: #E4E9EE;
  --sky-rain-link: #D6E8FB;
  --sky-rain-rule: rgb(255 255 255 / 0.24);
  --sky-rain-faint: rgb(255 255 255 / 0.5);
  --sky-rain-wash: rgb(255 255 255 / 0.10);
  --sky-rain-streak: rgb(255 255 255 / 0.30);
  --sky-rain-shadow: 0 1px 2px rgb(0 0 0 / 0.22);
  --sky-rain-scrim: rgb(16 26 38 / 0.28);
  /* Night (now.is_day false; neither fixture draws it). */
  --sky-night-top: #0B1626;
  --sky-night-mid: #142238;
  --sky-night-bottom: #1E2E44;
  --sky-night-text: #FFFFFF;
  --sky-night-text-muted: #C9D2DE;
  --sky-night-link: #8CC0F5;
  --sky-night-rule: rgb(255 255 255 / 0.18);
  --sky-night-faint: rgb(255 255 255 / 0.45);
  --sky-night-wash: rgb(255 255 255 / 0.08);
  /* Pills on any sky: opaque white with action-blue words (rule 9). */
  --sky-pill-bg: #FFFFFF;
  --sky-pill-text: #1F6DBF;
  --sky-pill-text-muted: #4A576B;
  --sky-pill-edge: rgb(16 26 38 / 0.14);
  --sky-pill-soft: #E3EEF9;
  --sky-focus: #1F6DBF;
  --sky-focus-halo: #FFFFFF;

  /* The map: the sky seen from above. Water is a quiet grey, never the rain ramp. */
  --map-fade: #C9D3DC;
  --map-land: #E1E6EB;
  --map-water: #C6CBD1;
  --map-water-line: #AEB5BD;
  --map-county: #BCC5CF;
  --map-road: #FAFBFC;
  --map-road-minor: #F1F4F7;
  --map-label: #55637A;
  --map-label-strong: #101A26;
  --map-halo: #E1E6EB;
  --map-rain-1: #4FA9E2;
  --map-rain-2: #2384C6;
  --map-rain-3: #145F9C;
  --map-rain-1-a: 0.30;
  --map-rain-2-a: 0.62;
  --map-rain-3-a: 0.86;
  --map-snow-1: #C9D0E2;
  --map-snow-2: #8E9AB8;
  --map-snow-3: #4A5878;
  --map-snow-dot: #FFFFFF;
  --map-ice: #B97E9F;
  --map-warning: #101A26;
  --map-warning-halo: #FFFFFF;

  /* Next 36 hours: fills by precipitation type, hue and pattern together. Snow is as strong as rain. */
  --precip-rain: #2F9BDA;
  --precip-snow: #3F4F6E;
  --precip-snow-mark: #FFFFFF;
  --precip-ice: #B97E9F;
  --precip-ice-ground: #F6ECF1;
  --precip-none: #A7B4C2;
  --chart-night: #EDF0F5;
  --chart-grid: #E3E8EE;
  --chart-axis: #A7B4C2;
  --chart-freeze: #101A26;
  --icon-cloud: #E9EDF2;
  --icon-stroke: #55637A;

  /* The social image (1200 x 630): the level band sits inside the white storm card on the sky. */
  --social-bg: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1220;
    --surface: #121C2C;
    --surface-2: #1B2738;
    --text: #F2F5F9;
    --text-muted: #A3AFC2;
    --line: #263448;
    --line-strong: #7D8B99;
    --action: #8CC0F5;
    --action-label: #0B1220;
    --action-soft: #1B2D45;
    --focus: #8CC0F5;
    --focus-halo: #0B1220;
    --pin: #F2A33A;
    --pin-ring: #0B1220;
    --official-bg: #1B2738;
    --official-text: #F2F5F9;
    --official-muted: #A3AFC2;
    --official-rule: #F2F5F9;
    --official-action: #8CC0F5;
    --official-edge: #33435A;
    --shadow-card: none;
    --shadow-float: 0 18px 44px rgb(0 0 0 / 0.45);
    --shadow-pop: 0 12px 32px rgb(0 0 0 / 0.5);
    --card-edge: #263448;
    --map-fade: #0B1220;
    --map-land: #19212D;
    --map-water: #0F151E;
    --map-water-line: #2A3442;
    --map-county: #2C3746;
    --map-road: #2C3747;
    --map-road-minor: #232D3B;
    --map-label: #A3AFC2;
    --map-label-strong: #F2F5F9;
    --map-halo: #19212D;
    --map-rain-1: #3A78C2;
    --map-rain-2: #4F95DD;
    --map-rain-3: #7DB8F2;
    --map-rain-1-a: 0.40;
    --map-rain-2-a: 0.66;
    --map-rain-3-a: 0.86;
    --map-snow-1: #4E5A73;
    --map-snow-2: #8D99B3;
    --map-snow-3: #E6EAF0;
    --map-snow-dot: #19212D;
    --map-ice: #C994B0;
    --map-warning: #FFFFFF;
    --map-warning-halo: #0B1220;
    --precip-rain: #4A90D9;
    --precip-snow: #E6EAF0;
    --precip-snow-mark: #3F4F6E;
    --precip-ice: #B97E9F;
    --precip-ice-ground: #33242E;
    --precip-none: #5B6A80;
    --chart-night: #0A111D;
    --chart-grid: #1E2A3C;
    --chart-axis: #4A5A70;
    --chart-freeze: #F2F5F9;
    --icon-cloud: #2A3A52;
    --icon-stroke: #C3CDD9;
  }
}

:root[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #121C2C;
  --surface-2: #1B2738;
  --text: #F2F5F9;
  --text-muted: #A3AFC2;
  --line: #263448;
  --line-strong: #7D8B99;
  --action: #8CC0F5;
  --action-label: #0B1220;
  --action-soft: #1B2D45;
  --focus: #8CC0F5;
  --focus-halo: #0B1220;
  --pin: #F2A33A;
  --pin-ring: #0B1220;
  --official-bg: #1B2738;
  --official-text: #F2F5F9;
  --official-muted: #A3AFC2;
  --official-rule: #F2F5F9;
  --official-action: #8CC0F5;
  --official-edge: #33435A;
  --shadow-card: none;
  --shadow-float: 0 18px 44px rgb(0 0 0 / 0.45);
  --shadow-pop: 0 12px 32px rgb(0 0 0 / 0.5);
  --card-edge: #263448;
  --map-fade: #0B1220;
  --map-land: #19212D;
  --map-water: #0F151E;
  --map-water-line: #2A3442;
  --map-county: #2C3746;
  --map-road: #2C3747;
  --map-road-minor: #232D3B;
  --map-label: #A3AFC2;
  --map-label-strong: #F2F5F9;
  --map-halo: #19212D;
  --map-rain-1: #3A78C2;
  --map-rain-2: #4F95DD;
  --map-rain-3: #7DB8F2;
  --map-rain-1-a: 0.40;
  --map-rain-2-a: 0.66;
  --map-rain-3-a: 0.86;
  --map-snow-1: #4E5A73;
  --map-snow-2: #8D99B3;
  --map-snow-3: #E6EAF0;
  --map-snow-dot: #19212D;
  --map-ice: #C994B0;
  --map-warning: #FFFFFF;
  --map-warning-halo: #0B1220;
  --precip-rain: #4A90D9;
  --precip-snow: #E6EAF0;
  --precip-snow-mark: #3F4F6E;
  --precip-ice: #B97E9F;
  --precip-ice-ground: #33242E;
  --precip-none: #5B6A80;
  --chart-night: #0A111D;
  --chart-grid: #1E2A3C;
  --chart-axis: #4A5A70;
  --chart-freeze: #F2F5F9;
  --icon-cloud: #2A3A52;
  --icon-stroke: #C3CDD9;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur: 0ms;
    --dur-rise: 0ms;
    --dur-frame: 0ms;
  }
}

/* Manrope, self-hosted: public/fonts/, vendored by card F1 from @fontsource-variable/manrope 5.3.0
   (SIL OFL 1.1, public/fonts/OFL.txt). The service worker pre-caches both files. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/manrope-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
