/* tokens.css — every colour, size, radius, shadow and easing the sample uses.
 *
 * Re-skin the site by editing this file: site.css (public), staff.css (the
 * /manage workspace) and every module stylesheet read these variables and
 * hard-code no colours of their own.
 *
 * Two families:
 *   --brand … --band     the public website (editorial: big type, one green,
 *                        one warm accent, a dark footer band)
 *   --ui-*               the staff workspace (quiet neutrals, one primary)
 * Status colours (--danger, --warning, --success, --info) are shared.
 *
 * Dark mode is the same names with other values. It follows the visitor's
 * system setting unless they pick one with the theme toggle; theme.js puts
 * their choice on <html data-theme="light|dark"> before the first paint.
 */

/* Inter ships inside the engine binary: no CDN, works offline, CSP-clean. */
@font-face {
  font-family: "Inter";
  src: url("/__wons/fonts/inter.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* ---- Public site ------------------------------------------------------ */
  --brand: #00bf63;          /* buttons, underlines, active states */
  --brand-strong: #009c51;   /* brand on a light ground where text sits on it */
  --on-brand: #0f172a;       /* text on --brand */
  --accent: #ef8340;         /* eyebrow rule, focus ring, small highlights */
  --ink: #0f172a;            /* headings and strong text */
  --text: #2f3b40;           /* body text */
  --text-muted: #4a565b;     /* secondary text */
  --surface: #ffffff;        /* page ground */
  --tint: #edfbe2;           /* pale panels, tags, hovers */
  --tint-strong: #d5ead8;    /* stronger tint, rules on tinted ground */
  --line: #e3ece4;           /* hairlines */
  --line-strong: #c9dccc;    /* control borders */
  --band: #0c1406;           /* footer and dark sections */
  --band-text: #d5ead8;      /* body text on --band */
  --band-strong: #ffffff;    /* headings and links on --band */
  --band-line: rgb(213 234 216 / .15);
  --hero: #1c2a1f;           /* hero ground under the CSS-only scenery */
  /* The hero and dark bands are dark in both modes; these never change. */
  --on-dark: #ffffff;
  --on-dark-soft: #edfbe2;
  --on-dark-muted: rgb(237 251 226 / .8);
  --on-dark-line: rgb(255 255 255 / .55);
  --on-dark-hairline: rgb(213 234 216 / .3);
  --on-dark-fill: rgb(255 255 255 / .14);
  --scene-1: #2f6b45; --scene-2: #1d4a31; --scene-3: #16301f;
  --ridge-far: #2a5a3c; --ridge-far-2: #1b3a27;
  --ridge-mid: #1f4630; --ridge-mid-2: #132a1c;
  --ridge-near: #11231a; --ridge-near-2: #0c1406;
  --scene-glow: rgb(0 191 99 / .55);
  --scene-glow-warm: rgb(239 131 64 / .28);
  --scene-top: rgb(12 20 6 / .25);
  --scene-grain: rgb(255 255 255 / .05);
  --hero-shade: rgb(12 20 6 / .55);
  --header-glass: rgb(255 255 255 / .86);

  /* ---- Staff workspace -------------------------------------------------- */
  --ui-bg: #ffffff;
  --ui-fg: #09090b;
  --ui-card: #ffffff;
  --ui-muted: #f4f4f5;       /* quiet fills: tracks, chips, hovers */
  --ui-muted-fg: #71717a;    /* secondary text */
  --ui-soft-fg: #3f3f46;     /* nav text, badge text */
  --ui-faint: #a1a1aa;       /* placeholders, empty-state icons */
  --ui-accent: #f4f4f5;      /* hover background */
  --ui-border: #e4e4e7;
  --ui-border-strong: #d4d4d8;
  --ui-input: #e4e4e7;
  --ui-ring: #16a34a;
  --ui-ring-soft: rgb(22 163 74 / .18);
  --ui-primary: #14532d;
  --ui-primary-hover: #166534;
  --ui-primary-fg: #fafafa;
  --ui-selected: #e9ede9;    /* the active sidebar item */
  --ui-sidebar: #fafafa;
  --ui-subtle: #fcfcfc;      /* table heads, card footers */
  --ui-row-hover: #fafafa;
  --ui-topbar: rgb(255 255 255 / .85);
  --ui-scrim: rgb(0 0 0 / .45);
  --ui-inverse: #18181b;     /* bulk bar, tooltips */
  --ui-inverse-fg: #fafafa;
  --ui-inverse-line: #3f3f46;
  --ui-chart-1: #14532d; --ui-chart-2: #16a34a; --ui-chart-3: #86efac;
  --ui-chart-4: #f59e0b; --ui-chart-5: #a1a1aa; --ui-chart-6: #0ea5e9;

  /* ---- Status (both surfaces) ------------------------------------------- */
  --danger-solid: #dc2626; --danger-solid-hover: #b91c1c;
  --danger: #dc2626;  --danger-strong: #b91c1c;  --danger-soft: #fef2f2;  --danger-line: #fecaca;  --danger-text: #991b1b;
  --warning: #b45309; --warning-soft: #fffbeb; --warning-line: #fde68a; --warning-text: #92400e; --warning-fill: #f59e0b;
  --success: #15803d; --success-strong: #166534; --success-soft: #f0fdf4; --success-line: #bbf7d0; --success-text: #166534;
  --info: #1d4ed8;    --info-soft: #eff6ff;    --info-line: #bfdbfe;    --info-text: #1e3a8a;

  /* ---- Type ------------------------------------------------------------- */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: .8125rem;
  --text-sm: .9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.375rem;
  --text-2xl: clamp(1.5rem, 1.25rem + .9vw, 2rem);
  --text-3xl: clamp(2rem, 1.45rem + 2vw, 3.125rem);
  --text-4xl: clamp(2.25rem, 1.5rem + 2.8vw, 3.75rem);
  --text-hero: clamp(2.5rem, 1.3rem + 4.6vw, 5.25rem);
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-body: 1.65;

  /* ---- Space, shape, depth ---------------------------------------------- */
  --container: 1200px;
  --gutter: 24px;
  --section: 96px;
  --header-h: 112px;
  --control-h: 48px;
  --radius: 10px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgb(15 23 42 / .05), 0 8px 24px rgb(15 23 42 / .06);
  --shadow-lift: 0 2px 6px rgb(15 23 42 / .06), 0 18px 40px rgb(15 23 42 / .12);
  --ui-radius: .5rem;
  --ui-radius-sm: .375rem;
  --ui-radius-lg: .75rem;
  --ui-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
  --ui-shadow: 0 1px 3px 0 rgb(0 0 0 / .08), 0 1px 2px -1px rgb(0 0 0 / .08);
  --ui-shadow-lg: 0 10px 30px -10px rgb(0 0 0 / .25), 0 4px 6px -4px rgb(0 0 0 / .08);
  --sidebar-w: 15.5rem;

  /* ---- Motion ----------------------------------------------------------- */
  --ease: cubic-bezier(.54, .01, .31, .99);
  --ease-out: cubic-bezier(.2, .7, .15, 1);
}

/* Dark values: applied when the system asks for dark and the visitor has not
   chosen light, or when they chose dark. The two blocks must stay identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #00bf63; --brand-strong: #2fd585; --on-brand: #04130b; --accent: #f29660;
    --ink: #eef6f0; --text: #c3d0c7; --text-muted: #93a39a;
    --surface: #0b120d; --tint: #13221a; --tint-strong: #1d3326;
    --line: #1f2d24; --line-strong: #2f4537;
    --band: #050a03; --band-text: #b9cdbf; --band-strong: #ffffff; --band-line: rgb(213 234 216 / .12);
    --hero: #0f1a12; --hero-shade: rgb(3 8 4 / .62); --header-glass: rgb(11 18 13 / .82);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .35);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / .35), 0 18px 40px rgb(0 0 0 / .5);

    --ui-bg: #09090b; --ui-fg: #fafafa; --ui-card: #0f0f12;
    --ui-muted: #1c1c20; --ui-muted-fg: #a1a1aa; --ui-soft-fg: #d4d4d8; --ui-faint: #71717a;
    --ui-accent: #1f1f24; --ui-border: #27272a; --ui-border-strong: #3f3f46; --ui-input: #2e2e33;
    --ui-ring: #22c55e; --ui-ring-soft: rgb(34 197 94 / .22);
    --ui-primary: #16a34a; --ui-primary-hover: #15803d; --ui-primary-fg: #ffffff;
    --ui-selected: #1a2a1f; --ui-sidebar: #0c0c0e; --ui-subtle: #111114; --ui-row-hover: #141418;
    --ui-topbar: rgb(9 9 11 / .82); --ui-scrim: rgb(0 0 0 / .6);
    --ui-inverse: #f4f4f5; --ui-inverse-fg: #18181b; --ui-inverse-line: #d4d4d8;
    --ui-chart-1: #22c55e; --ui-chart-2: #16a34a; --ui-chart-3: #86efac;
    --ui-chart-4: #f59e0b; --ui-chart-5: #71717a; --ui-chart-6: #38bdf8;
    --ui-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .4);
    --ui-shadow: 0 1px 3px 0 rgb(0 0 0 / .5), 0 1px 2px -1px rgb(0 0 0 / .5);
    --ui-shadow-lg: 0 10px 30px -10px rgb(0 0 0 / .7), 0 4px 6px -4px rgb(0 0 0 / .4);

    --danger: #f87171; --danger-strong: #ef4444; --danger-soft: rgb(239 68 68 / .12); --danger-line: rgb(239 68 68 / .32); --danger-text: #fca5a5;
    --warning: #fbbf24; --warning-soft: rgb(245 158 11 / .12); --warning-line: rgb(245 158 11 / .32); --warning-text: #fcd34d; --warning-fill: #f59e0b;
    --success: #4ade80; --success-strong: #22c55e; --success-soft: rgb(34 197 94 / .12); --success-line: rgb(34 197 94 / .3); --success-text: #86efac;
    --info: #60a5fa; --info-soft: rgb(59 130 246 / .12); --info-line: rgb(59 130 246 / .32); --info-text: #93c5fd;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #00bf63; --brand-strong: #2fd585; --on-brand: #04130b; --accent: #f29660;
  --ink: #eef6f0; --text: #c3d0c7; --text-muted: #93a39a;
  --surface: #0b120d; --tint: #13221a; --tint-strong: #1d3326;
  --line: #1f2d24; --line-strong: #2f4537;
  --band: #050a03; --band-text: #b9cdbf; --band-strong: #ffffff; --band-line: rgb(213 234 216 / .12);
  --hero: #0f1a12; --hero-shade: rgb(3 8 4 / .62); --header-glass: rgb(11 18 13 / .82);
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .35);
  --shadow-lift: 0 2px 6px rgb(0 0 0 / .35), 0 18px 40px rgb(0 0 0 / .5);

  --ui-bg: #09090b; --ui-fg: #fafafa; --ui-card: #0f0f12;
  --ui-muted: #1c1c20; --ui-muted-fg: #a1a1aa; --ui-soft-fg: #d4d4d8; --ui-faint: #71717a;
  --ui-accent: #1f1f24; --ui-border: #27272a; --ui-border-strong: #3f3f46; --ui-input: #2e2e33;
  --ui-ring: #22c55e; --ui-ring-soft: rgb(34 197 94 / .22);
  --ui-primary: #16a34a; --ui-primary-hover: #15803d; --ui-primary-fg: #ffffff;
  --ui-selected: #1a2a1f; --ui-sidebar: #0c0c0e; --ui-subtle: #111114; --ui-row-hover: #141418;
  --ui-topbar: rgb(9 9 11 / .82); --ui-scrim: rgb(0 0 0 / .6);
  --ui-inverse: #f4f4f5; --ui-inverse-fg: #18181b; --ui-inverse-line: #d4d4d8;
  --ui-chart-1: #22c55e; --ui-chart-2: #16a34a; --ui-chart-3: #86efac;
  --ui-chart-4: #f59e0b; --ui-chart-5: #71717a; --ui-chart-6: #38bdf8;
  --ui-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .4);
  --ui-shadow: 0 1px 3px 0 rgb(0 0 0 / .5), 0 1px 2px -1px rgb(0 0 0 / .5);
  --ui-shadow-lg: 0 10px 30px -10px rgb(0 0 0 / .7), 0 4px 6px -4px rgb(0 0 0 / .4);

  --danger: #f87171; --danger-strong: #ef4444; --danger-soft: rgb(239 68 68 / .12); --danger-line: rgb(239 68 68 / .32); --danger-text: #fca5a5;
  --warning: #fbbf24; --warning-soft: rgb(245 158 11 / .12); --warning-line: rgb(245 158 11 / .32); --warning-text: #fcd34d; --warning-fill: #f59e0b;
  --success: #4ade80; --success-strong: #22c55e; --success-soft: rgb(34 197 94 / .12); --success-line: rgb(34 197 94 / .3); --success-text: #86efac;
  --info: #60a5fa; --info-soft: rgb(59 130 246 / .12); --info-line: rgb(59 130 246 / .32); --info-text: #93c5fd;
}

/* Theme switches cross-fade instead of snapping (colour only, never layout). */
.theme-fading, .theme-fading *, .theme-fading *::before, .theme-fading *::after {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, fill .25s ease !important;
}
@media (prefers-reduced-motion: reduce) {
  .theme-fading, .theme-fading * { transition: none !important; }
}
