/* ============================================================
   DREW FOR ILLINOIS — BRAND STYLESHEET
   Bryan Drew for Illinois Comptroller
   Brand kit v1.3 | Built for internal briefs & campaign deliverables
   ============================================================
   Changelog
   v1.3 (May 9, 2026) — Added .is-editorial opt-out class as the
                        symmetric complement to .surface-utility.
                        Lets a utility-tier document preserve
                        editorial register for specific demonstrations
                        (typography specimens, canonical pull quotes,
                        editorial brief headers embedded in staff
                        tools). Same variable-cascade mechanism;
                        opposite direction.
   v1.2 (May 9, 2026) — Added --drew-alert tokens for analytical
                        warning/exploit emphasis (Leesburg Grid
                        quadrants, exploit callouts, negative-
                        dimension shading). Brick red distinct
                        from Tracy brand red, pairs with green/gold.
                        Added "problem-solver, not problem-pointer-
                        outer" voice register note (see brand sheet
                        §6 for usage doctrine).
   v1.1 (May 9, 2026) — Added .surface-utility tier override.
                        Same brand, two registers: editorial (default)
                        for client-presentable deliverables; utility
                        (.surface-utility class) for staff tools and
                        dashboards where readability outranks editorial
                        flourish. See SURFACE TIERS section below.
   v1.0 — Initial brand kit.
   ============================================================
   Linked typefaces (Google Fonts — load before this stylesheet):
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700;800;900&family=Source+Sans+3:wght@300;400;500;600;700;900&display=swap" rel="stylesheet">
   ============================================================ */

:root {
  /* ── Brand color tokens ──────────────────────────────────── */
  --drew-green:        #1F5B3A;   /* Primary — hunter green, fiscal stewardship */
  --drew-green-deep:   #143F28;   /* Headlines on cream, dark UI surfaces */
  --drew-green-mid:    #2D7B4F;   /* Hover states, secondary fills */
  --drew-green-soft:   #DCE8DF;   /* Card tints, subtle backgrounds */

  --drew-gold:         #C9A227;   /* Primary accent — warm gold */
  --drew-gold-deep:    #9A7A14;   /* Gold on light surfaces, links */
  --drew-gold-soft:    #F2E4B0;   /* Gold tints, highlight backgrounds */

  --drew-alert:        #8B2A2A;   /* Brick red — analytical warning, exploit emphasis */
  --drew-alert-soft:   #F4E4E4;   /* Alert tint — warning backgrounds, exploit callouts */

  --drew-charcoal:     #1C1F1A;   /* Body text, max contrast */
  --drew-stone:        #5C6256;   /* Secondary text, captions */
  --drew-mist:         #B8BDB2;   /* Borders, dividers */
  --drew-cream:        #FAF8F2;   /* Page background, warm off-white */
  --drew-paper:        #FFFFFF;   /* Card surface */
  --drew-ink:          #0E1410;   /* Near-black for high-stakes contrast */

  /* Semantic aliases — use these in components, not raw colors */
  --color-bg:          var(--drew-cream);
  --color-surface:     var(--drew-paper);
  --color-text:        var(--drew-charcoal);
  --color-text-muted:  var(--drew-stone);
  --color-border:      var(--drew-mist);
  --color-primary:     var(--drew-green);
  --color-primary-ink: var(--drew-green-deep);
  --color-accent:      var(--drew-gold);
  --color-accent-ink:  var(--drew-gold-deep);
  --color-alert:       var(--drew-alert);
  --color-alert-soft:  var(--drew-alert-soft);

  /* ── Typography tokens ───────────────────────────────────── */
  --font-display: "Source Sans 3", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body:    "Source Sans 3", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Type scale — modular, 1.25 ratio, anchored to 16px base */
  --text-xs:   0.75rem;    /*  12px — labels, footnotes */
  --text-sm:   0.875rem;   /*  14px — captions, meta */
  --text-base: 1rem;       /*  16px — body */
  --text-md:   1.125rem;   /*  18px — lead paragraphs */
  --text-lg:   1.5rem;     /*  24px — subheads */
  --text-xl:   2rem;       /*  32px — section heads */
  --text-2xl:  2.75rem;    /*  44px — page titles */
  --text-3xl:  3.75rem;    /*  60px — hero display */
  --text-4xl:  5rem;       /*  80px — poster display */

  /* Tracking */
  --track-tight:  -0.02em;
  --track-normal:  0;
  --track-wide:    0.08em;
  --track-wider:   0.16em;

  /* ── Layout & spacing tokens ─────────────────────────────── */
  --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;

  --radius-sm: 2px;
  --radius:    4px;
  --radius-lg: 8px;

  --shadow-sm:  0 1px 2px rgba(20, 63, 40, 0.06);
  --shadow:     0 4px 14px rgba(20, 63, 40, 0.08);
  --shadow-lg:  0 12px 36px rgba(20, 63, 40, 0.14);

  --max-content: 72ch;     /* readable measure for body copy */
  --max-page:    1180px;   /* outer container for documents */
}

/* ============================================================
   BASE
   ============================================================ */
* { box-sizing: border-box; }

html {
  font-family: var(--font-body);
  font-size: 17px;        /* slight bump from 16 for brief readability */
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  line-height: 1.55;
  font-weight: 400;
}

/* ============================================================
   TYPOGRAPHY — display family
   ============================================================ */
h1, h2, h3, .display, .d-1, .d-2, .d-3 {
  font-family: var(--font-display);
  color: var(--color-primary-ink);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: var(--track-tight);
  margin: 0 0 var(--space-4) 0;
}

h1, .d-1 { font-size: var(--text-3xl); font-weight: 800; }
h2, .d-2 { font-size: var(--text-2xl); }
h3, .d-3 { font-size: var(--text-xl); }

/* Italic small-caps "watchdog" treatment for pull quotes and decks */
.d-italic { font-style: italic; font-weight: 600; color: var(--color-primary); }

/* ============================================================
   TYPOGRAPHY — body / utility
   ============================================================ */
h4, h5, h6, .h-4, .h-5, .h-6 {
  font-family: var(--font-body);
  color: var(--color-primary-ink);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 var(--space-3) 0;
}

h4, .h-4 { font-size: var(--text-lg); }
h5, .h-5 { font-size: var(--text-md); letter-spacing: var(--track-wide); text-transform: uppercase; }
h6, .h-6 { font-size: var(--text-sm); letter-spacing: var(--track-wider); text-transform: uppercase; color: var(--color-accent-ink); }

p { margin: 0 0 var(--space-4) 0; max-width: var(--max-content); }
.lead { font-size: var(--text-md); color: var(--color-text); }
.small { font-size: var(--text-sm); }
.meta  { font-size: var(--text-xs); color: var(--color-text-muted); letter-spacing: var(--track-wide); text-transform: uppercase; }

/* Eyebrow — tiny gold label that sits above section heads */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--track-wider);
  text-transform: uppercase;
  color: var(--color-accent-ink);
  padding-bottom: var(--space-1);
  border-bottom: 2px solid var(--color-accent);
  margin-bottom: var(--space-3);
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 120ms ease;
}
a:hover { color: var(--color-primary-ink); }

/* Lists — restrained, brief-appropriate */
ul, ol { padding-left: 1.25rem; margin: 0 0 var(--space-4) 0; max-width: var(--max-content); }
li { margin-bottom: var(--space-2); }
ul.tick { list-style: none; padding-left: 0; }
ul.tick li {
  position: relative;
  padding-left: 1.75rem;
}
ul.tick li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.page {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: var(--space-7) var(--space-5);
}
.section { margin-bottom: var(--space-8); }

.rule {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-7) 0;
}
.rule-gold {
  border: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--drew-gold) 0%, var(--drew-gold) 60%, transparent 100%);
  margin: var(--space-5) 0;
  width: 100%;
}

/* Grid utilities for brief layouts */
.grid    { display: grid; gap: var(--space-5); }
.grid-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   COMPONENTS — cards, callouts, pillars
   Mirrors the tracy-brand `.c-*` variant pattern
   ============================================================ */

/* Base card */
.c-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

/* Pillar card — for the three-pillar layout (Affordability/Accountability/Transparency) */
.c-pillar {
  background: var(--color-surface);
  border-top: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.c-pillar h3 { color: var(--color-primary-ink); }
.c-pillar.is-gold { border-top-color: var(--color-accent); }

/* Quote / pull card — gold left rule */
.c-quote {
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  padding: var(--space-5) var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-style: italic;
  color: var(--color-primary-ink);
}
.c-quote cite {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-sm);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Callout — for high-priority strategic notes */
.c-callout {
  background: var(--drew-green-soft);
  border: 1px solid var(--drew-green-mid);
  border-radius: var(--radius);
  padding: var(--space-5);
  color: var(--color-primary-ink);
}
.c-callout.is-warn {
  background: var(--drew-gold-soft);
  border-color: var(--color-accent);
}

/* Stat — large number on top of a small label */
.c-stat {
  text-align: left;
}
.c-stat .stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}
.c-stat .stat-label {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Inline tag / chip */
.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  background: var(--drew-green-soft);
  color: var(--color-primary-ink);
  border-radius: 999px;
}
.tag.is-gold { background: var(--drew-gold-soft); color: var(--color-accent-ink); }

/* ============================================================
   BUTTONS — for digital deliverables only
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: var(--track-wider);
  text-transform: uppercase;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 140ms ease;
}
.btn-primary { background: var(--color-primary); color: var(--color-surface); }
.btn-primary:hover { background: var(--drew-green-deep); color: var(--color-surface); }
.btn-gold    { background: var(--color-accent); color: var(--drew-charcoal); }
.btn-gold:hover { background: var(--drew-gold-deep); color: var(--color-surface); }
.btn-ghost   { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-ghost:hover { background: var(--color-primary); color: var(--color-surface); }

/* ============================================================
   BRIEF / DOCUMENT HEADER
   Use at top of every internal brief — establishes provenance
   ============================================================ */
.brief-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: var(--space-4);
  border-bottom: 3px double var(--color-primary);
  margin-bottom: var(--space-6);
  gap: var(--space-5);
}
.brief-header .brief-mark {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary-ink);
  line-height: 1;
}
.brief-header .brief-mark span {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--track-wider);
  text-transform: uppercase;
  color: var(--color-accent-ink);
  margin-top: var(--space-2);
}
.brief-header .brief-meta {
  text-align: right;
  font-size: var(--text-xs);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1.7;
}
.brief-header .brief-meta strong {
  color: var(--color-primary-ink);
  font-weight: 700;
}

/* Confidentiality bar — for sensitive briefs */
.confidential-bar {
  background: var(--drew-green-deep);
  color: var(--drew-gold-soft);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--track-wider);
  text-transform: uppercase;
  text-align: center;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
}

/* ============================================================
   SURFACE TIERS — editorial (default) vs utility
   ------------------------------------------------------------
   The brand asserts two surface tiers:
     · Editorial (default) — Playfair Display + Source Sans 3.
       Used for client-presentable deliverables: strategic briefs,
       oppo dossiers, fundraisers, public web pages.
     · Utility (.surface-utility) — Source Sans 3 throughout, with
       weight-driven hierarchy. Used for staff tools, hub root,
       dashboards, anything internal-operational where readability
       outranks editorial register.
   The override works at any scope (body, section, or component).
   CSS variables cascade through descendants, so a .surface-utility
   container redefines --font-display for everything inside it.
   No component code changes required.
   ============================================================ */
.surface-utility {
  --font-display: "Source Sans 3", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
.surface-utility h1,
.surface-utility h2,
.surface-utility h3,
.surface-utility .display,
.surface-utility .d-1,
.surface-utility .d-2,
.surface-utility .d-3 {
  font-weight: 800;
  letter-spacing: -0.01em;
}
.surface-utility h1,
.surface-utility .d-1 { font-weight: 900; }
.surface-utility .d-italic {
  font-style: normal;
  font-weight: 700;
  color: var(--color-primary);
}
.surface-utility .c-quote {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 500;
}
.surface-utility .c-stat .stat-num {
  font-family: var(--font-body);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.surface-utility .brief-header {
  border-bottom: 2px solid var(--color-primary);
}
.surface-utility .brief-header .brief-mark {
  font-family: var(--font-body);
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* ============================================================
   .is-editorial — symmetric opt-out from .surface-utility
   Use when a utility-tier document needs to preserve editorial
   register for specific elements (typography specimens, canonical
   pull quotes, editorial brief sections inside staff tools).
   Resets --font-display back to Playfair and restores editorial
   weight/tracking defaults.
   ============================================================ */
.is-editorial {
  --font-display: "Source Sans 3", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
.is-editorial h1,
.is-editorial h2,
.is-editorial h3,
.is-editorial .display,
.is-editorial .d-1,
.is-editorial .d-2,
.is-editorial .d-3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.is-editorial h1,
.is-editorial .d-1 { font-weight: 800; }
.is-editorial .d-italic {
  font-style: italic;
  font-weight: 600;
  color: var(--color-primary);
}
.is-editorial .c-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}
.is-editorial .c-stat .stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
}
.is-editorial .brief-header {
  border-bottom: 3px double var(--color-primary);
}
.is-editorial .brief-header .brief-mark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
}

/* ============================================================
   PRINT — briefs should print clean
   ============================================================ */
@media print {
  html { font-size: 11pt; background: #fff; }
  .page { padding: 0; max-width: none; }
  a { color: var(--color-primary-ink); }
  .c-card, .c-pillar, .c-callout, .c-quote { box-shadow: none; }
  .no-print { display: none !important; }
}
