/* ledger family tokens, designed for nomad alone (roll: art deco x botanical field guides).
   the record's `Look` row is canonical; this file follows it.

   faces, self-hosted from fontsource, latin only, vendored under src/fonts/ (see SOURCE.md)
   since this is a no-build static app: there is no bundler to resolve a node_modules url at
   deploy time, so the woff2 files are committed. voltaire (a swedish-poster-lettered geometric
   sans) carries the wordmark and every number; source serif 4 (a scholarly book serif, variable
   weight) carries everything else. */
@font-face {
  font-family: "Voltaire";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./fonts/voltaire-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4 Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("./fonts/source-serif-4-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
  Sampled, never computed, from the references named in the record's Look and in AGENTS.md:
  the 1931 Putnam printing of F. Schuyler Mathews's "Field Book of American Wild Flowers"
  (gilt-on-cloth cover, its De Candolle flower-color plate, its "Flower Colors of the North
  Temperate Zone" chip chart, and its Arrowhead colour plate) crossed with the Patek Philippe
  ref. 1415 HU World Time watch (1939, the second one made) that first put a 24-hour day and
  night ring plus a ring of city names on one dial, the direct ancestor of this app's own
  timeline.

  Light (day, the book open on the page): bg is the book's own text-page stock, surface is the
  De Candolle plate's paper, ink is the plate's hand-lettering, muted is the "Chicory" chip.
  Accent is the shaded side of an Arrowhead leaf; accent-fill and accent-text (= focus) are
  that same green tuned darker so text and fills clear the house ratios.
  Dark (night, the watch case): bg and surface are the book's own cloth cover, ink is the
  book's page stock, muted is the plate's sky-blue ground, and accent is the watch's own gilt
  case.

  Measured (WCAG 2.x); the full table with every drawn pair is in AGENTS.md, kept green by
  test/contrast.test.js. Light: ink/bg 9.52, ink/surface 12.01, muted/bg 5.74, muted/surface
  7.25, accent/bg 5.42, accent/surface 6.84 (icon, rule, fill: 3:1), accent-ink/accent-fill
  9.42, accent-text (= focus) on bg 6.13, on surface 7.73, danger/surface 7.78, warn/surface
  8.96. Dark: ink/bg 13.22, ink/surface 12.24, muted/bg 7.18, muted/surface 6.65, accent/bg
  8.59, accent/surface 7.95, accent-ink/accent-fill 8.59, accent-text on bg 10.33, on surface
  9.56, danger/surface 7.02, warn/surface 8.70.
  Accent carries rules, fills, and icons, never small text; accent-text (and --focus, the same
  tint) carries small accent-coloured text and the focus ring.
*/

:root {
  color-scheme: dark;
  --bg: #17170f;
  --surface: #211e13;
  --ink: #e7dcc2;
  --muted: #9ca6a0;
  --accent: #dfaa53;
  --accent-ink: #17170f;
  --accent-fill: #dfaa53;
  --accent-text: #e8be72;
  --focus: #e8be72;
  --danger: #e0958c;
  --warn: #e3b45e;
  --band-work: #dfaa53;
  --band-early: #c79a4c;
  --band-evening: #c06b84;
  --band-late: #6b7098;
  --band-asleep: #17170f;
  --stripe: rgba(231, 220, 194, 0.07);
  --field: #14130d;
  --border: rgba(231, 220, 194, 0.16);
  --shadow-color: rgba(0, 0, 0, 0.55);
  --shadow: 2px 2px 0 var(--shadow-color);
}

:root[data-theme="light"] {
  --bg: #dcd3bf;
  --surface: #f2ecdd;
  --ink: #262a3e;
  --muted: #454a6e;
  --accent: #54521f;
  --accent-ink: #f2ecdd;
  --accent-fill: #3f3d17;
  --accent-text: #4c4a1c;
  --focus: #4c4a1c;
  --danger: #8b1e0f;
  --warn: #8c5a16;
  --band-work: #54521f;
  --band-early: #b9843a;
  --band-evening: #a24a63;
  --band-late: #454a6e;
  --band-asleep: #dcd3bf;
  --stripe: rgba(38, 42, 62, 0.08);
  --field: #e7e0ce;
  --border: rgba(38, 42, 62, 0.18);
  --shadow-color: rgba(38, 42, 62, 0.22);
  --shadow: 2px 2px 0 var(--shadow-color);
  color-scheme: light;
}

/* system mode: no data-theme attribute, so the visitor's os setting decides.
   this block must stay identical to the light block above; the contrast test
   checks that it does. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #dcd3bf;
    --surface: #f2ecdd;
    --ink: #262a3e;
    --muted: #454a6e;
    --accent: #54521f;
    --accent-ink: #f2ecdd;
    --accent-fill: #3f3d17;
    --accent-text: #4c4a1c;
    --focus: #4c4a1c;
    --danger: #8b1e0f;
    --warn: #8c5a16;
    --band-work: #54521f;
    --band-early: #b9843a;
    --band-evening: #a24a63;
    --band-late: #454a6e;
    --band-asleep: #dcd3bf;
    --stripe: rgba(38, 42, 62, 0.08);
    --field: #e7e0ce;
    --border: rgba(38, 42, 62, 0.18);
    --shadow-color: rgba(38, 42, 62, 0.22);
    --shadow: 2px 2px 0 var(--shadow-color);
    color-scheme: light;
  }
}

:root {
  /* radius 10, airy density, bordered plate surfaces, from the record */
  --radius: 10px;
  --radius-sm: 6px;
  --gap: 12px;
  --pad: 20px;
  --target: 44px;
  --font-display: "Voltaire", "Arial Narrow", sans-serif;
  --font: "Source Serif 4 Variable", "Source Serif 4", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}
