/* Civic screens: Vote, My issues, Outlets admin */

.cv-wrap { max-width: 860px; margin: 0 auto; }
.cv-wrap.wide { max-width: 980px; }
.cv-wrap .panel h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.cv-credit { margin-top: 8px; }

/* Elections list */
.cv-elections { display: grid; gap: 10px; }
.cv-election { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.cv-election .btn { grid-column: 1 / -1; justify-content: center; }
@media (min-width: 560px) { .cv-election { grid-template-columns: auto minmax(0, 1fr) auto; } .cv-election .btn { grid-column: auto; } }
.cv-count { display: grid; place-items: center; text-align: center; background: var(--surface); border-radius: 10px; padding: 8px 14px; min-width: 84px; border: 2px solid var(--line); }
.cv-count b { font: 800 18px/1.1 var(--display); white-space: nowrap; }
.cv-count span { font-size: 11px; color: var(--ink-2); }
.cv-count.soon { border-color: var(--center); color: var(--center); }
.cv-e-main { display: grid; gap: 2px; min-width: 0; }
.cv-e-main b { font-family: var(--display); font-size: 17px; }

/* Address + generic input rows */
.cv-addr { display: grid; gap: 8px; }
.cv-addr label { font-weight: 700; font-size: 14px; }
.cv-addr-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-addr-row input, .cv-wrap input[type="search"] {
  flex: 1 1 220px; min-width: 0; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); font-size: 16px; width: 100%;
}
.cv-addr-row .btn { min-height: 48px; justify-content: center; flex: 1 1 auto; }
@media (min-width: 560px) { .cv-addr-row .btn { flex: 0 0 auto; } }
.cv-addr p { margin: 0; }

/* Results */
.cv-hero { border-top: 5px solid var(--center); }
.cv-hero h2 { font-size: 24px; }
.cv-hero p { margin: 0; }
.cv-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cv-cta .btn { flex: 1 1 220px; justify-content: center; }
.cv-locs { gap: 0; }
.cv-locs h2 { margin-bottom: 8px; }
.cv-loc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
@media (min-width: 560px) { .cv-loc { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.cv-loc .btn { justify-content: center; }
.cv-loc-main { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.cv-hours { font-size: 14px; font-weight: 600; color: var(--ink); }
.cv-full summary { cursor: pointer; font-size: 13px; color: var(--center); font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.cv-full pre { white-space: pre-wrap; font: 12px/1.5 var(--mono); color: var(--ink-2); margin: 4px 0 0; max-height: 240px; overflow: auto; }
.cv-contest { padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.cv-contest ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.cv-contest p { margin: 4px 0; }
.cv-sub { font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 8px 0 0; }
.cv-links { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-links .btn { flex: 1 1 220px; justify-content: center; }
.cv-nodata .btn { justify-self: start; }
.cv-state { display: grid; gap: 6px; font-weight: 700; font-size: 14px; max-width: 360px; }
.cv-state select, .cv-wrap select { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--bg); font-size: 16px; max-width: 100%; }

.cv-more > summary { cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--center); border-top: 1px solid var(--line); }
.cv-more > summary::-webkit-details-marker { display: none; }
.cv-more[open] > summary { display: none; }

/* Issues */
.cv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--center-soft); color: var(--center); font-weight: 700; border-radius: 999px; padding: 4px 4px 4px 12px; min-height: 36px; font-size: 14px; }
.cv-chip button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 18px; cursor: pointer; }
.cv-chip button:hover { background: color-mix(in srgb, var(--center) 18%, transparent); }
.cv-chip.sm { padding: 2px 10px; min-height: 0; font-size: 12px; }
.cv-ideas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cv-ideas .chip { min-height: 40px; }
.cv-toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.cv-toggle input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--center); }
.cv-alerts { display: grid; gap: 8px; }
.cv-alert { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); text-decoration: none; border-left: 4px solid transparent; overflow-wrap: anywhere; }
.cv-alert.unread { border-left-color: var(--center); background: var(--center-soft); }
.cv-alert-top { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.cv-alert b { font-size: 15px; line-height: 1.35; }
.cv-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--right); color: #fff; font: 700 11px/1 var(--mono); }

/* Outlets admin */
.cv-balance { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.cv-balance i { display: block; height: 100%; }
.cv-balance .l { background: var(--left); } .cv-balance .r { background: var(--right); }
.cv-bal-labels { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font: 600 13px var(--mono); }
.cv-bal-labels small { font-weight: 400; color: var(--ink-2); }
.cv-ok { color: #1a9a4b; font-weight: 700; margin: 0; }
.cv-warn { color: #a86b00; font-weight: 700; margin: 0; }
@media (prefers-color-scheme: dark) { .cv-warn { color: var(--glow); } }
.cv-preview { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.cv-preview p { margin: 0; }
.cv-break { overflow-wrap: anywhere; }
.cv-sample { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.cv-lean5 { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-lean5 label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 14px; }
.cv-lean5 input { accent-color: var(--ink); }
.cv-lean5 label:has(input:checked)[data-b="left"] { border-color: var(--left); color: var(--left); background: var(--left-soft); }
.cv-lean5 label:has(input:checked)[data-b="center"] { border-color: var(--center); color: var(--center); background: var(--center-soft); }
.cv-lean5 label:has(input:checked)[data-b="right"] { border-color: var(--right); color: var(--right); background: var(--right-soft); }
.cv-local { display: grid; gap: 12px; }
.cv-local[hidden] { display: none; }
.cv-sugg { display: grid; gap: 6px; }
.cv-sugg-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.cv-outs { display: grid; gap: 6px; margin-top: 8px; }
.cv-out {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--c);
}
.cv-out[data-b="left"] { --c: var(--left); } .cv-out[data-b="center"] { --c: var(--center); } .cv-out[data-b="right"] { --c: var(--right); }
.cv-out.off { opacity: .55; }
.cv-out-name { display: grid; min-width: 0; overflow-wrap: anywhere; }
.cv-out select { grid-column: 1; }
.cv-out .btn { grid-column: 2; justify-content: center; }
@media (min-width: 720px) { .cv-out { grid-template-columns: minmax(0, 1fr) 90px 170px 110px; } .cv-out select, .cv-out .btn { grid-column: auto; } }
.cv-ok-dot { color: #1a9a4b; font-weight: 700; }
.cv-bad-dot { color: var(--right); font-weight: 700; }

@media (prefers-reduced-motion: reduce) { .cv-wrap * { transition: none !important; animation: none !important; } }

/* Voting page spacing: the cards, then each panel, evenly spaced */
.cv-wrap .vt-hub { margin-bottom: 16px; }
.cv-wrap .panel { margin-bottom: 16px; }
.cv-wrap #vt-elections, .cv-wrap #vt-where { scroll-margin-top: 120px; }
.vt-flash { animation: vt-flash 1.6s ease-out; }
@keyframes vt-flash { 0% { box-shadow: 0 0 0 3px var(--center), 0 0 34px 2px color-mix(in srgb, var(--center) 70%, transparent); } 100% { box-shadow: var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .vt-flash { animation: none; box-shadow: 0 0 0 3px var(--center); } }
