/* Member ballot page */
.ballot { max-width: 52rem; display: grid; gap: 1.5rem; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; counter-reset: s; font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.steps li { counter-increment: s; display: flex; align-items: center; gap: .5rem; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); font-size: .85rem; letter-spacing: 0; }
.steps li.on { color: var(--ink); }
.steps li.on::before { background: var(--water); border-color: var(--water); color: var(--on-water); }
.steps li.done::before { content: "\2713"; background: var(--reed); border-color: var(--reed); color: #fff; }
.panel-h { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.panel { display: grid; gap: .8rem; }
.panel[hidden], .msg[hidden] { display: none; }
#step-1 form, #step-2 form { max-width: 30rem; }
.doc { max-height: 75vh; overflow-y: auto; background: #8a8f8c; padding: .75rem; border-radius: 10px; border: 1px solid var(--line); display: grid; gap: .75rem; }
.doc img { width: 100%; height: auto; display: block; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
label.check, label.choice { display: flex; gap: .7rem; align-items: center; font-size: 1.02rem; font-weight: 400; letter-spacing: normal; text-transform: none; cursor: pointer; }
label.check input, label.choice input { width: 1.25rem; height: 1.25rem; flex: none; accent-color: var(--water); margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .6rem; }
legend { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.2; margin-bottom: .6rem; padding: 0; }
label.choice { padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); }
label.choice:has(input:checked) { border-color: var(--water); background: var(--sky); }
button.submit:disabled { opacity: .45; cursor: not-allowed; }
button.btn { font: inherit; font-size: .8rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.msg { padding: .7rem .9rem; border-radius: 8px; background: #fbe9e7; color: #7a1f12; border: 1px solid #e7b9b1; font-size: .97rem; }
.msg.ok { background: var(--sky); color: var(--ink); border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg:not(.ok) { background: #3a1d19; color: #ffc9bf; border-color: #6b3128; } }
fieldset.q { padding: 1.1rem 0 .4rem; border-top: 1px solid var(--line); }
fieldset.q:first-child { border-top: 0; padding-top: 0; }
.q-n { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; margin-right: .35rem; border-radius: 50%; background: var(--water); color: var(--on-water); font-family: var(--font-body); font-size: .85rem; vertical-align: .2em; }
.duties { color: var(--muted); font-size: .95rem; margin: -.2rem 0 .3rem; }
.duties a { white-space: nowrap; }
.officers-h { margin-top: 1.2rem; font-size: 1.7rem; }
#step-2 { max-width: 44rem; }
#step-2 form { max-width: none; }
fieldset.q legend { float: left; width: 100%; }
fieldset.q legend + * { clear: both; }

/* Ballot admin page */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin: 0; }
.stats div { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; background: var(--paper); }
.stats dt { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: .2rem 0 0; font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.table-wrap { overflow-x: auto; }
table.results { width: 100%; border-collapse: collapse; font-size: .98rem; }
table.results th, table.results td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
table.results td:nth-child(2), table.results td:nth-child(3), table.results th:nth-child(2), table.results th:nth-child(3) { text-align: right; }
fieldset.q.mini { padding: .6rem 0 .2rem; }
fieldset.q.mini legend { font-size: 1.15rem; float: none; }
.yn { display: flex; gap: .6rem; flex-wrap: wrap; }
.yn label.choice { padding: .55rem 1rem; }
button.danger { color: #9b2414; border-color: #d9a49b; }
