/* Shared neutral surfaces. Scientific images, video and canvas retain their colours. */
:root[data-theme="light"]{color-scheme:light;--ww-page:#fff;--ww-surface:#fff;--ww-soft:#f3f5f6;--ww-text:#20333b;--ww-muted:#50636d;--ww-line:#d5dfe3;--ww-accent:#086579}
:root[data-theme="dark"]{color-scheme:dark;--ww-page:#11171c;--ww-surface:#1a232b;--ww-soft:#232f38;--ww-text:#e6eef2;--ww-muted:#b5c5ce;--ww-line:#41505c;--ww-accent:#8dd5e1}
:root[data-theme]{background:var(--ww-page)!important;color:var(--ww-text)!important;--surface:var(--ww-surface);--muted:var(--ww-muted);--line:var(--ww-line);--accent:var(--ww-accent);--ink:var(--ww-text);--soft:var(--ww-soft)}
html[data-theme] body{background:var(--ww-page)!important;color:var(--ww-text)!important}
html[data-theme] :is(.card,.resource-card,.subject-card,.library-intro,.browse,.deeper,.facts,.references,.reference-card,.information,.record-card,.dino-choice,.detail>section,.table-panel,.reading-chapter,.ll-resource,.ll-panel,.ll-card,.story-card,.source-card,.panel,.reading-card,.library-header nav,.search-form,.home-search>div,#entry-list,.related a){background:var(--ww-surface)!important;color:var(--ww-text)!important;border-color:var(--ww-line)!important;box-shadow:none!important}
html[data-theme] :is(.resource-versions,.active-filters,.facts dl>div,.word-note,.topic-nav button span,.discovery-links a,.article-links a,.back,.entry-browser summary){background:var(--ww-soft)!important;color:var(--ww-text)!important;border-color:var(--ww-line)!important;box-shadow:none!important}
html[data-theme] :is(h1,h2,h3,h4,h5,h6,.brand,.subject-copy strong,.resource-copy,.ww-context,.tree-node,.record-card strong){color:var(--ww-text)!important}
html[data-theme] :is(.welcome p,.subject-copy>span,.resource-description,.resource-label,.resource-arrow,.eyebrow,.image-type,.visual-bottom p,.facts dt,.credit,.supporting,.level-tag,.reference-note,.reference-links,.library-footer,.ww-current,.search-scope,#subtitle,#meta,.art-caption,.note-space #note-copy,.discovery-links>span){color:var(--ww-muted)!important}
html[data-theme] :is(.references a,.reference-links a,.resource-versions a,.section-heading>a,.library-footer a,.related small){color:var(--ww-accent)!important}
html[data-theme] :is(button,select,input:not([type=range]),textarea){background:var(--ww-surface);color:var(--ww-text);border-color:var(--ww-line);box-shadow:none}
html[data-theme] :is(input,textarea)::placeholder{color:var(--ww-muted);opacity:1}
html[data-theme] :is(button[aria-pressed=true],.article-links a[aria-current=true],.search-form button,.search-apply){background:#126776!important;color:#fff!important;border-color:#126776!important}
html[data-theme] :is(button,a,select,input):focus-visible{outline:3px solid var(--ww-accent);outline-offset:3px}
html[data-theme] .subject-scene{background:var(--ww-soft)!important}
html[data-theme] .library-intro::after{display:none}
.ww-theme-control{display:inline-flex!important;align-items:center;gap:6px;flex:none;margin:0 0 0 auto;font:500 12px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;color:var(--ww-text)!important;white-space:nowrap;background:var(--ww-surface);border-radius:8px;padding:4px 6px}
.ww-theme-control select{width:auto!important;min-width:0!important;min-height:36px!important;max-width:100px;margin:0!important;padding:5px 8px!important;border:1px solid var(--ww-line)!important;border-radius:6px!important;font:inherit!important;color:var(--ww-text)!important;background:var(--ww-surface)!important}
header:has(>.ww-theme-control){flex-wrap:wrap;column-gap:12px}
/* References are supporting information, not another feature card. */
html .references.card{padding:12px 14px;border-radius:10px;align-self:start}
html .references h2{font-size:17px;margin:0 0 8px}
html .references .eyebrow{display:none}
html .references :is(p,.credit){font-size:13px;line-height:1.5;margin:0 0 8px}
html .references a{font-size:13px;min-height:28px;padding:3px 0}
html .references .text-button{font-size:12px;min-height:34px;margin-top:0;padding:5px 10px}
html .reference-card .resource-main{min-height:0;padding:12px 14px;gap:8px}
html .reference-card :is(h3,h4,h5){font-size:16px;margin-bottom:5px}
html .reference-card .resource-description{font-size:13px;line-height:1.45}
html .reference-card .resource-label{font-size:11px;padding:2px 6px;margin-bottom:6px}
@media(max-width:650px){.ww-theme-control{font-size:12px!important}.ww-theme-control select{min-height:40px!important}}
@media print{.ww-theme-control{display:none!important}}
html[data-theme="dark"] .brand img{background:#fff;border:1px solid #d5dfe3;border-radius:50%;padding:3px;object-fit:contain}
