/* Same Space geometry, two neutral palettes. Artwork keeps its own colors. */
.space-theme-control{position:fixed;left:76px;bottom:max(20px,env(safe-area-inset-bottom));z-index:10900;display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border:1px solid var(--space-ui-line);border-radius:12px;background:var(--space-ui-inset);color:var(--space-ui-text);font:400 12px/1.3 Inter,Arial,sans-serif;letter-spacing:-.015em;white-space:nowrap;cursor:pointer!important;touch-action:manipulation}
.space-theme-control:hover{border-color:#ffffff40}.space-theme-control:focus-visible{outline:2px solid #c0d1fa;outline-offset:4px}
.space-theme-track{position:relative;display:block;width:40px;height:24px;flex-shrink:0;border-radius:999px;background:#292929;box-shadow:inset 0 0 0 1px #ffffff09;transition:background-color .18s ease}
.space-theme-track>span{position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#777;transition:transform .2s cubic-bezier(.22,1,.36,1),background-color .18s ease}
.space-theme-control[aria-checked=true] .space-theme-track{background:#1b1b1b}.space-theme-control[aria-checked=true] .space-theme-track>span{background:#fff;transform:translateX(16px)}
body.is-space-page:is(.is-space-focus,.is-content-panel-open,.is-design-viewer-open,.deu-chat-open) .space-theme-control{visibility:hidden}
@media(max-width:900px){.space-theme-control{left:max(20px,env(safe-area-inset-left));bottom:164px}}
@media(max-width:900px){body:has(.space-follow-bar:not([hidden])) .space-theme-control{bottom:228px}}
@media(prefers-reduced-motion:reduce){.space-theme-track,.space-theme-track>span{transition:none}}

html[data-space-theme=dark]{color-scheme:dark}
html[data-space-theme=light]{color-scheme:light;background:#efefed}
html[data-space-theme=light] body.is-space-page{
  background:#efefed;color:#171717;
  --space-ui-surface:#fafafa;--space-ui-inset:#f4f4f2;--space-ui-input:#e8e8e6;
  --space-ui-text:#171717;--space-ui-muted:#646461;--space-ui-line:#00000026;--space-ui-line-soft:#00000014;
  --node-canvas-bg:#efefed;--node-bg:#fafafa;--node-bg-hover:#fff;--node-border:#00000026;--node-border-hover:#00000040;
  --node-title:#171717;--node-copy:#60605d;--node-meta:#666663;--node-port:#888885;--node-port-active:#171717;
  --node-inner-light:inset 0 1px 0 #fff;--node-shadow:0 8px 22px -12px #00000024;--node-shadow-hover:0 10px 26px -12px #00000030;
  --line-color:#999996;--line-color-hover:#454542;--line-flare:#454542;
  --grid-dot:rgba(0,0,0,.24);--grid-line:rgba(0,0,0,.075);--grid-tile:rgba(0,0,0,.055);
}
html[data-space-theme=light] body.is-space-page :is(.site-shell,.hero.hero--node-canvas){background:#efefed}
html[data-space-theme=light] body.is-space-page .hero.hero--node-canvas::before,
html[data-space-theme=light] body.is-space-page .hero.hero--node-canvas::after{opacity:0}
html[data-space-theme=light] body.is-space-page :is(.hero__veil,.hero__vignette){background:none}
html[data-space-theme=light] body.is-space-page :is(.hero__video,.hero__grain,.ascii-trail,.cursor-distortion){display:none}
html[data-space-theme=light] body.is-space-page [data-card-nav] feFlood{flood-color:#171717}
html[data-space-theme=light] body.is-space-page [data-card-nav]:is(.is-marquee-preview,.is-marquee-selected) .brand-mark{filter:drop-shadow(0 0 3px #17171744)}
html[data-space-theme=light] body.is-space-page .space-home-menu{background:#fafafa;color:#171717;border-color:#00000026;box-shadow:0 6px 22px #0000000a}
html[data-space-theme=light] body.is-space-page .space-home-menu:hover{background:#fff;border-color:#00000050}

/* FORM surfaces are individual rounded blocks, including selected ones. */
html[data-space-theme=light] .space-forms-layer{color:#171717}
html[data-space-theme=light] :is(.form-main-head,.space-form-block,.form-results){background:#fafafa;border-color:#00000026}
html[data-space-theme=light] .space-form-block.is-form-dragging{box-shadow:0 16px 40px #00000018}
html[data-space-theme=light] .space-form-block.is-form-selected{border-color:#00000060}
html[data-space-theme=light] .space-forms-layer :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea,select){background:#f0f0ee;border-color:#00000026;color:#171717}
html[data-space-theme=light] .space-forms-layer input:focus,
html[data-space-theme=light] .space-forms-layer textarea:focus,
html[data-space-theme=light] .space-forms-layer select:focus{border-color:#3d4f7a!important}
html[data-space-theme=light] .space-forms-layer :is(.form-main-title,.form-question-title,[data-form-description]){background:transparent!important;border:0!important}
html[data-space-theme=light] .space-forms-layer [data-form-description]{color:#646461}
html[data-space-theme=light] .space-forms-layer .form-question-footer>select{background:transparent!important;border:0!important;color:#646461}
html[data-space-theme=light] .space-forms-layer select option{background:#fafafa;color:#171717}
html[data-space-theme=light] .space-forms-layer :is(input,textarea):disabled{opacity:.65}
html[data-space-theme=light] .space-forms-layer :is(button,summary,input):focus-visible{outline-color:#3d4f7a}
html[data-space-theme=light] .space-forms-layer :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:#303030}
html[data-space-theme=light] .space-forms-layer button:hover{background:#00000007}
html[data-space-theme=light] :is(.form-mode-actions button,.form-main-options,.form-main-head p,.form-question-footer>select,.form-scale>div,.form-origin,.form-results p,.form-hint,.form-question-number,.form-results-toggle){color:#646461}
html[data-space-theme=light] .form-mode-actions [aria-pressed=true]{background:#00000009;color:#171717}
html[data-space-theme=light] :is(.form-question-footer,.form-origin,.form-results [data-response-detail]>div){border-color:#00000012}
html[data-space-theme=light] :is(.form-settings,.form-answer-option,.form-file){background:#f4f4f2;color:#333;border-color:#00000026}
html[data-space-theme=light] .form-settings{box-shadow:0 12px 30px #00000014}
html[data-space-theme=light] .form-answer-option:has(input:checked){background:#e6e9ef;border-color:#3d4f7a}
html[data-space-theme=light] .space-forms-layer :is(a,.form-rating button,.form-required){color:#3d4f7a}
html[data-space-theme=light] .space-forms-layer .form-add-question{background:#fafafa;border-color:#00000026}
html[data-space-theme=light] .space-forms-layer .form-submit{background:#171717;color:#fafafa}
html[data-space-theme=light] .space-forms-layer .form-submit:hover{background:#333}
html[data-space-theme=light] .form-error{color:#983a3a}
html[data-space-theme=light] .form-scale output{color:#171717}
html[data-space-theme=light] :is(.form-main-footer [data-save-status],.form-linked-images span){color:#646461}
html[data-space-theme=light] .form-correct{color:#52634d}

/* Canvas controls, dock and tool menus. */
html[data-space-theme=light] .space-theme-control:hover{border-color:#00000050}
html[data-space-theme=light] .space-theme-control:focus-visible{outline-color:#3d4f7a}
html[data-space-theme=light] :is(.space-shortcuts-button,.space-zoom button,.space-tool-panel,.space-connection){color:#303030}
html[data-space-theme=light] .space-zoom button:hover{background:#00000007}
html[data-space-theme=light] .space-dock{background:#fafafaf5;border-color:#00000026;box-shadow:inset 0 1px 0 #fff,0 10px 30px #00000010}
html[data-space-theme=light] .space-dock-tile{background:linear-gradient(#fff,#eeeeec);border-color:#00000020;color:#454542;box-shadow:inset 0 1px 0 #fff,0 2px 5px #0000000a}
html[data-space-theme=light] .space-dock-tile:hover{color:#111;border-color:#00000050}
html[data-space-theme=light] .space-dock-tile.is-active{background:linear-gradient(#e5e5e2,#d9d9d6);border-color:#00000050;color:#111}
html[data-space-theme=light] .space-dock-tile.is-active::after{background:#171717}
html[data-space-theme=light] .space-dock-label{background:#fafafa;border-color:#00000026;color:#171717;box-shadow:0 4px 14px #00000012}
html[data-space-theme=light] .space-dock-label kbd{color:#666663}
html[data-space-theme=light] .space-tool-panel{box-shadow:0 12px 40px #00000018;scrollbar-color:#0004 transparent}
html[data-space-theme=light] :is(.space-tool-panel p,.space-tool-range,.space-tool-color,.space-tool-color output){color:#646461}
html[data-space-theme=light] .space-tool-range output{color:#171717}
html[data-space-theme=light] .space-tool-range input{accent-color:#303030}
html[data-space-theme=light] body.is-space-page .space-tool-panel button:not(.modal-close){background:#e8e8e6;color:#171717;border-color:#00000026}
html[data-space-theme=light] body.is-space-page .space-tool-panel button:not(.modal-close):hover{background:#dededb}
html[data-space-theme=light] .space-shape-modes button[aria-pressed=true]{background:#d9d9d6!important;border-color:#171717!important}
html[data-space-theme=light] .space-gradient-presets button{border-color:#00000040!important}
html[data-space-theme=light] .space-tool-actions{border-color:#00000020}
html[data-space-theme=light] .space-brush-cursor{border-color:#333;box-shadow:0 0 0 1px #fff8}
html[data-space-theme=light] body.is-space-page .space-tools button:not(.space-peer){background:#171717;color:#fafafa}
html[data-space-theme=light] body.is-space-page .space-tools button.space-peer{border-color:#efefed}
html[data-space-theme=light] body.is-space-page .space-tools button.space-peer:hover{box-shadow:0 0 0 1px #17171766}

/* Utility windows, profiles, notices and contextual actions. */
html[data-space-theme=light] body.is-space-page :is(.space-window,.space-profile-menu,.space-swipe-toast,.hero-custom-node-context){box-shadow:0 16px 56px #00000018}
html[data-space-theme=light] body.is-space-page .space-window::backdrop{background:#19191930;backdrop-filter:blur(8px)}
html[data-space-theme=light] body.is-space-page :is(.space-window .space-window__close,.space-profile-close){background:#ededeb;color:#555}
html[data-space-theme=light] body.is-space-page :is(.space-window .space-window__close,.space-profile-close):hover{background:#dededb;color:#111;border-color:#00000030}
html[data-space-theme=light] body.is-space-page :is(.space-window label,.space-profile-menu label,.space-share-dialog .space-join summary){color:#555552}
html[data-space-theme=light] body.is-space-page :is(.space-window input,.space-profile-menu input){border-bottom-color:#00000040}
html[data-space-theme=light] body.is-space-page .space-window input:focus-visible{background:#e1e1de;border-bottom-color:#171717}
html[data-space-theme=light] body.is-space-page :is(.space-window button:not(.space-window__close),.space-profile-menu button:not(.space-profile-close),.space-follow-bar button){background:#e8e8e6;border-color:#00000026;color:#171717}
html[data-space-theme=light] body.is-space-page :is(.space-window button:not(.space-window__close),.space-profile-menu button:not(.space-profile-close),.space-follow-bar button):hover{background:#dededb;border-color:#00000040}
html[data-space-theme=light] body.is-space-page :is(.space-window button.is-primary,.space-profile-menu button.is-primary){background:#171717;color:#fafafa;border-color:#171717}
html[data-space-theme=light] body.is-space-page :is(.space-window button.is-secondary,.space-profile-menu button.space-profile-text-button){background:transparent}
html[data-space-theme=light] body.is-space-page :is(.space-window button,.space-profile-menu button,.space-follow-bar button):focus-visible{outline-color:#3d4f7a}
html[data-space-theme=light] body.is-space-page .space-profile-people button:hover{background:#00000008!important}
html[data-space-theme=light] :is(.space-shortcut-row kbd,.space-help-about summary){color:#646461}
html[data-space-theme=light] :is(.space-help-about h3,.space-help-about a,.space-swipe-toast__text strong){color:#171717}
html[data-space-theme=light] body.is-space-page .space-shortcut-row kbd{color:#646461}
html[data-space-theme=light] .space-follow-bar{background:#fafafa}
html[data-space-theme=light] body.is-space-page .space-swipe-toast__icon{color:#171717}
html[data-space-theme=light] :is(.space-swipe-toast__action,.space-swipe-toast__close){background:#e8e8e6;color:#171717}
html[data-space-theme=light] .space-swipe-toast__fuse{background:#60605d}
html[data-space-theme=light] .space-peer-cursor span{background:#fafafa}
html[data-space-theme=light] :is(.hero-custom-node-context__item,.hero-custom-node-context__heading,.hero-custom-node__media-footer,.hero-custom-node__url,.hero-custom-node__format-button,.hero-custom-node__editor,.hero-custom-node__domain,.hero-custom-node__open-link,.hero-custom-node__media-open,.hero-custom-node__edit-url){color:#454542}
html[data-space-theme=light] .hero-custom-node-context__item:hover{background:#00000008;color:#111}
html[data-space-theme=light] .hero-custom-node-context__item[aria-disabled=true]{color:#999}
html[data-space-theme=light] .hero-custom-node-context__separator{background:#00000012}
html[data-space-theme=light] :is(.hero-custom-node__format-toolbar,.hero-custom-node__format-popover){background:#fafafa;color:#171717;border-color:#00000026;box-shadow:0 12px 30px #00000014}
html[data-space-theme=light] .hero-custom-node__editor{caret-color:#171717;scrollbar-color:#0004 transparent}
html[data-space-theme=light] .hero-custom-node__editor a{color:#3d4f7a}
html[data-space-theme=light] .hero-custom-node__editor::selection{background:#c0d1fa;color:#171717}
html[data-space-theme=light] :is(.hero-custom-node__counter,.hero-custom-node__editor:empty::before){color:#777}
html[data-space-theme=light] :is(.hero-custom-node__open-link,.hero-custom-node__media-open,.hero-custom-node__edit-url):hover{color:#171717}
html[data-space-theme=light] .hero-custom-node__format-button:hover{background:#00000008;color:#111}
html[data-space-theme=light] :is(.space-sketch-title,.space-sketch-credit){color:#454542}
html[data-space-theme=light] .hero-custom-node-line{stroke:var(--line-color)}
html[data-space-theme=light] .workspace-marquee-selection{border-color:#17171780;background:#17171705;box-shadow:none;backdrop-filter:none}
html[data-space-theme=light] body.is-space-page :is([data-custom-node],[data-hero-node]):is(.is-marquee-preview,.is-marquee-selected){outline-color:#171717!important;box-shadow:var(--node-inner-light),var(--node-shadow)}
html[data-space-theme=light] body.is-space-page :is([data-space-home-menu],[data-space-question]):is(.is-marquee-preview,.is-marquee-selected),
html[data-space-theme=light] body.is-space-page [data-space-form]:is(.is-marquee-preview,.is-marquee-selected) > :is(.form-main-head,.form-results),
html[data-space-theme=light] body.is-space-page [data-space-form]:is(.is-marquee-preview,.is-marquee-selected) > .form-question-stack > .space-form-block{border-color:#171717}
