/* Explicit component contracts override historical styles only in dark mode. */
html[data-theme=dark] .inbox.v2.inbox-clean :is(.chat,.contactlist,.contact-inspector,.chatheader,.composer-area,.composer,.inbox-search){background:var(--ds-surface);color:var(--ds-text);border-color:var(--ds-border)}
html[data-theme=dark] .inbox.v2.inbox-clean .messages{background:var(--ds-canvas);color:var(--ds-text)}
html[data-theme=dark] .inbox.v2.inbox-clean .bubble{background:var(--surface-elevated);color:var(--ds-text);border:1px solid var(--ds-border)}
html[data-theme=dark] .inbox.v2.inbox-clean .bubble.out{background:var(--ds-brand-soft);color:var(--ds-text);border-color:var(--ds-border-strong)}
html[data-theme=dark] .inbox.v2.inbox-clean :is(.bubble small,.chatheader small,.contactitem small,.charcount,.detailrow){color:var(--ds-secondary)}
html[data-theme=dark] .inbox.v2.inbox-clean :is(.contactitem strong,.chatheader strong,.contact-inspector h3,.detailrow strong){color:var(--ds-text)}
html[data-theme=dark] .inbox.v2.inbox-clean .contactitem .avatar{background:var(--surface-elevated);color:var(--ds-secondary)}
html[data-theme=dark] .inbox.v2.inbox-clean .contactitem.selected{background:var(--ds-brand-soft)}
html[data-theme=dark] .inbox.v2.inbox-clean .contactitem:hover{background:var(--ds-hover)}
html[data-theme=dark] .inbox.v2.inbox-clean .inbox-disclosure>summary{background:var(--ds-surface);color:var(--ds-secondary);border-color:var(--ds-border)}
html[data-theme=dark] .inbox.v2.inbox-clean .inbox-disclosure-body{color:var(--ds-secondary)}
html[data-theme=dark] .inbox.v2.inbox-clean .inbox-primary-actions>.inbox-disclosure[open]>.inbox-disclosure-body{background:var(--surface-elevated);border-color:var(--ds-border);box-shadow:var(--ds-overlay-shadow)}
html[data-theme=dark] .inbox.v2.inbox-clean :is(input,select,textarea){background:var(--ds-canvas);color:var(--ds-text);border-color:#5c6575}
html[data-theme=dark] .inbox.v2.inbox-clean :is(input,textarea)::placeholder{color:var(--ds-muted);opacity:1}
html[data-theme=dark] .builder-clean :is(.builderbar,.builder-inspector,.blockpalette,.builder-paneltools,.zoomtools,.edge-pop){background:var(--ds-surface);color:var(--ds-text);border-color:var(--ds-border)}
html[data-theme=dark] .builder-clean :is(.builder-inspector h2,.builder-inspector h3,.bp-head,.bp-txt strong,.node-handle,.nodebody){color:var(--ds-text)}
html[data-theme=dark] .builder-clean :is(.builder-inspector p,.builder-inspector small,.builder-inspector label,.nodefooter,.bp-cat>small,.bp-txt small,.savestate){color:var(--ds-secondary)}
html[data-theme=dark] .builder-clean :is(input,textarea,select,.bp-search){background:var(--ds-canvas);color:var(--ds-text);border-color:#5c6575}
html[data-theme=dark] .builder-clean :is(input,textarea)::placeholder{color:var(--ds-muted);opacity:1}
html[data-theme=dark] .builder-clean :is(.builder-button,.sequence-panel,.sequence-item,.wait-panel,.actionitem,.trigger-row,.phone,.phonehead,.previewmessages,.previewnote,.uploadzone){background:var(--surface-elevated);color:var(--ds-secondary);border-color:var(--ds-border)}
html[data-theme=dark] .builder-clean :is(.hint,.wait-panel.on){background:var(--ds-brand-soft);color:var(--ds-secondary);border-color:var(--ds-border-strong)}
html[data-theme=dark] .builder-clean :is(.previewbubble,.previewbubble.out){background:var(--ds-surface);color:var(--ds-text);border-color:var(--ds-border)}
html[data-theme=dark] .builder-clean :is(.previewbutton,.trigger-row.active,.bp-item:hover){background:var(--ds-brand-soft);color:var(--ds-brand);border-color:var(--ds-border-strong)}
html[data-theme=dark] .builder-clean .edge-label{fill:var(--ds-secondary)!important;stroke:var(--ds-canvas)!important}
html[data-theme=dark] .builder-clean .minimap{background:var(--surface-elevated);border-color:var(--ds-border)}
html[data-theme=dark] .builder-clean :is(.port,.port:hover){background:var(--ds-surface);border-color:var(--ds-brand)}
html[data-theme=dark] .builder-clean :is(.errorbox,.validation-error){background:var(--ds-danger-soft);color:var(--ds-danger);border-color:var(--ds-border-strong)}
html[data-theme=dark] :is(.p2-menu,.p2-popbox,.modal,.oc) :is(p,small,label){color:var(--ds-secondary)}
html[data-theme=dark] :is(.p2-menu,.p2-popbox,.modal,.oc) :is(h2,h3,strong){color:var(--ds-text)}
html[data-theme=dark] :is(.p2-menu,.p2-popbox,.modal,.oc) :is(input,textarea,select){background:var(--ds-canvas);color:var(--ds-text);border-color:#5c6575}
