/* ==========================================================================
   Steward — design tokens. Direction A · Register (approved 22/09/2026).
   Form archetype: Studio (approved 22/09/2026 after the Ledger register was rejected as wireframe-like). Nav: top nav (web) + tab bar (mobile).
   One brand hue drives the file: bottle green, hue 160. Ground is a true
   off-white at chroma 0 — never cream. Colour strategy: committed.
   ========================================================================== */
:root {
  color-scheme: light;

  /* ---- Colour: neutrals, tinted toward hue 160 ---- */
  --bg:            oklch(0.965 0.007 160);   /* the toned canvas */
  --surface:       oklch(1 0 0);
  --surface-2:     oklch(0.975 0.005 160);
  --surface-3:     oklch(0.945 0.010 160);
  --ink:           oklch(0.21 0.015 160);   /* 15.4:1 on --bg */
  --ink-2:         oklch(0.32 0.018 160);
  --muted:         oklch(0.45 0.020 160);   /* 7.1:1 on --bg */
  --muted-2:       oklch(0.55 0.018 160);   /* 4.6:1 on --bg */
  --line:          oklch(0.90 0.010 160);
  --line-strong:   oklch(0.78 0.016 160);

  /* ---- Colour: brand ---- */
  --primary:       oklch(0.40 0.10 160);    /* 7:1 white on it */
  --primary-strong:oklch(0.30 0.08 160);
  --primary-soft:  oklch(0.955 0.020 160);
  --primary-soft-2:oklch(0.900 0.045 160);
  --on-primary:    oklch(0.99 0 0);

  /* Accent: a warm signal used only for "waiting on someone" and highlights. */
  --accent:        oklch(0.78 0.13 75);
  --accent-strong: oklch(0.62 0.13 70);
  --accent-soft:   oklch(0.96 0.04 80);
  --on-accent:     oklch(0.24 0.05 70);

  /* One dark band per page, maximum. */
  --drench:        oklch(0.24 0.05 160);
  --drench-2:      oklch(0.30 0.06 160);
  --on-drench:     oklch(0.975 0.004 160);
  --on-drench-muted: oklch(0.80 0.02 160);
  --drench-line:   oklch(0.36 0.04 160);

  /* ---- Colour: semantic — STATES ONLY ---- */
  --success: oklch(0.55 0.12 150); --success-soft: oklch(0.95 0.04 150); --success-ink: oklch(0.36 0.10 150);
  --warning: oklch(0.72 0.14 75);  --warning-soft: oklch(0.96 0.05 80);  --warning-ink: oklch(0.42 0.11 70);
  --danger:  oklch(0.50 0.17 25);  --danger-soft:  oklch(0.95 0.04 25);  --danger-ink:  oklch(0.42 0.16 25);
  --info:    oklch(0.50 0.10 250); --info-soft:    oklch(0.95 0.03 250); --info-ink:    oklch(0.38 0.10 250);

  /* Charts: brand-hue ramp. */
  --c-1: oklch(0.90 0.05 160); --c-2: oklch(0.76 0.09 160);
  --c-3: oklch(0.58 0.10 160); --c-4: oklch(0.42 0.09 160); --c-5: oklch(0.28 0.07 160);

  /* ---- Typography ---- */
  --font-display: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-display: clamp(2.75rem, 1.5rem + 3.6vw, 5rem);
  --fs-h1:      clamp(2.125rem, 1.4rem + 2.4vw, 3.5rem);
  --fs-h2:      clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
  --fs-h3:      clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --fs-lead:    clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --fs-body:    1.0625rem;
  --fs-small:   0.9375rem;
  --fs-xs:      0.8125rem;

  --t-28: 1.75rem; --t-22: 1.375rem; --t-18: 1.125rem; --t-16: 1rem;
  --t-15: 0.9375rem; --t-14: 0.875rem; --t-13: 0.8125rem; --t-12: 0.75rem; --t-11: 0.6875rem;

  --lh-tight: 1.04; --lh-snug: 1.2; --lh-body: 1.5; --lh-relaxed: 1.7;
  --tracking-display: -0.015em; --tracking-ui: 0;

  /* ---- Spacing ---- */
  --s-1: 0.25rem; --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;   --s-5: 1.5rem;
  --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;    --s-9: 5rem;   --s-10: 6rem; --s-12: 8rem;
  --section:       clamp(4rem, 2.5rem + 5vw, 7.5rem);
  --section-tight: clamp(2.5rem, 2rem + 2.5vw, 4.5rem);
  --gutter:        clamp(1.25rem, 4vw, 2.5rem);
  --container: 1180px; --container-wide: 1360px; --container-narrow: 720px; --measure: 66ch;

  /* ==========================================================================
     FORM LAYER — Studio.
     Toned canvas, white sheets with one soft shadow, generous radii, comfortable density.
     ========================================================================== */

  /* 1. Shape: near-square. Controls 2, cards 4, layers 8, pills full. */
  --r-ctl: 10px; --r-card: 16px; --r-lg: 20px; --r-full: 999px;

  /* 2. Border weight: one hairline everywhere; the strong rule is ink, not thicker. */
  --bw: 1px; --bw-strong: 1px;
  --rule: var(--bw) solid var(--line);
  --rule-strong: var(--bw-strong) solid var(--line);

  /* 3. Elevation: hairline. Only floating layers cast a shadow. */
  --elev-card: 0 1px 2px oklch(0.21 0.02 160 / 0.06), 0 12px 32px -20px oklch(0.21 0.02 160 / 0.25);
  --elev-pop:  0 6px 20px -8px oklch(0.21 0.015 160 / 0.22);
  --elev-modal: 0 28px 56px -20px oklch(0.21 0.015 160 / 0.30);

  /* 4. Density: tight. 32px controls, 40px rows, compact card padding. */
  --h-ctl: 40px; --h-ctl-sm: 32px; --h-row: 56px;
  --pad-card: var(--s-5); --gap-grid: var(--s-5);

  /* 5. Divider strategy: ruled rows; a ledger grid only inside data tables. */
  --cell-rule: none;
  --row-rule: var(--rule);
  --head-rule: var(--rule);

  /* 6. Heading treatment: serif display at medium weight, sentence case. */
  --wt-head: 700; --wt-body: 400;
  --tracking-heading: -0.02em;
  --case-head: none;

  /* ---- Elevation aliases used by chrome ---- */
  --e-1: 0 1px 2px oklch(0.21 0.02 160 / 0.05);
  --e-2: 0 4px 14px -6px oklch(0.21 0.015 160 / 0.18);
  --e-3: 0 12px 32px -12px oklch(0.21 0.015 160 / 0.28);

  /* ---- Motion ---- */
  --dur-1: 120ms; --dur-2: 180ms; --dur-3: 280ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Prototype chrome ---- */
  --pocbar-h: 44px;
  --z-sticky: 20; --z-layer: 60; --z-toast: 80; --z-pocbar: 90; --z-tour: 100;
}

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