/* Three display modes share the same layout; theme.js resolves system to light/dark. */
html[data-theme=light]{color-scheme:light}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:20px;min-width:0}
.theme-controls{display:flex;align-items:center;gap:7px;flex:none}
.theme-controls label{font-size:11px;font-weight:600;line-height:1.6;margin:0;color:var(--muted);white-space:nowrap}
#site-theme{width:auto;max-width:140px;min-height:35px;padding:6px 27px 6px 9px;font:inherit;font-size:12px;line-height:1.6;border:1px solid #cbd8e5;border-radius:7px;color:var(--ink);background:#fff;cursor:pointer}
html[data-theme] .goal-card,html[data-theme] .choice-option{transition-property:border-color,box-shadow;transition-duration:.15s}
html[data-theme=light] .article .meta{color:#526b82}
html[data-theme=light] .catalog-option small,html[data-theme=light] .comparison-table-wrap tbody th small{color:#526b82}
html[data-theme] .article .section-sources{font-size:12px;line-height:1.85;margin-top:16px}
html[data-theme=dark]{color-scheme:dark}
html[data-theme=dark] body:not(.puzzle-site){--paper:#171717;--card:#212121;--ink:#ececec;--muted:#b4b4b4;--blue:#83b9ff;--line:#383838;background:var(--paper);color:var(--ink)}
html[data-theme=dark] .pc-page{--pc-soft:#2b2b2b;--pc-accent:#83b9ff;--pc-border:#383838}
html[data-theme=dark] body:not(.puzzle-site) .site-header{background:#1b1b1b;border-color:#383838}
html[data-theme=dark] .footer{background:#1b1b1b;border-color:#383838;color:#b4b4b4}
html[data-theme=dark] .footer a,html[data-theme=dark] .nav a,html[data-theme=dark] .brand{color:#ececec}
html[data-theme=dark] .brand small{color:#b4b4b4}
html[data-theme=dark] .brand-symbol{background:#2b2b2b;color:#ececec}
html[data-theme=dark] .preview{background:#2b2b2b;color:#d9d9d9}
html[data-theme=dark] .theme-controls label{color:#b4b4b4}
html[data-theme=dark] #site-theme{background:#212121;color:#ececec;border-color:#707070}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#1b1b1b;color:#ececec;border-color:#707070}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#9e9e9e;opacity:1}
html[data-theme=dark] input[type=checkbox],html[data-theme=dark] input[type=radio]{accent-color:#83b9ff}
html[data-theme=dark] .button{background:#83b9ff;color:#171717;border-color:#83b9ff}
html[data-theme=dark] .button:hover{background:#a6ceff;border-color:#a6ceff}
html[data-theme=dark] .button.secondary{background:#212121;color:#ececec;border-color:#707070}
html[data-theme=dark] .button.secondary:hover{background:#303030}
html[data-theme=dark] :focus-visible{outline-color:#a6ceff}

/* Home: neutral dark surfaces, with the existing stable natural slide height. */
html[data-theme=dark] .home-hero .hero-intro,html[data-theme=dark] .home-hero .funnel-note,html[data-theme=dark] .home-hero .independent-label,html[data-theme=dark] .text-action{color:#b4b4b4}
html[data-theme=dark] .home-hero .independent-label{border-color:#555555}
html[data-theme=dark] .home-hero .audience-label{color:#bdbdbd!important}
html[data-theme=dark] .section-kicker,html[data-theme=dark] .section-head>p,html[data-theme=dark] .principle-number{color:#b4b4b4}
html[data-theme=dark] .goal-section,html[data-theme=dark] .home-trust{border-color:#383838}
html[data-theme=dark] .goal-card,html[data-theme=dark] .card,html[data-theme=dark] .software-tile,html[data-theme=dark] .home-pc-entry{background:#212121;border-color:#383838;color:#ececec}
html[data-theme=dark] .goal-card:hover,html[data-theme=dark] .software-tile:hover{background:#292929;border-color:#707070}
html[data-theme=dark] .goal-icon{color:#bdbdbd}
html[data-theme=dark] .goal-context,html[data-theme=dark] .goal-card p,html[data-theme=dark] .home-pc-entry p,html[data-theme=dark] .home-trust p,html[data-theme=dark] .publication-notices{color:#b4b4b4}
html[data-theme=dark] .goal-cta{color:#a6ceff}
html[data-theme=dark] .card>a:last-child,html[data-theme=dark] .publication-notices{border-color:#383838}
html[data-theme=dark] .decision-path,html[data-theme=dark] .principles{background:#242424;border-color:#383838}
html[data-theme=dark] .decision-path>div>p:last-child,html[data-theme=dark] .decision-path li p{color:#b4b4b4}
html[data-theme=dark] .decision-path li>span{color:#c5c5c5}
html[data-theme=dark] .software-mark{background:#2b2b2b;color:#dddddd;border-color:#484848}
html[data-theme=dark] .software-mark[data-software]{background:#2b2b2b;color:#dddddd}
html[data-theme=dark] .software-tile>span:last-child{color:#b4b4b4}
html[data-theme=dark] .spotlight-dialog{background:#212121;color:#ececec;border-color:#606060;box-shadow:0 20px 70px #0008}
html[data-theme=dark] .spotlight-dialog::backdrop{background:#000000b3}
html[data-theme=dark] .spotlight-dialog>p{color:#b4b4b4}
html[data-theme=dark] .spotlight-dialog section{border-color:#383838}
html[data-theme=dark] .dialog-heading button{background:#2b2b2b;color:#ececec;border-color:#707070}

/* Articles, calculator, and table surfaces. Inline artwork retains its original colors. */
html[data-theme=dark] .article .lead,html[data-theme=dark] .article .meta,html[data-theme=dark] .article-figure figcaption{color:#b4b4b4}
html[data-theme=dark] .article .meta>span:last-child{border-color:#484848}
html[data-theme=dark] .article-body section h2{border-color:#555555}
html[data-theme=dark] .article-body section:first-child h2{border-color:#83b9ff}
html[data-theme=dark] .article-body p a,html[data-theme=dark] .article-body li a{color:#83b9ff;text-decoration-color:#888888}
html[data-theme=dark] .toc,html[data-theme=dark] .article-mobile-toc,html[data-theme=dark] .tool-card,html[data-theme=dark] .table-scroll{background:#212121;border-color:#383838}
html[data-theme=dark] .toc a,html[data-theme=dark] .toc li,html[data-theme=dark] .toc summary:after,html[data-theme=dark] .article-mobile-toc a{color:#c9c9c9}
html[data-theme=dark] .reading-note,html[data-theme=dark] .article .sources,html[data-theme=dark] .sources{background:#2b2b2b;border-color:#383838}
html[data-theme=dark] .reading-note strong,html[data-theme=dark] .article .reading-note p,html[data-theme=dark] .comparison-main>.reading-note p{color:#cacaca}
html[data-theme=dark] .callout,html[data-theme=dark] .summary,html[data-theme=dark] .choice-result{background:#2b2b2b;color:#ececec;border-color:#83b9ff}
html[data-theme=dark] .callout.warning{background:#332b20;border-color:#d1a568;color:#eadac3}
html[data-theme=dark] .result-card{background:#2b2b2b}
html[data-theme=dark] .result-card.best{background:#292929;border-color:#606060}
html[data-theme=dark] th,html[data-theme=dark] .article th{background:#2b2b2b}
html[data-theme=dark] th,html[data-theme=dark] td{border-color:#383838}
html[data-theme=dark] .error{color:#ffada8}

/* Dense comparison tables keep separate header and sticky-column surfaces. */
html[data-theme=dark] .comparison-disclosure,html[data-theme=dark] .comparison-caption,html[data-theme=dark] .comparison-legend{color:#b4b4b4}
html[data-theme=dark] .comparison-disclosure{border-color:#888888}
html[data-theme=dark] .comparison-controls{background:#212121;border-color:#383838}
html[data-theme=dark] .catalog-option{background:#282828;border-color:#383838}
html[data-theme=dark] .catalog-option:has(input:checked){background:#2f2f2f;border-color:#83b9ff}
html[data-theme=dark] .catalog-option small{color:#bfbfbf}
html[data-theme=dark] .catalog-picker>summary,html[data-theme=dark] .comparison-focus-note{background:#2b2b2b;color:#dddddd;border-color:#666666}
html[data-theme=dark] .comparison-focus-note button{background:#212121;color:#dddddd;border-color:#707070}
html[data-theme=dark] .comparison-filters input[type=search]{background:#1b1b1b;color:#ececec;border-color:#707070}
html[data-theme=dark] .comparison-table-wrap{background:#212121;border-color:#484848;scrollbar-color:#707070 #202020}
html[data-theme=dark] .comparison-table-wrap th,html[data-theme=dark] .comparison-table-wrap td{border-color:#383838}
html[data-theme=dark] .comparison-table-wrap th:first-child{background:#2b2b2b}
html[data-theme=dark] .comparison-table-wrap thead th,html[data-theme=dark] .comparison-table-wrap thead th:first-child{background:#2b2b2b}
html[data-theme=dark] .comparison-table-wrap th small,html[data-theme=dark] .comparison-table-wrap tbody th small,html[data-theme=dark] .comparison-table-wrap td .cell-note{color:#bfbfbf}
html[data-theme=dark] .feature-badge{background:#323232;color:#dddddd}
html[data-theme=dark] .feature-badge.yes{background:#2c3833;color:#b2e8d6}
html[data-theme=dark] .feature-badge.no{background:#3b2e33;color:#f1c4d3}
html[data-theme=dark] .feature-badge.conditional{background:#303030;color:#dddddd}
html[data-theme=dark] .feature-badge.unknown{background:#323232;color:#dddddd}

/* Condition guide: selected, uncertain, and disabled remain distinct. */
html[data-theme=dark] .choice-option,html[data-theme=dark] .choice-candidate,html[data-theme=dark] .choice-no-results{background:#212121;border-color:#383838}
html[data-theme=dark] .choice-option:hover{background:#292929;border-color:#707070}
html[data-theme=dark] .choice-option:has(input:checked){background:#2f2f2f;border-color:#83b9ff;box-shadow:inset 0 0 0 1px #83b9ff}
html[data-theme=dark] .choice-progress button:disabled{color:#8fa3b8}
html[data-theme=dark] .choice-option i,html[data-theme=dark] .choice-question-number,html[data-theme=dark] .choice-side-label,html[data-theme=dark] .choice-candidate .choice-kicker{color:#bbbbbb}
html[data-theme=dark] .choice-back,html[data-theme=dark] .choice-requirements summary,html[data-theme=dark] .choice-card-check strong{color:#d0d0d0}
html[data-theme=dark] .choice-inline-note,html[data-theme=dark] .choice-condition-list li,html[data-theme=dark] .choice-pc-entry{background:#2b2b2b;border-color:#484848;color:#cacaca}
html[data-theme=dark] .choice-results-header button{background:#212121;color:#ececec;border-color:#707070}
html[data-theme=dark] .choice-status{background:#2c3833;color:#b2e8d6}
html[data-theme=dark] .choice-status.conditional{background:#303030;color:#dddddd}
html[data-theme=dark] .choice-status.unknown{background:#38332c;color:#ebd0a9}
html[data-theme=dark] .choice-feature-list li{border-color:#383838}
html[data-theme=dark] .choice-feature-list b{color:#cccccc}
html[data-theme=dark] .choice-feature-list b[data-status=unknown]{color:#ebd0a9}
html[data-theme=dark] .choice-error{background:#41252c;color:#ffd1d0;border-color:#f29b9a}
html[data-theme=dark] .choice-test li:before{background:#2b2b2b;color:#d0d0d0;border-color:#484848}

/* PC workbench: this prefix outranks the page CSS loaded later in the body. */
html[data-theme=dark] .pc-path,html[data-theme=dark] .pc-recipe-card,html[data-theme=dark] .pc-preferences,html[data-theme=dark] .pc-bto-card,html[data-theme=dark] .pc-catalog-card,html[data-theme=dark] .pc-build-controls,html[data-theme=dark] .pc-selected,html[data-theme=dark] .pc-saved-card,html[data-theme=dark] .pc-checks li{background:#212121;border-color:#383838}
html[data-theme=dark] .pc-path-number{background:#303030;color:#d0d0d0}
html[data-theme=dark] .pc-intro-note{border-color:#707070}
html[data-theme=dark] .pc-tabs a,html[data-theme=dark] .pc-recipe-purposes button{background:#212121;color:#ececec;border-color:#707070}
html[data-theme=dark] .pc-tabs a:hover,html[data-theme=dark] .pc-recipe-purposes button:hover{background:#303030;color:#d0d0d0}
html[data-theme=dark] .pc-recipe-purposes button[aria-pressed=true]{background:#83b9ff;color:#171717;border-color:#83b9ff}
html[data-theme=dark] .pc-purpose-mark,html[data-theme=dark] .pc-kicker{color:#b4b4b4}
html[data-theme=dark] .pc-workloads article{border-color:#383838}
html[data-theme=dark] .pc-recipe-card[data-tier=take]{border-color:#707070;border-top-color:#83b9ff}
html[data-theme=dark] .recipe-tier{background:#323232;color:#d2d2d2}
html[data-theme=dark] .pc-recipe-card[data-tier=take] .recipe-tier{background:#303030;color:#dddddd}
html[data-theme=dark] .recipe-specs,html[data-theme=dark] .recipe-specs>div,html[data-theme=dark] .pc-specs>div{border-color:#383838}
html[data-theme=dark] .pc-recipe-card summary,html[data-theme=dark] .pc-source summary{color:#d0d0d0}
html[data-theme=dark] .pc-recipe-card>button:not(.button),html[data-theme=dark] .pc-catalog-card button[data-select-part]{background:#2b2b2b;color:#e0e0e0;border-color:#707070}
html[data-theme=dark] .pc-recipe-card>button:not(.button):hover,html[data-theme=dark] .pc-catalog-card button[data-select-part]:hover:not(:disabled){background:#303030;border-color:#83b9ff}
html[data-theme=dark] .pc-preferences select,html[data-theme=dark] .pc-preferences input,html[data-theme=dark] .pc-select-row select,html[data-theme=dark] .pc-catalog-form select,html[data-theme=dark] .pc-catalog-form input,html[data-theme=dark] .pc-saved-card input{background:#1b1b1b;color:#ececec;border-color:#707070}
html[data-theme=dark] .pc-catalog-form{border-color:#383838}
html[data-theme=dark] .pc-part-badges span,html[data-theme=dark] .pc-catalog-badges span,html[data-theme=dark] .pc-part-badge{background:#323232;color:#d2d2d2}
html[data-theme=dark] .pc-part-fit{background:#2b2b2b;color:#cccccc}
html[data-theme=dark] .pc-catalog-card[data-fit=unchecked]{border-color:#484848}
html[data-theme=dark] .pc-catalog-card[data-fit=blocked]{background:#252525;border-color:#454545}
html[data-theme=dark] .pc-catalog-card[data-fit=blocked] h3,html[data-theme=dark] .pc-catalog-card[data-fit=blocked] dd{color:#aaaaaa}
html[data-theme=dark] .pc-catalog-card[data-fit=blocked] .pc-part-fit{background:#303030;color:#bdbdbd}
html[data-theme=dark] .pc-catalog-card button:disabled{background:#303030;color:#aaaaaa;border-color:#707070}
html[data-theme=dark] .pc-select-row option:disabled{background:#303030;color:#aaaaaa}
html[data-theme=dark] .pc-buy-links a,html[data-theme=dark] .pc-save-actions button{background:#303030;color:#dddddd;border-color:#606060}
html[data-theme=dark] .pc-result-title>strong,html[data-theme=dark] .pc-stock-note{color:#e2c499}
html[data-theme=dark] .pc-checks li>span{color:#bbbbbb}
html[data-theme=dark] .pc-checks li[data-status=error]{background:#41252c;border-color:#92565b}
html[data-theme=dark] .pc-checks li[data-status=error]>span{color:#ffb9b5}
html[data-theme=dark] .pc-method{border-color:#383838}
html[data-theme=dark] .pc-fold,html[data-theme=dark] .pc-entry-list button,html[data-theme=dark] .pc-tabs button{background:#212121;border-color:#484848;color:#ececec}
html[data-theme=dark] .pc-fold>summary:after{color:#c6c6c6}
html[data-theme=dark] .pc-entry-list button:hover,html[data-theme=dark] .pc-tabs button:hover{background:#2b2b2b;border-color:#707070}
html[data-theme=dark] .pc-entry-list button[aria-pressed=true]{background:#2f2f2f;border-color:#83b9ff}
html[data-theme=dark] .pc-entry-list button[aria-pressed=true] strong{color:#e0e0e0}
html[data-theme=dark] .pc-entry-list button>span{color:#c6c6c6}
html[data-theme=dark] .pc-tabs button[aria-pressed=true]{background:#83b9ff;border-color:#83b9ff;color:#171717}
html[data-theme=dark] .pc-check-details{background:#212121;border-color:#484848}

@media(max-width:1000px){.header-actions{gap:12px}.theme-controls label{display:none}.header-actions .nav{gap:16px}}
@media(max-width:650px){.header-actions{justify-content:flex-start;flex-wrap:wrap;gap:12px;width:100%}.header-actions .nav{gap:17px;flex-wrap:wrap}.theme-controls{margin-left:auto}#site-theme{font-size:12px;min-height:36px;max-width:120px}}
@media(max-width:420px){.theme-controls{margin-left:0}.header-actions{gap:10px 18px}}

html[data-theme=dark] .home-hero .hero-card,html[data-theme=dark] .home-hero .hero-card[data-current-app]{background:linear-gradient(140deg,#292929,#212121);border-color:#494949;--app-accent:#d6d6d6;--app-dim:#8a8a8a;--app-monogram:#343434;--app-rule:#8a8a8a55}
html[data-theme=dark] .card .card-picture{background:#2b2b2b;color:#ececec}
html[data-theme=dark] .picture-headline{background:#171717e8;color:#fff}
html[data-theme=dark] .pc-cable-controls,html[data-theme=dark] .pc-cable-note{background:#2b2b2b;border-color:#484848}
html[data-theme=dark] .pc-cable-needs,html[data-theme=dark] .pc-cable-card,html[data-theme=dark] .pc-cable-scroll{background:#212121;border-color:#484848}
html[data-theme=dark] .pc-cable-table th{background:#2b2b2b}
html[data-theme=dark] .pc-cable-controls input,html[data-theme=dark] .pc-cable-controls select,html[data-theme=dark] .pc-cable-card input[type=number]{background:#1b1b1b;color:#ececec;border-color:#707070}
/* Paired dark surfaces for the same category roles as the light design. */
html[data-theme=dark] body:not(.puzzle-site){--surface:#212121;--surface-alt:#292929;--surface-hover:#2b2b2b;--tool-tint:#202733;--pc-tint:#202d2b;--compare-tint:#272733;--learn-tint:#272a2f;--tool-accent:#a8cbff;--pc-accent:#a4d9cf;--compare-accent:#c2c5f4;--learn-accent:#c5d1df;--focus:#ffbf69;--line:#555b62;--muted:#c0c5cd}
html[data-theme=dark] body:not(.puzzle-site) .site-header{border-top-color:#83b9ff}
html[data-theme=dark] body:not(.puzzle-site) .nav a[aria-current=page]{color:#b2d2ff;border-bottom-color:#b2d2ff}
html[data-theme=dark] .category-links a,html[data-theme=dark] .section-index{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .home-main .home-section,html[data-theme=dark] .guide-category{background:var(--section-tint);border-color:var(--line);border-top-color:var(--section-accent)}
html[data-theme=dark] .home-main .hero-pc-link,html[data-theme=dark] .home-main .section-description,html[data-theme=dark] .guide-category .section-description{color:var(--muted)}
html[data-theme=dark] .home-main .home-pc-entry p:not(.section-label){color:var(--muted)}
html[data-theme=dark] .home-pc-entry .button{background:var(--surface);color:var(--pc-accent);border-color:var(--pc-accent)}
html[data-theme=dark] .home-main .home-section .section-label,html[data-theme=dark] .guide-category .section-label{color:var(--section-accent)}
html[data-theme=dark] .home-main .goal-card:hover,html[data-theme=dark] .home-main .software-tile:hover{background:var(--surface-hover);border-color:var(--section-accent)}
html[data-theme=dark] .home-main .software-mark{background:var(--surface-alt);border-color:var(--line);color:var(--muted)}
html[data-theme=dark] body:not(.puzzle-site) .card .tag{background:var(--tool-tint);color:var(--tool-accent);border-color:var(--line)}
html[data-theme=dark] body:not(.puzzle-site) .card[data-category=pc] .tag{background:var(--pc-tint);color:var(--pc-accent)}
html[data-theme=dark] .home-main .home-guide-group>h3{border-color:var(--learn-accent)}
html[data-theme=dark] .comparison-controls,html[data-theme=dark] .choice-panel{border-top-color:var(--tool-accent)}
html[data-theme=dark] .comparison-results,html[data-theme=dark] .choice-results{background:var(--compare-tint);border-color:var(--line);border-top-color:var(--compare-accent)}
html[data-theme=dark] .choice-side{background:var(--surface-alt);border-color:var(--line)}
html[data-theme=dark] .choice-test{background:var(--learn-tint);border-color:var(--line);border-top-color:var(--learn-accent)}
html[data-theme=dark] .spotlight-dialog,html[data-theme=dark] .dialog-heading button{background:var(--surface);color:var(--ink);border-color:var(--line)}
