/* MuslimAudits voter guide — no external assets */
:root {
  --bg: #1c1c1c;
  --bg-2: #242424;
  --bg-3: #2e2e2e;
  --black: #000;
  --y: #ffea2d;
  --fg: #fff;
  --muted: #8a8a8a;
  --muted-2: #b4b4b4;
  --line: #3a3a3a;
  --font: "Montserrat", "Segoe UI", Helvetica, Arial, sans-serif;
  --gut: 16px;
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--fg); text-decoration-color: var(--y); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--y); }
:focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; font-weight: 900; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
h3 { font-size: 1.25rem; font-weight: 800; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gut); }
.narrow { max-width: 720px; }
.muted { color: var(--muted-2); }
.fine { font-size: .875rem; color: var(--muted-2); }
.y { color: var(--y); }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.hp { left: -9999px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--y); color: #000; padding: 8px 12px; z-index: 100; font-weight: 800; }
.skip:focus { left: 8px; top: 8px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(28,28,28,.96); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; flex: none; }
.brand b { color: var(--y); font-weight: 900; }
.brand img { border-radius: 50%; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; text-decoration: none; font-weight: 700; font-size: .875rem; padding: 8px 10px; border-radius: 999px; color: var(--muted-2); }
.nav a:hover { color: var(--fg); background: var(--bg-3); }
@media (max-width: 559px) { .brand span { display: none; } }

.sample-banner { background: var(--y); color: #000; text-align: center; font-weight: 800; padding: 6px var(--gut); font-size: .875rem; }

/* yellow dotted motif */
.dotline {
  height: 10px; margin: 0 auto; max-width: 1120px;
  background: radial-gradient(circle, var(--y) 0 2.6px, transparent 3.2px) 0 50% / 16px 10px repeat-x;
  opacity: .9;
}
.dots-corner {
  position: absolute; right: 0; top: 16px; width: 26%; max-width: 110px; height: 150px;
  border-top: 4px dotted var(--y); border-right: 4px dotted var(--y); border-top-right-radius: 28px;
  pointer-events: none; opacity: .85;
}

/* hero */
.hero { position: relative; padding: 40px 0 48px; }
.hero-inner { position: relative; }
.hero-logo { display: block; width: 120px; height: 120px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.1rem, 9vw, 4.2rem); max-width: 14ch; }
.hero h1 .dash { display: none; }
.hero h1 .block { display: block; }
.lede { font-size: 1.125rem; font-weight: 700; color: var(--muted-2); }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 460px; margin-top: 24px; }
.cd-cell { background: var(--black); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 4px; text-align: center; }
.cd-num { display: block; font-size: clamp(1.7rem, 8vw, 2.6rem); font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.cd-lbl { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2); margin-top: 6px; font-weight: 700; }
.cd-note { margin-top: 10px; color: var(--muted-2); font-weight: 600; }
.hero-deadline { font-weight: 800; color: var(--y); margin-top: 16px; }
@media (min-width: 900px) {
  .hero { padding: 56px 0 64px; overflow: hidden; }
  .hero-logo { width: 136px; height: 136px; }
  .hero h1 { font-size: 3.6rem; }
  /* logo motif: dots run in from the right, turn down, then turn left */
  .dots-corner {
    right: -40px; top: 40px; width: 220px; max-width: none; height: 230px;
    border: 0; border-top: 5px dotted var(--y); border-left: 5px dotted var(--y); border-radius: 44px 0 0 0;
  }
  .dots-corner::after {
    content: ""; position: absolute; right: 100%; top: 100%; width: 240px; height: 170px;
    border-right: 5px dotted var(--y); border-bottom: 5px dotted var(--y); border-bottom-right-radius: 44px;
  }
}

/* buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  min-height: 48px; padding: 12px 20px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--y); color: #000; }
.btn-primary:hover { color: #000; transform: translateY(-1px); background: #fff27a; }
.btn-outline { border-color: var(--fg); color: var(--fg); background: transparent; }
.btn-outline:hover { border-color: var(--y); color: var(--y); }
.btn-xl { font-size: 1.05rem; padding: 14px 24px; min-height: 56px; flex: 1 1 240px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
@media (min-width: 700px) { .btn-xl { flex: 0 0 auto; } }

/* sections */
.section { padding: 48px 0; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 800; color: var(--y); margin-bottom: .5em; }
.sub { margin-top: 48px; }

/* form */
[hidden] { display: none !important; }
.form { display: grid; gap: 14px; margin-top: 20px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .95rem; }
.opt { color: var(--muted); font-weight: 600; }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
input[type=text], input:not([type]), input[type=email], input[type=tel], input[type=search] {
  width: 100%; font: inherit; font-size: 1rem; color: var(--fg); background: var(--black);
  border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
input:focus { border-color: var(--y); outline: none; }
input[aria-invalid=true] { border-color: #ff8a7a; }
.radios { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.radios legend { font-weight: 700; margin-bottom: 6px; padding: 0; font-size: .95rem; }
.form .radios label, .form .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
input[type=radio], input[type=checkbox] { accent-color: var(--y); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.check span { font-weight: 600; color: var(--muted-2); }
.form-msg { margin: 0; padding: 10px 14px; border-radius: 10px; background: #3a1f1c; color: #ffd2cb; font-weight: 700; }
.skip-form { font-size: .875rem; color: var(--muted-2); margin: 0; text-align: center; }
.done { margin-top: 20px; padding: 20px; border: 2px solid var(--y); border-radius: var(--radius); background: var(--bg-2); }
.done:focus { outline: none; }

/* link list */
.link-stack { display: grid; gap: 10px; margin: 16px 0; }
.link-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line);
  text-decoration: none; font-weight: 800;
}
.link-card small { display: block; font-weight: 600; color: var(--muted-2); }
.link-card::after { content: "↗"; color: var(--y); font-weight: 900; }
.link-card:hover { border-color: var(--y); color: var(--fg); }

/* search + reps */
.search input { font-size: 1.1rem; min-height: 56px; border-radius: 999px; padding: 12px 22px; }
.rep-results { display: grid; gap: 14px; margin: 18px 0; }
@media (min-width: 800px) { .rep-results { grid-template-columns: 1fr 1fr; } }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card h3 { margin-bottom: 2px; }
.card .meta { color: var(--muted-2); font-size: .875rem; margin-bottom: 12px; }
.rep-row { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); }
.rep-row dt { color: var(--muted-2); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.rep-row dd { margin: 0; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.rep-row dd div + div { margin-top: 4px; }
.dnum { color: var(--y); font-weight: 900; margin-right: 6px; }
.warn { font-size: .85rem; color: var(--y); font-weight: 700; margin: 8px 0 0; }
.empty { padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted-2); }

/* party chip — neutral, small */
.party { display: inline-block; vertical-align: middle; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--muted); color: var(--muted-2); margin-left: 6px; white-space: nowrap; }
.party[data-p=D] { border-color: #7d9fc9; color: #b9cde6; }
.party[data-p=R] { border-color: #c98c7d; color: #e6c3b9; }
.party[data-p=WF] { border-color: #a99ac9; color: #d2c9e6; }
.party[data-p=C] { border-color: #b8ad7a; color: #e0d9b4; }
.tag { display: inline-block; white-space: nowrap; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: var(--y); color: #000; margin-left: 6px; vertical-align: middle; }
.tag-quiet { background: var(--bg-3); color: var(--muted-2); }

/* legislature board */
.leg-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 20px; }
.leg-group { margin-bottom: 28px; }
.leg-group h4 { font-size: 1rem; font-weight: 900; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.leg-group h4::after { content: ""; flex: 1; height: 6px; background: radial-gradient(circle, var(--y) 0 2px, transparent 2.6px) 0 50% / 12px 6px repeat-x; opacity: .6; }
.leg-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.leg-tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; min-width: 0; }
.leg-tile.is-mine { border-color: var(--y); box-shadow: 0 0 0 1px var(--y) inset; }
.leg-no { grid-row: span 3; font-size: 2.2rem; font-weight: 900; line-height: 1; color: var(--y); min-width: 1.6em; }
.leg-name { font-weight: 800; overflow-wrap: normal; }
.leg-tile details { grid-column: 2; font-size: .85rem; color: var(--muted-2); }
.leg-tile summary { cursor: pointer; font-weight: 700; }
.leg-tile a { font-size: .8rem; grid-column: 2; }

/* officials */
.off-group { margin-bottom: 32px; }
.off-group h3 { color: var(--muted-2); font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; }
.off-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.off-card .office { color: var(--y); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.off-card .name { font-size: 1.25rem; font-weight: 900; margin-bottom: 6px; overflow-wrap: anywhere; }
.off-card .notes { font-size: .875rem; color: var(--muted-2); margin: 8px 0 0; }
.links-inline { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; margin-top: 10px; }

/* ballot */
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip-btn { font: inherit; font-weight: 800; font-size: .9rem; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; min-height: 40px; }
.chip-btn.is-on { background: var(--y); color: #000; border-color: var(--y); }
.race-group { margin-top: 28px; }
.race-group > h3 { color: var(--muted-2); font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; }
.race-list { display: grid; gap: 12px; }
@media (min-width: 800px) { .race-list { grid-template-columns: 1fr 1fr; } }
.race h4 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 900; }
.cand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 10px 0; border-top: 1px dashed var(--line); }
.cand-name { font-weight: 800; margin-right: 4px; overflow-wrap: anywhere; }
.lines { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.line-chip { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--bg-3); color: var(--muted-2); }

/* dates */
.dates { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 0; }
.dates li { display: grid; grid-template-columns: 6.2em 1fr; gap: 14px; padding: 14px 0; border-top: 1px dashed var(--line); align-items: baseline; }
.dates li.past { opacity: .5; }
.dates .when { font-weight: 900; color: var(--y); font-variant-numeric: tabular-nums; }
.dates .what { font-weight: 700; }
.dates .what small { display: block; color: var(--muted-2); font-weight: 600; }
.sites { display: grid; gap: 8px; margin-top: 8px; font-size: .9rem; }
.sites li { color: var(--muted-2); }
.sites b { color: var(--fg); }

/* footer */
.footer { padding: 0 0 40px; margin-top: 24px; }
.footer .dotline { margin-bottom: 28px; }
.footer p { margin-bottom: .4em; }

.notfound { padding: 80px var(--gut); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* pledge counter + list */
.pledge-bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; margin: 0 0 28px; padding: 12px 16px; border: 2px solid var(--y); border-radius: var(--radius); background: var(--black); color: var(--fg); text-decoration: none; }
.pledge-bar:hover { background: var(--bg-2); }
.pledge-num { font-size: clamp(1.6rem, 7vw, 2.4rem); font-weight: 900; color: var(--y); font-variant-numeric: tabular-nums; line-height: 1; min-width: 2ch; }
.pledge-txt { font-weight: 700; line-height: 1.3; }
.pledge-txt strong { color: var(--y); }
.pledge-list { counter-reset: p; list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.pledge-list li { counter-increment: p; position: relative; padding: 12px 14px 12px 52px; background: var(--bg-2); border-radius: var(--radius); line-height: 1.45; }
.pledge-list li::before { content: counter(p); position: absolute; left: 14px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--y); color: #000; font-weight: 900; font-size: .9rem; display: grid; place-items: center; }
.pledge-list strong { color: var(--y); }
