/* Shared semantic palette. Loaded before application rendering on every HTML entry point. */
:root {
  color-scheme: light;
  --ink: #1c302c;
  --muted: #5e6c63;
  --brand: #22765a;
  --brand-rgb: 34, 118, 90;
  --brand-fill: #22765a;
  --brand-hover: #195b45;
  --on-brand: #fff;
  --paper: #f7f9f6;
  --surface: #fff;
  --surface-soft: #eff4e9;
  --surface-hover: #edf2e8;
  --line: #dce5d8;
  --control-border: #7a8d7d;
  --accent-soft: #e9f2e7;
  --blue-soft: #edf1fd;
  --blue-ink: #3b5f9e;
  --amber-soft: #fbf1e5;
  --amber-ink: #805719;
  --purple-soft: #f1edfb;
  --purple-ink: #725291;
  --success-soft: #e7f4ee;
  --success-ink: #28694e;
  --warning-soft: #fff8de;
  --warning-ink: #70550c;
  --danger: #b42318;
  --canvas-background: #f7f9f4;
  --canvas-grid: #c2cfb9;
  --edge-color: #748367;
  --edge-selected: #168343;
  --selection: #2563eb;
  --selection-halo: #2563eb40;
  --focus: #2563eb;
  --focus-halo: #2563eb33;
  --shadow: #1b3d2e15;
  --shadow-raised: #1b3d2e26;
  --phone-frame: #30382e;
  --phone-background: #f6f8f1;
  --phone-screen: #eaf0dc;
  --phone-text: #3c532d;
}
:root[data-bs-theme='dark'] {
  color-scheme: dark;
  --ink: #e4ece7;
  --muted: #a9b8af;
  --brand: #7cd5ad;
  --brand-rgb: 124, 213, 173;
  --brand-fill: #22765a;
  --brand-hover: #195b45;
  --paper: #151a18;
  --surface: #202724;
  --surface-soft: #29332d;
  --surface-hover: #323e36;
  --line: #44534a;
  --control-border: #73867a;
  --accent-soft: #263c30;
  --blue-soft: #29384d;
  --blue-ink: #a6c8ff;
  --amber-soft: #403523;
  --amber-ink: #f1ca83;
  --purple-soft: #392e46;
  --purple-ink: #d4b7f3;
  --success-soft: #203d30;
  --success-ink: #94dfb7;
  --warning-soft: #3b341f;
  --warning-ink: #f5da8e;
  --danger: #ffaea6;
  --canvas-background: #181f1b;
  --canvas-grid: #435345;
  --edge-color: #9eaf94;
  --edge-selected: #6ade96;
  --selection: #8cb9ff;
  --selection-halo: #8cb9ff40;
  --focus: #8cb9ff;
  --focus-halo: #8cb9ff40;
  --shadow: #00000040;
  --shadow-raised: #00000066;
  --phone-frame: #637168;
  --phone-background: #232d26;
  --phone-screen: #2f4031;
  --phone-text: #d7eaca;
}
html,
body {
  background: var(--paper);
  color: var(--ink);
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--control-border);
  border-radius: 9px;
  padding: 7px 10px;
  background: var(--surface);
  color: var(--ink);
  font:
    600 12px/1.3 system-ui,
    sans-serif;
  cursor: pointer;
}
.theme-toggle:hover {
  background: var(--surface-hover);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.theme-moon {
  display: none;
}
[data-bs-theme='dark'] .theme-sun {
  display: none;
}
[data-bs-theme='dark'] .theme-moon {
  display: inline;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.docs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.docs-toolbar a {
  color: var(--brand);
}
@media (max-width: 600px) {
  .theme-toggle > .theme-label {
    display: none;
  }
}
