/* RODA design system 4 of 10: tokens. Source of truth: ../DESIGN.md */

@font-face {
  font-family: "Bagel Fat One";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url("fonts/bagelfatone-latin.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: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: optional;
  src: url("fonts/nunito-latin.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;
}

/* Metric-matched fallbacks: while the woff2 files are in flight the page is set in local Arial
   scaled to the webfont's average advance and vertical metrics (computed with fontTools from the
   files in fonts/, then calibrated on the text of five pages), so the swap changes the letter shapes but not the line breaks or the layout. */
/* Audit 29.09 (network finding 55, by every text node, build/check_fallback.mjs): Bagel lines of 40
   characters and more ran from -5.05% (a 54-character journal h1) to +2.35% (a 45-character h2)
   on this face, off centre. size-adjust +1.37% centres the band (-3.75% .. +3.75%, inside 4% for
   40-79 characters; no Bagel line reaches 80). The overrides scale with size-adjust in Chrome
   (measured: 145 -> 147 px line box), so they are divided by the same 1.0137. */
@font-face { font-family: "Bagel Fat One Fallback"; src: local("Arial Black"), local("Arial-Black"), local("ArialMT-Black");
  size-adjust: 83.82%; ascent-override: 138.38%; descent-override: 34.36%; line-gap-override: 0%; }
@font-face { font-family: "Bagel Fat One Fallback Bold"; src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 94.79%; ascent-override: 122.38%; descent-override: 30.38%; line-gap-override: 0%; }
@font-face { font-family: "Nunito Fallback"; font-weight: 200 549; src: local("Arial"), local("ArialMT");
  size-adjust: 100.49%; ascent-override: 100.61%; descent-override: 35.13%; line-gap-override: 0%; }
/* Audit 29.09 (finding 55): at weight 600 the lines ran from -4.31% (a 40-character size line,
   "W 112 1/4 x D 37 1/2 x H 8 3/4 in") to +2.76% (a 95-character note), 7.1% apart: one size-adjust
   cannot hold -4/+3. The short end is the DIGITS: Nunito 600 draws 0-9 7.9% wider than Arial Bold
   (measured, 600 vs 556 units), letters 3.5% narrower. The digits get their own face through
   unicode-range; fitted on all 41 weight-600 lines of 40+ characters of five pages: letters 97%,
   digits 106% put them at -1.3 .. +2.4 of the limit. The overrides are divided by the same factor,
   so the line box stays where it was. */
@font-face { font-family: "Nunito Fallback"; font-weight: 550 649; src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 97%; ascent-override: 104.22%; descent-override: 36.39%; line-gap-override: 0%; }
@font-face { font-family: "Nunito Fallback"; font-weight: 550 649; src: local("Arial Bold"), local("Arial-BoldMT"); unicode-range: U+0030-0039;
  size-adjust: 106%; ascent-override: 95.38%; descent-override: 33.30%; line-gap-override: 0%; }
@font-face { font-family: "Nunito Fallback"; font-weight: 650 749; src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 97.67%; ascent-override: 103.51%; descent-override: 36.14%; line-gap-override: 0%; }
@font-face { font-family: "Nunito Fallback"; font-weight: 750 1000; src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 99.84%; ascent-override: 101.26%; descent-override: 35.36%; line-gap-override: 0%; }

:root {
  --bg: #E4E8D8;
  --ink: #2B211C;
  --surface: #F7F8F2;
  --hero: #A9B48E;
  --band: #2B211C;
  --muted: #5A534C;
  --on-band: #EFE9DF;
  --on-band-muted: #C9C0B2;
  --accent: #B9705F;
  --accent-deep: #9A5646;
  --sage-deep: #56623F;
  --outline: rgba(43, 33, 28, 0.14);
  --input: #EEF0E6;
  --error: #9C3B2E;
  --scrim: rgba(43, 33, 28, 0.45);

  --display: "Bagel Fat One", "Bagel Fat One Fallback", "Bagel Fat One Fallback Bold", system-ui, sans-serif;
  --text: "Nunito", "Nunito Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;

  --rail: 88px;
  --topbar: 76px;
  --tabbar: 68px;
  --gutter: 28px;
  --radius: 28px;
  --radius-control: 16px;
  --radius-thumb: 20px;
  --gap-panel: 12px;
  --section: 136px;
  --measure: 700px;

  --shadow: 0 18px 40px rgba(43, 33, 28, 0.12);
  --ease: cubic-bezier(.34, 1.4, .64, 1);
  --ease-flat: cubic-bezier(.4, 0, .2, 1);
  --t-fast: 180ms;
  --t-mid: 280ms;
  --t-slow: 460ms;
}

@media (max-width: 1199px) { :root { --section: 104px; } }
@media (max-width: 899px) { :root { --section: 72px; --gutter: 16px; --rail: 0px; --topbar: 64px; } }
