/* After-the-vote election pages: results, poll accuracy, coalition builder, policy tracker, electorates. */
.pe-badge { display: inline-block; margin: 0 0 18px; padding: 8px 14px; border: 1.5px solid var(--line); border-left: 5px solid var(--kowhai, #e0a100); border-radius: 8px; background: var(--surface); font-size: .9rem; font-weight: 600; max-width: 100%; }
.pe-badge.final { border-left-color: var(--fern); }
.pe-wait { padding: 28px; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 32px; }
.pe-wait h2 { margin: 0 0 8px; }
.pe-results { margin-bottom: 24px; }
/* Wrappers inside grid sections: let wide tables scroll inside them instead of widening the page. */
.pe-results, [data-accuracy], [data-coalition-static], [data-coalition-picker], .pe-coalition > * { min-width: 0; max-width: 100%; }
.pe-live:not([hidden]) { padding: 14px 18px; border: 1.5px solid var(--fern); border-radius: 10px; background: var(--surface); margin-bottom: 24px; }
.pe-live p { margin: 0; }

.pe-bar { position: relative; display: flex; gap: 2px; height: 34px; border-radius: 6px; overflow: hidden; margin: 14px 0 6px; background: var(--line); }
.pe-bar i { display: block; height: 100%; min-width: 2px; transition: width .3s ease; }
.pe-maj { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: var(--ink); }
.pe-bar-note { font-size: .82rem; color: var(--ink-soft); margin: 0 0 18px; }

.pe-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: baseline; flex: none; }
.pe-table { margin: 6px 0 10px; }
.pe-table th[scope="row"] { white-space: nowrap; }
.pe-table tr.pe-out { color: var(--ink-soft); }
.pe-note, .pe-lead { font-size: .9rem; color: var(--ink-soft); max-width: 75ch; }
.pe-lead { font-size: 1.05rem; color: var(--ink); }

.pe-tracker td { white-space: normal !important; text-align: left !important; min-width: 16em; }
.pe-tracker td:last-child { min-width: 9em; }
.pe-src { font-size: .8rem; white-space: nowrap; }
.pe-status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1.5px solid var(--line); background: var(--surface); white-space: nowrap; }
.pe-status.s-agreed, .pe-status.s-underway { border-color: var(--kowhai, #e0a100); }
.pe-status.s-done { background: var(--fern); border-color: var(--fern); color: #fff; }
.pe-status.s-dropped, .pe-status.s-out { color: var(--ink-soft); text-decoration: line-through; text-decoration-thickness: 1px; }
.pe-status.s-out { text-decoration: none; }

.pe-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.pe-filter button, .pe-combos .btn { padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 .85rem var(--font-body, inherit); cursor: pointer; }
.pe-filter button[aria-pressed="true"] { background: var(--fern); border-color: var(--fern); color: #fff; }

.pe-coalition { margin-bottom: 36px; }
.pe-combos { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.pe-pick { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 8px; }
.pe-pick label { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.pe-pick label strong { margin-left: auto; }
.pe-pick input { margin: 0 4px 0 0; }
.pe-verdict { font-size: 1.05rem; margin: 10px 0 24px; }
.pe-verdict.yes strong { color: var(--fern); }
.pe-log { display: grid; gap: 8px; padding-left: 1.2em; }

@media (max-width: 600px) {
  .pe-wait { padding: 20px 16px; }
  .pe-bar { height: 26px; }
}
