/* ============================================================
   Hilo — design tokens · PAPER identity (2026-09-18)
   Generated from docs/design/tokens.json (the design system is the
   source; add a value there first, then use it here). The generator
   emits cross-references as bare {name} placeholders — those are
   resolved to var(--name) below, everything else is verbatim.
   One theme: Hilo is paper end to end (the high-contrast vision
   mode in skin.css re-points these same names).
   ============================================================ */
:root, [data-theme="default"] {
  --rail: #ECE9E2;
  --rail-raise: #E3DFD6;
  --rail-active: #FBFAF7;
  --rail-line: #DDD8CE;
  --rail-ink: #5B5851;
  --rail-ink-strong: #1B1A17;
  --rail-mut: #8C887E;
  --bg: #F3F1EC;
  --card: #FBFAF7;
  --sunken: #ECE9E2;
  --ink: #1B1A17;
  --ink-2: #5B5851;
  --ink-3: #8C887E;
  --ink-4: #ABA79D;
  --idle: #ABA79D;              /* a resting agent's dot — ink-4, never a status hue (B4) */
  --idle-soft: rgba(27,26,23,.06);
  --line: #E6E2DA;
  --line-2: #D8D3C8;
  --line-3: #C9C3B6;
  --action: #1B1A17;
  --action-hover: #33312C;
  --action-ink: #FBFAF7;
  --action-tint: #E6E2DA;
  --ok: #1f9d57;
  --ok-soft: #e7f5ec;
  --ok-ink: #14653a;
  --warn: #b97d12;
  --warn-soft: #faf1dd;
  --warn-ink: #7c530a;
  --bad: #d1402f;
  --bad-soft: #fbe8e5;
  --bad-ink: #8f2519;
  --thread: #c13a2b;
  --thread-soft: #F5E3DE;
  --thread-line: #E3B7AE;
  --thread-ink: #8f2a1d;
  --thread-paper: #FBF3F0;
  --avatar-stitch: #B3AEA3;
  --avatar-dot-ring: #ECE9E2;
  --mark: var(--thread-soft);
  --mark-line: var(--thread);
  --comment-paper: var(--thread-paper);
  --selection: #E6E2DA;
  --focus-ring: rgba(27,26,23,.30);
  --scrim: rgba(8,9,12,.46);
  --text-strong: var(--ink);
  --text-body: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);
  --text-faint: var(--ink-4);
  --text-link: var(--action);
  --text-on-dark: var(--rail-ink-strong);
  --surface-app: var(--bg);
  --surface-card: var(--card);
  --surface-sunken: var(--sunken);
  --surface-rail: var(--rail);
  --border-hairline: var(--line);
  --border-strong: var(--line-2);
  --border-focus: var(--action);
  --accent: var(--action);
  --accent-ink: var(--action-ink);
  --accent-tint: var(--action-tint);
  --shadow-xs: 0 1px 2px rgba(27,26,23,.05);
  --shadow-sm: 0 1px 2px rgba(27,26,23,.04), 0 8px 24px rgba(27,26,23,.05);
  --shadow-md: 0 4px 16px rgba(27,26,23,.08);
  --shadow-lg: 0 2px 4px rgba(27,26,23,.05), 0 16px 48px rgba(27,26,23,.10);
  --shadow-modal: 0 24px 70px rgba(8,9,12,.28);
}
:root {
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --rail-w: 260px;
  --content-max: 1080px;
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;
  --ease: cubic-bezier(.2,.6,.3,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur-1: 0.12s;
  --dur-2: 0.18s;
  --dur-3: 0.28s;
  --leading-tight: 1.12;
  --leading-snug: 1.35;
  --leading-reading: 1.7;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semi: 600;
  --fw-bold: 700;
  --fw-black: 800;
  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-label: 0.08em;
  --reading-max: 72ch;
  --studio-w: clamp(460px, 42vw, 900px);
  --ctl-sm: 26px;
  --ctl-md: 30px;
  --ctl-lg: 36px;
  --topbar-h: 46px;
  --row-phone: 46px;
  --seg-cell: 28px;
  --font-display: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --text-doc-title: 400 32px/1.1 var(--font-serif);
  --text-doc-h: 500 20px/1.25 var(--font-serif);
  --text-doc-body: 400 15px/1.7 var(--font-sans);
  --text-text-base: 400 14px/1.55 var(--font-sans);
  --text-fs-display: 400 34px/1.4 var(--font-sans);
  --text-fs-h1: 400 24px/1.4 var(--font-sans);
  --text-fs-h2: 400 18px/1.4 var(--font-sans);
  --text-fs-h3: 400 15px/1.4 var(--font-sans);
  --text-fs-body: 400 14px/1.4 var(--font-sans);
  --text-fs-sm: 400 13px/1.4 var(--font-sans);
  --text-fs-data: 400 12px/1.4 var(--font-sans);
  --text-fs-micro: 400 11px/1.4 var(--font-sans);
  --text-fs-nano: 400 10px/1.4 var(--font-sans);
}
.text-base {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0;
}
.fs-display {
  font-family: var(--font-sans);
  font-size: 34px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: -0.03em;
}
.fs-h1 {
  font-family: var(--font-sans);
  font-size: 24px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}
.fs-h2 {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}
.fs-h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}
.fs-body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}
.fs-sm {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}
.fs-data {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}
.fs-micro {
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}
.fs-nano {
  font-family: var(--font-sans);
  font-size: 10px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}
.doc-title { font: var(--text-doc-title); letter-spacing: -0.01em; }
.doc-h { font: var(--text-doc-h); letter-spacing: -0.005em; }
.doc-body { font: var(--text-doc-body); }

/* ============================================================
   Legacy names still consumed by skin.css (Filament-era spellings)
   and by the drills that pin them — aliases onto the Paper tokens.
   Design-system sync (step 5, 2026-09-18): the two app-only values
   (`idle`, `idle-soft`) now live in tokens.json and in the primary
   block above; what remains here is naming only — every alias
   resolves to a Paper token or to the type scale the design system
   already defines.
   ============================================================ */
:root {
  --font-heading: var(--font-display);
  --font-body:    var(--font-sans);
  --font-code:    var(--font-mono);
  --font-data:    var(--font-mono);
  --text-base-size: 14px;
  --leading-base:   1.55;
  --fs-display: 34px; --fs-h1: 24px; --fs-h2: 18px; --fs-h3: 15px; --fs-body: 14px;
  --fs-sm: 13px; --fs-data: 12px; --fs-micro: 11px; --fs-nano: 10px;
  --tracking-display: -0.03em;
}
