/* Hallmark · redesign · genre: editorial · macrostructure: Catalogue
 * nav: N13 inline search pill (top) + side rail (PC) / bottom tabbar (mobile)
 * footer: none — app shell, not a marketing page
 * theme: Almanac — warm paper · serif display · rust accent oklch(48% .14 32)
 * differs from previous stamp (Notion) on display style (tight-sans -> serif)
 *   and accent hue (cool 240 -> warm 32); paper band stays light (reading surface)
 * fonts: system stacks only — offline-first PWA, no web-font CDN
 * icons: Lucide 1.28 paths vendored in js/icons.js (MIT, no CDN)
 * pre-emit critique: P5 H5 E4 S5 R5 V5 */
:root{
  /* colour — light */
  --color-paper:oklch(96.9% .007 80);
  --color-paper-2:oklch(99.2% .003 85);
  --color-paper-3:oklch(93.6% .010 78);
  --color-ink:oklch(23% .012 60);
  --color-ink-2:oklch(48.5% .015 65);
  --color-ink-3:oklch(61% .014 68);
  --color-rule:oklch(88.5% .010 78);
  --color-rule-2:oklch(81% .012 78);
  --color-accent:oklch(48% .14 32);
  --color-accent-ink:oklch(99% .003 85);
  --color-accent-soft:oklch(94.2% .026 40);
  --color-gold:oklch(64% .13 72);
  --color-danger:oklch(49% .16 25);
  --color-focus:oklch(48% .14 32);
  --color-mark:oklch(90% .10 95);
  --color-veil:oklch(23% .012 60 / .40);
  --color-bar:oklch(96.9% .007 80 / .88);

  /* type stacks — 2+1: serif display, sans body, mono outlier */
  --font-display:ui-serif,Georgia,"Iowan Old Style","Times New Roman",serif;
  --font-body:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  --font-mono:ui-monospace,"SF Mono","Cascadia Mono",Menlo,Consolas,monospace;

  /* type scale — relative to --base, which font-size prefs drive */
  --text-2xs:.6875rem; --text-xs:.75rem;  --text-sm:.8125rem;
  --text-md:.9375rem;  --text-base:1rem;  --text-lg:1.0625rem;
  --text-xl:1.1875rem; --text-2xl:1.5rem; --text-3xl:1.875rem;

  /* space — 4pt scale */
  --space-3xs:.25rem; --space-2xs:.5rem; --space-xs:.75rem;
  --space-sm:1rem;    --space-md:1.5rem; --space-lg:2rem;
  --space-xl:3rem;    --space-2xl:4.5rem;

  /* radius · rule · motion */
  --radius-card:10px; --radius-input:9px; --radius-chip:7px; --radius-pill:999px;
  --rule-hair:1px; --rule-thick:2px;
  --ease-out:cubic-bezier(.16,1,.3,1);
  --ease-in:cubic-bezier(.4,0,1,1);
  --ease-in-out:cubic-bezier(.4,0,.2,1);
  --dur-fast:120ms; --dur-mid:240ms;

  /* shell metrics */
  --bar-h:52px; --rail-w:264px; --tabbar-h:58px; --sheet-w:360px;
  --base:16px;
}

/* dark — warm near-black, not neutral grey */
[data-theme="dark"]{
  --color-paper:oklch(19.5% .008 60);
  --color-paper-2:oklch(24.5% .009 62);
  --color-paper-3:oklch(29.5% .010 64);
  --color-ink:oklch(94% .008 80);
  --color-ink-2:oklch(72% .012 72);
  --color-ink-3:oklch(60% .012 70);
  --color-rule:oklch(32% .010 64);
  --color-rule-2:oklch(40% .012 66);
  --color-accent:oklch(72% .13 40);
  --color-accent-ink:oklch(19.5% .008 60);
  --color-accent-soft:oklch(30% .045 38);
  --color-gold:oklch(78% .13 78);
  --color-danger:oklch(70% .15 27);
  --color-focus:oklch(72% .13 40);
  --color-mark:oklch(42% .09 92);
  --color-veil:oklch(12% .006 60 / .58);
  --color-bar:oklch(19.5% .008 60 / .88);
}

/* reader font-size preference — drives the whole rem scale */
[data-fontscale="1"]{--base:14px;}
[data-fontscale="2"]{--base:16px;}
[data-fontscale="3"]{--base:18px;}
[data-fontscale="4"]{--base:21px;}
