/*
Theme Name: ADU Journal
Theme URI: https://adujournal.com
Author: ADU Journal
Author URI: https://adujournal.com
Description: Custom editorial theme for ADU Journal — the independent voice for accessory dwelling units in the United States.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: adujournal
*/

/* ============================================================
   DESIGN SYSTEM — CSS CUSTOM PROPERTIES
   ============================================================ */

:root {
  /* Colors */
  --color-ink:               #1a1a18;
  --color-cream:             #f5f0e8;
  --color-warm-white:        #faf8f4;
  --color-terracotta:        #c4582a;
  --color-terracotta-light:  #e8855a;
  --color-sage:              #4a6741;
  --color-sage-dark:         #2d4a2a;
  --color-slate:             #2c3e50;
  --color-slate-mid:         #445566;
  --color-gold:              #c9a84c;
  --color-rule:              #d4cfc4;
  --color-muted:             #6b6560;
  --color-white:             #ffffff;
  --color-black:             #000000;

  /* Status colors */
  --color-status-friendly:    #d1fae5;
  --color-status-friendly-text: #065f46;
  --color-status-moderate:    #fef3c7;
  --color-status-moderate-text: #92400e;
  --color-status-restrictive: #fee2e2;
  --color-status-restrictive-text: #991b1b;
  --color-status-evolving:    #ede9fe;
  --color-status-evolving-text: #5b21b6;

  /* Typography */
  --font-display:  'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-body:     'DM Sans', 'Helvetica Neue', 'Arial', sans-serif;
  --font-mono:     'DM Mono', 'Courier New', 'Courier', monospace;

  /* Type scale */
  --text-display-xl: clamp(36px, 5vw, 64px);
  --text-display-l:  clamp(28px, 4vw, 52px);
  --text-display-m:  clamp(22px, 3vw, 36px);
  --text-headline-l: clamp(20px, 2.5vw, 28px);
  --text-headline-m: clamp(17px, 2vw, 22px);
  --text-headline-s: clamp(15px, 1.5vw, 18px);
  --text-body-l:     18px;
  --text-body-m:     15px;
  --text-body-s:     13px;
  --text-label:      11px;
  --text-micro:      10px;

  /* Spacing (multiples of 8px) */
  --space-1:   8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-5:  40px;
  --space-6:  48px;
  --space-7:  56px;
  --space-8:  64px;
  --space-10: 80px;
  --space-12: 96px;

  /* Layout */
  --max-width-wide:    1320px;
  --max-width-default: 1200px;
  --max-width-narrow:  900px;
  --content-padding:   clamp(20px, 4vw, 48px);

  /* Borders */
  --border-thick:  3px solid var(--color-ink);
  --border-medium: 2px solid var(--color-ink);
  --border-thin:   1px solid var(--color-rule);
  --border-accent: 3px solid var(--color-terracotta);

  /* Shadows */
  --shadow-card:    4px 4px 0 var(--color-ink);
  --shadow-card-sm: 3px 3px 0 var(--color-ink);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-mid:  0.25s ease;
  --transition-slow: 0.4s ease;

  /* Z-index scale */
  --z-base:     1;
  --z-dropdown: 50;
  --z-sticky:   100;
  --z-overlay:  200;
  --z-modal:    300;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body-m);
  line-height: 1.65;
  color: var(--color-ink);
  background-color: var(--color-warm-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-ink);
}

h1 { font-size: var(--text-display-l); font-weight: 900; }
h2 { font-size: var(--text-display-m); font-weight: 900; }
h3 { font-size: var(--text-headline-l); font-weight: 700; }
h4 { font-size: var(--text-headline-m); font-weight: 700; }
h5 { font-size: var(--text-headline-s); font-weight: 700; }
h6 { font-size: var(--text-body-l);     font-weight: 700; }

p { line-height: 1.7; }

/* Article body content */
.entry-content {
  font-size: var(--text-body-l);
  line-height: 1.8;
  max-width: 68ch;
}

.entry-content p { margin-bottom: 1.5em; }
.entry-content h2 { font-size: var(--text-display-m); margin: 2em 0 0.75em; }
.entry-content h3 { font-size: var(--text-headline-l); margin: 1.75em 0 0.6em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.5em 1.5em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.4em; line-height: 1.7; }
.entry-content blockquote {
  border-left: 4px solid var(--color-terracotta);
  margin: 2em 0;
  padding: 1em 1.5em;
  background: var(--color-cream);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1em;
}
.entry-content a {
  color: var(--color-terracotta);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.entry-content a:hover { color: var(--color-terracotta-light); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  max-width: var(--max-width-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--content-padding);
  padding-right: var(--content-padding);
}

.container--default {
  max-width: var(--max-width-default);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-terracotta);
  color: white;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  z-index: var(--z-modal);
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 16px; }

/* ============================================================
   REUSABLE COMPONENTS
   ============================================================ */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--color-terracotta);
  color: white;
}
.btn--primary:hover { background: var(--color-terracotta-light); }

.btn--dark {
  background: var(--color-ink);
  color: white;
}
.btn--dark:hover { background: var(--color-terracotta); }

.btn--outline {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid var(--color-ink);
}
.btn--outline:hover { background: var(--color-ink); color: white; }

.btn--ghost {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn--ghost:hover { background: rgba(255,255,255,0.28); }

/* --- Category Labels --- */
.cat-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.cat-label--policy  { color: var(--color-sage); }
.cat-label--builder { color: var(--color-terracotta); }
.cat-label--finance { color: var(--color-slate); }
.cat-label--design  { color: #7c3aed; }
.cat-label--news    { color: var(--color-slate-mid); }
.cat-label--advocacy{ color: var(--color-sage); }

/* --- Status Badges --- */
.status-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  font-weight: 500;
}
.status-badge--friendly    { background: var(--color-status-friendly);    color: var(--color-status-friendly-text); }
.status-badge--moderate    { background: var(--color-status-moderate);    color: var(--color-status-moderate-text); }
.status-badge--restrictive { background: var(--color-status-restrictive); color: var(--color-status-restrictive-text); }
.status-badge--evolving    { background: var(--color-status-evolving);    color: var(--color-status-evolving-text); }

/* --- Section Headers --- */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 3px double var(--color-ink);
  padding-bottom: 10px;
  margin-bottom: var(--space-4);
  margin-top: var(--space-6);
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-display-m);
  font-weight: 900;
}
.section-header__link {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-terracotta);
}
.section-header__link:hover { text-decoration: underline; }

/* --- Cards --- */
.card {
  background: white;
  border: var(--border-thin);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.card:hover {
  border-color: var(--color-ink);
  box-shadow: var(--shadow-card);
  transform: translate(-2px, -2px);
}

/* ============================================================
   TOPBAR
   ============================================================ */

.site-topbar {
  background: var(--color-ink);
  color: var(--color-cream);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.08em;
  padding: 7px var(--content-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}
.site-topbar a { color: var(--color-gold); }
.site-topbar a:hover { text-decoration: underline; }
.site-topbar__right {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

/* ============================================================
   MASTHEAD
   ============================================================ */

.site-masthead {
  background: var(--color-cream);
  border-bottom: var(--border-thick);
  padding: var(--space-4) var(--content-padding);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
}

.site-masthead__tagline {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  line-height: 1.5;
}

.site-masthead__logo {
  text-align: center;
}
.site-masthead__logo a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--color-ink);
}
.site-masthead__logo a span { color: var(--color-terracotta); }
.site-masthead__subhead {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 4px;
  text-align: center;
}

.site-masthead__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-2);
}

.site-search {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-ink);
  background: white;
  padding: 7px 12px;
  gap: var(--space-1);
  font-size: 12px;
  color: var(--color-muted);
  cursor: text;
  font-family: var(--font-body);
}
.site-search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  width: 160px;
  color: var(--color-ink);
}
.site-search input::placeholder { color: var(--color-muted); }

/* ============================================================
   PRIMARY NAVIGATION
   ============================================================ */

.site-nav {
  background: var(--color-ink);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.site-nav__inner {
  display: flex;
  align-items: stretch;
  padding: 0 var(--content-padding);
}

.site-nav__menu {
  display: flex;
  align-items: stretch;
  flex: 1;
}

.site-nav__menu a,
.site-nav__menu > li > a {
  display: flex;
  align-items: center;
  color: var(--color-cream);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 18px;
  border-right: 1px solid #333;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-body);
}

.site-nav__menu > li:first-child > a { border-left: 1px solid #333; }
.site-nav__menu a:hover,
.site-nav__menu .current-menu-item > a,
.site-nav__menu .current-page-ancestor > a { background: var(--color-terracotta); color: white; }

/* Rules by State — gold accent */
.site-nav__menu .menu-item--rules > a { color: var(--color-gold); }
.site-nav__menu .menu-item--rules > a:hover { background: var(--color-gold); color: var(--color-ink); }

.site-nav__spacer { flex: 1; }

.site-nav__subscribe {
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.site-nav__subscribe a {
  background: var(--color-terracotta);
  color: white;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: background var(--transition-fast);
}
.site-nav__subscribe a:hover { background: var(--color-terracotta-light); }

/* Mobile nav toggle */
.site-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: white;
  font-size: 22px;
  cursor: pointer;
  margin-left: auto;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.site-hero {
  display: grid;
  grid-template-columns: 1fr 400px;
  min-height: 520px;
  border-bottom: var(--border-thick);
}

.site-hero__main {
  background: var(--color-slate);
  background-image:
    linear-gradient(135deg, rgba(196,88,42,0.15) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: white;
  padding: var(--space-7) var(--space-7) var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.site-hero__main.has-image {
  background-size: cover;
  background-position: center;
}
.site-hero__main.has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,26,24,0.2) 0%, rgba(26,26,24,0.85) 100%);
}
.site-hero__main.has-image > * { position: relative; z-index: 1; }

.site-hero__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-terracotta-light);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 0.5s ease 0.1s forwards;
  opacity: 0;
}
.site-hero__eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--color-terracotta);
  flex-shrink: 0;
}

.site-hero__title {
  font-family: var(--font-display);
  font-size: var(--text-display-l);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: var(--space-3);
  max-width: 560px;
  animation: fadeInUp 0.5s ease 0.25s forwards;
  opacity: 0;
}
.site-hero__title a { color: white; }
.site-hero__title a:hover { color: var(--color-gold); }

.site-hero__excerpt {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  max-width: 500px;
  margin-bottom: var(--space-4);
  line-height: 1.65;
  animation: fadeInUp 0.5s ease 0.4s forwards;
  opacity: 0;
}

.site-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-mono);
  animation: fadeInUp 0.5s ease 0.5s forwards;
  opacity: 0;
}
.site-hero__meta .cat-label-pill {
  background: var(--color-terracotta);
  color: white;
  padding: 3px 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.site-hero__read-more {
  color: var(--color-gold);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast);
}
.site-hero__read-more:hover { gap: 10px; }

.site-hero__sidebar {
  background: var(--color-cream);
  border-left: var(--border-thick);
  display: flex;
  flex-direction: column;
}

.site-hero__sidebar-header {
  background: var(--color-ink);
  color: var(--color-gold);
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 20px;
  flex-shrink: 0;
}

.hero-sidebar-story {
  padding: 16px 20px;
  border-bottom: var(--border-thin);
  transition: background var(--transition-fast);
}
.hero-sidebar-story:hover { background: white; }
.hero-sidebar-story .cat-label { display: block; margin-bottom: 5px; }
.hero-sidebar-story h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-ink);
  margin-bottom: 5px;
}
.hero-sidebar-story h4 a { color: inherit; }
.hero-sidebar-story h4 a:hover { color: var(--color-terracotta); }
.hero-sidebar-story .date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-muted);
}

/* ============================================================
   STATE FINDER BAND
   ============================================================ */

.state-finder {
  background: var(--color-terracotta);
  background-image: linear-gradient(135deg, var(--color-terracotta) 0%, #a03d1a 100%);
  color: white;
  padding: var(--space-6) var(--content-padding);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
  border-bottom: var(--border-thick);
}

.state-finder__heading {
  font-family: var(--font-display);
  font-size: var(--text-display-m);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: var(--space-2);
}

.state-finder__desc {
  font-size: 15px;
  opacity: 0.85;
  line-height: 1.65;
  max-width: 420px;
}

.state-finder__form { display: flex; flex-direction: column; gap: var(--space-2); }

.state-finder__input-row {
  display: flex;
  border: 2px solid white;
  background: rgba(255,255,255,0.15);
  overflow: hidden;
}
.state-finder__input-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
}
.state-finder__input-row input::placeholder { color: rgba(255,255,255,0.6); }
.state-finder__input-row button {
  background: white;
  color: var(--color-terracotta);
  border: none;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
  transition: opacity var(--transition-fast);
}
.state-finder__input-row button:hover { opacity: 0.85; }

.state-finder__quick {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
}
.state-finder__quick-label {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  opacity: 0.65;
  letter-spacing: 0.05em;
}
.state-pill {
  background: rgba(255,255,255,0.18);
  color: white;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  transition: background var(--transition-fast);
  font-family: var(--font-body);
}
.state-pill:hover { background: rgba(255,255,255,0.32); }

/* ============================================================
   NEWS GRID
   ============================================================ */

.news-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  border: var(--border-medium);
  margin-top: 0;
}

.news-card {
  padding: var(--space-4);
  border-right: var(--border-medium);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: background var(--transition-fast);
}
.news-card:hover { background: var(--color-cream); }
.news-card:last-child { border-right: none; }
.news-card.news-card--featured { padding: var(--space-4); }

.news-card__image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: var(--space-1);
}
.news-card__image-placeholder {
  width: 100%;
  background: linear-gradient(135deg, var(--color-slate) 0%, var(--color-slate-mid) 100%);
  aspect-ratio: 16/9;
  margin-bottom: var(--space-1);
}
.news-card--featured .news-card__image-placeholder { aspect-ratio: 4/3; }

.news-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-ink);
}
.news-card h3 a { color: inherit; }
.news-card h3 a:hover { color: var(--color-terracotta); }
.news-card--featured h3 { font-size: var(--text-headline-l); }
.news-card:not(.news-card--featured) h3 { font-size: var(--text-headline-m); }

.news-card__excerpt {
  font-size: var(--text-body-s);
  color: var(--color-muted);
  line-height: 1.6;
  flex: 1;
}

.news-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-muted);
  padding-top: var(--space-1);
  border-top: var(--border-thin);
  gap: var(--space-1);
  flex-wrap: wrap;
}
.news-card__location {
  background: var(--color-cream);
  border: var(--border-thin);
  padding: 2px 8px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

/* ============================================================
   STAT BAR
   ============================================================ */

.stat-bar {
  background: var(--color-ink);
  color: white;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: var(--border-accent);
  margin-top: var(--space-6);
}

.stat-bar__item {
  padding: var(--space-4) var(--space-4);
  border-right: 1px solid #333;
  text-align: center;
}
.stat-bar__item:last-child { border-right: none; }

.stat-bar__number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  color: var(--color-gold);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-bar__label {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  line-height: 1.4;
}

/* ============================================================
   STATE GRID
   ============================================================ */

.state-grid-section {
  background: var(--color-cream);
  border-top: var(--border-thick);
  border-bottom: var(--border-thick);
  padding: var(--space-6) var(--content-padding);
  margin-top: var(--space-6);
}

.state-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: var(--space-4);
}

.state-card {
  background: white;
  border: 1.5px solid var(--color-rule);
  padding: var(--space-2);
  display: block;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--color-ink);
}
.state-card:hover {
  border-color: var(--color-terracotta);
  box-shadow: var(--shadow-card-sm);
  transform: translate(-2px, -2px);
}
.state-card__abbr {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--color-slate);
  line-height: 1.1;
  margin-bottom: 2px;
}
.state-card__name {
  display: block;
  font-size: 11px;
  color: var(--color-muted);
  margin-bottom: var(--space-1);
}

/* ============================================================
   BUILDER SHOWCASE (homepage)
   ============================================================ */

.builder-showcase { margin-top: 0; }

.builder-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.builder-card {
  border: var(--border-medium);
  overflow: hidden;
  transition: transform var(--transition-mid), box-shadow var(--transition-mid);
  background: white;
}
.builder-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--color-ink);
}

.builder-card__image {
  height: 200px;
  background: linear-gradient(135deg, var(--color-slate) 0%, #1a2d3d 100%);
  position: relative;
  overflow: hidden;
}
.builder-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.builder-card__type {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--color-terracotta);
  color: white;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
}

.builder-card__body { padding: var(--space-3); }
.builder-card__name {
  font-family: var(--font-display);
  font-size: var(--text-headline-m);
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.builder-card__desc {
  font-size: var(--text-body-s);
  color: var(--color-muted);
  line-height: 1.55;
  margin-bottom: var(--space-2);
}

.builder-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-2);
}
.tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--color-cream);
  border: var(--border-thin);
  padding: 3px 10px;
  color: var(--color-slate-mid);
}

.builder-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border-top: var(--border-thin);
}
.builder-card__location {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-muted);
}

/* ============================================================
   ADVOCACY BANNER
   ============================================================ */

.advocacy-banner {
  background: var(--color-sage);
  background-image: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
  color: white;
  text-align: center;
  padding: var(--space-8) var(--content-padding);
  border-top: var(--border-thick);
  border-bottom: var(--border-thick);
  margin-top: var(--space-6);
  position: relative;
  overflow: hidden;
}
.advocacy-banner::before {
  content: '\201C';
  position: absolute;
  top: -40px;
  left: 30px;
  font-family: var(--font-display);
  font-size: 320px;
  color: rgba(255,255,255,0.05);
  line-height: 1;
  pointer-events: none;
}
.advocacy-banner blockquote {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 32px);
  font-style: italic;
  font-weight: 700;
  max-width: 760px;
  margin: 0 auto var(--space-2);
  line-height: 1.35;
  position: relative;
}
.advocacy-banner cite {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
  font-style: normal;
}

/* ============================================================
   NEWSLETTER BAND
   ============================================================ */

.newsletter-band {
  background: white;
  border: var(--border-medium);
  padding: var(--space-5);
  margin: var(--space-6) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
}

.newsletter-band h3 {
  font-family: var(--font-display);
  font-size: var(--text-display-m);
  font-weight: 900;
  margin-bottom: var(--space-1);
}
.newsletter-band p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.65;
}

.newsletter-form { display: flex; flex-direction: column; gap: var(--space-2); }
.newsletter-form input[type="email"] {
  border: 1.5px solid var(--color-ink);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}
.newsletter-form input[type="email"]:focus { border-color: var(--color-terracotta); }
.newsletter-form button {
  background: var(--color-terracotta);
  color: white;
  padding: 13px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  transition: background var(--transition-fast);
}
.newsletter-form button:hover { background: #a03d1a; }
.newsletter-form__note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-muted);
  letter-spacing: 0.05em;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--color-ink);
  color: var(--color-cream);
  padding: var(--space-6) var(--content-padding);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-5);
  border-top: var(--border-accent);
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: var(--text-display-m);
  font-weight: 900;
  margin-bottom: var(--space-2);
  color: white;
}
.footer-brand h3 span { color: var(--color-terracotta); }
.footer-brand p {
  font-size: 13px;
  opacity: 0.65;
  line-height: 1.65;
  max-width: 280px;
  margin-bottom: var(--space-2);
}
.footer-brand .advocacy-badge {
  display: inline-block;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid #333;
}
.footer-col a {
  display: block;
  color: rgba(245,240,232,0.65);
  font-size: 13px;
  margin-bottom: var(--space-1);
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: white; }

.site-footer-bottom {
  background: var(--color-black);
  color: rgba(255,255,255,0.4);
  padding: 14px var(--content-padding);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   RESPONSIVE — TABLET (< 1024px)
   ============================================================ */

@media (max-width: 1023px) {
  .site-hero { grid-template-columns: 1fr; }
  .site-hero__sidebar { display: none; }

  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-card:nth-child(3) { display: none; }

  .state-finder { grid-template-columns: 1fr; }
  .state-grid { grid-template-columns: repeat(4, 1fr); }

  .builder-showcase-grid { grid-template-columns: 1fr 1fr; }
  .builder-card:nth-child(3) { display: none; }

  .site-footer { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .newsletter-band { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* ============================================================
   RESPONSIVE — MOBILE (< 768px)
   ============================================================ */

@media (max-width: 767px) {
  .site-masthead { grid-template-columns: 1fr; text-align: center; padding: var(--space-3) var(--space-3); }
  .site-masthead__tagline { display: none; }
  .site-masthead__actions { justify-content: center; }
  .site-masthead__logo a { font-size: 40px; }

  .site-nav__menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-ink); border-top: 2px solid #333; z-index: var(--z-dropdown); }
  .site-nav__menu.is-open { display: flex; }
  .site-nav__menu a { border-right: none; border-bottom: 1px solid #333; width: 100%; }
  .site-nav__toggle { display: flex; }
  .site-nav__subscribe { display: none; }
  .site-nav { position: sticky; top: 0; }

  .site-hero__main { padding: var(--space-4) var(--space-3); min-height: 380px; }

  .state-finder { padding: var(--space-4) var(--space-3); }

  .news-grid { grid-template-columns: 1fr; border: var(--border-medium); }
  .news-card { border-right: none; border-bottom: var(--border-medium); }
  .news-card:last-child { border-bottom: none; }
  .news-card:nth-child(3) { display: flex; }

  .stat-bar { grid-template-columns: 1fr 1fr; }
  .state-grid { grid-template-columns: repeat(3, 1fr); }

  .builder-showcase-grid { grid-template-columns: 1fr; }
  .builder-card:nth-child(3) { display: flex; }

  .site-footer { grid-template-columns: 1fr; }
  .site-footer-bottom { flex-direction: column; gap: var(--space-1); }

  .site-topbar__right { display: none; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
  .site-topbar, .site-nav, .state-finder, .stat-bar,
  .advocacy-banner, .newsletter-band, .site-footer,
  .site-footer-bottom { display: none; }

  body { font-size: 12pt; color: black; background: white; }
  .entry-content { max-width: 100%; }
  a { text-decoration: underline; }
  h1, h2, h3 { page-break-after: avoid; }
  img { max-width: 100%; }
}
