/* Base: design tokens, the two themes, reset, shared type helpers. Every other stylesheet uses these variables. */
:root{
  --bg:#e8e7e3;            /* Day: paper */
  --ink:#1c1a17;
  --mute:#7a7a7c;
  --line:#d8d8d4;
  --chip:var(--ink);
  --pencil:#cf3a1c;        /* the red circle around selects */
  --f:"Figtree", "Helvetica Neue", Arial, sans-serif;
  --m:"IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease:cubic-bezier(.22,.8,.16,1);
  --gut:clamp(16px,2.5vw,32px);
  --safe-t:env(safe-area-inset-top,0px);
  --safe-b:env(safe-area-inset-bottom,0px);
  --over:0px;              /* phones: how far a full-screen photo runs past the screen ends (js/components/full-bleed.js) */
  --vy:0px;                /* phones: the scroll that puts it under the status bar */
  color-scheme:light;
}
@media (pointer:coarse){:root{--over:80px}}
/* Night: ash black; set by js/components/theme.js (Day / Night / System) */
:root[data-tone="dark"]{--bg:#1a1918;--ink:#ebe8e2;--mute:#8f8b84;--line:#34322f;color-scheme:dark}

*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0}
/* app screens (home, overview, series, viewer) fill the window and never scroll it; text pages (Series list, Contact,
   Legal) scroll the document itself, so on phones Safari folds its toolbar away while reading */
html{overflow-anchor:none} /* no scroll anchoring: the shrinking page title would make the browser nudge the scroll, and the size would flicker */
:root:has(.page:not(.scroll):not([hidden])),:root:has(.page:not(.scroll):not([hidden])) body{height:100%;overflow:hidden}
:root.tinted,:root.tinted body{background:var(--tint)} /* phones, while a photo fills the screen: browser bars take its colour */
body{background:var(--bg);color:var(--ink);font-family:var(--f);font-size:14px;line-height:1.4;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.mono{font-family:var(--m);font-size:12px;letter-spacing:.02em}

@media (prefers-reduced-motion:reduce){*{transition-duration:1ms!important}}
