:root { color-scheme: light; }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #dbe3d8;
  border-radius: 7px;
  background: #f8faf5;
  color: #3f5c4a;
  font-size: 11px;
  white-space: nowrap;
}
.theme-toggle:hover { background: #eaf0e3; }
#theme-icon { font-size: 15px; line-height: 1; }

:root[data-theme="dark"] {
  color-scheme: dark;
  color: #e0eade;
  background: #111a16;
  --green: #c2e79b;
  --muted: #a7b8a9;
  --border: #354439;
  scrollbar-color: #485d4e #17221b;
}
[data-theme="dark"] .topbar { background: #15201a; }
[data-theme="dark"] .theme-toggle { background: #202e24; border-color: #40533f; color: #d0e6bd; }
[data-theme="dark"] .theme-toggle:hover { background: #2c3e2b; }
[data-theme="dark"] .brand { color: #e1efd7; }
[data-theme="dark"] .brand-divider { color: #6b806d; }
[data-theme="dark"] .top-label,
[data-theme="dark"] .eyebrow { color: #a7c797; }
[data-theme="dark"] .subtitle,
[data-theme="dark"] .example-control,
[data-theme="dark"] .status { color: #a8b8a7; }
[data-theme="dark"] .run-button { background: #c2e79b; border-color: #c2e79b; color: #172512; box-shadow: 0 3px 0 #0003; }
[data-theme="dark"] .run-button:hover { background: #d0efa9; }
[data-theme="dark"] .play-icon { color: #26431d; }
[data-theme="dark"] .run-button kbd { border-color: #30472555; opacity: .8; }
[data-theme="dark"] .example-control select { background: #1c2b20; border-color: #40513f; color: #d6e5cc; }
[data-theme="dark"] .text-button { color: #acbfa1; }
[data-theme="dark"] .text-button:hover { color: #e3f0d6; }
[data-theme="dark"] .status.success { color: #b0d991; }
[data-theme="dark"] .status.success .status-dot { background: #a4d181; }
[data-theme="dark"] .status.error { color: #efb3a4; }
[data-theme="dark"] .status.error .status-dot { background: #e9a590; }
[data-theme="dark"] .panel { background: #19251d; box-shadow: 0 3px 12px #0002; }
[data-theme="dark"] .panel-heading { border-color: #354439; }
[data-theme="dark"] .step { background: #243126; border-color: #3b4c3a; color: #acbda3; }
[data-theme="dark"] .panel-note { color: #a0b096; }
[data-theme="dark"] .language-badge { background: #22303d; border-color: #3e5264; color: #adc8e6; }
[data-theme="dark"] .request-panel input,
[data-theme="dark"] .request-panel textarea,
[data-theme="dark"] .request-panel select { background: #121e16; border-color: #40523e; color: #e0ead8; }
[data-theme="dark"] .request-panel input::placeholder,
[data-theme="dark"] .request-panel textarea::placeholder { color: #879b80; }
[data-theme="dark"] .optional,
[data-theme="dark"] .field-hint,
[data-theme="dark"] .scope-note { color: #a3b49a; }
[data-theme="dark"] .field-hint code { color: #c0d6ae; }
[data-theme="dark"] .initial-group { border-color: #354439; }
[data-theme="dark"] .group-icon { color: #b1cf94; border-color: #40533b; }
[data-theme="dark"] .small-label { color: #a9bd9d; }
[data-theme="dark"] .fixed-badge { background: #263623; color: #b8cda6; }
[data-theme="dark"] .filebar { background: #152018; border-color: #354439; color: #b2c4a7; }
[data-theme="dark"] .file-icon { color: #9dc2ec; }
[data-theme="dark"] .filebar-right { color: #9fb494; }
[data-theme="dark"] .cm-editor { background: #152018; color: #dce8d5; }
[data-theme="dark"] .cm-gutters { background: #152018 !important; color: #829778 !important; }
[data-theme="dark"] .cm-activeLine,
[data-theme="dark"] .cm-activeLineGutter { background: #203020 !important; }
[data-theme="dark"] .cm-selectionBackground { background: #3b5236 !important; }
[data-theme="dark"] .cm-cursor { border-left-color: #d1edb8; }
[data-theme="dark"] .cm-tooltip { background: #223120; border-color: #526548; color: #dfebd4; }
[data-theme="dark"] .cm-tooltip-autocomplete > ul > li[aria-selected] { background: #425b35; color: #f1f8e9; }
[data-theme="dark"] .cm-panels { background: #1d2c1d; color: #d7e5ce; }
[data-theme="dark"] .cm-searchMatch { background: #665f2855; outline-color: #b6b36a; }
[data-theme="dark"] .cm-matchingBracket { background: #48663c88; }
[data-theme="dark"] .api-reference,
[data-theme="dark"] .api-content hr { border-color: #354439; }
[data-theme="dark"] .api-reference summary { background: #17231a; color: #b6c9a8; }
[data-theme="dark"] .api-reference summary::before,
[data-theme="dark"] .api-reference summary span,
[data-theme="dark"] .api-content code span { color: #a3b995; }
[data-theme="dark"] .api-content code { color: #d0e6bd; }
[data-theme="dark"] .api-content p { color: #a9bba0; }
[data-theme="dark"] .result-illustration span { background: #20301e; border-color: #46613a; color: #c0d8aa; }
[data-theme="dark"] .result-illustration span:last-child { background: #19251d; color: #97b083; }
[data-theme="dark"] .result-illustration i,
[data-theme="dark"] .empty-result p { color: #a6ba99; }
[data-theme="dark"] .result-message { background: #273d23; color: #c7e7ae; }
[data-theme="dark"] .result-message.error { background: #3d2924; color: #f2b7a7; }
[data-theme="dark"] .result-field-label { color: #adc49e; }
[data-theme="dark"] .change-tag { background: #31482a; color: #cee9b6; }
[data-theme="dark"] .result-value { color: #deebd5; }
[data-theme="dark"] .result-value.changed { background: #24391f; border-color: #a9d180; }
[data-theme="dark"] .result-value.empty { color: #a1b58f; }
[data-theme="dark"] .result-field.group-field,
[data-theme="dark"] .execution-details { border-color: #354439; }
[data-theme="dark"] .group-value { color: #c2e79b; }
[data-theme="dark"] .group-before { color: #a3bb91; }
[data-theme="dark"] .execution-details summary { color: #b2c99f; }
[data-theme="dark"] .metric { background: #20311d; border-color: #3c5133; }
[data-theme="dark"] .metric strong { color: #c5e5ab; }
[data-theme="dark"] .metric span,
[data-theme="dark"] .trace,
[data-theme="dark"] .module-info,
[data-theme="dark"] footer { color: #a8bd98; }
[data-theme="dark"] footer i { color: #849b74; }
@media (max-width: 680px) {
  .topbar-actions { gap: 0; }
  .topbar-actions .top-label { display: none; }
  .theme-toggle { padding: 7px 9px; font-size: 10px; }
}
