/* Light / dark switch and hand tuning of the dark theme (John, 2026-11-06). Loaded last, after assets/dark/*.css.
   The dark files are built by tools/theme_build.py; put fixes here. */
:root[data-theme=dark]{color-scheme:dark}
:root[data-theme=light]{color-scheme:light}
.cc-theme-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:0 10px;border-radius:999px;border:1px solid currentColor;background:transparent;color:inherit;font:inherit;font-size:14px;cursor:pointer;opacity:.85;flex:none}
.cc-theme-btn:hover,.cc-theme-btn:focus-visible{opacity:1}
.cc-theme-btn svg{display:block}
/* Primary pills stay the brightest thing on the page at night */
:root[data-theme=dark] .dark .btn-accent,:root[data-theme=dark] .panel.dark .btn-accent,:root[data-theme=dark] .plan.dark .btn-accent{background:#F1ECE2!important;color:#14142B!important}
/* Promo ribbon (promo.css is loaded late by site.js) */
:root[data-theme=dark] .ccp{background:#1A1B2E!important;color:#F3EBDD!important;border-bottom:1px solid #30324A!important}
:root[data-theme=dark] .ccp b{color:#D8B77A!important}
/* Public header: inside the menu row on computers, beside the Menu button on phones (one of the two is shown) */
.site-header .cc-theme-btn{color:var(--muted);border-color:var(--line-2,#D6CFC2)}
.site-header .cc-theme-pub{display:none}
@media (max-width:980px){.site-header .cc-theme-nav{display:none}.site-header .cc-theme-pub{display:inline-flex;margin-left:auto}.site-header .cc-theme-pub+.menu-btn{margin-left:0}.site-header .wrap{column-gap:8px!important}}
/* Merchant pages: coral main button with ink text at night; switch top right of the title */
:root[data-theme=dark] .mx-btn:not(.mx-g){background:#EE8A5F;color:#14142B}
.mx-top{position:relative;padding-right:56px}
.mx-top>.cc-theme-btn{position:absolute;top:0;right:0;margin:0}
:root[data-theme=dark] body.lx .legend .lin::before{background:#F1ECE2}
/* Hub header: keep "Synchroniser" on one line next to the switch */
body>header.hd #refresh{white-space:nowrap}
body>header.hd>button,body>header.hd>a{flex-shrink:0}body>header.hd .cc-theme-btn{padding:0;width:44px}
@media (max-width:420px){body>header.hd{gap:6px;padding-left:12px;padding-right:12px}body>header.hd #refresh{padding:0 10px}}
/* QA 2026-11-17: footer links readable at night (were #5b67e3 on #1f2133, 3.4:1) */
:root[data-theme=dark] .site-footer a{color:#B4BCFF!important}
/* QA 2026-11-17: plain text links at night (were #5B67E3 on near-black, 4.1:1); light sign-in button gets ink text;
   Hub orange chips and the orange « waiting for you » tile keep ink text, as in daylight */
:root[data-theme=dark] main a:not([class]),:root[data-theme=dark] .op-note a,:root[data-theme=dark] .also a,:root[data-theme=dark] .note a{color:#A9B3FF}
:root[data-theme=dark] .au-btn:not(.ghost){color:#111214}
:root[data-theme=dark] .lx2-band .lx2-gold,:root[data-theme=dark] .lx-lang button[aria-pressed=true]{color:#111214!important}
:root[data-theme=dark] body.lx .lx2-band .lx-kpis a.lx-kpi:last-child,:root[data-theme=dark] body.lx .lx2-band .lx-kpis a.lx-kpi:last-child .k,:root[data-theme=dark] body.lx .lx2-band .lx-kpis a.lx-kpi:last-child .n,:root[data-theme=dark] body.lx .lx2-band .lx-kpis a.lx-kpi:last-child b{color:#111214!important}
:root[data-theme=dark] a[data-plan]:not(.btn){color:#A9B3FF}
:root[data-theme=dark] .tier,:root[data-theme=dark] .pb-diy-badge{color:#F1ECE2!important}
:root[data-theme=dark] .eyebrow{color:#FF8A5C!important}
:root[data-theme=dark] a.seeall,:root[data-theme=dark] .wz-step{color:#A9B3FF}
