/*
 * Wardrobr — colour tokens
 *
 * GENERATED by generate_palette.py. Edit the generator, not this file.
 *
 * Twelve steps per family, following the Radix model:
 *    1  app background          7  border
 *    2  subtle background       8  border, hovered
 *    3  component background    9  SOLID fill
 *    4  component, hovered     10  solid fill, hovered
 *    5  component, active      11  low-contrast text
 *    6  subtle border          12  high-contrast text
 *
 * All values are OKLCH, gamut-mapped into sRGB by reducing chroma only —
 * lightness is never altered, so the perceptual ramp holds across every hue.
 *
 * Light is the default. Dark applies via [data-theme="dark"] or the system
 * preference when no explicit theme is set.
 */


/* ═══════════════════════════════════════════════════════════════════════
   FONTS  — self-hosted, brand/typography.md §7. No Google Fonts CDN: it
   exposes visitor IPs to a third party on every page load, wrong for
   the product's privacy position generally and for the anonymous share
   pages specifically.
   ═══════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Lexend";
  src: url("/fonts/lexend-variable.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Metric-adjusted so `swap`'s fallback-to-Lexend transition doesn't
   shift layout — real measurements (see the comment above FONT_FACES
   in generate_palette.py), not the placeholder figures typography.md
   §7 shipped with before this was measured. */
@font-face {
  font-family: "Lexend Fallback";
  src: local("Arial");
  ascent-override: 75.82%;
  descent-override: 18.95%;
  line-gap-override: 0%;
  size-adjust: 131.90%;
}


/* ═══════════════════════════════════════════════════════════════════════
   LIGHT
   ═══════════════════════════════════════════════════════════════════════ */

:root,
[data-theme="light"] {
  /* Each theme block names its own side (#656). The browser paints its
     OWN surfaces (the canvas, form controls, scrollbars and, possibly,
     the strip behind the phone's gesture bar) from color-scheme. The
     single `:root { color-scheme: light dark }` this replaces let it
     pick from the phone's scheme, so a phone on light running the app
     on dark (J3) got light surfaces under a dark app. */
  color-scheme: light;

  /* neutral — cool-leaning grey — the ground the whole product sits on */
  --neutral-1: oklch(0.993 0.0002 240.0);
  --neutral-2: oklch(0.982 0.0004 240.0);
  --neutral-3: oklch(0.962 0.0009 240.0);
  --neutral-4: oklch(0.943 0.0013 240.0);
  --neutral-5: oklch(0.921 0.0018 240.0);
  --neutral-6: oklch(0.896 0.0022 240.0);
  --neutral-7: oklch(0.860 0.0029 240.0);
  --neutral-8: oklch(0.796 0.0039 240.0);
  --neutral-9: oklch(0.560 0.0075 240.0);
  --neutral-10: oklch(0.515 0.0073 240.0);
  --neutral-11: oklch(0.468 0.0065 240.0);
  --neutral-12: oklch(0.264 0.0031 240.0);

  /* brand — hue anchored on your vermilion; solid darkened so light text passes AA */
  --brand-1: oklch(0.993 0.0034 24.6);
  --brand-2: oklch(0.982 0.0087 25.7);
  --brand-3: oklch(0.962 0.0187 26.8);
  --brand-4: oklch(0.943 0.0286 27.9);
  --brand-5: oklch(0.921 0.0405 29.0);
  --brand-6: oklch(0.896 0.0546 30.1);
  --brand-7: oklch(0.860 0.0737 31.1);
  --brand-8: oklch(0.796 0.1009 32.2);
  --brand-9: oklch(0.580 0.1940 33.3);
  --brand-10: oklch(0.535 0.1882 34.4);
  --brand-11: oklch(0.468 0.1624 35.5);
  --brand-12: oklch(0.264 0.0815 36.6);

  /* success — confirmed, verified, active. Light solid raised to 0.620 (was 0.542) for CVD lightness separation from danger — 0.542-0.58 is a contrast dead zone that clears neither AA reading. */
  --success-1: oklch(0.993 0.0039 158.0);
  --success-2: oklch(0.982 0.0078 158.9);
  --success-3: oklch(0.962 0.0156 159.8);
  --success-4: oklch(0.943 0.0234 160.7);
  --success-5: oklch(0.921 0.0312 161.6);
  --success-6: oklch(0.896 0.0390 162.5);
  --success-7: oklch(0.860 0.0494 163.5);
  --success-8: oklch(0.796 0.0676 164.4);
  --success-9: oklch(0.628 0.1300 165.3);
  --success-10: oklch(0.583 0.1208 166.2);
  --success-11: oklch(0.468 0.0959 167.1);
  --success-12: oklch(0.264 0.0538 168.0);

  /* warn — amber — the gap reopened once brand moved redder */
  --warn-1: oklch(0.993 0.0044 62.0);
  --warn-2: oklch(0.982 0.0090 63.6);
  --warn-3: oklch(0.962 0.0180 65.3);
  --warn-4: oklch(0.943 0.0270 66.9);
  --warn-5: oklch(0.921 0.0360 68.5);
  --warn-6: oklch(0.896 0.0450 70.2);
  --warn-7: oklch(0.860 0.0570 71.8);
  --warn-8: oklch(0.796 0.0780 73.5);
  --warn-9: oklch(0.735 0.1500 75.1);
  --warn-10: oklch(0.690 0.1446 76.7);
  --warn-11: oklch(0.468 0.0976 78.4);
  --warn-12: oklch(0.264 0.0551 80.0);

  /* danger — CRIMSON, not red — 22 degrees clear of the brand vermilion */
  --danger-1: oklch(0.993 0.0035 4.0);
  --danger-2: oklch(0.982 0.0091 4.9);
  --danger-3: oklch(0.962 0.0195 5.8);
  --danger-4: oklch(0.943 0.0296 6.7);
  --danger-5: oklch(0.921 0.0417 7.6);
  --danger-6: oklch(0.896 0.0555 8.5);
  --danger-7: oklch(0.860 0.0703 9.5);
  --danger-8: oklch(0.796 0.0962 10.4);
  --danger-9: oklch(0.520 0.1850 11.3);
  --danger-10: oklch(0.475 0.1794 12.2);
  --danger-11: oklch(0.468 0.1591 13.1);
  --danger-12: oklch(0.264 0.0777 14.0);

  /* info — neutral system messages */
  --info-1: oklch(0.993 0.0035 248.0);
  --info-2: oklch(0.982 0.0087 248.7);
  --info-3: oklch(0.962 0.0174 249.5);
  --info-4: oklch(0.943 0.0261 250.2);
  --info-5: oklch(0.921 0.0348 250.9);
  --info-6: oklch(0.896 0.0435 251.6);
  --info-7: oklch(0.860 0.0551 252.4);
  --info-8: oklch(0.796 0.0754 253.1);
  --info-9: oklch(0.560 0.1450 253.8);
  --info-10: oklch(0.515 0.1406 254.5);
  --info-11: oklch(0.468 0.1247 255.3);
  --info-12: oklch(0.264 0.0609 256.0);

  /* text on solid fills — chosen by measured WCAG ratio */
  --on-neutral: oklch(0.993 0.0002 240.0);  /* neutral-light-end, 4.55:1 — AA */
  --on-brand: oklch(0.993 0.0002 240.0);  /* neutral-light-end, 4.60:1 — AA */
  --on-success: oklch(0.264 0.0031 240.0);  /* neutral-dark-end, 4.63:1 — AA */
  --on-warn: oklch(0.264 0.0031 240.0);  /* neutral-dark-end, 6.39:1 — AA */
  --on-danger: oklch(0.993 0.0002 240.0);  /* neutral-light-end, 5.98:1 — AA */
  --on-info: oklch(0.993 0.0002 240.0);  /* neutral-light-end, 4.59:1 — AA */
  /* item placeholder mark — eight colourways */
  --mark-1: oklch(0.600 0.1450 12.0);
  --mark-2: oklch(0.600 0.1450 33.0);
  --mark-3: oklch(0.600 0.1450 145.0);
  --mark-4: oklch(0.600 0.1164 172.0);
  --mark-5: oklch(0.600 0.1025 205.0);
  --mark-6: oklch(0.600 0.1450 248.0);
  --mark-7: oklch(0.600 0.1450 292.0);
  --mark-8: oklch(0.600 0.1450 330.0);
  --mark-ink: oklch(0.140 0.0007 240.0);  /* on every --mark-N, min 4.68:1 — AA */

  /* alpha overlays — light ground, so scrims are black */
  --alpha-1: oklch(0.2 0.003 240 / 0.04);
  --alpha-2: oklch(0.2 0.003 240 / 0.07);
  --alpha-3: oklch(0.2 0.003 240 / 0.11);
  --alpha-4: oklch(0.2 0.003 240 / 0.16);
  --scrim:   oklch(0.18 0.004 240 / 0.42);

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 240 / 0.06), 0 2px 8px oklch(0.2 0.01 240 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 240 / 0.10), 0 12px 32px oklch(0.2 0.01 240 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 240 / 0.14), 0 32px 72px oklch(0.2 0.01 240 / 0.12);


  /* ═══════════════════════════════════════════════════════════════════
     TYPE  — see brand/typography.md
     ═══════════════════════════════════════════════════════════════════ */

  --font-display: "Lexend", "Lexend Fallback", system-ui, -apple-system, sans-serif;
  --font-body:    "Lexend", "Lexend Fallback", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-2xs:  12px;   --leading-2xs:  1.40;   /* floor — Human Standards: never below 12px readable */
  --text-xs:   13px;   --leading-xs:   1.45;
  --text-sm:   14px;   --leading-sm:   1.50;
  --text-base: 16px;   --leading-base: 1.55;   /* body floor — was 15px, under the 16px minimum */
  --text-md:   18px;   --leading-md:   1.50;
  --text-lg:   20px;   --leading-lg:   1.35;
  --text-xl:   24px;   --leading-xl:   1.30;
  --text-2xl:  30px;   --leading-2xl:  1.20;
  --text-3xl:  40px;   --leading-3xl:  1.10;
  --text-4xl:  56px;   --leading-4xl:  1.05;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --tracking-normal:  0;
  --tracking-caps:    0.06em;   /* all-caps chips only — unreadable without */
  --tracking-tight:  -0.015em;  /* --text-2xl and above */

  /* ═══════════════════════════════════════════════════════════════════
     SPACE  — named in PX, so --space-8 is 8px and never 32px.
     Avoids the constant "is 4 four pixels or sixteen?" question.
     ═══════════════════════════════════════════════════════════════════ */

  --space-0:  0;
  --space-2:  2px;    /* hairline gaps, icon-to-text at 11px */
  --space-4:  4px;
  --space-6:  6px;    /* chip padding-y */
  --space-8:  8px;    /* default inline gap */
  --space-12: 12px;   /* compact stack */
  --space-16: 16px;   /* default stack, mobile page gutter */
  --space-20: 20px;
  --space-24: 24px;   /* section gap, tablet gutter */
  --space-32: 32px;   /* desktop gutter */
  --space-40: 40px;
  --space-48: 48px;   /* major section break */
  --space-64: 64px;
  --space-80: 80px;
  --space-96: 96px;

  /* ═══════════════════════════════════════════════════════════════════
     RADII
     Nesting rule: inner radius = outer radius - padding. A 14px card with
     16px padding holds a child at 0 (square), not another 14.
     ═══════════════════════════════════════════════════════════════════ */

  --radius-sm:   6px;    /* chips, status marks */
  --radius-md:   10px;   /* inputs, icon buttons, tiles */
  --radius-lg:   14px;   /* cards */
  --radius-xl:   18px;   /* raised cards, popovers */
  --radius-2xl:  24px;   /* sheet + modal top corners */
  --radius-full: 9999px; /* pills, avatars, FAB */

  /* ═══════════════════════════════════════════════════════════════════
     BORDERS & FOCUS
     ═══════════════════════════════════════════════════════════════════ */

  --border-width:       1px;
  --border-width-thick: 2px;
  --focus-width:        2px;
  --focus-offset:       2px;

  /* ═══════════════════════════════════════════════════════════════════
     ICONS  — see brand/iconography.md
     16px is the floor for weight="regular". Below that, weight="fill".
     ═══════════════════════════════════════════════════════════════════ */

  --icon-xs:  14px;   /* REQUIRES weight="fill" — see iconography.md §3 */
  --icon-sm:  16px;
  --icon-md:  20px;   /* default */
  --icon-lg:  24px;
  --icon-xl:  32px;
  --icon-2xl: 48px;

  /* ═══════════════════════════════════════════════════════════════════
     AVATARS  — see brand/iconography.md §3
     Not icons: a filled circular slot for a person, a circle or a link
     source. Sized on the row rhythm icons use, which is why they live
     next to them — but an --icon-* token is never the right thing to
     size one with.
     ═══════════════════════════════════════════════════════════════════ */

  --avatar-xs: 24px;   /* dense rows, inline attribution */
  --avatar-sm: 32px;   /* list rows — the default */
  --avatar-md: 40px;   /* cards, section headers */
  --avatar-lg: 44px;   /* profile headers; also the --tap-min floor when tappable */

  /* ═══════════════════════════════════════════════════════════════════
     LAYOUT
     ═══════════════════════════════════════════════════════════════════ */

  --tap-min:           44px;   /* never smaller, whatever the icon size — a FLOOR, not a height */
  --tap-min-bottom:    48px;   /* bottom nav + FAB — thumbs hit these at a flatter angle. See brand/iconography.md */
  --target-spacing-min: 8px;   /* minimum gap between adjacent interactive targets */

  /* A text control's HEIGHT, which is a different statement from
     --tap-min (a floor every target must clear) and from --space-48 (the
     right number with the wrong meaning). B8's fields rounded to
     --tap-min for want of this; seven sheets share that shell, which is
     past the point where rounding is the right answer. */
  --field-height:      48px;

  /* The sheet's grab handle. Intrinsic to the affordance the way an icon
     size is — not a spacing step, and not derivable from one. */
  --sheet-handle-width:  36px;
  --sheet-handle-height:  5px;
  --topbar-height:     52px;
  --bottombar-height:  60px;
  --fab-size:          56px;

  /* The nav badge dot. Adopted verbatim from the design project's own
     tokens.css (#58) rather than invented here — AppShell's nav badge
     used to substitute --space-8 for this, flagged "would resolve to
     nothing, not just the wrong size" until this token existed. */
  --badge-dot:         8px;

  /* A dropdown/popover card's width. CreatePicker's FAB menu hardcoded
     264px with a comment that no token named this — blessed as the
     value rather than picked fresh (#58). */
  --popover-width:     264px;

  /* List-row thumbnail size — E5's upload rows, E6's staged-photo review.
     4:5, matching the photo tile aspect. Adopted verbatim from the
     design project's own tokens.css, same route as --badge-dot: the
     justified grid computes its own sizing and never needed this, but a
     fixed list row does. */
  --thumb-width:        48px;
  --thumb-height:       60px;

  /* D5's tray — a picked item needs a bigger thumb than a list row (it's
     the whole visual weight of the tray, not a leading glyph next to
     text). Same adoption route as --thumb-width: named in the design
     project's own tokens.css, absent from ours until D5 needed it. */
  --thumb-lg-width:     56px;
  --thumb-lg-height:    70px;

  /* G2's eight toggles — every other boolean control in this app is a
     button (aria-pressed) or a segmented group; a switch is new with
     sharing's permission editor. Adopted verbatim from the design
     project's own tokens.css, same route as --thumb-width: it names
     these "control geometry" alongside --thumb-*, and G2 draws every
     switch at exactly these dimensions. */
  --switch-width:       52px;
  --switch-height:      30px;
  --switch-knob:        26px;

  /* The determinate progress line — E5's persistent upload strip and any
     future thin progress indicator (brand/motion.md: no spinners; a thin
     indeterminate line is the third loading state). Adopted verbatim
     from the design project's own tokens.css, same route as --badge-dot:
     its copy documents it as "determinate progress", 3px, and E1's
     artboard draws the strip's track and fill at exactly this height. */
  --progress-height:   3px;

  --page-max:          1200px;
  /* A form column, not a page: sign in was first, and every form screen
     in the inventory (A2, B7, C3, D4, J2) wants the same constraint.
     rem, not px, so it tracks the root size. Ruled at the routing/auth
     review after the sign-in build flagged a literal here as a missing
     step rather than silently rounding. */
  --form-max:          24rem;
  --page-gutter:       var(--space-16);
  --safe-bottom:       env(safe-area-inset-bottom, 0px);
  --safe-top:          env(safe-area-inset-top, 0px);

  /* Every scrollable page needs room for the bottom bar plus the home bar. */
  --page-pad-bottom: calc(var(--bottombar-height) + var(--safe-bottom) + var(--space-24));

  /* ═══════════════════════════════════════════════════════════════════
     Z-INDEX  — the complete set. Never write a bare number.
     ═══════════════════════════════════════════════════════════════════ */

  --z-base:     0;
  --z-raised:   10;   /* lifted cards */
  --z-sticky:   100;  /* sticky headers, segmented controls */
  --z-nav:      200;  /* top bar, bottom bar */
  --z-fab:      300;
  --z-scrim:    400;
  --z-sheet:    500;  /* sheets, modals, lightbox */
  --z-popover:  600;  /* menus, tooltips, typeahead */
  --z-toast:    700;
  --z-blocking: 800;  /* mandatory interstitial, age gate */

  /* ═══════════════════════════════════════════════════════════════════
     MOTION  — see brand/motion.md
     ═══════════════════════════════════════════════════════════════════ */

  --duration-instant: 100ms;
  --duration-fast:    150ms;
  --duration-base:    200ms;
  --duration-slow:    300ms;
  --duration-slower:  400ms;

  --ease-out:    cubic-bezier(0.2, 0, 0, 1);      /* entering — the default */
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);      /* leaving */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);    /* moving within view */

  --loading-delay:   300ms;  /* wait this long before showing any indicator */
  --loading-minimum: 400ms;  /* once shown, hold it this long */


  /* ── Surfaces ─────────────────────────────────────────────────────── */
  --bg:               var(--neutral-1);
  --bg-subtle:        var(--neutral-2);
  --surface:          var(--neutral-3);
  --surface-hover:    var(--neutral-4);
  --surface-active:   var(--neutral-5);

  /* ── Lines ────────────────────────────────────────────────────────── */
  --line-subtle:      var(--neutral-6);
  --line:             var(--neutral-7);
  --line-strong:      var(--neutral-8);
  --line-control:     var(--neutral-9);

  /* ── Text ─────────────────────────────────────────────────────────── */
  --text:             var(--neutral-12);
  --text-muted:       var(--neutral-11);
  --text-subtle:      var(--neutral-10);
  --text-on-solid:    var(--on-neutral);

  /* ── Brand ────────────────────────────────────────────────────────── */
  --accent-bg:        var(--brand-3);
  --accent-bg-hover:  var(--brand-4);
  --accent-line:      var(--brand-7);
  --accent-solid:     var(--brand-9);
  --accent-solid-hover: var(--brand-10);
  --accent-text:      var(--brand-11);
  --on-accent:        var(--on-brand);

  /* ── Status ───────────────────────────────────────────────────────── */
  --success-bg:       var(--success-3);
  --success-line:     var(--success-7);
  --success-solid:    var(--success-9);
  --success-text:     var(--success-11);

  --warn-bg:          var(--warn-3);
  --warn-line:        var(--warn-7);
  --warn-solid:       var(--warn-9);
  --warn-text:        var(--warn-11);

  --danger-bg:        var(--danger-3);
  --danger-line:      var(--danger-7);
  --danger-solid:     var(--danger-9);
  --danger-text:      var(--danger-11);

  --info-bg:          var(--info-3);
  --info-line:        var(--info-7);
  --info-solid:       var(--info-9);
  --info-text:        var(--info-11);

  /* ── Focus ────────────────────────────────────────────────────────── */
  --focus-ring:       var(--brand-9);

}

/* ═══════════════════════════════════════════════════════════════════════
   DARK
   ═══════════════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    /* neutral — cool-leaning grey — the ground the whole product sits on */
    --neutral-1: oklch(0.178 0.0007 240.0);
    --neutral-2: oklch(0.212 0.0011 240.0);
    --neutral-3: oklch(0.252 0.0019 240.0);
    --neutral-4: oklch(0.284 0.0025 240.0);
    --neutral-5: oklch(0.316 0.0031 240.0);
    --neutral-6: oklch(0.354 0.0037 240.0);
    --neutral-7: oklch(0.410 0.0044 240.0);
    --neutral-8: oklch(0.492 0.0055 240.0);
    --neutral-9: oklch(0.592 0.0075 240.0);
    --neutral-10: oklch(0.647 0.0075 240.0);
    --neutral-11: oklch(0.745 0.0060 240.0);
    --neutral-12: oklch(0.968 0.0027 240.0);

    /* brand — hue anchored on your vermilion; solid darkened so light text passes AA */
    --brand-1: oklch(0.178 0.0175 24.6);
    --brand-2: oklch(0.212 0.0291 25.7);
    --brand-3: oklch(0.252 0.0485 26.8);
    --brand-4: oklch(0.284 0.0640 27.9);
    --brand-5: oklch(0.316 0.0795 29.0);
    --brand-6: oklch(0.354 0.0951 30.1);
    --brand-7: oklch(0.410 0.1145 31.1);
    --brand-8: oklch(0.492 0.1416 32.2);
    --brand-9: oklch(0.562 0.1940 33.3);
    --brand-10: oklch(0.617 0.1940 34.4);
    --brand-11: oklch(0.745 0.1552 35.5);
    --brand-12: oklch(0.968 0.0162 36.6);

    /* success — confirmed, verified, active. Light solid raised to 0.620 (was 0.542) for CVD lightness separation from danger — 0.542-0.58 is a contrast dead zone that clears neither AA reading. */
    --success-1: oklch(0.178 0.0117 158.0);
    --success-2: oklch(0.212 0.0195 158.9);
    --success-3: oklch(0.252 0.0325 159.8);
    --success-4: oklch(0.284 0.0429 160.7);
    --success-5: oklch(0.316 0.0533 161.6);
    --success-6: oklch(0.354 0.0637 162.5);
    --success-7: oklch(0.410 0.0767 163.5);
    --success-8: oklch(0.492 0.0949 164.4);
    --success-9: oklch(0.660 0.1300 165.3);
    --success-10: oklch(0.715 0.1300 166.2);
    --success-11: oklch(0.745 0.1040 167.1);
    --success-12: oklch(0.968 0.0457 168.0);

    /* warn — amber — the gap reopened once brand moved redder */
    --warn-1: oklch(0.178 0.0135 62.0);
    --warn-2: oklch(0.212 0.0225 63.6);
    --warn-3: oklch(0.252 0.0375 65.3);
    --warn-4: oklch(0.284 0.0495 66.9);
    --warn-5: oklch(0.316 0.0615 68.5);
    --warn-6: oklch(0.354 0.0735 70.2);
    --warn-7: oklch(0.410 0.0881 71.8);
    --warn-8: oklch(0.492 0.1047 73.5);
    --warn-9: oklch(0.780 0.1500 75.1);
    --warn-10: oklch(0.835 0.1488 76.7);
    --warn-11: oklch(0.745 0.1200 78.4);
    --warn-12: oklch(0.968 0.0291 80.0);

    /* danger — CRIMSON, not red — 22 degrees clear of the brand vermilion */
    --danger-1: oklch(0.178 0.0166 4.0);
    --danger-2: oklch(0.212 0.0278 4.9);
    --danger-3: oklch(0.252 0.0462 5.8);
    --danger-4: oklch(0.284 0.0611 6.7);
    --danger-5: oklch(0.316 0.0759 7.6);
    --danger-6: oklch(0.354 0.0906 8.5);
    --danger-7: oklch(0.410 0.1091 9.5);
    --danger-8: oklch(0.492 0.1351 10.4);
    --danger-9: oklch(0.545 0.1850 11.3);
    --danger-10: oklch(0.600 0.1850 12.2);
    --danger-11: oklch(0.745 0.1480 13.1);
    --danger-12: oklch(0.968 0.0158 14.0);

    /* info — neutral system messages */
    --info-1: oklch(0.178 0.0130 248.0);
    --info-2: oklch(0.212 0.0217 248.7);
    --info-3: oklch(0.252 0.0362 249.5);
    --info-4: oklch(0.284 0.0478 250.2);
    --info-5: oklch(0.316 0.0594 250.9);
    --info-6: oklch(0.354 0.0710 251.6);
    --info-7: oklch(0.410 0.0855 252.4);
    --info-8: oklch(0.492 0.1058 253.1);
    --info-9: oklch(0.620 0.1450 253.8);
    --info-10: oklch(0.675 0.1450 254.5);
    --info-11: oklch(0.745 0.1160 255.3);
    --info-12: oklch(0.968 0.0153 256.0);

    /* text on solid fills — chosen by measured WCAG ratio */
    --on-neutral: oklch(0.178 0.0007 240.0);  /* neutral-dark-end, 4.63:1 — AA */
    --on-brand: oklch(0.968 0.0027 240.0);  /* neutral-light-end, 4.62:1 — AA */
    --on-success: oklch(0.178 0.0007 240.0);  /* neutral-dark-end, 6.45:1 — AA */
    --on-warn: oklch(0.178 0.0007 240.0);  /* neutral-dark-end, 9.23:1 — AA */
    --on-danger: oklch(0.968 0.0027 240.0);  /* neutral-light-end, 5.00:1 — AA */
    --on-info: oklch(0.178 0.0007 240.0);  /* neutral-dark-end, 5.17:1 — AA */
    /* item placeholder mark — eight colourways */
    --mark-1: oklch(0.640 0.1450 12.0);
    --mark-2: oklch(0.640 0.1450 33.0);
    --mark-3: oklch(0.640 0.1450 145.0);
    --mark-4: oklch(0.640 0.1241 172.0);
    --mark-5: oklch(0.640 0.1093 205.0);
    --mark-6: oklch(0.640 0.1450 248.0);
    --mark-7: oklch(0.640 0.1450 292.0);
    --mark-8: oklch(0.640 0.1450 330.0);
    --mark-ink: oklch(0.140 0.0007 240.0);  /* on every --mark-N, min 5.51:1 — AA */

    --alpha-1: oklch(0.99 0.002 240 / 0.05);
    --alpha-2: oklch(0.99 0.002 240 / 0.08);
    --alpha-3: oklch(0.99 0.002 240 / 0.12);
    --alpha-4: oklch(0.99 0.002 240 / 0.17);
    --scrim:   oklch(0.08 0.004 240 / 0.62);

    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.30), 0 2px 8px oklch(0 0 0 / 0.28);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.40), 0 12px 32px oklch(0 0 0 / 0.34);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.52), 0 32px 72px oklch(0 0 0 / 0.44);

  }
}

[data-theme="dark"] {
  color-scheme: dark;

  /* neutral — cool-leaning grey — the ground the whole product sits on */
  --neutral-1: oklch(0.178 0.0007 240.0);
  --neutral-2: oklch(0.212 0.0011 240.0);
  --neutral-3: oklch(0.252 0.0019 240.0);
  --neutral-4: oklch(0.284 0.0025 240.0);
  --neutral-5: oklch(0.316 0.0031 240.0);
  --neutral-6: oklch(0.354 0.0037 240.0);
  --neutral-7: oklch(0.410 0.0044 240.0);
  --neutral-8: oklch(0.492 0.0055 240.0);
  --neutral-9: oklch(0.592 0.0075 240.0);
  --neutral-10: oklch(0.647 0.0075 240.0);
  --neutral-11: oklch(0.745 0.0060 240.0);
  --neutral-12: oklch(0.968 0.0027 240.0);

  /* brand — hue anchored on your vermilion; solid darkened so light text passes AA */
  --brand-1: oklch(0.178 0.0175 24.6);
  --brand-2: oklch(0.212 0.0291 25.7);
  --brand-3: oklch(0.252 0.0485 26.8);
  --brand-4: oklch(0.284 0.0640 27.9);
  --brand-5: oklch(0.316 0.0795 29.0);
  --brand-6: oklch(0.354 0.0951 30.1);
  --brand-7: oklch(0.410 0.1145 31.1);
  --brand-8: oklch(0.492 0.1416 32.2);
  --brand-9: oklch(0.562 0.1940 33.3);
  --brand-10: oklch(0.617 0.1940 34.4);
  --brand-11: oklch(0.745 0.1552 35.5);
  --brand-12: oklch(0.968 0.0162 36.6);

  /* success — confirmed, verified, active. Light solid raised to 0.620 (was 0.542) for CVD lightness separation from danger — 0.542-0.58 is a contrast dead zone that clears neither AA reading. */
  --success-1: oklch(0.178 0.0117 158.0);
  --success-2: oklch(0.212 0.0195 158.9);
  --success-3: oklch(0.252 0.0325 159.8);
  --success-4: oklch(0.284 0.0429 160.7);
  --success-5: oklch(0.316 0.0533 161.6);
  --success-6: oklch(0.354 0.0637 162.5);
  --success-7: oklch(0.410 0.0767 163.5);
  --success-8: oklch(0.492 0.0949 164.4);
  --success-9: oklch(0.660 0.1300 165.3);
  --success-10: oklch(0.715 0.1300 166.2);
  --success-11: oklch(0.745 0.1040 167.1);
  --success-12: oklch(0.968 0.0457 168.0);

  /* warn — amber — the gap reopened once brand moved redder */
  --warn-1: oklch(0.178 0.0135 62.0);
  --warn-2: oklch(0.212 0.0225 63.6);
  --warn-3: oklch(0.252 0.0375 65.3);
  --warn-4: oklch(0.284 0.0495 66.9);
  --warn-5: oklch(0.316 0.0615 68.5);
  --warn-6: oklch(0.354 0.0735 70.2);
  --warn-7: oklch(0.410 0.0881 71.8);
  --warn-8: oklch(0.492 0.1047 73.5);
  --warn-9: oklch(0.780 0.1500 75.1);
  --warn-10: oklch(0.835 0.1488 76.7);
  --warn-11: oklch(0.745 0.1200 78.4);
  --warn-12: oklch(0.968 0.0291 80.0);

  /* danger — CRIMSON, not red — 22 degrees clear of the brand vermilion */
  --danger-1: oklch(0.178 0.0166 4.0);
  --danger-2: oklch(0.212 0.0278 4.9);
  --danger-3: oklch(0.252 0.0462 5.8);
  --danger-4: oklch(0.284 0.0611 6.7);
  --danger-5: oklch(0.316 0.0759 7.6);
  --danger-6: oklch(0.354 0.0906 8.5);
  --danger-7: oklch(0.410 0.1091 9.5);
  --danger-8: oklch(0.492 0.1351 10.4);
  --danger-9: oklch(0.545 0.1850 11.3);
  --danger-10: oklch(0.600 0.1850 12.2);
  --danger-11: oklch(0.745 0.1480 13.1);
  --danger-12: oklch(0.968 0.0158 14.0);

  /* info — neutral system messages */
  --info-1: oklch(0.178 0.0130 248.0);
  --info-2: oklch(0.212 0.0217 248.7);
  --info-3: oklch(0.252 0.0362 249.5);
  --info-4: oklch(0.284 0.0478 250.2);
  --info-5: oklch(0.316 0.0594 250.9);
  --info-6: oklch(0.354 0.0710 251.6);
  --info-7: oklch(0.410 0.0855 252.4);
  --info-8: oklch(0.492 0.1058 253.1);
  --info-9: oklch(0.620 0.1450 253.8);
  --info-10: oklch(0.675 0.1450 254.5);
  --info-11: oklch(0.745 0.1160 255.3);
  --info-12: oklch(0.968 0.0153 256.0);

  /* text on solid fills — chosen by measured WCAG ratio */
  --on-neutral: oklch(0.178 0.0007 240.0);  /* neutral-dark-end, 4.63:1 — AA */
  --on-brand: oklch(0.968 0.0027 240.0);  /* neutral-light-end, 4.62:1 — AA */
  --on-success: oklch(0.178 0.0007 240.0);  /* neutral-dark-end, 6.45:1 — AA */
  --on-warn: oklch(0.178 0.0007 240.0);  /* neutral-dark-end, 9.23:1 — AA */
  --on-danger: oklch(0.968 0.0027 240.0);  /* neutral-light-end, 5.00:1 — AA */
  --on-info: oklch(0.178 0.0007 240.0);  /* neutral-dark-end, 5.17:1 — AA */
  /* item placeholder mark — eight colourways */
  --mark-1: oklch(0.640 0.1450 12.0);
  --mark-2: oklch(0.640 0.1450 33.0);
  --mark-3: oklch(0.640 0.1450 145.0);
  --mark-4: oklch(0.640 0.1241 172.0);
  --mark-5: oklch(0.640 0.1093 205.0);
  --mark-6: oklch(0.640 0.1450 248.0);
  --mark-7: oklch(0.640 0.1450 292.0);
  --mark-8: oklch(0.640 0.1450 330.0);
  --mark-ink: oklch(0.140 0.0007 240.0);  /* on every --mark-N, min 5.51:1 — AA */

  --alpha-1: oklch(0.99 0.002 240 / 0.05);
  --alpha-2: oklch(0.99 0.002 240 / 0.08);
  --alpha-3: oklch(0.99 0.002 240 / 0.12);
  --alpha-4: oklch(0.99 0.002 240 / 0.17);
  --scrim:   oklch(0.08 0.004 240 / 0.62);

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.30), 0 2px 8px oklch(0 0 0 / 0.28);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.40), 0 12px 32px oklch(0 0 0 / 0.34);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.52), 0 32px 72px oklch(0 0 0 / 0.44);


  /* ── Surfaces ─────────────────────────────────────────────────────── */
  --bg:               var(--neutral-1);
  --bg-subtle:        var(--neutral-2);
  --surface:          var(--neutral-3);
  --surface-hover:    var(--neutral-4);
  --surface-active:   var(--neutral-5);

  /* ── Lines ────────────────────────────────────────────────────────── */
  --line-subtle:      var(--neutral-6);
  --line:             var(--neutral-7);
  --line-strong:      var(--neutral-8);
  --line-control:     var(--neutral-9);

  /* ── Text ─────────────────────────────────────────────────────────── */
  --text:             var(--neutral-12);
  --text-muted:       var(--neutral-11);
  --text-subtle:      var(--neutral-10);
  --text-on-solid:    var(--on-neutral);

  /* ── Brand ────────────────────────────────────────────────────────── */
  --accent-bg:        var(--brand-3);
  --accent-bg-hover:  var(--brand-4);
  --accent-line:      var(--brand-7);
  --accent-solid:     var(--brand-9);
  --accent-solid-hover: var(--brand-10);
  --accent-text:      var(--brand-11);
  --on-accent:        var(--on-brand);

  /* ── Status ───────────────────────────────────────────────────────── */
  --success-bg:       var(--success-3);
  --success-line:     var(--success-7);
  --success-solid:    var(--success-9);
  --success-text:     var(--success-11);

  --warn-bg:          var(--warn-3);
  --warn-line:        var(--warn-7);
  --warn-solid:       var(--warn-9);
  --warn-text:        var(--warn-11);

  --danger-bg:        var(--danger-3);
  --danger-line:      var(--danger-7);
  --danger-solid:     var(--danger-9);
  --danger-text:      var(--danger-11);

  --info-bg:          var(--info-3);
  --info-line:        var(--info-7);
  --info-solid:       var(--info-9);
  --info-text:        var(--info-11);

  /* ── Focus ────────────────────────────────────────────────────────── */
  --focus-ring:       var(--brand-9);

}

/* ═══════════════════════════════════════════════════════════════════════
   BREAKPOINTS

   CSS custom properties DO NOT WORK inside media queries.
   `@media (min-width: var(--bp-md))` silently does nothing. These are
   documented here and duplicated as literals in component CSS, and exported
   from breakpoints.ts for useViewport(). Change one, change all three.

     mobile   < 768px      base styles, no query — mobile first
     tablet   >= 768px
     desktop  >= 1024px
     wide     >= 1280px
   ═══════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   Not "animations off" — feedback still has to work. Opacity and colour
   survive; transforms do not.
   ═══════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

