/* Only Tradeoffs. Palette avoids red/blue (party colors) and red/green (good/bad).
   Supports a value: teal. Conflicts with a value: amber. Both: slate.
   Neither color means good or bad: it is relative to the value, not the reader. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1d1f22;
  --muted: #5d636b;
  --line: #e3e0d8;
  --accent: #2f3a45;
  --sup: #0f766e;
  --sup-bg: #e8f4f2;
  --con: #a1580a;
  --con-bg: #fbf1e4;
  --both: #4b5563;
  --both-bg: #eff1f3;
  --mark: #fdf0c2;
  --banner: #fff4d6;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a; --surface: #1d2024; --ink: #e9e7e2; --muted: #a2a8b0; --line: #30343a;
    --accent: #c9d2db; --sup: #5fc4b8; --sup-bg: #17302d; --con: #e3a35a; --con-bg: #33261a;
    --both: #b8c0c9; --both-bg: #262a30; --mark: #4a3f17; --banner: #3a3216;
  }
}
:root[data-theme="dark"] {
  --bg: #15171a; --surface: #1d2024; --ink: #e9e7e2; --muted: #a2a8b0; --line: #30343a;
  --accent: #c9d2db; --sup: #5fc4b8; --sup-bg: #17302d; --con: #e3a35a; --con-bg: #33261a;
  --both: #b8c0c9; --both-bg: #262a30; --mark: #4a3f17; --banner: #3a3216;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.3rem); margin: .4em 0 .3em; }
h2 { font-size: 1.25rem; margin-top: 2.2em; }
h3 { font-size: 1rem; }
code { font-size: .9em; overflow-wrap: anywhere; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tag { display: inline-block; font-size: .75rem; padding: 1px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); vertical-align: middle; }

header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; text-decoration: none; color: var(--ink); }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--ink); }
footer.site { margin-top: 64px; border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: .9rem; }
.banner { background: var(--banner); border-bottom: 1px solid var(--line); padding: 10px 0; font-size: .95rem; }
.crumbs { margin: 20px 0 0; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

.hero { padding: 24px 0 8px; }
.lede { font-size: 1.1rem; max-width: 46em; }
.steps { padding-left: 1.2em; max-width: 46em; }
.steps li { margin: .35em 0; }
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card h3 { margin: 0 0 4px; }
.card a { text-decoration: none; color: var(--ink); }
.card a:hover h3 { text-decoration: underline; }
.code { font-family: var(--font); font-weight: 600; color: var(--muted); margin-right: .3em; }
.note { background: var(--both-bg); border-radius: var(--radius); padding: 10px 14px; }
.prose { max-width: 46em; }
.button, button { font: inherit; cursor: pointer; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; text-decoration: none; display: inline-block; }
.button:hover, button:hover { border-color: var(--muted); }

/* Results */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.r-supports { --c: var(--sup); --cb: var(--sup-bg); }
.r-conflicts { --c: var(--con); --cb: var(--con-bg); }
.r-both { --c: var(--both); --cb: var(--both-bg); }
.dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--c); margin-right: .4em; vertical-align: baseline; flex: none; }
.r-both > .dot { background: linear-gradient(90deg, var(--sup) 50%, var(--con) 50%); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); }
.legend .key { color: var(--ink); font-weight: 600; margin-right: 4px; }
.empty { color: var(--muted); font-style: italic; margin: .2em 0 .8em; }

.map { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; }
.map-row { display: grid; grid-template-columns: 13em 1fr; gap: 6px 14px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.map-row:last-child { border-bottom: 0; }
.map-domain { font-size: .85rem; color: var(--muted); font-weight: 600; }
@media (max-width: 640px) { .map-row { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: baseline; font-size: .9rem; padding: 3px 10px; border-radius: 99px; background: var(--cb); border: 1px solid transparent; color: var(--ink); text-decoration: none; }
.chip:hover { border-color: var(--c); }

.tabs { display: flex; gap: 6px; margin: 28px 0 0; border-bottom: 1px solid var(--line); }
.tabs[hidden] { display: none; }
.tabs button { border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; }
.js .view-title { position: absolute; left: -999px; }
.view[hidden] { display: none; }
.linkish { border: 0; padding: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
h3.domain { margin: 1.4em 0 .4em; font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.value-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 8px; margin: 6px 0; scroll-margin-top: 16px; }
.value-card > summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: baseline; padding: 10px 12px; list-style: none; }
.value-card > summary::-webkit-details-marker { display: none; }
.value-card > summary::before { content: "▸"; color: var(--muted); margin-right: -4px; }
.value-card[open] > summary::before { content: "▾"; }
.c-name { font-weight: 600; flex: 1; }
.c-body { padding: 0 14px 10px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.badge { font-size: .72rem; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); white-space: nowrap; }
.res { font-size: .85rem; font-weight: 600; color: var(--c); white-space: nowrap; }
.evidence { list-style: none; padding: 0; margin: 0; }
.ev { border-top: 1px solid var(--line); padding: 8px 0; }
.ev-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin: 0 0 4px; }
.why { margin: 4px 0 0; }
.quote { display: block; font-family: var(--serif); font-size: .95rem; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; border-left: 2px solid var(--line); padding-left: 10px; }
.quote:hover { color: var(--ink); }
.cl { font-family: var(--font); font-size: .75rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; white-space: nowrap; text-decoration: none; }

.sections { list-style: none; padding: 0; }
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; }
.sec-head { margin: 0 0 8px; }
.sec-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .sec-cols { grid-template-columns: 1fr; } }
.sec-cols > div { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.col-h { width: 100%; margin: 0; font-size: .85rem; font-weight: 600; color: var(--c); }

details.disagree > summary { list-style: none; }
details.disagree > summary h2 { display: inline; }
details.disagree > summary::before { content: "▸ "; color: var(--muted); }
details.disagree[open] > summary::before { content: "▾ "; }
.plain { list-style: none; padding: 0; }
.plain > li { margin: .5em 0; }
.positions { margin: 6px 0 0; padding-left: 1.1em; }
.model { font-weight: 600; }

.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .sides { grid-template-columns: 1fr; } }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 12px; min-width: 0; }
.side h3 { font-family: var(--serif); font-size: 1.15rem; }
.side h4 { margin: 1em 0 .3em; font-size: .85rem; color: var(--muted); }
.raised { font-size: 1.3rem; font-weight: 600; margin: 0; }
.funders td { padding: 4px 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.record { display: block; overflow-x: auto; }
.totals { font-size: 1.05rem; }

.restate li { margin: .5em 0; }
.flags { padding-left: 1.1em; }
.flags p { margin: .2em 0 .8em; }
details.analysis { border-bottom: 1px solid var(--line); padding: 8px 0; }
details summary { cursor: pointer; }
.fulltext { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 18px; font-family: var(--serif); font-size: 1.02rem; }
.fulltext p { scroll-margin-top: 16px; }
.fulltext p:target { background: var(--both-bg); border-radius: 6px; }
mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 2px; }
mark.flash { outline: 2px solid var(--accent); }
.current-law { color: var(--muted); font-family: var(--serif); }

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.models, .cells { display: block; overflow-x: auto; }
.cells tr.st-consensus td:nth-child(2) { font-weight: 600; }
.verify { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 10px; margin-top: 2.2em; }
.verify li { margin: .5em 0; }

.value-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.value-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; scroll-margin-top: 16px; }
.value-list li:target { border-color: var(--accent); }
details.analysis dl { margin: 8px 0 4px; }
details.analysis dt { font-weight: 600; margin-top: 10px; }
details.analysis dd { margin: 2px 0 0; }
.record-list { list-style: none; padding: 0; }
.record-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; margin: 6px 0; }
.record-list p { margin: 2px 0; }
.side-tag { font-size: .75rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; margin-right: 6px; }
.source-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 8px; margin-top: 16px; }
.source-box h3 { margin-bottom: .3em; }
.source-box ul { padding-left: 1.1em; }
