/* Fit the overview to a desktop viewport without zooming, clipping content or
   changing data. Longer operational tools remain in Filters & details. */
.top .branding-arrival{animation:none}
.brand-choice-logo{width:36px;height:36px;object-fit:contain;flex:none;border-radius:4px;background:#fff;padding:2px}
.branding-arrival .application-brand-symbol{animation:brand-arrive 900ms ease-out both}
@keyframes brand-arrive{from{opacity:.4;transform:translateX(-8px) scale(.94)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.branding-arrival .application-brand-symbol{animation:none!important}}

@media(min-width:1200px){
 body.desktop-fit #app{height:100dvh;display:flex;flex-direction:column}
 .desktop-fit .top{flex:none;min-height:58px;padding:5px 16px;gap:12px}
 .desktop-fit .national-brand{gap:10px;min-width:0;flex:1}
 .desktop-fit .national-brand-copy{min-width:0;display:flex;flex-direction:column;gap:1px}
 .desktop-fit .national-brand-copy strong{font-size:16px;line-height:1.2;letter-spacing:.02em}
 .desktop-fit .national-brand-copy .republic-name{font-size:10px;line-height:1.25;letter-spacing:.08em}
 .desktop-fit .national-brand-copy small{font-size:10px;line-height:1.25;letter-spacing:.025em}
 .desktop-fit .national-brand-copy :is(strong,small,.republic-name){margin:0}
 .desktop-fit :is(.national-arms,.application-brand-logo){width:50px;height:50px;flex-basis:50px;object-fit:contain;padding:1px}
 .desktop-fit .national-flag,.desktop-fit .application-brand-flag{width:48px;height:32px;flex-basis:48px;object-fit:contain}
 .desktop-fit .application-brand-portrait{margin:0;flex-basis:38px}
 .desktop-fit .application-brand-portrait img{width:36px;height:44px}
 .desktop-fit .application-brand-portrait figcaption{display:none}
 .desktop-fit .top-right{flex:none;gap:6px;flex-wrap:nowrap}
 .desktop-fit .top-right :is(button,select){font-size:11px;padding:5px 7px}
 .desktop-fit .theme-picker{font-size:10px;gap:3px}
 .desktop-fit #logout{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .desktop-fit .pill{font-size:9px;padding:4px 6px}
 .desktop-overview .header-menu{display:flex;align-items:center;gap:5px;flex:none;padding:0;border:0;background:transparent;position:static}
 .desktop-overview .top:has(.header-menu.nav-open){z-index:200}
 .desktop-overview .header-menu>#nav-toggle{display:inline-flex!important;align-items:center;gap:5px;margin:0}
 .desktop-overview .header-menu>button{font-size:11px;padding:7px 9px;border:1px solid #9caebe;border-radius:4px;background:#fff;color:#17364c}
 .desktop-overview .header-menu>#main-nav{display:none!important}
 .desktop-overview .header-menu.nav-open>#main-nav{display:flex!important;position:absolute!important;z-index:150;left:auto;right:16px;top:62px;width:min(900px,calc(100vw - 32px));padding:12px;gap:8px 18px;flex-wrap:wrap!important;background:#fff!important;color:#17364c;border:1px solid #8c9daa;box-shadow:0 6px 25px #0003!important}
 .desktop-overview .header-menu .nav-submenu{z-index:160}
 :root[data-theme=night] .desktop-overview .header-menu.nav-open>#main-nav{background:#142b3e!important;color:#eef6fc}
 .desktop-fit .results-update-bar{flex:none;min-height:40px}
 .desktop-fit .results-update-bar>.live-banner{font-size:11px;padding:5px 16px;line-height:1.3}
 .desktop-fit .win-tracker{max-width:70%;padding:4px 16px;gap:12px;border-left:3px solid #f3ce67;box-shadow:inset 0 -2px #f3ce67}
 .desktop-fit .win-tracker-label{font-size:12px;font-weight:800}
 .desktop-fit .win-tracker-copy{max-width:280px;line-height:1.2}
 .desktop-fit .win-tracker-identity{font-size:11px}
 .desktop-fit .win-tracker-identity>span{font-size:10px}
 .desktop-fit .win-tracker-value{max-width:380px;gap:3px 8px;align-items:center}
 .desktop-fit .win-tracker-number{font-size:29px;line-height:1;letter-spacing:-.03em;background:#f7d979;color:#142738;padding:3px 8px;border-radius:3px}
 .desktop-fit .win-tracker-remaining{font-size:12px;color:#fff}
 .desktop-fit .win-tracker-state{font-size:10px;width:auto}
 .desktop-fit .win-tracker-unavailable{font-size:13px}
 .desktop-fit .results-ticker{flex:none;padding:2px 16px;gap:10px;min-height:89px;border-top-width:2px;border-bottom-width:2px}
 .desktop-fit .results-ticker .ticker-line{font-size:21px;line-height:1.3}
 .desktop-fit .ticker-window{min-height:0}
 .desktop-fit .ticker-metrics{font-size:10px;line-height:1.2;padding-top:1px}
 .desktop-fit .results-ticker :is(button,summary){font-size:11px;padding:6px 8px}
 .desktop-fit .ticker-locality{font-size:12px;flex-basis:180px;min-width:80px;max-width:22%}
 .desktop-fit .ticker-label{font-size:10px;line-height:1.2}
 .desktop-fit .ticker-label small{font-size:9px}
 .desktop-fit main.shell{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:7px 16px 5px;gap:6px}
 .desktop-fit .dashboard-views{flex:none;margin:0;gap:5px;min-height:25px}
 .desktop-fit .dashboard-views button{padding:4px 8px;font-size:11px;line-height:1.25}
 .desktop-fit .project-title{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none;margin:0;min-height:42px}
 .desktop-fit .project-title>div:first-child{min-width:0;flex:1;display:flex;align-items:center;gap:10px}
 .desktop-fit .project-title .eyebrow{display:none}
 .desktop-fit .project-title h1{font-size:25px;line-height:1.15;margin:0;letter-spacing:-.025em;flex:none;white-space:nowrap}
 .desktop-fit .project-title .locality-title{padding-bottom:1px;border-bottom-width:4px}
 .desktop-fit .project-title .snapshot-context{font-size:10px;line-height:1.2;margin:0;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .desktop-fit .project-title .row{flex:none;gap:6px;flex-wrap:nowrap}
 .desktop-fit .project-title .row button{font-size:11px;padding:6px 9px}
 .desktop-fit #tour-quick-toggle{display:none}
 .desktop-fit .project-title #election-night-host{flex:0 1 570px;min-width:0;margin:0}
 .desktop-fit .election-night{padding:3px 8px;margin:0;border:0;border-left:2px solid #90a8bb;background:transparent;color:inherit;font-size:11px}
 .desktop-fit .night-top{display:flex;flex-wrap:nowrap;gap:8px;align-items:center}
 .desktop-fit .night-status-summary{display:flex;gap:4px;align-items:center;flex-wrap:nowrap;white-space:nowrap;min-width:0}
 .desktop-fit .night-status-summary strong,.desktop-fit .night-top>.night-status-note,.desktop-fit .night-top>.night-source,.desktop-fit .night-details{display:none}
 .desktop-fit .night-status-badge{font-size:10px;padding:3px 5px}
 .desktop-fit .night-actions{margin:0;gap:4px;flex-wrap:nowrap;flex:none}
 .desktop-fit .election-night button{font-size:10px;min-height:28px;padding:4px 6px}
 .desktop-fit .night-reading,.desktop-fit .night-meaningful-alert{font-size:10px;margin:1px 0;padding:0}
 .desktop-fit .project-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;flex:none;margin:0}
 .desktop-fit .project-stats>div{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;gap:3px 8px;padding:7px 12px;border:1px solid var(--line);border-top:3px solid #58758c;border-radius:3px;background:#fff;min-width:0;position:relative}
 .desktop-fit .project-stats>div>small{grid-column:1/-1;grid-row:1}
 .desktop-fit .project-stats>div>strong{grid-column:1;grid-row:2;margin:0}
 .desktop-fit .project-stats>div>span,.desktop-fit .project-stats>div>.metric-detail{grid-column:2;grid-row:2;max-width:150px;margin:0;text-align:right}
 .desktop-fit .project-stats>div>span{line-height:1.2}
 .desktop-fit .project-stats small{display:block;font-size:10px;line-height:1.2;font-weight:650;color:#4b6175}
 .desktop-fit .project-stats strong{display:block;font-size:27px;line-height:1.1;margin:4px 0 2px;font-variant-numeric:tabular-nums;font-weight:750;letter-spacing:-.025em}
 .desktop-fit .project-stats span{font-size:10px;line-height:1.2}
 .desktop-fit .project-stats>div:last-child strong{font-size:18px;line-height:1.2}
 .desktop-fit .project-stats .metric-detail{font-size:10px;line-height:1.2}
 .desktop-fit .project-stats .metric-detail[open]>div{position:absolute;z-index:80;top:100%;left:0;min-width:260px;max-width:360px;background:#fff;color:#17364c;padding:12px;border:1px solid #8c9daa}
 .desktop-fit .project-stats .metric-detail[open]>p{position:absolute;z-index:80;top:100%;right:0;width:320px;max-width:calc(100vw - 32px);text-align:left}
 :root[data-theme=night] .desktop-fit .project-stats>div{background:#172636;color:#eef6fc;border-color:#34465a}
 :root[data-theme=night] .desktop-fit .project-stats small{color:#c0d2e1}
 :root[data-theme=editorial] .desktop-fit .project-stats>div{background:#fffaf1}
 .desktop-fit .project-grid,.desktop-fit.projection .project-grid,.desktop-fit .project-grid.compact-constituency-map{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(360px,1fr);flex:1;min-height:310px;height:auto!important;gap:12px;margin:0}
 .desktop-fit .project-grid>.card{display:flex;flex-direction:column;min-width:0;min-height:0}
 .desktop-fit .project-grid .card-head{padding:7px 12px;min-height:34px;gap:8px;flex:none}
 .desktop-fit .project-grid .card-head h2{font-size:16px;line-height:1.2}
 .desktop-fit .project-grid .project-map>.card-head{padding-top:5px!important;padding-bottom:5px!important}
 .desktop-fit .project-map .card-head label{display:flex;align-items:center;gap:6px;font-size:10px}
 .desktop-fit .project-map .card-head :is(button,select){font-size:10px;padding:3px 6px}
 .desktop-fit .project-map .map-area{padding:0;min-height:0;height:auto!important;flex:1;display:flex;flex-direction:column;justify-content:flex-start}
 .desktop-fit .project-grid .project-map .map-area{padding:0}
 .desktop-fit .project-map .map-area:not(.map-expanded)>.map-note{display:none}
 .desktop-fit .project-map .map-area svg{min-height:0;flex:none}
 .desktop-fit .project-map .map-tools{flex:none;min-height:24px;padding:0 2px;margin:0;gap:4px}
 .desktop-fit .project-map .map-tools :is(button,select){padding:3px 5px;font-size:10px;min-height:24px}
 .desktop-fit .project-map .map-tools label{font-size:10px;gap:4px}
 .desktop-fit .project-map .map-label-key{margin:0;padding:0;font-size:10px;line-height:1.25}
 .desktop-fit .project-map .legend{flex:none;padding:5px 10px;gap:5px 12px;font-size:10px;line-height:1.2}
 .desktop-fit .project-map .council-map-caption{margin:1px 5px 2px auto;padding:2px 8px;gap:0}
 .desktop-fit .project-map .council-map-caption small{font-size:9px}
 .desktop-fit .project-map .council-map-caption strong{font-size:16px}
 .desktop-fit .project-map .national-map-caption{font-size:17px;padding:0 6px 2px}
 .desktop-fit .project-standings .ranking{display:grid;grid-template-rows:repeat(6,minmax(0,1fr));flex:1;min-height:0;padding:3px 10px 6px}
 .desktop-fit .project-standings .candidate{padding:3px 0;min-height:0}
 .desktop-fit .project-standings .candidate .candidate-top{min-height:32px;padding:3px 5px;gap:5px}
 .desktop-fit .project-standings .ranking .bar-track{height:auto!important;min-height:32px}
 .desktop-fit .project-standings .candidate-name{font-size:13px;max-width:none;line-height:1.2}
 .desktop-fit .project-standings .candidate-number{font-size:20px;max-width:none;padding:3px 5px}
 .desktop-fit .project-standings .candidate-number small{font-size:12px}
 .desktop-fit .project-standings .rank-number{width:22px;height:22px}
 .desktop-fit .project-standings .candidate-portrait{width:20px;height:24px}
 .desktop-fit .project-pages{padding:0 8px;font-size:10px;flex:none}
 .desktop-fit .project-pages button{font-size:10px;padding:3px 7px}
 .desktop-fit .dashboard-tour{display:flex;align-items:center;gap:8px;flex:none;margin:0;padding:3px 8px;font-size:11px;min-height:30px}
 .desktop-fit .tour-toolbar{display:contents}
 .desktop-fit .tour-toolbar>strong{margin-right:auto;max-width:300px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .desktop-fit .dashboard-tour :is(button,select){font-size:10px;padding:4px 7px;min-height:24px}
 .desktop-fit .dashboard-tour label{display:flex;align-items:center;gap:4px;font-size:10px;margin:0}
 .desktop-fit .tour-itinerary,.desktop-fit .tour-facts{position:relative;display:block;flex:none;margin:0;font-size:10px}
 .desktop-fit .dashboard-tour summary{cursor:pointer;white-space:nowrap;padding:4px}
 .desktop-fit .tour-itinerary[open] form{position:fixed;right:18px;bottom:55px;z-index:150;width:min(600px,calc(100vw - 36px));max-height:75vh;overflow:auto;padding:14px;background:#f6f9fb;color:#17364c;border:1px solid #8c9daa;box-shadow:0 4px 25px #0003}
 .desktop-fit .tour-facts>div,.desktop-fit .display-notes>div{position:absolute;z-index:150;bottom:calc(100% + 8px);right:0;width:min(400px,calc(100vw - 32px));padding:12px;background:#fff;color:#17364c;border:1px solid #8c9daa;border-radius:4px;font-size:12px;line-height:1.5;box-shadow:0 4px 25px #0003}
 .desktop-fit .project-footnote{display:none}
 .desktop-fit .footer.application-branded-footer{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;flex:none;margin:0;padding:3px 0 0;min-height:25px;line-height:1.2;font-size:10px}
 .desktop-fit .footer.application-branded-footer>span{display:inline;white-space:nowrap}
 .desktop-fit .application-brand-footer{flex:1 1 auto;width:auto;min-width:0;gap:6px;padding:0;border:0}
 .desktop-fit .application-brand-footer-logo{width:22px;height:22px;flex-basis:22px;padding:1px}
 .desktop-fit .application-brand-footer-flag{width:28px;height:18px;flex-basis:28px}
 .desktop-fit .application-brand-footer-copy{display:flex;flex-direction:row;align-items:center;gap:8px;min-width:0;flex:0 1 auto}
 .desktop-fit .application-brand-footer-copy strong{font-size:10px;line-height:1.2;white-space:nowrap}
 .desktop-fit .application-brand-footer-copy span{font-size:9px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .desktop-fit .display-notes{position:relative;flex:none}
 .desktop-fit .display-notes summary{cursor:pointer;padding:3px;white-space:nowrap}
 .desktop-fit .display-notes p+p{margin-top:8px}
 .desktop-fit .matrix-card{flex:1;min-height:0;display:flex;flex-direction:column}
 .desktop-fit .matrix-scroll{flex:1;min-height:0;max-height:none}
 .desktop-fit .matrix-title{margin:0}
 .desktop-fit .matrix-title h1{font-size:24px}
}

@media(min-width:1200px) and (max-height:760px){
 .desktop-fit .top{min-height:54px;padding-block:3px}
 .desktop-fit :is(.national-arms,.application-brand-logo){height:46px;width:46px;flex-basis:46px}
 .desktop-fit .national-brand-copy strong{font-size:15px}
 .desktop-fit .results-update-bar{min-height:36px}
 .desktop-fit .win-tracker{padding-block:2px}
 .desktop-fit .win-tracker-number{font-size:26px;padding-block:2px}
 .desktop-fit .results-ticker{min-height:78px;padding-block:2px}
 .desktop-fit main.shell{padding-top:3px;padding-bottom:3px;gap:2px}
 .desktop-fit .project-title{min-height:32px}
 .desktop-fit .project-title h1{font-size:22px}
 .desktop-fit .project-stats>div{padding:5px 10px}
 .desktop-fit .project-stats strong{font-size:25px;margin:3px 0 1px}
 .desktop-fit .project-grid,.desktop-fit.projection .project-grid,.desktop-fit .project-grid.compact-constituency-map{min-height:284px}
 .desktop-fit .project-grid .card-head{min-height:30px;padding-block:5px}
 .desktop-fit .project-grid .card-head h2{font-size:15px}
 .desktop-fit .project-standings .candidate-number{font-size:18px}
 .desktop-fit .dashboard-tour{min-height:26px;padding-block:1px}
 .desktop-fit .footer.application-branded-footer{min-height:23px;padding-top:0}
 .desktop-fit .application-brand-footer-copy span{display:none}
}
/* Fit uses all available card space while the SVG remains in CSS-pixel units. */
@media(min-width:1200px){
 .desktop-fit .project-map .map-area:not(.map-expanded)>.map-stage{flex:1;min-height:0;height:100%;width:100%}
 .desktop-fit .project-map .map-stage>.map-tools{top:3px;left:8px;padding:0;margin:0}
 .desktop-fit .project-map .map-stage>.map-locality-caption{right:8px;bottom:3px;max-width:52%;margin:0;padding:2px 7px;gap:7px}
 .desktop-fit .project-map .map-stage>.map-label-key{left:8px;bottom:3px;margin:0;padding:0}
}

/* Adaptive larger text uses the same complete desktop viewport. Compact the
   spaces around results, rather than zooming the page or hiding content. */
@media(min-width:1200px){
 html:is([data-text-scale="110"],[data-text-scale="125"],[data-text-scale="150"]) .desktop-fit main.shell{gap:1px;padding-block:2px}
 html:is([data-text-scale="110"],[data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-stats>div{padding-block:2px;row-gap:1px}
 html:is([data-text-scale="110"],[data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-stats strong{line-height:1;margin:0}
 html:is([data-text-scale="110"],[data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-title{min-height:34px}
 html:is([data-text-scale="110"],[data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-title h1{line-height:1}
 html:is([data-text-scale="110"],[data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-grid .card-head{padding-block:3px;min-height:28px}
 html:is([data-text-scale="110"],[data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-grid .project-map>.card-head{padding-block:3px!important}
 html:is([data-text-scale="110"],[data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-map .legend{padding-block:2px;line-height:1.15;row-gap:4px}
 html:is([data-text-scale="110"],[data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .dashboard-tour{padding-block:1px}
}
@media(min-width:1200px){
 html:is([data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-stats>div{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:6px}
 html:is([data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-stats strong{white-space:nowrap}
 html:is([data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-stats>div:first-child strong{grid-column:1/-1}
 html:is([data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-stats>div>span,
 html:is([data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-stats>div>.metric-detail{max-width:100%;min-width:0}
}
@media(min-width:1200px) and (max-height:760px){
 html:is([data-text-scale="125"],[data-text-scale="150"]) .desktop-fit main.shell{padding-block:0;gap:.5px}
 html:is([data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .project-stats>div{padding-block:1px}
 html:is([data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .dashboard-tour{padding-block:0}
}
@media(min-width:1200px) and (max-height:760px){
 html:is([data-text-scale="125"],[data-text-scale="150"]) .desktop-fit .national-brand-copy :is(strong,small,.republic-name){line-height:1.1}
}
