:root {
  color-scheme: dark;
  --bg: #111816;
  --topbar-bg: #151e1b;
  --surface: #18221f;
  --surface-accent: #1c2b26;
  --text: #dce7e1;
  --muted: #9aaba2;
  --line: #34423c;
  --control-border: #5a7066;
  --accent: #84cbb7;
  --button-bg: #256c5e;
  --button-text: #dce7e1;
  --warn: #d7b978;
  --warn-surface: #2b2518;
  --danger: #c87367;
  --danger-button: #793b33;
  --overlay: rgba(0, 0, 0, 0.58);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e9efec;
  --topbar-bg: #f0f4f2;
  --surface: #f5f7f6;
  --surface-accent: #dceae5;
  --text: #17211d;
  --muted: #5d6b64;
  --line: #c3cdc8;
  --control-border: #74847b;
  --accent: #1d6a5a;
  --button-bg: #256c5e;
  --button-text: #f1f6f3;
  --warn: #73551d;
  --warn-surface: #eee3c9;
  --danger: #8e3e35;
  --danger-button: #7d332c;
  --overlay: rgba(17, 24, 39, 0.45);
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.theme-toggle {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--surface-accent);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
