/* ==========================================================================
   Trump District — design tokens
   --------------------------------------------------------------------------
   Source: computed styles read from trumpaccounts.gov, trumprx.gov and
   america.gov on 2026-11-05. "measured" = a value those pages render with.
   "derived" = added here to complete a ramp or a state.

   Themes are scoped by attribute so a dark panel can sit inside a light page:
     (default), [data-theme="ivory"]  Ivory    — trumpaccounts.gov / trumprx.gov
     [data-theme="midnight"]          Midnight — america.gov
   ========================================================================== */

:root {
  /* ---- Palette: paper ---------------------------------------------------- */
  --ivory-50:  #fdfcf9;  /* derived */
  --ivory-100: #f9f6f0;  /* measured: trumpaccounts page */
  --ivory-200: #f5f4eb;  /* measured: trumprx page */
  --ivory-300: #f2eee6;  /* measured: trumpaccounts gov banner */
  --ivory-400: #eceadd;  /* measured: trumprx footer */
  --sand-500:  #e0ddcf;  /* measured: trumprx chips, quote panel */

  /* ---- Palette: gold ----------------------------------------------------- */
  --gold-200: #f1e6c9;   /* derived */
  --gold-400: #e5cfa0;   /* measured: trumpaccounts feature panel */
  --gold-600: #a98a45;   /* derived: decorative strokes, large type only */
  --gold-800: #6b5622;   /* derived: gold text on ivory */

  /* ---- Palette: ink ------------------------------------------------------ */
  --ink-950: #0c1216;    /* measured */
  --ink-800: #212c33;    /* measured: trumpaccounts text + dark panel */
  --ink-700: #333334;    /* measured: trumprx text */
  --ink-600: #465660;    /* measured: secondary text */
  --ink-500: #6b6b6b;    /* measured: muted text */
  --navy-700: #2d3a50;   /* measured: trumpaccounts primary button */
  --navy-800: #232e41;   /* derived: hover */

  /* ---- Palette: signal --------------------------------------------------- */
  --maroon-700: #4c2626; /* measured: trumprx "before" bar */
  --maroon-100: #f1e1dc; /* derived */
  --mint-200:   #d0f6d8; /* measured: trumprx stat pill */
  --mint-800:   #2b5e49; /* measured: trumprx stat pill text */
  --blue-700:   #1a40a1; /* measured: america.gov */
  --blue-600:   #0066c5; /* measured: america.gov button */
  --blue-300:   #66aef5; /* measured: america.gov link */
  --district-red: #e4002b; /* derived: D.C. flag glyph only */

  /* ---- Palette: midnight ------------------------------------------------- */
  --midnight-950: #0b0d12; /* measured: america.gov page */
  --midnight-900: #0f1217; /* measured: america.gov panel */

  /* ---- Type families ----------------------------------------------------- */
  /* Instrument Serif + Geist + Geist Mono are what trumpaccounts.gov and
     trumprx.gov ship; all three are SIL OFL. america.gov uses the commercial
     Rhymes + Helvetica Now, which this system substitutes with the same trio. */
  --font-display: "Instrument Serif", "Iowan Old Style", "Times New Roman", Times, serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ---- Type scale -------------------------------------------------------- */
  --text-hero:    clamp(3.5rem, 1rem + 11vw, 8.125rem);    /* 130px measured: trumprx h1 */
  --text-display: clamp(3rem, 1.25rem + 6.5vw, 5.75rem);   /* 92px measured: trumpaccounts h1/h2 */
  --text-h2:      clamp(2.25rem, 1.5rem + 3vw, 3.5rem);    /* 48–56px measured: trumprx h2 */
  --text-h3:      clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);  /* 32–40px measured */
  --text-h4:      1.5rem;                                  /* 24px measured */
  --text-lead:    clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);/* 21px measured: america.gov */
  --text-body-lg: 1.125rem;                                /* 18px */
  --text-body:    1rem;                                    /* 16px */
  --text-sm:      0.875rem;                                /* 14px */
  --text-xs:      0.75rem;                                 /* 12px */

  --leading-display: 1;       /* measured: 92/92 */
  --leading-heading: 1.08;    /* measured: 94/101.5 */
  --leading-body:    1.5;     /* measured: 16/24 */
  --tracking-display: -0.03em;/* measured: -2.76px at 92px */
  --tracking-heading: -0.02em;/* measured: -1.88px at 94px */
  --tracking-label:   0.04em; /* derived: uppercase mono */

  /* ---- Space (4px base) -------------------------------------------------- */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.5rem;   --space-6: 2rem;
  --space-7: 3rem;     --space-8: 4rem;     --space-9: 6rem;
  --space-10: 9rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 10vw, 9rem);

  /* ---- Widths ------------------------------------------------------------ */
  --width-text: 53.125rem;   /* 850px measured */
  --width-content: 77rem;    /* 1232px measured */
  --width-wide: 90rem;       /* 1440px measured */

  /* ---- Radius ------------------------------------------------------------ */
  --radius-sm: 6px;      /* measured: trumprx controls */
  --radius-md: 10px;     /* measured */
  --radius-lg: 24px;     /* measured */
  --radius-xl: 32px;     /* measured: trumpaccounts cards */
  --radius-2xl: 40px;    /* measured: feature panels, america.gov shell */
  --radius-pill: 9999px; /* measured */

  /* ---- Motion ------------------------------------------------------------ */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 150ms;
  --duration: 300ms;
}

/* ---- Semantic: Ivory (default) -------------------------------------------
   Also available as [data-theme="ivory"] to reset a light panel that sits
   inside a Midnight page. */
:root,
[data-theme="ivory"] {
  color-scheme: light;
  --bg: var(--ivory-100);
  --bg-sunken: var(--ivory-300);
  --surface: #ffffff;
  --surface-tint: var(--ivory-200);
  --chip: var(--sand-500);
  --text: var(--ink-800);
  --text-secondary: var(--ink-600);
  --text-muted: var(--ink-500);
  --border: rgb(51 51 52 / 0.15);        /* measured */
  --border-strong: rgb(51 51 52 / 0.5);  /* measured */
  --action: var(--navy-700);
  --action-hover: var(--navy-800);
  --action-text: #f9f7f1;                /* measured */
  --highlight: var(--gold-400);
  --highlight-text: var(--ink-800);
  --link: var(--ink-800);
  --focus: var(--blue-600);
  --positive-bg: var(--mint-200);
  --positive-text: var(--mint-800);
  --negative-bg: var(--maroon-100);
  --negative-text: var(--maroon-700);
  --bar-before: var(--maroon-700);
  --bar-after: var(--ink-700);
  --shadow-card: 0 1px 2px rgb(33 44 51 / 0.06), 0 12px 32px -16px rgb(33 44 51 / 0.18);
  --shadow-float: 0 2px 6px rgb(33 44 51 / 0.1), 0 32px 64px -24px rgb(33 44 51 / 0.45);
}

[data-theme="midnight"] {
  color-scheme: dark;
  --bg: var(--midnight-950);
  --bg-sunken: #000000;
  --surface: var(--midnight-900);
  --surface-tint: rgb(255 255 255 / 0.05); /* measured */
  --chip: rgb(255 255 255 / 0.1);
  --text: #ffffff;
  --text-secondary: rgb(255 255 255 / 0.65); /* measured */
  --text-muted: rgb(255 255 255 / 0.5);
  --border: rgb(255 255 255 / 0.12);
  --border-strong: rgb(255 255 255 / 0.4);
  --action: var(--blue-600);
  --action-hover: #1877d4;
  --action-text: #ffffff;
  --highlight: var(--gold-400);
  --highlight-text: var(--ink-800);
  --link: var(--blue-300);
  --focus: var(--blue-300);
  --positive-bg: rgb(208 246 216 / 0.14);
  --positive-text: #a9e8b8;
  --negative-bg: rgb(255 140 140 / 0.14);
  --negative-text: #f2aaaa;
  --bar-before: #8a3b3b;
  --bar-after: rgb(255 255 255 / 0.22);
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -16px rgb(0 0 0 / 0.6);
  --shadow-float: 0 2px 6px rgb(0 0 0 / 0.4), 0 32px 64px -24px rgb(0 0 0 / 0.8);
}
