/* Appearance mode is independent of the six authored space palettes. */
:root{color-scheme:dark;--ui-page:#101521;--ui-panel:#1b2333;--ui-text:#edf2ff;--ui-muted:#c0cce0;--ui-line:#71819a;--ui-focus:#b6a6ff}
:root{--ui-danger:#ffb8c4;--ui-on-danger:#101521;--ui-success:#96e2b7;--ui-on-success:#101521}
@media(prefers-color-scheme:light){html:not([data-theme]){--ui-danger:#9f1239;--ui-on-danger:#fff;--ui-success:#166534;--ui-on-success:#fff}}
html[data-theme=light]{--ui-danger:#9f1239;--ui-on-danger:#fff;--ui-success:#166534;--ui-on-success:#fff}
@media(prefers-color-scheme:light){:root:not([data-theme]){color-scheme:light;--ui-page:#f7f8fc;--ui-panel:#fff;--ui-text:#17233c;--ui-muted:#52617a;--ui-line:#78869b;--ui-focus:#5144c3}}
html[data-theme=light]{color-scheme:light;--ui-page:#f7f8fc;--ui-panel:#fff;--ui-text:#17233c;--ui-muted:#52617a;--ui-line:#78869b;--ui-focus:#5144c3}
html[data-theme=dark][lang]{color-scheme:dark}
html[data-theme=light][lang]{color-scheme:light}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;gap:.4rem;min-width:76px;min-height:44px;padding:8px 12px;border:1px solid var(--ui-line);border-radius:999px;background:var(--ui-panel);color:var(--ui-text);font:600 .875rem/1.4 system-ui,sans-serif;cursor:pointer;white-space:nowrap}
/* Mode colours must change together; legacy background transitions break contrast. */
html[lang] body button[data-theme-toggle]{background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line);transition:transform .22s,box-shadow .22s}
@media(prefers-reduced-motion:reduce){html[lang] body button[data-theme-toggle]{transition:none}}
.theme-toggle:focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
html[lang] body :is(a,button,input,textarea,select,summary,[tabindex]):focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
.theme-toolbar{display:flex;justify-content:flex-end;flex:none;padding:12px 16px;background:var(--ui-page)}
.document-controls .theme-toggle{margin-left:auto}
html[lang] .space-topbar.has-theme-control>.theme-toggle{justify-self:end;width:auto;min-width:76px}
@media(min-width:1024px),(min-width:761px) and (pointer:fine),(min-width:761px) and (pointer:none){html[lang] .space-topbar.has-theme-control{grid-template-columns:minmax(0,1fr) auto auto auto}}
/* A visible boundary is necessary when native fields share the page surface. */
html[data-theme][lang] :is(input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=hidden]),textarea,select){border-color:var(--ui-line)}
/* ALTCHA's public custom properties also reach its shadow-root controls. */
html[lang] body altcha-widget{--altcha-color-base:var(--ui-panel);--altcha-color-base-content:var(--ui-text);--altcha-border-color:var(--ui-line);--altcha-color-neutral:var(--ui-line);--altcha-color-neutral-content:var(--ui-text);--altcha-color-primary:#5144c3;--altcha-color-primary-content:#fff;--altcha-color-error:var(--ui-danger);--altcha-color-error-content:var(--ui-on-danger);--altcha-color-success:var(--ui-success);--altcha-color-success-content:var(--ui-on-success);--altcha-checkbox-border-color:var(--ui-line);--altcha-checkbox-outline-color:var(--ui-focus);--altcha-input-background-color:var(--ui-panel);--altcha-input-color:var(--ui-text)}
/* Replace the legacy fixed cobalt canvas while preserving authored backdrops. */
html[lang] .theme-cobalt:is(.profile-page,.timeline-page):not([data-background=color],[data-background=pattern],[data-background=image]){background:var(--theme-bg);color:var(--theme-text)}
html[lang] .theme-cobalt :is(.site-nav.is-scrolled,.timeline-section,.timeline-page-main,.timeline-footer){background:var(--theme-panel);color:var(--theme-text)}
html[lang] :is(.theme-ink,.theme-cobalt) :is(.space-intro-kicker .eyebrow,.space-story-number,.space-next>.eyebrow){color:var(--theme-text)}
html[lang] .demo-space-page :is(.eyebrow,.demo-offer-number,.demo-offers strong,.demo-faq details a,.demo-notice>span){color:var(--theme-text,var(--ui-text))}
@media(max-width:600px){.theme-toggle{min-width:68px;padding:8px;font-size:.8125rem}.member-context,.owner-header-context{flex-shrink:1;min-width:0}}
@media print{.theme-toggle,.theme-toolbar{display:none!important}}

/* Palette identity is retained in either appearance mode, including Studio previews. */
@media print{html[lang][data-print-document]{color-scheme:light;background:#fff;color:#17233c}html[data-print-document] body.business-document{background:#fff;color:#17233c}}

/* The same palette aliases cover automatic, remembered and no-script modes. */
:root{--ui-palette-ink-bg:#101521;--ui-palette-ink-panel:#1b2537;--ui-palette-ink-panel-2:#28364e;--ui-palette-ink-text:#f0f4ff;--ui-palette-ink-muted:#bdcbe3;--ui-palette-ink-line:#7385a3;--ui-palette-paper-bg:#121720;--ui-palette-paper-panel:#1e2632;--ui-palette-paper-panel-2:#2b3646;--ui-palette-paper-text:#f1f4fb;--ui-palette-paper-muted:#c1cbdc;--ui-palette-paper-line:#78869b;--ui-palette-cobalt-bg:#171734;--ui-palette-cobalt-panel:#262451;--ui-palette-cobalt-panel-2:#35326a;--ui-palette-cobalt-text:#f3f1ff;--ui-palette-cobalt-muted:#cdc9f0;--ui-palette-cobalt-line:#8b86bb;--ui-palette-forest-bg:#102521;--ui-palette-forest-panel:#193932;--ui-palette-forest-panel-2:#244b42;--ui-palette-forest-text:#effbf6;--ui-palette-forest-muted:#b9d9cf;--ui-palette-forest-line:#72998c;--ui-palette-rose-bg:#2b1924;--ui-palette-rose-panel:#402735;--ui-palette-rose-panel-2:#563448;--ui-palette-rose-text:#fff2f7;--ui-palette-rose-muted:#dfbfce;--ui-palette-rose-line:#ad8396;--ui-palette-sand-bg:#261f19;--ui-palette-sand-panel:#382d24;--ui-palette-sand-panel-2:#4a3c30;--ui-palette-sand-text:#fff5e7;--ui-palette-sand-muted:#dac9b1;--ui-palette-sand-line:#a18b73;}
@media(prefers-color-scheme:light){html:not([data-theme]){--ui-palette-ink-bg:#f1f4fa;--ui-palette-ink-panel:#ffffff;--ui-palette-ink-panel-2:#e3eaf5;--ui-palette-ink-text:#17233c;--ui-palette-ink-muted:#47566e;--ui-palette-ink-line:#73829b;--ui-palette-paper-bg:#f7f8fc;--ui-palette-paper-panel:#ffffff;--ui-palette-paper-panel-2:#e9edf6;--ui-palette-paper-text:#17233c;--ui-palette-paper-muted:#52617a;--ui-palette-paper-line:#78869b;--ui-palette-cobalt-bg:#f0f1ff;--ui-palette-cobalt-panel:#fafaff;--ui-palette-cobalt-panel-2:#e0e3ff;--ui-palette-cobalt-text:#28245f;--ui-palette-cobalt-muted:#504b81;--ui-palette-cobalt-line:#7b78a5;--ui-palette-forest-bg:#e9f4f0;--ui-palette-forest-panel:#f9fffc;--ui-palette-forest-panel-2:#d9ece5;--ui-palette-forest-text:#164b43;--ui-palette-forest-muted:#406a63;--ui-palette-forest-line:#648c80;--ui-palette-rose-bg:#fff0f2;--ui-palette-rose-panel:#fffafb;--ui-palette-rose-panel-2:#f8dfe6;--ui-palette-rose-text:#652e47;--ui-palette-rose-muted:#835469;--ui-palette-rose-line:#a57889;--ui-palette-sand-bg:#f6efe5;--ui-palette-sand-panel:#fffaf3;--ui-palette-sand-panel-2:#ebe0cf;--ui-palette-sand-text:#59432e;--ui-palette-sand-muted:#6c5945;--ui-palette-sand-line:#99816a;}}
html[data-theme=light]{--ui-palette-ink-bg:#f1f4fa;--ui-palette-ink-panel:#ffffff;--ui-palette-ink-panel-2:#e3eaf5;--ui-palette-ink-text:#17233c;--ui-palette-ink-muted:#47566e;--ui-palette-ink-line:#73829b;--ui-palette-paper-bg:#f7f8fc;--ui-palette-paper-panel:#ffffff;--ui-palette-paper-panel-2:#e9edf6;--ui-palette-paper-text:#17233c;--ui-palette-paper-muted:#52617a;--ui-palette-paper-line:#78869b;--ui-palette-cobalt-bg:#f0f1ff;--ui-palette-cobalt-panel:#fafaff;--ui-palette-cobalt-panel-2:#e0e3ff;--ui-palette-cobalt-text:#28245f;--ui-palette-cobalt-muted:#504b81;--ui-palette-cobalt-line:#7b78a5;--ui-palette-forest-bg:#e9f4f0;--ui-palette-forest-panel:#f9fffc;--ui-palette-forest-panel-2:#d9ece5;--ui-palette-forest-text:#164b43;--ui-palette-forest-muted:#406a63;--ui-palette-forest-line:#648c80;--ui-palette-rose-bg:#fff0f2;--ui-palette-rose-panel:#fffafb;--ui-palette-rose-panel-2:#f8dfe6;--ui-palette-rose-text:#652e47;--ui-palette-rose-muted:#835469;--ui-palette-rose-line:#a57889;--ui-palette-sand-bg:#f6efe5;--ui-palette-sand-panel:#fffaf3;--ui-palette-sand-panel-2:#ebe0cf;--ui-palette-sand-text:#59432e;--ui-palette-sand-muted:#6c5945;--ui-palette-sand-line:#99816a;}
html[lang] :is(.theme-ink,.demo-theme-ink){--theme-bg:var(--ui-palette-ink-bg);--theme-panel:var(--ui-palette-ink-panel);--theme-panel-2:var(--ui-palette-ink-panel-2);--theme-text:var(--ui-palette-ink-text);--theme-muted:var(--ui-palette-ink-muted);--theme-line:var(--ui-palette-ink-line);--surface:var(--theme-bg);--surface-text:var(--theme-text);}
html[lang] :is(.theme-paper,.demo-theme-paper){--theme-bg:var(--ui-palette-paper-bg);--theme-panel:var(--ui-palette-paper-panel);--theme-panel-2:var(--ui-palette-paper-panel-2);--theme-text:var(--ui-palette-paper-text);--theme-muted:var(--ui-palette-paper-muted);--theme-line:var(--ui-palette-paper-line);--surface:var(--theme-bg);--surface-text:var(--theme-text);}
html[lang] :is(.theme-cobalt,.demo-theme-cobalt){--theme-bg:var(--ui-palette-cobalt-bg);--theme-panel:var(--ui-palette-cobalt-panel);--theme-panel-2:var(--ui-palette-cobalt-panel-2);--theme-text:var(--ui-palette-cobalt-text);--theme-muted:var(--ui-palette-cobalt-muted);--theme-line:var(--ui-palette-cobalt-line);--surface:var(--theme-bg);--surface-text:var(--theme-text);}
html[lang] :is(.theme-forest,.demo-theme-forest){--theme-bg:var(--ui-palette-forest-bg);--theme-panel:var(--ui-palette-forest-panel);--theme-panel-2:var(--ui-palette-forest-panel-2);--theme-text:var(--ui-palette-forest-text);--theme-muted:var(--ui-palette-forest-muted);--theme-line:var(--ui-palette-forest-line);--surface:var(--theme-bg);--surface-text:var(--theme-text);}
html[lang] :is(.theme-rose,.demo-theme-rose){--theme-bg:var(--ui-palette-rose-bg);--theme-panel:var(--ui-palette-rose-panel);--theme-panel-2:var(--ui-palette-rose-panel-2);--theme-text:var(--ui-palette-rose-text);--theme-muted:var(--ui-palette-rose-muted);--theme-line:var(--ui-palette-rose-line);--surface:var(--theme-bg);--surface-text:var(--theme-text);}
html[lang] :is(.theme-sand,.demo-theme-sand){--theme-bg:var(--ui-palette-sand-bg);--theme-panel:var(--ui-palette-sand-panel);--theme-panel-2:var(--ui-palette-sand-panel-2);--theme-text:var(--ui-palette-sand-text);--theme-muted:var(--ui-palette-sand-muted);--theme-line:var(--ui-palette-sand-line);--surface:var(--theme-bg);--surface-text:var(--theme-text);}
html[lang]:root :is(.demo-theme-ink,.demo-theme-paper,.demo-theme-cobalt,.demo-theme-forest,.demo-theme-rose,.demo-theme-sand){--demo-bg:var(--theme-bg);--demo-panel:var(--theme-panel);--demo-panel-2:var(--theme-panel-2);--demo-text:var(--theme-text);--demo-muted:var(--theme-muted);--demo-line:var(--theme-line);--demo-highlight:var(--theme-text)}
/* Photo captions need a predictable backing regardless of the page mode. */
html[lang] body.demo-space-page .demo-cover-title h1{display:table;padding:.12em .2em;border-radius:12px;background:#101521e6;color:#fff;text-shadow:none}
html[lang] body.demo-space-page .demo-cover-title .eyebrow{display:table;padding:.3em .6em;border-radius:6px;background:#101521e6;color:#fff}

/* The platform error canvas follows appearance independently of legacy ink colours. */
html[lang] body.not-found-page{background:var(--theme-bg);color:var(--theme-text)}
html[lang] body.not-found-page .eyebrow{color:var(--theme-muted)}
