/* Dark is the default palette; the saved light preference is applied to html before paint. */
html[data-theme="light"]{
  --bg:#f7f5ef;--card:#fffdf9;--border:rgba(54,45,32,.15);--border-soft:rgba(54,45,32,.1);
  --text:#27231d;--text-dim:#59554e;--muted:#716b63;--accent:#965812;--accent-soft:rgba(150,88,18,.12);
  --blue:#176b96;--blue-soft:rgba(23,107,150,.11);--green:#287951;--green-soft:rgba(40,121,81,.11);
  --pink:#a24668;--pink-soft:rgba(162,70,104,.11);--purple:#75509c;--purple-soft:rgba(117,80,156,.11);
  color-scheme:light;
}
:root{color-scheme:dark}
.theme-toggle{display:grid;place-items:center;flex:none;width:39px;height:39px;margin-left:3px;border:1px solid var(--border);border-radius:50%;background:var(--card);color:var(--accent);cursor:pointer;transition:background .2s,border-color .2s,transform .2s}
.theme-toggle:hover{border-color:var(--accent);transform:rotate(15deg)}.theme-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.theme-toggle svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.theme-moon{display:none}html[data-theme="light"] .theme-moon{display:block}html[data-theme="light"] .theme-sun{display:none}
@media(max-width:880px){.theme-toggle{width:32px;height:32px;margin-left:0}.theme-toggle svg{width:16px;height:16px}}
html[data-theme="light"] body{background:var(--bg);color:var(--text)}
html[data-theme="light"] .bg-glow,html[data-theme="light"] body::before{background:radial-gradient(circle at 15% 8%,rgba(196,143,68,.1),transparent 40%),radial-gradient(circle at 85% 15%,rgba(78,143,178,.08),transparent 40%)}
html[data-theme="light"] .navbar,html[data-theme="light"] nav.fixed{background:rgba(255,253,249,.92)!important;box-shadow:0 10px 35px rgba(55,44,30,.12)}
html[data-theme="light"] .hero-kicker,html[data-theme="light"] .editorial-kicker{color:#655b4f}
html[data-theme="light"] .hero-proof,html[data-theme="light"] .editorial-proof{color:#6a625a}
html[data-theme="light"] .hero-intro,html[data-theme="light"] .editorial-intro{color:#514c46}
html[data-theme="light"] .hero-intro:first-of-type,html[data-theme="light"] .editorial-intro:first-of-type{color:#2f2a24}
html[data-theme="light"] .hero-heading em,html[data-theme="light"] .hero-editorial h1 em{color:var(--accent)}
html[data-theme="light"] .hero-social a,html[data-theme="light"] .social-row a{color:var(--text-dim)}
html[data-theme="light"] .hero-strip,html[data-theme="light"] .editorial-strip{background:rgba(150,88,18,.025);border-color:var(--border-soft)}
html[data-theme="light"] .hero-strip>div,html[data-theme="light"] .editorial-strip .wrap{color:var(--text-dim)}
html[data-theme="light"] .hero-strip strong,html[data-theme="light"] .editorial-strip strong{color:var(--text)}
html[data-theme="light"] .newsletter-card{background:var(--card);border-color:var(--border)}
html[data-theme="light"] .newsletter-card p,html[data-theme="light"] .newsletter-meta,html[data-theme="light"] .newsletter-card-top{color:var(--text-dim)}
html[data-theme="light"] .newsletter-card-bottom,html[data-theme="light"] .newsletter-foot{color:var(--muted)}
html[data-theme="light"] .btn-primary{background:var(--accent);color:#fff}
html[data-theme="light"] .project:hover{background:rgba(150,88,18,.04)}
/* The delivery panel and intro retain their technical look with light surfaces and dark text. */
html[data-theme="light"] .ops-flow{background:linear-gradient(160deg,#fffdfa,#efeae0 95%);border-color:rgba(150,88,18,.25);box-shadow:0 30px 65px rgba(71,55,31,.12)}
html[data-theme="light"] .ops-topline,html[data-theme="light"] .ops-bottomline{color:#71685b}
html[data-theme="light"] .ops-topline span:first-child{color:#805419}
html[data-theme="light"] .ops-step{color:#38332d}
html[data-theme="light"] .ops-icon{background:#fffdf9;box-shadow:0 0 0 5px #f5f0e7}
html[data-theme="light"] .ops-step small{color:#6a625a}
html[data-theme="light"] .ops-console{background:#f9f7f2;color:#4a4740;border-color:var(--border)}
html[data-theme="light"] .ops-console div span:last-child{color:#6d665d}
html[data-theme="light"] .ops-console .ops-prompt,html[data-theme="light"] .ops-console .ops-run{color:var(--accent)!important}
html[data-theme="light"] .ops-console .ops-success,html[data-theme="light"] .ops-console .ops-healthy,html[data-theme="light"] .ops-status{color:var(--green)!important}
html[data-theme="light"] .ops-track{background:linear-gradient(90deg,rgba(150,88,18,.35),rgba(23,107,150,.4),rgba(40,121,81,.4))}
html[data-theme="light"] .pipeline-intro{background:var(--bg);color:var(--text)}
html[data-theme="light"] .pipeline-intro p{color:var(--text-dim)}
html[data-theme="light"] .pipeline-node-icon{background:#fffdf9;box-shadow:0 0 0 7px var(--bg)}
html[data-theme="light"] .pipeline-node{color:var(--text-dim)}
html[data-theme="light"] .pipeline-node small{color:var(--muted)}
html[data-theme="light"] .pipeline-intro-status{background:var(--card);border-color:var(--border);color:var(--text-dim)}
html[data-theme="light"] .pipeline-rail{background:rgba(150,88,18,.2)}
html[data-theme="light"] .pipeline-skip{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}
