html { color-scheme: light; }
html.dark { color-scheme: dark; }
[data-public-theme-toggle] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: #f3f4f6;
  color: #111827;
  font: 24px/1 system-ui, sans-serif;
  cursor: pointer;
}
[data-public-theme-toggle]:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 3px; }
.dark [data-public-theme-toggle] { background: #374151; color: #f9fafb; }
.dark .team-section { background: #111827; }
.dark .team-card { background: #1f2937; }
.dark .team-title, .dark .team-card h3 { color: #f3f4f6; }
.dark .team-card h4 { color: #60a5fa; }
.dark .team-card p { color: #d1d5db; }
.dark nav img[alt="Tesla World Network"] { filter: brightness(0) invert(1); }
/* Text on intentionally inverted call-to-action panels stays readable. */
.dark section.dark\:bg-white .dark\:text-blue-200 { color: #374151; }
/* Native controls keep their own foreground and background in either theme. */
select option { background: #fff; color: #111827; }
.dark select option { background: #1f2937; color: #f3f4f6; }
.dark input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=file]),
.dark select, .dark textarea { background-color: #374151; color: #fff; border-color: #4b5563; }
.dark input::placeholder, .dark textarea::placeholder { color: #cbd5e1; }
.dark #chatWidget {
  --chat-surface: #1f2937;
  --chat-canvas: #111827;
  --chat-control: #374151;
  --chat-text: #f3f4f6;
  --chat-muted: #cbd5e1;
  --chat-border: #4b5563;
}
