/* Complete color-theme coverage for legacy tools that predate shared tokens. */
html[data-acbs-style="lab"]:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  :where(.tool-card,.tool-card.featured,.tool-folder,.new-tools-folder,.new-tool-link,
  .motion-banner,.designer-network,.network-tools,.network-tools button,.elastic-loader,
  .ai-panel,.ai-preset,.ai-progress,.ai-device,.am-controls,.am-stage,.am-drop,
  .auth-dialog,.auth-identity,.auth-tabs,.account-stats>div,.account-avatar-form,
  .campaign-controls,.campaign-stage,.tech-card,.tech-preview-wrap,.campaign-drop,
  .campaign-file,.campaign-mode button,.preset-grid button,.tech-upload,.tech-actions,
  .convert-drop,.convert-file,.convert-result,.creative-panel,.creative-screen,
  .cvm-editor,.cvm-editor details,.cvm-entry,.cvm-preview,.fm-panel,.fm-step,.fm-glyph,
  .fm-proof,.glass-controls,.glass-stage,.glass-upload,.glass-presets button,
  .gradient-controls,.gradient-stage,.gradient-export,.gradient-tabs button,.gl-chip,
  .gl-mini,.gl-dir button,.gl-preset,.hub-intro-meta span,.learn-grid article,
  .legal-card,.legal-section,.legal-copy,.legal-fields dt,.legal-fields dd,
  .legal-placeholder,.cookie-banner,.cookie-card,.locale-trigger,.locale-dialog,
  .locale-option,.logo3d-controls,.logo3d-stage,.logo3d-upload,.logo3d-styles button,
  .mobile-tool-sheet,.mobile-tool-sheet>header,.mobile-tool-groups [data-mobile-tool],
  .package-card,.checkout-summary,.pro-panel,.pro-presets button,.pro-choice button,
  .drop-zone,.empty-preview,.result-banner div,.idea-card,.image-row,.image-result,
  .pack-panel,.pack-upload,.prod-tip,.prod-stat-grid div,.phrase-panel,.phrase-card,
  .psd-recovery .recovery-limits,.recovery-verdict,.recovery-report div,
  .quoteclip-search-panel,.quoteclip-card,.quoteclip-player,.sfx-panel,.sfx-stage,
  .sfx-wave,.sfx-result-variations button,.sfx-history-list article,
  .sfx-library-grid article,.shop-owner-panel,.shop-store-settings,.shop-owner-file,
  .shop-owner-thumbnail-file,.shop-owner-preview,.shop-owner-row,.shop-live-assets,
  .shop-live-card,.shop-product-card,.shop-dialog,.support-panel,.support-panel header,
  .support-message>div:first-child,.support-quick button,.support-form,.transfer-compose,
  .transfer-side,.transfer-drop,.upscale-settings,.upscale-upload,.upscale-preview,
  .verified-feedback-card,.wb-projectbar,.wb-controls,.wb-project-card){
  background:var(--theme-surface)!important;
  border-color:var(--theme-border)!important;
}

html[data-acbs-style="lab"]:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  :where(.ai-preset.active,.am-preset-grid button.active,.campaign-mode .active,
  .preset-grid .active,.glass-presets button.active,.gradient-tabs button.active,
  .gl-chip.active,.gl-dir button.active,.locale-option:hover,
  .locale-option[aria-pressed="true"],.logo3d-styles button.active,
  .logo3d-styles button:hover,.pro-presets button.active,.pro-choice button.active,
  .cut-scene:has(input:checked),.fabric-gallery button[aria-pressed="true"],
  .mobile-dock button[aria-current="page"]){
  background:var(--theme-surface-active)!important;
  border-color:var(--accent)!important;
  color:var(--theme-soft)!important;
}

html:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  :where(.btn.primary,.nav button.active,.segment button.active,.auth-nav-button:not(.signed-in),
  .auth-notice>div,.shop-cart-button span,.shop-category-row button[aria-pressed="true"],
  .shop-success-mark,.support-launch-icon,.support-agent>span,.support-form button,
  .cookie-actions [data-cookie-accept],.cookie-actions [data-cookie-reject],
  .new-tool-mark,.new-tools-folder .tool-folder-icon){
  background:var(--accent)!important;
  border-color:var(--accent)!important;
  color:var(--accent-ink)!important;
}

html:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  :where(.auth-avatar,.account-large-avatar,.new-tool-icon,.ai-empty-mark,
  .support-launch i,.support-agent small i,.support-typing i,.ai-track span){
  border-color:var(--accent)!important;
  color:var(--accent)!important;
}

html:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  :where(.upload,[class*="-upload"],[class*="-drop"],.drop-zone){
  border-color:var(--theme-border)!important;
}

html:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  :where(input[type="checkbox"],input[type="radio"],input[type="range"],progress){
  accent-color:var(--accent)!important;
}

html:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  :where(.world-route-line,.folder-icon path:last-child,.constellation-star path,
  .star-traveller path,.elastic-head){stroke:var(--accent)!important}
html:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  :where(.world-nodes circle,.folder-icon path:first-child,.constellation-star circle,
  .star-traveller path,.elastic-head){fill:var(--theme-soft)!important}
html:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  :where(#worldGlow stop:first-child,#starGlow stop:first-child,#elasticInk stop:nth-child(2)){
  stop-color:var(--accent)!important;
}
html:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  #elasticInk stop:first-child{stop-color:var(--theme-deep-glow)!important}
html:where([data-acbs-theme="orange"],[data-acbs-theme="white"])
  #elasticInk stop:last-child{stop-color:var(--theme-soft)!important}

html[data-acbs-theme="white"] .brand-mark{
  filter:grayscale(1) brightness(2.7) contrast(1.15)!important;
}

/* The white Lab theme is intentionally neutral: no inherited green surface tint. */
html[data-acbs-style="lab"][data-acbs-theme="white"] body,
html[data-acbs-style="lab"][data-acbs-theme="white"] .page,
html[data-acbs-style="lab"][data-acbs-theme="white"] .hub-page,
html[data-acbs-style="lab"][data-acbs-theme="white"] .shop-page,
html[data-acbs-style="lab"][data-acbs-theme="white"] .legal-page{
  background-color:var(--bg)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.site-footer,.policy-dialog,.legal-card,.legal-section,.legal-copy,
  .legal-fields dt,.legal-fields dd,.legal-table div,.legal-placeholder,
  .cookie-banner,.cookie-card,.privacy-badge,.site-dialog,.auth-dialog){
  background:var(--theme-surface)!important;
  border-color:var(--theme-border)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.site-footer,.footer-rights,.footer-legal,.policy-header,.legal-copy,
  .legal-fields,.legal-fields dt,.legal-fields dd,.legal-table,.legal-table div,
  .cookie-choice){
  border-color:var(--theme-border)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.footer-brand p,.footer-legal a,.footer-rights,.legal-back,.legal-intro,
  .legal-copy p,.legal-copy dd,.legal-fields dt,.legal-section p,.legal-section li,
  .legal-card span,.legal-table div:nth-child(odd),.cookie-banner p,
  .cookie-card p,.cookie-choice span){
  color:var(--muted)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.footer-links a,.policy-copy h2,.policy-copy h3,.policy-copy p,
  .legal-copy h2,.legal-section h2,.legal-section h3,.legal-card b,
  .legal-fields dd,.legal-table div:nth-child(even)){
  color:var(--text)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"] .footer-brand img{
  filter:grayscale(1) brightness(2.5) contrast(1.2)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"] .hub-intro{
  background-color:#0a0a0a!important;
  background-blend-mode:luminosity!important;
  border-color:var(--theme-border)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.tool-card-art img,.legacy-thumb img,.shop-product-preview img,
  .shop-live-art img){
  filter:grayscale(1) contrast(.96) brightness(.86)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.function-art,.legacy-thumb,.tool-card-art,.feature-art,
  .new-tool-icon,.tool-folder-icon){
  background-color:var(--theme-surface-strong)!important;
  border-color:var(--theme-border)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"] .function-art{
  background-image:linear-gradient(#ffffff24 1px,transparent 1px),
    linear-gradient(90deg,#ffffff24 1px,transparent 1px)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"] .tool-folder[open]>summary{
  background:color-mix(in srgb,var(--accent) 6%,transparent)!important;
  border-color:var(--theme-border)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.new-tools-folder>summary,.tool-card-art::after,.feature-art::after){
  background:color-mix(in srgb,var(--accent) 8%,transparent)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"] .shop-product-preview::after{
  background:linear-gradient(180deg,transparent 45%,rgba(0,0,0,.55)),
    radial-gradient(circle at 30% 20%,rgba(255,255,255,.16),transparent 34%)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.shop-demo b,.shop-heading small,.shop-detail-copy small,.shop-cart-head small,
  .shop-checkout>small,.shop-success>small,.shop-product-preview.bundle-starter span,
  .auth-identity small,.account-head small,.policy-kicker,.legal-kicker,
  .legal-hero small,.legal-section small){
  color:var(--accent)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.auth-nav-button,.auth-avatar,.account-large-avatar,.avatar-picker img,
  .support-launch,.site-nav-button.site-pricing){
  border-color:var(--accent)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.shop-demo,.shop-toolbar input,.shop-toolbar select,.shop-detail-copy select,
  .shop-checkout input,.shop-checkout select,.shop-category-row button,
  .shop-product-preview,.shop-dialog-close,.sfx-examples button,.sfx-settings select,
  .sfx-settings input,.sfx-provider-note,.sfx-result-variations button,
  .sfx-history-empty,.mobile-tool-search,.mobile-tool-search input){
  background:var(--theme-surface)!important;
  border-color:var(--theme-border)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.network-map,.elastic-loader,.feature-window,.sfx-stage,.sfx-wave,
  .upscale-viewport,.wb-view){
  background-color:#0d0e0d!important;
  border-color:var(--theme-border)!important;
}

html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.world-ocean,.star-ocean){fill:#090a09!important}
html[data-acbs-style="lab"][data-acbs-theme="white"] .world-land path{
  fill:#181a18!important;
  stroke:#777d77!important;
}
html[data-acbs-style="lab"][data-acbs-theme="white"]
  :where(.world-borders path,.world-latitudes path,.constellation-lines path){
  stroke:#7b817b!important;
}
