/* Shared light/dark themes. Paper remains white for blue panels and brand artwork.
   No filtering/inversion of photographs, original logos or Academy subject colours. */
:root{--theme-surface:var(--paper)}
.theme-toggle{order:2;flex:none;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--theme-surface);color:var(--ink)}
.theme-toggle:hover{border-color:var(--blue)}
.theme-toggle .theme-sun{display:none}
.site-header #primary-nav{order:1;margin-left:auto}
.site-header .menu-toggle{order:3}
html[data-theme="dark"]{color-scheme:dark;--theme-surface:#080808;--ink:#ffffff;--muted:#c2c2c2;--panel:#080808;--line:#555555;--footer-copy:#ffffff;--footer-muted:#c2c2c2;--footer-line:#555555;--academy-card-ink:#ffffff;--academy-card-muted:#c2c2c2;--academy-card-line:#555555}
html[data-theme="dark"] .theme-sun{display:block}
html[data-theme="dark"] .theme-moon{display:none}
html[data-theme="dark"] :is(body,.site-header,.mega,.region>div,.skip,.route-panels>a:last-child,.course-summary,.outcomes-section,.boundary-note,.preview-tag,.consultancy-option,.home-directions,.home-partners,.service-credentials,.footer--regional,.about-rail details,.home-product-window,.home-product-pause,.academy-filter-bar,.academy-filter-reset,.academy-course,.academy-course-footer,.academy-format-grid article,.service-decision .example,.iso-service .service-faq,.guide-card,.role-guide-list .text-link,input,select,textarea){background:var(--theme-surface);color:var(--ink)}
html[data-theme="dark"] :is(.site-header .brand,.regional-footer-brand .brand){color:var(--ink)}
html[data-theme="dark"] .muted-on-dark{color:var(--muted)}
html[data-theme="dark"] .consultancy-intro .eyebrow{color:var(--paper)}
html[data-theme="dark"] .service-editorial-hero--operations .hero-note{background:var(--theme-surface);color:var(--ink)}
html[data-theme="dark"] .button.light,html[data-theme="dark"] .home-academy .direction-cta{background:var(--paper);color:var(--black)}
html[data-theme="dark"] :is(.button.light,.home-academy .direction-cta):hover{background:var(--blue);color:var(--paper);border-color:var(--blue)}
/* Original partner artwork sits on white, never on an inverted image. */
html[data-theme="dark"] :is(.home-partner-logo,.home-product-tile,.home-product-directory a,.academy-pecb-logo,.academy-comptia-partner>img){background:var(--paper);color:var(--black);border-radius:var(--radius)}
html[data-theme="dark"] .home-partner-logo{padding-inline:var(--space-3)}
html[data-theme="dark"] :is(.academy-pecb-logo,.academy-comptia-partner>img){padding:var(--space-2)}
html[data-theme="dark"] .home-product-mark{color:var(--black)}
/* Working-paper tables deliberately remain white with black text. */
html[data-theme="dark"] :is(.evidence-table-wrap,.evidence-table thead,.iso-service--implementation .paper-footnote){--ink:#161616;--muted:#5b6068;--line:#d9dee5;background:var(--paper);color:var(--black)}
html[data-theme="dark"] .evidence-table :is(th,td){color:var(--black)}
html[data-theme="dark"] .iso-service--implementation .evidence-table thead{background:var(--blue);color:var(--paper)}
html[data-theme="dark"] .iso-service--implementation .evidence-table thead th{color:var(--paper)}
/* Blue is an accent or solid background; small text on black stays legible. */
html[data-theme="dark"] :is(.text-link:hover,.reset-link,.partner-link,.bundle-partner,.presenter-card .label,.about-role,.about-section .eyebrow,.about-credential a,.academy-partner-panel>a,.home-product-services details a,.example>.label){color:var(--paper);text-decoration:underline;text-underline-offset:.25em}
html[data-theme="dark"] :is(.site-header nav>a,.nav-dropdown>summary,.disclosure summary,.section-nav a,.academy-section-nav a,.home-partner-relationship,.footer--regional a):is(:hover,:focus-visible,[aria-current]){color:var(--paper);text-decoration:underline;text-underline-offset:.25em}
html[data-theme="dark"] .service-credentials .eyebrow{color:var(--paper)}
html[data-theme="dark"] :is(.guide-card,.role-guide-list .text-link,.home-product-pause,.academy-filter-reset):is(:hover,:focus-visible){background:var(--blue);color:var(--paper)}
html[data-theme="dark"] .guide-card:is(:hover,:focus-visible) :is(p,.label){color:var(--paper)}
html[data-theme="dark"] .academy-course-footer .button:hover{background:var(--blue-hover);border-color:var(--blue-hover);color:var(--paper)}
html[data-theme="dark"] .form-status[data-state="error"],html[data-theme="dark"] .form-status[data-state="success"]{color:var(--paper)}
html[data-theme="dark"] ::placeholder{color:var(--muted);opacity:1}
html[data-theme="dark"] :focus-visible{outline-color:var(--paper)}
html[data-theme="dark"] .home-product-directory a:focus-visible{outline-color:var(--blue)}
@media(max-width:1100px){.site-header .header-inner{gap:var(--space-4)}.site-header #primary-nav{gap:var(--space-2)}}
@media(max-width:850px){.site-header .theme-toggle{margin-left:auto}.site-header #primary-nav{margin-left:0}html[data-theme="dark"] .site-header #primary-nav{background:var(--theme-surface)}}
@media(max-width:450px){.site-header .header-inner{gap:var(--space-2)}.site-header .menu-toggle{flex:none;min-width:60px;padding-inline:var(--space-2)}.site-header .menu-toggle>span{display:none}}
@media print{.theme-toggle{display:none}}
