/* Explicit themes; explanatory images retain their original colours. */
html[data-theme=light]{color-scheme:light}
html[data-theme=light] :is(.btn-secondary,.button.secondary,.sn-contribution-choice,.c-cost-choices button,.step){border-color:var(--line-strong)}
html[data-theme=light] .network{background:var(--green-wash)}
html[data-theme=dark]{color-scheme:dark;
 --paper:#101b18;--surface:#192822;--sunk:#24362f;--ink:#edf5ef;--muted:#c2d0c7;
 --line:#50685d;--line-strong:#91a99d;--green:#a6dfc3;--green-deep:#caefd9;--green-wash:#203c31;
 --amber:#ffcf94;--amber-mark:#edb76f;--amber-wash:#3c3020;--red:#ffb4a7;--red-wash:#422823;
 --blue:#b1d8ff;--blue-wash:#24364c;--focus:#c5f2db;--action:#286d50;--on-action:#ffffff;
 --shadow-pop:0 10px 28px rgb(0 0 0 / 35%);
}
.theme-control{position:relative;flex:none;inline-size:44px;min-inline-size:44px;max-inline-size:44px;margin:0;z-index:60}
.theme-control>summary{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:8px;border:1px solid var(--line-strong);border-radius:var(--r-md);background:var(--surface);color:var(--ink);cursor:pointer;list-style:none}
.theme-control>summary::before,.theme-control>summary::after,.theme-control>summary::-webkit-details-marker{display:none!important}
.theme-menu{position:absolute;inset-inline-end:0;inset-block-start:calc(100% + 8px);width:min(17rem,calc(100vw - 32px));padding:var(--sp-3);border:1px solid var(--line-strong);border-radius:var(--r-lg);background:var(--surface);color:var(--ink);box-shadow:var(--shadow-pop)}
.theme-menu fieldset{padding:0;margin:0;border:0}.theme-menu legend{font-weight:var(--fw-bold);font-size:var(--fs-base);margin-bottom:var(--sp-2)}
.theme-menu label{display:flex;align-items:center;gap:var(--sp-2);min-height:var(--control-h);font-size:var(--fs-base);font-weight:var(--fw-regular);margin:0;color:var(--ink)}
.theme-menu input[type=radio]{width:24px!important;min-width:24px!important;height:24px!important;margin:0;padding:0;accent-color:var(--green)}
.theme-menu p{font-size:var(--fs-sm);margin:var(--sp-2) 0;color:var(--muted)}
.theme-menu button{font:inherit;min-height:var(--control-h);width:100%;border:1px solid var(--line-strong);border-radius:var(--r-md);background:var(--surface);color:var(--ink);padding:var(--sp-1)}
.c-public-header>.theme-control{margin-left:var(--sp-1)}
html[data-theme=dark] body{background:var(--paper);color:var(--ink)}
html[data-theme=dark] :is(.topbar,.sidebar,.mobile-nav,.mobile-menu-panel,.login-card,.config-card,.diagnostic-card,.node,.c-access-card,.c-list-card,.c-review-profile,.stat-card,.task-card,.handoff-card,.policy-page,.p-card,.c-profile-example,.c-capability-editor,.c-evidence-card,.wm-file,.modal){background:var(--surface);color:var(--ink)}
html[data-theme=dark] :is(.panel,.work-brief,.c-profile-preview,.quote-placeholder,.c-flow-preview,.c-journey-detail,.c-scene,.c-everyday-card,.c-cost-card,.c-preview-label,.c-preview-output,.wm-acceptance-preview){background-color:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.btn-primary,.button.primary,.primary){background:var(--action);border-color:var(--line-strong);color:var(--on-action)}
html[data-theme=dark] :is(.btn-secondary,.button.secondary,.reading-controls button,.p-text-link){background:var(--surface);border-color:var(--line-strong);color:var(--ink)}
html[data-theme=dark] :is(input:not([type=radio]):not([type=checkbox]),select,textarea){background-color:var(--paper);color:var(--ink);border-color:var(--line-strong)}
html[data-theme=dark] select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23edf5ef' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .8rem center;background-size:1.1rem}
html[data-theme=dark] input.invite-code{background:var(--paper);color:var(--ink);caret-color:var(--ink)}
html[data-theme=dark] ::placeholder{color:var(--muted);opacity:1}
html[data-theme=dark] :is(.badge-neutral,.badge-green,.badge-blue,.badge-amber,.badge-red,.demo-banner,.policy-status,.information-strip,.alert-info,.alert-warning,.alert-error,.p2-operation-status,.submission-reminder){background:var(--sunk);color:var(--ink);border-color:var(--line-strong)}
html[data-theme=dark] :is(.c-check,.wm-check,.choice-row,.segmented-choice span,.c-choice,.choice-pill,.c-profile-contribution){background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
html[data-theme=dark] :is(.c-check:has(input:checked),.wm-check:has(input:checked),.segmented-choice input:checked+span,.c-profile-contribution:has(input:checked),.nav-item.active){background:var(--green-wash);color:var(--ink);border-color:var(--green)}
html[data-theme=dark] :is(.network,.c-visual-hero-art,.c-preview-route,.story-hero,.c-record-proof,.sn-start-principle,.now-block,.wm-now,.c-worker-pay,.budget-card){background:var(--green-wash);color:var(--ink)}
html[data-theme=dark] :is(.network .review,.network .bridge,.c-record-source,.c-record-limit,.p-note,.p-lead,.fine,.lead,.input-help,.panel-copy,.page-subtitle,.muted,.c-muted,.sn-art-note,.workspace-footer){color:var(--muted)}
html[data-theme=dark] :is(.c-route-node,.process-icon,.c-check-dot,.step-number){background:var(--sunk);color:var(--ink)}
html[data-theme=dark] :is(.policy-page a,.p-footer a,.c-public-footer a,.p2-public-header nav a){color:var(--green)}
html[data-theme=dark] :is(.wm-upload,.wm-check,.review-checks,.c-fieldset,.c-profile-legacy,.p3-policy-contents){background-color:var(--surface);color:var(--ink);border-color:var(--line-strong)}
html[data-theme=dark] :is(pre,.json-result){background:#0d0f12;color:#e3e7ee;border-color:var(--line-strong)}
html[data-theme=dark] :is(.toast,.toast-error){background:var(--surface);color:var(--ink);border:1px solid var(--line-strong)}
html[data-theme=dark] .brand-symbol{background:transparent}
html[data-theme=dark] :is(.skip-link,.skip,.policy-skip){background:var(--ink);color:var(--paper)}
html[data-theme=dark] :is(button,.btn,.sn-contribution-choice){border-color:var(--line-strong)}
html[data-theme=dark] :is(.c-preview-checks li,.env-note,.step,.flow-detail,.support-grid article,.tool-grid article,.tabs button,.setup details,.p-free-strip,.p-readiness,.p-seller-item,.p-seller-item.is-pending){background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
html[data-theme=dark] :is(.c-faq p,.c-preview-checks li,.p-contact-line>span,.p-ready-number,.p-seller-item dt,.p-seller-item dt>span,.p-seller-item dd,.p-seller-item.is-pending dd,.p-seller-item.is-pending dt>span){color:var(--muted)}
html[data-theme=dark] :is(.tabs button[aria-selected=true],.tabs button.active,.step.active,.p-ready-state,.p-ready-state.is-ready){background:var(--green-wash);color:var(--ink);border-color:var(--line-strong)}
html[data-theme=dark] #main :is(.fine,.env-note p,.node small,.review){color:var(--muted)}
html[data-theme=dark] :is(.btn-primary:hover,.primary:hover){background:#225f46;color:var(--on-action)}
html[data-theme=dark] .btn-secondary:hover{background:var(--green-wash);color:var(--ink)}
html[data-theme=dark] :is(.c-membership-strip strong,.c-membership-strip>p,.c-example-label,.c-cost-total>span,.c-cost-total strong,.c-cost-legend dt,.c-cost-legend dd,.c-pricing-status,.c-developer-link,.p-free-strip b){color:var(--muted)}
html[data-theme=dark] #main :is(.scope p,.scope-note,.scope-note p,.rule-note,.rule-note p){color:var(--muted)}
html[data-theme=dark] :is(.guardrail,.guardrail>summary){background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
html[data-theme=dark] .guardrail :is(p,code){color:var(--muted)}
html[data-theme=dark] .c-code{background:var(--paper);color:var(--ink);border-color:var(--line-strong)}
html[data-theme=dark] a:not(.btn):not(.button):not(.primary):not(.brand):not(.skip-link):not(.skip):not(.policy-skip){color:var(--green)}
@media(max-width:720px){.topbar-actions{gap:6px}.c-public-header{column-gap:8px}.c-public-header>.theme-control{margin-left:0}}
@media(max-width:720px){.c-public-header,.p2-public-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto 44px!important;grid-template-areas:'brand reading theme' 'links links links'!important;gap:8px}.c-public-header>.brand,.p2-public-header>.brand{grid-area:brand}.c-public-header>.reading-controls,.p2-public-header>[data-reading-toggle],.p2-public-header>.reading-controls{grid-area:reading}.c-public-header>.theme-control,.p2-public-header>.theme-control{grid-area:theme}.c-public-header>.c-header-links,.c-public-header>.c-header-nav,.p2-public-header>nav{grid-area:links;min-width:0}.theme-control{justify-self:end}.p2-public-header>.reading-controls{gap:6px;margin:0}.p2-public-header>.reading-controls>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}}
/* Keep the brand and controls on separate rows when their combined width cannot fit. */
@media(max-width:400px){.c-public-header,.p2-public-header{grid-template-columns:minmax(0,1fr) 44px!important;grid-template-areas:'brand brand' 'reading theme' 'links links'!important}.c-public-header .brand-name,.p2-public-header .brand-name{display:inline-flex!important}.c-public-header>.reading-controls,.p2-public-header>[data-reading-toggle],.p2-public-header>.reading-controls{justify-self:start}}
@media(forced-colors:active){.theme-menu,.theme-control>summary{border:1px solid CanvasText;background:Canvas;color:CanvasText}.theme-menu input{accent-color:auto}}
@media(max-width:720px){.c-public-header>.c-header-nav{display:flex!important;flex-wrap:wrap;gap:8px 16px}.c-public-header>.c-quick-login{grid-column:1/-1!important;grid-row:4!important;width:100%;margin:0}.c-public-header>.c-header-nav a{display:inline-flex;align-items:center;min-height:44px}}
/* Questions and unaccepted proposals also use the shared dark surfaces. */
html[data-theme=dark] :is(.m-facts>div,.m-answer-list>div,.m-process li,.m-option,.m-rule,.m-evidence,.m-work-spec){background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
html[data-theme=dark] :is(.m-facts,.m-answer-list) :is(dd,time){color:var(--ink)}
html[data-theme=dark] :is(.m-facts dt,.m-answer-list dt,.m-process small,.m-rule p,.m-empty p,.m-limitations,.m-evidence p){color:var(--muted)}
html[data-theme=dark] :is(.m-process li[aria-current],.m-option:has(input:checked),.m-process li>span,.m-question legend>span,.m-status){background:var(--green-wash);color:var(--ink);border-color:var(--line-strong)}
html[data-theme=dark] :is(.m-support,.m-review-note){background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
@media(max-width:520px){html[data-text-size=large] .m-key-facts{grid-template-columns:minmax(0,1fr)}}
