
/* ============================================================
   Fysigo Design Language System
   Approved direction 2026-05-22 — Montserrat, lime #D0F229, translucent dark.
   Token names are canonical DLS names from public/brand/system.html (v2.0).
   @theme inline maps DLS tokens to Tailwind utility classes.
   ============================================================ */

:root {
  /* ── Brand palette ── locked, never substituted */
  --lime:         #d0f229;
  --purple:       #6712ab;
  --teal:         #04aa72;
  --orange:       #fe8301;
  --red:          #f34526;
  --black:        #0f0f0f;
  --dark-gray:    #3a3a3a;
  /* Leaderboard rank medals — intentionally palette-external semantic colors. */
  --rank-gold:    #ffd23f;
  --rank-silver:  #cdd2da;
  --rank-bronze:  #cd8b5e;
  --medium-gray:  #838383;
  --light-gray:   #c8c8c8;
  --off-white:    #f3f3f3;

  /* ── Surface ramp ── all OPAQUE so floating panels (popovers, menus,
     dropdowns, sheets) never bleed through overlapping content. Cards keep the
     same composited gray they had over the canvas; the overlay surface is the
     dark #141414 from the DLS. Only the scrim stays translucent (dims the page). */
  --surface-canvas:   #0f0f0f;
  --surface-raised:   #161616; /* controls: buttons, chips, icon tiles, toggles (Daniel variant A 2026-10-28); content cards use --surface-card */
  --surface-elevated: #202020; /* was #2e2e2e: same +10 step over raised */
  --surface-sunken:   #101010; /* was #1a1a1a: must stay darker than raised */
  --surface-overlay:  #141414;
  --surface-card:          #161616; /* EVERY content card / plate — the dark onboarding plate (Tony 2026-10-29, was #242424 for a day); never buttons or icon backgrounds */
  --surface-card-elevated: #202020; /* a card on a card, and a tappable card's hover — one step above --surface-card */
  --surface-scrim:    rgba(0, 0, 0, 0.65);

  /* ── Ink ramp ── */
  --ink-primary:   #f3f3f3;
  --ink-secondary: #c8c8c8;
  --ink-tertiary:  #838383;
  --ink-disabled:  #3a3a3a;
  --ink-inverse:   #0f0f0f;

  /* ── Hairlines ── translucent */
  --line-default: rgba(131, 131, 131, 0.2);
  --line-strong:  rgba(131, 131, 131, 0.4);

  /* ── Accent ── v2.0 LOCKED 2026-05-31 night (overrides the earlier
     Option A lock from the same day). Brand guide v2.0 wins: --accent
     is teal #04aa72, the single moment of color per screen and the
     brand-action color across coach surfaces. Source of truth:
     public/brand/system.html §04 (live at fysigo.com/brand/system.html).
     Rollout history: docs/superpowers/plans/2026-05-31-brand-system-v2-rollout.md.

     PRIOR LOCK (Option A, retired 2026-05-31 night):
       --accent was #d0f229 (lime). Lime stays in the system but moves
       to --status-optimal and the spectrum scale endpoints. It is no
       longer the brand-action color at the root level.

     SURFACE MODE OVERRIDE:
       The client app shell ([data-surface="client"]) pins --accent
       back to lime locally so the consumer-facing experience keeps its
       lime feel. The coach app shell ([data-surface="coach"]) inherits
       the root teal. Public / marketing routes inherit root teal.

     ALLOWED USES (unchanged from v1):
       (1) primary CTA fills (Save / Confirm / Buy / Submit)
       (2) :focus-visible rings
       (3) the one hero number per screen
       (4) the active state on tabs / segmented controls
       (5) text-input caret
       (6) workout/kanban status mapping (NEXT UP)
     ENERGY BUDGET (Daniel 2026-10-28, replaces the old "accent ~3% of
     pixels" law): the screen band carries the full --gradient-wordmark
     spectrum; data carries zone colors; ONE primary action per view wears
     --accent; chrome and cards stay opaque dark. --accent itself is still
     spent once per view. See system-spec §9.13 and ScreenBand.

     The wordmark gradient is NOT a consumer of --accent — it lives at
     --gradient-wordmark with its own four stops. */
  --accent:            #04aa72;                                 /* teal · was #d0f229 lime */
  --accent-strong:     #06c386;                                 /* brighter teal */
  --accent-soft:       #0d2b21;                                 /* pre-mixed teal 18% on canvas */
  --accent-foreground: var(--ink-inverse);                       /* dark ink on teal · WCAG AA */

  /* ── Neutral elevated ── warm cream highlight for "selected / hovered /
     mildly-emphasized" states. Replaces the lime fills on nav rails,
     selected tabs, KPI label rows. */
  --neutral-elevated:      rgba(243, 243, 243, 0.06);
  --neutral-elevated-soft: rgba(243, 243, 243, 0.10);
  --neutral-elevated-line: rgba(243, 243, 243, 0.18);

  /* ── --cta-fill family ── brand-guide v2.0 canonical name for the cream
     interactive surface. Aliases --neutral-elevated values 1:1 so the
     v2.0 names are consumable from components without touching legacy
     callsites. Brand source: public/brand/system.html §04.5. */
  --cta-fill:               #f3f3f3;
  --cta-fill-strong:        #ffffff;
  --cta-fill-foreground:    #0f0f0f;
  --cta-fill-wash:          rgba(243, 243, 243, 0.06);          /* = --neutral-elevated */
  --cta-fill-wash-soft:     rgba(243, 243, 243, 0.10);          /* = --neutral-elevated-soft */
  --cta-fill-wash-line:     rgba(243, 243, 243, 0.18);          /* = --neutral-elevated-line */
}

/* ─────────────────────────────────────────────────────────────
   Surface-mode overrides · LIVE
   The client shell sets data-surface="client" on its outer wrapper
   (src/app/[locale]/app/layout.tsx) and the coach shell sets
   data-surface="coach" (src/app/[locale]/coach/layout.tsx). Public
   and marketing routes inherit root teal.
   ───────────────────────────────────────────────────────────── */
[data-surface="client"] {
  /* Client app pins --accent to lime locally so the consumer-facing
     experience keeps its lime feel after the root flipped to teal. Every
     CTA, focus ring, and active state inside the client app reads lime
     via the normal --accent cascade; no component edits required. Status
     colors stay global (--status-optimal is lime everywhere). */
  --accent:            #d0f229;
  --accent-strong:     #d0f229;
  --accent-soft:       color-mix(in srgb, #d0f229 14%, #0f0f0f);
  --accent-foreground: #0f0f0f;
}
[data-surface="coach"] {
  /* Root teal carries through here unchanged. Reserved for future
     coach-specific overrides (e.g., a denser hover wash, a coach-only
     focus halo color). */
}

:root {
  /* Continue the :root token declarations below — split only so the
     data-surface blocks live in the cascade between :root and @theme. */

  /* ── Chart palette ── intentional categorical colors for data viz.
     Distinct from --accent (which is action), distinct from status colors
     (which carry "good/bad" meaning). These are *editorial* hues chosen
     to read as a calm magazine-style chart, not a SaaS dashboard.
     Codified 2026-05-31. */
  --chart-primary:   #3fb8a0;  /* sage teal — user's main series */
  --chart-secondary: #c8c8c8;  /* cream — comparison / benchmark line */
  --chart-deep:      #5b5fa3;  /* deep indigo — deep sleep */
  --chart-light:     #c9a87a;  /* warm sand — light sleep */
  --chart-rem:       #9a6b8e;  /* muted plum — REM sleep */
  --chart-awake:     #c47366;  /* muted brick — awake / interrupted */
  --chart-grid:      rgba(131, 131, 131, 0.14);  /* very faint cartesian grid */

  /* ── Marker-language radii ── used by the spectrum scale, marker cards,
     and headline strips so the visual rhythm matches across surfaces. */
  --r-card: 10px;
  --r-tile: 6px;

  /* ── Brand gradients ── stops sourced from public/fysigo-logo.svg */
  --gradient-wordmark: linear-gradient(90deg, #fe8301 0%, #d0f229 35.14%, #69e82f 62.40%, #05aa72 100%);
  --gradient-accent:   linear-gradient(90deg, #d0f229 0%, #04aa72 100%);
  --gradient-brand:    var(--gradient-wordmark);
  /* Vertical scrubber rail — SYMMETRIC brand wash: orange at both ends, green
     core. Distinct from --gradient-wordmark (90deg, asymmetric). Green-at-center
     reads as the live heart of the feed; the NOW dot carries true position. */
  --gradient-scrubber: linear-gradient(
    180deg,
    var(--orange) 0%,
    var(--lime)  22%,
    var(--green) 50%,
    var(--lime)  78%,
    var(--orange) 100%
  );

  /* ── Spectrum scale ── the canonical good-to-bad visualization for
     Fysigo. ALWAYS oriented orange→teal: orange end = bad, teal end = good.
     Used on biomarker scales, nutrition micronutrient pins, sleep tile
     completeness, anywhere a single value reads on a quality spectrum.
     The four wordmark stops (orange, lime, green, teal) sit at their
     published % positions; the 9 intermediate HSL stops fill the gaps so
     the eye reads a smooth shiny flow, not three discrete zones. Codified
     2026-05-31 with Daniel — "shiny + foreseeable spectrum, not only
     three colors". Use `.fysigo-spectrum-scale` or `<SpectrumScale />`. */
  --gradient-spectrum: linear-gradient(
    90deg,
    hsl( 24, 100%, 50%)   0%,    /* deep orange — "very bad" depth */
    #fe8301              10%,    /* wordmark orange */
    hsl( 38, 100%, 53%)  18%,    /* warm amber */
    hsl( 48, 100%, 55%)  26%,    /* bright amber-yellow */
    hsl( 58,  95%, 56%)  32%,    /* yellow */
    #d0f229              35.14%, /* wordmark lime */
    hsl( 75,  85%, 55%)  45%,    /* yellow-green */
    hsl( 90,  82%, 53%)  55%,    /* spring green */
    #69e82f              62.40%, /* wordmark green */
    hsl(120,  78%, 47%)  72%,    /* deep green */
    hsl(140,  85%, 40%)  82%,    /* green-teal */
    hsl(152,  92%, 36%)  92%,    /* bright teal */
    #04aa72             100%     /* wordmark teal */
  );

  /* Conic form of --gradient-spectrum (same stops) for circular progress —
     e.g. the DLS interval-timer ring. Starts at 12 o'clock, sweeps clockwise. */
  --gradient-spectrum-conic: conic-gradient(
    from -90deg,
    hsl( 24, 100%, 50%)   0%,
    #fe8301              10%,
    hsl( 38, 100%, 53%)  18%,
    hsl( 48, 100%, 55%)  26%,
    hsl( 58,  95%, 56%)  32%,
    #d0f229              35.14%,
    hsl( 75,  85%, 55%)  45%,
    hsl( 90,  82%, 53%)  55%,
    #69e82f              62.40%,
    hsl(120,  78%, 47%)  72%,
    hsl(140,  85%, 40%)  82%,
    hsl(152,  92%, 36%)  92%,
    #04aa72             100%
  );

  /* ── Status ── mapped onto the brand palette.
     v2.0 (Wave 3, 2026-05-31 night): --status-optimal moved teal → lime
     because teal is now the brand --accent. Lime is the bright in-range
     signal (the "joyful" status). See public/brand/system.html §04.6. */
  --status-optimal:      #d0f229;                               /* lime · was teal */
  --status-borderline:   #fe8301;
  --status-out-of-range: #f34526;
  --status-no-data:      #838383;
  /* Fuel status language is intentionally limited to three named states.
     These tokens do not reuse --status-optimal because that legacy token is
     lime; Fuel uses signal green, alert orange, and alert red only. */
  --fuel-status-green: var(--green);
  --fuel-status-orange: var(--orange);
  --fuel-status-red: var(--red);
  --fuel-status-red-text: color-mix(
    in srgb,
    var(--fuel-status-red) 88%,
    var(--ink-primary)
  );
  --gradient-fuel-traffic: linear-gradient(
    90deg,
    var(--fuel-status-green) 0%,
    var(--fuel-status-orange) 50%,
    var(--fuel-status-red) 100%
  );
  --gradient-fuel-sweet-spot: linear-gradient(
    90deg,
    var(--fuel-status-red) 0%,
    var(--fuel-status-red) 30%,
    var(--fuel-status-orange) 35%,
    var(--fuel-status-green) 40%,
    var(--fuel-status-green) 60%,
    var(--fuel-status-orange) 65%,
    var(--fuel-status-red) 70%,
    var(--fuel-status-red) 100%
  );
  /* Five-zone workout intensity ramp. Number/name text always accompanies
     these colors, so zone meaning never depends on color alone. */
  --hr-zone-1: var(--teal);
  --hr-zone-2: var(--lime);
  --hr-zone-3: color-mix(in srgb, var(--lime) 55%, var(--orange));
  --hr-zone-4: var(--orange);
  --hr-zone-5: var(--red);

  /* ── Nutrition component aliases ──────────────────────────────────────────
     The nutrition surface (MacroProgressBars, StackChart, CoachNutritionReview,
     MicroHeatmap, PinnedMicros, MealList, AgentBrief, NutritionToday, …) was
     authored against short alias names that were never defined — they silently
     resolved to nothing. Map them to the canonical DLS tokens so the whole
     nutrition surface is DLS-conformant without touching every component.
     (Brand & Design System v2.0 §04 color, §11 data language.) */
  --line:           var(--line-default);
  --raised:         var(--surface-raised);
  --sunken:         var(--surface-sunken);
  --optimal:        var(--status-optimal);
  --borderline:     var(--status-borderline);
  --out-of-range:   var(--status-out-of-range);
  --green:          #69e82f;                 /* wordmark green */
  --scale-gradient: var(--gradient-spectrum);
  /* Macro chart family — protein teal, carbs sage, fat orange, other gray. */
  --macro-protein:  var(--teal);
  --macro-carbs:    var(--chart-primary);
  --macro-fat:      var(--orange);
  --macro-other:    var(--medium-gray);

  /* ── Radius ── 10px base */
  --radius: 0.625rem;
  /* Shared by uncompiled Screens CSS and Tailwind utilities; mirrors FysMetrics. */
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 10px);

  /* ── Type scale ── DLS §10 / §17 (added 2026-07-25, v2.7)
     The nine styles the DLS has always shown are now TOKENS, not a picture.
     Before this block the scale existed only as a rendered specimen, so there
     was nothing to reach for and 2 153 one-off `text-[13.5px]`-style sizes
     accumulated across 25 distinct arbitrary values. Nothing changes visually —
     each value is the exact size already drawn in the DLS specimen. Consume via
     the Tailwind `text-h2`-style utilities generated in the @theme block below
     (weight + tracking + leading ride along), never a raw px value. */
  --text-display: 48px; /* 800 · -0.02em · hero marketing headline */
  --text-h1:      32px; /* 800 · -0.02em · page title */
  --text-h2:      26px; /* 700 · -0.015em · section title */
  --text-h3:      18px; /* 700 · card / group title */
  --text-body:    15px; /* 400 · paragraphs */
  --text-small:   13px; /* 400 · helper copy, captions */
  --text-label:   13px; /* 500 · field labels, meta rows */
  --text-micro:   11px; /* 500 · the mono uppercase eyebrow, dense table heads */
  --text-value:   28px; /* 700 · tnum · a marker's own number */
  --text-hero:    64px; /* 800 · tnum · the ONE hero number per screen */

  /* ── Screen band + shell v2 ── pattern 9.13 (Daniel 2026-10-28).
     --band-height  144px at 1440+ · --band-height-collapsed 96px once the page
     scrolls · --band-height-compact 72px at 820 (iPad portrait).
     --rail-w 72px collapsed / --rail-w-expanded 264px · --inspector-w 360px. */
  --band-glow-opacity:      .45;
  --band-glow-blur:         46px;
  --band-height:            144px;
  --band-height-collapsed:  96px;
  --band-height-compact:    72px;
  --rail-w:                 72px;
  --rail-w-expanded:        264px;
  --inspector-w:            360px;

  /* ── Icon sizing ── DLS §18 (added 2026-07-25, v2.7)
     Five steps. Icons are sized by token, never an arbitrary h-/w- pair — the
     audit found 92 distinct arbitrary icon dimensions before this. md is the
     default and covers most inline uses. */
  --icon-xs: 12px; /* dense table cells, inline badge glyphs */
  --icon-sm: 14px; /* buttons-sm, chips, list-row affordances */
  --icon-md: 16px; /* DEFAULT — buttons, inputs, menu rows, nav */
  --icon-lg: 20px; /* section heads, sheet headers */
  --icon-xl: 32px; /* empty-state hero glyph, feature tiles */

  /* ── Touch targets ── DLS §19 (added 2026-07-25, v2.7)
     Apple HIG minimum, already honored 198 times in the codebase but split
     across `min-h-11` and `min-h-[44px]`. `min-h-11` is the canonical form;
     this token is for CSS that cannot reach a Tailwind class. Fysigo ships
     iPhone, Watch and TV surfaces, so on a coarse pointer this is a floor. */
  --tap-min: 44px;

  /* ── Motion durations ── */
  --duration-instant: 0ms;
  --duration-fast:    120ms;
  --duration-base:    200ms;
  --duration-slow:    320ms;
  --duration-slower:  480ms;
  --duration-reveal:  1100ms;

  /* ── Easing curves ── */
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:        cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out:    cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-quint:  cubic-bezier(0.7, 0, 0.84, 0);
  --ease-overshoot: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:    cubic-bezier(0.22, 1, 0.36, 1);

  /* ── Interaction rhythm ── shared by every shell and control */
  --interactive-lift: translate3d(0, -1px, 0);
  --interactive-press: translate3d(0, 0, 0) scale(0.985);
  --interactive-ring: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
  --surface-hover: color-mix(in srgb, var(--surface-raised) 78%, var(--accent) 4%);
  --surface-press: color-mix(in srgb, var(--surface-raised) 86%, var(--accent) 7%);

  /* ── Z-index scale ── */
  --z-base:    0;
  --z-raised:  10;
  --z-sticky:  30;
  --z-header:  40;
  --z-overlay: 45;
  --z-drawer:  50;
  --z-modal:   60;
  --z-toast:   70;
  --z-tooltip: 80;

  /* === Workout module tokens (added 2026-05-24) =============================
     Variant B kanban + logging refactor. Status accents derive from the
     existing brand palette (teal=done, orange=missed, gray=skipped) but use
     translucent OKLCH overlays so the card background tints rather than
     swaps. NEXT UP outline reuses the accent.
     ========================================================================= */
  --status-scheduled:    transparent;
  --status-done:         var(--teal);
  --status-done-soft:    oklch(0.62 0.13 165 / 0.10);
  --status-missed:       var(--orange);
  --status-missed-soft:  oklch(0.74 0.16 55 / 0.10);
  --status-skipped:      var(--medium-gray);
  --status-skipped-soft: oklch(0.61 0 0 / 0.12);
  /* NEXT UP is the "one pop element" of the kanban view — full lime accent. */
  --next-up-accent:      var(--accent);
  /* Browsed/selected queue card — a NEUTRAL ring so selection never collides
     with the lime --accent that marks NEXT UP. A card that is both NEXT UP and
     selected then reads as both: lime border/badge (next-up) + this neutral
     ring (selected). Same 2px-offset geometry as the DLS focus ring (§10) but
     ink-secondary instead of accent. Added 2026-06-14 (#17). */
  --queue-selection-ring: 0 0 0 2px var(--surface-canvas),
                          0 0 0 4px var(--ink-secondary);

  /* Rest-timer "old LCD" surface — darker than canvas, with a faint scanline
     feel handled in-component. Color states (resting/ready/overtime) reuse
     ink-tertiary / teal / orange. */
  --rest-timer-bg:       oklch(0.16 0 0);
  --rest-timer-border:   oklch(0.22 0 0);
  --rest-timer-digit:    oklch(0.45 0.005 286);
  --rest-timer-glow:     oklch(1 0 0 / 0.10);

  /* === Safe-area insets (Wave 10) =========================================
     iOS notch + home-indicator clearance. Use the .safe-area-* utilities
     on sticky tab bars, floating action buttons, footers.
     ========================================================================= */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);
}

/* Safe-area utility classes (Wave 10) */
.safe-area-top    { padding-top:    var(--safe-top); }
.safe-area-bottom { padding-bottom: var(--safe-bottom); }
.safe-area-left   { padding-left:   var(--safe-left); }
.safe-area-right  { padding-right:  var(--safe-right); }

/* Full-viewport sheets — prefer dvh so the iOS URL bar collapse doesn't
   crop the bottom of fullscreen drawers. */
.min-h-dvh { min-height: 100dvh; }
.h-dvh     { height:     100dvh; }

/* Mobile polish (Wave 10) — kill double-tap zoom + grey flash + pull-to-refresh. */
html {
  -webkit-tap-highlight-color: transparent;
  background: var(--surface-canvas);
  color-scheme: dark;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  touch-action: manipulation;
}
* { -webkit-tap-highlight-color: transparent; }

/* === App-wide layout safety (Daniel 2026-07-02) ==========================
   No horizontal scroll anywhere on the page, and form controls never force
   the layout wider than the screen. interactiveWidget=resizes-content shrinks
   the layout viewport on Chromium/Android when the keyboard opens; iOS Safari
   and installed PWAs ignore it — overlay panels use visualViewport listeners
   instead. These are app-shell rules — they touch no chat code (chat lives in
   separate repos). `clip` (not `hidden`) so position:sticky inside the page
   still works; inner carousels/tab-strips keep their own overflow-x:auto
   containers. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

/* The #1 cause of a form growing wider than a phone: an input's intrinsic
   `size` width + the default min-width:auto on a flex/grid child. Letting
   controls shrink to their container fixes it everywhere at once (e.g. a
   two-up State / ZIP row on the booking address form). */
input,
textarea,
select {
  max-width: 100%;
  min-width: 0;
}

::selection {
  background: var(--accent);
  color: var(--accent-foreground);
}

button, a, [role="button"] {
  touch-action: manipulation;
}

/* Opt-in: kanban / vertical feeds set this to suppress pull-to-refresh
   without affecting page-level scroll containers. */
.no-overscroll-y { overscroll-behavior-y: contain; }

/* Explicit, self-documenting form of the app-wide scroll standard: fully hide
   the native scrollbar on a scroll container. Hiding is already the global
   default (see the "Fysigo scroll standard" block below), so this class is
   only needed to make the intent legible on containers that ship their own
   scroll UI — e.g. the NowTimeline scrubber rail. Scrolling itself is
   unaffected (touch/wheel/keyboard/scrubber still work). DLS: /dls#scroll. */
.scrollbar-none {
  scrollbar-width: none;          /* Firefox / standard */
  -ms-overflow-style: none;       /* legacy Edge */
}
.scrollbar-none::-webkit-scrollbar {
  display: none;                  /* WebKit: Safari, iOS WKWebView, Chrome */
  width: 0;
  height: 0;
}

/* ── @theme inline ──────────────────────────────────────────────
   Maps DLS token names to Tailwind utility classes.
   Utility class names (bg-background, text-foreground, etc.) are
   kept stable here so component code does not need to change.
   ─────────────────────────────────────────────────────────────── */
@theme inline {
  /* Surfaces → Tailwind bg-* utilities */
  --color-background:    var(--surface-canvas);
  --color-card:          var(--surface-card);
  --color-card-elevated: var(--surface-card-elevated);
  --color-popover:       var(--surface-overlay);
  --color-input-background: var(--surface-sunken);

  /* Ink → Tailwind text-* utilities */
  --color-foreground:         var(--ink-primary);
  --color-muted-foreground:   var(--ink-secondary);
  --color-muted:              var(--ink-tertiary);

  /* Hairlines → Tailwind border-* utilities */
  --color-border:        var(--line-default);
  --color-border-strong: var(--line-strong);

  /* Accent — see public/brand/system.html §04. */
  --color-accent:                var(--accent);
  --color-accent-foreground:     var(--accent-foreground);
  --color-accent-muted:          var(--accent-soft);

  /* Status */
  --color-optimal:     var(--status-optimal);
  --color-borderline:  var(--status-borderline);
  --color-out-of-range: var(--status-out-of-range);
  --color-no-data:     var(--status-no-data);

  /* Brand palette pass-through */
  --color-purple: var(--purple);
  --color-teal:   var(--teal);
  --color-orange: var(--orange);
  --color-red:    var(--red);
  --color-rank-gold:   var(--rank-gold);
  --color-rank-silver: var(--rank-silver);
  --color-rank-bronze: var(--rank-bronze);

  /* Radius scale */
  --radius-sm:  calc(var(--radius) - 4px);
  --radius-md:  calc(var(--radius) - 2px);
  --radius-lg:  var(--radius);
  --radius-xl:  calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 10px);

  /* Shadows */
  --shadow-xs:             0 1px 2px rgb(0 0 0 / 0.2);
  --shadow-sm:             0 2px 4px rgb(0 0 0 / 0.25);
  --shadow-md:             0 4px 12px rgb(0 0 0 / 0.3);
  --shadow-lg:             0 8px 24px rgb(0 0 0 / 0.4);
  --shadow-xl:             0 16px 48px rgb(0 0 0 / 0.5);
  /* Accent halo — lime glow around the ONE hero element per screen.
     Tuned for #d0f229. Use sparingly, same 3% budget as --accent itself. */
  --shadow-accent-glow:    0 0 30px rgba(208, 242, 41, 0.30);
  --shadow-accent-glow-sm: 0 0 15px rgba(208, 242, 41, 0.18);
  --shadow-focus-ring:     0 0 0 2px var(--surface-canvas), 0 0 0 4px var(--accent);

  /* Easing — also exposed here so Tailwind transition utilities can reference them */
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:        cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out:    cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-sans: var(--font-montserrat), ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* ── Named type scale → `text-h2`-style utilities ── DLS §17 (v2.7)
     Each name carries size + line-height + weight + tracking, so one class
     replaces the four-class stack these styles used to be written as:
       text-h2   ==  text-[26px] font-bold tracking-[-0.015em] leading-[1.15]
     Tailwind's own text-xs…text-7xl are untouched and still available; these
     are added alongside them as the SEMANTIC layer. Reach for the semantic
     name when the text has a role in the hierarchy (page title, card title,
     body, label, a marker's value) and only fall back to the raw scale for
     genuinely one-off decorative type.
     `--text-value` and `--text-hero` still need `.fy-num` (or
     font-variant-numeric: tabular-nums) for column alignment. */
  --text-display: 48px;
  --text-display--line-height: 1.1;
  --text-display--font-weight: 800;
  --text-display--letter-spacing: -0.02em;

  --text-h1: 32px;
  --text-h1--line-height: 1.1;
  --text-h1--font-weight: 800;
  --text-h1--letter-spacing: -0.02em;

  --text-h2: 26px;
  --text-h2--line-height: 1.15;
  --text-h2--font-weight: 700;
  --text-h2--letter-spacing: -0.015em;

  --text-h3: 18px;
  --text-h3--line-height: 1.3;
  --text-h3--font-weight: 700;

  --text-body: 15px;
  --text-body--line-height: 1.55;
  --text-body--font-weight: 400;

  --text-small: 13px;
  --text-small--line-height: 1.45;
  --text-small--font-weight: 400;

  --text-label: 13px;
  --text-label--line-height: 1.35;
  --text-label--font-weight: 500;

  /* The tier below `label`, added 2026-08-07 (v0.3.0). `label` at 13px was the
     floor, so the dense eyebrow — `font-mono uppercase tracking-[…] text-muted`
     over a table head or a stat tile — had nothing to reach for and drifted
     across 10px and 11px in the same file. 11px is the resolved value: it is
     the larger of the two observed sizes, and the +1px on the 10px sites reads
     better under the wide tracking these labels carry.

     Deliberately carries no letter-spacing: the eyebrow's tracking is part of
     the pattern at the call site (it ranges 0.06em–0.18em by density), not a
     property of the size step. */
  --text-micro: 11px;
  --text-micro--line-height: 1.3;
  --text-micro--font-weight: 500;

  --text-value: 28px;
  --text-value--line-height: 1.15;
  --text-value--font-weight: 700;
  --text-value--letter-spacing: -0.01em;

  --text-hero: 64px;
  --text-hero--line-height: 1;
  --text-hero--font-weight: 800;
  --text-hero--letter-spacing: -0.03em;
}

