:root {
  --bg: #f5f2ea; --card: #fffdf8; --ink: #1b1a17; --mute: #676258; --line: #d9d3c4;
  --with: #0b6b59; --with-bg: #dcefe9; --against: #a8481a; --against-bg: #f6e3d6;
  --flag: #f1d36b; --flag-ink: #2a2300;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311; --card: #1e1c19; --ink: #f1ede4; --mute: #a7a194; --line: #3a362f;
    --with: #56c9ae; --with-bg: #12322b; --against: #ee9160; --against-bg: #3a2216;
    --flag: #d8b94a; --flag-ink: #1c1700;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: inherit; text-underline-offset: 2px; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--with); outline-offset: 2px; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; max-width: 1040px; margin: 0 auto; }
.brand { font: 700 15px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.loc { background: none; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; color: var(--mute); }
main { max-width: 640px; margin: 0 auto; padding: 0 16px 48px; }
main:has(.mcards) { max-width: 1040px; }
.foot { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.loading, .hint { color: var(--mute); }
.hint { font-size: 14.5px; }
.fine { font-size: 13px; color: var(--mute); }
.kicker { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; color: inherit; font-size: inherit; }

.tag { display: inline-block; font: 700 11px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; padding: 4px 6px; border-radius: 3px; vertical-align: 1px; white-space: nowrap; }
/* Three kinds of evidence, three treatments: solid for the record, outlined for words, dashed for a dodge. */
.tag-recorded { background: var(--ink); color: var(--bg); }
.tag-said { border: 1.5px solid var(--ink); padding: 2.5px 5px; }
.tag-dodged { border: 1.5px dashed var(--ink); padding: 2.5px 5px; }
.tag-split { background: var(--flag); color: var(--flag-ink); }

/* home */
.hero { padding: 18px 0 8px; }
.hero h1 { font: 700 clamp(34px, 9vw, 52px)/1.05 var(--serif); letter-spacing: -.01em; }
.hero h1 em { font-style: italic; }
.hero p { margin-top: 12px; font-size: 17px; color: var(--mute); max-width: 34em; }
.step { margin-top: 30px; }
.step h2 { font: 700 19px/1.2 var(--sans); display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 14px; }
.place { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.place label { font-size: 13px; color: var(--mute); display: grid; gap: 4px; min-width: 0; }
select, input[type=search] { width: 100%; padding: 12px 10px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--card); font-size: 16px; min-width: 0; }
select:disabled { opacity: .75; }
.mine ul { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.mine li { padding: 9px 12px; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); }
.mine li:first-child { border-top: 0; }
.mine li span { color: var(--mute); font-size: 14px; white-space: nowrap; }
.mine + .fine, .mine .fine { margin-top: 6px; }
.issues { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.issue { text-align: left; background: var(--card); border: 1.5px solid var(--ink); border-radius: 8px; padding: 11px 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 76px; line-height: 1.25; font-weight: 600; }
.issue small { font-weight: 400; color: var(--mute); font-size: 13px; }
.issue:disabled { border-color: var(--line); color: var(--mute); cursor: not-allowed; }
.issue:not(:disabled):hover { background: var(--ink); color: var(--bg); }
.issue:not(:disabled):hover small { color: inherit; opacity: .75; }
.card-link { width: 100%; text-align: left; background: none; border: 1.5px dashed var(--ink); border-radius: 8px; padding: 14px; display: grid; gap: 6px; justify-items: start; }
.card-link strong { font: 700 20px/1.2 var(--serif); }
.card-link span:last-child { color: var(--mute); font-size: 14.5px; }

/* the stack */
.stack { display: flex; flex-direction: column; min-height: calc(100dvh - 60px); }
.stack-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-size: 14px; color: var(--mute); }
.stack-top .issue-name { font-weight: 600; color: var(--ink); text-align: center; }
.stack-top .count { text-align: right; }
.stack-top .link { text-align: left; text-decoration: none; }
.dots { display: flex; gap: 4px; margin: 10px 0 14px; }
.dots i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.dots i.done { background: var(--ink); }
.dots i.now { background: var(--ink); opacity: .45; }
.ballot { background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 18px 18px 14px; box-shadow: 5px 5px 0 var(--line); transition: transform .14s ease, opacity .14s ease; }
.ballot.leave-y { transform: translateX(40px) rotate(2deg); opacity: 0; }
.ballot.leave-n { transform: translateX(-40px) rotate(-2deg); opacity: 0; }
.ballot.leave-s { transform: translateY(-20px); opacity: 0; }
.ballot-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--mute); }
.lead { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--mute); }
.q { margin-top: 6px; font: 600 clamp(22px, 6.2vw, 30px)/1.22 var(--serif); overflow-wrap: anywhere; }
.q.clamp { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.note { margin-top: 14px; padding: 9px 11px; border-left: 3px solid var(--line); font-size: 14.5px; color: var(--mute); }
.ballot .fine { margin-top: 14px; }
.answer { position: sticky; bottom: 0; margin-top: auto; padding: 16px 0 14px; background: linear-gradient(transparent, var(--bg) 18px); text-align: center; }
.ask { font-weight: 600; margin-bottom: 10px; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big { padding: 18px 10px; border-radius: 12px; border: 2px solid var(--ink); font: 700 22px/1 var(--sans); }
.big.yes { background: var(--ink); color: var(--bg); }
.big.no { background: var(--card); color: var(--ink); }
.big:active { transform: translateY(2px); }
.skip { margin-top: 10px; width: 100%; background: none; border: 1.5px dashed var(--mute); border-radius: 10px; padding: 11px; color: var(--mute); }
.done-link { display: block; margin: 12px auto 0; font-size: 14px; color: var(--mute); }

/* scorecard */
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--flag); color: var(--flag-ink); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; font-size: 14.5px; }
.banner .btn { background: var(--flag-ink); color: var(--flag); border-color: var(--flag-ink); }
.score-head { padding: 10px 0 4px; }
.score-head h1 { font: 700 clamp(30px, 8vw, 44px)/1.08 var(--serif); margin: 4px 0 8px; }
.score-head .link { color: var(--mute); font-size: 14px; display: inline-block; margin-bottom: 10px; }
.mcards { display: grid; gap: 12px; margin-top: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.mcard { background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 14px 16px; }
.mcard h3 { font: 700 18px/1.2 var(--sans); }
.mcard header p { color: var(--mute); font-size: 14px; }
.score { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.score b { font: 700 40px/1 var(--serif); letter-spacing: -.01em; }
.score span { color: var(--mute); }
.bar { display: flex; gap: 2px; height: 12px; margin-top: 10px; border-radius: 3px; overflow: hidden; }
.bar.sm { height: 6px; margin-top: 6px; grid-column: 1 / -1; }
.bar i { min-width: 3px; }
.bar .w { background: var(--with); }
.bar .a { background: var(--against); }
.bar .y { background: var(--ink); }
.bar .n { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink); }
.bar .p { background: var(--mute); }
.bar .m, .legend .m::before { background: repeating-linear-gradient(135deg, var(--mute) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--mute); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13.5px; color: var(--mute); }
.legend li::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.legend .w::before { background: var(--with); }
.legend .a::before { background: var(--against); }
.legend .p::before { background: var(--mute); }
.legend b { color: var(--ink); }
.contact { margin-top: 10px; font-size: 13.5px; color: var(--mute); }
.splitline { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
.mcards ~ .hint { margin-top: 10px; }

section.share, section.votes, section.words, .sgroup { margin-top: 34px; }
section h2 { font: 700 20px/1.25 var(--sans); margin-bottom: 10px; }
section h2 small { color: var(--mute); font-weight: 400; }
.share pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.5 var(--sans); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
#share-url { color: var(--mute); font-size: 13px; }
.row { display: flex; gap: 8px; margin-top: 10px; }
.row.wrap { flex-wrap: wrap; }
.btn { padding: 11px 16px; border-radius: 8px; border: 1.5px solid var(--ink); background: var(--card); font-weight: 600; }
.btn.primary { background: var(--ink); color: var(--bg); }
.share .fine { margin-top: 8px; }
.share, .votes > h2, .words, .splitline, .mcards ~ .hint { max-width: 720px; }

.vlist { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); align-items: start; }
.vrow { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-width: 0; }
.vrow.is-split { border-color: var(--ink); }
.vmeta { font-size: 13px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.vlead { margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--mute); }
.vq { font: 600 18px/1.3 var(--serif); margin-top: 2px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.vres { margin-top: 6px; font-size: 13.5px; color: var(--mute); }
.casts { margin-top: 12px; display: grid; gap: 6px; }
.cast { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 7px 10px; border-radius: 7px; border: 1px solid var(--line); font-size: 15px; }
.cast em { grid-column: 1 / -1; font-style: normal; font-size: 12.5px; font-weight: 600; text-align: right; margin-top: -4px; }
.cast.with { background: var(--with-bg); border-color: transparent; }
.cast.with em { color: var(--with); }
.cast.against { background: var(--against-bg); border-color: transparent; }
.cast.against em { color: var(--against); }
.cast.miss { border-style: dashed; border-color: var(--mute); }
.cast.you { border-color: var(--ink); font-weight: 600; }
.tog { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 7px; overflow: hidden; }
.tog button { background: none; border: 0; padding: 6px 16px; font-weight: 600; }
.tog button + button { border-left: 1.5px solid var(--ink); }
.tog button.on { background: var(--ink); color: var(--bg); }
.vstmts { margin-top: 12px; }
.vstmts summary, .ev-list summary { cursor: pointer; }
.vstmts summary { font-size: 14px; font-weight: 600; }

.stmt { margin-top: 10px; padding: 12px 14px; border-radius: 8px; background: var(--card); border: 1.5px solid var(--ink); }
.stmt.dodged { border-style: dashed; }
.stmt.none { border: 1px solid var(--line); color: var(--mute); }
.vstmts .stmt { background: var(--bg); }
.stmt-head { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.stmt p { margin-top: 6px; font-size: 15px; }
.stmt blockquote { margin: 8px 0 0; padding-left: 10px; border-left: 3px solid var(--ink); font: italic 16px/1.4 var(--serif); }
.stmt .src { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--mute); overflow-wrap: anywhere; }
.rec-line { font-size: 14px !important; }
.secret-box { margin-top: 16px; padding: 14px; border: 1.5px dashed var(--ink); border-radius: 10px; }
.secret-box .btn { margin-top: 12px; }
.secret-box .hint { margin-top: 6px; }
.sgroup.yours { padding: 14px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--card); }
.sgroup.yours .stmt { background: var(--bg); }

/* everyone */
.ev-ctrl { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin: 12px 0; position: sticky; top: 0; background: var(--bg); padding: 8px 0; z-index: 2; }
.ev-ctrl input { grid-column: 1 / -1; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; }
.seg button { background: var(--card); border: 0; padding: 10px 14px; font-weight: 600; }
.seg button.on { background: var(--ink); color: var(--bg); }
.ev-list li details { border-bottom: 1px solid var(--line); }
.ev-list summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 10px 2px; align-items: baseline; }
.ev-list summary::-webkit-details-marker { display: none; }
.ev-name { font-weight: 600; }
.ev-name small, .ev-detail small { color: var(--mute); font-weight: 400; }
.ev-sum { font-size: 14px; color: var(--mute); white-space: nowrap; }
.ev-sum b { color: var(--ink); }
.ev-detail { padding: 0 2px 12px; }
.ev-detail li { font-size: 14px; padding: 6px 8px; border-left: 3px solid var(--line); margin-top: 4px; }
.ev-detail li.with { border-color: var(--with); }
.ev-detail li.against { border-color: var(--against); }
.ev-detail li.miss { border-left-style: dashed; border-color: var(--mute); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 14px; z-index: 10; max-width: 90vw; }
[hidden] { display: none !important; }

@media (min-width: 720px) {
  .issues { grid-template-columns: repeat(3, 1fr); }
  .stack { min-height: 0; }
  .answer { position: static; margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { .ballot { transition: none; } }
.issues:not(.open) .extra { display: none; }
.issues.open .all-issues { display: none; }
.all-issues { grid-column: 1 / -1; }
