/* M9 dark mode: user-menu theme switch + light/dark-only images (logos). Colors only from tokens. */
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .only-light { display: none !important; }
  :root[data-theme="system"] .only-dark { display: block !important; }
}

.menu .theme-switch { display: flex; flex-direction: column; gap: 6px; padding: 6px 12px 8px; margin: 0; }
.theme-switch__label { font: var(--text-caption); color: var(--color-text-muted); }
.theme-switch__seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border-radius: var(--radius-md); background: var(--color-gray-100); }
.menu .theme-switch__opt {
  height: 30px; padding: 0 6px; justify-content: center; gap: 4px; border-radius: var(--radius-sm);
  color: var(--color-text-secondary); font: var(--text-small); text-align: center;
}
.menu .theme-switch__opt .icon { width: 16px; height: 16px; color: currentColor; }
.menu .theme-switch__opt:hover { background: var(--color-gray-200); color: var(--color-text-primary); }
.menu .theme-switch__opt.is-active { background: var(--color-surface-card); color: var(--color-text-brand); font: var(--text-body-strong); font-size: 12px; box-shadow: var(--shadow-sm); }

/* the brochure iframe / PDF previews keep their own (light) colors; only their frames follow the theme */
:root[data-theme="dark"] iframe { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] iframe { color-scheme: light; } }
