/* Shared appearance layer. No test logic or original GED styles are modified. */
:root{color-scheme:light;--theme-surface:#fff;--theme-text:#152540;--theme-border:#8594aa;--theme-active:#245ce5;--theme-active-text:#fff}
:root[data-theme=dark]{color-scheme:dark;--theme-surface:#18263b;--theme-text:#e8eef9;--theme-border:#71839d;--theme-active:#b4ccff;--theme-active-text:#13243e;background:#0e1726;color:#e8eef9}
.theme-toggle{display:inline-flex;align-items:center;gap:2px;flex:none;min-height:44px;padding:4px;border:1px solid var(--theme-border);border-radius:10px;background:var(--theme-surface);color:var(--theme-text);font:650 13px/1.4 system-ui,sans-serif;cursor:pointer;white-space:nowrap;letter-spacing:0}
.theme-toggle[hidden]{display:none!important}.theme-toggle span{display:block;padding:6px 8px;border-radius:6px}.theme-toggle:hover{background:var(--theme-surface);border-color:var(--theme-active);color:var(--theme-text)}
:root:not([data-theme=dark]) .theme-light,:root[data-theme=dark] .theme-dark{background:var(--theme-active);color:var(--theme-active-text)}
.theme-toggle:focus-visible{outline:3px solid #b97500;outline-offset:4px}
:root[data-theme=dark] .theme-toggle:focus-visible{outline-color:#ffd579}
.header-inner>.theme-toggle{order:2}.header-inner>.site-nav{order:1}.header-inner>.menu-button{order:3}
.ptl-integration>.theme-toggle{margin-left:auto}.ptl-integration nav{margin-left:8px}
@media(max-width:1050px) and (min-width:821px){.header-inner{flex-wrap:wrap;gap:8px 20px;padding:15px 0}.header-inner>.theme-toggle{order:1;margin-left:auto}.header-inner>.site-nav{order:2;width:100%;justify-content:flex-end;gap:22px}.site-header .site-nav a{font-size:14px;padding:7px 0}}
@media(max-width:820px){.header-inner{column-gap:10px}.header-inner>.theme-toggle{order:1;margin-left:auto}.header-inner>.menu-button{order:2}.header-inner>.site-nav{order:3}.theme-toggle{font-size:12px}.theme-toggle span{padding:6px}.site-header .brand{font-size:20px}}
@media(max-width:380px){.site-header .brand{font-size:18px;gap:6px}.site-header .brand-mark{width:30px;height:34px;font-size:14px}.header-inner{column-gap:6px}.menu-button{padding:9px}.theme-toggle span{padding:6px 4px}}
@media(max-width:580px){.ptl-integration{flex-direction:row;align-items:center;flex-wrap:wrap}.ptl-integration nav{flex-basis:100%;margin-left:0}}
/* Platform pages */
:root[data-theme=dark]{--ink:#e8eef9;--muted:#b6c3d8;--blue:#aec9ff;--blue-dark:#1546b9;--line:#50627e;--paper:#0e1726}
:root[data-theme=dark] body{background:#0e1726;color:#e8eef9}
:root[data-theme=dark] :is(.site-header,.site-footer,.panel,.category-card,.menu-button,.skip){background:#152238;color:#e8eef9;border-color:#50627e}
:root[data-theme=dark] :is(.brand,h1,h2,h3){color:#e8eef9}
:root[data-theme=dark] .brand-mark{background:#245ce5;color:#fff}
:root[data-theme=dark] :is(.category-card.featured,.panel.blue){background:#1d3355;border-color:#58769e;color:#fff}
:root[data-theme=dark] :is(.featured,.panel.blue) :is(h2,h3){color:#fff}
:root[data-theme=dark] :is(.featured p,.panel.blue p,.stat-list span){color:#d5e1f4}
:root[data-theme=dark] :is(.category-card p,.prose p,.prose li,.state-info p,.soon-card p,.approach p,.breadcrumbs,.footer-note,.subtle,.lead,.subtitle,.intro-note){color:#b6c3d8}
:root[data-theme=dark] .intro-note strong{color:#e8eef9}
:root[data-theme=dark] :is(.soon-card,.tag-list span){background:#1a2940;border-color:#50627e;color:#e8eef9}
:root[data-theme=dark] :is(.status,.state-code){background:#263f66;color:#c4d8ff}
:root[data-theme=dark] .status.planned{background:#2b394e;color:#d2dceb}
:root[data-theme=dark] .featured .status{background:#ffe59c;color:#493800}
:root[data-theme=dark] :is(.notice,.feedback){background:#203555;color:#dce8ff;border-color:#aec9ff}
:root[data-theme=dark] .button{background:#245ce5;border-color:#91b5ff;color:#fff}
:root[data-theme=dark] .button:hover{background:#194cc6}
:root[data-theme=dark] .button.light{background:#e7efff;color:#152540;border-color:#e7efff}
:root[data-theme=dark] .button.light:hover{background:#cddfff;color:#152540}
:root[data-theme=dark] .button.secondary{background:#1c2e49;color:#c4d8ff;border-color:#7890b2}
:root[data-theme=dark] :is(.test-option,.check-answer,.test-navigator button,.test-shell select){background:#152238;border-color:#71839d;color:#e8eef9}
:root[data-theme=dark] :is(.test-option:has(input:checked),.test-navigator .answered){background:#29456d;border-color:#b4ccff;color:#fff}
:root[data-theme=dark] .test-navigator .flagged{border-bottom-color:#ffd579}
:root[data-theme=dark] .error{background:#442d25;border-color:#dcb18d;color:#ffdec8}
:root[data-theme=dark] :is(a,button,input,select,textarea,summary):focus-visible{outline-color:#ffd579}
:root[data-theme=dark] :is(input,progress){accent-color:#aec9ff}
/* Original GED interface, including dynamically rendered results and tools. */
:root[data-theme=dark] .ged-exam{--purple:#b4b5ff;--ink:#e8eef9;--line:#71839d;background:#0e1726;color:#e8eef9}
:root[data-theme=dark] .ged-exam :is(header,.panel,.subject,.strip,.timer,.badge,.history .scorecard,dialog){background:#152238;border-color:#50627e;color:#e8eef9}
:root[data-theme=dark] .ged-exam :is(button,select,input[type=number],textarea){background:#1c2e49;color:#e8eef9;border-color:#71839d}
:root[data-theme=dark] .ged-exam button:hover{background:#29456d;border-color:#b4b5ff}
:root[data-theme=dark] .ged-exam :is(.primary,.mark){background:#5146cc;color:#fff;border-color:#b4b5ff}
:root[data-theme=dark] .ged-exam .primary:hover{background:#6258dd;color:#fff}
:root[data-theme=dark] .ged-exam :is(.muted,.small.muted,.subject p,.cardmeta,.letter,th,td small,footer,.private){color:#b6c3d8}
:root[data-theme=dark] .ged-exam :is(.eyebrow,.qmeta,.score,.reviewitem summary){color:#c0c1ff}
:root[data-theme=dark] .ged-exam .subject.selected{background:#282b50;border-color:#b4b5ff;box-shadow:none}
:root[data-theme=dark] .ged-exam .subject .symbol{background:#2b3551;color:#e4e4ff}
:root[data-theme=dark] .ged-exam .choice{border-color:#b4b5ff}
:root[data-theme=dark] .ged-exam .selected .choice{background:#b4b5ff;border-color:#565989}
:root[data-theme=dark] .ged-exam .seg{background:#0e1726;border-color:#71839d}
:root[data-theme=dark] .ged-exam .seg .on{background:#333957;color:#e4e4ff;box-shadow:none}
:root[data-theme=dark] .ged-exam :is(.note,.resume){background:#272f4d;color:#d7ddf6;border-color:#71839d}
:root[data-theme=dark] .ged-exam .passage{background:#101b2d;color:#e3e9f5;border-color:#a6abdf}
:root[data-theme=dark] .ged-exam .option{border-color:#71839d}
:root[data-theme=dark] .ged-exam .option:has(input:checked){background:#30365e;border-color:#b4b5ff}
:root[data-theme=dark] .ged-exam .progress{background:#44536e}
:root[data-theme=dark] .ged-exam .grid .answered{background:#343d6c;color:#fff;border-color:#a9aef4}
:root[data-theme=dark] .ged-exam .fullgrid button:disabled{background:#1c2b41;color:#b6c3d8}
:root[data-theme=dark] .ged-exam .flag.active{background:#493b22;color:#ffe29e;border-color:#d6aa54}
:root[data-theme=dark] .ged-exam .grid .flagged:after{background:#ffd579}
:root[data-theme=dark] .ged-exam .correct{color:#8de0be}
:root[data-theme=dark] .ged-exam :is(.incorrect,.danger){color:#ffb3b8}
:root[data-theme=dark] .ged-exam .notice{background:transparent;color:#ffd59f}
:root[data-theme=dark] .ged-exam .pill{background:#2b3951}
:root[data-theme=dark] .ged-exam :is(.details,.navfoot,.historyitem,.skillrow,td,th){border-color:#50627e}
:root[data-theme=dark] .ged-exam :is(input,textarea)::placeholder{color:#b6c3d8;opacity:1}
:root[data-theme=dark] .ged-exam dialog::backdrop{background:#030810b8}
:root[data-theme=dark] .ged-exam .ptl-integration{background:#152540;color:#fff}
:root[data-theme=dark] .ged-exam .theme-toggle{background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
@media(max-width:380px){.site-header .brand-mark{display:none}}

/* Homepage category polish, scoped away from test and state pages. */
.primary-grid .category-card,
:root[data-theme=dark] .primary-grid .category-card{background:linear-gradient(135deg,#152540,#1d3355);color:#fff;border-color:#354b6c;box-shadow:0 8px 22px #15254014;transition:transform 200ms ease,box-shadow 200ms ease}
.primary-grid .category-card h3,
:root[data-theme=dark] .primary-grid .category-card h3{color:#fff}
.primary-grid .category-card p,
:root[data-theme=dark] .primary-grid .category-card p{color:#d5deed}
.primary-grid .category-card .status,
:root[data-theme=dark] .primary-grid .category-card .status{background:#ffe59c;color:#493800}
.primary-grid .card-meta span,
:root[data-theme=dark] .primary-grid .card-meta span{border-color:#617795;color:#e3eaf5}
.primary-grid .category-card:focus-within{box-shadow:0 12px 28px #15254030}
:root[data-theme=dark] .primary-grid .category-card{box-shadow:0 8px 22px #0003}
:root[data-theme=dark] .primary-grid .category-card:focus-within{box-shadow:0 12px 28px #0006}
.primary-grid .button.category-explore,
:root[data-theme=dark] .primary-grid .button.category-explore{background:#fff;color:#152540;border-color:#cbd5e1;transition:background-color 180ms ease,color 180ms ease,border-color 180ms ease}
.primary-grid .button.category-explore:focus-visible,
:root[data-theme=dark] .primary-grid .button.category-explore:focus-visible{background:#152540;color:#fff;border-color:#7890b2;outline-color:#ffd579}
@media(hover:hover) and (pointer:fine){
  .primary-grid .category-card:hover{transform:translateY(-4px);box-shadow:0 16px 32px #15254030}
  :root[data-theme=dark] .primary-grid .category-card:hover{box-shadow:0 16px 32px #0006}
  .primary-grid .button.category-explore:hover,
  :root[data-theme=dark] .primary-grid .button.category-explore:hover{background:#152540;color:#fff;border-color:#7890b2}
}
@media(prefers-reduced-motion:reduce){
  .primary-grid .category-card,:root[data-theme=dark] .primary-grid .category-card,
  .primary-grid .button.category-explore,:root[data-theme=dark] .primary-grid .button.category-explore{transition:none}
  .primary-grid .category-card:hover{transform:none}
}
