/* ═════════════════════════════════════════════════════════════════════════
   Design tokens. The ONLY place a colour, size, radius, shadow or duration
   is written down; components.css and every template consume these by name.

   The Dash On brand (John Mulhern's sales-page redesign, Ben's ruling
   2026-11-18, design workspace BACKLOG.md "Public sales page, sign-up and
   Stripe trial"): ink green, a bright "switched on" green, sage and fog,
   set in Plus Jakarta Sans with JetBrains Mono for small labels. The
   structure is unchanged from the Nocturne seed: every category, both
   themes, contrast checked to WCAG 2.2 AA. docs/DESIGN.md is the one-page
   guide beside it.

   Light and dark follow the OS. Dark is the ink palette; light is fog and
   white with the accent walked down to a deep green that has contrast on
   white. The fonts are served from our own static files (OFL; fonts/), so
   a visit makes no request to anyone else.
   ═══════════════════════════════════════════════════════════════════════ */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/plus-jakarta-sans-400.503e7cbdb484.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/plus-jakarta-sans-500.e5e6761eaecb.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/plus-jakarta-sans-600.79e62f3332cd.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/plus-jakarta-sans-700.5b629bd8abb4.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/plus-jakarta-sans-800.408ecc6630e8.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/jetbrains-mono-500.a21e038a03f7.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/jetbrains-mono-600.075ec35bc15b.woff2") format("woff2"); }

:root {
  /* surfaces and text */
  --color-bg: #11201c;
  --color-surface: #1b2f2a;
  --color-text: #eef1ea;
  --color-divider: color-mix(in srgb, #eef1ea 16%, transparent);
  --color-row-rule: color-mix(in srgb, #eef1ea 8%, transparent);

  /* accent */
  --color-accent: #2fbf71;
  --color-accent-text: #8fe3b5;
  --color-link: #8fe3b5;
  --color-link-hover: #bfecd3;

  /* brand: the public pages' "switched on" green and the ink band. The
     bright green carries ink text (5.5:1), never white; a band set on
     ink carries fog (11.6:1) and sage for quieter lines (6.7:1). */
  --color-brand: #2fbf71;
  --color-on-brand: #1e3530;
  --color-brand-soft: color-mix(in srgb, #2fbf71 18%, transparent);
  --color-ink: #0b1714;
  --color-on-ink: #f1f2ec;
  --color-on-ink-muted: #a9bfa8;
  --color-ink-line: color-mix(in srgb, #f1f2ec 14%, transparent);

  /* The page's own text colours, captured on :root (so in either theme) for
     a band that turns them over - the ink band - to hand back to a light
     card inside it. Aliases, resolved where they are declared. */
  --page-text: var(--color-text);
  --page-dim: var(--color-dim);
  --page-muted: var(--color-muted);
  --page-link: var(--color-link);
  --page-link-hover: var(--color-link-hover);
  --page-divider: var(--color-divider);

  /* tonal ramps — one shared lightness scale */
  --color-neutral-100: #f4f6f1;
  --color-neutral-200: #d9dcd8;
  --color-neutral-300: #bec3be;
  --color-neutral-400: #a3aaa5;
  --color-neutral-500: #89908c;
  --color-neutral-600: #6e7672;
  --color-neutral-700: #535d59;
  --color-neutral-800: #38433f;
  --color-neutral-900: #1d2a26;

  --color-accent-100: #effbf4;
  --color-accent-200: #bfecd3;
  --color-accent-300: #8fddb2;
  --color-accent-400: #5fce92;
  --color-accent-500: #2fbf71;
  --color-accent-600: #279e5d;
  --color-accent-700: #1e7c4a;
  --color-accent-800: #155b36;
  --color-accent-900: #0d3a22;

  /* semantic text roles */
  --color-muted: var(--color-neutral-400);
  --color-dim: var(--color-neutral-400);
  --color-placeholder: var(--color-neutral-400);  /* 5.9:1 on the dark surface */

  /* status — always paired with words, never colour alone */
  --ok: oklch(0.78 0.1 160);
  --ok-text: oklch(0.82 0.1 160);
  --warn: oklch(0.82 0.11 90);
  --warn-text: oklch(0.85 0.1 90);
  --bad: oklch(0.72 0.13 25);
  --bad-text: oklch(0.78 0.12 25);

  /* type */
  --font-heading: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading-weight: 700;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --text-2xs: 0.7rem;
  --text-xs: 0.78rem;
  --text-sm: 0.84rem;
  --text-md: 0.95rem;
  --text-lg: 1.1rem;
  --text-xl: 1.3rem;
  --text-2xl: 1.65rem;
  --text-display: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); /* a public page's section headline */
  --text-hero: clamp(2.6rem, 1.5rem + 4.4vw, 4.75rem);  /* the landing page's one headline */
  --tracking-tight: -0.035em;  /* the brand's big headlines run tight */
  --tracking-label: 0.08em;    /* mono kickers */
  --leading-tight: 1.12;
  --leading-snug: 1.3;
  --leading-body: 1.55;

  /* space — a 0.25rem step */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-12: 3rem;

  /* measure */
  --measure-narrow: 54rem;
  --measure-landing: 73rem;  /* the public pages' column (John's 1164px) */
  --measure-page: 68rem;
  --measure-wide: 74rem;
  --measure-dialog: 41rem;
  --fade: 3rem;
  --tap: 2.25rem;
  --sidebar-width: 15rem;  /* the signed-in shell's left rail */
  --sidebar-rail: 4.25rem; /* the same sidebar, collapsed to its icons */
  --sidebar-now: var(--sidebar-width); /* its width right now: the shell sets it */
  --measure-run: 120rem;   /* the run page's cap on very wide screens */
  /* the tick rail: a slim strip, a sideways pill per stage, a dash per step */
  --tick-rail-width: 2.75rem;
  --tick-stage-width: 2rem;
  --tick-stage-height: 0.625rem;
  --tick-step-width: 1rem;
  --tick-step-width-current: 1.5rem;
  --tick-name-stage-height: 0.5rem;
  --tick-step-height: 0.25rem;
  --tick-hatch: 0.1875rem;
  --tick-stage-row: 1.375rem;
  --tick-step-row: 0.875rem;
  --tick-stage-row-touch: 1.75rem;
  --tick-step-row-touch: 1.5rem;
  --tick-name-row: 1.75rem;
  --tick-panel-width: 19rem;
  --tick-close-delay: 160ms;
  --tile-min: 16rem;       /* the narrowest a dashboard tile gets before the grid drops a column */
  --tile-height: 11rem;    /* tiles in a row line up whatever their copy */
  --viewport-height: 100dvh; /* the visible viewport, mobile browser bars excluded */

  /* radius, elevation */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;    /* the public pages' cards */
  --radius-pill: 999rem;
  --shadow-sm: 0 0 0 1px var(--color-neutral-800);
  --shadow-md: 0 0 0 1px var(--color-neutral-700), 0 6px 18px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 0 0 1px var(--color-neutral-700), 0 16px 40px rgba(0, 0, 0, 0.65);
  --shadow-brand: 0 1.5rem 3.75rem rgba(0, 0, 0, 0.35);
  --focus-ring: 2px solid var(--color-accent);
  --glow: 0.625rem;
  --blur: 0.2rem;

  /* motion */
  --motion-fast: 120ms;
  --motion-slow: 900ms;
  --motion-spin: 800ms;  /* one turn of the busy ring (busy.js) */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  /* The landing illustration: one slow loop, every move softly eased at both
     ends, so it reads as calm rather than busy. Every animated part shares
     the loop length, which is what keeps the storyboard in step. */
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --landing-loop: 24s;
  --landing-art-wide: 60rem;  /* the landscape storyboard's widest - one user unit per pixel */
  --landing-art-tall: 24rem;  /* the portrait storyboard's widest, on a narrow screen */
}

@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #f1f2ec;
    --color-surface: #ffffff;
    --color-text: #1e3530;
    --color-divider: color-mix(in srgb, #1e3530 14%, transparent);
    --color-row-rule: color-mix(in srgb, #1e3530 8%, transparent);

    --color-accent: #1e7a4a;
    --color-accent-text: #1a6b41;
    --color-link: #1a6b41;
    --color-link-hover: #155b36;

    --color-brand: #2fbf71;
    --color-on-brand: #1e3530;
    --color-brand-soft: #bfefd3;
    --color-ink: #1e3530;
    --color-on-ink: #f1f2ec;
    --color-on-ink-muted: #a9bfa8;
    --color-ink-line: color-mix(in srgb, #f1f2ec 14%, transparent);

    --color-neutral-100: #18221f;
    --color-neutral-200: #333c38;
    --color-neutral-300: #4e5552;
    --color-neutral-400: #686f6b;
    --color-neutral-500: #838984;
    --color-neutral-600: #9ea39e;
    --color-neutral-700: #b8bcb7;
    --color-neutral-800: #d3d6d1;
    --color-neutral-900: #eef0ea;

    --color-accent-100: #0d3a22;
    --color-accent-200: #155b36;
    --color-accent-300: #1e7c4a;
    --color-accent-400: #279e5d;
    --color-accent-500: #2fbf71;
    --color-accent-600: #5fce92;
    --color-accent-700: #8fddb2;
    --color-accent-800: #bfecd3;
    --color-accent-900: #effbf4;

    --ok: oklch(0.58 0.13 160);
    --ok-text: oklch(0.5 0.12 160);
    --warn: oklch(0.68 0.14 72);
    --warn-text: oklch(0.46 0.12 68);
    --bad: oklch(0.58 0.18 25);
    --bad-text: oklch(0.52 0.18 25);

    /* Muted text on the light surfaces: neutral-500 reads at ~3.2:1 on the fog
       background, under AA; neutral-400 clears it at 4.6:1. */
    --color-muted: var(--color-neutral-400);
    --color-dim: var(--color-neutral-300);
    --color-placeholder: var(--color-neutral-400);  /* the light ramp inverts; 600 would be 2.85:1 */

    --shadow-md: 0 0 0 1px var(--color-neutral-800), 0 6px 18px rgba(30, 53, 48, 0.10);
    --shadow-lg: 0 0 0 1px var(--color-neutral-800), 0 16px 40px rgba(30, 53, 48, 0.12);
    --shadow-brand: 0 1.5rem 3.75rem rgba(30, 53, 48, 0.12);
  }
}
