/* ── Code Moshiach — shared design tokens ───────────────────────────
   Hand-authored, no build step. The single source of every color, type
   stack and radius the site uses. Loaded FIRST by both layouts
   (MainLayout + ReviewWorkspaceLayout); site.css, chrome.css and the
   review workspace only ever read these, they never restate a hex value.

   Direction: dashboard-hybrid-d1d3 (design/dashboard-directions/)
   D1 "Instrument Panel" system — the dark/amber surface, ink and
   lifecycle palette below are unchanged from the shipped theme.
   D3 "Ledger Archive" detail vocabulary, ported to dark — decision
   records read like archival documents: serif record headings, stamp
   chips, fine rules, quiet text-link actions, small-caps date stamps.
   New tokens carry the `--chip-*`, `--stamp-*`, `--rule-*`, `--action`
   and `--serif` names; everything D1 is untouched.

   Contrast (WCAG 2.x, against --bg / --bg-alt / --bg-card / --bg-card-hi):
     --ink        14.4–16.5   --ink-dim   7.6–8.7   --ink-mute  4.7–5.4
     --open  7.9–9.1  --ack 6.7–7.7  --defer 6.3–7.2  --waive 6.7–7.6
     --fixed 8.9–10.2 --danger 9.0–10.3 --stamp-ink 4.9–5.6
   Every text/surface pair clears AA (4.5:1). --ink-mute was #6b7688
   (3.7:1 on --bg-card-hi) and was lifted to pass.

   Naming: no --radius-* here. Tailwind v4 owns that namespace in the
   workspace bundle, and a same-named root token would be clobbered.
   ──────────────────────────────────────────────────────────────────────── */

:root {
  /* surface */
  --bg:          #0a0c10;
  --bg-alt:      #0e1117;
  --bg-card:     #131720;
  --bg-card-hi:  #171c27;
  --bg-hover:    #1c2330;
  --line:        #222836;
  --line-soft:   #1a1f2b;
  --line-hi:     #2c3446;

  /* ink */
  --ink:         #e8ecf3;
  --ink-dim:     #a3adc0;
  --ink-mute:    #7c879a;

  /* Lifecycle-state palette — reused as the brand accents, deliberately:
     the state machine IS the product, so the product's colors are its states. */
  --open:        #f59e0b;   /* amber   — found, unread */
  --ack:         #60a5fa;   /* blue    — seen, owned   */
  --defer:       #a78bfa;   /* violet  — ticking       */
  --waive:       #94a3b8;   /* slate   — signed off    */
  --fixed:       #34d399;   /* green   — actually done */

  --accent:      var(--open);
  --accent-hi:   #fbbf24;
  --accent-ink:  #0a0c10;

  /* errors — text tone plus the tinted panel it sits on */
  --danger:      #fca5a5;
  --danger-bg:   rgba(239, 68, 68, 0.12);
  --danger-line: rgba(239, 68, 68, 0.4);

  /* ── D3 detail vocabulary (ported to dark) ─────────────────────────── */

  /* Record headings: serif for decision-record titles only. UI chrome and
     data stay sans/mono; the serif marks "this is a durable decision". */
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;

  /* Stamp chips — D3's outlined, stamp-like state chips. Fill stays the
     card surface; the state color appears only as border + label ink.
     Text contrast equals the state palette above (all AA). */
  --chip-border:  rgba(232, 236, 243, 0.22);  /* neutral stamp outline   */
  --chip-ink:     var(--ink-dim);             /* neutral stamp label     */
  --chip-bg:      transparent;

  /* Stamp ink — D3's deep amber (#b45309) lifted for the dark surface;
     used for small-caps stamps (REVIEWED date, ledger fine print). */
  --stamp-ink:    #d97706;

  /* Fine ledger rules — in-card separators, finer than --line-soft.
     Pair with 1px and full-bleed-inside-card usage. */
  --rule:         rgba(232, 236, 243, 0.07);
  --rule-strong:  rgba(232, 236, 243, 0.12);

  /* Quiet text-link actions — D3's "Acknowledge · Defer · Waive" row.
     Rest state is dim ink (AA); hover/focus lifts to the state color. */
  --action:       var(--ink-dim);
  --action-hover: var(--accent-hi);

  /* Small-caps tracking for stamps and ledger labels. */
  --track-caps:   0.08em;

  /* type */
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
          Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  /* metrics */
  --wrap:   1080px;
  --narrow: 720px;
  --r:      10px;
  --r-sm:   6px;

  /* Bento rhythm — KPI band and card grid gutters (D1 panel spacing). */
  --gap:    16px;
  --gap-lg: 24px;
}

/* Animations shared by the workspace bundle. Defined here because the
   tailwind-minified review-workspace.css is selector-audited in CI
   (assets/review-workspace.test.mjs), and a bare `50%` keyframe step reads
   as an unscoped selector to that parser. Reference-only from the bundle:
   .repo-dot--pulse { animation: repo-dot-pulse ... } */
@keyframes repo-dot-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* Dashboard skeleton animation; keyframes live outside the scoped asset bundle. */
@keyframes dash-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
