/* V34: automatic OS theme + optional manual override. Loaded last. */
.yuc-theme-switch{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.yuc-theme-switch label{font-size:12px;font-weight:700;color:var(--navy)}
.yuc-theme-switch select{width:auto;min-width:100px;padding:6px 9px;border-radius:9px;font-size:12px;cursor:pointer}
@media(max-width:650px){.nav nav{flex-wrap:wrap;justify-content:center;gap:9px}.yuc-theme-switch{margin-inline:auto}}
/* A manual choice takes priority; auto follows the operating system. */
@media(prefers-color-scheme:dark){html:not([data-theme="light"]){color-scheme:dark}}
html[data-theme="dark"]{color-scheme:dark}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]){--bg:#0d1727;--navy:#e6f0ff;--muted:#a6b9d2;--border:#30425b;--blue:#7eacff}}
html[data-theme="dark"]{--bg:#0d1727;--navy:#e6f0ff;--muted:#a6b9d2;--border:#30425b;--blue:#7eacff}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) body{background:#0d1727;color:#e6eefc}}
html[data-theme="dark"] body{background:#0d1727;color:#e6eefc}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) :is(.top,.card,.panel,.pd-section,.software-card,.catalog-v4-card,.cv5-card,.v7-card,.stats>div,.features>div,.dashboard-stats>div,.catalog-search,.catalog-v4-search,.cv5-filter,.catalog-total,.catalog-v4-count,.catalog-v4-cardbottom,.software-card-foot,.pd-source,.pd-empty,.catalog-empty,.catalog-v4-empty,.admin-content .panel){background:#18263b!important;border-color:#30425b!important;color:#e6eefc!important}}
html[data-theme="dark"] :is(.top,.card,.panel,.pd-section,.software-card,.catalog-v4-card,.cv5-card,.v7-card,.stats>div,.features>div,.dashboard-stats>div,.catalog-search,.catalog-v4-search,.cv5-filter,.catalog-total,.catalog-v4-count,.catalog-v4-cardbottom,.software-card-foot,.pd-source,.pd-empty,.catalog-empty,.catalog-v4-empty,.admin-content .panel){background:#18263b!important;border-color:#30425b!important;color:#e6eefc!important}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) :is(h1,h2,h3,h4,.brand,.nav a,.pd-section h2,.pd-source h3,.pd-facts dd,.software-card-body h3 a,.catalog-v4-cardmain h3 a,.cv5-results strong,.catalog-v4-bar strong,.catalog-heading h2,.cv5-heading h2,.catalog-v4-head h2,.panel-heading h2,.features b,.stats strong,.dashboard-stats strong){color:#e6eefc!important}}
html[data-theme="dark"] :is(h1,h2,h3,h4,.brand,.nav a,.pd-section h2,.pd-source h3,.pd-facts dd,.software-card-body h3 a,.catalog-v4-cardmain h3 a,.cv5-results strong,.catalog-v4-bar strong,.catalog-heading h2,.cv5-heading h2,.catalog-v4-head h2,.panel-heading h2,.features b,.stats strong,.dashboard-stats strong){color:#e6eefc!important}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) :is(p,small,.hint,.pd-prose,.pd-note,.pd-facts dt,.card p,.software-card-body p,.catalog-v4-cardmain p,.catalog-v4-meta strong,.dashboard-heading p,.catalog-heading p,.cv5-heading p){color:#b7c7df!important}}
html[data-theme="dark"] :is(p,small,.hint,.pd-prose,.pd-note,.pd-facts dt,.card p,.software-card-body p,.catalog-v4-cardmain p,.catalog-v4-meta strong,.dashboard-heading p,.catalog-heading p,.cv5-heading p){color:#b7c7df!important}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) :is(input,textarea,select,.catalog-search-field,.catalog-v4-query,.cv5-search,.translation-section){background:#101e32!important;color:#e6eefc!important;border-color:#3b506e!important}}
html[data-theme="dark"] :is(input,textarea,select,.catalog-search-field,.catalog-v4-query,.cv5-search,.translation-section){background:#101e32!important;color:#e6eefc!important;border-color:#3b506e!important}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) :is(input,textarea)::placeholder{color:#9eafc8}}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#9eafc8}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) :is(footer,.lang-switch,.tag,.count,.software-category,.catalog-v4-tag,.pd-count,.mini-icon,.software-icon,.cardicon,.pd-source-symbol){background:#253752!important;color:#bdd5ff!important}}
html[data-theme="dark"] :is(footer,.lang-switch,.tag,.count,.software-category,.catalog-v4-tag,.pd-count,.mini-icon,.software-icon,.cardicon,.pd-source-symbol){background:#253752!important;color:#bdd5ff!important}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) :is(.primary,.software-action,.catalog-v4-detail,.cv5-submit,.catalog-submit){background:#3266e8!important;color:#fff!important}}
html[data-theme="dark"] :is(.primary,.software-action,.catalog-v4-detail,.cv5-submit,.catalog-submit){background:#3266e8!important;color:#fff!important}
/* Existing dark blue hero and sidebar stay dark, retaining their intended contrast. */
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) :is(.hero,.pd-hero,.admin-sidebar) :is(h1,h2,h3,p,a,span){color:inherit}}
html[data-theme="dark"] :is(.hero,.pd-hero,.admin-sidebar) :is(h1,h2,h3,p,a,span){color:inherit}
