/* Paideias theme layer: the Hallmark design system, Paper theme.
   Linked after each page's own <style>, so these :root values override the
   legacy --bg / --ink / --accent variables the marketing and docs pages were
   written with. Neutral first: the old blue accent becomes ink; orange
   (--hm-accent) is reserved for the lockup mark, focus rings and small marks. */
:root {
  --paper: #fafaf9; --paper-2: #f2f2f0; --paper-3: #e9e9e6;
  --ink: #0f0f0e; --ink-2: #3a3a37; --muted: #6b6b66;
  --line: #e4e4e0; --line-2: #d4d4cf;
  --hm-accent: #fc4c02; --accent-soft: rgba(252, 76, 2, 0.12); --accent-on-ink: #ff9a6b;
  --ink-band: #0f0f0e; --ink-raise: #1c1c1a; --ink-raise-2: #262624;
  --on-ink: #f5f5f3; --on-ink-2: #c9c9c4; --on-ink-muted: #8e8e88;
  --ok: #1f9d55; --ok-soft: rgba(31, 157, 85, 0.12); --ok-ink: #13703b;
  --bad: #e5484d; --bad-soft: rgba(229, 72, 77, 0.12); --bad-ink: #b4232a;
  --font-brand: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 14px; --r-in: 8px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(15, 15, 14, 0.06), 0 0 0 1px rgba(15, 15, 14, 0.06);
  --shadow-2: 0 1px 2px rgba(15, 15, 14, 0.05), 0 18px 40px -22px rgba(15, 15, 14, 0.28), 0 0 0 1px rgba(15, 15, 14, 0.06);
  --shadow-card: 0 2px 4px rgba(15, 15, 14, 0.06), 0 30px 60px -28px rgba(15, 15, 14, 0.45), 0 0 0 1px rgba(15, 15, 14, 0.08);
  --dur: 320ms; --dur-fast: 160ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Legacy names used by the existing page CSS. */
  --bg: var(--paper); --surface: #ffffff; --surface-2: var(--paper-2);
  --border: var(--line); --ink-3: var(--muted);
  --accent: var(--ink); --accent-dark: var(--ink-raise-2); --accent-light: var(--paper-2);
  --green: var(--ok-ink); --green-light: var(--ok-soft);
  --font: var(--font-body); --mono: var(--font-mono);
  --radius: var(--r); --radius-sm: var(--r-in); --radius-md: var(--r); --radius-lg: var(--r);
  --shadow-sm: var(--shadow-1); --shadow-md: var(--shadow-2); --shadow-lg: var(--shadow-card);
  --transition: var(--dur-fast) var(--ease);
  --wt-accent: var(--ink); --wt-accent-light: var(--paper-2); --wt-ink: var(--ink);
  --wt-ink-2: var(--ink-2); --wt-border: var(--line); --wt-surface: #ffffff; --wt-radius: var(--r);
}

html { color-scheme: light; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); }

/* Display heads: Newsreader at 400 with negative tracking. !important because
   every legacy page sets its own h1/h2 weight at higher specificity. */
h1, h2 {
  font-family: var(--font-display) !important;
  font-weight: 400 !important;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
}
h1 { letter-spacing: -0.035em; }
h1 em { font-style: normal; color: inherit; }
code, pre, kbd, samp { font-family: var(--font-mono); }

a:not([class]) {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
}
a:not([class]):hover { text-decoration-color: currentColor; }

:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--hm-accent);
  outline-offset: 3px;
}

/* Controls are pills; surfaces share one radius. */
nav a.cta-btn, .nav-cta, .btn, .btn-primary, .btn-secondary, .price-btn, .wt-btn {
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 500;
}
.card, .price-card { border-radius: var(--r); }

/* Nav and lockup. */
body > nav, .nav { background: var(--paper); border-bottom: 1px solid var(--line); }
.nav-brand, .sidebar-logo-title {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: 21px;
}
.nav-brand span span, .sidebar-logo-title span { color: var(--hm-accent); }
/* Labels and chips: sentence case, never tracked. */
.nav-section, .toc-label { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.hero-badge, .section-label { text-transform: none; letter-spacing: 0; font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
