/* Appearance adapted from weekly-ebd: theme and identity are independent. */
:root{--identity-hue:235;--identity-level:55%;--identity-hover-level:50%;--identity-on:#fff;--identity-solid:hsl(var(--identity-hue) 72% var(--identity-level));--identity-hover:hsl(var(--identity-hue) 72% var(--identity-hover-level));--identity-text:hsl(var(--identity-hue) 70% 25%);--identity-soft:hsl(var(--identity-hue) 65% 96%);--identity-border:hsl(var(--identity-hue) 50% 85%);--identity-pale:hsl(var(--identity-hue) 80% 79%);--identity-glow:hsl(var(--identity-hue) 72% 50% / .2)}
html[data-theme="dark"][data-accent]{--identity-text:hsl(var(--identity-hue) 75% 79%);--identity-soft:hsl(var(--identity-hue) 28% 23%);--identity-border:hsl(var(--identity-hue) 34% 38%)}
.theme-control{position:fixed;top:22px;right:28px;display:flex;padding:4px;gap:3px;background:#fff;border:1px solid #e4e9f2;border-radius:11px;box-shadow:0 3px 12px #101c3210;z-index:60;font-family:'DM Sans',system-ui,sans-serif}
.theme-control button{border:0;border-radius:7px;background:transparent;color:#64748b;padding:8px 11px;font:650 10px 'DM Sans',system-ui,sans-serif;display:flex;align-items:center;gap:6px;cursor:pointer}.theme-control button span{font-size:14px;line-height:1}.theme-control>button[aria-pressed="true"]{background:var(--identity-soft);color:var(--identity-text)}.theme-control button:hover{background:var(--identity-soft)}
.header-actions{margin-right:235px}.login-panel{padding-top:90px}
html[data-theme="dark"] .theme-control{background:#111c2d;border-color:#2d3e57;box-shadow:0 3px 12px #0002}html[data-theme="dark"] .theme-control button{color:#b8c3d2}html[data-theme="dark"] .theme-control>button[aria-pressed="true"]{background:var(--identity-soft);color:var(--identity-text)}html[data-theme="dark"] .theme-control button:hover{background:#1b2a40}
html[data-accent] .primary{background:var(--identity-solid);color:var(--identity-on);border-color:var(--identity-solid);box-shadow:0 5px 16px var(--identity-glow)}html[data-accent] .primary:hover{background:var(--identity-hover);color:var(--identity-on)}
html[data-accent] :is(nav button.active,.nav-home.active){background:var(--identity-solid);color:var(--identity-on)}html[data-accent] :is(nav button:hover,.nav-home:hover){background:var(--identity-hover);color:var(--identity-on)}
html[data-accent] :is(.hero,.module-banner){background:var(--identity-soft);border-color:var(--identity-border)}html[data-accent] :is(.module-banner h2,.module-banner p,.module-banner .eyebrow,.hero h2,.hero p){color:var(--identity-text)}
html[data-accent] :is(.module-symbol,.destination-icon,.card-icon,.hero-mark,.module-banner-art,.directory-status){background:var(--identity-soft);color:var(--identity-text);border-color:var(--identity-border)}
html[data-accent] .module-guide button{background:var(--identity-solid);color:var(--identity-on)}html[data-accent] .module-guide button:hover{background:var(--identity-hover)}
html[data-accent] :is(.module-source,.destination-action,.inline-link,.article a,.clear-search-filter,.directory-result-body a,.toc a:hover){color:var(--identity-text)}
html[data-accent] :is(.module-destination:hover,.card:hover,.page-row:hover,.module-recent-item:hover,.module-search-item:hover){border-color:var(--identity-solid)}
html[data-accent] .module-search .search-filter-popup .search-filter-option[aria-checked="true"]{background:var(--identity-soft);color:var(--identity-text);box-shadow:inset 3px 0 var(--identity-solid)}
html[data-accent] .module-search .search-filters>.filter-trigger:after{border-top-color:var(--identity-text)}
html[data-accent] :is(.article blockquote,.callout,.article code){background:var(--identity-soft);color:var(--identity-text);border-color:var(--identity-solid)}html[data-accent] .article pre code{background:none;color:inherit}
html[data-accent] :is(.intro-copy .eyebrow,.module-guide .eyebrow){color:var(--identity-pale)}
html[data-accent] :is(button,a,input,summary):focus-visible{outline-color:var(--identity-solid)}
.theme-control>#identity-toggle{border-left:1px solid var(--line);border-radius:0 7px 7px 0;margin-left:2px}.theme-control .identity-current{display:block;width:14px;height:14px;border-radius:50%;background:var(--identity-solid);box-shadow:0 0 0 2px var(--identity-border)}.theme-control .identity-toggle-label{font-size:10px}.theme-control .identity-panel[hidden]{display:none}.theme-control .identity-panel{position:absolute;top:calc(100% + 10px);right:0;width:275px;max-width:calc(100vw - 32px);background:#fff;border:1px solid #e1e6f1;border-radius:13px;box-shadow:0 12px 40px #10213a20;padding:19px;z-index:14;text-align:left}.identity-panel h3{font-size:12px;margin:0 0 7px;color:#34425d}.identity-panel p{font-size:10px;line-height:1.7;color:#8b98ae;margin:0 0 16px}.identity-swatches{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.theme-control .identity-swatches button{display:flex;flex-direction:column;justify-content:center;gap:7px;min-width:0;border:1px solid transparent;border-radius:9px;padding:10px 2px;background:none;color:#59687e}.theme-control .identity-swatches button[aria-pressed="true"]{background:var(--identity-soft);border-color:var(--identity-border);color:var(--identity-text)}.theme-control .identity-swatches button:hover{background:var(--identity-soft)}.theme-control .identity-swatch{width:23px;height:23px;border-radius:50%;display:block;background:hsl(var(--swatch-hue) 72% var(--swatch-level));box-shadow:inset 0 0 0 1px #00000012}.theme-control .identity-swatches .palette-label{font-size:8px;font-weight:600;line-height:1.4}.appearance-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
html[data-theme="dark"] .identity-panel{background:#111c2d;border-color:#30425b;box-shadow:0 12px 40px #0004}html[data-theme="dark"] .identity-panel h3{color:#e5ebf3}html[data-theme="dark"] .identity-panel p{color:#acbacd}html[data-theme="dark"] .identity-swatches button{color:#bdc8d8}
@media(max-width:750px){html[data-accent] header .badge{margin-right:0}.theme-control .identity-toggle-label{display:none}.theme-control>#identity-toggle{padding:7px 9px}.theme-control .identity-panel{width:265px;padding:17px}.theme-control .identity-swatches button{padding:9px 2px}.theme-control .identity-swatches .palette-label{font-size:8px}}

@media(max-width:1100px){.header-label{display:none}}
@media(max-width:750px){.theme-control{top:17px;right:16px;padding:3px;gap:1px;border-radius:9px}.theme-control>button{font-size:9px;padding:7px 8px;gap:4px}.theme-control>button span{font-size:12px}.theme-control .identity-toggle-label{display:none}.theme-control>#identity-toggle{padding:7px 9px}.header-actions{margin-right:166px}.intro>.brand{font-size:20px}.intro>.brand .brand-logo{width:30px;height:30px}.login-panel{padding-top:65px}.theme-control .identity-panel{width:265px;padding:17px}.theme-control .identity-swatches button{padding:9px 2px}}
@media print{.theme-control{display:none!important}}

/* Cream uses dark ink on pale controls; backgrounds remain independent. */
html[data-accent="cream"]{--identity-solid:#f2e8cf;--identity-hover:#e6d8b6;--identity-on:#111b32;--identity-text:#66552f;--identity-soft:#faf6eb;--identity-border:#d9cba8;--identity-pale:#f2e8cf;--identity-glow:#d9cba833}
html[data-theme="dark"][data-accent="cream"]{--identity-text:#f2e8cf;--identity-soft:#454238;--identity-border:#81765a}
.theme-control [data-accent-choice="cream"] .identity-swatch{background:#f2e8cf;box-shadow:inset 0 0 0 1px #b9aa88}
html[data-theme="dark"] :is(.intro,.module-guide){background:#090f1b;border-color:#293a50}html[data-theme="dark"] :is(.intro-copy p,.module-guide p){color:#b9c5d4}

/* Neutral surfaces allow each independent identity color to stand out. */
html[data-theme="light"]{background:#f5f4f0;color:#20312d;--line:#deded8}
html[data-theme="light"] :is(body,.workspace,.login-panel){background:#f5f4f0;color:#20312d}
html[data-theme="light"] header{background:#fafaf8;border-color:#deded8}
html[data-theme="light"] :is(.card,.page-row,.module-overview,.module-destination,.module-resources,.module-recent-item,.module-search-item,.directory-result,.article details){background:#fff;border-color:#deded8}
html[data-theme="light"] :is(.header-label,.quiet,.breadcrumbs,.page-heading p,.date-badge,.section-title>span,.module-section-title>span,.login-help,.secure-note,footer,footer span,.loading){color:#59636b}
html[data-theme="light"] :is(.module-identity h1,.page-heading h1,.section-title h2,.module-section-title h2,.login-card h2){color:#243039}
html[data-theme="light"] .hero .eyebrow{color:var(--identity-text)}
#sidebar{background:#20242b;color:#d0d3d9;border-right:1px solid #414650}
#sidebar .sidebar-label{color:#a5acb8}
#sidebar .sidebar-bottom{border-top-color:#414650}
#sidebar .sidebar-bottom p{color:#a5acb8}
html[data-theme="dark"] #sidebar{background:#14181f;color:#d0d3d9;border-right-color:#303640}
html[data-theme="dark"] #sidebar .sidebar-bottom{border-top-color:#303640}
.intro{background:#20242b}.intro-copy p{color:#c1c5cc}.intro-tags span{color:#d0d3d9}.intro-foot{color:#a5acb8}
html[data-theme="dark"] .intro{background:#14181f;border-color:#303640}

/* Accent-responsive sidebar, deliberately limited to light mode. */
html[data-theme="light"] #sidebar{background:var(--identity-soft);border-right:1px solid var(--identity-border);color:#45505b;transition:background-color .18s ease,border-color .18s ease}
html[data-theme="light"] #sidebar .brand{color:#243039}
html[data-theme="light"] #sidebar .sidebar-label{color:var(--identity-text)}
html[data-theme="light"] #sidebar .sidebar-bottom{color:#45505b;border-top-color:var(--identity-border)}
html[data-theme="light"] #sidebar .sidebar-bottom p{color:#59636b}
html[data-theme="light"] #sidebar .status-dot{background:var(--identity-solid)}
html[data-theme="light"] #sidebar nav button:not(.active)>span:first-child{color:var(--identity-text)}
html[data-theme="light"] #sidebar :is(.nav-home:not(.active),nav button:not(.active)):hover{background:var(--identity-border);color:var(--identity-text)}
html[data-theme="light"] #sidebar :is(.nav-home.active,nav button.active){background:var(--identity-solid);color:var(--identity-on);box-shadow:0 3px 12px var(--identity-glow)}
html[data-theme="light"] #sidebar :is(.nav-home.active,nav button.active):hover{background:var(--identity-hover)}
html[data-theme="light"] #sidebar :is(.nav-home,nav button){transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}

/* Light surfaces vary only in hue; each surface keeps fixed HSL saturation/lightness. */
html[data-theme="light"]{
 --surface-canvas:hsl(var(--identity-hue) 20% 95%);
 --surface-sidebar:hsl(var(--identity-hue) 16% 15%);
 --surface-header:hsl(var(--identity-hue) 17% 98%);
 --surface-line:hsl(var(--identity-hue) 8% 86%);
 --surface-sidebar-line:hsl(var(--identity-hue) 16% 28%);
 --line:var(--surface-line);
 background:var(--surface-canvas);
}
html[data-theme="light"] :is(body,.workspace,.login-panel){background:var(--surface-canvas)}
html[data-theme="light"] header{background:var(--surface-header);border-color:var(--surface-line)}
html[data-theme="light"] :is(.card,.page-row,.module-overview,.module-destination,.module-resources,.module-recent-item,.module-search-item,.directory-result,.article details){border-color:var(--surface-line)}
html[data-theme="light"] #sidebar{background:var(--surface-sidebar);border-right-color:var(--surface-sidebar-line)}
html[data-theme="light"] #sidebar .sidebar-bottom{border-top-color:var(--surface-sidebar-line)}

/* Keep the dark sidebar's saturation/lightness stable; only its hue follows the accent. */
html[data-theme="light"] #sidebar{color:#d0d3d9}
html[data-theme="light"] #sidebar .brand{color:#fff}
html[data-theme="light"] #sidebar .sidebar-label{color:hsl(var(--identity-hue) 30% 78%)}
html[data-theme="light"] #sidebar .sidebar-bottom{color:#d0d3d9}
html[data-theme="light"] #sidebar .sidebar-bottom p{color:#afb6c2}
html[data-theme="light"] #sidebar nav button:not(.active)>span:first-child{color:var(--identity-pale)}
html[data-theme="light"] #sidebar :is(.nav-home:not(.active),nav button:not(.active)):hover{background:hsl(var(--identity-hue) 16% 24%);color:var(--identity-pale)}
.brand-wordmark{display:inline-flex;gap:0;white-space:nowrap}
.brand .brand-work{color:#fff}
.brand .brand-os{color:var(--identity-pale);transition:color .15s ease}
