/* WCAG AA contrast fixes for Dark (navy) and Dark + Glass. Loaded after themes-auto.css; Light is untouched. */
html[data-theme="dark"] .btn-outline[onclick*="showTeacherSection"],html[data-theme="glass"] .btn-outline[onclick*="showTeacherSection"]{border-color:#c9bcff!important;color:#e3dcff!important}
html[data-theme="dark"] .ds-badge-opening-soon,html[data-theme="glass"] .ds-badge-opening-soon{background:#4a3a12;color:#ffd9a8}
html[data-theme="dark"] .ds-badge-private-preview,html[data-theme="glass"] .ds-badge-private-preview{background:#1d2f70;color:#d2cdff}
html[data-theme="dark"] .recruit-ladder-tag,html[data-theme="glass"] .recruit-ladder-tag{color:#b8c9ff}
html[data-theme="dark"] .xg-opt,html[data-theme="glass"] .xg-opt,html[data-theme="dark"] .xg-link,html[data-theme="glass"] .xg-link{color:#d6e2ff}
/* Light: orange heading on white failed (2.4:1) */
html:not([data-theme="dark"]):not([data-theme="glass"]) .info-block.insight h4{color:#b45309}
html[data-theme="dark"] .info-block.insight h4,html[data-theme="glass"] .info-block.insight h4{color:#ffb000}
html[data-theme="glass"] .xcf-lbl,html[data-theme="dark"] .xcf-lbl{color:#c4d5f5}
/* Control borders and outline buttons at 3:1 or better against the navy */
html[data-theme="dark"] .btn-outline,html[data-theme="glass"] .btn-outline,html[data-theme="dark"] .cart-btn,html[data-theme="glass"] .cart-btn,html[data-theme="dark"] .menu-toggle,html[data-theme="glass"] .menu-toggle,html[data-theme="dark"] .step-link,html[data-theme="glass"] .step-link{border-color:#8fb0e8!important}
html[data-theme="dark"] select,html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]),html[data-theme="dark"] textarea,
html[data-theme="glass"] select,html[data-theme="glass"] input:not([type=checkbox]):not([type=radio]),html[data-theme="glass"] textarea{border-color:#8fb0e8!important}
html[data-theme="dark"] .lang-flag.active,html[data-theme="glass"] .lang-flag.active{border-color:#ffb000}
html[data-theme="dark"] .xg-opt,html[data-theme="glass"] .xg-opt{border-color:#9db4f2!important}

/* ---- Round 2 (full rescan): controls at 3:1 in all three themes, remaining text pairs at 4.5:1 ---- */
/* Light: outline buttons, header controls, selects, text fields and chips had borders of 1.2 to 1.7:1 against white */
html:not([data-theme="dark"]):not([data-theme="glass"]) :is(.btn-outline,.cart-btn,.menu-toggle,.currency-select,.step-link,#xfxTop,.xcp-chip,.lang-select){border-color:#6b8497!important}
html:not([data-theme="dark"]):not([data-theme="glass"]) :is(select,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),textarea){border-color:#6b8497!important}
html:not([data-theme="dark"]):not([data-theme="glass"]) .xag-diagnostic-opts button{border-color:#5b6fd6}
html:not([data-theme="dark"]):not([data-theme="glass"]) .cart-count{background:#c2410c;color:#fff}
/* Solutions band: white on orange was 3.1:1 */
.xag-solutions-band{background:linear-gradient(135deg,#c2410c,#9a3412)!important}
/* "Trust & Certification" badge: dark text on a gold gradient (4.47:1 at its darkest part) */
.site-header .xag-trust-badge,.xag-trust-badge,.xag-trust-badge .xag-trust-badge-text{color:#2e2200!important}
/* Dark and Glass: controls that kept their old faint borders */
html[data-theme="dark"] :is(#xfxTop,#xfxToggle,.xag-diagnostic-opts button,.xcp-chip,.currency-select,.lang-select),html[data-theme="glass"] :is(#xfxTop,#xfxToggle,.xag-diagnostic-opts button,.xcp-chip,.currency-select,.lang-select){border-color:#8fb0e8!important}
html[data-theme="dark"] #xfxToggle:focus-visible,html[data-theme="glass"] #xfxToggle:focus-visible{outline:3px solid #c9d6ff}
html[data-theme="dark"] .xag-diagnostic-opts button:hover,html[data-theme="glass"] .xag-diagnostic-opts button:hover{border-color:#c9d6ff!important}
html[data-theme="dark"] .xcc-card .btn-outline,html[data-theme="glass"] .xcc-card .btn-outline{border-color:#a9c2f0!important}
/* Check boxes and radios: drawn boxes with a 3:1 edge on navy (the native ones were 2.7:1) */
html[data-theme="dark"] input[type=checkbox],html[data-theme="glass"] input[type=checkbox]{-webkit-appearance:none;appearance:none;width:1.15em;height:1.15em;border:2px solid #9db8ee;border-radius:4px;background:#10244f;vertical-align:-.2em;flex:none;cursor:pointer}
html[data-theme="dark"] input[type=checkbox]:checked,html[data-theme="glass"] input[type=checkbox]:checked{background:#7fb0ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%2310244f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat;border-color:#c9d6ff}
html[data-theme="dark"] input[type=checkbox]:focus-visible,html[data-theme="glass"] input[type=checkbox]:focus-visible{outline:3px solid #c9d6ff;outline-offset:2px}
/* Banner captions over the rotating picture: solid dark backing so the text never meets a bright part of the logo */
.xl-banner .xl-banner-line{display:inline-block;background:rgba(8,20,70,.76);padding:.2rem .65rem;border-radius:10px;color:#fff}
/* Emoji icons in the trust row: solid disc behind the glyph (the row sits on a gradient) */
.xag-trust-col .xag-trust-icon{display:inline-flex;align-items:center;justify-content:center;width:2.7rem;height:2.7rem;border-radius:50%;background:#fff;color:#0b1c2d;margin-bottom:.5rem;line-height:1}
html[data-theme="dark"] .xag-trust-col .xag-trust-icon,html[data-theme="glass"] .xag-trust-col .xag-trust-icon{background:#0e2250;color:#eaf1ff}
/* Dark and Glass: muted lines, links and small headings that fell between 3.2 and 4.4:1 over the photo or the lighter panels */
html[data-theme="dark"] .legal-page [style*="opacity"],html[data-theme="glass"] .legal-page [style*="opacity"]{opacity:1!important}
html[data-theme="dark"] .legal-page p,html[data-theme="glass"] .legal-page p{color:#dbe5fb}
html[data-theme="dark"] .legal-page a,html[data-theme="glass"] .legal-page a{color:#c9d6ff}
html[data-theme="dark"] #classSeatsLeft[style*="b91c1c"],html[data-theme="glass"] #classSeatsLeft[style*="b91c1c"]{color:#ffb3b3!important}
html[data-theme="glass"] :is(.ia-card h3,.course-card .cc-meta,#classAskLink,.xg-sub,.xg-d,.xag-diagnostic p,.xag-card a.xag-card-cta){color:#d9e1ff!important;opacity:1}
html[data-theme="dark"] #classAskLink{color:#c9d6ff!important}
/* Fusion page at phone width: the inline float on the photo strip beat the media rule, so the cards slid under the photos and hid their captions */
@media(max-width:900px){#fusionPhotoSidebar{float:none!important;width:100%!important;margin:0 0 1rem!important}}
.xag-photo-sidebar .xps-box .xps-cap{background:rgba(8,20,50,.8)}
/* Trust page small print was dimmed with opacity .6 (4.48:1 in Light) */
.legal-page [style*="opacity"]{opacity:1!important}
.legal-page p[style*="opacity"]{color:#3d4f63}
html[data-theme="dark"] .legal-page p[style*="opacity"],html[data-theme="glass"] .legal-page p[style*="opacity"]{color:#dbe5fb}
/* Light: step links were dimmed to 75% opacity, which also faded their new border */
html:not([data-theme="dark"]):not([data-theme="glass"]) .step-indicator .step-link{opacity:1}
/* Round 3: last Dark/Glass leftovers */
html[data-theme="dark"] .avail-table th,html[data-theme="glass"] .avail-table th{background:#1e3c78!important;color:#eaf1ff}
html[data-theme="glass"] .site-header{background:rgba(20,50,112,.98)}
html[data-theme="dark"] .btn-outline,html[data-theme="glass"] .btn-outline{border-color:#a9c2f0!important}
html[data-theme="glass"] body #main :is(.xg-sub,.xg-d,.xag-diagnostic p,.xag-diagnostic h2){color:#fff!important}
html[data-theme="glass"] body #xfxTop,html[data-theme="glass"] body .cart-btn{color:#fff!important}
html[data-theme="glass"] body #xfxTop{background:#1a3d81!important}
html[data-theme="glass"] body #main p a:not(.btn){color:#d9e1ff!important}
html[data-theme="glass"] .legal-page :is(small,em,p){color:#e6eeff;opacity:1}
/* Admin console (Dark/Glass): tiles and small buttons had 1.2 to 2.7:1 borders */
html[data-theme="dark"] :is(.am-tile,.am-btn),html[data-theme="glass"] :is(.am-tile,.am-btn){border-color:#8fb0e8!important}
/* greeting sparkle: orange only where it reaches 3:1 */
#xlGreet svg path:first-child{fill:#c2410c}
html[data-theme="dark"] #xlGreet svg path:first-child,html[data-theme="glass"] #xlGreet svg path:first-child{fill:#ffb000}
html[data-theme="glass"] body #main :is(.xag-diagnostic,#cartWhoBanner) :is(p,a){opacity:1!important}
html[data-theme="glass"] body #main .xag-diagnostic p{color:#fff!important}
html[data-theme="glass"] body #main #cartWhoBanner a{color:#d9e1ff!important}
html[data-theme="dark"] .xag-footer-cta p,html[data-theme="glass"] .xag-footer-cta p{opacity:1!important}
html[data-theme="glass"] .am-tile,html[data-theme="glass"] .am-tile span{background-color:#1a3d81}
html[data-theme="glass"] .am-tile span{background:none;color:#eaf1ff}
/* toast: white on #0b1c2d (about 17:1) in Light, Dark navy and Glass */
.cart-toast{background:#0b1c2d!important;color:#fff!important}

/* Phones: finger-sized tap targets (live-sites audit 2026-10-19). Height only; layout unchanged. */
@media(max-width:640px){
  .home-btn.home-btn,.logo-link,.xag-diagnostic-opts button{min-height:40px}
  footer a{display:inline-flex;align-items:center;min-height:40px}
}
