/* Device-local light / dark preference; brand assets keep their original colours. */
:root{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark;--paper:#151811;--ink:#eeece1;--muted:#b0b6a6;--line:#3b4432;--surface:#1e2419;--surface-hover:#262e1e;--surface-selected:#29371c;--border-active:#839f4f}
.theme-toggle{position:relative;display:grid;place-items:center;width:44px;height:44px;min-width:44px;flex-shrink:0;background:transparent;border:1px solid var(--line);border-radius:50%;color:var(--ink);transition:background .2s,border-color .2s}
.theme-toggle:hover{background:var(--lime);border-color:var(--lime);color:#1d1f18}
.theme-toggle svg{position:absolute;width:21px;height:21px;transition:opacity .25s,transform .35s var(--ease);pointer-events:none}
.theme-sun{opacity:0;transform:rotate(-70deg) scale(.6)}
[data-theme=dark] .theme-moon{opacity:0;transform:rotate(70deg) scale(.6)}
[data-theme=dark] .theme-sun{opacity:1;transform:rotate(0) scale(1)}
.motion-toggle{width:44px;height:44px;min-width:44px;flex-shrink:0}
.theme-ready body{transition:background-color .25s,color .25s}

/* Dark surfaces and readable accent states. */
[data-theme=dark] ::selection{color:#151811}
[data-theme=dark] :is(a,button,input,select,summary):focus-visible{outline-color:var(--lime)}
[data-theme=dark] .header{background:var(--paper);box-shadow:none}
[data-theme=dark] .header.scrolled{box-shadow:0 5px 30px #0003}
[data-theme=dark] .read-progress{background:var(--lime)}
[data-theme=dark] .motion-toggle{color:var(--muted)}
[data-theme=dark] :is(.small-cta,.button){background:var(--lime);color:#151811}
[data-theme=dark] :is(.small-cta,.button):hover{background:#d2ff62}
[data-theme=dark] :is(.cta-arrow,.button-arrow){background:#26351a;color:var(--lime)}
[data-theme=dark] .art-chip{background:var(--surface);border-color:var(--line);box-shadow:0 12px 35px -13px #0008}
[data-theme=dark] :is(.art-chip:hover,.art-chip:hover small,.motion-toggle:hover,.skip,.outline-button:hover,.dialog-close:hover,.app-add:hover,.quantity-control button:hover,.faq-list details[open] .faq-plus,.scroll-cue:hover>span:last-child){color:#151811}
[data-theme=dark] .art-chip:hover{background:var(--lime);border-color:var(--lime)}
.hero-image-dark{display:none}
[data-theme=dark] .hero-image-light{display:none}
[data-theme=dark] .hero-image-dark{display:block}
[data-theme=dark] .art-image-wrap{mix-blend-mode:normal}
[data-theme=dark] .faq-list summary:hover{color:var(--lime)}
[data-theme=dark] :is(.scroll-cue>span:last-child,.faq-plus){border-color:#64734f}

/* These sections already use a dark ink / light paper pairing. */
[data-theme=dark] :is(.service-ribbon,.quote-panel,.contact,.footer){--ink:#1d1f18;--paper:#eeece1}
[data-theme=dark] .service-ribbon{background:#1b2116;border-block:1px solid #36412b}
[data-theme=dark] .quote-panel{background:#1e2717;box-shadow:inset 0 0 0 1px #445634}
[data-theme=dark] :is(.contact,.footer){background:#10150d}
[data-theme=dark] .contact{border-top:1px solid #36412b}
[data-theme=dark] .sovereignty-section{background:#222f17;color:var(--ink)}
[data-theme=dark] :is(.sovereignty-section .section-meta,.sovereignty-label){color:#c0d3a5}
[data-theme=dark] :is(.sovereignty-intro>p,.sovereignty-row p,.sovereignty-scope){color:#c3ceba}
[data-theme=dark] .sovereignty-intro h2>span{color:var(--lime);border-color:var(--lime)}
[data-theme=dark] .sovereignty-row::after{background:#4f6538}
[data-theme=dark] .sovereignty-scope{border-color:#4f6538}

/* Catalogue, filters and app details. Logos retain neutral white supports. */
[data-theme=dark] .app-toolbar{background:var(--surface);border-color:var(--line)}
[data-theme=dark] :is(.library-search,.library-filter select,.family-button,.outline-button,.selection-filter,.selection-bar,.dialog-close){border-color:#536144}
[data-theme=dark] .library-filter select{background:var(--paper)}
[data-theme=dark] .library-search input::placeholder{color:var(--muted)}
[data-theme=dark] .retained-grid .library-card{background:var(--surface);border-color:var(--line)}
[data-theme=dark] .retained-grid .library-card:hover{background:var(--surface-hover);border-color:var(--border-active);box-shadow:0 8px 24px #0002}
[data-theme=dark] .retained-grid .library-card.app-selected{background:var(--surface-selected);border-color:var(--border-active);box-shadow:inset 0 0 0 1px var(--border-active)}
[data-theme=dark] :is(.app-open p,.app-open .card-category,.app-card-bottom>span,.dialog-description,.dialog-scope p,.dialog-scope .mono){color:var(--muted)}
[data-theme=dark] .replacement-badge{background:#303e23;border-color:#52683a;color:#d2e4b8}
[data-theme=dark] .app-add{border-color:#7a8c62}
[data-theme=dark] :is(.family-button[aria-pressed=true],.selection-filter[aria-pressed=true],.app-add.is-added){background:var(--lime);border-color:var(--lime);color:#151811}
[data-theme=dark] :is(.selection-filter span,.selection-link>span:first-child){background:#344229;color:var(--ink)}
[data-theme=dark] .selection-filter[aria-pressed=true] span{background:#26351a;color:var(--lime)}
[data-theme=dark] .selection-link .cta-arrow{background:var(--lime);color:#151811}
[data-theme=dark] .app-dialog{background:var(--surface);border-color:#677b50;box-shadow:0 40px 140px #0009}
[data-theme=dark] .app-dialog::backdrop{background:#080d06e8}
[data-theme=dark] .dialog-actions .quote-cta{color:#151811}
[data-theme=dark] .dialog-actions .quote-cta:hover{background:#d2ff62}

/* Pricing stays the same; selection, options and the quote share the theme. */
[data-theme=dark] :is(.tariff-ledger,.pricing-section .tariff-row,.pricing-section .tariff-row+.tariff-row,.pricing-section .discovery-plan,.tariff-scope,.included-strip){border-color:var(--line)}
[data-theme=dark] .pricing-section .tariff-row:hover{background:var(--surface-hover)}
[data-theme=dark] :is(.pricing-section .tariff-row.selected-plan,.pricing-section .discovery-plan.selected-plan){background:var(--surface-selected);border-color:var(--border-active)}
[data-theme=dark] .pricing-section .tariff-row::before{background:var(--lime)}
[data-theme=dark] :is(.tariff-row .plan-baseline,.tariff-use,.discovery-plan p,.discovery-price small,.included-strip .mono,.option-card legend,.option-card>p,.option-status,.option-card>.option-small){color:var(--muted)}
[data-theme=dark] :is(.tariff-row .plan-match,.discovery-plan .plan-match){color:var(--lime)}
[data-theme=dark] .tariff-machine::before{border-color:#9bb575}
[data-theme=dark] .tariff-row[data-plan=business] .tariff-machine::before{background:var(--lime)}
[data-theme=dark] .tariff-row .plan-cta{border-color:#76895c}
[data-theme=dark] :is(.tariff-row .plan-cta:hover,.tariff-row.selected-plan .plan-cta){background:var(--lime);border-color:var(--lime);color:#151811}
[data-theme=dark] .configuration-controls .option-card{background:var(--surface);border-color:var(--line)}
[data-theme=dark] .quantity-control{border-color:#536144;background:var(--paper)}
[data-theme=dark] .quantity-control button{background:#344229}
[data-theme=dark] .quantity-control button:hover{background:var(--lime)}
[data-theme=dark] .toggle-track{background:#46513c}
[data-theme=dark] .toggle-track:after{background:#d8dfca}
[data-theme=dark] .dedicated-toggle input:checked+.toggle-track{background:var(--lime)}
[data-theme=dark] .dedicated-toggle input:checked+.toggle-track:after{background:#151811}
[data-theme=dark] .dedicated-toggle input:focus-visible+.toggle-track{outline-color:var(--lime)}
[data-theme=dark] .compare-row.is-selected{background:var(--surface)}
[data-theme=dark] :is(.compare-remove,.selection-empty){border-color:#64764f}

/* Keep both switches reachable without squeezing the mobile brand or CTA. */
@media(min-width:761px) and (max-width:1080px){.header-inner{gap:18px}.desktop-nav{gap:16px}.header-actions{gap:9px}.small-cta{gap:12px}}
@media(max-width:920px){.desktop-nav{display:none}.header-actions{margin-left:auto}}
@media(max-width:480px){.header-actions{gap:6px}.header-inner{gap:10px}.small-cta{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;justify-content:center}.small-cta>span:first-child{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.small-cta .cta-arrow{width:34px;height:34px}.theme-toggle,.motion-toggle{width:44px;height:44px;min-width:44px}.motion-toggle svg{width:19px;height:19px}}
@media(prefers-reduced-motion:reduce){.theme-ready body,.theme-toggle,.theme-toggle svg{transition:none}}
.motion-off.theme-ready body,.motion-off .theme-toggle,.motion-off .theme-toggle svg{transition:none}
@media(forced-colors:active){.theme-toggle,.motion-toggle{border:1px solid ButtonText;color:ButtonText;background:ButtonFace}.theme-toggle[aria-checked=true]{outline:2px solid Highlight;outline-offset:2px}}
