/* Dark mode for build.mggriebz.com. Applied when <html data-theme="dark">: the head script sets it
   from the visitor's saved choice, else from prefers-color-scheme. Diagrams, the hero map and the
   zoom view stay on their light paper "sheet" so Mermaid colors read exactly as Matt drew them. */
:root[data-theme=dark]{color-scheme:dark;--ink:#e8efe9;--teal:#6fd0c3;--paper:#0f1f1b;--white:#172d27;--card:#172d27;--line:#2c4740;--muted:#b3c6bd;--green:#8fd0b2;--soft:#13261f;--panel:#13261f;--mint:#a9d9c0}
:root[data-theme=dark] body{background:#0f1f1b;color:#e8efe9}
:root[data-theme=dark] .site-head{background:color-mix(in srgb,#0f1f1b 94%,transparent);border-bottom-color:#2c4740}
:root[data-theme=dark] .site-head.is-scrolled{box-shadow:0 6px 18px #00000055}
:root[data-theme=dark] .head-nav a,:root[data-theme=dark] .head-cta{color:#e8efe9}
:root[data-theme=dark] .head-nav a[aria-current=true]{color:#6fd0c3}
/* Logo: the chalk tile keeps its own dark green; a light keyline lifts it off the dark header. */
:root[data-theme=dark] .logo svg>rect:first-of-type{stroke:#8fbfab;stroke-width:1.2}
:root[data-theme=dark] h1,:root[data-theme=dark] h2,:root[data-theme=dark] h3{color:#f3f6f2}
:root[data-theme=dark] .hero h1 span{color:#6fd0c3}
:root[data-theme=dark] .eyebrow,:root[data-theme=dark] .close .eyebrow,:root[data-theme=dark] .about-story h3{color:#8fd0b2}
:root[data-theme=dark] .hero-lead,:root[data-theme=dark] .proof p,:root[data-theme=dark] .resource p,:root[data-theme=dark] .request-in p,:root[data-theme=dark] .about-in p,:root[data-theme=dark] .offer p,:root[data-theme=dark] .project-card p:not(.tag),:root[data-theme=dark] .example-detail p,:root[data-theme=dark] .about-story p,:root[data-theme=dark] .steps span,:root[data-theme=dark] .close-copy p:last-child,:root[data-theme=dark] .section-head p{color:#b9cbc2}
:root[data-theme=dark] .about-lead,:root[data-theme=dark] .about-copy .about-lead{color:#f3f6f2!important}
:root[data-theme=dark] .offer .tag,:root[data-theme=dark] .project-card .tag,:root[data-theme=dark] .example-item .tag,:root[data-theme=dark] .example-copy .tag{color:#9fbcb0}
:root[data-theme=dark] .offer .offer-limit,:root[data-theme=dark] .zoom-hint,:root[data-theme=dark] .about-press,:root[data-theme=dark] .request-in p.request-local,:root[data-theme=dark] .project-shelf small,:root[data-theme=dark] .resource .map-fallback{color:#9fb5ab}
:root[data-theme=dark] a,:root[data-theme=dark] .text-link,:root[data-theme=dark] .offer a,:root[data-theme=dark] .example-figure figcaption a,:root[data-theme=dark] .resource .public-map-caption button{color:#8fe0d4}
:root[data-theme=dark] .offer,:root[data-theme=dark] .project-card,:root[data-theme=dark] .project-shelf a,:root[data-theme=dark] .request-panel,:root[data-theme=dark] .community-grid>.session-contact,:root[data-theme=dark] .resource,:root[data-theme=dark] .resource-grid>article{background:#172d27;border-color:#2c4740;color:#e8efe9}
:root[data-theme=dark] .offer:hover{border-color:#4f7a6c;box-shadow:0 10px 26px #00000040}
:root[data-theme=dark] .offer .price{color:#8fe0d4}
:root[data-theme=dark] .offer .offer-free,:root[data-theme=dark] .example-cta{background:#1d3a32;color:#dfeae4}
:root[data-theme=dark] .example-cta p{color:#c6d8cf}
:root[data-theme=dark] .projects,:root[data-theme=dark] .request,:root[data-theme=dark] .close,:root[data-theme=dark] .examples,:root[data-theme=dark] .about{background:#13261f;color:#e8efe9}
:root[data-theme=dark] .section,:root[data-theme=dark] .examples,:root[data-theme=dark] .about-proof,:root[data-theme=dark] .about-story,:root[data-theme=dark] .steps li,:root[data-theme=dark] .example-item,:root[data-theme=dark] .example-list{border-color:#2c4740}
:root[data-theme=dark] .example-list{border-top-color:#e8efe9}
:root[data-theme=dark] .about-proof strong{color:#6fd0c3}
:root[data-theme=dark] .about-proof span{color:#b3c6bd}
:root[data-theme=dark] .example-num{border-color:#2c4740;color:#8fe0d4}
:root[data-theme=dark] .example-item button{color:#f3f6f2}
:root[data-theme=dark] .example-item button[aria-expanded=true] .example-num,:root[data-theme=dark] .steps li::before{background:#086d71;border-color:#086d71;color:#fff}
:root[data-theme=dark] .steps strong{color:#f3f6f2}
:root[data-theme=dark] .free-map{background:#0a1714}
:root[data-theme=dark] .proof{background:#0b1a16}
/* the request form */
:root[data-theme=dark] .intake,:root[data-theme=dark] .intake-body,:root[data-theme=dark] .session-contact{background:#172d27;color:#e8efe9}
:root[data-theme=dark] .intake input:not([type=radio]),:root[data-theme=dark] .intake textarea,:root[data-theme=dark] .intake-select{background:#0f1f1b;border-color:#4f7a6c;color:#f3f6f2}
:root[data-theme=dark] .intake ::placeholder{color:#89a298}
:root[data-theme=dark] .intake .field>span,:root[data-theme=dark] .intake .choice-group>legend,:root[data-theme=dark] .intake-lead{color:#e8efe9}
:root[data-theme=dark] .intake-choices label{background:#0f1f1b;border-color:#2c4740;color:#e8efe9}
:root[data-theme=dark] .intake-choices label:has(input:checked){background:#1d3a32;border-color:#6fd0c3;color:#fff}
:root[data-theme=dark] .intake-choices label:after{background:#0f1f1b;border-color:#4f7a6c}
:root[data-theme=dark] .intake-hint,:root[data-theme=dark] .intake-privacy,:root[data-theme=dark] .field-hint,:root[data-theme=dark] .intake small{color:#9fb5ab}
:root[data-theme=dark] .field-error{color:#ff9e93}
/* sheets that stay light: real maps, the hero map and the zoom view */
:root[data-theme=dark] .example-figure,:root[data-theme=dark] .zoom-stage{background:#fffdf8;border-color:#2c4740}
:root[data-theme=dark] .example-figure figcaption a{color:#006e73}
:root[data-theme=dark] .example-figure .zoom-hint{color:#60756c}
:root[data-theme=dark] .hero-frame:before,:root[data-theme=dark] .about-portrait:before{background:#1d3a32}
/* the theme toggle */
.theme-toggle{--corner-color:var(--teal);display:inline-grid;place-items:center;width:36px;height:36px;margin-left:4px;padding:0;border:0;background-color:transparent;background-image:linear-gradient(var(--corner-color),var(--corner-color)),linear-gradient(var(--corner-color),var(--corner-color)),linear-gradient(var(--corner-color),var(--corner-color)),linear-gradient(var(--corner-color),var(--corner-color)),linear-gradient(var(--corner-color),var(--corner-color)),linear-gradient(var(--corner-color),var(--corner-color)),linear-gradient(var(--corner-color),var(--corner-color)),linear-gradient(var(--corner-color),var(--corner-color));background-position:left top,left top,right top,right top,left bottom,left bottom,right bottom,right bottom;background-size:9px 2px,2px 9px,9px 2px,2px 9px,9px 2px,2px 9px,9px 2px,2px 9px;background-repeat:no-repeat;color:var(--ink);cursor:pointer;flex:none;transition:background-size .18s ease}
.theme-toggle:hover{color:var(--teal);background-size:13px 2px,2px 13px,13px 2px,2px 13px,13px 2px,2px 13px,13px 2px,2px 13px}
:root[data-theme=dark] .theme-toggle{--corner-color:#f4b579}
.theme-toggle:focus-visible{outline:3px solid #ea8f51;outline-offset:2px}
.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .moon{display:none}
:root[data-theme=dark] .theme-toggle .sun{display:none}
:root[data-theme=dark] .theme-toggle .moon{display:block}
:root[data-theme=dark] .logo svg text{fill:#e8efe9}
:root[data-theme=dark] a.free-map-cta{color:#0f2a24}
:root[data-theme=dark] .nav-song{--green:#8fd0b2;box-shadow:2px 2px 0 #0a1714}
:root[data-theme=dark] .nav-song .song-title,:root[data-theme=dark] .nav-song .song-time{color:#dfeae4}
:root[data-theme=dark] .nav-song button:hover{background:#1d3a32}
:root[data-theme=dark] .nav-song .song-volume-panel,:root[data-theme=dark] .nav-song .song-volume-panel-head button{background:#172d27;color:#e8efe9}
/* Panels that use the ink color as a dark background stay dark. */
:root[data-theme=dark] .review,:root[data-theme=dark] .play,:root[data-theme=dark] .mini-book,:root[data-theme=dark] .close,:root[data-theme=dark] .intake-heading,:root[data-theme=dark] .intake-stepper button[aria-current=step]{background-color:#0a1613;border-color:#0a1613;color:#f3f6f2}
:root[data-theme=dark] .intake-heading .eyebrow{color:#a9d9c0}
:root[data-theme=dark] .mini-book{box-shadow:8px 8px 0 #0a1613;border-left-color:#6fd0c3}
:root[data-theme=dark] button.button{color:#8fe0d4}
/* Footer switch (the header button hides on phones to keep the header on one line). */
.foot-theme{margin-left:14px;padding:0;border:0;background:none;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.foot-theme:focus-visible{outline:3px solid #ea8f51;outline-offset:3px}
.foot-theme .to-light,:root[data-theme=dark] .foot-theme .to-dark{display:none}
:root[data-theme=dark] .foot-theme .to-light{display:inline}
@media(max-width:680px){.theme-toggle{display:none}}
/* Map your idea, then send it */
:root[data-theme=dark] .start{background:#13261f}
:root[data-theme=dark] .start-step{color:#f3f6f2}
:root[data-theme=dark] .start-step span,:root[data-theme=dark] .start-send .intake-navigation .button{background-color:#086d71;border-color:#086d71;color:#fff}
:root[data-theme=dark] .mapit-group{background:#172d27;border-color:#2c4740;border-top-color:var(--branch)}
:root[data-theme=dark] .mapit-group-name{color:color-mix(in srgb,var(--branch) 40%,#fff)}
:root[data-theme=dark] .mapit-group .mapit-chip{--branch-chip:color-mix(in srgb,var(--branch) 40%,#fff);background:#13261f;border-color:#3a5750;color:#f3f6f2}
:root[data-theme=dark] .mapit-group .mapit-chip[aria-pressed=true]{background:var(--branch);border-color:color-mix(in srgb,var(--branch) 40%,#fff);color:#fff}
:root[data-theme=dark] .mapit-root-chip{box-shadow:0 0 0 3px #13261f,0 0 0 4px #6fd0c3}
:root[data-theme=dark] .mapit-figure{box-shadow:5px 5px 0 #0a1613}
:root[data-theme=dark] .mapit-figure .start-step{color:#173931}
:root[data-theme=dark] .mapit-figure .mapit-link{color:#006e73}
:root[data-theme=dark] .mapit-figure .mapit-render,:root[data-theme=dark] .mapit-figure .mapit-status{color:#4a5d56}
:root[data-theme=dark] .start-send{background:#172d27;border-color:#2c4740;border-top-color:#6fd0c3}
:root[data-theme=dark] .start-next .steps li{border-left-color:#f4b579}
:root[data-theme=dark] .start-next .steps strong{color:#f3f6f2}
:root[data-theme=dark] .kit-card .mini-book{background:#0a1613;border-left-color:#6fd0c3;box-shadow:5px 5px 0 #0a1613}
/* Hero map: the stage and its start screen are light paper, so they keep the light palette. */
:root[data-theme=dark] .hero-stage,:root[data-theme=dark] .hero-cover{--ink:#173931;--teal:#006e73;--paper:#f7f6ef;--card:#fffdf8;--white:#fffdf8;--line:#cbd8cb;--muted:#4a5d56;--green:#28634e;color:#173931}
:root[data-theme=dark] .hero-cover-q{color:#173931}
:root[data-theme=dark] .hero-cover-sub{color:#2d4a41}
:root[data-theme=dark] .hero-cover-play{background-color:#086d71;color:#fff}
:root[data-theme=dark] .hero-cover-skip,:root[data-theme=dark] .hero-cover a{color:#006e73}
