:root {
  color-scheme: light;
  --sidebar: #fff;
  --line-strong: #d4d7db;
  --nav-hover: #f1f5f6;
  --nav-current: #e7eff0;
  --body-copy: #3e4954;
  --on-accent: #fff;
  --danger: #994e3c;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #10151c;
  --sidebar: #0c1117;
  --surface: #171d26;
  --ink: #e8ebf2;
  --muted: #a0a9b6;
  --emerald: #74bfd1;
  --line: #2b3541;
  --line-strong: #465160;
  --wash: #1c2933;
  --nav-hover: #17232d;
  --nav-current: #203641;
  --body-copy: #c8ced8;
  --on-accent: #071116;
  --danger: #f0a18e;
}
.site-header { background: var(--sidebar); scrollbar-color: var(--line-strong) transparent; }
.site-header::-webkit-scrollbar-thumb { background: var(--line-strong); }
.site-header .primary-nav a:hover { background: var(--nav-hover); }
.site-header .primary-nav a[aria-current] { background: var(--nav-current); }
.sidebar-bottom { margin-top: auto; flex-shrink: 0; }
.sidebar-bottom .sidebar-note { margin: 0 12px 8px; padding-top: 8px; line-height: 1.5; }
.theme-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; min-width: 0; padding: 3px; margin: 0; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); }
.theme-option { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.theme-option:hover { background: var(--nav-hover); color: var(--ink); }
.theme-option:has(input:checked) { background: var(--emerald); color: var(--on-accent); }
.theme-option:has(input:focus-visible) { outline: 2px solid var(--emerald); outline-offset: 3px; }
.theme-option svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.search-link { border-color: var(--line-strong); }
.day-entries::before { background: var(--line-strong); }
.day-entries .entry::before { box-shadow: 0 0 0 1px var(--muted); }
.entry-body { color: var(--body-copy); }
.entry-body blockquote { border-color: var(--emerald); color: var(--muted); }
.search-result p, .availability-note p, .access-card p, .api-documentation p, .api-documentation li { color: var(--muted); }
.search-result mark { background: var(--wash); color: var(--ink); }
.authoring-area input[type=text], .authoring-area input[type=password], .authoring-area textarea, .subscription-address { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.editing-controls button { border-color: var(--line-strong); }
.authoring-buttons button[type=submit] { color: var(--on-accent); }
.availability-note { border-color: var(--emerald); }
.interaction-status.is-error, .authoring-status.is-error, .image-error { color: var(--danger); }
.toast { color: var(--surface); }
.waline-host {
  --waline-color: var(--ink);
  --waline-theme-color: var(--emerald);
  --waline-active-color: var(--emerald);
  --waline-white: var(--on-accent);
  --waline-bg-color: var(--surface);
  --waline-bg-color-light: var(--wash);
  --waline-bg-color-hover: var(--nav-hover);
  --waline-border-color: var(--line-strong);
  --waline-dark-grey: var(--muted);
  --waline-light-grey: var(--muted);
  --waline-info-color: var(--muted);
  --waline-info-bg-color: var(--wash);
  --waline-code-bg-color: var(--wash);
  --waline-disable-bg-color: var(--wash);
  --waline-disable-color: var(--muted);
  --waline-bq-color: var(--muted);
}
@media (min-width: 900px) and (max-height: 560px) {
  .site-header { padding-top: 12px; padding-bottom: 10px; }
  .site-header .wordmark { padding-bottom: 8px; }
  .site-header .primary-nav { padding-top: 6px; }
  .nav-section-label { margin: 2px 0 0; }
  .sidebar-bottom .sidebar-note { padding-top: 6px; margin-bottom: 6px; }
}
@media (max-width: 899px) {
  .site-header { position: relative; }
  .site-header .wordmark { padding-right: 152px; }
  .site-header .wordmark-note { display: none; }
  .sidebar-bottom { margin: 0; }
  .theme-picker { position: absolute; top: 12px; right: 20px; width: 146px; }
}
