:root {
  color-scheme: light dark;
  --background: #faf9f6;
  --surface: #fff;
  --text: #252b33;
  --muted: #59616c;
  --line: #d9dde2;
  --link: #2358a6;
  --selected: #edf2f8;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.65 system-ui, sans-serif; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.skip-link { position: fixed; top: -80px; left: 16px; padding: 12px; background: var(--surface); z-index: 5; }
.skip-link:focus { top: 8px; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand span { color: var(--muted); font-weight: 400; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-header a { display: inline-flex; align-items: center; min-height: 44px; }
.layout { display: grid; grid-template-columns: 250px minmax(0, 800px) 210px; gap: 32px; max-width: 1400px; margin: auto; padding: 32px 24px; }
main { min-width: 0; }
.sidebar nav, .on-page nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar a, .on-page a { padding: 8px 12px; overflow-wrap: anywhere; text-decoration: none; }
.sidebar a { min-height: 44px; }
.sidebar a:hover, .sidebar a[aria-current], .on-page a:hover { background: var(--selected); border-radius: 6px; }
summary { min-height: 44px; cursor: pointer; font-weight: 600; }
.on-page { font-size: 14px; }
.on-page strong { padding: 8px 12px; }
#search-form label { display: block; margin-bottom: 8px; font-weight: 600; }
.search-field { display: flex; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.search-field:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.search-field input { min-width: 0; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; padding: 10px 12px; outline: none; }
.search-field button { flex-shrink: 0; margin: 4px; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 4px; background: var(--selected); color: var(--link); font: inherit; font-weight: 600; cursor: pointer; }
.search-field button:focus-visible { outline-offset: -2px; }
#search-results { margin: 24px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
#search-results div + div { border-top: 1px solid var(--line); padding-top: 16px; }
#search-results a { display: inline-block; font-weight: 600; }
#search-results p { margin: 8px 0 16px; }
.page-source { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 24px 0; color: var(--muted); font-size: 14px; }
article { overflow-wrap: anywhere; }
article h1 { font-size: clamp(26px, 3vw, 36px); line-height: 1.25; }
article h2 { font-size: 24px; margin-top: 36px; }
article h3 { font-size: 20px; margin-top: 28px; }
article [id] { scroll-margin-top: 24px; }
article img { max-width: 100%; height: auto; }
article pre { overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); line-height: 1.5; }
article code { font-size: 0.9em; }
article :not(pre) > code { background: var(--selected); padding: 2px 4px; border-radius: 3px; }
article table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
article th, article td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
article th { background: var(--selected); }
article blockquote { margin-left: 0; border-left: 3px solid var(--line); padding-left: 20px; color: var(--muted); }
@media (max-width: 1150px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .on-page { display: none; }
}
@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; padding: 12px 16px; gap: 0; }
  .layout { display: block; padding: 20px 16px; }
  .sidebar { margin-bottom: 24px; }
  .sidebar nav { max-height: 220px; overflow: auto; border-bottom: 1px solid var(--line); }
}
@media (prefers-color-scheme: dark) {
  :root { --background: #171a1e; --surface: #20242b; --text: #e9ecf0; --muted: #b0b8c4; --line: #414853; --link: #9cc4ff; --selected: #2a3545; }
}
