:root {
  --bg: #f6fafc;
  --paper: #fff;
  --ink: #172f48;
  --accent: #126c64;
  --line: #cbdce4;
  --wash: #e2f0ef;
  --body: 16px/1.55 "Avenir Next", Arial, sans-serif;
}

:root[data-palette="classic"] {
  --bg: #faf8f3;
  --paper: #fffdf9;
  --ink: #282921;
  --accent: #775438;
  --line: #d9d2c6;
  --wash: #ece6db;
}

:root[data-mode="dark"] {
  color-scheme: dark;
  --bg: #101d28;
  --paper: #182934;
  --ink: #edf6fa;
  --accent: #176c63;
  --line: #38525f;
  --wash: #243e49;
  --accent-text: #9ad8cc;
}

:root[data-palette="classic"][data-mode="dark"] {
  --bg: #171817;
  --paper: #242421;
  --ink: #f2eee6;
  --accent: #815c40;
  --line: #514d47;
  --wash: #34312c;
  --accent-text: #e0bb98;
}

.theme-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.theme-controls label { display: flex; align-items: center; gap: 6px; }

.theme-controls select,
.theme-controls button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.theme-controls button { cursor: pointer; }
.theme-controls :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (max-width: 600px) {
  .header { flex-wrap: wrap; padding-block: 10px; }
}
