:root {
  --bg: #f8fafc; --surface: #ffffff; --text: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --support: #15803d; --uncommitted: #1d4ed8; --unclear: #7c3aed; --none: #94a3b8;
  --vanhollen: #b45309; --oppose: #c2410c;
  --call: #1d4ed8; --call-text: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120; --surface: #111a2e; --text: #e2e8f0; --muted: #94a3b8; --line: #1e293b;
    --support: #4ade80; --uncommitted: #60a5fa; --unclear: #a78bfa; --none: #64748b;
    --vanhollen: #fbbf24; --oppose: #fb923c;
    --call: #3b82f6; --call-text: #ffffff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
.top, main, .foot { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.top { padding-top: calc(20px + env(safe-area-inset-top)); }
h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.tag { margin: 4px 0 16px; color: var(--muted); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--line); padding: 4px; border-radius: 12px; }
.tabs button {
  font: inherit; font-weight: 600; border: 0; border-radius: 9px; padding: 10px 8px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }

/* status colors, shared */
.support { --c: var(--support); } .uncommitted { --c: var(--uncommitted); } .unclear { --c: var(--unclear); }
.none { --c: var(--none); } .vanhollen { --c: var(--vanhollen); } .oppose { --c: var(--oppose); }

.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 16px 0; }
.summary h2 { margin: 0 0 12px; font-size: 18px; }
.bar { position: relative; display: flex; height: 14px; border-radius: 7px; background: var(--line); }
.bar .seg { min-width: 0; background: var(--c); }
.bar .seg:first-child { border-radius: 7px 0 0 7px; }
.bar .seg:nth-last-child(2) { border-radius: 0 7px 7px 0; }
.bar .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text); }
.need { margin: 8px 0 12px; font-size: 14px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.stat { border-left: 3px solid var(--c); padding: 1px 0 1px 8px; }
.stat b { display: block; font-size: 22px; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted); }
.note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

.controls { display: grid; gap: 10px; margin-bottom: 12px; }
#q {
  font: inherit; width: 100%; min-height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.filters { display: flex; gap: 8px; }
.chip { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.script { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 4px; }
.script summary { font-weight: 600; cursor: pointer; }
.script p { margin: 10px 0 0; }
.script .hint { font-size: 14px; color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.group { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 6px; color: var(--c); }
.card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.who { flex: 1; min-width: 0; }
.line { display: flex; gap: 8px; align-items: baseline; }
.st { font-size: 13px; font-weight: 700; color: var(--muted); min-width: 2.2em; white-space: nowrap; }
.name { font-weight: 600; overflow-wrap: anywhere; }
.sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.call {
  flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 72px; min-height: 44px;
  background: var(--call); color: var(--call-text); text-decoration: none; font-weight: 700; border-radius: 10px; padding: 0 16px;
}
.call:active { transform: scale(.97); }
.quote { margin-top: 8px; font-size: 14px; }
.quote summary { color: var(--muted); cursor: pointer; }
.quote p { margin: 6px 0 0; white-space: pre-line; }
.empty { color: var(--muted); }

.foot { padding-top: 16px; padding-bottom: 32px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 24px; }
.foot a { color: inherit; }
.share { font: inherit; font-size: 15px; font-weight: 600; width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--call); outline-offset: 2px; }

/* Done tracking: circle to the right of Call, label beneath */
.check {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 44px; min-height: 44px; margin: 0 -4px 0 -4px; padding: 0 2px; border: 0; background: none;
  font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.check svg {
  width: 30px; height: 30px; padding: 5px; box-sizing: border-box; border-radius: 50%;
  border: 2px solid var(--muted); color: transparent; transition: background .15s, border-color .15s, color .15s;
}
.check-label { line-height: 1; }
@media (hover: hover) {
  .check:hover svg { background: var(--support); border-color: var(--support); color: #fff; }
  .check:hover { color: var(--support); }
}
.check[aria-pressed="true"] { color: var(--support); }
.check[aria-pressed="true"] svg { background: var(--support); border-color: var(--support); color: #fff; }
.check.nudge svg { border-color: var(--call); animation: nudge 1.2s ease-in-out 3; }
@keyframes nudge { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--call) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { .check.nudge svg { animation: none; } }
.card.is-done { opacity: .6; }
.card.is-done .name { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.card.is-done .call { background: var(--line); color: var(--text); }
.group.donegroup { color: var(--support); }
.progress { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 12px 0 0; }
.progress-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; }
.progress-track { height: 6px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
#progress-fill { display: block; height: 100%; width: 0; background: var(--support); transition: width .2s; }
.link { font: inherit; font-size: 13px; font-weight: 400; color: var(--muted); background: none; border: 0; padding: 8px 0 8px 12px; text-decoration: underline; cursor: pointer; }
.script .cite { font-size: 12px; color: var(--muted); }
.script .cite a { color: inherit; }
