/* Shared theme controls keep their own dimensions in every page layout. */
.theme-control{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:7px!important;margin:0 0 0 auto!important;padding:0!important;font:12px/1.4 system-ui,sans-serif!important;letter-spacing:0!important;text-transform:none!important;color:inherit;white-space:nowrap;flex:0 0 auto}
.theme-control select{width:auto!important;min-width:82px!important;min-height:36px!important;margin:0!important;padding:7px 9px!important;border:1px solid #8d9f91!important;border-radius:7px!important;background:#f7f6f0!important;color:#193e3a!important;font:13px/1.4 system-ui,sans-serif!important;cursor:pointer;box-sizing:border-box}
.theme-control select:focus-visible{outline:3px solid #71964a;outline-offset:3px}
.theme-dock{position:fixed;right:16px;bottom:16px;z-index:1300;padding:7px 10px!important;border-radius:9px;background:#f7f6f0;color:#193e3a;box-shadow:0 2px 12px #0003}
header:has(.theme-control)>nav,header:has(>.theme-control){height:auto;min-height:79px;flex-wrap:wrap}
header nav:has(.theme-control){gap:14px;padding-top:16px;padding-bottom:16px}
html[data-theme=dark]{color-scheme:dark;--theme-bg:#111917;--theme-panel:#1b2824;--theme-raised:#24352e;--theme-text:#e6ede7;--theme-muted:#aabbb1;--theme-border:#42584c;--theme-accent:#bbd397;--theme-on-accent:#182416;--theme-success:#203b2b;--theme-error:#432b29;--theme-warning:#403820;--ink:#e6ede7;--text:#e6ede7;--muted:#aabbb1;--paper:#111917;--line:#42584c;--white:#1b2824;--accent:#bbd397;--navy:#e6ede7;--teal:#bbd397;--gold:#e4c48a;--green:#bbd397;background:var(--theme-bg)!important;color:var(--theme-text)!important}
html[data-theme=dark] body{background:var(--theme-bg)!important;color:var(--theme-text)!important}
html[data-theme=dark] :is(header,.top,.dashboard,.bottom,#controls){background:var(--theme-bg)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme=dark] :is(.panel,.card,.flash,dialog,.study-dialog,.book-group,.analytics-detail,.reference-tools,.feature,.quiet,#content details,.overlay .card,#stage){background:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;box-shadow:none}
html[data-theme=dark] :is(.book-content,.overlay,.districtprompt,.stage,.reference-tabs,.environment,.period-comparison p,.choice-number,.resume,.end-confirm,.score-grid>div,#objective){background:var(--theme-raised)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme=dark] :is(h1,h2,h3,h4,label,legend,strong,.brand,.question,.question-text,.stats,.scoretotal,.mini,.feature-label,.chapter-num,.card-bottom,.reference-heading,#score,#message){color:var(--theme-text)!important}
html[data-theme=dark] :is(p,li,td,th,summary,article,section,fieldset,details,.resource,.resource-section,.card-top,.card-bottom,.guide-item,.result-item,.search-result,.review-item,.feature-line,.feature-row,.best-row,.chapter-issue,footer,nav){border-color:var(--theme-border)!important}
html[data-theme=dark] :is(.muted,.fine,.source,.intro,.sub,.notice,.eyebrow,.tag,.loading,.chapter-sub,.chapter-status,.progress-info,.page-ref,.flip-hint,.hero-note,.release-note,.modecaption,.choicelabel,.brand span,small,footer,#status,#instruction){color:var(--theme-muted)!important}
html[data-theme=dark] :is(a,.back-link,.sourcelink,.arrow,.step-num){color:var(--theme-accent)}
html[data-theme=dark] :is(button,.button,.action,.format,.shortcut,.secondary,.answer,.answer-choice,.choice,.resume-link,.search,input,select,textarea){background:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme=dark] :is(button,.button,.action,.format,.shortcut,.secondary):hover{background:var(--theme-raised)!important}
html[data-theme=dark] :is(.primary,button[aria-selected=true],button[aria-pressed=true],.chapter-tools [aria-selected=true],.hub-tabs [aria-selected=true],.reference-tabs [aria-selected=true],#dailyEntry,#interact){background:var(--theme-accent)!important;color:var(--theme-on-accent)!important;border-color:var(--theme-accent)!important}
html[data-theme=dark] :is(.primary,#dailyEntry) :is(small,span){color:var(--theme-on-accent)!important}
html[data-theme=dark] :is(.primary,#dailyEntry):hover{background:#cce1ae!important}
html[data-theme=dark] :is(.feedback,.feedback.success,.correct,.answer.correct,.panel.correct,.choice.correct,.review-status,.myrank,.notice,.mode-label:has(input:checked),.answer:has(input:checked),.answer-choice:has(input:checked)){background:var(--theme-success)!important;color:#d1ecd8!important;border-color:#7eaf8a!important}
html[data-theme=dark] :is(.wrong,.incorrect,.feedback.wrong,.panel.incorrect,.choice.incorrect,.review-status.missed){background:var(--theme-error)!important;color:#f4c4ba!important;border-color:#cc8a7b!important}
html[data-theme=dark] :is(.feedback.review,.end-confirm){background:var(--theme-warning)!important;color:#f0d9a2!important;border-color:#c8ac68!important}
html[data-theme=dark] :is(.form-error,.quiz-warning){color:#f4b5a8!important}
html[data-theme=dark] :is(.study-table,table){background:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme=dark] :is(thead,summary,.study-table tr:nth-child(even),#chapters tbody tr:nth-child(even)){background:var(--theme-raised)!important;color:var(--theme-text)!important}
html[data-theme=dark] :is(.study-table th,.study-table td,td,th){border-color:var(--theme-border)!important}
html[data-theme=dark] :is(progress,input[type=checkbox],input[type=radio]){accent-color:var(--theme-accent)!important}
html[data-theme=dark] :is(.progress,.track){background:var(--theme-raised)!important}
html[data-theme=dark] :is(.progress div,.track div,.visit-bar){background:var(--theme-accent)!important}
html[data-theme=dark] :focus-visible{outline-color:var(--theme-accent)!important}
html[data-theme=dark] ::placeholder{color:var(--theme-muted);opacity:1}
html[data-theme=dark] ::selection{background:#bbd397;color:#182416}
html[data-theme=dark] dialog::backdrop{background:#0009}
html[data-theme=dark] .theme-control select{background:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme=dark] .theme-dock{background:var(--theme-panel);color:var(--theme-text)}
html[data-theme=dark] .chapter-tools{background:var(--theme-bg)}
html[data-theme=dark] .maptip{background:#1b2824f0;color:var(--theme-text)}
/* Keep map tiles, district colors, pins, and the arcade canvas unfiltered. */
html[data-theme=dark] :is(.leaflet-control-zoom a,.leaflet-popup-content-wrapper,.leaflet-popup-tip,.leaflet-control-attribution){background:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme=dark] .leaflet-control-attribution a{color:var(--theme-accent)!important}
html[data-theme=dark] .feature:after{opacity:.15}
html[data-theme=dark] :is(.review-card,.districtcard,.badge-tile,.badge-empty,.tampa-badge,body:has(.hub-head) section){background:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme=dark] :is(.streakbar,.review-answers li,.practice-rules){background:var(--theme-raised)!important;color:var(--theme-text)!important}
html[data-theme=dark] :is(.review-correct,.review-answers .review-correct){background:var(--theme-success)!important;color:#d1ecd8!important}
html[data-theme=dark] :is(.review-duplicates,.badge-tile.earned,.badge-selected){background:var(--theme-warning)!important;color:#f0d9a2!important;border-color:#c8ac68!important}
html[data-theme=dark] :is(.review-location,.review-source-notes,.leader-label,.streakbar span,.practice-scoring-summary,h1 span){color:var(--theme-muted)!important}
html[data-theme=dark] :is(.leader-score,.card-topline){color:var(--theme-text)!important}
html[data-theme=dark] .review-approve{background:var(--theme-accent)!important;color:var(--theme-on-accent)!important}
html[data-theme=dark] footer[aria-label="Contact Florida Recruit"] a{background:var(--theme-panel)!important;color:var(--theme-accent)!important;border-color:var(--theme-border)!important}
@media(max-width:650px){.theme-control{font-size:11px!important;gap:5px!important}.theme-control select{min-width:76px!important;font-size:12px!important}.statusrow .theme-control{font-size:0!important}.statusrow .theme-control select{min-width:70px!important;padding:6px!important}header:has(>.theme-control){gap:10px}.theme-dock{right:10px;bottom:10px}}
@media print{.theme-control{display:none!important}html[data-theme=dark],html[data-theme=dark] body{background:white!important;color:black!important}html[data-theme=dark] :is(.panel,.card,.flash,table,thead,td,th,h1,h2,h3,p,small,li,section,article){background:white!important;color:black!important;border-color:#777!important}}

html[data-theme=dark] .mark{background:var(--theme-raised)!important;color:var(--theme-accent)!important}
html[data-theme=dark] :is(h1 em,h2 em){color:var(--theme-accent)!important}

.theme-panel-control{display:flex!important;width:max-content;margin:0 0 14px auto!important}
