/* Apple Wallet ID Tracker — Apple-themed (apple.com design language) */

:root {
  /* Type — Apple system fonts (SF Pro on Apple devices, falls back gracefully elsewhere) */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text:    -apple-system, BlinkMacSystemFont, "SF Pro Text",    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Monaco, monospace;

  /* Apple.com light palette */
  --bg:         #fbfbfd;             /* apple.com page bg */
  --bg-elev:    #ffffff;
  --bg-soft:    #f5f5f7;             /* apple.com section bg */
  --bg-tile:    #f5f5f7;
  --ink:        #1d1d1f;             /* apple.com primary text */
  --ink-soft:   #424245;
  --ink-mute:   #6e6e73;             /* apple.com secondary text */
  --ink-quiet:  #86868b;             /* apple.com tertiary text */
  --line:       #d2d2d7;             /* apple.com border */
  --line-soft:  #e8e8ed;

  /* Apple system accents */
  --accent:        #0071e3;          /* Apple system blue — CTAs/links */
  --accent-hover:  #0077ed;
  --accent-soft:   #e7f0fd;

  /* iOS system colors for status (these are the exact ones Apple uses in Wallet) */
  --ios-green:        #34c759;       /* Active = live in Wallet (matches the green check in Wallet UI) */
  --ios-green-bg:     #e8f8ec;
  --ios-orange:       #ff9500;       /* Announced */
  --ios-orange-bg:    #fff3e0;
  --ios-indigo:       #5e5ce6;       /* Legislative */
  --ios-indigo-bg:    #ecebfc;
  --ios-gray:         #8e8e93;       /* No commitment */
  --ios-gray-bg:      #f0f0f0;

  /* Spatial — Apple uses generous radii and big breathing room */
  --rad-sm: 8px;
  --rad-md: 12px;
  --rad-lg: 18px;
  --rad-xl: 22px;
  --rad-pill: 980px;
  --shadow-sm: 0 1px 1px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.08);

  --container: 1024px;               /* apple.com max content width */
  --container-wide: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #000000;             /* apple.com dark */
    --bg-elev:   #1d1d1f;
    --bg-soft:   #1d1d1f;
    --bg-tile:   #1d1d1f;
    --ink:       #f5f5f7;
    --ink-soft:  #d2d2d7;
    --ink-mute:  #a1a1a6;
    --ink-quiet: #86868b;
    --line:      #424245;
    --line-soft: #2a2a2c;
    --accent:        #2997ff;        /* Apple's dark-mode blue */
    --accent-hover:  #51a9ff;
    --accent-soft:   rgba(41,151,255,.15);
    --ios-green-bg:  rgba(52,199,89,.18);
    --ios-orange-bg: rgba(255,149,0,.18);
    --ios-indigo-bg: rgba(94,92,230,.22);
    --ios-gray-bg:   rgba(142,142,147,.18);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.47;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -.003em;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--container-wide); padding: 0 22px; margin: 0 auto; }

/* ─── Topbar — apple.com global nav style ─── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  /* Apple uses a near-opaque tinted bar, not a translucent wash. */
  background: rgba(251,251,253,.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
@media (prefers-color-scheme: dark) {
  .topbar {
    /* Apple's dark global nav: solid #1d1d1f-ish, hairline divider */
    background: rgba(22,22,23,.92);
    border-bottom-color: rgba(255,255,255,.08);
  }
}

.topbar-row { display: flex; align-items: center; gap: 2rem; padding: 12px 22px; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.022em; color: var(--ink); }
.brand-sub { color: var(--ink-mute); font-size: 11px; letter-spacing: .01em; }
@media (prefers-color-scheme: dark) {
  .brand-name { color: #f5f5f7; }
  .brand-sub  { color: #a1a1a6; }
}

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a {
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  opacity: .88;
  transition: opacity .12s ease;
}
.nav a:hover { opacity: 1; text-decoration: none; }
@media (prefers-color-scheme: dark) {
  .nav a { color: #f5f5f7; opacity: .92; }
  .nav a:hover { opacity: 1; }
}

.topbar-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-mute); }
@media (prefers-color-scheme: dark) {
  .topbar-meta { color: #a1a1a6; }
}
.dot { width: 7px; height: 7px; border-radius: 999px; background: var(--ios-green); }
.dot-live { box-shadow: 0 0 0 0 rgba(52,199,89,.5); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52,199,89,.45); }
  70%  { box-shadow: 0 0 0 7px rgba(52,199,89,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); }
}

@media (max-width: 720px) { .nav { display: none; } }

/* ─── Hero — apple.com product-page hero style ─── */
.hero { padding: 80px 0 56px; text-align: left; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: start; max-width: var(--container); margin: 0 auto; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.04;
  margin: 14px 0 10px;
  color: var(--ink);
}
.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 400;
  letter-spacing: -.018em;
  line-height: 1.18;
  margin: 0 0 24px;
  color: var(--ink-mute);
  max-width: 22ch;
}
.lede {
  font-size: 19px;
  line-height: 1.42;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 36px;
}
.lede strong { color: var(--ink); font-weight: 500; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  color: var(--accent);
  background: transparent;
  padding: 0;
  border-radius: 0;
  text-transform: none;
}
.eyebrow-mi { color: var(--ios-indigo); }

/* KPI tiles — apple.com numeric callout style */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 36px; }
.kpi {
  background: var(--bg-tile); border: none; border-radius: var(--rad-lg);
  padding: 22px 20px; box-shadow: none;
}
.kpi-num {
  font-family: var(--font-display);
  font-weight: 600; font-size: 44px; letter-spacing: -.02em; line-height: 1;
  color: var(--ink);
}
.kpi-label {
  color: var(--ink-mute); font-size: 13px; font-weight: 400;
  margin-top: 8px;
  text-transform: none; letter-spacing: 0;
}
.kpi-num.active      { color: var(--ios-green); }
.kpi-num.announced   { color: var(--ios-orange); }
.kpi-num.legislative { color: var(--ios-indigo); }
.kpi-num.none        { color: var(--ios-gray); }

/* Legend card */
.hero-aside .legend-card {
  background: var(--bg-elev); border: 1px solid var(--line-soft);
  border-radius: var(--rad-lg); padding: 24px; box-shadow: var(--shadow-sm);
}
.legend-card h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 500;
  color: var(--ink); letter-spacing: -.01em;
  text-transform: none;
}
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--ink-soft); }
.legend li { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: start; }
.legend .pill { white-space: nowrap; }

@media (max-width: 880px) {
  .hero { padding: 56px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Pills — Apple system color chips ─── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-text); font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--rad-pill);
  letter-spacing: .02em;
  text-transform: none;
  border: none;
}
.pill-active      { color: #157f3d; background: var(--ios-green-bg); }
.pill-announced   { color: #a35a00; background: var(--ios-orange-bg); }
.pill-legislative { color: #3a37c4; background: var(--ios-indigo-bg); }
.pill-none        { color: #5d5d62; background: var(--ios-gray-bg); }
@media (prefers-color-scheme: dark) {
  .pill-active      { color: #5fdb85; }
  .pill-announced   { color: #ffb74d; }
  .pill-legislative { color: #9d9bff; }
  .pill-none        { color: #c0c0c5; }
}

/* ─── Sections — apple.com block rhythm ─── */
.section { padding: 80px 0; }
.section-dark { background: var(--bg-soft); }
.section-accent { background: var(--bg-soft); }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600; letter-spacing: -.022em; line-height: 1.1;
  margin: 0 0 10px; color: var(--ink);
}
.muted { color: var(--ink-mute); }
.small { font-size: 13px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 32px; max-width: var(--container); margin-left: auto; margin-right: auto; }
.section-head + .table-wrap,
.section-head + .alerts-feed,
.section .mi-grid,
.section .campaign-grid,
.section .campaign-head { max-width: var(--container); margin-left: auto; margin-right: auto; }
.section-head .muted { font-size: 17px; }

/* ─── Filter chips — Apple segmented-control feel ─── */
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  font-family: var(--font-text); font-size: 13px; font-weight: 500;
  background: var(--bg-tile); color: var(--ink); opacity: .85;
  border: 1px solid var(--line-soft);
  border-radius: var(--rad-pill);
  padding: 7px 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: opacity .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.chip:hover { opacity: 1; border-color: var(--line); }
.chip.is-on { background: var(--ink); color: var(--bg); opacity: 1; border-color: var(--ink); }
.chip-count {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-mute);
  background: var(--bg);
  padding: 1px 7px; border-radius: var(--rad-pill); font-weight: 500;
}
.chip.is-on .chip-count { background: rgba(255,255,255,.18); color: rgba(255,255,255,.92); }
@media (prefers-color-scheme: dark) {
  .chip { background: #2a2a2c; color: #f5f5f7; border-color: rgba(255,255,255,.10); }
  .chip:hover { background: #333335; border-color: rgba(255,255,255,.18); }
  .chip.is-on { background: #f5f5f7; color: #1d1d1f; border-color: #f5f5f7; }
  .chip-count { background: rgba(255,255,255,.10); color: #a1a1a6; }
  .chip.is-on .chip-count { background: rgba(29,29,31,.18); color: #1d1d1f; }
}

#state-search {
  font-family: var(--font-text); font-size: 14px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--rad-pill); padding: 7px 14px;
  min-width: 200px; color: var(--ink);
}
#state-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ─── States table ─── */
.table-wrap {
  background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--rad-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.states-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.states-table thead th {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 500; font-size: 12px;
  letter-spacing: 0; color: var(--ink-mute);
  padding: 14px 18px; background: var(--bg-tile); border-bottom: 1px solid var(--line-soft);
  text-transform: none;
}
.states-table tbody tr { border-bottom: 1px solid var(--line-soft); transition: background .12s ease; }
.states-table tbody tr:last-child { border-bottom: none; }
.states-table tbody tr:hover { background: var(--bg-tile); }
.states-table td { padding: 16px 18px; vertical-align: top; }
.col-state  { width: 14%; }
.col-status { width: 11%; }
.col-launch { width: 13%; }
.col-bill   { width: 18%; }
.col-source { width: 14%; }
.col-action { width: 4%; }
.state-name { font-weight: 500; color: var(--ink); }
.state-code {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-quiet);
  margin-left: 6px; padding: 1px 6px; background: var(--bg-tile); border-radius: var(--rad-sm);
}
.launch-date { font-family: var(--font-mono); font-size: 13px; color: var(--ink-mute); }
.note-cell { color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.bill-link, .source-link { font-size: 13px; }
.btn-icon {
  background: var(--bg-tile); border: none; border-radius: var(--rad-pill);
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-mute); font-size: 14px;
}
.btn-icon:hover { color: var(--ink); background: var(--line-soft); }

@media (max-width: 880px) {
  .col-note, .col-source { display: none; }
}
@media (max-width: 600px) {
  .col-bill { display: none; }
  .states-table { font-size: 14px; }
  .states-table td, .states-table th { padding: 12px 12px; }
}

/* ─── Alerts feed ─── */
.alerts-feed {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--rad-lg); overflow: hidden;
}
.alert {
  display: grid; grid-template-columns: 110px 100px 1fr auto; gap: 20px;
  align-items: start; padding: 20px 24px; background: var(--bg-elev);
}
.alert-date { font-family: var(--font-mono); font-size: 13px; color: var(--ink-mute); padding-top: 2px; }
.alert-tag { display: flex; align-items: start; }
.alert-body h4 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 500; letter-spacing: -.012em; color: var(--ink);
}
.alert-body p { margin: 0; color: var(--ink-mute); font-size: 14px; }
.alert-link { font-size: 13px; align-self: center; white-space: nowrap; }

@media (max-width: 720px) {
  .alert { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; }
  .alert-link { align-self: start; }
}

/* ─── Michigan spotlight ─── */
.mi-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.mi-grid h2 { margin: 10px 0 18px; }
.mi-facts { display: flex; flex-direction: column; gap: 20px; margin-top: 32px; }
.mi-fact {
  padding: 24px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--rad-lg);
}
.mi-fact h4 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 500; letter-spacing: -.01em; color: var(--ink);
}
.mi-fact p, .mi-fact li { color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.mi-fact ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }
.mi-fact strong { color: var(--ink); font-weight: 500; }
.mi-fact em { font-style: normal; color: var(--ink-mute); font-family: var(--font-mono); font-size: 12px; }

.bills-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.bills-table th {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 500; font-size: 12px; color: var(--ink-mute);
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
  text-transform: none; letter-spacing: 0;
}
.bills-table td {
  padding: 12px 12px; vertical-align: top; border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft); line-height: 1.5;
}
.bills-table td:first-child {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink); white-space: nowrap; width: 70px;
}
.bills-table tr:last-child td { border-bottom: none; }
.bills-table a { color: var(--accent); text-decoration: none; }
.bills-table a:hover { text-decoration: underline; }

.card {
  background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--rad-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.card h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 500;
  color: var(--ink); letter-spacing: -.01em;
  text-transform: none;
}
.card h3.mt { margin-top: 24px; }
.kv { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; font-size: 14px; }
.kv dt { color: var(--ink-mute); }
.kv dd { margin: 0; color: var(--ink); }

/* Apple-style ghost button */
.btn-ghost {
  display: inline-block; margin-top: 22px;
  font-family: var(--font-text); font-size: 14px; font-weight: 500;
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--rad-pill);
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.btn-ghost:hover { background: var(--accent); color: #fff; text-decoration: none; }

@media (max-width: 880px) { .mi-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ─── Campaign ─── */
.campaign-head { max-width: 64ch; margin-bottom: 32px; }
.campaign-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }

.campaign-form-wrap { display: flex; flex-direction: column; gap: 24px; }

.campaign-form {
  background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--rad-lg);
  padding: 32px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 16px;
}

/* Apple-style step labels */
.step-label {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  color: var(--ink); letter-spacing: -.005em;
  text-transform: none;
  margin-bottom: 14px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-family: var(--font-text); font-size: 12px; font-weight: 600;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.field input, .field select, .field textarea {
  font-family: var(--font-text); font-size: 15px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--rad-md); padding: 10px 14px; color: var(--ink); width: 100%;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 80px; font-size: 15px; line-height: 1.5; }
.field .optional { color: var(--ink-quiet); font-weight: 400; font-size: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.check {
  display: grid; grid-template-columns: auto 1fr; gap: 10px;
  align-items: start; font-size: 14px; color: var(--ink-soft);
  padding: 6px 0; cursor: pointer;
}
.check input { margin-top: 4px; accent-color: var(--accent); }
.check strong { color: var(--ink); font-weight: 500; }
.check.consent { padding-top: 10px; border-top: 1px solid var(--line-soft); margin-top: 6px; }

/* Apple-style primary button — pill-shape, system blue */
.btn-primary {
  font-family: var(--font-text); font-size: 15px; font-weight: 500;
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--rad-pill); padding: 11px 22px; cursor: pointer;
  transition: background .12s ease, transform .08s ease;
  align-self: flex-start;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.form-note { margin: 4px 0 0; font-size: 14px; min-height: 1.2em; }
.form-note.is-ok  { color: var(--ios-green); }
.form-note.is-err { color: #e30b0b; }
.form-note .status-link {
  display: inline-block;
  margin-left: 4px;
  padding: 6px 10px;
  min-height: 32px;
  line-height: 20px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  border-radius: 6px;
  -webkit-tap-highlight-color: rgba(0,102,204,.15);
  touch-action: manipulation;
  cursor: pointer;
}
.form-note .status-link:hover { text-decoration-thickness: 2px; }
.form-note .status-link:active { background: rgba(0,102,204,.10); }
.disclaimer { margin-top: 6px; color: var(--ink-quiet); }

.steps { padding-left: 1.1rem; margin: 0; color: var(--ink-soft); font-size: 14px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.steps strong { color: var(--ink); font-weight: 500; }

/* Legislator drafter (step 2) */
.leg-drafter {
  background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--rad-lg);
  padding: 32px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 16px;
}
.leg-drafter[hidden] { display: none; }
.leg-list { display: grid; gap: 8px; }
.leg-card {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  padding: 14px 18px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--rad-md); cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.leg-card:hover { border-color: var(--line); }
.leg-card input { margin-top: 4px; accent-color: var(--accent); }
.leg-card:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.leg-meta { display: flex; flex-direction: column; gap: 2px; }
.leg-name { font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 8px; font-size: 15px; }
.leg-sub { font-size: 13px; color: var(--ink-mute); }
.leg-contact { font-size: 13px; margin-top: 4px; }
.leg-contact a { color: var(--accent); }
.party-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--ink-quiet); }
.party-dot.dem { background: #0071e3; }
.party-dot.rep { background: #e30b0b; }

.leg-draft { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.draft-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.draft-actions .btn-ghost { margin-top: 0; }

.counters {
  list-style: none; padding: 0; margin: 14px 0 0;
  display: flex; flex-direction: column; gap: 4px;
  max-height: 200px; overflow-y: auto; font-size: 14px;
}
.counter-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); }
.counter-row strong { color: var(--ink); font-family: var(--font-mono); font-weight: 500; }

@media (max-width: 880px) {
  .campaign-grid { grid-template-columns: 1fr; gap: 32px; }
  .field-row { grid-template-columns: 1fr; }
}

/* ─── Footer — apple.com legal footer style ─── */
.footer {
  padding: 32px 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
}
.footer-row { display: flex; gap: 24px; justify-content: space-between; align-items: start; flex-wrap: wrap; max-width: var(--container); margin: 0 auto; }
.footer-brand { font-family: var(--font-display); font-weight: 500; font-size: 13px; margin: 0 0 6px; color: var(--ink); }
.footer .muted, .footer .small { font-size: 12px; line-height: 1.55; color: var(--ink-mute); }
.footer-meta { text-align: right; font-size: 12px; }
@media (max-width: 600px) { .footer-meta { text-align: left; } }

/* ─── Modal ─── */
.state-detail {
  border: none; padding: 0; background: transparent; max-width: 600px; width: calc(100% - 2rem);
  border-radius: var(--rad-xl); box-shadow: var(--shadow-lg);
}
.state-detail::backdrop { background: rgba(0,0,0,.4); backdrop-filter: blur(6px); }
.detail-inner { background: var(--bg-elev); border-radius: var(--rad-xl); padding: 32px; }
.detail-inner h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.detail-inner .detail-status { margin: 0 0 22px; }
.detail-inner dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; font-size: 14px; }
.detail-inner dt { color: var(--ink-mute); }
.detail-inner dd { margin: 0; }
.detail-close {
  position: absolute; top: 18px; right: 18px;
  background: var(--bg-tile); border: none; border-radius: 999px;
  width: 30px; height: 30px; cursor: pointer; font-size: 18px; color: var(--ink-mute);
  display: inline-flex; align-items: center; justify-content: center;
}
.detail-close:hover { color: var(--ink); }

/* ═══════════════════════════════════════════════════════════════════════
   NATIONAL REBUILD — additions
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── U.S. Map ─── */
.section-map { background: var(--bg-elev); }
.map-wrap { position: relative; max-width: var(--container); margin: 0 auto; }
#us-map { width: 100%; height: auto; display: block; }
.map-state {
  fill: var(--ios-gray-bg); stroke: var(--bg-elev); stroke-width: 1;
  transition: filter .12s ease, transform .12s ease;
  cursor: pointer;
  transform-box: fill-box; transform-origin: center;
}
.map-state.map-active      { fill: var(--ios-green); }
.map-state.map-announced   { fill: var(--ios-orange); }
.map-state.map-legislative { fill: var(--ios-indigo); }
.map-state.map-none        { fill: var(--ios-gray); }
.map-state:hover, .map-state:focus { filter: brightness(1.12); outline: none; }
.map-state:focus-visible   { stroke: var(--ink); stroke-width: 1.6; }

.map-tip {
  position: absolute; pointer-events: none; opacity: 0;
  background: var(--ink); color: var(--bg-elev);
  font-size: 13px; line-height: 1.35;
  padding: 8px 12px; border-radius: var(--rad-md);
  box-shadow: var(--shadow-md);
  transition: opacity .12s ease;
  z-index: 10; max-width: 220px;
}
.map-tip strong { font-weight: 500; font-family: var(--font-display); }
.map-tip .muted { color: rgba(255,255,255,.7); }
@media (prefers-color-scheme: dark) {
  .map-tip { background: #f5f5f7; color: #1d1d1f; }
  .map-tip .muted { color: rgba(29,29,31,.7); }
}

.map-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-mute); align-items: center; }
.map-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.sw-active      { background: var(--ios-green); }
.sw-announced   { background: var(--ios-orange); }
.sw-legislative { background: var(--ios-indigo); }
.sw-none        { background: var(--ios-gray); }

/* ─── Rich state-detail modal ─── */
.state-detail {
  border: none; padding: 0; background: transparent;
  max-width: 760px; width: calc(100% - 2rem);
  max-height: 90vh;
  border-radius: var(--rad-xl); box-shadow: var(--shadow-lg);
}
.state-detail::backdrop { background: rgba(0,0,0,.5); backdrop-filter: blur(8px); }
.state-detail .detail-inner {
  background: var(--bg-elev); border-radius: var(--rad-xl);
  padding: 36px 36px 32px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
}
.detail-eyebrow {
  font-size: 12px; font-weight: 500; color: var(--accent);
  margin: 0 0 6px; letter-spacing: .02em;
}
.detail-header { margin-bottom: 24px; }
.detail-header h3 {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 600; letter-spacing: -.025em;
  margin: 0 0 8px; line-height: 1.1; color: var(--ink);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.detail-header .state-code {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-quiet);
  padding: 3px 8px; background: var(--bg-tile); border-radius: var(--rad-sm);
}
.detail-status { margin: 0; }
.detail-kv {
  display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px;
  font-size: 14px; margin: 0 0 24px; padding: 18px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.detail-kv dt { color: var(--ink-mute); }
.detail-kv dd { margin: 0; color: var(--ink); }
.detail-cta { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.detail-cta .btn-primary { margin: 0; }
.detail-close {
  position: absolute; top: 18px; right: 18px;
  background: var(--bg-tile); border: none; border-radius: 999px;
  width: 32px; height: 32px; cursor: pointer; font-size: 18px; color: var(--ink-mute);
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 2;
}
.detail-close:hover { color: var(--ink); }

/* Michigan deep-dive inside modal */
.modal-michigan h4 {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 500; letter-spacing: -.01em;
  margin: 24px 0 10px; color: var(--ink);
}
.modal-michigan p, .modal-michigan li {
  color: var(--ink-soft); font-size: 15px; line-height: 1.5;
}
.modal-michigan ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }
.modal-michigan strong { color: var(--ink); font-weight: 500; }
.modal-michigan em { font-style: normal; color: var(--ink-mute); font-family: var(--font-mono); font-size: 12px; }
.modal-michigan .bills-table { width: 100%; border-collapse: collapse; margin: 12px 0 8px; font-size: 14px; }
.modal-michigan .bills-table th {
  text-align: left; font-family: var(--font-display); font-weight: 500;
  font-size: 12px; color: var(--ink-mute); padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft); text-transform: none;
}
.modal-michigan .bills-table td {
  padding: 12px 12px; vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft); line-height: 1.5;
}
.modal-michigan .bills-table td:first-child {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink);
  white-space: nowrap; width: 80px;
}
.modal-michigan .bills-table tr:last-child td { border-bottom: none; }
.modal-michigan .bills-table a { color: var(--accent); }

/* ─── Two-card campaign layout ─── */
.two-card-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  max-width: var(--container); margin: 0 auto;
}
.action-card {
  background: var(--bg-elev); border: 1px solid var(--line-soft);
  border-radius: var(--rad-lg); padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 20px;
}
.action-card > header h3 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600; letter-spacing: -.022em;
  margin: 6px 0 8px; color: var(--ink);
}
.action-card > header p {
  margin: 0; color: var(--ink-mute); font-size: 15px; line-height: 1.5;
}
.action-eyebrow {
  display: inline-block;
  font-family: var(--font-text); font-size: 12px; font-weight: 500;
  color: var(--accent);
  letter-spacing: .02em;
}
.action-form { display: flex; flex-direction: column; gap: 14px; }
.action-form .btn-primary { align-self: flex-start; }

/* Legislator result block (inside email card) */
.leg-result {
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.leg-result[hidden] { display: none; }
.leg-result h4 {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 500; letter-spacing: -.01em;
  margin: 0; color: var(--ink);
}
.leg-result .draft-heading { margin-top: 4px; }
.leg-result .disclaimer-note { margin: 0; color: var(--ink-quiet); }

/* Counters block (full width below cards) */
.counters-block {
  max-width: var(--container); margin: 40px auto 0;
  background: var(--bg-elev); border: 1px solid var(--line-soft);
  border-radius: var(--rad-lg); padding: 28px;
}
.counters-block h3 {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 500;
  color: var(--ink); margin: 0 0 4px;
  text-transform: none; letter-spacing: -.01em;
}
.counters-block .counters {
  max-height: none; margin-top: 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0 24px;
}
.counters-block .counter-total {
  grid-column: 1 / -1;
  font-weight: 500; padding-bottom: 12px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.counters-block .counter-total strong { font-size: 17px; }

.campaign-head { max-width: 64ch; margin: 0 auto 32px; text-align: left; }

@media (max-width: 880px) {
  .two-card-grid { grid-template-columns: 1fr; }
  .state-detail { width: calc(100% - 1rem); }
  .state-detail .detail-inner { padding: 28px 22px; }
  .detail-header h3 { font-size: 26px; }
}

/* Footnote under table */
.footnote { max-width: var(--container); margin: 24px auto 0; line-height: 1.6; }
.footnote a { color: var(--ink-mute); text-decoration: underline; text-decoration-color: var(--line); }
.footnote a:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ═══════════════════════════════════════════════════════════════════════
   HERO PHONE VISUAL — animated Apple Wallet driver's license
   ═══════════════════════════════════════════════════════════════════════ */

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Phone frame — iPhone-inspired proportions, ~19.5:9 aspect */
.phone-frame {
  width: 300px;
  height: 620px;
  background: linear-gradient(145deg, #1a1a1c 0%, #0a0a0b 100%);
  border-radius: 46px;
  padding: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .06) inset,
    0 30px 60px -20px rgba(0, 0, 0, .45),
    0 12px 24px -8px rgba(0, 0, 0, .3);
  position: relative;
  overflow: hidden;
}
.phone-notch {
  position: absolute;
  top: 20px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 30px;
  background: #000;
  border-radius: 999px;
  z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, #f7f7f9 0%, #e8e8ec 100%);
  border-radius: 38px;
  padding: 60px 20px 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (prefers-color-scheme: dark) {
  .phone-screen { background: linear-gradient(180deg, #1c1c1e 0%, #000 100%); color: #f5f5f7; }
}

.phone-status-bar {
  position: absolute;
  top: 22px; left: 32px; right: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1d1d1f;
  z-index: 4;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
}
@media (prefers-color-scheme: dark) {
  .phone-status-bar { color: #f5f5f7; }
}
.phone-status-bar .status-icons {
  display: inline-flex; align-items: center; gap: 5px;
}

.wallet-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.025em;
  color: #1d1d1f;
  margin: 6px 4px 18px;
}
@media (prefers-color-scheme: dark) { .wallet-title { color: #f5f5f7; } }

/* Card stack — layered cards fanning up */
.card-stack {
  position: relative;
  flex: 1;
  perspective: 1200px;
}

.wallet-card {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 14px;
  height: 168px;
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, .18);
  transition: transform .6s cubic-bezier(.22,1,.36,1);
}

/* Background dummy cards (Discover/AmEx/generic style) */
.wallet-card-back-3 {
  top: 26px;
  background: linear-gradient(135deg, #4a5158 0%, #232427 100%);
  transform: translateY(0) scale(.94);
  opacity: .55;
  z-index: 1;
}
.wallet-card-back-2 {
  top: 14px;
  background: linear-gradient(135deg, #f3903e 0%, #ed6d33 60%, #d64d1f 100%);
  transform: translateY(0) scale(.97);
  z-index: 2;
}
.wallet-card-back-1 {
  top: 3px;
  background: linear-gradient(135deg, #1e64d9 0%, #0a3d9a 100%);
  z-index: 3;
}

/* License card — the star */
.wallet-card-license {
  top: -8px;
  background: linear-gradient(135deg, #0ea2ff 0%, #0071e3 55%, #0055b8 100%);
  color: #fff;
  z-index: 5;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: license-drop 1.4s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes license-drop {
  0%   { transform: translateY(-260px) rotate(-4deg); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: translateY(0) rotate(0);          opacity: 1; }
}

.license-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.license-state-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
}
.license-state-sub {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .12em;
  opacity: .82;
  margin-top: 3px;
}
.license-seal {
  width: 22px; height: 22px;
  color: rgba(255,255,255,.9);
}

.license-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex: 1;
}
.license-photo {
  width: 52px;
  height: 62px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 4px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #fff;
}
.license-photo svg { width: 100%; height: 100%; }

.license-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.license-info-label {
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: .1em;
  opacity: .68;
  text-transform: uppercase;
}
.license-info-value {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  margin-top: 1px;
  line-height: 1.15;
}
.license-info-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Shine animation — slow sweep across the card */
.license-shine {
  position: absolute;
  top: 0; left: -40%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(255,255,255,.22) 50%,
    transparent 70%);
  transform: skewX(-18deg);
  animation: shine-sweep 4.5s ease-in-out 1.6s infinite;
  pointer-events: none;
}
@keyframes shine-sweep {
  0%   { left: -40%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}

.wallet-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
  color: #6e6e73;
  letter-spacing: -.005em;
}
@media (prefers-color-scheme: dark) { .wallet-hint { color: #a1a1a6; } }

/* Reduced motion — kill animations for accessibility */
@media (prefers-reduced-motion: reduce) {
  .wallet-card-license { animation: none; transform: translateY(0); }
  .license-shine { animation: none; opacity: 0; }
}

/* Small screens — enlarge the phone and center it. On mobile the visual is the star. */
@media (max-width: 880px) {
  .hero-visual {
    justify-content: center;
    padding: 16px 0 8px;
    width: 100%;
  }
  /* Scale phone up: use ~85% of viewport width, capped at 340px */
  .phone-frame {
    width: min(340px, 85vw);
    height: calc(min(340px, 85vw) * 2.08);
    border-radius: calc(min(340px, 85vw) * 0.14);
    padding: 7px;
  }
  .phone-notch {
    top: calc(min(340px, 85vw) * 0.07);
    width: calc(min(340px, 85vw) * 0.30);
    height: calc(min(340px, 85vw) * 0.10);
  }
  .phone-screen {
    border-radius: calc(min(340px, 85vw) * 0.115);
    padding: 62px 20px 24px;
  }
  .phone-status-bar {
    top: 22px; left: 30px; right: 30px;
    font-size: 14px;
  }
  .wallet-title { font-size: 28px; margin: 4px 4px 18px; letter-spacing: -.025em; }
  .wallet-card { height: 172px; border-radius: 14px; }
  .wallet-card-license { padding: 14px 18px; }
  .license-state-name { font-size: 15px; }
  .license-state-sub { font-size: 8.5px; }
  .license-info-value { font-size: 11px; letter-spacing: 0; }
  .license-info-label { font-size: 7.5px; }
  .license-photo { width: 52px; height: 62px; }
  .license-body { gap: 14px; }
  .license-info-row-split { gap: 14px; }  /* was 6px — was crushing DOB/EXP together */
  .wallet-hint { font-size: 11px; margin-top: 12px; }
}

/* Very small screens (iPhone SE, small Androids) — still full-featured but slightly smaller */
@media (max-width: 380px) {
  .phone-frame {
    width: min(300px, 88vw);
    height: calc(min(300px, 88vw) * 2.08);
  }
  .wallet-title { font-size: 26px; }
  .license-info-value { font-size: 10.5px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   LEGEND-CARD REPOSITIONED — now sits under the map
   ═══════════════════════════════════════════════════════════════════════ */

.section-map .legend-card {
  max-width: var(--container);
  margin: 32px auto 0;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--rad-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}
.section-map .legend-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 14px;
  text-transform: none;
  letter-spacing: -.01em;
}
.section-map .legend {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px 24px;
  font-size: 14px;
  color: var(--ink-soft);
}
.section-map .legend li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: start;
}
