/* ============================================================================
   Privote — flagship visual + interaction redesign (voting-staging.tari.mw only)
   Every element id/class that public/app.js and public/vote.js query by is
   preserved exactly. This file (plus the companion public/ux.js, which only
   adds behavior via new event listeners/observers -- it never calls into or
   modifies app.js/vote.js) changes presentation and flow polish; the actual
   transaction-building/signing logic in app.js and vote.js is untouched.
   ============================================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --bg: #07060d;
  --bg-1: #0b0a16;
  --bg-2: #12111f;
  --bg-3: #191828;
  --bg-4: #211f34;
  --line: #2a2840;
  --line-soft: #1c1a2c;
  --line-strong: #3a3759;
  --fg: #f3f1fb;
  --fg-dim: #9c99b8;
  --fg-faint: #6d6a8c;

  --accent: #8b7cff;
  --accent-2: #c9b8ff;
  --accent-3: #6e5ce6;
  --accent-dim: #3d3480;
  --accent-bg: rgba(139, 124, 255, 0.12);
  --accent-contrast: #0a0714;

  --warn: #f0b94e;
  --err: #ff6b7a;
  --err-bg: rgba(255, 107, 122, 0.09);
  --ok: #52e0b0;
  --ok-bg: rgba(82, 224, 176, 0.09);

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, "Segoe UI", system-ui, Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.2), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-float: 0 1px 1px rgba(0, 0, 0, 0.2), 0 24px 64px -16px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 0 1px var(--accent-dim), 0 0 48px -8px rgba(139, 124, 255, 0.4);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

/* Several elements app.js/vote.js toggle via the `hidden` attribute also carry a class (.row,
   .progress) or inline style that sets `display` -- without this, those equal-or-higher-specificity
   rules win the cascade over the UA stylesheet's [hidden]{display:none}, making "hidden" elements
   render anyway. Confirmed live: v-scan-row/v-ballot-fields showed up before connecting a wallet. */
[hidden] { display: none !important; }
::selection { background: var(--accent-dim); color: var(--fg); }
html { scrollbar-color: var(--line-strong) transparent; scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 20% -15%, rgba(139, 124, 255, 0.14), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(201, 184, 255, 0.07), transparent 55%),
    radial-gradient(600px 400px at 0% 100%, rgba(110, 92, 230, 0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

/* ---------- header ---------- */

header {
  padding: 26px 32px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 10, 22, 0.75);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand::before {
  content: "";
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 4px 16px -4px rgba(139, 124, 255, 0.6);
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  -webkit-mask-size: 60%; mask-size: 60%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.brand > div { display: flex; flex-direction: column; gap: 2px; }

h1 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.sub { margin: 0; color: var(--fg-dim); font-size: 0.86rem; }

.statusbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-dim);
  background: var(--bg-2);
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.pill.ok { color: var(--ok); border-color: rgba(82, 224, 176, 0.3); background: var(--ok-bg); }

/* ---------- layout ---------- */

main { flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: 40px 28px 64px; }

.elections-bar {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 18px; margin-bottom: 18px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-md);
  background: var(--bg-1);
  font-size: 0.86rem;
}
.elections-bar select { flex: 1; }

/* ---------- wizard nav (index.html's single-step flow) ---------- */

.wizard-nav {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 24px; padding: 4px;
}
.wizard-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: none; padding: 4px; cursor: pointer;
  flex: 1; min-width: 0;
}
.wizard-nav-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-3); border: 1px solid var(--line);
  font-size: 0.85rem; font-weight: 800; color: var(--fg-dim);
  transition: all 0.3s var(--ease-spring);
}
.wizard-nav-label {
  font-size: 0.72rem; font-weight: 600; color: var(--fg-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  transition: color 0.3s var(--ease);
}
.wizard-nav-item:hover .wizard-nav-num { border-color: var(--line-strong); }
.wizard-nav-item.active .wizard-nav-num {
  border-color: var(--accent); color: var(--accent-contrast);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 0 5px var(--accent-bg);
  transform: scale(1.08);
}
.wizard-nav-item.active .wizard-nav-label { color: var(--fg); }
.wizard-nav-item.done .wizard-nav-num {
  background: var(--ok-bg); border-color: rgba(82, 224, 176, 0.4); color: var(--ok);
}
.wizard-nav-item.done .wizard-nav-num::after { content: "✓"; }
.wizard-nav-item.done:not(.active) .wizard-nav-num > * { display: none; }
.wizard-nav-line {
  flex: 0 0 auto; width: 32px; height: 2px; background: var(--line-soft);
  margin: 0 -2px 20px; border-radius: 2px; overflow: hidden; position: relative;
}
.wizard-nav-line::after {
  content: ""; position: absolute; inset: 0; background: var(--ok);
  transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease);
}
.wizard-nav-line.filled::after { transform: scaleX(1); }
@media (max-width: 560px) { .wizard-nav-label { display: none; } }

/* Only the current step renders at all -- this is what makes it a wizard rather than an
   accordion; see public/ux.js for how `.current` is kept to exactly one step. */
.step:not(.current) { display: none; }

.step {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  overflow: hidden;
  box-shadow: var(--shadow-card);
  animation: stepIn 0.35s var(--ease) both;
}

.step summary {
  padding: 22px 26px 18px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  user-select: none;
  cursor: default;
  color: var(--fg);
}
.step summary::-webkit-details-marker { display: none; }

.step-num {
  display: none; /* superseded by .wizard-nav-num above the step */
}

.step-body {
  padding: 4px 26px 26px; display: flex; flex-direction: column; gap: 20px;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- form fields ---------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-size: 0.84rem; font-weight: 600; color: var(--fg-dim); letter-spacing: 0.01em; }

input[type="text"], input[type="number"], input[type="datetime-local"], select, textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--fg);
  padding: 12px 15px;
  font-family: var(--sans);
  font-size: 0.95rem;
  width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
#in-voters, #csv-text, #v-fee-commitment { font-family: var(--mono); font-size: 0.82rem; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
  background: var(--bg-1);
}
textarea { resize: vertical; line-height: 1.5; }

.hint { color: var(--fg-faint); font-size: 0.81rem; margin: 0; line-height: 1.55; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */

button {
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--fg);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.2s var(--ease);
}
button:hover:not(:disabled) { border-color: var(--accent-dim); background: var(--accent-bg); color: var(--fg); transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0); }

button.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  border-color: transparent; color: var(--accent-contrast); font-weight: 700;
  box-shadow: 0 6px 20px -4px rgba(139, 124, 255, 0.55);
  padding: 13px 26px; font-size: 0.95rem;
}
button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #d8caff, #8a78ff);
  box-shadow: 0 8px 28px -4px rgba(139, 124, 255, 0.75);
}
button.ghost { background: transparent; }
button.ghost:hover:not(:disabled) { border-color: var(--accent-dim); background: var(--accent-bg); }
button:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.wizard-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.wizard-footer:has(> :only-child) { justify-content: flex-end; }

a.ghost {
  display: inline-block;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--sans);
  text-decoration: none;
  transition: all 0.2s var(--ease);
}
a.ghost:hover { border-color: var(--accent-dim); background: var(--accent-bg); transform: translateY(-1px); }

/* ---------- ranking (vote page) ---------- */

.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rank-list li {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--bg-2);
  user-select: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.rank-list li:hover { border-color: var(--line-strong); background: var(--bg-3); transform: translateX(2px); }
.rank-list .rank-pos {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  color: var(--accent-contrast);
  font-weight: 800; font-size: 0.92rem;
  box-shadow: 0 4px 12px -2px rgba(139, 124, 255, 0.5);
}
.rank-list .rank-name { flex: 1; font-weight: 600; font-size: 1.02rem; }
.rank-list .rank-moves { display: flex; gap: 4px; }
.rank-list .rank-moves button {
  padding: 6px 12px; font-size: 0.85rem; border-radius: 8px;
}

/* ---------- candidates: chip-style ---------- */

.candidate-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.candidate-list li {
  display: flex; gap: 8px; align-items: center;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 14px;
  animation: chipIn 0.3s var(--ease-spring) both;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
@keyframes chipIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
.candidate-list li:hover { border-color: var(--accent-dim); background: var(--bg-4); }
.candidate-list .idx {
  color: var(--accent-2); font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  display: none; /* index shown by position, not needed as a chip prefix */
}
.candidate-list .name { font-size: 0.9rem; font-weight: 500; }
.candidate-list .del {
  background: var(--bg-2); border: none; color: var(--fg-faint); font-size: 0.85rem;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.candidate-list .del:hover { color: var(--err); background: var(--err-bg); transform: none; }

.voter-count { color: var(--fg-dim); font-size: 0.85rem; font-family: var(--mono); }

/* ---------- tables ---------- */

.summary { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.summary td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.summary td:first-child { color: var(--fg-dim); font-weight: 600; width: 170px; }

.progress {
  color: var(--accent-2); font-family: var(--sans); font-weight: 500; font-size: 0.88rem;
  display: flex; align-items: center; gap: 12px;
  animation: stepIn 0.3s var(--ease) both;
}
.progress::before {
  content: ""; width: 16px; height: 16px; flex-shrink: 0;
  border: 2.5px solid var(--accent-dim); border-top-color: var(--accent-2);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error {
  color: var(--err); font-family: var(--sans); font-size: 0.87rem; font-weight: 500;
  padding: 14px 16px; border: 1px solid rgba(255, 107, 122, 0.3); border-radius: var(--radius-sm);
  background: var(--err-bg);
  animation: stepIn 0.3s var(--ease) both;
}

.kv { display: flex; flex-direction: column; gap: 11px; margin-bottom: 16px; }
.kv > div { display: flex; gap: 10px; align-items: baseline; }
.kv span { color: var(--fg-dim); font-size: 0.85rem; font-weight: 600; width: 120px; flex-shrink: 0; }
.kv code {
  font-family: var(--mono); font-size: 0.78rem; word-break: break-all; color: var(--accent-2);
  background: var(--bg); padding: 3px 7px; border-radius: 5px;
}

.ballots { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.75rem; }
.ballots th, .ballots td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.ballots th { color: var(--fg-dim); font-weight: 700; font-family: var(--sans); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.ballots td code { word-break: break-all; }
.ballots .copy { background: transparent; border: none; color: var(--accent-2); cursor: pointer; padding: 0 4px; }
.ballots .copy:hover { color: var(--accent); transform: none; }

/* ---------- status cards ---------- */

.status-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card {
  border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--bg-1);
  padding: 15px 17px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover { border-color: var(--line); transform: translateY(-2px); }
.card-label { color: var(--fg-faint); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.card-value { font-family: var(--mono); font-size: 1.15rem; font-weight: 600; }

.empty { color: var(--fg-faint); font-style: italic; }

.auto { font-size: 0.85rem; color: var(--fg-dim); display: flex; gap: 8px; align-items: center; cursor: pointer; }
.auto input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

h3 { margin: 26px 0 12px; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; }

.round-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; margin-top: 10px; }
.round-table th, .round-table td { text-align: right; padding: 8px 13px; border-bottom: 1px solid var(--line-soft); }
.round-table th:first-child, .round-table td:first-child { text-align: left; }
.round-table .elim { color: var(--err); }
.round-table .winner { color: var(--ok); font-weight: 700; }

pre {
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 15px; overflow-x: auto; font-family: var(--mono); font-size: 0.78rem;
}

/* ---------- developer console (renamed/de-emphasized terminal log) ---------- */

.term { border-top: 1px solid var(--line-soft); background: var(--bg-1); margin-top: 8px; }
.term summary {
  cursor: pointer; padding: 13px 28px; font-size: 0.8rem; color: var(--fg-faint);
  list-style: none; user-select: none; transition: color 0.2s var(--ease);
  display: flex; align-items: center; gap: 6px;
}
.term summary::before { content: "⚙"; opacity: 0.6; font-size: 0.85em; }
.term summary:hover { color: var(--fg-dim); }
.term summary::-webkit-details-marker { display: none; }
.term[open] summary { border-bottom: 1px solid var(--line-soft); }
.badge {
  display: inline-block; min-width: 18px; text-align: center;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.67rem; padding: 2px 7px; margin-left: 7px; font-weight: 700;
}
.term-head { padding: 10px 28px 0; display: flex; gap: 8px; }
.log {
  margin: 10px 28px 22px; padding: 15px; max-height: 320px; overflow-y: auto;
  font-size: 0.73rem; line-height: 1.75; background: var(--bg); border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
}
.log .t { color: var(--fg-faint); }
.log .ok { color: var(--ok); }
.log .err { color: var(--err); }

footer { border-top: 1px solid var(--line-soft); padding: 20px 24px; color: var(--fg-faint); font-size: 0.8rem; text-align: center; }

/* ---------- csv modal ---------- */

dialog {
  background: var(--bg-2); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; max-width: 640px; width: 92vw;
  box-shadow: var(--shadow-float);
}
dialog::backdrop { background: rgba(4, 3, 9, 0.75); backdrop-filter: blur(4px); }
.csv-form { display: flex; flex-direction: column; gap: 15px; }
.csv-form h3 { margin: 0; }
.csv-status { font-size: 0.85rem; color: var(--fg-dim); font-family: var(--mono); }
.file-btn {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 20px; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; transition: all 0.2s var(--ease);
}
.file-btn:hover { border-color: var(--accent-dim); background: rgba(255, 255, 255, 0.05); }

#init-result:not([hidden]), #monitor:not([hidden]), #v-result:not([hidden]),
#v-ballot-fields:not([hidden]), #v-not-eligible:not([hidden]), #v-not-found:not([hidden]) {
  animation: stepIn 0.45s var(--ease) both;
}

/* ============================================================================
   vote.html — flagship single-task flow (no accordion chrome: there's only
   ever one task on this page). Markup restructure matches this (see
   public/vote.html); ids vote.js reads are unchanged.
   ============================================================================ */

.vote-shell { max-width: 560px; margin: 0 auto; }

.vote-hero { text-align: center; margin-bottom: 8px; }
.vote-hero .kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.78rem; font-weight: 700; color: var(--accent-2);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px;
}
.vote-hero .kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px 2px var(--accent-bg); animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.vote-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  box-shadow: var(--shadow-float);
  padding: 32px;
  display: flex; flex-direction: column; gap: 22px;
}

.vote-connect {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; padding: 12px 0;
}
.vote-connect .vote-connect-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-bg), transparent);
  border: 1px solid var(--accent-dim);
  display: grid; place-items: center; font-size: 1.5rem;
}
#v-account:not(:empty) {
  font-family: var(--mono); font-size: 0.78rem; color: var(--ok);
  background: var(--ok-bg); border: 1px solid rgba(82, 224, 176, 0.3);
  padding: 7px 14px; border-radius: 999px;
}

.vote-aside {
  border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--bg-1);
  padding: 16px 18px;
}
.vote-aside summary {
  cursor: pointer; font-size: 0.84rem; font-weight: 600; color: var(--fg-dim);
  list-style: none; user-select: none; display: flex; align-items: center; gap: 8px;
}
.vote-aside summary::-webkit-details-marker { display: none; }
.vote-aside summary::after {
  content: ""; width: 7px; height: 7px; margin-left: auto;
  border-right: 2px solid var(--fg-faint); border-bottom: 2px solid var(--fg-faint);
  transform: rotate(-45deg); transition: transform 0.3s var(--ease);
}
.vote-aside[open] summary::after { transform: rotate(45deg); }
.vote-aside[open] summary { margin-bottom: 14px; }

.cast-cta { display: flex; flex-direction: column; gap: 10px; }
.cast-cta button.primary { width: 100%; padding: 16px 24px; font-size: 1rem; }

@media (max-width: 640px) {
  main { padding: 28px 16px 48px; }
  header { padding: 18px; }
  h1 { font-size: 1.15rem; }
  .vote-card { padding: 22px; border-radius: var(--radius-lg); }
}

/* ============================================================================
   index.html — creation-flow UX upgrade: card-style selectors for the two
   choices that matter most (tally method, who signs), quick-pick deadlines,
   and clearer visual separation in the review step. The underlying native
   <select>/<input type="radio"> elements app.js reads stay in the DOM and
   fully functional (see public/ux.js) -- these are a visual layer on top.
   ============================================================================ */

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .choice-grid { grid-template-columns: 1fr; } }

.choice-card {
  display: flex; flex-direction: column; gap: 4px;
  text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius-md);
  background: var(--bg-1); padding: 14px 16px;
  transition: all 0.2s var(--ease);
  font-family: var(--sans);
}
.choice-card:hover { border-color: var(--line-strong); background: var(--bg-2); transform: translateY(-1px); }
.choice-card .choice-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.92rem; color: var(--fg);
}
.choice-card .choice-title::before {
  content: ""; width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--line-strong); transition: all 0.2s var(--ease-spring);
}
.choice-card .choice-desc { font-size: 0.78rem; color: var(--fg-faint); line-height: 1.45; margin: 0; }
.choice-card.selected {
  border-color: var(--accent); background: var(--accent-bg);
  box-shadow: 0 0 0 1px var(--accent-dim);
}
.choice-card.selected .choice-title::before {
  border-color: var(--accent); background: var(--accent);
  box-shadow: inset 0 0 0 2.5px var(--bg-1);
}
.choice-card.selected .choice-title { color: var(--accent-2); }

.quick-picks { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-pick {
  padding: 7px 14px; font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-1); color: var(--fg-dim);
  cursor: pointer; transition: all 0.18s var(--ease);
}
.quick-pick:hover { border-color: var(--accent-dim); color: var(--fg); background: var(--accent-bg); }
.quick-pick.selected { border-color: var(--accent); background: var(--accent-bg); color: var(--accent-2); }

.section-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 4px 0 -4px;
  font-size: 0.74rem; font-weight: 700; color: var(--fg-faint);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.section-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

.review-card {
  border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--bg-1);
  overflow: hidden;
}
.review-card .summary { font-size: 0.88rem; }
.review-card .summary td { padding: 12px 16px; }

.success-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--ok-bg), transparent);
  border: 1px solid rgba(82, 224, 176, 0.3);
  margin-bottom: 4px;
}
.success-banner .success-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--ok); color: var(--accent-contrast);
  display: grid; place-items: center; font-size: 1.2rem; font-weight: 800;
}
.success-banner h3 { margin: 0; color: var(--ok); }
