@import url('taipei-electorate.css');
:root{--orange:#c45e32;--paper:#faf7ef;--other:#887b68}h1{font-size:clamp(40px,6.4vw,82px)}.electorate-cover{margin:30px 0}.electorate-cover img{width:100%;height:auto;border-radius:4px}figcaption,.caption{font-size:12px;color:#666}.seat-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.seat-card{padding:22px;background:#fffdf8;border:1px solid var(--line);text-align:left;color:var(--ink)}.seat-card strong{display:block;font-size:34px;color:var(--orange)}.seat-card h3{margin:0}.seat-card p{font-size:13px}.controls{display:flex;gap:20px;flex-wrap:wrap;padding:20px;background:#f0e8db}.controls label{display:flex;flex-direction:column;font-size:13px;gap:5px}select{font:inherit;padding:10px;min-width:160px}.examples{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.examples button{padding:8px 13px;background:transparent;border:1px solid var(--line);font:inherit;font-size:13px}.ballot{padding:20px 0;border-bottom:1px solid var(--line)}.ballot button{width:100%;display:grid;grid-template-columns:120px 1fr;gap:25px;text-align:left;border:0;background:transparent;color:inherit;font:inherit;padding:5px}.ballot .date{font-size:26px;font-weight:800}.ballot .date small{display:block;font-size:13px;font-weight:400}.stack{height:24px;display:flex;width:100%;overflow:hidden;border-radius:3px}.stack span{height:100%;min-width:0}.labels{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:13px;margin-top:10px}.result-note{font-size:12px;color:#666}.detail{background:#f1eadf;padding:20px;margin:16px 0 0 145px}.detail[hidden]{display:none}table{width:100%;font-size:14px;border-collapse:collapse}th,td{text-align:left;padding:8px;border-bottom:1px solid var(--line)}.lead{max-width:850px;line-height:1.95}section .lead+ .lead{margin-top:24px}:focus-visible{outline:3px solid var(--orange);outline-offset:4px}@media(max-width:720px){.seat-cards{grid-template-columns:1fr 1fr}.seat-card{padding:13px}.seat-card h3{font-size:16px}.ballot button{grid-template-columns:65px 1fr;gap:10px}.ballot .date{font-size:22px}.detail{margin-left:0;padding:12px}.chapter-nav{flex-wrap:wrap}.controls{gap:12px}.controls label{flex:1;min-width:130px}select{min-width:0;width:100%}h1{letter-spacing:-2px}.legend{font-size:11px}}
@media(max-width:720px){.intro{grid-template-columns:1fr;gap:12px}.intro p:first-child{margin-bottom:0}nav span{font-size:10px;letter-spacing:0}.chapter-nav a{font-size:12px}.lead{font-size:17px}}

.matrix-scroll{overflow:auto;max-height:680px;margin:24px 0 0;border:1px solid var(--line)}#matrix{min-width:960px;font-size:12px;table-layout:fixed}#matrix th,#matrix td{padding:3px;border:0}#matrix th:first-child{width:155px;position:sticky;left:0;background:var(--paper);z-index:2}#matrix thead th{position:sticky;top:0;background:var(--paper);z-index:3;text-align:center;padding:12px 3px}#matrix thead th:first-child{z-index:4}#matrix th small{display:block;font-weight:400}#matrix tbody th{font-weight:400;white-space:nowrap}.matrix-cell{display:block;width:100%;height:30px;border:0;border-radius:3px;cursor:pointer}.matrix-cell:hover,.matrix-cell.selected{box-shadow:inset 0 0 0 2px #252923}.matrix-info{padding:16px;background:#eee8db;min-height:80px;font-size:14px;line-height:1.8;margin-bottom:26px}#matrix .matrix-cell:focus-visible{outline:2px solid #252923;outline-offset:0}@media(max-width:720px){.matrix-scroll{max-height:500px}#matrix th:first-child{width:130px}.matrix-info{font-size:13px}}
