:root {
  color-scheme: light dark;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3ff;
  --text: #172033;
  --muted: #536077;
  --line: #d9e1ef;
  --accent: #3058d9;
  --accent-2: #12307a;
  --success: #0b7a51;
  --shadow: 0 14px 40px rgba(12, 27, 62, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --wrap: min(1100px, calc(100vw - 2rem));
  --code: #101826;
  --code-text: #f4f7ff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1422;
    --surface: #151d30;
    --surface-2: #1b2640;
    --text: #eef2fb;
    --muted: #b7c2d9;
    --line: #2b3756;
    --accent: #7ea2ff;
    --accent-2: #c1d0ff;
    --success: #51d0a2;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    --code: #0a1020;
    --code-text: #edf2ff;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 82%, var(--surface)));
  color: var(--text);
  line-height: 1.65;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
pre {
  background: var(--code);
  color: var(--code-text);
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
code {
  background: color-mix(in srgb, var(--surface-2) 75%, transparent);
  padding: 0.12rem 0.35rem;
  border-radius: 0.45rem;
}
.wrap { width: var(--wrap); margin: 0 auto; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--surface);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 999;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}
.selector-header { position: static; }
.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}
.brand-block { display: grid; gap: 0.2rem; }
.brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.eyebrow {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.header-actions a,
.language-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text);
  font-weight: 600;
}
.section-nav {
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-scroll {
  display: flex;
  gap: 0.65rem;
  padding: 0.7rem 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.nav-scroll a {
  white-space: nowrap;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
}
.nav-scroll a[aria-current="page"] {
  color: var(--text);
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
}
.page-shell {
  display: grid;
  gap: 1.2rem;
  padding: 1.4rem 0 3rem;
}
.selector-shell {
  padding: 1.4rem 0 3rem;
}
@media (min-width: 900px) {
  .page-shell {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}
.content-card,
.side-card {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.content-card {
  padding: clamp(1.1rem, 1rem + 1vw, 2rem);
}
.side-card {
  padding: 1.2rem;
  position: sticky;
  top: 8.3rem;
}
.selector-shell .content-card {
  max-width: 900px;
  margin: 0 auto;
}
.status-line {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.lead {
  margin: 0 0 1.2rem;
  font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.18rem);
  color: color-mix(in srgb, var(--text) 90%, var(--muted));
}
h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
}
h1 { font-size: clamp(2rem, 1.45rem + 2vw, 3.25rem); }
h2 { font-size: clamp(1.3rem, 1.12rem + 0.6vw, 1.8rem); margin-top: 1.8rem; }
h3 { font-size: 1.08rem; margin-top: 1.2rem; }
p, ul, ol { margin: 0 0 1rem; }
li + li { margin-top: 0.35rem; }
blockquote {
  margin: 1.1rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.card-grid,
.language-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 1.1rem 0 1.4rem;
}
.card,
.lang-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 60%, transparent), color-mix(in srgb, var(--surface) 95%, transparent));
  color: var(--text);
  min-height: 9rem;
}
.card strong,
.lang-card strong {
  font-size: 1.03rem;
}
.card span,
.lang-card span {
  color: var(--muted);
}
.small { color: var(--muted); font-size: 0.92rem; }
.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  padding: 1.2rem 0 2rem;
}
.footer-wrap {
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.2rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
th, td {
  text-align: left;
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
}
th {
  background: color-mix(in srgb, var(--surface-2) 75%, transparent);
}
@media (max-width: 899px) {
  .side-card { position: static; }
}
