/* Election guide. Builds on the editorial-home palette in home.css. */
#election-feed { max-width: 1328px; }
#election-feed > * { max-width: 960px; }
.election-disclaimer { margin: 18px 0 8px; padding: 14px 16px; border: 1px solid #DDD0B8; border-left: 4px solid #1E3A5F; background: #FFF3E3; border-radius: 6px; color: #2A4766; font-size: 13.5px; line-height: 1.7; }
.election-disclaimer strong { color: #1E3A5F; }
.election-meta { color: #5A6B80; font-size: 13px; margin: 6px 0 4px; }
.race { border-bottom: 1px solid #EADFCB; }
.race > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 18px 0; }
.race > summary::-webkit-details-marker { display: none; }
.race-title { font-family: 'Pretendard Variable','Pretendard','Noto Sans KR',-apple-system,system-ui,sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -.04em; color: #1E3A5F; }
.race-title small { display: block; font-family: inherit; font-size: 12px; color: #7A8AA0; letter-spacing: 0; margin-top: 2px; }
.race-count { color: #1E3A5F; font-size: 13px; font-weight: 700; white-space: nowrap; }
.race-count::after { content: " ▾"; }
.race[open] .race-count::after { content: " ▴"; }
.race-names { color: #5A6B80; font-size: 13px; margin-top: 4px; font-family: inherit; }
.race-body { padding: 0 0 22px; }
.cand { margin-top: 14px; padding: 16px; border: 1px solid #EADFCB; border-radius: 8px; background: #fff; }
.cand h3 { font-size: 18px; letter-spacing: -.03em; color: #1E3A5F; }
.cand-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: #5A6B80; }
.cand-party { padding: 1px 8px; border: 1px solid #DDD0B8; border-radius: 999px; color: #1E3A5F; font-weight: 700; }
.cand h4 { margin: 14px 0 6px; font-size: 14px; color: #1E3A5F; }
.cand ul { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.75; color: #1E3A5F; word-break: keep-all; }
.cand-pending { margin-top: 12px; padding: 10px 12px; background: #FFF3E3; border-radius: 6px; font-size: 13px; color: #5A6B80; }
.cand-note { margin-top: 12px; font-size: 12px; color: #7A8AA0; line-height: 1.6; }
.cand-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cand-links a { display: inline-block; padding: 8px 12px; border: 1px solid #1E3A5F; border-radius: 6px; color: #1E3A5F; font-size: 13px; text-decoration: none; min-height: 36px; box-sizing: border-box; }
.cand-links a.primary { background: #1E3A5F; color: #fff; }
.cand-links a:hover { background: #152C4A; color: #fff; }
.election-note { color: #5A6B80; font-size: 12px; line-height: 1.7; margin-bottom: 12px; }
.election-status { color: #5A6B80; padding: 40px 0; text-align: center; }
@media (max-width: 640px) { .race-title { font-size: 18px; } .race > summary { padding: 16px 0; } }
.cmp { margin-top: 8px; border: 1px solid #EADFCB; border-radius: 8px; overflow: hidden; background: #fff; }
.cmp-row { display: grid; grid-template-columns: 110px repeat(var(--n), minmax(0,1fr)); }
.cmp-row > div { padding: 12px 14px; font-size: 14px; line-height: 1.7; border-top: 1px solid #FDEFDD; border-left: 1px solid #FDEFDD; word-break: keep-all; color: #1E3A5F; }
.cmp-row > div:first-child { border-left: 0; background: #FFF3E3; font-weight: 700; color: #1E3A5F; font-size: 13px; }
.cmp-head > div { border-top: 0; background: #1E3A5F !important; color: #fff !important; font-weight: 700; font-size: 15px; }
.cmp-head small { display: block; font-weight: 400; font-size: 12px; opacity: .85; }
.cmp-na { color: #9AA9BC !important; font-size: 13px !important; }
.cmp-h { margin: 18px 0 4px; font-size: 15px; color: #1E3A5F; }
.cand-en { font-weight: 400; font-size: 13px; color: #7A8AA0; margin-left: 6px; }

.election-end { margin-top: 36px; padding-top: 8px; border-top: 2px solid #1E3A5F; }
.election-end h2 { font-family: 'Pretendard Variable','Pretendard','Noto Sans KR',-apple-system,system-ui,sans-serif; font-weight: 800; font-size: 18px; margin: 18px 0 8px; color: #1E3A5F; }
.election-sources { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.8; color: #2A4766; }
.election-sources a { color: #1E3A5F; }
.election-legal { font-size: 13px; line-height: 1.8; color: #2A4766; }

.ai-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #fff3cd; border: 1px solid #e0c46c; color: #7a5b00; font-size: 11px; font-weight: 700; vertical-align: middle; }
.stmt { margin-top: 6px; }
.st { margin: 0 0 12px; }
.st-ko { display: block; font-size: 16.5px; line-height: 1.75; color: #1d2823; word-break: keep-all; }
.st-en { display: block; margin-top: 2px; font-size: 12px; line-height: 1.5; color: #8a928c; }
.st-hold { display: block; font-size: 13px; color: #9a6a00; }

.election-updated { margin: 4px 0 10px; color: #1E3A5F; font-size: 13px; font-weight: 700; }
.election-tabs { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.election-tabs button { padding: 10px 18px; border: 1px solid #1E3A5F; border-radius: 999px; background: #fff; color: #1E3A5F; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 44px; font-family: inherit; }
.election-tabs button[aria-selected="true"] { background: #1E3A5F; color: #fff; }
.election-sec { font-family: 'Pretendard Variable','Pretendard','Noto Sans KR',-apple-system,system-ui,sans-serif; font-weight: 800; font-size: 22px; letter-spacing: -.04em; margin: 30px 0 2px; color: #1E3A5F; }
.election-sec-sub { margin: 0 0 8px; color: #5A6B80; font-size: 13.5px; }
.local-controls { margin: 8px 0 6px; }
.local-controls input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid #DDD0B8; border-radius: 8px; font-size: 15px; font-family: inherit; min-height: 44px; }
.local-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.local-chips button { padding: 6px 14px; border: 1px solid #DDD0B8; border-radius: 999px; background: #fff; color: #1E3A5F; font-size: 14px; cursor: pointer; min-height: 36px; font-family: inherit; }
.local-chips button.on { background: #1E3A5F; color: #fff; border-color: #1E3A5F; }
.city-head { font-family: 'Pretendard Variable','Pretendard','Noto Sans KR',-apple-system,system-ui,sans-serif; font-weight: 800; font-size: 19px; margin: 22px 0 0; padding-bottom: 8px; border-bottom: 2px solid #1E3A5F; color: #1E3A5F; }
.city-head small { margin-left: 8px; font-family: inherit; font-size: 12px; color: #7A8AA0; font-weight: 400; }
.local-note { margin-top: 18px; }
.prop { border-bottom: 1px solid #EADFCB; }
.prop > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 4px 12px; align-items: center; padding: 16px 0; }
.prop > summary::-webkit-details-marker { display: none; }
.prop .num { grid-row: 1 / span 2; background: #1E3A5F; color: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.prop .ptitle { font-size: 17px; line-height: 1.5; color: #1E3A5F; word-break: keep-all; }
.prop .kind { grid-column: 2; color: #7A8AA0; font-size: 12px; }
.prop-body { padding: 0 0 22px; }
.prop .vote, .prop .args { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prop .vote > div, .prop .args > div { border-radius: 8px; padding: 12px 14px; font-size: 15px; line-height: 1.7; word-break: keep-all; }
.prop .yes { background: #DCEEEA; border: 1px solid #b9d8c4; }
.prop .no { background: #f7ece9; border: 1px solid #e3c2ba; }
.prop .vote p, .prop .args p { margin: 4px 0 0; }
.prop .args { margin-top: 12px; }
.prop .args > div { background: #FFF8EE; border: 1px solid #e6e7df; }
.prop .args h4 { margin: 0; font-size: 14px; color: #1E3A5F; }
.prop .args p { font-size: 14.5px; }
.prop-more { margin-top: 12px; font-size: 14px; line-height: 1.75; color: #1E3A5F; word-break: keep-all; }
.prop .org, .prop .src { margin: 10px 0 0; font-size: 12.5px; color: #5A6B80; line-height: 1.7; }
.prop .src a { color: #1E3A5F; }
@media (max-width: 640px) { .prop .ptitle { font-size: 16px; } }

.cand-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.cand-grid .cand { margin-top: 14px; min-width: 0; }
.side-note { margin-top: 4px; }


/* Mobile: keep left/right comparison (two columns) with compact type */
@media (max-width: 640px) {
  .cmp-row { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
  .cmp-row > div:first-child { grid-column: 1 / -1; padding: 6px 10px; font-size: 12px; border-left: 0; }
  .cmp-row > div { padding: 8px 10px; font-size: 12.5px; line-height: 1.6; }
  .cmp-head > div:first-child { display: none; }
  .cmp-head > div { font-size: 13px; text-align: center; }
  .cand-grid { gap: 8px; }
  .cand-grid .cand { padding: 10px; }
  .cand-grid .cand h3 { font-size: 15px; }
  .cand-grid .cand-en { display: block; margin: 2px 0 0; }
  .cand-grid .cand ul { padding-left: 14px; font-size: 12.5px; line-height: 1.65; }
  .cand-grid .cand h4 { font-size: 12.5px; }
  .cand-grid .cand-tags { font-size: 11px; }
  .cand-grid .cand-links a { padding: 6px 8px; font-size: 12px; min-height: 32px; }
  .cand-grid .cand-note, .cand-grid .cand-pending { font-size: 11px; }
  .cand-grid .st-ko { font-size: 13.5px; line-height: 1.65; }
  .cand-grid .st-en { font-size: 10.5px; }
  .prop .vote, .prop .args { gap: 8px; }
  .prop .vote > div, .prop .args > div { padding: 9px 10px; font-size: 13px; line-height: 1.65; }
  .prop .args p { font-size: 12.5px; }
  .prop-more { font-size: 13px; }
}

.cand-list .cand { margin-top: 14px; }

.city-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.district-link { margin-left: auto; font-family: inherit; font-size: 12.5px; font-weight: 700; color: #1E3A5F; text-decoration: underline; }

.sc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; border: 1px solid #EADFCB; border-radius: 8px; background: #fff; }
.sc { min-width: calc(110px + var(--n) * 240px); }
.sc-row { display: grid; grid-template-columns: 110px repeat(var(--n), minmax(220px, 1fr)); }
.sc-row > div { padding: 12px 14px; border-top: 1px solid #FDEFDD; border-left: 1px solid #FDEFDD; }
.sc-row > div:first-child { border-left: 0; }
.sc-topic { background: #FFF3E3; font-weight: 700; color: #1E3A5F; font-size: 13px; }
.sc-head > div { background: #1E3A5F; color: #fff; font-weight: 700; font-size: 15px; border-top: 0; position: sticky; top: 0; }
.sc-head > .sc-topic { background: #1E3A5F; }
.sc-cell .st { margin-bottom: 10px; }
.sc-cell .st-ko { font-size: 14.5px; line-height: 1.7; }
.sc-na { color: #9AA9BC; font-size: 13px; }
@media (max-width: 640px) {
  .sc { min-width: 0; width: calc(70px + var(--n) * (100vw - 112px)); max-width: none; }
  .sc-row { grid-template-columns: 70px repeat(var(--n), calc(100vw - 112px)); }
  .sc-row > div { padding: 9px 10px; }
  .sc-cell .st-ko { font-size: 13.5px; }
  .sc-topic { font-size: 12px; }
  .sc-scroll { scroll-snap-type: x proximity; }
}
.sc-cell { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 640px) { .sc-row > .sc-topic { position: sticky; left: 0; z-index: 2; } }

.st-dup .st-ko { color: #6b756e; font-size: 13px; }
.st-dupnote { display: block; font-size: 11px; color: #9a6a00; margin-bottom: 2px; }

.st-note { display: block; margin-top: 2px; font-size: 11.5px; color: #9a6a00; }
.st-major { color: #b3261e; font-weight: 700; }

.stmt-full { margin-top: 12px; font-size: 14px; }
.stmt-full > summary { cursor: pointer; color: #1E3A5F; font-weight: 700; }
.cand h4 { display: flex; align-items: center; gap: 6px; }

.off-badge { background: #DCEEEA; border-color: #9fc8ad; color: #1f5a3a; }

.pname { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.pname:hover, .pname:focus { color: #1E3A5F; text-decoration-style: solid; outline: none; }
.cmp-head .pname, .sc-head .pname { color: #fff; }
.pop-back { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pop { background: #fff; border-radius: 14px; max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 18px 18px 22px; position: relative; -webkit-overflow-scrolling: touch; }
.pop .cand { border: 0; box-shadow: none; padding: 0; margin: 0; }
.pop-x { position: sticky; top: 0; float: right; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #1E3A5F; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.pop-race { margin: 0 0 8px; color: #5A6B80; font-size: 13px; }
body.pop-open { overflow: hidden; }

.oname { font-weight: inherit; }
.oinfo { color: #1E3A5F; font-size: 13px; opacity: .8; }

.vote-info { background: #fff; border: 1px solid #d9e2dc; border-radius: 12px; margin: 0 0 22px; }
.vote-info > summary { cursor: pointer; padding: 14px 16px; font-weight: 800; font-size: 18px; color: #1E3A5F; list-style: none; }
.vote-info > summary small { display: block; font-weight: 400; font-size: 13px; color: #5A6B80; margin-top: 2px; }
.vote-body { padding: 0 16px 16px; }
.vote-body h4 { margin: 14px 0 8px; }
.vdates, .vsteps { list-style: none; margin: 0; padding: 0; }
.vdates li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid #DCEEEA; }
.vdates li.past { opacity: .55; }
.vdates li.next { background: #EBF5F2; margin: 0 -8px; padding: 10px 8px; border-radius: 8px; }
.vd { min-width: 78px; display: flex; flex-direction: column; gap: 4px; }
.vt { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #DCEEEA; color: #444; width: fit-content; }
.vt-next, .vt-now { background: #1E3A5F; color: #fff; }
.vt-past { background: #e6e6e6; color: #777; }
.vdates p, .vsteps p { margin: 3px 0 0; font-size: 14px; color: #444; }
.vsteps li { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.sn { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #1E3A5F; color: #fff; text-align: center; line-height: 26px; font-weight: 700; font-size: 14px; }

.prop .vote > div, .prop .args > div, .prop-more p { overflow-wrap: anywhere; min-width: 0; }

.election-tabs { flex-wrap: nowrap; gap: 6px; }
.election-tabs button { padding: 10px 12px; font-size: 14px; flex: 0 1 auto; white-space: nowrap; }
@media (max-width: 420px) { .election-tabs button { padding: 10px 10px; font-size: 13.5px; } }

/* proposition cards: make clickability obvious */
.prop { border: 1px solid #cfd8d2; border-radius: 12px; background: #fff; margin: 10px 0; transition: box-shadow .15s, border-color .15s; }
.prop:hover { border-color: #1E3A5F; box-shadow: 0 2px 10px rgba(30,58,95,.12); }
.prop[open] { border-color: #1E3A5F; box-shadow: 0 2px 12px rgba(30,58,95,.14); }
.prop > summary { padding: 14px 14px; grid-template-columns: auto minmax(0,1fr) auto; }
.prop .num { grid-row: 1 / span 2; }
.prop .ptitle { grid-column: 2; }
.prop .kind { grid-column: 2; }
.prop-cta { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #1E3A5F; font-size: 12px; font-weight: 700; text-align: center; min-width: 52px; }
.prop-cta .chev { width: 28px; height: 28px; border-radius: 50%; background: #DCEEEA; position: relative; display: block; }
.prop-cta .chev::after { content: ""; position: absolute; left: 9px; top: 8px; width: 7px; height: 7px; border-right: 2.5px solid #1E3A5F; border-bottom: 2.5px solid #1E3A5F; transform: rotate(45deg); transition: transform .15s; }
.prop[open] .chev::after { transform: rotate(-135deg); top: 12px; }
.prop .cta-close { display: none; }
.prop[open] .cta-open { display: none; }
.prop[open] .cta-close { display: inline; }
.prop-body { padding: 0 14px 18px; }
.prop-hint { background: #EBF5F2; border-left: 4px solid #1E3A5F; }
@media (max-width: 480px) { .prop-cta { min-width: 40px; } .prop-cta .cta-open, .prop-cta .cta-close { font-size: 11px; } }
@media (max-width: 560px) {
  .prop > summary { grid-template-columns: auto minmax(0,1fr); gap: 6px 12px; }
  .prop .num { grid-row: 1 / span 2; }
  .prop-cta { grid-column: 1 / -1; grid-row: auto; flex-direction: row; justify-content: center; gap: 8px; margin-top: 6px; padding: 9px 10px; background: #DCEEEA; border-radius: 10px; font-size: 14px; }
  .prop-cta .cta-open, .prop-cta .cta-close { font-size: 14px; }
  .prop-cta .chev { width: 22px; height: 22px; background: transparent; }
  .prop-cta .chev::after { left: 6px; top: 4px; }
  .prop[open] .chev::after { top: 8px; }
}
