/* ============================================
   State Policy Solutions — extends IAI styles.css
   Warm palette on top of IAI navy/cyan/amber/coral
   ============================================ */

:root {
  --sp-warm-1:  #fef9f0;    /* very warm neutral base */
  --sp-warm-2:  #fdf2e0;    /* warm cream deeper */
  --sp-warm-3:  #fce8d3;    /* peach cream */
  --sp-warm-4:  #fbdcb8;    /* light amber */
  --sp-coral:   #ee6c4d;
  --sp-coral-d: #c94e30;
  --sp-mint:    #d4f1e8;
  --sp-sky:     #d8ecf3;
  --sp-lilac:   #e6dcf5;

  /* Topic gradient tokens for hero panels */
  --grad-warm:   linear-gradient(135deg, #fdf2e0 0%, #fbdcb8 100%);
  --grad-sky:    linear-gradient(135deg, #e6f0f3 0%, #b9ebec 100%);
  --grad-mint:   linear-gradient(135deg, #d4f1e8 0%, #a9dfc7 100%);
  --grad-lilac:  linear-gradient(135deg, #e6dcf5 0%, #c9b8ea 100%);
  --grad-peach:  linear-gradient(135deg, #fce8d3 0%, #f4b688 100%);
  --grad-rose:   linear-gradient(135deg, #fde2e2 0%, #f8b4b4 100%);
  --grad-sage:   linear-gradient(135deg, #e6ede0 0%, #b7c9a4 100%);
  --grad-navy:   linear-gradient(135deg, #dfe7ee 0%, #a8bccb 100%);
}

/* ============================================
   HERO — split with photo panel
   ============================================ */
.sp-hero {
  padding: 3.5rem 0 2.5rem;
  background:
    radial-gradient(circle at 10% 25%, rgba(244,185,66,0.14), transparent 45%),
    radial-gradient(circle at 90% 75%, rgba(238,108,77,0.10), transparent 45%),
    linear-gradient(180deg, var(--sp-warm-1) 0%, #ffffff 100%);
  border-bottom: 1px solid #f4e6c8;
}
.sp-hero .container {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 900px) {
  .sp-hero .container { grid-template-columns: 1fr; }
  .sp-hero-photo { max-width: 460px; margin: 0 auto; }
}

.sp-hero .breadcrumb {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.sp-hero .breadcrumb a { color: var(--text-muted); text-decoration: none; }
.sp-hero .breadcrumb a:hover { color: var(--sp-coral); border-bottom: 1px dotted currentColor; }
.sp-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 22ch;
  margin-bottom: 0.85rem;
}
.sp-hero .lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 62ch;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* Warm eyebrow pill override */
.sp-hero .eyebrow-pill {
  background: rgba(238,108,77,0.10);
  border-color: rgba(238,108,77,0.3);
  color: var(--sp-coral-d);
}

.sp-hero-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(26,58,82,0.20);
}
.sp-hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.sp-hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(15,36,54,0.25) 100%);
}

.sp-hero-photo .photo-tag {
  position: absolute;
  bottom: 1rem; left: 1rem; right: 1rem;
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 2;
}

.sp-hero-photo .photo-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: white;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  display: inline-flex; align-items: center; gap: 0.4rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  z-index: 2;
}
.sp-hero-photo .photo-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sp-coral);
}

/* ============================================
   SECTION LABEL
   ============================================ */
.sp-section {
  padding: 3.5rem 0;
}
.sp-section.soft {
  background: linear-gradient(180deg, var(--sp-warm-1) 0%, #ffffff 100%);
}
.sp-section.warm {
  background:
    radial-gradient(circle at 5% 30%, rgba(244,185,66,0.06), transparent 50%),
    linear-gradient(180deg, var(--sp-warm-2) 0%, var(--sp-warm-1) 100%);
}

.sp-label {
  display: flex; align-items: baseline;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #f0d8a8;
}
.sp-label-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sp-coral);
  letter-spacing: 0.05em;
}
.sp-label h2 {
  font-size: 1.4rem;
  margin: 0;
}
.sp-label .sp-count {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.sp-label + p.sp-lead {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 62ch;
  margin-bottom: 1.75rem;
}

/* ============================================
   STATUS BADGE
   ============================================ */
.sp-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.68rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sp-badge.live    { background: #d1fae5; color: #065f46; }
.sp-badge.live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
}
.sp-badge.partner { background: #dbeafe; color: #1e40af; }
.sp-badge.planned { background: #fef3c7; color: #92400e; }

/* ============================================
   LIVE CARDS — with photo hero
   ============================================ */
.live-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) { .live-grid { grid-template-columns: 1fr; } }

.live-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.live-card:hover,
.live-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--sp-coral);
  outline: none;
}
.live-card:focus-visible { outline: 3px solid var(--sp-coral); outline-offset: 3px; }

.live-card-visual {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
}
.live-card-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.live-card-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(15,36,54,0.45) 100%);
}
.live-card-visual .sp-badge {
  position: absolute; top: 0.85rem; left: 0.85rem;
  background: white;
  z-index: 2;
}
.live-card-visual .lc-brand {
  position: absolute; bottom: 0.85rem; left: 1rem; right: 1rem;
  font-family: var(--font-display);
  font-weight: 700; font-size: 0.95rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 2;
}

.live-card-body {
  padding: 1.35rem 1.5rem 1.5rem;
  flex: 1; display: flex; flex-direction: column;
  background: white;
}
.live-card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--sp-coral);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.live-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.live-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}
.live-card-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: auto;
}
.live-card-cta svg { width: 14px; height: 14px; }

/* ============================================
   CAPABILITY CARDS
   ============================================ */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1100px) { .cap-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px)  { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .cap-grid { grid-template-columns: 1fr; } }

.cap-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.15rem;
  display: flex; flex-direction: column;
  gap: 0.65rem;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.cap-card:hover,
.cap-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--sp-coral);
  box-shadow: var(--shadow);
  outline: none;
}
.cap-card:focus-visible { outline: 3px solid var(--sp-coral); outline-offset: 3px; }

.cap-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
}

.cap-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cap-icon.warm { background: linear-gradient(135deg, #fdf2e0, #fbdcb8); }
.cap-icon.sky  { background: linear-gradient(135deg, #e6f0f3, #b9ebec); }
.cap-icon.mint { background: linear-gradient(135deg, #d4f1e8, #a9dfc7); }
.cap-icon.lilac{ background: linear-gradient(135deg, #e6dcf5, #c9b8ea); color: #5b21b6; }
.cap-icon.peach{ background: linear-gradient(135deg, #fce8d3, #f4b688); }
.cap-icon.rose { background: linear-gradient(135deg, #fde2e2, #f8b4b4); color: #b91c1c; }
.cap-icon.sage { background: linear-gradient(135deg, #e6ede0, #b7c9a4); color: #365314; }
.cap-icon.navy { background: linear-gradient(135deg, #dfe7ee, #a8bccb); }
.cap-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }

.cap-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-light);
}
.cap-card h3 {
  font-size: 0.98rem;
  line-height: 1.3;
  margin: 0;
}
.cap-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.cap-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.4rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-soft);
}
.cap-card-foot .group {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================
   ENGAGE TIER CARDS
   ============================================ */
.engage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) { .engage-grid { grid-template-columns: 1fr; } }

.engage-card {
  padding: 1.75rem 1.6rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.engage-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--tier-color, var(--sp-coral));
}
.engage-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.engage-card.t1 { --tier-color: #ee6c4d; }
.engage-card.t2 { --tier-color: #6a4c93; }
.engage-card.t3 { --tier-color: #36c6c8; }

.engage-num {
  position: absolute;
  top: 1rem; right: 1.35rem;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--tier-color) 12%, white);
  line-height: 1;
}
.engage-tier {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
  align-self: flex-start;
  margin-top: 0.75rem;
}
.engage-tier.t1 { background: #fee2e2; color: #991b1b; }
.engage-tier.t2 { background: #ede9fe; color: #5b21b6; }
.engage-tier.t3 { background: #cffafe; color: #155e75; }

.engage-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.engage-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}
.engage-tools {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
}
.engage-tools span {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--sp-warm-1);
  color: var(--text-muted);
  border: 1px solid #f0d8a8;
}

/* ============================================
   FACES STRIP — warm human element between sections
   ============================================ */
.faces-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin: 2rem 0 0;
}
@media (max-width: 780px) { .faces-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .faces-strip { grid-template-columns: 1fr; } }

.face-card {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.face-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15,36,54,0.65) 100%);
}
.face-card .caption {
  position: absolute;
  bottom: 0.75rem; left: 0.85rem; right: 0.85rem;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 2;
}

/* ============================================
   A11Y NOTE
   ============================================ */
.sp-a11y {
  padding: 1.15rem 1.4rem;
  background: var(--sp-warm-1);
  border: 1px solid #f4e6c8;
  border-radius: 14px;
  margin-top: 2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0.85rem;
}
.sp-a11y svg { width: 28px; height: 28px; color: var(--amber); }
.sp-a11y strong { color: var(--text); }
.sp-a11y a { color: var(--navy); border-bottom: 1px dotted currentColor; }

/* ============================================
   TOPIC PAGE HEADER (subpages)
   ============================================ */
.topic-page-header {
  padding: 3rem 0 2rem;
  position: relative;
  overflow: hidden;
}
.topic-page-header .container {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 2;
}
@media (max-width: 900px) {
  .topic-page-header .container { grid-template-columns: 1fr; }
}

.topic-page-header.t1 { background: linear-gradient(180deg, #fdf2e0 0%, #ffffff 100%); }
.topic-page-header.t2 { background: linear-gradient(180deg, #e6f0f3 0%, #ffffff 100%); }
.topic-page-header.t3 { background: linear-gradient(180deg, #fce8d3 0%, #ffffff 100%); }
.topic-page-header.t4 { background: linear-gradient(180deg, #e6dcf5 0%, #ffffff 100%); }
.topic-page-header.t5 { background: linear-gradient(180deg, #fde2e2 0%, #ffffff 100%); }
.topic-page-header.t6 { background: linear-gradient(180deg, #d4f1e8 0%, #ffffff 100%); }
.topic-page-header.t7 { background: linear-gradient(180deg, #fbdcb8 0%, #ffffff 100%); }
.topic-page-header.t8 { background: linear-gradient(180deg, #dfe7ee 0%, #ffffff 100%); }

.topic-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: white;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sp-coral);
  border: 1px solid var(--sp-warm-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.topic-page-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  max-width: 22ch;
  margin-bottom: 0.75rem;
}

.topic-page-header .lead {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.65;
}

.topic-header-photo {
  aspect-ratio: 4 / 5;
  max-height: 380px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(15,36,54,0.20);
}
.topic-header-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-header-photo .caption {
  position: absolute;
  bottom: 0.85rem; left: 1rem; right: 1rem;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.topic-header-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15,36,54,0.55) 100%);
}

/* ============================================
   TABS (interactive demo switching)
   ============================================ */
.tabs {
  display: flex; flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  background: white;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin: 2rem 0 1.5rem;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.tab {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 0.7rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: inherit;
}
.tab:hover { color: var(--text); background: var(--sp-warm-1); }
.tab:focus-visible {
  outline: 3px solid var(--sp-coral);
  outline-offset: 2px;
}
.tab[aria-selected="true"] {
  background: var(--sp-coral);
  color: white;
  box-shadow: 0 4px 12px rgba(238,108,77,0.25);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================
   STATE SNAPSHOT
   ============================================ */
.state-snapshot {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr;
  gap: 1.5rem;
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 780px) {
  .state-snapshot { grid-template-columns: 1fr; }
}
.state-snapshot label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.state-snapshot select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  font: inherit;
  color: var(--text);
  min-height: 44px;
}
.state-snapshot select:focus-visible {
  outline: 3px solid var(--sp-coral);
  outline-offset: 2px;
  border-color: var(--sp-coral);
}

.snapshot-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
}
.metric {
  padding: 0.85rem 1rem;
  background: var(--sp-warm-1);
  border: 1px solid #f4e6c8;
  border-radius: 12px;
}
.metric .label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  font-weight: 700;
}
.metric .value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--font-display);
  line-height: 1.1;
}
.metric .compare {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.metric .compare.up   { color: #047857; font-weight: 600; }
.metric .compare.down { color: #b91c1c; font-weight: 600; }

/* ============================================
   SIMULATOR / FORM
   ============================================ */
.sim-frame {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.3fr);
  gap: 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 820px) {
  .sim-frame { grid-template-columns: 1fr; }
}
.sim-inputs { display: flex; flex-direction: column; gap: 1.1rem; }
.sim-field { display: flex; flex-direction: column; }
.sim-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.sim-field .hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.15rem;
}
.sim-field input[type="text"],
.sim-field input[type="number"],
.sim-field select,
.sim-field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  font: inherit;
  color: var(--text);
  min-height: 44px;
}
.sim-field input:focus-visible,
.sim-field select:focus-visible,
.sim-field textarea:focus-visible {
  outline: 3px solid var(--sp-coral);
  outline-offset: 2px;
  border-color: var(--sp-coral);
}
.sim-field .range-wrap {
  display: flex; align-items: center; gap: 0.75rem;
}
.sim-field input[type="range"] { flex: 1; margin: 0; }
.sim-field .range-value {
  min-width: 5rem;
  padding: 0.4rem 0.6rem;
  background: var(--sp-warm-1);
  border: 1px solid #f0d8a8;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--font-display);
}

.sim-radio-group {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.sim-radio {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.2s;
  min-height: 40px;
}
.sim-radio input { position: absolute; opacity: 0; pointer-events: none; }
/* Keyboard focus must be visible even though the native input is hidden */
.sim-radio:has(input:focus-visible) {
  outline: 3px solid var(--sp-coral);
  outline-offset: 2px;
}
.sim-radio:has(input:checked) {
  background: var(--sp-coral);
  border-color: var(--sp-coral);
  color: white;
}
.sim-radio:hover { border-color: var(--sp-coral); }

.sim-btn {
  padding: 0.85rem 1.4rem;
  border: none;
  border-radius: 12px;
  background: var(--sp-coral);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  min-height: 44px;
  box-shadow: 0 8px 20px rgba(238,108,77,0.24);
}
.sim-btn:hover {
  background: var(--sp-coral-d);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(238,108,77,0.32);
}
.sim-btn:focus-visible {
  outline: 3px solid var(--sp-coral);
  outline-offset: 3px;
}
.sim-btn:active { transform: translateY(0); }
.sim-btn.secondary {
  background: white;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  box-shadow: none;
}
.sim-btn.secondary:hover { background: var(--navy); color: white; }

.sim-output {
  padding: 1.5rem;
  background: var(--sp-warm-1);
  border-radius: 14px;
  border: 1px solid #f4e6c8;
  min-height: 200px;
}
.sim-output h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
  font-weight: 700;
}
.result-block {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid #f4e6c8;
  margin-bottom: 1rem;
}
.result-block:last-child { margin-bottom: 0; }
.result-primary {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--font-display);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.result-caption {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.result-status {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}
.result-status.pass { background: #d1fae5; color: #065f46; }
.result-status.fail { background: #fee2e2; color: #991b1b; }
.result-status.warn { background: #fef3c7; color: #92400e; }

.bar-row { margin-bottom: 0.85rem; }
.bar-row-head {
  display: flex; justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.bar-track {
  height: 10px;
  background: var(--sp-warm-1);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--sp-coral);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.bar-fill.up { background: #10b981; }

/* ============================================
   MYTH / FACT CARDS
   ============================================ */
.myth-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.15rem;
  margin-top: 1rem;
}
.myth-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.myth-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--sp-coral);
}
.myth-card:focus-visible {
  outline: 3px solid var(--sp-coral);
  outline-offset: 3px;
}
.myth-card .label-pill {
  display: inline-block;
  align-self: flex-start;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}
.myth-card[data-state="closed"] .label-pill {
  background: #fef3c7; color: #92400e;
}
.myth-card[data-state="opened"][data-verdict="myth"] .label-pill {
  background: #fee2e2; color: #991b1b;
}
.myth-card[data-state="opened"][data-verdict="fact"] .label-pill {
  background: #d1fae5; color: #065f46;
}
.myth-card .claim {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.85rem;
  flex: 1;
  line-height: 1.4;
}
.myth-card .reveal {
  display: none;
  border-top: 1px dashed var(--border-soft);
  padding-top: 0.85rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.myth-card[data-state="opened"] .reveal { display: block; }
.myth-card .source {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
}
.myth-card .flip-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.myth-card[data-state="opened"] .flip-hint { display: none; }

/* ============================================
   RESOURCES GRID
   ============================================ */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.resource {
  padding: 1.15rem 1.25rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.resource:hover {
  border-color: var(--sp-coral);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.resource:focus-visible {
  outline: 3px solid var(--sp-coral);
  outline-offset: 2px;
}
.resource .r-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sp-coral);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.resource .r-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.35rem 0;
}
.resource .r-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ============================================
   WIZARD (multi-step forms)
   ============================================ */
.wizard {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.wizard-steps {
  display: flex; justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.wizard-step {
  flex: 1; min-width: 110px;
  padding: 0.7rem 0.5rem;
  text-align: center;
  border-radius: 10px;
  background: var(--sp-warm-1);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #f4e6c8;
}
.wizard-step[aria-current="step"] {
  background: var(--sp-coral);
  color: white;
  border-color: var(--sp-coral);
}
.wizard-step.done {
  background: #d1fae5;
  color: #065f46;
  border-color: #86efac;
}
.wizard-step .num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.15rem;
  font-weight: 700;
}
.wizard-nav {
  display: flex; justify-content: space-between;
  margin-top: 1.5rem;
  gap: 0.75rem;
}

/* ============================================
   CHOROPLETH & MAP
   ============================================ */
.tracker-map {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--sp-warm-1);
  border: 1px solid #f4e6c8;
  border-radius: 16px;
  padding: 1rem;
  overflow: hidden;
}
.us-map { width: 100%; height: 100%; }
.us-map path {
  transition: fill 0.25s;
  cursor: pointer;
  stroke: white;
  stroke-width: 0.8;
}
.us-map path:hover,
.us-map path:focus {
  stroke: var(--navy);
  stroke-width: 2;
  outline: none;
}
.tracker-controls {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin: 1rem 0;
}
.chip {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
}
.chip:hover { border-color: var(--sp-coral); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--sp-coral);
  border-color: var(--sp-coral);
  color: white;
}
.chip:focus-visible { outline: 3px solid var(--sp-coral); outline-offset: 2px; }

.legend {
  display: flex; flex-wrap: wrap; gap: 1rem;
  padding: 0.85rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
}
.legend .swatch {
  display: inline-block; width: 14px; height: 14px;
  border-radius: 3px; margin-right: 0.4rem;
  vertical-align: middle;
}
.state-detail {
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 1rem;
}
.state-detail h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.state-detail .adoption-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.state-detail .adoption-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: 0.92rem;
}
.state-detail .adoption-list li:last-child { border-bottom: 0; }

/* ============================================
   CHAT
   ============================================ */
.chat-frame {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  height: 480px;
  display: flex; flex-direction: column;
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex; flex-direction: column; gap: 0.85rem;
}
.chat-bubble {
  max-width: 82%;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.55;
}
.chat-bubble.user {
  align-self: flex-end;
  background: var(--navy);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-bubble.bot {
  align-self: flex-start;
  background: var(--sp-warm-1);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-bubble.bot .sources {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.chat-bubble.bot .sources a {
  color: var(--navy);
  text-decoration: underline;
}
.chat-input-row {
  display: flex; gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-soft);
}
.chat-input-row input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  min-height: 44px;
}
.chat-input-row input:focus-visible {
  outline: 3px solid var(--sp-coral);
  outline-offset: 2px;
  border-color: var(--sp-coral);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================
   VOICE-ASK FAB (floating action button)
   Persistent on every /state-policy/ page.
   ============================================ */
.voice-fab {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0));
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem 0.85rem 1rem;
  background: var(--sp-coral);
  color: white;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 12px 32px rgba(238,108,77,0.32);
  z-index: 100;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.voice-fab:hover {
  background: var(--sp-coral-d);
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(238,108,77,0.42);
  color: white;
}
.voice-fab:focus-visible {
  outline: 3px solid white;
  outline-offset: 3px;
}
.voice-fab .fab-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: white;
  color: var(--sp-coral);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.voice-fab .fab-icon svg { width: 16px; height: 16px; }
.voice-fab .fab-icon::after {
  content: '';
  position: absolute;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  animation: fab-ping 2.5s infinite;
  pointer-events: none;
}
@keyframes fab-ping {
  0%   { opacity: 0.6; transform: scale(0.7); }
  70%  { opacity: 0;   transform: scale(1.5); }
  100% { opacity: 0;   transform: scale(1.5); }
}
@media (max-width: 640px) {
  .voice-fab { padding: 0.7rem 1rem 0.7rem 0.8rem; font-size: 0.85rem; bottom: calc(16px + env(safe-area-inset-bottom, 0)); right: 16px; }
  .voice-fab .fab-icon { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .voice-fab .fab-icon::after { animation: none; }
}

/* ============================================
   DATA PROVENANCE + CITATION
   ============================================ */
.data-strip {
  background: linear-gradient(135deg, #fef3c7, #fef9f0);
  border: 1px solid #f4d774;
  border-radius: 12px;
  padding: 0.95rem 1.15rem;
  margin: 1.25rem 0;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #5c3d0a;
  line-height: 1.6;
}
.data-strip svg { width: 22px; height: 22px; color: #b87f00; flex-shrink: 0; margin-top: 2px; }
.data-strip strong { color: #4a3208; }
.data-strip a { color: #b87f00; font-weight: 700; border-bottom: 1px dotted currentColor; text-decoration: none; }
.data-strip a:hover { color: var(--sp-coral); }

.illust-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid #fde68a;
  vertical-align: middle;
}

.cite-link {
  font-size: 0.72rem;
  color: var(--text-light);
  font-style: italic;
  line-height: 1.4;
}
/* Standalone citation under a metric/stat sits on its own line.
   Bare .cite-link stays inline so mid-sentence citations do not break the line. */
.metric .cite-link,
.cite-link.block {
  display: block;
  margin-top: 0.2rem;
}
.cite-link a { color: var(--navy); text-decoration: underline dotted; }
.cite-link a:hover { color: var(--sp-coral); }

/* Verified metric — has real citation */
.metric.verified { border-left: 3px solid #10b981; }
/* Illustrative metric */
.metric.illust { border-left: 3px solid #f59e0b; }
