/* TV mode retains the dashboard's renderers and palettes, with selected panels. */
body.tv-view [hidden]{display:none!important}
.tv-view .nav-shell,.tv-view .dashboard-views,.tv-view .dashboard-tour,.tv-view .project-title>.row,.tv-view .project-title .eyebrow,.tv-view .project-footnote,.tv-view .top-right{display:none!important}
.tv-view .project-map .card-head :is(.segmented,label),.tv-view .map-tools,.tv-view .map-note{display:none!important}
.tv-view .election-night :is(.night-actions,.night-details,.night-source-controls,.night-status-note,.night-source){display:none!important}
.tv-view .results-ticker :is(button:not(#ticker-pause),.ticker-settings),.tv-view .result-update-options,.tv-view #result-update-controls,.tv-view .submission-overview label:has(select){display:none!important}
.tv-view:not([data-tv-components~="headlines"]) .results-ticker,.tv-view:not([data-tv-components~="updates"]) .results-update-bar>.live-banner,.tv-view:not([data-tv-components~="tracker"]) #win-tracker,.tv-view:not([data-tv-components~="updates"]):not([data-tv-components~="tracker"]) .results-update-bar{display:none!important}
.tv-view .project-title{margin:0 0 10px}
.tv-view .project-title>div:first-child{min-width:0}
.tv-view .project-title .snapshot-context{margin:4px 0;line-height:1.4;white-space:normal;overflow:visible;text-overflow:clip}
.tv-toolbar{display:flex;flex:none;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.tv-toolbar>div{display:flex;align-items:center;gap:6px}
.tv-toolbar button{font-size:12px;padding:6px 9px;min-height:30px;white-space:nowrap}
.tv-toolbar button::before{content:none!important;display:none!important}
.tv-view-label{font-size:11px;font-weight:800;letter-spacing:.08em;color:var(--muted,#52697a)}
.tv-view .project-stats{grid-template-columns:repeat(var(--tv-stat-columns,4),minmax(0,1fr))}
.tv-view .project-grid.tv-single-panel{grid-template-columns:minmax(0,1fr)!important}
.tv-view .project-map .map-area{min-width:0}
.tv-view .footer{margin-top:auto!important}
#tv-setup-dialog{box-sizing:border-box;width:min(650px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:22px;overflow:auto;border:2px solid #8096a7;border-radius:6px;background:#fff;color:#163349;font:16px/1.5 system-ui,sans-serif}
#tv-setup-dialog::backdrop{background:#071524b8}
.tv-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.tv-dialog-head h2{font-size:24px;margin:0}
#tv-setup-dialog p{font-size:14px;margin:12px 0}
#tv-setup-dialog fieldset{border:1px solid #9bafbd;padding:14px;margin:18px 0}
#tv-setup-dialog legend{padding:0 6px;font-size:14px;font-weight:750}
.tv-component-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.tv-component-choices label{display:flex;gap:8px;align-items:center;font-size:15px;line-height:1.4;color:inherit;cursor:pointer}
.tv-component-choices input{width:19px;height:19px;accent-color:#12634d;flex:none;margin:0}
.tv-style-choices{display:flex;gap:20px;flex-wrap:wrap}
.tv-style-choices label{display:flex;flex:1;align-items:center;gap:10px;color:inherit;font-size:14px}
.tv-style-choices select{font-size:15px;min-height:38px;width:100%;background:#fff;color:#163349;border:1px solid #8096a7}
#tv-setup-error{font-weight:750;color:#a52d3c}
#tv-setup-dialog button{font-size:14px;min-height:38px}
#tv-setup-dialog .primary{background:#12634d;color:#fff;border-color:#12634d}
:root[data-theme=night] #tv-setup-dialog{background:#182b3b;color:#edf5fb;border-color:#a7bbcc}
:root[data-theme=night] .tv-style-choices select{background:#172636;color:#edf5fb;border-color:#a7bbcc}
:root[data-theme=night] #tv-setup-error{color:#ffb7c0}
:root[data-theme=night] .tv-view-label{color:#bfd1df}
@media(min-width:1200px){
 .desktop-fit.tv-view main.shell{gap:7px;padding-top:5px}
 .desktop-fit.tv-view .tv-toolbar{margin:0;min-height:29px}
 .desktop-fit.tv-view .project-title{min-height:34px;margin:0}
 .desktop-fit.tv-view .project-title .snapshot-context{font-size:11px;line-height:1.3;margin:0;white-space:normal;overflow:visible;max-width:none}
 .desktop-fit.tv-view .project-stats{grid-template-columns:repeat(var(--tv-stat-columns,4),minmax(0,1fr))}
 .desktop-fit.tv-view .project-grid{min-height:285px}
 .desktop-fit.tv-view .project-grid.tv-single-panel{grid-template-columns:minmax(0,1fr)!important}
 .desktop-fit.tv-view .project-map .card-head{min-height:29px}
 .desktop-fit.tv-view .top{min-height:60px}
 .desktop-fit.tv-view .top .national-brand{flex:1}
 .desktop-fit.tv-view .results-ticker{padding:9px 16px;min-height:92px}
 .desktop-fit.tv-view .results-update-bar>#win-tracker:only-child,.desktop-fit.tv-view:not([data-tv-components~="updates"]) .results-update-bar>#win-tracker{max-width:100%;flex:1}
}
@media(min-width:1200px) and (max-height:760px){
 .desktop-fit.tv-view main.shell{gap:3px}
 .desktop-fit.tv-view .results-ticker{min-height:88px}
 .desktop-fit.tv-view .project-grid{min-height:270px}
}
@media(max-width:767px){
 .tv-view .shell{padding:10px}
 .tv-toolbar{gap:6px;flex-wrap:wrap}
 .tv-toolbar>div{flex-wrap:wrap;justify-content:flex-end;min-width:0;flex:1}
 .tv-toolbar .tv-view-label{display:none}
 .tv-toolbar button{font-size:11px;padding:5px 7px}
 .tv-view .project-title h1{font-size:24px}
 .tv-view .project-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .tv-view .project-stats>div:only-child{grid-column:1/-1}
 .tv-view .project-stats[data-tv-stat-count="1"]{grid-template-columns:minmax(0,1fr)}
 .tv-view .project-stats[data-tv-stat-count="2"]:has([data-tv-component="completion"]:not([hidden]))>[data-tv-component]:not([hidden]){grid-column:1/-1}
 .tv-view .project-grid{grid-template-columns:minmax(0,1fr)!important}
 #tv-setup-dialog{padding:16px}
 .tv-component-choices{grid-template-columns:minmax(0,1fr);gap:12px}
 .tv-view .results-ticker .ticker-locality{max-width:35%}
}
