:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-2: #f2f0e9;
  --ink: #1c2333;
  --ink-muted: #5b6272;
  --border: #e1ddd2;
  --accent: #8a6a30;
  --accent-ink: #6e5527;
  --accent-bg: #f2e9d6;
  --yea: #2f7d5a;
  --yea-bg: #e4f0e9;
  --nay: #b14a3a;
  --nay-bg: #f5e6e2;
  --present: #6e7787;
  --present-bg: #ececea;
  --enacted: #3d6fb4;
  --enacted-bg: #e4edf7;
  --shadow: 0 1px 2px rgba(28,35,51,0.06), 0 10px 28px rgba(28,35,51,0.06);
  --glow: none;
  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11141b;
    --surface: #171b24;
    --surface-2: #1e2330;
    --ink: #e9e6dc;
    --ink-muted: #9ca3b4;
    --border: #2a2f3c;
    --accent: #d9b76a;
    --accent-ink: #e9cd8f;
    --accent-bg: #2c2517;
    --yea: #57c08a;
    --yea-bg: #17281f;
    --nay: #e27b6c;
    --nay-bg: #301f1c;
    --present: #9aa3b5;
    --present-bg: #202432;
    --enacted: #6fa3e0;
    --enacted-bg: #182432;
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 10px 28px rgba(0,0,0,0.35);
    --glow: 0 0 0 1px currentColor, 0 0 10px 1px currentColor;
  }
}
:root[data-theme="dark"] {
  --bg: #11141b;
  --surface: #171b24;
  --surface-2: #1e2330;
  --ink: #e9e6dc;
  --ink-muted: #9ca3b4;
  --border: #2a2f3c;
  --accent: #d9b76a;
  --accent-ink: #e9cd8f;
  --accent-bg: #2c2517;
  --yea: #57c08a;
  --yea-bg: #17281f;
  --nay: #e27b6c;
  --nay-bg: #301f1c;
  --present: #9aa3b5;
  --present-bg: #202432;
  --enacted: #6fa3e0;
  --enacted-bg: #182432;
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 10px 28px rgba(0,0,0,0.35);
  --glow: 0 0 0 1px currentColor, 0 0 10px 1px currentColor;
}
* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); }
.wrap { max-width: 760px; margin: 0 auto; padding: 2.75rem 1.25rem 5rem; }
.wrap-wide { max-width: 1040px; }
header.masthead {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--border);
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}
.top-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.theme-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.theme-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: none;
  background: var(--surface-2);
  color: var(--ink-muted);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border-right: 1px solid var(--border);
}
.theme-btn:last-child { border-right: none; }
.theme-btn:hover { color: var(--ink); }
.theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.theme-btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.how-it-works-btn { text-decoration: none; white-space: nowrap; }
h1.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 2.85rem);
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
.beta-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.24rem 0.55rem;
  border-radius: 100px;
  background: var(--accent-bg);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}
.dek { font-size: 1.02rem; color: var(--ink-muted); max-width: 46ch; margin: 0; }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 0.5rem;
}
.meta-row strong { color: var(--ink); font-weight: 500; }
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2.25rem;
}
.stat { background: var(--surface); padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.stat .n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 1.4rem; font-weight: 600; }
.stat .l { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
#readonly-banner {
  display: none;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}
.bills { display: flex; flex-direction: column; gap: 1rem; }
/* Homepage two-column layout: bill list on the left, the stats dashboard
   sticking to the right. Collapses to a single stacked column (dashboard
   below the bill list) on narrower screens. */
.home-grid { display: grid; grid-template-columns: 1fr 260px; gap: 2.25rem; align-items: start; }
.home-main { min-width: 0; }
.dashboard {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.1rem;
}
.dash-card-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
}
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 0.75rem; }
.dash-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.dash-stat-label { font-size: 0.72rem; color: var(--ink-muted); line-height: 1.25; }
.dash-stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--ink);
}
.dash-stat-value.is-yea { color: var(--yea); }
.dash-stat-value.is-nay { color: var(--nay); }
.dash-cta {
  display: block;
  margin-top: 0.9rem;
  padding: 0.55rem 0.8rem;
  background: var(--enacted);
  color: #fff;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.dash-cta:hover { opacity: 0.9; }
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .dashboard { position: static; }
}
.bill {
  position: relative;
  z-index: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.4rem;
  box-shadow: var(--shadow);
  animation: rise 0.4s ease both;
}
.bill:has(.share-dropdown:not([hidden])) { z-index: 50; }
.support-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.85rem; margin: 0.9rem 0; }
.support-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--yea);
  border-radius: 100px;
  background: var(--yea-bg);
  color: var(--yea);
  cursor: pointer;
}
.support-btn:hover { background: var(--yea); color: #fff; }
.support-btn.is-supporting { background: var(--yea); color: #fff; }
.support-btn.is-supporting:hover { background: var(--nay); border-color: var(--nay); }
.support-count { font-family: var(--font-mono); font-size: 0.84rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.admin-section { margin-top: 2.5rem; }
.admin-section:first-of-type { margin-top: 1.5rem; }
.admin-section-title { font-family: var(--font-display); font-size: 1.25rem; margin: 0 0 0.9rem; }
.issue-form { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; max-width: 640px; }
.issue-form .zip-input { width: 100%; box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { .bill { animation: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.bill-top { display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 0.55rem; }
.code { font-family: var(--font-mono); font-weight: 600; font-size: 0.86rem; color: var(--accent-ink); }
.chamber { font-size: 0.72rem; color: var(--ink-muted); border-left: 1px solid var(--border); padding-left: 0.55rem; }
.badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 100px;
}
.badge--committee { background: var(--surface-2); color: var(--ink-muted); }
.badge--reported { background: var(--accent-bg); color: var(--accent-ink); }
.badge--floor { background: var(--enacted-bg); color: var(--enacted); }
.badge--enacted { background: var(--yea-bg); color: var(--yea); }
.expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: var(--ink-muted);
  text-decoration: none;
  flex-shrink: 0;
}
.expand-btn:hover { background: var(--surface-2); color: var(--ink); }
.expand-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bill-title { font-family: var(--font-body); font-weight: 600; font-size: 1.08rem; line-height: 1.35; margin: 0 0 0.3rem; text-wrap: balance; }
.bill-action { font-size: 0.86rem; color: var(--ink-muted); margin: 0 0 1rem; }
.bill-action time { font-family: var(--font-mono); font-size: 0.8rem; }
.vote-row { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 0.65rem; }
.vote-lock-modal {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5;
  margin-top: 0.5rem;
  max-width: 260px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--nay);
  font-size: 0.82rem;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.vote-lock-modal[hidden] { display: none; }
.board { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.light {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: none;
  background: var(--surface-2);
  color: var(--ink-muted);
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.light:last-child { border-right: none; }
.light:not(.light--locked):hover { background: var(--yea); color: #fff; }
.light:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.light:disabled { cursor: default; opacity: 0.6; }
.light--locked { opacity: 0.55; }
.light--locked:hover, .light--locked:active { opacity: 1; background: var(--nay); color: #fff; }
.light--yea[aria-pressed="true"] { background: var(--yea); color: #fff; box-shadow: var(--glow); }
.light--nay[aria-pressed="true"] { background: var(--nay); color: #fff; box-shadow: var(--glow); }
.light--present[aria-pressed="true"] { background: var(--present); color: #fff; box-shadow: var(--glow); }
.tally { display: flex; flex-direction: column; gap: 0.3rem; min-width: 140px; flex: 1 1 160px; }
.tally-bar { display: flex; height: 7px; width: 100%; border-radius: 100px; overflow: hidden; background: var(--surface-2); }
.seg { height: 100%; transition: width 0.35s ease; }
.seg--yea { background: var(--yea); }
.seg--nay { background: var(--nay); }
.seg--present { background: var(--present); }
.tally-count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-muted); text-align: right; font-variant-numeric: tabular-nums; }
.source-link { font-size: 0.78rem; text-decoration: none; border-bottom: 1px solid transparent; }
.source-link:hover { border-bottom-color: currentColor; }
.card-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; }
.details-toggle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
}
.details-toggle:hover { color: var(--ink); }
.details-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.details-toggle .chev { display: inline-block; transition: transform 0.15s ease; font-size: 0.6rem; }
.details-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* Post-vote nudge: fades Share / Contact your Senators to blue and back,
   three times, to draw the eye toward what to do after voting. */
@keyframes pulse-nudge-blue {
  0%, 100% { color: var(--ink-muted); font-weight: 400; text-shadow: none; }
  50% { color: var(--enacted); font-weight: 700; text-shadow: 0 0 10px var(--enacted); }
}
@keyframes pulse-nudge-green {
  0%, 100% { color: var(--ink-muted); font-weight: 400; text-shadow: none; }
  50% { color: var(--yea); font-weight: 700; text-shadow: 0 0 10px var(--yea); }
}
/* Contact and Share pulse on the same 1.6s cycle but out of phase with each
   other (Share starts half a cycle late), so they don't flash in unison. */
.contact-toggle.pulse-nudge { animation: pulse-nudge-blue 1.6s ease-in-out 3; }
.share-toggle.pulse-nudge { animation: pulse-nudge-green 1.6s ease-in-out 3; animation-delay: 0.8s; }

@keyframes pulse-nudge-red {
  0%, 100% { color: var(--ink-muted); font-weight: 400; text-shadow: none; }
  50% { color: var(--nay); font-weight: 700; text-shadow: 0 0 6px var(--nay), 0 0 16px var(--nay); }
}
/* Hovering the Yea/Nay/Present board nudges attention toward "Bill details"
   and the expand-to-full-page icon in the top-right corner — both a bold,
   glowing red, offset by half a cycle so they alternate rather than flash
   together. Loops for as long as the board is hovered, via :has(), no JS. */
.bill:has(.board:hover) .details-toggle:not(.contact-toggle):not(.share-toggle) {
  animation: pulse-nudge-red 2.4s ease-in-out infinite;
}
.bill:has(.board:hover) .expand-btn {
  animation: pulse-nudge-red 2.4s ease-in-out infinite;
  animation-delay: 1.2s;
}
.details { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.details-grid { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; margin: 0 0 1rem; font-size: 0.86rem; }
.details-grid dt { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); padding-top: 0.15rem; }
.details-grid dd { margin: 0; }
.details-grid a { color: var(--accent-ink); }
.tracker { display: flex; margin: 0 0 1.1rem; }
.tracker-step {
  flex: 1;
  position: relative;
  padding-top: 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-muted);
}
.tracker-step::before {
  content: "";
  position: absolute;
  top: 0.28rem;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  transform: translateX(-50%);
  z-index: 1;
}
.tracker-step::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}
.tracker-step:last-child::after { display: none; }
.tracker-step.is-done, .tracker-step.is-current { color: var(--accent-ink); font-weight: 600; }
.tracker-step.is-done::before, .tracker-step.is-current::before { background: var(--accent); border-color: var(--accent); }
.tracker-step.is-done::after { background: var(--accent); }
.summary-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 0.35rem; }
.summary-label span { text-transform: none; letter-spacing: 0; }
.summary-text { font-size: 0.88rem; line-height: 1.55; margin: 0; }
.summary-empty { font-size: 0.86rem; color: var(--ink-muted); font-style: italic; margin: 0; }

/* Dedicated single-bill page (public/bill.html) — voting on the left,
   description on the right, everything sized up from the homepage-card
   versions of these same classes for readability. */
.bill-page-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: start; }
.bill-page-vote { position: sticky; top: 1.5rem; }
.bill-page-grid .bill-top { margin-bottom: 1rem; }
.bill-page-grid .code { font-size: 1.2rem; }
.bill-page-grid .chamber { font-size: 0.85rem; }
.bill-page-grid .badge { font-size: 0.8rem; padding: 0.3rem 0.7rem; }
.bill-page-grid .bill-title { font-size: 1.85rem; line-height: 1.3; margin-bottom: 0.6rem; }
.bill-page-grid .bill-action { font-size: 1.05rem; margin-bottom: 1.5rem; }
.bill-page-grid .board { border-radius: 10px; }
.bill-page-grid .light { font-size: 1rem; padding: 0.85rem 1.4rem; }
.bill-page-grid .tally-count { font-size: 0.9rem; }
.bill-page-grid .read-confirm-note { font-size: 1rem; }
.bill-page-grid .source-link { font-size: 0.95rem; }
.bill-page-grid .details-grid { font-size: 1.1rem; gap: 0.6rem 1.2rem; }
.bill-page-grid .details-grid dt { font-size: 0.78rem; }
.bill-page-grid .tracker-step { font-size: 0.78rem; padding-top: 1.4rem; }
.bill-page-grid .summary-label { font-size: 0.78rem; }
.bill-page-grid .summary-text { font-size: 1.15rem; line-height: 1.75; }
.bill-page-grid .summary-empty { font-size: 1rem; }
@media (max-width: 800px) {
  .bill-page-grid { grid-template-columns: 1fr; gap: 2rem; }
  .bill-page-vote { position: static; }
}
.vote-lock-hint { font-size: 0.8rem; color: var(--ink-muted); font-style: italic; margin: 0 0 1rem; }
.read-confirm-btn {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--yea);
  border-radius: 8px;
  background: var(--yea-bg);
  color: var(--yea);
  cursor: pointer;
}
.read-confirm-btn:hover { background: var(--yea); color: #fff; }
.read-confirm-btn:focus-visible { outline: 2px solid var(--yea); outline-offset: 2px; }
.read-confirm-note { margin-top: 1rem; font-size: 0.85rem; color: var(--yea); font-weight: 600; }
.card-toggles { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.share-wrap { position: relative; display: inline-flex; }
.share-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.6rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 260px;
  max-width: 80vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
  box-shadow: var(--shadow);
}
.share-dropdown[hidden] { display: none; }
.share-hint {
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-muted);
  margin: 0 0 0.15rem;
  text-transform: none;
  letter-spacing: normal;
}
.share-option { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.share-option-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.share-option-btn:hover { color: var(--ink); }
.share-option-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--ink-muted);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-style: italic;
  line-height: 1;
  cursor: help;
  position: relative;
}
.info-tip:hover, .info-tip:focus-visible {
  color: var(--surface);
  background: var(--ink);
  border-color: var(--ink);
  outline: none;
}
.info-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 135%;
  right: -8px;
  width: 210px;
  max-width: 55vw;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.55rem 0.65rem;
  border-radius: 7px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  pointer-events: none;
  z-index: 30;
}
.info-tip:hover::after, .info-tip:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.auth-label { color: var(--ink-muted); }
.auth-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-bg);
  color: var(--accent-ink);
  cursor: pointer;
}
.auth-btn:hover { background: var(--accent); color: #fff; }
.auth-link {
  font: inherit;
  color: var(--accent-ink);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.contact-panel { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.contact-note { font-size: 0.86rem; color: var(--ink-muted); margin: 0 0 0.75rem; }
.contact-note strong { color: var(--ink); }
.contact-error { font-size: 0.86rem; color: var(--nay); margin: 0 0 0.75rem; }
.contact-hint { font-size: 0.78rem; color: var(--ink-muted); font-style: italic; margin: 0.75rem 0 0; line-height: 1.5; }
.zip-form { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.zip-input {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  width: 8rem;
}
.contact-message {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.86rem;
  line-height: 1.55;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
  box-sizing: border-box;
}
.contact-actions { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.6rem; }
.contact-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-bg);
  color: var(--accent-ink);
  cursor: pointer;
}
.contact-copy:hover { background: var(--accent); color: #fff; }
.copy-feedback { font-size: 0.78rem; color: var(--ink-muted); font-style: italic; }
.senator-links { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.9rem; }
.senator-link { font-size: 0.85rem; color: var(--accent-ink); text-decoration: underline; }

.error-banner {
  display: none;
  background: var(--nay-bg);
  color: var(--nay);
  border: 1px solid var(--nay);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
.loading-note { font-size: 0.88rem; color: var(--ink-muted); font-style: italic; }
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
footer a { color: var(--ink-muted); }

.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-bottom: 1.5rem;
}
.page-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-decoration: none;
}
.page-nav a:hover { color: var(--ink); }
.content { margin-top: 0.5rem; max-width: 720px; margin-left: auto; margin-right: auto; }
.content h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
}
.content h2:first-child { margin-top: 0; }
.content p { font-size: 0.95rem; line-height: 1.65; margin: 0 0 1rem; color: var(--ink); }
.content p.muted { color: var(--ink-muted); font-size: 0.85rem; }
.content ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.content li { font-size: 0.95rem; line-height: 1.6; margin-bottom: 0.5rem; color: var(--ink); }
.content a { color: var(--accent-ink); }
.hero-masthead { border-bottom: none; padding-bottom: 0.5rem; }
.hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem 2rem; flex-wrap: wrap; margin-top: 0.5rem; }
.hero-copy { flex: 1 1 320px; }
.hero-masthead .kicker { font-size: 0.98rem; }
.hero-copy h1.wordmark { font-size: clamp(3.1rem, 8.5vw, 4rem); }
.hero-tagline { font-size: 1.35rem; color: var(--ink-muted); line-height: 1.5; margin: 0 0 0.3rem; }
.hero-tagline-accent { margin-top: 0.6rem; }
.hero-rule { width: 70px; height: 4px; background: var(--accent); border-radius: 2px; margin-top: 1.1rem; }
.hero-illustration { flex: 0 0 auto; width: 150px; max-width: 40vw; color: var(--accent-ink); opacity: 0.9; }
.hero-illustration svg { display: block; width: 100%; height: auto; }

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.3rem;
  text-align: center;
  margin: 3rem 0 2rem;
}
.how-steps { margin-top: 1.5rem; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 1rem; }
.step {
  position: relative;
  background: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 1.35rem 1.5rem;
  text-align: center;
}
.step-num {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 3.85rem;
  line-height: 1;
  color: var(--accent-ink);
  margin-bottom: 0.9rem;
}
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; margin: 0 0 0.5rem; }
.step p { font-size: 1.12rem; line-height: 1.55; color: var(--ink-muted); margin: 0; }

.dream-section {
  text-align: center;
  padding: 2.5rem 0.5rem;
  margin: 1rem 0 2.75rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.dream-section h2 { font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 2.25rem; margin: 0 0 1.25rem; }
.dream-section p { max-width: 62ch; margin: 0 auto; font-size: 0.98rem; line-height: 1.65; color: var(--ink-muted); }

@media (max-width: 760px) {
  .steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-illustration { display: none; }
}

.updated-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ---------------------------------------------------------------------
   Hamburger menu — a small dropdown with links to every page on the site.
   Present in the top nav on every page (index, how-it-works, privacy,
   became-law) alongside whatever page-specific links already live there;
   see menu.js for the toggle behavior.
   --------------------------------------------------------------------- */
.menu { position: relative; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.menu-btn:hover { border-color: var(--accent); }
.menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.menu-icon { position: relative; display: block; width: 16px; height: 2px; background: var(--ink-muted); border-radius: 1px; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: var(--ink-muted); border-radius: 1px; }
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }
.menu-panel {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.4rem;
  z-index: 40;
}
/* Author CSS (the "display: flex" above) always wins over the browser's
   default "[hidden] { display: none }" rule regardless of specificity —
   this is the same bug the share dropdown had, fixed the same way. */
.menu-panel[hidden] { display: none; }
.menu-panel a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  text-decoration: none;
}
.menu-panel a:hover { background: var(--surface-2); color: var(--ink); }

/* ---------------------------------------------------------------------
   Adaptive layout — most of the site is already fluid (flex-wrap, clamp(),
   a single max-width column), so these breakpoints handle the handful of
   spots that need an explicit rule: less padding on small screens, the
   stat strip and vote board reflowing to fit narrow phones, and the top
   bar's button staying comfortably tappable.
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
  .wrap { padding: 1.75rem 1rem 3.5rem; }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 0.75rem 0.6rem; }
  .stat .n { font-size: 1.15rem; }
  .stat .l { font-size: 0.64rem; }
  .vote-row { flex-direction: column; align-items: stretch; }
  .board { justify-content: stretch; }
  .light { flex: 1 1 0; text-align: center; }
  .tally { min-width: 0; }
}
@media (max-width: 420px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip .stat:last-child { grid-column: 1 / -1; }
  .how-it-works-btn { flex: 1 1 100%; text-align: center; }
}

.featured-badge {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.48rem;
  border-radius: 100px;
  background: var(--enacted);
  color: #fff;
}
.bill-page-grid .featured-badge { font-size: 0.68rem; padding: 0.26rem 0.61rem; }

/* Admin page (public/admin.html) */
.admin-lock { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0; }
.admin-lock[hidden] { display: none; }
.admin-panel .auth-link { display: block; margin-bottom: 1rem; }
.feature-toggle-btn {
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent-ink);
  cursor: pointer;
}
.feature-toggle-btn:hover { background: var(--accent); color: #fff; }
.feature-toggle-btn.is-featured { background: var(--accent); color: #fff; }
.feature-toggle-btn.is-featured:hover { background: var(--accent-ink); }
.feature-toggle-btn.is-retire { border-color: var(--nay); background: var(--nay-bg); color: var(--nay); }
.feature-toggle-btn.is-retire:hover { background: var(--nay); color: #fff; }
.feature-toggle-btn.is-retired { border-color: var(--border); background: var(--surface-2); color: var(--ink-muted); }
.feature-toggle-btn.is-retired:hover { background: var(--ink-muted); color: #fff; }
.section-note { font-size: 0.86rem; color: var(--ink-muted); margin: 0 0 0.5rem; }
.template-grid { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.25rem; }
.template-card { width: 220px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.template-card img { width: 100%; height: 116px; object-fit: cover; display: block; background: var(--surface-2); }
.template-card-body { padding: 0.6rem 0.75rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.template-card-name { font-size: 0.86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-delete-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--nay);
  border-radius: 6px;
  background: var(--nay-bg);
  color: var(--nay);
  cursor: pointer;
  flex-shrink: 0;
}
.template-delete-btn:hover { background: var(--nay); color: #fff; }
.issue-template-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }
.issue-template-row label { font-size: 0.78rem; color: var(--ink-muted); white-space: nowrap; }
.issue-row-template-select {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}
