/* Site-wide preferences, based on the supplied control reference. */
.site-preferences{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:30px;padding:32px 16px 44px;font-family:"Plus Jakarta Sans",sans-serif}
.theme-control{display:flex;align-items:center;padding:5px;background:#f7f7f7;border:1px solid #e2e2e2;border-radius:22px;box-shadow:0 2px 4px #00000008}
.site-preferences button{font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.theme-control button{display:grid;place-items:center;width:62px;height:48px;padding:0;border:0;border-radius:17px;background:transparent;color:#777;box-shadow:none;min-width:0}
.theme-control button[aria-pressed="true"]{background:#f5f5f5;color:#171717;box-shadow:0 6px 10px #00000016}
.site-preferences svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
.site-preferences button:focus-visible{outline:2px solid #397e8b;outline-offset:4px}
.language-control{position:relative}
.language-trigger{display:flex;align-items:center;justify-content:center;gap:11px;height:60px;padding:0 18px;border:1px solid #e2e2e2;border-radius:22px;background:#f7f7f7;color:#080808;font-size:20px;font-weight:700;line-height:1;box-shadow:0 2px 4px #00000008}
.language-options{position:absolute;bottom:calc(100% + 12px);right:0;z-index:20;width:240px;padding:18px;border:1px solid #e2e2e2;border-radius:16px;background:#fff;color:#171717;box-shadow:0 8px 24px #00000012;font-size:14px;text-align:left}
.language-options[hidden]{display:none}.language-options p{margin:8px 0 0;font-size:12px;color:#64748b;line-height:1.6}
@media(max-width:400px){.site-preferences{gap:16px}.theme-control button{width:48px;height:44px}.language-trigger{height:56px;font-size:17px;padding:0 14px;gap:8px}}
/* Dark mode uses the same typography, geometry and resource content. */
html[data-theme="dark"]{color-scheme:dark;--paper:#182231;--ink:#e8edf5;--muted:#a4b2c7;--edge:#334155;--border:#334155;--soft:#202c3d;--blue:#b8cadf;--blue-dark:#dce8f6;--blue-pale:#202c3d}
html[data-theme="dark"],html[data-theme="dark"] body{background:#101722!important;color:#e8edf5!important}
html[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,a,strong,b,label,button,.identity,.identity-wordmark,.brand,.brand-name,.drawer-heading,.resource-mark){color:#e8edf5!important}
html[data-theme="dark"] :is(p,li,.lead,.source-copy,.eyebrow,.section-kicker,.rail-label,.resource-source,.result-snippet,footer,footer span){color:#a4b2c7!important}
html[data-theme="dark"] :is(.site-header,.menu-panel,.result,.starter-feature,.apt-feature,.advanced-panel,.resource-grid a,.tool-section li,.osint-item,.glossary-item,.plan,.reader-aside,.table-scroll,.apt-year-grid a,.research-card,.record-card,.secondary-link,.header-archive,.result-view,.starter-feature>a,.apt-feature>a,input,select,textarea,.category-list button,.publisher-list button,.filter-line>button,.search-close){background:#182231!important;color:#e8edf5!important;border-color:#334155!important}
html[data-theme="dark"] :is(.tag,.category-label,.tag-list button,.related-control b,code,pre,.menu-close){background:#253246!important;color:#b8cadf!important}
html[data-theme="dark"] :is(.primary-link,.apt-source,.search-submit,.empty-state button){background:#dce8f6!important;color:#101722!important;border-color:#dce8f6!important}
html[data-theme="dark"] :is(.menu-panel a:hover,.category-list button:hover,.publisher-list button:hover,.resource-grid a:hover,.apt-year-grid a:hover){background:#253246!important}
html[data-theme="dark"] :is(.theme-control,.language-trigger,.language-options){background:#182231;border-color:#334155;color:#e8edf5}
html[data-theme="dark"] .theme-control button{color:#94a3b8!important}
html[data-theme="dark"] .theme-control button[aria-pressed="true"]{background:#2a384c;color:#fff!important;box-shadow:0 6px 10px #00000030}

/* Top-of-page placement beneath the navigation. */
.site-preferences{padding:20px 16px 8px;margin:0 auto;max-width:1080px}
.language-options{bottom:auto;top:calc(100% + 12px)}

/* Compact utility controls at every screen size. */
.site-preferences{gap:12px;padding:12px 16px 0;justify-content:flex-end;box-sizing:border-box}
.theme-control{padding:3px;border-radius:15px}
.theme-control button{width:36px;height:32px;border-radius:11px}
.site-preferences svg{width:17px;height:17px}
.language-trigger{height:40px;padding:0 12px;gap:7px;border-radius:15px;font-size:12px;letter-spacing:.02em}
@media(max-width:400px){.site-preferences{gap:10px}.theme-control button{width:34px;height:32px}.language-trigger{height:40px;padding:0 10px;font-size:12px;gap:6px}}

/* Compact appearance control, exclusively inside the site header. */
.site-header .header-theme-control{display:flex;flex:none;align-items:center;gap:0;padding:2px;margin:0;border:1px solid #e2e8f0;border-radius:12px;background:#f7f7f7;box-shadow:0 1px 3px #00000008}
.site-header .header-theme-control button{display:grid;place-items:center;width:30px;height:32px;min-width:0;padding:0;border:0;border-radius:9px;background:transparent;color:#64748b;cursor:pointer}
.site-header .header-theme-control button[aria-pressed="true"]{background:#fff;color:#0f172a;box-shadow:0 2px 5px #00000014}
.site-header .header-theme-control svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.site-header .header-theme-control button:focus-visible{outline:2px solid #0891b2;outline-offset:2px}
.site-header .header-inner>nav[aria-label="Main navigation"]{gap:8px}
html[data-theme="dark"] .site-header .header-theme-control{background:#182231;border-color:#334155}
html[data-theme="dark"] .site-header .header-theme-control button[aria-pressed="true"]{background:#2a384c;color:#fff!important}
.starter-feature>a,html[data-theme="dark"] .starter-feature>a{background:#cdeef5!important;border-color:#cdeef5!important;color:#0f172a!important}
.starter-feature>a:hover,html[data-theme="dark"] .starter-feature>a:hover{background:#b9e5ef!important;border-color:#b9e5ef!important;color:#0f172a!important}
@media(max-width:650px){
 .site-header .header-inner{gap:6px}
 .site-header .header-inner>nav[aria-label="Main navigation"]{gap:4px;flex:none}
 .site-header .header-theme-control button{width:26px;height:30px}
 .site-header .header-theme-control svg{width:15px;height:15px}
 .site-header nav .menu-button{width:32px;height:36px}
 .site-header nav a.header-search:first-child{width:32px!important;height:36px}
}
@media(max-width:360px){
 .site-header .header-inner{padding-left:12px;padding-right:12px}
 .site-header .identity .brand-mark{width:30px;height:30px}
 .site-header .identity-wordmark{font-size:.9rem}
 .site-header .identity-wordmark small{display:none}
 .site-header .brand-name{font-size:12px}
 .site-header .brand-logo{width:30px}
}
