/* --green/--lime are legacy accent names, separate from inspection outcomes. */
:root{
  color-scheme:light;
  --ink:#172b46;--muted:#58677d;--green:#225fc1;--lime:#dbeafe;
  --paper:#f7f8fb;--white:#fff;--line:#dce3ed;--amber:#9a6715;
  --surface:#fff;--surface-soft:#f0f3f8;--surface-alt:#e8edf5;
  --accent-soft:#ebf2ff;--accent-line:#a8c5f1;--accent-hover:#174992;
  --on-accent:#fff;--strong-surface:#152a46;--on-strong:#f4f7ff;
  --strong-muted:#becde3;--focus:#3578d7;
  --status-good:#2e7449;--status-warn:#9a6715;--shadow:0 16px 48px #172b460c;
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --ink:#edf2fa;--muted:#afbed1;--green:#8bb6ff;--lime:#c4dbff;
  --paper:#10151e;--white:#171f2b;--line:#334258;--amber:#edc46a;
  --surface:#171f2b;--surface-soft:#1d2837;--surface-alt:#243145;
  --accent-soft:#203754;--accent-line:#426a9e;--accent-hover:#adcaff;
  --on-accent:#0f223e;--strong-surface:#0b1320;--on-strong:#eef4ff;
  --strong-muted:#a8bad3;--focus:#a9caff;
  --status-good:#8dd8ac;--status-warn:#edc46a;--shadow:0 16px 48px #00000026;
}
:root[data-theme="original"]{
  color-scheme:light;
  --ink:#163b38;--muted:#627773;--green:#1a514a;--lime:#d6f590;
  --paper:#f8faf7;--white:#fff;--line:#dde6e0;--amber:#b67b23;
  --surface:#fff;--surface-soft:#f1f5ef;--surface-alt:#e8eee3;
  --accent-soft:#edf3e7;--accent-line:#b8cca5;--accent-hover:#0b3a34;
  --on-accent:#fff;--strong-surface:#163b38;--on-strong:#f5faf4;
  --strong-muted:#c2d6cb;--focus:#83a93a;
  --status-good:#336d41;--status-warn:#9a6715;--shadow:0 16px 48px #163b3810;
}

/* Theme picker: native radio controls and dialog keyboard behavior. */
.header-actions{display:flex;align-items:center;gap:20px;flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;min-height:40px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font-size:12px;font-weight:600;white-space:nowrap}
.theme-toggle:hover{background:var(--surface-soft);border-color:var(--accent-line)}
.theme-toggle svg{height:16px;width:16px;flex-shrink:0;color:var(--green)}
.theme-toggle .theme-current-name{font-size:10px;font-weight:500;color:var(--muted);border-left:1px solid var(--line);padding-left:8px;margin-left:1px}
.theme-dialog{width:min(570px,calc(100vw - 32px));padding:26px;background:var(--surface);color:var(--ink);border-color:var(--line)}
.theme-dialog-top{display:flex;align-items:start;justify-content:space-between;gap:18px;margin-bottom:13px}
.theme-dialog h2{font-size:25px;line-height:1.3;margin-top:8px}
.theme-dialog>p{color:var(--muted);font-size:13px;line-height:1.7}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;border:0;padding:0;margin:22px 0}
.theme-visually-hidden,.theme-option>input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap}
.theme-option{display:block;position:relative;cursor:pointer;min-width:0}
.theme-option-content{display:block;height:100%;padding:10px;border:1px solid var(--line);border-radius:11px;background:var(--surface);transition:border-color .15s,background .15s}
.theme-option:hover .theme-option-content{border-color:var(--accent-line);background:var(--surface-soft)}
.theme-option>input:checked+.theme-option-content{border:2px solid var(--green);padding:9px;background:var(--accent-soft)}
.theme-option>input:focus-visible+.theme-option-content{outline:3px solid var(--focus);outline-offset:4px}
.theme-option-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:11px;font-size:13px;font-weight:650}
.theme-selected-check{height:17px;width:17px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--line);font-size:10px;color:transparent;flex-shrink:0}
.theme-option>input:checked+.theme-option-content .theme-selected-check{background:var(--green);border-color:var(--green);color:var(--on-accent)}
.theme-option-description{display:block;font-size:11px;line-height:1.55;color:var(--muted);margin-top:6px}
.theme-preview{height:70px;display:grid;grid-template-columns:23px 1fr;grid-template-rows:12px 1fr;gap:6px;padding:8px;border:1px solid #d9e2ec;border-radius:6px;background:#f2f5fa}
.theme-preview i{display:block;border-radius:2px;background:#fff}
.theme-preview i:first-child{grid-column:1/-1;background:#bdcce0;height:3px;align-self:center;width:64%}
.theme-preview i:nth-child(2){background:#225fc1}
.theme-preview i:last-child{border:1px solid #dde5f0;box-shadow:inset 0 10px #e8eef8}
.theme-preview[data-preview="dark"]{background:#10151e;border-color:#3d4b60}
.theme-preview[data-preview="dark"] i:first-child{background:#758ba8}
.theme-preview[data-preview="dark"] i:nth-child(2){background:#8bb6ff}
.theme-preview[data-preview="dark"] i:last-child{background:#171f2b;border-color:#334258;box-shadow:inset 0 10px #293a53}
.theme-preview[data-preview="original"]{background:#f0f4eb;border-color:#cbd8c5}
.theme-preview[data-preview="original"] i:first-child{background:#adbea2}
.theme-preview[data-preview="original"] i:nth-child(2){background:#1a514a}
.theme-preview[data-preview="original"] i:last-child{background:#fff;border-color:#dbe5d5;box-shadow:inset 0 10px #e3eed4}
.theme-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-top:18px;border-top:1px solid var(--line)}
.theme-status{font-size:11px;line-height:1.6;color:var(--muted);max-width:330px}
.theme-dialog-footer .button{min-height:38px;padding:10px 18px;font-size:12px;flex-shrink:0}

/* Replace literal green surfaces in Light and Dark; Original keeps them. */
:root:not([data-theme="original"]) :is(button,input,select,a,summary,[tabindex]):focus-visible{outline-color:var(--focus)}
:root:not([data-theme="original"]) ::selection{background:var(--accent-line);color:var(--ink)}
:root:not([data-theme="original"]) :is(.brand-divider,.context-symbol){color:var(--muted);border-color:var(--line)}
:root:not([data-theme="original"]) :is(.brand-mark,.skip,.inspection-connection .connection-icon){background:var(--strong-surface);color:var(--lime)}
:root:not([data-theme="original"]) :is(.edition-dot,.tiny-line,.objective-dot,.simulation-label>span){background:var(--green)}
:root:not([data-theme="original"]) :is(.hero h1 em,.atlas-mark,.detail-kicker,.technology-entry .index-number,.component-technology-link){color:var(--green)}
:root:not([data-theme="original"]) .site-header nav a:hover{background:var(--surface-soft)}
:root:not([data-theme="original"]) .site-header nav a[aria-current="page"]{background:var(--accent-soft);color:var(--green)}
:root:not([data-theme="original"]) .button.primary{background:var(--green);color:var(--on-accent)}
:root:not([data-theme="original"]) .button.primary:hover{background:var(--accent-hover)}
:root:not([data-theme="original"]) .button.secondary{background:var(--surface);color:var(--ink)}
:root:not([data-theme="original"]) .button.secondary:hover{background:var(--surface-soft)}
:root:not([data-theme="original"]) .hero-photo{background:var(--strong-surface)}
:root:not([data-theme="original"]) .hero-photo:after{background:linear-gradient(180deg,transparent 40%,#081323e8 100%)}
:root:not([data-theme="original"]) :is(.photo-kicker,.watch-button small,.hero-photo figcaption){color:#e0e8f4}
:root:not([data-theme="original"]) .watch-button:hover .play-circle{color:var(--strong-surface)}
:root:not([data-theme="original"]) .exploration-row:hover .round-arrow{background:var(--accent-soft);border-color:var(--accent-line)}
:root:not([data-theme="original"]) :is(.technology-entry,.objective){background:var(--accent-soft)}
:root:not([data-theme="original"]) :is(.index-number,.node-number,.arch-node small,.detail-example>b,.detail-intro,.reset-button){color:var(--muted)}
:root:not([data-theme="original"]) .arch-node{background:var(--surface);border-color:var(--line);box-shadow:0 3px 12px #00000005}
:root:not([data-theme="original"]) .arch-node:hover{border-color:var(--accent-line);box-shadow:var(--shadow)}
:root:not([data-theme="original"]) .arch-node.selected{background:var(--green);color:var(--on-accent);border-color:var(--green);box-shadow:var(--shadow)}
:root:not([data-theme="original"]) .arch-node.selected :is(.node-number,small){color:var(--on-accent);opacity:.85}
:root:not([data-theme="original"]) .architecture-wires>g{stroke:var(--accent-line)}
:root:not([data-theme="original"]) .architecture-wires marker path{fill:var(--accent-line)}
:root:not([data-theme="original"]) .loop-label{fill:var(--muted)}
:root:not([data-theme="original"]) :is(.component-detail,.lab-controls,.technology-reader){background:var(--surface)}
:root:not([data-theme="original"]) .learning-note{background:var(--accent-soft);border-color:var(--accent-line)}
:root:not([data-theme="original"]) .lab-workspace{background:var(--surface-soft);border-color:var(--line)}
:root:not([data-theme="original"]) .region-readout{border-color:var(--line)}
:root:not([data-theme="original"]) :is(.lab-stats strong small,.capture-history li,.region-readout .region-status){color:var(--muted)}
:root:not([data-theme="original"]) .coverage-track{background:var(--surface-alt)}
:root:not([data-theme="original"]) .coverage-track>span{background:var(--status-good)}
:root:not([data-theme="original"]) .segmented{background:var(--surface-soft)}
:root:not([data-theme="original"]) .segmented button:hover{background:var(--surface-alt)}
:root:not([data-theme="original"]) .segmented button.active{background:var(--surface);color:var(--green);box-shadow:0 2px 6px #00000012}
:root:not([data-theme="original"]) .prediction{border-color:var(--status-warn);background:color-mix(in srgb,var(--status-warn) 7%,var(--surface))}
:root:not([data-theme="original"]) .prediction-icon{background:color-mix(in srgb,var(--status-warn) 14%,var(--surface));color:var(--status-warn)}
:root:not([data-theme="original"]) :is(.lab-feedback.complete,.capture-history li strong){color:var(--status-good)}

/* Keep the simulated metal panel light and its outcome colors stable. */
:root:not([data-theme="original"]) #metal stop:nth-child(1){stop-color:#d7e0e9}
:root:not([data-theme="original"]) #metal stop:nth-child(2){stop-color:#f0f3f7}
:root:not([data-theme="original"]) #metal stop:nth-child(3){stop-color:#b5c2d3}
:root:not([data-theme="original"]) #hatch path{stroke:#a7b6c8}
:root:not([data-theme="original"]) #panel-svg>rect:first-of-type{stroke:#93a4bb}
:root:not([data-theme="original"]) #panel-svg>g[fill]{fill:#657d98}
:root:not([data-theme="original"]) #camera-rays{stroke:var(--accent-line)}
:root:not([data-theme="original"]) #camera :is(rect,circle){fill:var(--green)}
:root:not([data-theme="original"]) #camera circle:first-of-type{fill:var(--lime)}
:root:not([data-theme="original"]) #camera circle:last-of-type{fill:var(--strong-surface)}
:root:not([data-theme="original"]) .camera-label{fill:var(--muted)}
:root:not([data-theme="original"]) .panel-region:where(:not(.qualified):not(.insufficient)) .region-body{fill:#f7f9facc;stroke:#acb9ca}
:root:not([data-theme="original"]) .panel-region.predicted .region-body{stroke:#9a701f}
:root:not([data-theme="original"]) .panel-region.selected .region-body{stroke:#245fc1}
:root:not([data-theme="original"]) .panel-region:focus-visible .region-body{stroke:#19489c}
:root:not([data-theme="original"]) .panel-region text{fill:#36465d}
:root:not([data-theme="original"]) .legend .legend-unseen{background:#f7f9fa;border-color:#acb9ca}
:root:not([data-theme="original"]) .legend .legend-predicted{border-color:var(--status-warn)}
:root:not([data-theme="original"]) dialog::backdrop{background:#08111dbd}
:root:not([data-theme="original"]) :is(.icon-button,.reader-tabs small){background:var(--surface-alt);color:var(--ink)}
:root:not([data-theme="original"]) .icon-button:hover{background:var(--accent-soft);color:var(--green)}
:root:not([data-theme="original"]) :is(#video-container,.technology-video-container){background:var(--strong-surface)}

/* Technology reader, research resources, report tables and timeline. */
:root:not([data-theme="original"]) .technology-navigation{border-color:var(--line)}
:root:not([data-theme="original"]) .technology-navigation>a>span{color:var(--green)}
:root:not([data-theme="original"]) :is(.atlas-search input,.source-controls input,.atlas-filter){background:var(--surface);border-color:var(--line);color:var(--ink)}
:root:not([data-theme="original"]) :is(.atlas-search input,.source-controls input)::placeholder{color:var(--muted);opacity:.85}
:root:not([data-theme="original"]) .atlas-topic-list{scrollbar-color:var(--accent-line) transparent}
:root:not([data-theme="original"]) .atlas-topic:hover{background:var(--surface-soft)}
:root:not([data-theme="original"]) .atlas-topic[aria-current="page"]{background:var(--green);color:var(--on-accent)}
:root:not([data-theme="original"]) .atlas-topic[aria-current="page"] .topic-number{color:var(--on-accent);opacity:.85}
:root:not([data-theme="original"]) .atlas-topic[aria-current="page"] small{opacity:.9}
:root:not([data-theme="original"]) :is(.atlas-group-title,.reader-kicker,.reader-label,.control-lens .reader-label,.reader-provenance,.report-chapter-header>span,.timeline-year-label){color:var(--muted)}
:root:not([data-theme="original"]) .reader-header{background:linear-gradient(110deg,var(--accent-soft),var(--surface))}
:root:not([data-theme="original"]) :is(.reader-header>p,.reader-section>p,.reader-section .body-copy,.control-lens p,.mechanism-list p,.tradeoffs li,.report-rich>p,.report-table td,.role-explanation p){color:var(--ink)}
:root:not([data-theme="original"]) .control-lens{background:var(--surface-soft);border-color:var(--accent-line)}
:root:not([data-theme="original"]) :is(.related-topics a,.role-flow span){background:var(--accent-soft);border-color:var(--accent-line);color:var(--ink)}
:root:not([data-theme="original"]) .related-topics a:hover{background:var(--surface-alt)}
:root:not([data-theme="original"]) :is(.mechanism-list li,.reader-provenance,.report-chapter+.report-chapter){border-color:var(--line)}
:root:not([data-theme="original"]) .mechanism-list li>span{background:var(--accent-soft);color:var(--green)}
:root:not([data-theme="original"]) .tradeoffs>div{background:var(--surface-soft)}
:root:not([data-theme="original"]) .tradeoffs>div+div{background:var(--surface-alt)}
:root:not([data-theme="original"]) .source-citation{color:var(--green);border-color:var(--accent-line)}
:root:not([data-theme="original"]) .source-citation:hover{color:var(--green);background:var(--accent-soft)}
:root:not([data-theme="original"]) .learning-video{background:var(--surface-soft)}
:root:not([data-theme="original"]) .learning-video .video-play{border-color:var(--accent-line);background:var(--accent-soft);color:var(--green)}
:root:not([data-theme="original"]) :is(.learning-video .video-kind,.learning-video .video-actions a,.paper-card .paper-number,.paper-card small,.paper-card .paper-arrow){color:var(--muted)}
:root:not([data-theme="original"]) .paper-card{background:var(--surface);border-color:var(--line);color:var(--ink)}
:root:not([data-theme="original"]) .paper-card:hover{background:var(--surface-soft)}
:root:not([data-theme="original"]) .report-table th{background:var(--surface-alt);color:var(--ink)}
:root:not([data-theme="original"]) .report-table td{border-color:var(--line)}
:root:not([data-theme="original"]) .report-table tbody tr:nth-child(even){background:var(--surface-soft)}
:root:not([data-theme="original"]) .report-figure img{border-color:var(--line);background:var(--surface-alt)}
:root:not([data-theme="original"]) .report-note{background:var(--surface-soft);border-color:var(--line);color:var(--muted)}
:root:not([data-theme="original"]) :is(.timeline-years button,.source-kind-filters button){background:var(--surface);border-color:var(--line);color:var(--muted)}
:root:not([data-theme="original"]) :is(.timeline-years button[aria-pressed="true"],.source-kind-filters button[aria-pressed="true"]){background:var(--green);border-color:var(--green);color:var(--on-accent)}
:root:not([data-theme="original"]) .timeline-event:hover{background:var(--surface-soft)}
:root:not([data-theme="original"]) .timeline-event[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent-line)}
:root:not([data-theme="original"]) .timeline-event>span:first-child{color:var(--muted)}
:root:not([data-theme="original"]) .timeline-event>span:first-child:after{background:var(--accent-line)}
:root:not([data-theme="original"]) .timeline-detail{background:var(--strong-surface);color:var(--on-strong)}
:root:not([data-theme="original"]) .timeline-detail :is(.reader-label,.timeline-meaning h4,.source-citation){color:var(--lime)}
:root:not([data-theme="original"]) .timeline-detail :is(p,.timeline-source){color:var(--strong-muted)}
:root:not([data-theme="original"]) .timeline-detail .timeline-topic-link{color:var(--on-strong);border-color:var(--accent-line)}
:root:not([data-theme="original"]) .timeline-detail .source-citation:hover{background:var(--lime);color:var(--strong-surface)}
:root:not([data-theme="original"]) :is(.roles-explorer,.roles-buttons){border-color:var(--line)}
:root:not([data-theme="original"]) .roles-buttons{background:var(--surface-soft)}
:root:not([data-theme="original"]) .roles-buttons button{color:var(--muted)}
:root:not([data-theme="original"]) .roles-buttons button[aria-pressed="true"]{color:var(--green);background:var(--surface);border-color:var(--green)}
:root:not([data-theme="original"]) :is(.role-flow i,.role-explanation .role-footnote){color:var(--muted)}
:root:not([data-theme="original"]) .mobile-topics-toggle{background:var(--accent-soft);border-color:var(--accent-line);color:var(--ink)}

@media(max-width:1300px){.header-actions .edition{display:none}.header-actions{gap:10px}}
@media(max-width:1000px){.theme-toggle .theme-current-name{display:none}}
@media(max-width:850px){.site-header{justify-content:space-between}.site-header .brand{order:0;width:auto;margin:0}.header-actions{order:1}.site-header nav{order:2;width:100%;margin:0}.theme-toggle{min-height:38px}}
@media(max-width:420px){.site-header{gap:12px}.site-header .brand{gap:8px}.site-header .brand-mark{width:30px;height:30px;font-size:19px}.site-header .brand b{font-size:18px}.site-header .brand-divider{margin:0 6px}.site-header .brand-name{font-size:11px}.theme-toggle{padding:8px 9px;gap:6px;font-size:11px}.theme-dialog{padding:20px}.theme-dialog h2{font-size:22px}.theme-options{gap:8px}.theme-option-content{padding:8px}.theme-option>input:checked+.theme-option-content{padding:7px}.theme-preview{height:58px;padding:6px;gap:5px;grid-template-columns:16px 1fr}.theme-option-description{font-size:10px}.theme-option-heading{font-size:12px}.theme-dialog-footer{gap:10px}.theme-status{font-size:10px}}
@media(prefers-reduced-motion:reduce){.theme-option-content{transition:none}}

/* Curiosity is the new editorial default. Semantic outcome colors stay distinct. */
:root[data-theme="curiosity"]{
  color-scheme:light;
  --ink:#171219;--muted:#615669;--green:#80138b;--lime:#f6d8ff;
  --paper:#fffdf8;--white:#fff;--line:#d7cdd8;--amber:#9a6715;
  --surface:#fff;--surface-soft:#f6eff7;--surface-alt:#eee3f4;
  --accent-soft:#f5eaf7;--accent-line:#caa4d1;--accent-hover:#5d0e66;
  --on-accent:#fff;--strong-surface:#381540;--on-strong:#fff;
  --strong-muted:#e2cce7;--focus:#80138b;
  --status-good:#2e7449;--status-warn:#9a6715;--shadow:0 12px 36px #4014490a;
}
.theme-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.theme-preview[data-preview="curiosity"]{background:#fffdf8;border-color:#d7cdd8;grid-template-columns:1fr 1fr}
.theme-preview[data-preview="curiosity"] i:first-child{background:#80138b;width:65%}
.theme-preview[data-preview="curiosity"] i:nth-child(2){background:#ffd642}
.theme-preview[data-preview="curiosity"] i:last-child{background:#eee3f4;border-color:#d7cdd8;box-shadow:inset 0 -10px #80138b}
