.theme-control{display:flex;align-items:center;gap:10px;font-size:12px}.theme-toggle{display:inline-flex;align-items:center;padding:3px;width:46px;height:26px;border:1px solid #b9a3da;border-radius:30px;background:#d9cce9;cursor:pointer;flex-shrink:0}.theme-toggle-knob{display:block;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0003;transition:transform .2s}.theme-toggle[aria-checked=true]{background:#7951dc;border-color:#a18be1}.theme-toggle[aria-checked=true] .theme-toggle-knob{transform:translateX(19px)}.theme-toggle:focus-visible{outline:2px solid #b69aff;outline-offset:4px}
html[data-theme=dark]{color-scheme:dark;--paper:#15121e;--ink:#eee8f7;--muted:#b6a9c7;--line:#3c314d;--lavender:#30253f;--orange:#b79aff;--inner-border:#40334f;--inner-title:#dbc2f4;--inner-shadow:0 8px 30px #0002}
html[data-theme=dark] body{background:var(--paper);color:var(--ink)}
html[data-theme=dark] :is(.news-card,.guide-card,.tool-card,.product-card,.product-section,.product-quick-card,.product-alternatives,.product-filters,.admin-panel,.edit-form,.stat,.lexicon-tooltip,.studio-generation-modal,.studio-library-modal,.studio-markdown-preview,.compact-proposal,.preparation-card-popover){background:#211b2d;border-color:var(--line);color:var(--ink);box-shadow:0 8px 25px #0002}
html[data-theme=dark] main :is(h1,h2,h3,h4,h5,h6){color:#e8d6fb}
html[data-theme=dark] main :is(p,li,dt,dd,label,small,summary,.muted,.studio-help,.meta,.product-publisher,.product-tagline,.product-detail-meta,.compact-source,.text-link,.category-label){color:#c4b4d5}
html[data-theme=dark] :is(.breadcrumbs,.breadcrumbs a,.count-label,.search-description,.article-byline,.article-byline small,.reading-aside,.source-box){color:#beadcf}
html[data-theme=dark] main :is(a:hover,.text-link:hover){color:#d3b5ff}
html[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]),textarea,select){background:#191421;color:#eee5f8;border-color:#51415f}
html[data-theme=dark] :is(.button.outline,.journal-topics>a,.product-tags>span,.status-pill,.product-bulk-toolbar,.pipeline,.quiet-note,.command-grid>div,.product-verdict-grid>div,.admin-panel details,.source-box,.reading-aside,.markdown-content blockquote,.markdown-content code,.product-pagination [aria-current]){background:#30263e;color:#d2bce9;border-color:#4c3b60}
html[data-theme=dark] .journal-topics>a.active{background:#7951dc;color:#fff}
html[data-theme=dark] :is(.studio-topnav,.studio-nav-group,.studio-page-heading,.log-row,.product-section-nav,.glossary details,.product-admin-row,.article-byline,.guide-steps section){border-color:var(--line)}
html[data-theme=dark] :is(.studio-topnav a,.settings-navigation a){color:#c8b3df}
html[data-theme=dark] :is(.studio-topnav a.active,.settings-navigation a.active){background:#6844c7;color:#fff}
html[data-theme=dark] .newsletter-banner{background:linear-gradient(120deg,#332244,#24203e);border-color:#514061}
html[data-theme=dark] :is(.newsletter-banner h2,.newsletter-banner p){color:#e1c9f6}
html[data-theme=dark] .brief-preview{background:#292039;border-color:#514061}
html[data-theme=dark] :is(.preview-heading,.preview-line b){color:#d6bce9}
html[data-theme=dark] .explore-grid>a{background:#211b2d;border-color:var(--line);color:#d9c4ef}
html[data-theme=dark] .footer{background:#110e18;border-color:var(--line);color:#c7b5db}
html[data-theme=dark] .footer :is(a,p,small,.eyebrow){color:#c7b5db}
html[data-theme=dark] .footer .brand{color:#fff}
html[data-theme=dark] .lexicon-tooltip strong{color:#d7b5ff}
html[data-theme=dark] .markdown-content :is(th,td){border-color:#4c3b60;color:#d7c8e6}
html[data-theme=dark] .markdown-content th{background:#30263e}
html[data-theme=dark] .markdown-content pre,html[data-theme=dark] .markdown-content pre code{background:#110d19;color:#eee7f6}
html[data-theme=dark] .studio-alert{background:#2c2340;border-color:#56406d;color:#dfc8f5}
html[data-theme=dark] .studio-alert.is-error{background:#3b202e;border-color:#76415a;color:#ffc3d3}
html[data-theme=dark] .gradient-intro :is(h1,h2){color:#fff}
html[data-theme=dark] .gradient-intro :is(p,small,.meta){color:#e0d0f5}
html[data-theme=dark] .gradient-intro .hero-primary{color:#6348d6}
@media(max-width:640px){.footer-bottom{flex-wrap:wrap;gap:20px}.theme-control{order:3;flex-basis:100%;justify-content:center}}
@media(prefers-reduced-motion:reduce){.theme-toggle-knob{transition:none}}
