/* Reader-selected theme; boot script applies it before the styles load. */
:root[data-theme="light"]{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark;--navy:#071326;--ink:#e7eef8;--blue:#69b6ff;--cyan:#53d6ef;--muted:#a6b7cc;--line:#2b3b52;--paper:#131e30;--bg:#0b1220;--theme-subtle:#19283c;--theme-field:#0d1727}
.search-area{display:flex;flex-direction:column;align-items:flex-end;gap:8px;width:340px;flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;gap:7px;min-height:29px;padding:4px 8px;border:1px solid var(--line);border-radius:20px;background:#f3f7fc;color:#314760;font:600 11px/1.3 Arial,Helvetica,sans-serif;cursor:pointer}
.theme-toggle:hover{border-color:var(--blue);color:#075fac;background:#eaf4ff}
.theme-toggle svg{width:15px;height:15px;flex-shrink:0}
.theme-moon{display:none}
.theme-switch{position:relative;display:inline-block;width:25px;height:15px;border-radius:10px;background:#c6d3e3;margin-left:3px;flex-shrink:0}
.theme-switch i{display:block;position:absolute;left:2px;top:2px;width:11px;height:11px;background:#fff;border-radius:50%;box-shadow:0 1px 2px #071b3d33}
[data-theme="dark"] .theme-toggle{background:#1d2d43;color:#c8d9ed;border-color:#405672}
[data-theme="dark"] .theme-toggle:hover{background:#243b57;color:#fff;border-color:var(--blue)}
[data-theme="dark"] .theme-sun{display:none}
[data-theme="dark"] .theme-moon{display:block}
[data-theme="dark"] .theme-switch{background:#2179c3}
[data-theme="dark"] .theme-switch i{left:12px}
[data-theme="dark"] :is(header,.topics-shell,.topic-grid,.sidebar-block,.article,.empty-state,.pagination a,.popular-shell,.info-box,.download-menu,.contact-form,.about-values article,.about-explore nav a){background:var(--paper)}
[data-theme="dark"] .search{background:var(--theme-field);border-color:var(--line)}
[data-theme="dark"] :is(input,textarea){color:var(--ink)}
[data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#9baec5;opacity:1}
[data-theme="dark"] :is(.topic-links,.feed-item p,.info-lead,.info-box p,.contact-form>p,.comment-form>p,.contact-aside>p,.contact-topics p,.about-manifest p,.about-values p,.about-explore p,.about-explore nav span,.popular-strip>a,.reader-comment time,.download-facts dt,.comment-unavailable){color:var(--muted)}
[data-theme="dark"] :is(.side-topics a,.tags a,.comments-empty,.comment-form,.comment-reply,.comment-reply-context,.comment-reply-context button,.download-panel,.contact-symbol,.software-update-badge,.article-body tr:nth-child(even),.download-branch[open]>summary){background:var(--theme-subtle);border-color:var(--line)}
[data-theme="dark"] :is(.comment-form label,.contact-field label,.contact-topics strong,.breadcrumbs [aria-current=page]){color:var(--ink)}
[data-theme="dark"] :is(.comment-form input,.comment-form textarea,.contact-field input,.contact-field textarea){background:var(--theme-field);border-color:#465b75;color:var(--ink)}
[data-theme="dark"] :is(.comments,.reader-comment,.comment-replies,.section-links>a,.topic-grid a,.download-branch[open]>.download-branches){border-color:var(--line)}
[data-theme="dark"] :is(.topic-grid a:hover,.side-topics a:hover,.download-branches a:hover,.download-branch>summary:hover,.download-category-all:hover,.comment-reply:hover,.comment-reply-context button:hover,.about-explore nav a:hover){background:#233c57;color:var(--blue)}
[data-theme="dark"] :is(.comment-reply,.comment-reply-context button,.contact-address,.software-update-badge,.contact-symbol){color:var(--blue)}
[data-theme="dark"] .download-menu{box-shadow:0 12px 30px #0008}
[data-theme="dark"] .topic-grid{box-shadow:0 12px 30px #0008}
[data-theme="dark"] .feed-image{background:var(--theme-subtle)}
[data-theme="dark"] :is(.primary-link,.main-nav .home-link,.story-card .kicker,.about-closing .primary-link){background:#096cbb;color:#fff}
[data-theme="dark"] .primary-link:hover{background:#075b9e}
[data-theme="dark"] .story-card{color:#fff;background:#071326}
[data-theme="dark"] .story-card .software-update-badge{background:#19283c;color:#8bc7ff;border-color:#466589}
[data-theme="dark"] .pagination a[aria-current]{background:#096cbb;color:#fff}
[data-theme="dark"] .contact-field [aria-invalid=true]{background:#351c2a;border-color:#f78197}
[data-theme="dark"] :is(.field-error,.download-unavailable){color:#ff99a6}
[data-theme="dark"] .contact-notice.is-error{background:#351c2a;border-color:#db6680;color:#ffbdc8}
[data-theme="dark"] .contact-notice.is-success{background:#133328;border-color:#4fba89;color:#b2f1d1}
[data-theme="dark"] .skip-link:focus{background:var(--paper);color:var(--ink)}
[data-theme="dark"] .article-body :is([style*="color: #000"],[style*="color:#000"],[style*="color: rgb(0, 0, 0)"],[style*="color: black"]){color:var(--ink)!important}
@media(max-width:760px){.search-area{width:100%;flex-basis:100%;gap:7px}.theme-toggle{min-height:32px;padding-inline:10px}}
