/* ============================================================
   editorial.css — Shared design tokens for the "Editorial Ledger"
   theme. Loaded once globally in base.html.

   Pages that use the theme (currently /, /auth/login, /auth/register)
   alias these tokens into their local scope rather than redeclaring
   raw values, so the palette/typography lives in exactly one place.

   When we migrate a dashboard page to the editorial look, it should
   ONLY use these tokens — never inline hex values for cream/ink/blue
   or font-family declarations for the brand fonts.
   ============================================================ */

/* ── Brand fonts, self-hosted ───────────────────────────────────
   Previously fetched from fonts.googleapis.com + fonts.gstatic.com.
   Measured cost of that: /'s render-blocking font stylesheet made
   first paint 10x slower on iPhone and 4x on Android than every
   other page, same devices, same sessions.

   Faces are the ones actually used: Newsreader italic 500 (brand mark,
   editorial accents), Newsreader roman 400 (auth/landing headlines),
   Geist 500 and Geist Mono 500. Any other weight renders as the browser's
   synthetic bold — already true everywhere except /auth/* and /, so
   nothing regresses.

   FILENAMES ARE IMMUTABLE. /static/ is cached for a year and these
   URLs cannot go through static_v() from inside CSS. To change a
   face, ship a NEW filename — never edit one of these in place.

   latin-ext carries the accented glyphs and is fetched only if a
   name actually needs one; unicode-range keeps it lazy. Ranges are
   Google's own, copied verbatim so coverage is unchanged.
   ─────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/newsreader-italic-500-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: "Newsreader";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/newsreader-italic-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Roman Newsreader, for the editorial headlines on /, /auth/login and
   /auth/register (.qatt-title "Welcome back."). Not preloaded: only those
   pages request an upright serif, and unicode-range keeps it unfetched
   everywhere else. Without this the headline silently renders in the
   italic face — verified against production, where the roman and italic
   faces measure 550.79px and 498.92px for the same string. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/newsreader-400-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: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/newsreader-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist-500-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: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist-mono-500-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: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ── Colors ──────────────────────────────────────────────────── */
  /* Deep navy "ink" — primary text and the dark ledger surface. */
  --ed-ink:        #0e1d3d;
  --ed-ink-2:      #2a3b5d;   /* softer ink for secondary text */
  --ed-rule:       #1f3357;   /* divider line on ink surfaces */

  /* "Paper" — primary light background.
     EXPERIMENT (branch experiment/editorial-white-bg, 2026-05-26):
     swapped the cream family for a coordinated white-gray family to
     preview what the editorial palette looks like on pure white.
     Original cream values for revert:
       --ed-cream:      #f5efe1;
       --ed-cream-2:    #ebe2cf;
       --ed-cream-3:    #efe7d4;
       --ed-rule-cream: #c5d0e6; */
  --ed-cream:      #ffffff;
  --ed-cream-2:    #f5f5f5;   /* card highlight / deeper paper */
  --ed-cream-3:    #fafafa;   /* between paper and cream-2 */
  --ed-rule-cream: #e5e5e5;   /* divider line on light surfaces */

  /* Hot blue — single brand accent. */
  --ed-hot:        #2563eb;
  --ed-hot-deep:   #1d4ed8;
  --ed-hot-soft:   rgba(37, 99, 235, 0.12);

  /* Lighter blue — used inside .dark overrides where #2563eb is too dim. */
  --ed-hot-light:  #60a5fa;

  /* Placeholder text on dark input fills. 4.98:1 on #1c3358 (WCAG AA),
     about half the contrast of entered text so it still reads as a hint.
     Apply at full opacity — dimming it further drops it below AA. */
  --ed-placeholder-dark: #98a3ba;

  /* ── Typography ──────────────────────────────────────────────── */
  --ed-serif: "Newsreader", ui-serif, Georgia, serif;
  --ed-mono:  "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ed-sans:  "Geist", ui-sans-serif, system-ui, sans-serif;
}
