/* tokens.css — the ledger's design constants. Light-only ship. Every value here is a
   decision made once and referenced everywhere; nothing downstream hard-codes a hex or a
   curve. */

:root {
  /* ---- Palette (light only; ink is never #000) ---- */
  --paper: #F2ECDE;
  --paper-raised: #FBF7EF;
  --paper-sunk: #E8E0CF;
  --ink: #211C15;
  --ink-2: #574E3E;
  --ink-3: #6B6252;
  --green: #2C5F4F;
  --green-deep: #1E4437;
  --green-panel: #234E42;
  --oxblood: #A23B2C;
  --oxblood-deep: #7E2C20;
  --margin-rule: color-mix(in srgb, var(--oxblood) 55%, transparent);
  --marker: #E7B23F;
  --marker-swipe: color-mix(in srgb, var(--marker) 42%, transparent);
  --rule: #D8CDB8;
  --rule-strong: #C4B79D;
  --rule-ink: color-mix(in srgb, var(--ink) 16%, transparent);
  /* Ink-tinted alphas — the ink is never #000, so its shadow isn't either. */
  --ink-shadow: color-mix(in srgb, var(--ink) 18%, transparent);
  --stamp-ink: color-mix(in srgb, var(--oxblood-deep) 35%, transparent);        /* oxblood-deep ink-spread on stamps */
  --debit-keyline: color-mix(in srgb, var(--oxblood) 28%, transparent);    /* oxblood inset keyline on debit rows */
  --debit-keyline-strong: color-mix(in srgb, var(--oxblood) 40%, transparent); /* oxblood border on the "does not total" tag */
  --paper-on-green: #F2ECDE;
  /* Accents used only on the green proof panel (kicker, rail number, status, link hover) */
  --panel-accent: #E4A99A;
  --panel-gold: #F1C97A;

  /* ---- Font stacks (real face, then metric-matched fallback) ---- */
  --font-display: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --font-serif: "Newsreader", "Newsreader Fallback", Georgia, "Times New Roman", serif;
  --font-mono: "Spline Sans Mono", "Spline Fallback", ui-monospace, Menlo, Consolas, monospace;

  /* ---- Type scale (fluid, clamped 360 -> 1440px) ---- */
  --t-display: clamp(2.75rem, 1.35rem + 6.2vw, 6.5rem);
  --t-total: clamp(3.25rem, 1.8rem + 7.5vw, 8.5rem);
  --t-h2: clamp(2rem, 1.2rem + 3.4vw, 3.25rem);
  --t-h3: clamp(1.4rem, 1.1rem + 1.15vw, 1.75rem);
  --t-lead: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
  --t-body: 1.125rem;
  --t-meta: 0.8125rem;
  --t-figure: 0.94em;

  /* ---- Spacing (8px scale) ---- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 160px;

  /* ---- Grid / rail ---- */
  --shell-max: 1240px;
  --gutter: 24px;
  --side-pad: clamp(20px, 5vw, 80px);
  --rail-w: 72px;
  --measure: 66ch;
  --ledger-gutter: 300px;

  /* ---- Rules ---- */
  --hair: 1px;

  /* ---- Motion: five named curves (content never uses ease/ease-in-out) ---- */
  --ease-ledger: cubic-bezier(0.2, 0.7, 0.2, 1);   /* reveals / entrances */
  --ease-draw: cubic-bezier(0.22, 1, 0.32, 1);     /* anything that extends */
  --ease-carriage: cubic-bezier(0.85, 0, 0.15, 1); /* mechanical snap */
  --ease-stamp: cubic-bezier(0.18, 1.4, 0.32, 1);  /* rubber stamp only */
  --ease-settle: cubic-bezier(0.3, 0.7, 0.2, 1);   /* hovers / presses */

  /* ---- Motion: durations (ms) ---- */
  --d-xs: 120ms;
  --d-s: 200ms;
  --d-m: 360ms;
  --d-l: 560ms;
  --d-xl: 720ms;
  --d-count: 1200ms; /* count-ups: 900-1400, capped 1400 */

  /* ---- Header heights (drives sticky + scroll-progress) ---- */
  --header-top: 64px;
  --header-scrolled: 56px;
}
