/* Your Vote Counts, ledger page.
   Layout: a tally board on the campaign sign, then two ballot columns, red left and blue right. */
body.page{min-height:100%}
main.page{padding-block:clamp(26px,3.6vw,44px) 64px}
main.page .wrap{display:flex;flex-direction:column;gap:clamp(28px,3.4vw,44px)}
.red-t{color:var(--red)}
.blue-t{color:var(--blue)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}

/* page head */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap}
.page-head h1{font-weight:900;font-size:clamp(28px,3.4vw,44px);letter-spacing:.05em;text-transform:uppercase;color:var(--navy);line-height:1;margin-top:6px}
.page-head p{max-width:70ch;font-weight:600;font-size:15px;color:var(--muted);margin-top:8px}

/* tally board */
.sign.board{padding:clamp(40px,5vw,56px) clamp(16px,3vw,48px) clamp(36px,4.4vw,52px);display:flex;flex-direction:column;align-items:stretch;gap:clamp(22px,3vw,36px)}
.board-head{text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}
.board-head h2{font-weight:900;font-size:clamp(30px,5vw,64px);letter-spacing:.06em;text-transform:uppercase;color:var(--navy);line-height:1}
.board-head h2 em{font-style:normal;color:var(--red)}
.board-head .lead{max-width:64ch;font-weight:600;font-size:clamp(13px,1.3vw,17px);color:var(--ink);line-height:1.45}

.tally{display:grid;grid-template-columns:1fr minmax(240px,.8fr) 1fr;gap:clamp(16px,3vw,48px);align-items:start;width:100%}
.tside{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;min-width:0}
.tside .pin{width:clamp(96px,10vw,136px);aspect-ratio:700/720;height:auto}
.tside h3{font-weight:900;font-size:clamp(20px,2.4vw,32px);letter-spacing:.08em;text-transform:uppercase;line-height:1;margin-top:4px}
.tside.red h3{color:var(--red)}
.tside.blue h3{color:var(--blue)}
.tside .votes{font-weight:900;font-size:clamp(52px,7vw,104px);line-height:.95;letter-spacing:-.02em;color:var(--ink)}
.tside.red .votes{color:var(--red)}
.tside.blue .votes{color:var(--blue)}
.tside .vlabel{font-size:11px;font-weight:800;letter-spacing:.24em;text-transform:uppercase;color:var(--muted)}
.tside .vmeta{margin-top:6px;font-weight:700;font-size:13px;color:var(--muted)}
.tside .vmeta b{color:var(--ink);font-weight:800}

.tcenter{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding-top:clamp(8px,4vw,56px);min-width:0}
.lead-badge{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border-radius:999px;color:var(--on-color);font-weight:900;font-size:12px;letter-spacing:.16em;text-transform:uppercase;background:var(--navy)}
.lead-badge.red{background:var(--red)}
.lead-badge.blue{background:var(--blue)}
.lead-badge i{width:8px;height:8px;border-radius:50%;background:#fff;display:inline-block}
.tcenter .margin{font-weight:900;font-size:clamp(22px,2.4vw,32px);color:var(--navy);line-height:1}
.tcenter .margin small{display:block;font-size:11px;font-weight:800;letter-spacing:.2em;text-transform:uppercase;color:var(--muted);margin-top:4px}
.tcenter .bar{max-width:420px;height:18px}
.tcenter .bar-legend{max-width:420px}
.tcenter .total{font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.tcenter .total b{color:var(--ink);font-size:14px}
.tally .flash{animation:flash .9s ease}
@keyframes flash{0%{transform:scale(1)}30%{transform:scale(1.06)}100%{transform:scale(1)}}

/* stats strip */
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:2px solid var(--navy);border-radius:4px;overflow:hidden}
.stat{padding:18px 22px;display:flex;flex-direction:column;gap:4px;min-width:0;border-right:2px solid var(--navy)}
.stat:last-child{border-right:0}
.stat .v{font-weight:900;font-size:clamp(22px,2.2vw,30px);line-height:1;color:var(--navy);letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat .s{font-size:12px;font-weight:700;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* feeds */
.feeds{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(18px,2.6vw,36px);align-items:start}
.feed{border:2px solid var(--line);border-radius:4px;overflow:hidden;min-width:0}
.feed.red{border-color:var(--red)}
.feed.blue{border-color:var(--blue)}
.feed-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;color:var(--on-color)}
.feed.red .feed-head{background:var(--red)}
.feed.blue .feed-head{background:var(--blue)}
.feed-head h3{font-weight:900;font-size:15px;letter-spacing:.14em;text-transform:uppercase;line-height:1;display:flex;align-items:center;gap:10px}
.feed-head h3 svg{width:16px;height:16px;fill:#fff}
.feed-head .count{font-weight:800;font-size:12px;letter-spacing:.12em;text-transform:uppercase;opacity:.95;white-space:nowrap}
.ballots{list-style:none;margin:0;padding:0}
.ballot{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;padding:13px 18px;border-top:1px solid var(--line);background:var(--paper)}
.ballot:first-child{border-top:0}
.ballot.new{animation:slidein .5s ease}
@keyframes slidein{from{background:#FFF4F5;transform:translateY(-6px);opacity:0}to{background:var(--paper);transform:none;opacity:1}}
.feed.blue .ballot.new{animation-name:slidein-b}
@keyframes slidein-b{from{background:#EEF2FF;transform:translateY(-6px);opacity:0}to{background:var(--paper);transform:none;opacity:1}}
.ballot .mark{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;flex:none}
.feed.red .ballot .mark{background:#FDE8EA;color:var(--red)}
.feed.blue .ballot .mark{background:#E8EDFF;color:var(--blue)}
.ballot .mark svg{width:16px;height:16px;fill:currentColor}
.ballot .what{display:flex;flex-direction:column;gap:3px;min-width:0}
.ballot .line{font-size:14px;font-weight:600;color:var(--ink);line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ballot .line b{font-weight:900;color:var(--ink)}
.ballot .line .tk{font-weight:900}
.feed.red .line .tk{color:var(--red)}
.feed.blue .line .tk{color:var(--blue)}
.ballot .wallet{font-weight:700;font-size:13px;color:var(--navy);text-decoration:none;letter-spacing:.01em}
.ballot .wallet:hover{text-decoration:underline;color:var(--navy)}
.ballot .meta{font-size:12px;font-weight:600;color:var(--muted);display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.ballot .meta a{font-weight:800;text-decoration:none}
.ballot .stamp{flex:none;display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:999px;font-weight:900;font-size:11px;letter-spacing:.14em;text-transform:uppercase;white-space:nowrap}
.feed.red .stamp{color:var(--red);box-shadow:inset 0 0 0 1.5px var(--red)}
.feed.blue .stamp{color:var(--blue);box-shadow:inset 0 0 0 1.5px var(--blue)}
.feed-foot{display:flex;justify-content:center;padding:14px;border-top:1px solid var(--line)}
.feed-foot .btn.ghost{min-height:40px;padding:0 20px;font-size:12px}
.feed-empty{padding:40px 18px;text-align:center;color:var(--muted);font-weight:600;font-size:14px}

/* mobile side switch */
.switch{display:none;border:2px solid var(--navy);border-radius:999px;padding:3px;gap:3px}
.switch button{flex:1;border:0;background:transparent;border-radius:999px;min-height:40px;font:900 12px/1 var(--font);letter-spacing:.14em;text-transform:uppercase;color:var(--navy);cursor:pointer}
.switch button[aria-pressed="true"]{color:#fff}
.switch button.r[aria-pressed="true"]{background:var(--red)}
.switch button.b[aria-pressed="true"]{background:var(--blue)}

/* buybacks and burns */
.burns{display:flex;flex-direction:column;gap:18px;padding-top:10px}
.burns-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap}
.burns-head h2{font-weight:900;font-size:clamp(24px,3vw,38px);letter-spacing:.05em;text-transform:uppercase;color:var(--navy);line-height:1;margin-top:6px}
.burns-head p{max-width:70ch;font-weight:600;font-size:15px;color:var(--muted);margin-top:8px}
.burn-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.burn-tile{border:2px solid var(--line);border-radius:4px;padding:22px 24px;display:flex;flex-direction:column;gap:6px;min-width:0}
.burn-tile.red{border-color:var(--red)}
.burn-tile.blue{border-color:var(--blue)}
.burn-tile .who{display:flex;align-items:center;gap:10px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;font-size:12px}
.burn-tile .who i{width:10px;height:10px;border-radius:50%;display:inline-block}
.burn-tile.red .who{color:var(--red)}.burn-tile.red .who i{background:var(--red)}
.burn-tile.blue .who{color:var(--blue)}.burn-tile.blue .who i{background:var(--blue)}
.burn-tile .usd{font-weight:900;font-size:clamp(30px,3.4vw,46px);line-height:1;letter-spacing:-.01em;color:var(--ink)}
.burn-tile.red .usd{color:var(--red)}
.burn-tile.blue .usd{color:var(--blue)}
.burn-tile .sub{font-size:13px;font-weight:700;color:var(--muted)}
.burn-tile .sub b{color:var(--ink);font-weight:800}
.burn-tile .pending{margin-top:10px;padding-top:10px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);flex-wrap:wrap}
.burn-tile .pending b{color:var(--ink);letter-spacing:0;text-transform:none;font-size:13px}
.table-wrap{overflow-x:auto;border:2px solid var(--navy);border-radius:4px;background:var(--paper)}
table{width:100%;border-collapse:collapse;font-size:14px;min-width:640px}
th{font-size:11px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);text-align:left;padding:13px 18px;border-bottom:2px solid var(--navy)}
td{padding:13px 18px;border-bottom:1px solid var(--line);font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
tr:last-child td{border-bottom:0}
td .chip{display:inline-block;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:#fff}
td .chip.red{background:var(--red)}
td .chip.blue{background:var(--blue)}
td a{font-weight:800;text-decoration:none}
td .muted{color:var(--muted);font-weight:600}
td.empty{padding:36px 18px;text-align:center;color:var(--muted);font-weight:600;white-space:normal}

.legal{max-width:78ch;margin-inline:auto;border:1.5px solid var(--ink);padding:14px 18px;font-size:12px;font-weight:600;color:var(--ink);text-align:center;line-height:1.5}

@media (max-width:900px){
  .tally{grid-template-columns:1fr 1fr}
  .tcenter{grid-column:1 / -1;order:3;padding-top:4px}
  .tside .votes{font-size:clamp(40px,12vw,64px)}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat:nth-child(2){border-right:0}
  .stat:nth-child(-n+2){border-bottom:2px solid var(--navy)}
  .switch{display:flex}
  .feeds{grid-template-columns:1fr}
  .burn-tiles{grid-template-columns:1fr}
  .feeds[data-show="red"] .feed.blue{display:none}
  .feeds[data-show="blue"] .feed.red{display:none}
  .ballot{grid-template-columns:auto minmax(0,1fr);gap:12px;padding:12px 14px}
  .ballot .stamp{grid-column:2;justify-self:start}
  .ballot .line{white-space:normal}
}
@media (max-width:520px){
  .tally{grid-template-columns:1fr}
  .tside .pin{width:88px}
  .stats{grid-template-columns:1fr}
  .stat{border-right:0;border-bottom:2px solid var(--navy)}
  .stat:last-child{border-bottom:0}
  .stat:nth-child(-n+2){border-bottom:2px solid var(--navy)}
}
@media (prefers-reduced-motion: reduce){
  .ballot.new,.tally .flash{animation:none}
}
