/* CDexplorer design tokens — the single source of truth for color, type, space,
   radius, shadow and motion. Night is the default; Day is [data-theme="light"].
   Every page loads this file first. No other stylesheet may contain a hex literal.
   D-01 · docs/design-tokens.md */

/* Brand mono (self-hosted, variable weight). D-02 */
/* D-07: Poppins and Lato are self-hosted (SIL OFL, files from Google Fonts) so the page does not wait on a
   third-party CSS round trip before the first paint; the key weights are preloaded from each page head. */
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/lato/Lato-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/lato/Lato-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: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/lato/Lato-700-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/lato/Lato-700-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: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/poppins/Poppins-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/poppins/Poppins-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: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/poppins/Poppins-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/poppins/Poppins-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: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/poppins/Poppins-600-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/poppins/Poppins-600-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: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/poppins/Poppins-700-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/poppins/Poppins-700-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: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/poppins/Poppins-800-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/poppins/Poppins-800-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: 'Lato'; font-style: normal; font-weight: 300; font-display: swap; src: url('/fonts/lato/Lato-300-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 300; font-display: swap; src: url('/fonts/lato/Lato-300-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; }

/* D-07: metric-matched local fallbacks (fontaine / next-font values) so text keeps its box while the web fonts load */
@font-face { font-family: 'Poppins Fallback'; src: local('Arial'); size-adjust: 112.1577%; ascent-override: 93.6182%; descent-override: 31.2061%; line-gap-override: 8.916%; }
@font-face { font-family: 'Lato Fallback'; src: local('Arial'); size-adjust: 97.4159%; ascent-override: 101.3181%; descent-override: 21.865%; line-gap-override: 0%; }

@font-face {
  font-family: 'Paper Mono';
  src: url('/fonts/paper-mono/PaperMono[wght].woff2') format('woff2-variations'),
       url('/fonts/paper-mono/PaperMono-Regular.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* D-10 (2026-10-14): text/line tokens re-pinned so every text token clears 4.5:1 on surface-0..4
     and control edges (line-3/4) clear 3:1. Report: docs/evidence/d-10-contrast-report.md */
  /* ---- Surfaces (page → panel → card → raised → hover) ---- */
  --surface-0: #000000;
  --surface-1: #0a0a0a;
  --surface-2: #111111;
  --surface-3: #1a1a1a;
  --surface-4: #222222;
  --surface-inverse: #ffffff;

  /* ---- Lines (subtle → strong) ---- */
  --line-1: #2a2a2a;
  --line-2: #333333;
  --line-3: #707070;
  --line-4: #858585;

  /* ---- Text (high → faint) ---- */
  --text-hi: #ffffff;
  --text-1: #e8e8e8;
  --text-2: #cccccc;
  --text-3: #999999;
  --text-4: #949494;
  --text-5: #8c8c8c;
  --text-6: #8c8c8c;
  --text-ghost: #7a7a7a;
  --text-on-accent: #000000;

  /* ---- Brand accent: gold ---- */
  --gold: #D4AF37;
  --gold-light: #d4b96a;
  --gold-deep: #b8932e;
  --gold-glow: rgba(212, 175, 55, 0.12);
  --gold-bdr: rgba(212, 175, 55, 0.30);
  --gold-tint-1: #171812;
  --gold-tint-2: #2a2000;
  --gold-tint-3: #a69c6a;

  /* ---- Secondary accent: jade (notes, success-adjacent) ---- */
  --jade: #40C1AC;
  --jade-tint-1: #0d1f1e;
  --jade-tint-2: #1a3d39;

  /* ---- Status ---- */
  --success: #3fb950;
  --success-tint: #0d1f0d;
  --danger: #ea8080;
  --danger-muted: #b38080;
  --danger-tint-1: #1a0f0f;
  --danger-tint-2: #3a1a1a;
  --warn: #d29922;
  --purple: #a371f7;
  --info: #64b4ff;
  --info-muted: #6391b0;
  --info-tint: #0f1a24;

  /* ---- Type ---- */
  --font-display: 'Poppins', 'Poppins Fallback', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Lato', 'Lato Fallback', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Paper Mono', Consolas, 'SF Mono', Menlo, monospace;
  --fs-2xs: .55rem;
  --fs-xs: .66rem;
  --fs-sm: .74rem;
  --fs-md: .85rem;
  --fs-lg: 1rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.6rem;
  --fs-3xl: 2.2rem;
  --ls-caps: .15em;
  --ls-wide: .2em;
  --lh-tight: 1.2;
  --lh-body: 1.6;

  /* ---- Space (4px base) ---- */
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;

  /* ---- Radius (the brand is square-cornered; use sparingly) ---- */
  --radius-0: 0;
  --radius-1: 2px;
  --radius-2: 4px;
  --radius-pill: 999px;

  /* ---- Shadow ---- */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 6px 24px rgba(0, 0, 0, .45);
  --shadow-3: 0 16px 48px rgba(0, 0, 0, .6);
  --shadow-glow: 0 0 0 3px var(--gold-glow);

  /* ---- Motion ---- */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;

  color-scheme: dark;
}

[data-theme="light"] {
  --surface-0: #f8fafc;
  --surface-1: #ffffff;
  --surface-2: #ffffff;
  --surface-3: #f1f5f9;
  --surface-4: #e2e8f0;
  --surface-inverse: #0f172a;

  --line-1: #e2e8f0;
  --line-2: #cbd5e1;
  --line-3: #76849a;
  --line-4: #64748b;

  --text-hi: #0f172a;
  --text-1: #1e293b;
  --text-2: #334155;
  --text-3: #475569;
  --text-4: #556276;
  --text-5: #5b697e;
  --text-6: #5b697e;
  --text-ghost: #6f747b;
  --text-on-accent: #ffffff;

  --gold: #875f00;
  --gold-light: #825b00;
  --gold-deep: #6e4d00;
  --gold-glow: rgba(140, 98, 0, 0.12);
  --gold-bdr: rgba(140, 98, 0, 0.30);
  --gold-tint-1: #fdf9ea;
  --gold-tint-2: #f7ecc4;
  --gold-tint-3: #6b5f3a;

  --jade: #0c6f5e;
  --jade-tint-1: #e6f7f3;
  --jade-tint-2: #b9ebe0;

  --success: #0f7033;
  --success-tint: #dcfce7;
  --danger: #b91c1c;
  --danger-muted: #991b1b;
  --danger-tint-1: #fef2f2;
  --danger-tint-2: #fecaca;
  --warn: #995203;
  --purple: #7c3aed;
  --info: #1f5ad6;
  --info-muted: #2b5fb3;
  --info-tint: #eff6ff;

  --shadow-1: 0 1px 2px rgba(15, 23, 42, .08);
  --shadow-2: 0 6px 24px rgba(15, 23, 42, .10);
  --shadow-3: 0 16px 48px rgba(15, 23, 42, .16);

  color-scheme: light;
}

/* Base: numbers line up in every column; CUSIPs and refs use slashed zero. D-02 */
html { font-variant-numeric: tabular-nums; }

/* D-09: brand lockup — the one "CDexplorer · CleverAlpha Securities" component for every page.
   Markup: <a class="cde-brand-lockup [lg] [center]"><div class="cde-brand-title"><span class="cde-brand-cd">CD</span><span class="cde-brand-exp">explorer</span>[<span class="cde-brand-tag">Desk</span>]</div><div class="cde-brand-sub">CleverAlpha Securities</div></a> */
.cde-brand-lockup{display:inline-flex;flex-direction:column;justify-content:center;text-decoration:none;line-height:1;cursor:pointer;transition:opacity .15s ease;flex-shrink:0;}
.cde-brand-lockup:hover{opacity:.88;}
.cde-brand-title{font-family:var(--font-display);font-size:17px;font-weight:800;letter-spacing:.04em;display:flex;align-items:center;line-height:1;}
.cde-brand-cd{color:var(--text-hi);}
.cde-brand-exp{color:var(--gold);}
.cde-brand-sub{font-family:var(--font-display);font-size:8px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--text-dim,var(--text-4));margin-top:4px;line-height:1;}
[data-theme="light"] .cde-brand-sub{color:var(--text-4);}
.cde-brand-tag{font-size:9px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--text-hi);background:var(--gold-tint-1,rgba(200,169,81,.14));border:1px solid var(--gold-tint-2,rgba(200,169,81,.35));padding:3px 6px 2px;margin-left:8px;line-height:1;}
.cde-brand-lockup.lg .cde-brand-title{font-size:30px;}
.cde-brand-lockup.lg .cde-brand-sub{font-size:10px;letter-spacing:.22em;margin-top:7px;}
.cde-brand-lockup.center{align-items:center;text-align:center;}
.cde-brand-lockup.center .cde-brand-title{justify-content:center;}
