/* Light/dark theme. Pages use these variables; dark values apply via [data-theme="dark"]. */
:root {
  --accent: #2f5a43;
  --accent-bg: #2f5a43;
  --ink: #16201a;
  --muted: #525d56;
  --faint: #6a736c;
  --paper: #f5f4ef;
  --glass: rgba(245, 244, 239, 0.82);
  --soft: #efeee7;
  --surface: #ffffff;
  --line: #e2e0d6;
  --edge: #d8d6cc;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --accent: #7ccba0;
  --accent-bg: #3b7457;
  --ink: #ecece4;
  --muted: #a6afa8;
  --faint: #8c968e;
  --paper: #121714;
  --glass: rgba(18, 23, 20, 0.82);
  --soft: #1b231e;
  --surface: #1b221e;
  --line: #2c352f;
  --edge: #3a453d;
  color-scheme: dark;
}
:root[data-theme="dark"] .logo-theme { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="dark"] .slot { background: var(--soft); }

.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--edge); border-radius: 8px; background: transparent; color: var(--muted);
  cursor: pointer; transition: border-color .18s, color .18s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--ink); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
