:root {
  color-scheme: light dark;
  --bg: #f5f7fa;
  --panel: #fff;
  --text: #16202a;
  --muted: #607080;
  --line: #d9e1e8;
  --brand: #176b52;
  --soft: #dff3eb;
  --code: #17232b;
  --code-text: #e7f2ef;
  --inline: #edf2f5;
  --shadow-panel: 0 2px 5px rgb(15 32 42 / 10%);
  --shadow-code: inset 0 0 10px rgb(0 0 0 / 22%);
  --site-nav-height: 64px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1519;
    --panel: #172126;
    --text: #e7eff2;
    --muted: #9eacb3;
    --line: #334149;
    --brand: #70d6ad;
    --soft: #173c31;
    --code: #091014;
    --inline: #253138;
    --shadow-panel: 0 2px 5px rgb(0 0 0 / 42%);
    --shadow-code: inset 0 0 10px rgb(0 0 0 / 65%);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.65; }
a { color: var(--brand); }
code { padding: 2px 5px; border-radius: 5px; background: var(--inline); font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--code); box-shadow: var(--shadow-code); color: var(--code-text); font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
pre code { padding: 0; background: transparent; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 12px; border-radius: 6px; background: var(--brand); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: var(--site-nav-height);
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(10px);
}

.site-wordmark { color: var(--text); font-weight: 760; text-decoration: none; white-space: nowrap; }
.site-context { display: flex; align-items: center; gap: 7px; margin-left: 12px; }
.site-version, .site-upcoming { padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; text-decoration: none; }
.site-upcoming { border-color: var(--brand); color: var(--brand); font-weight: 700; }
.site-nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; font-size: 14px; }
.site-nav-links a { padding: 20px 0 18px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; }
.site-nav-links a:hover, .site-nav-links a[aria-current='page'] { border-bottom-color: var(--brand); color: var(--text); }
.site-menu-button { display: none; margin-left: auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); font: inherit; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 70%, transparent); outline-offset: 3px; }
.tok-keyword { color: #ff9dca; }
.tok-string { color: #a8e6a3; }
.tok-comment { color: #84959e; font-style: italic; }
.tok-number, .tok-bracket-0 { color: #ffd580; }
.tok-property, .tok-bracket-2 { color: #7dddf5; }
.tok-bracket-1 { color: #d9a7ff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 700px) {
  .site-nav { flex-wrap: wrap; padding: 12px 16px; }
  .site-context { margin-right: 8px; }
  .site-upcoming { display: none; }
  .site-menu-button { display: block; }
  .site-nav-links { display: none; flex: 1 0 100%; align-items: stretch; gap: 0; padding-top: 10px; }
  .site-nav[data-menu-open] .site-nav-links { display: grid; }
  .site-nav-links a { padding: 10px 4px; border-bottom-width: 1px; }
}
