/* Theme layer: load after v2.css and v2-project.css. Media retains its original color. */
:root{color-scheme:light;--theme-control-hover:#e1e5fa;--theme-focus:#294bff}
[data-theme-toggle]{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;padding:11px;border:0;border-radius:50%;background:transparent;color:var(--ink);vertical-align:middle;transition:background .2s,color .2s}
[data-theme-toggle] svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
[data-theme-toggle]:hover{background:var(--theme-control-hover);color:var(--blue)}
[data-theme-toggle]:focus-visible{outline:3px solid var(--theme-focus);outline-offset:3px}

:root[data-theme="dark"]{
  color-scheme:dark;
  --paper:#111512;
  --ink:#f3f2ea;
  --blue:#9babff;
  --lime:#e5fc76;
  --line:#39443b;
  --muted:#b0b9af;
  --theme-control-hover:#242e43;
  --theme-focus:#c5d0ff;
  --theme-cobalt:#294bff;
  background:var(--paper);
  color:var(--ink);
}
:root[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
:root[data-theme="dark"] ::selection{background:var(--lime);color:#191b1b}
:root[data-theme="dark"] :is(button,a,input,summary,textarea,select):focus-visible{outline-color:var(--theme-focus)}
:root[data-theme="dark"] .site-header{background:rgba(17,21,18,.94)}
:root[data-theme="dark"] :is(.site-footer,.work-section,.about-section){background:var(--paper)}
:root[data-theme="dark"] .hero-asterisk{color:#708634}
:root[data-theme="dark"] .button-dark{background:#f3f2ea;color:#171b17}
:root[data-theme="dark"] .button-dark:hover{background:#e5fc76}
:root[data-theme="dark"] .button-blue{background:var(--theme-cobalt);color:#fff}
:root[data-theme="dark"] .button-blue:hover{background:#2141e7}
:root[data-theme="dark"] .button-lime{background:var(--lime);color:#191b1b}
:root[data-theme="dark"] .button-outline{border-color:#7d8a7d}
:root[data-theme="dark"] .skip-link{background:var(--lime);color:#191b1b}

/* Proof and cards stay quiet; the accent remains reserved for the signal. */
:root[data-theme="dark"] :is(.project-visual,.project-visual.portrait){background:#202720}
:root[data-theme="dark"] :is(.project-number,.project-open,.project-related-image>span){background:#171d18;color:#f3f2ea}
:root[data-theme="dark"] .project-visual:hover .project-open{background:var(--lime);color:#191b1b}
:root[data-theme="dark"] .filter-list button[aria-pressed="true"]{background:#e5fc76;border-color:#e5fc76;color:#191b1b}
:root[data-theme="dark"] .filter-list button:hover{border-color:#b0b9af}

/* Preserve the cobalt chapter and shift the lime process chapter into a deep olive. */
:root[data-theme="dark"] :is(.services-section,.project-contact-v2){background:#233ecb;color:#fff}
:root[data-theme="dark"] .services-section .section-top>.micro:last-child,
:root[data-theme="dark"] .service-num{color:#d1d9ff}
:root[data-theme="dark"] :is(.services-intro p,.service-body>span,.services-footer>span){color:#e0e5ff}
:root[data-theme="dark"] .service-row{border-color:#ffffff55}
:root[data-theme="dark"] .process-section{background:#20291b;color:#f3f2ea}
:root[data-theme="dark"] .process-copy>.micro{color:var(--lime)}
:root[data-theme="dark"] .process-steps{color:#c3d49b}
:root[data-theme="dark"] .comparison-caption button{border-color:#889778;color:#f3f2ea}
:root[data-theme="dark"] .comp-line>span{background:#f3f2ea;color:#191b1b}
:root[data-theme="dark"] .about-stamp{background:var(--theme-cobalt);color:#fff}
:root[data-theme="dark"] .contact-section{background:#080d09;color:#f3f2ea;border-top:1px solid var(--line)}
:root[data-theme="dark"] .contact-top{color:#b8c2b4}
:root[data-theme="dark"] .contact-email{border-color:#75816e}

/* Project detail pages use the same surfaces and hierarchy as the home page. */
:root[data-theme="dark"] .project-results-v2{background:#28351d;color:#f3f2ea}
:root[data-theme="dark"] .project-results-v2>strong{color:var(--lime)}
:root[data-theme="dark"] .project-results-v2 details{border-color:#76874c}
:root[data-theme="dark"] .project-results-v2 details p{color:#d3dfc4}
:root[data-theme="dark"] .project-gallery-v2{background:#19201a}
:root[data-theme="dark"] :is(.project-media-frame,.project-related-image){background:#242d25}

/* Native controls, brief form and result context remain readable in dark mode. */
:root[data-theme="dark"] .small-dialog{background:#19201a;color:#f3f2ea;border:1px solid #485348;box-shadow:0 24px 90px #0008}
:root[data-theme="dark"] .small-dialog .dialog-close{background:#303b31;color:#f3f2ea}
:root[data-theme="dark"] .small-dialog :is(input,textarea,select){background:#111812;border-color:#7a8878;color:#f3f2ea;caret-color:var(--lime)}
:root[data-theme="dark"] .small-dialog :is(input,textarea)::placeholder{color:#a5b09f;opacity:1}
:root[data-theme="dark"] .small-dialog option{background:#19201a;color:#f3f2ea}
:root[data-theme="dark"] .small-dialog :is(input,textarea,select):focus-visible{outline-color:var(--lime);border-color:var(--lime)}
:root[data-theme="dark"] .motion-toggle:hover,
:root[data-theme="dark"] .motion-toggle[aria-pressed="true"]{background:var(--theme-control-hover);color:var(--blue)}
:root[data-theme="dark"] .mobile-nav{background:rgba(17,21,18,.97)}
:root[data-theme="dark"] .mobile-nav a.active{background:#26334a;color:#c5d0ff}
:root[data-theme="dark"] .mobile-nav .mobile-contact,
:root[data-theme="dark"] .mobile-nav .mobile-contact.active{background:var(--theme-cobalt);color:#fff}

@media(prefers-reduced-motion:reduce){[data-theme-toggle]{transition:none}}

:root[data-theme="dark"] .brand-strip-item .logo-ink{filter:brightness(0) invert(1);opacity:.86}

:root[data-theme="dark"] .brand-strip-item .brand-logo-gray{display:none}
:root[data-theme="dark"] .brand-strip-item .brand-logo-white{display:block}
