:root{--brand:#1145a8;--brand-dark:#002d7a;--brand-soft:#e6f1fb;--ink:#1e293b;--muted:#64748b;--line:#e2e8f0;--bg:#eef2f7;--red:#b91c1c}*{box-sizing:border-box}body{color:var(--ink);background:var(--bg);margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:14px}h1{margin:0;font-size:22px}h2{margin:0 0 12px;font-size:16px}.muted{color:var(--muted)}.center{place-items:center;min-height:100vh;padding:24px;display:grid}.shell{min-height:100vh;display:flex}.sidebar{border-right:1px solid var(--line);background:#fff;flex-direction:column;flex-shrink:0;width:220px;height:100vh;display:flex;position:sticky;top:0}.brand{color:var(--brand-dark);align-items:center;gap:10px;padding:18px 16px;font-size:17px;font-weight:700;display:flex}.brand small{letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-size:11px;font-weight:600;display:block}.brand-mark{background:linear-gradient(135deg, var(--brand), var(--brand-dark));color:#fff;letter-spacing:.02em;border-radius:10px;place-items:center;width:36px;height:36px;font-size:12px;display:grid}.sidebar nav{flex:1;padding:0 8px;overflow-y:auto}.nav-item{color:var(--ink);border-radius:8px;margin-bottom:2px;padding:9px 12px;text-decoration:none;display:block}.nav-item:hover{background:var(--bg)}.nav-item.active{background:var(--brand);color:#fff;font-weight:600}.sidebar-foot{border-top:1px solid var(--line);padding:12px}.who{flex-direction:column;margin-bottom:8px;display:flex}.who span{color:var(--muted);font-size:12px}.main{flex:1;min-width:0}.topbar{border-bottom:1px solid var(--line);background:#fff;align-items:center;gap:10px;padding:12px 24px;display:flex}.topbar label{color:var(--muted)}.constituency-name{font-weight:600}.page{max-width:1200px;padding:24px}.page-head{justify-content:space-between;align-items:center;margin-bottom:8px;display:flex}.card{border:1px solid var(--line);background:#fff;border-radius:12px;margin-top:16px;padding:16px}.cards{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;display:grid}.stat span{color:var(--muted);font-size:12px;display:block}.stat strong{font-size:24px}.bar-head{justify-content:space-between;margin-bottom:8px;display:flex}.bar{background:var(--bg);border-radius:6px;height:10px;overflow:hidden}.bar div{background:var(--brand);height:100%}.btn{font:inherit;border:1px solid var(--line);color:var(--ink);cursor:pointer;background:#fff;border-radius:8px;padding:8px 14px}.btn:hover:not(:disabled){background:var(--bg)}.btn:disabled{opacity:.6;cursor:default}.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:600}.btn.primary:hover:not(:disabled){background:var(--brand-dark)}.btn.ghost{width:100%}input,select{font:inherit;border:1px solid var(--line);color:var(--ink);background:#fff;border-radius:8px;padding:8px 10px}input:focus,select:focus{outline:2px solid var(--brand);outline-offset:-1px}label{color:var(--muted);font-size:12px}.grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin-bottom:12px;display:grid}.field{flex-direction:column;gap:4px;display:flex}.alert{color:var(--red);background:#fef2f2;border-radius:8px;margin:12px 0;padding:10px 12px}.notice{color:#166534;white-space:pre-wrap;background:#ecfdf3;border-radius:8px;margin:12px 0;padding:10px 12px}.btn.danger{color:var(--red)}.actions{justify-content:flex-end;gap:6px;display:flex}.actions .btn{padding:5px 10px}.table-card{padding:0;overflow-x:auto}table{border-collapse:collapse;width:100%}th,td{text-align:left;border-bottom:1px solid var(--line);white-space:nowrap;padding:10px 14px}th{color:var(--muted);background:#f8fafc;font-size:12px}tr:last-child td{border-bottom:none}.num{text-align:right;font-variant-numeric:tabular-nums}.empty{text-align:center;color:var(--muted);padding:28px}tr.clickable{cursor:pointer}tr.clickable:hover td{background:#f8fafc}.filters{flex-wrap:wrap;align-items:flex-end;gap:12px;display:flex}.filters .grow{flex:1;min-width:240px}.tabs{flex-wrap:wrap;gap:8px;margin:16px 0 12px;display:flex}.counts{flex-wrap:wrap;align-items:center;gap:28px;margin-top:16px;display:flex}.counts span{color:var(--muted);font-size:12px;display:block}.counts strong{font-size:20px}.counts .btn{margin-left:auto}.pager{justify-content:flex-end;align-items:center;gap:12px;margin-top:12px;display:flex}.modal-back{z-index:10;background:#0f172a73;place-items:center;padding:24px;display:grid;position:fixed;inset:0}.modal{background:#fff;border-radius:12px;width:100%;max-width:760px;max-height:calc(100vh - 48px);padding:20px;overflow-y:auto}.details{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px 16px;margin:12px 0 0;display:grid}.details dt{color:var(--muted);font-size:12px}.details dd{overflow-wrap:anywhere;margin:2px 0 0}.progress{align-items:center;gap:8px;min-width:140px;display:flex}.progress .bar{flex:1;height:6px}.progress span{text-align:right;font-variant-numeric:tabular-nums;width:36px;color:var(--muted)}.bar.done div{background:#16a34a}.alert-text{color:var(--red);font-weight:600}.with-button{gap:6px;display:flex}.with-button input{flex:1;min-width:0}.creds{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.creds span,.creds small{display:block}.creds small{margin-top:6px}.modal.picker{flex-direction:column;max-width:620px;display:flex;overflow:hidden}.picker-list{border:1px solid var(--line);border-radius:8px;flex:1;overflow-y:auto}.picker-row{border-bottom:1px solid var(--line);color:var(--ink);cursor:pointer;align-items:flex-start;gap:10px;padding:10px 12px;font-size:14px;display:flex}.picker-row:last-child{border-bottom:none}.picker-row:hover{background:#f8fafc}.picker-row input{margin-top:3px}.picker-row small{color:var(--muted);margin-top:2px;display:block}.login-wrap{place-items:center;min-height:100vh;padding:24px;display:grid}.login{flex-direction:column;gap:6px;width:100%;max-width:360px;margin:0;padding:24px;display:flex}.login input{margin-bottom:8px}.login .btn{margin-top:8px}.view-switch{border:1px solid var(--line);background:#fff;border-radius:999px;flex-wrap:wrap;gap:4px;margin-bottom:18px;padding:4px;display:inline-flex}.view-switch button{font:inherit;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:999px;padding:7px 18px;font-weight:600}.view-switch button:hover{color:var(--ink)}.view-switch button.active{background:var(--brand);color:#fff}.hero{background:linear-gradient(120deg, var(--brand-dark), var(--brand));color:#fff;border-radius:16px;grid-template-columns:minmax(200px,1.2fr) minmax(240px,1.4fr) auto;align-items:center;gap:20px 32px;padding:22px 26px;display:grid}.hero h1{margin:2px 0 4px;font-size:26px}.hero p{opacity:.85;margin:0}.eyebrow{letter-spacing:.06em;text-transform:uppercase;opacity:.75;font-size:12px}.hero-figures{flex-wrap:wrap;gap:12px 32px;display:flex}.hero-figures div{flex-direction:column;display:flex}.hero-figures strong{font-size:26px;line-height:1.1}.hero-figures span{opacity:.8;font-size:13px}.hero-progress{background:#ffffff1a;border-radius:12px;align-items:center;gap:14px;padding:10px 16px 10px 10px;display:flex}.hero-progress div{flex-direction:column;display:flex}.hero-progress span{opacity:.85;font-size:13px}.ring circle{fill:none;stroke-width:7px}.ring-track{stroke:#ffffff40}.ring-fill{stroke:#fff;stroke-linecap:round}.ring text{fill:#fff;font-size:15px;font-weight:700}.sync-row{align-items:center;gap:8px;margin:12px 4px 4px;font-size:13px;display:flex}.sync-dot{background:#16a34a;border-radius:50%;width:8px;height:8px;box-shadow:0 0 0 3px #dcfce7}.sync-dot.off{background:var(--red);box-shadow:0 0 0 3px #fee2e2}.link-btn{font:inherit;color:var(--brand);cursor:pointer;background:0 0;border:0;padding:0;font-weight:600}.link-btn:disabled{color:var(--muted);cursor:default}.metric-groups{grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px;margin-top:16px;display:grid}.metric-group{--tone:var(--brand);--tone-soft:var(--brand-soft);border:1px solid var(--line);border-top:3px solid var(--tone);background:#fff;border-radius:12px;padding:14px 16px 16px}.metric-group.tone-violet{--tone:#6d28d9;--tone-soft:#f1ebfd}.metric-group.tone-rose{--tone:#993556;--tone-soft:#fbeaf0}.metric-group.tone-green{--tone:#1a7a3e;--tone-soft:#e1f5ee}.metric-group h2{letter-spacing:.05em;text-transform:uppercase;color:var(--tone);font-size:13px}.metrics{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;display:grid}.metric{background:var(--tone-soft);border-radius:8px;flex-direction:column;gap:2px;padding:10px 12px;display:flex}.metric span{color:var(--muted);font-size:12px}.metric strong{font-size:20px}.metric-bar{background:#0f172a14;border-radius:2px;height:4px;margin-top:4px;overflow:hidden}.metric-bar div{background:var(--tone);border-radius:2px;height:100%}.metric small{color:var(--muted);font-size:11px}.section-title{margin:28px 0 0;font-size:17px}.section-title.flush{margin:0}.special{margin-top:28px}.special-list{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;display:grid}.special-item{border:1px solid var(--line);background:#fff;border-radius:12px;align-items:center;gap:14px;padding:14px 16px;display:flex}.special-item .badge{background:var(--brand-soft);width:44px;height:44px;color:var(--brand);border-radius:50%;flex-shrink:0;place-items:center;font-weight:700;display:grid}.special-item div{flex-direction:column;display:flex}.special-item strong{font-size:20px}.special-item small{color:var(--muted)}@media (width<=900px){.hero{grid-template-columns:minmax(0,1fr)}}@media (width<=600px){.hero{padding:18px}.metric-groups{grid-template-columns:minmax(0,1fr)}}.chart-grid{grid-template-columns:repeat(auto-fit,minmax(420px,1fr));gap:16px;margin-top:20px;display:grid}.chart-card{border:1px solid var(--line);background:#fff;border-radius:10px;min-width:0;padding:16px;box-shadow:0 2px 6px #0f172a0f}.chart-card.wide{grid-column:1/-1}.chart-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px;display:flex}.chart-head h2{margin:0}.booth-filter{text-align:left;min-width:160px;color:var(--muted)}.chart-summary{border:1px solid var(--line);background:#f8fafc;border-radius:8px;flex-wrap:wrap;gap:4px 16px;padding:8px 12px;font-size:13px;display:flex}.chart-fields{border-bottom:1px solid var(--line);flex-wrap:wrap;gap:2px 20px;margin-top:8px;display:flex}.field-tab{padding:8px 2px;font-size:13px}.chart-tools{flex-wrap:wrap;align-items:center;gap:8px 12px;margin:12px 0;display:flex}.btn.small,select.small{font:inherit;border-radius:6px;padding:5px 10px;font-size:13px}select.small{border:1px solid var(--line);background:#fff}.check{align-items:center;gap:6px;font-size:13px;display:inline-flex}.color-pick{border:1px solid var(--line);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:3px 8px 3px 4px;font-size:12px;display:inline-flex}.color-pick input{cursor:pointer;background:0 0;border:0;width:22px;height:22px;padding:0}.seg{border:1px solid var(--line);border-radius:6px;margin-left:auto;display:inline-flex;overflow:hidden}.seg button{font:inherit;border:0;border-left:1px solid var(--line);color:var(--ink);cursor:pointer;background:#fff;padding:5px 10px;font-size:13px}.seg button:first-child{border-left:0}.seg button.active{background:var(--brand);color:#fff}.chart-box{position:relative;overflow-x:auto}.chart-box svg{display:block}.chart-axes text{fill:var(--muted);font-size:11px}.chart-axes .axis-title{fill:var(--ink);font-size:12px;font-weight:600}.chart-axes .grid{stroke:var(--line);stroke-dasharray:3 3}.chart-axes .baseline{stroke:#cbd5e1}.crosshair{stroke:#94a3b8;stroke-dasharray:3 3}.chart-tip{background:var(--ink);color:#fff;white-space:nowrap;pointer-events:none;z-index:2;border-radius:6px;align-items:center;gap:6px;padding:6px 10px;font-size:12px;display:flex;position:absolute;transform:translate(-50%,calc(-100% - 10px))}.chart-swatch{border-radius:3px;flex-shrink:0;width:10px;height:10px;display:inline-block}.pie-wrap{flex-wrap:wrap;justify-content:center;align-items:center;gap:16px 32px;padding:8px 0;display:flex}.pie-box{overflow:visible}.legend{flex-direction:column;gap:6px;margin:0;padding:0;font-size:13px;list-style:none;display:flex}.legend li{align-items:center;gap:8px;display:flex}.legend strong{margin-left:auto;padding-left:12px}.chart-table{border:1px solid var(--line);border-radius:8px;max-height:320px;overflow-y:auto}.chart-empty{place-items:center;min-height:200px;display:grid}.stats-block{margin-top:20px}.stats-strip{border:1px solid var(--line);background:#fff;border-radius:10px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));display:grid;box-shadow:0 2px 6px #0f172a0f}.stats-strip>div{border-left:1px solid var(--line);flex-direction:column;gap:2px;padding:14px 18px;display:flex}.stats-strip>div:first-child{border-left:0}.stats-strip strong{font-size:20px}.stats-strip span{color:var(--brand);font-weight:600}.stats-strip small{color:var(--muted)}@media (width<=600px){.chart-grid{grid-template-columns:minmax(0,1fr)}.seg{margin-left:0}}.pollday:fullscreen{background:var(--bg);padding:24px;overflow-y:auto}.page-title{margin-bottom:14px}.poll-bar{flex-wrap:wrap;align-items:center;gap:10px 12px;margin-bottom:14px;display:flex}.poll-bar-end{gap:8px;margin-left:auto;display:flex}.sync-row.inline{margin:0}.sync-dot.busy{background:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}.turnout-band{background:linear-gradient(120deg, var(--brand-dark), var(--brand));color:#fff;border-radius:16px;grid-template-columns:minmax(240px,1.3fr) minmax(260px,1fr);align-items:center;gap:18px 36px;padding:22px 26px;display:grid}.turnout-main{flex-direction:column;gap:6px;display:flex}.turnout-main strong{font-size:40px;line-height:1.05}.turnout-track{background:#ffffff38;border-radius:5px;height:10px;overflow:hidden}.turnout-track div{background:#fff;border-radius:5px;height:100%}.turnout-figures{flex-wrap:wrap;gap:12px 32px;display:flex}.turnout-figures div{flex-direction:column;display:flex}.turnout-figures strong{font-size:26px;line-height:1.1}.turnout-figures span{opacity:.8;font-size:13px}.metric strong em{color:var(--muted);font-size:13px;font-style:normal;font-weight:500}.note{margin:8px 0 0;font-size:12px}.seg.left{margin-left:0}.small-input{font:inherit;border:1px solid var(--line);border-radius:6px;min-width:180px;padding:5px 10px;font-size:13px}.push-right{margin-left:auto}.chart-table.tall{max-height:520px}.chart-table thead th{z-index:1;position:sticky;top:0}.th-sort{font:inherit;color:inherit;cursor:pointer;background:0 0;border:0;padding:0}.th-sort:hover{color:var(--ink)}.tag-weak{color:#993556;background:#fbeaf0;border-radius:999px;padding:1px 8px;font-size:11px;font-weight:600}.booth-turnout{margin-top:16px}@media (width<=900px){.turnout-band{grid-template-columns:minmax(0,1fr)}}@media (width<=600px){.poll-bar-end{margin-left:0}.turnout-main strong{font-size:32px}}.booth-turnout .progress span{width:auto;min-width:44px}.booth-turnout .progress .tag-weak{min-width:0}.insights:fullscreen{background:var(--bg);padding:24px;overflow-y:auto}.insights-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:12px 24px;display:flex}.insights-head p{max-width:620px;margin:4px 0 0}.insights-actions{flex-wrap:wrap;gap:8px;display:flex}.insight-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px 12px;margin-bottom:10px;display:flex}.insight-head h2{margin:0 0 6px}.insight-meta{flex-wrap:wrap;gap:4px 6px;display:flex}.chip{text-overflow:ellipsis;white-space:nowrap;background:var(--brand-soft);max-width:260px;color:var(--brand-dark);border-radius:999px;padding:2px 9px;font-size:11px;font-weight:600;overflow:hidden}.chip.filter{color:#6d28d9;background:#f1ebfd}.insight-actions{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.icon-btn{font:inherit;border:1px solid var(--line);width:28px;height:28px;color:var(--ink);cursor:pointer;background:#fff;border-radius:6px}.icon-btn:hover:not(:disabled){background:var(--bg)}.icon-btn:disabled{opacity:.4;cursor:default}.legend.row{flex-flow:wrap;gap:4px 14px;margin-bottom:6px;font-size:12px}.tip-list{flex-direction:column;gap:3px;display:flex}.tip-list span{align-items:center;gap:6px;display:flex}.modal.editor{max-width:820px}.editor-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:12px 0;display:grid}.editor-section{border-top:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:10px;padding:12px 0;display:flex}.editor-section.column{flex-direction:column;align-items:stretch}.editor-label{color:var(--muted);font-size:12px;font-weight:600}.filter-add{flex-wrap:wrap;gap:8px;display:flex}.filter-row{border:1px solid var(--line);background:#f8fafc;border-radius:8px;padding:10px 12px}.filter-row-head{flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:8px;display:flex}.filter-row-head .small-input{margin-left:auto}.filter-values{flex-wrap:wrap;gap:6px;max-height:160px;display:flex;overflow-y:auto}.value-chip{border:1px solid var(--line);color:var(--ink);cursor:pointer;background:#fff;border-radius:999px;align-items:center;gap:5px;padding:3px 10px 3px 6px;font-size:12px;display:inline-flex}.value-chip input{margin:0}.value-chip small{color:var(--muted)}.value-chip.on{border-color:var(--brand);background:var(--brand-soft)}.coverage-scope{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 10px;margin-bottom:10px;font-size:13px;display:flex}.coverage-list-head{color:var(--muted);justify-content:space-between;align-items:center;gap:10px;margin:14px 0 8px;font-size:12px;font-weight:600;display:flex}.coverage-list-head .small-input{width:150px;min-width:0}.coverage-list{border:1px solid var(--line);border-radius:8px;max-height:240px;margin:0;padding:0;list-style:none;overflow-y:auto}.coverage-list li{border-bottom:1px solid var(--line)}.coverage-list li:last-child{border-bottom:0}.coverage-list li.muted{padding:10px 12px}.coverage-list button{width:100%;font:inherit;color:var(--ink);text-align:left;cursor:pointer;background:#fff;border:0;justify-content:space-between;align-items:center;gap:10px;padding:8px 12px;font-size:13px;display:flex}.coverage-list button:hover{background:var(--tone-soft)}.coverage-list button.active{background:var(--tone-soft);box-shadow:inset 3px 0 0 var(--tone)}.coverage-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.coverage-name span{color:var(--muted)}.coverage-nums{color:var(--muted);font-variant-numeric:tabular-nums;flex-shrink:0;gap:10px;font-size:11px;display:flex}
