/* ═══════════════════════════════════════════════════════════════════════════
   Bridge Trading — BRAND FONTS (single source of truth)
   Brand board 2026-08-05. Rolled out site-wide 2026-09-10 (PKT-BRAND).

   • Grown        — licensed display serif (Din Studio), SELF-HOSTED at
                    /static/fonts/Grown.{woff2,woff}. ONLY a 400 weight exists.
                    Never fake-bold it: every Grown rule sets font-weight:400 and
                    font-synthesis:none so the browser cannot synthesise a bold.
   • Montserrat   — body / UI text (Google Fonts).
   • JetBrains Mono — NUMERIC / TABULAR trading data only (prices, P&L, tickers,
                    order ids, table cells). Readability, not branding.

   Removed from the site: Inter, Fraunces (unlicensed stand-in serif), IBM Plex
   Mono, SF Mono, -apple-system stacks as the primary UI font.

   LAYOUT EXCEPTIONS (Kit review 2026-09-10, keep this list current):
     • static/morning_report.html header keeps its pre-brand font: Grown wraps
       the header at 390px. Re-set when that header is rebuilt (UI backlog).
     • static/status.html wordmark -> Grown (matches .brand-name).
     • postmortem_card renders standalone/embedded and carries its own
       Montserrat import; it cannot rely on this stylesheet.
     • Email templates: Georgia 400 stands in for Grown, 'Helvetica Neue'/Arial
       for Montserrat (Gmail/Outlook strip webfonts). text/plain parts untouched.

   SIZE FLOOR (Kit F1): Grown is a 400-only display serif. No element may render
   Grown below 18px (desktop) / 17px (390px). Titles that must stay smaller use
   the body face (Montserrat 600) -- never a shrunken Grown. The wordmark
   (.brand > a, .brand-name, .logo) is the one exemption, by selector. Enforced
   by tests/test_brand_grown_floor_2026_09_10.py (computed styles, qa_gate).

   Include on EVERY page, before any page-level <style>:
     <link rel="stylesheet" href="/static/brand_fonts.css">
   Page CSS should reference the tokens, never the raw family names:
     font-family: var(--font-display) | var(--font-body) | var(--font-mono)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Montserrat + JetBrains Mono via Google Fonts. Kit N1 (2026-09-10): this
   @import is a chained request; it stays because 26 of the 34 pages that link
   this file have NO page-level <link> for these families (only index.html and
   7 others preconnect + link directly, where the browser dedupes the URL).
   Self-hosting all three faces is the later fix. font-display:swap is the
   deliberate choice for the brand face: text renders in the fallback serif
   immediately and swaps, rather than flashing invisible. */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'Grown';
  src: url('/static/fonts/Grown.woff2') format('woff2'),
       url('/static/fonts/Grown.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: 'Grown', Georgia, 'Times New Roman', serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

html, body {
  font-family: var(--font-body);
}

/* Form controls do not inherit font-family by default. */
button, input, select, textarea {
  font-family: inherit;
}

/* Display type: page titles, section titles, hero copy, brand wordmark.
   h3+ and small UPPERCASE eyebrow labels stay Montserrat (Grown is a display
   face; at 11-13px caps it loses the serif detail and reads as noise). */
h1, h2,
.font-display,
.brand > a,
.brand-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
}

/* Any element opting into Grown at a heavier declared weight still renders
   the single real weight. */
.font-display, .font-display * { font-synthesis: none; }

/* Tabular / numeric data helper (mirrors app.css .ui-mono). */
.font-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
