/* Hallmark · genre: editorial (atmospheric night variant) · macrostructure: Workbench hero into Conversational FAQ
 * tone: late-night desk, calm and candid · anchor hue: lamp amber 75 on ink navy 262
 * nav: N9 edge-aligned minimal · footer: Ft5 statement · enrichment: none (the playable chat is the hero visual)
 * pre-emit critique: P5 H4 E4 S5 R4 V4
 *
 * Two themes share one anchor. Night is a desk lamp on navy. Day is the same desk
 * in the morning: oat paper, navy ink, the amber darkened so it can carry text.
 * Only lightness and chroma move between them; hues stay put.
 */

/* Day (light) is the base, so no-JS + light-preference visitors get it. */
:root {
  color-scheme: light;
  --color-paper: oklch(96.8% 0.011 85);
  --color-paper-2: oklch(93.6% 0.015 82);
  --color-paper-3: oklch(90.2% 0.018 80);
  --color-raised: oklch(98.6% 0.006 85);
  --color-ink: oklch(21% 0.032 262);
  --color-ink-2: oklch(35% 0.026 262);
  --color-ink-3: oklch(46% 0.022 262);
  --color-rule: oklch(85.5% 0.016 80);
  --color-rule-strong: oklch(62% 0.02 262);
  --color-accent: oklch(50% 0.12 62);
  --color-accent-wash: oklch(89% 0.07 80);
  --color-btn: oklch(24% 0.04 262);
  --color-btn-hover: oklch(32% 0.05 262);
  --color-btn-ink: oklch(97% 0.012 85);
  --color-private: oklch(44% 0.13 305);
  --color-shared: oklch(44% 0.12 240);
  --color-family: oklch(43% 0.1 155);
  --color-secret: oklch(47% 0.15 30);
  --color-error: oklch(48% 0.17 27);
  --color-success: oklch(42% 0.1 155);
  --color-focus: oklch(50% 0.16 62);
}

/* Night (dark): the lamp-on-navy palette. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-paper: oklch(16.5% 0.016 262);
    --color-paper-2: oklch(20.5% 0.018 262);
    --color-paper-3: oklch(25% 0.02 262);
    --color-raised: oklch(22.5% 0.019 262);
    --color-ink: oklch(93% 0.012 85);
    --color-ink-2: oklch(79% 0.014 85);
    --color-ink-3: oklch(66% 0.018 262);
    --color-rule: oklch(31% 0.02 262);
    --color-rule-strong: oklch(48% 0.022 262);
    --color-accent: oklch(82% 0.13 75);
    --color-accent-wash: oklch(34% 0.06 75);
    --color-btn: oklch(82% 0.13 75);
    --color-btn-hover: oklch(88% 0.11 78);
    --color-btn-ink: oklch(20% 0.03 70);
    --color-private: oklch(79% 0.08 305);
    --color-shared: oklch(79% 0.1 235);
    --color-family: oklch(81% 0.12 155);
    --color-secret: oklch(77% 0.13 35);
    --color-error: oklch(74% 0.15 25);
    --color-success: oklch(81% 0.12 155);
    --color-focus: oklch(86% 0.13 75);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-paper: oklch(16.5% 0.016 262);
  --color-paper-2: oklch(20.5% 0.018 262);
  --color-paper-3: oklch(25% 0.02 262);
  --color-raised: oklch(22.5% 0.019 262);
  --color-ink: oklch(93% 0.012 85);
  --color-ink-2: oklch(79% 0.014 85);
  --color-ink-3: oklch(66% 0.018 262);
  --color-rule: oklch(31% 0.02 262);
  --color-rule-strong: oklch(48% 0.022 262);
  --color-accent: oklch(82% 0.13 75);
  --color-accent-wash: oklch(34% 0.06 75);
  --color-btn: oklch(82% 0.13 75);
  --color-btn-hover: oklch(88% 0.11 78);
  --color-btn-ink: oklch(20% 0.03 70);
  --color-private: oklch(79% 0.08 305);
  --color-shared: oklch(79% 0.1 235);
  --color-family: oklch(81% 0.12 155);
  --color-secret: oklch(77% 0.13 35);
  --color-error: oklch(74% 0.15 25);
  --color-success: oklch(81% 0.12 155);
  --color-focus: oklch(86% 0.13 75);
}

:root {
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Geist", "Noto Sans Devanagari", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --font-deva: "Noto Sans Devanagari", "Geist", sans-serif;

  --text-2xs: 0.75rem;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(2rem, 2.6vw + 1rem, 3.25rem);
  --text-2xl: clamp(2.25rem, 3.6vw + 1rem, 4.25rem);
  --text-display: clamp(3rem, 5.6vw + 1rem, 6.5rem);

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6.5rem;
  --space-4xl: 9rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --rule-hair: 1px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-med: 320ms;
}
