:root {
  color-scheme: dark;
  --background: #101113;
  --surface: #181b21;
  --border: #2b2e35;
  --text: #eceef2;
  --muted: #b4b8c2;
  --gutter: clamp(20px, 3vw, 40px);
  --header-height: 72px;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #c0cdee; text-underline-offset: 4px; }
a:hover { color: #fff; }
a:focus-visible, summary:focus-visible { outline: 2px solid #a6b9e8; outline-offset: 4px; }
p, li { color: var(--muted); overflow-wrap: anywhere; }
p { margin: 0 0 16px; }
strong { color: #e4e7ee; }
h1, h2, h3 { color: #f4f5f8; line-height: 1.25; letter-spacing: -.025em; font-weight: 500; overflow-wrap: anywhere; }
h1 { font-size: clamp(36px, 4vw, 48px); margin: 0 0 20px; }
h2 { font-size: clamp(26px, 3vw, 32px); margin: 0 0 20px; }
h3 { font-size: 20px; margin: 28px 0 12px; }
.header { height: var(--header-height); border-bottom: 1px solid var(--border); background: var(--background); position: sticky; top: 0; z-index: 3; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 100%; max-width: 1320px; padding-inline: var(--gutter); margin-inline: auto; }
.header img { display: block; width: 170px; height: auto; }
.header span { color: #939aa9; font-size: 14px; }
.header-inner > a:last-child { margin-left: auto; flex-shrink: 0; font-size: 14px; text-decoration: none; border: 1px solid #353943; border-radius: 8px; padding: 8px 16px; }
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); max-width: 1320px; margin-inline: auto; }
.sidebar { position: sticky; top: var(--header-height); height: calc(100dvh - var(--header-height)); overflow-y: auto; padding: 32px 20px 32px var(--gutter); border-right: 1px solid var(--border); scrollbar-width: thin; }
.topics-toggle { display: none; }
.sidebar nav { min-width: 0; }
.sidebar a { display: block; font-size: 14px; line-height: 1.5; text-decoration: none; padding: 10px 12px; color: #a7aebb; border-radius: 6px; overflow-wrap: anywhere; }
.sidebar a:hover { background: #20232b; color: #fff; }
.sidebar .home-link { font-weight: 600; color: #e5e9f1; margin-bottom: 16px; }
.sidebar nav details { margin: 0 0 8px; }
.sidebar nav summary { cursor: pointer; font-size: 14px; font-weight: 600; color: #e5e9f1; padding: 10px 8px; }
.sidebar nav details > a { margin-left: 12px; border-left: 1px solid #343945; border-radius: 0 6px 6px 0; }
main { width: 100%; max-width: 920px; min-width: 0; padding: 44px var(--gutter) 24px; margin-inline: auto; }
section { scroll-margin-top: calc(var(--header-height) + 24px); padding-block: 40px; border-bottom: 1px solid var(--border); }
section:first-child { padding-top: 0; }
section > :last-child { margin-bottom: 0; }
section:target h2 { color: #c5d5fa; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #91a7d4; margin: 0 0 12px; }
.lead { font-size: 20px; line-height: 1.6; }
ol { margin: 0 0 20px; padding-left: 24px; }
li { padding-left: 4px; margin-bottom: 8px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; color: #d3def8; overflow-wrap: anywhere; }
pre { max-width: 100%; margin: 20px 0; padding: 20px; background: var(--surface); border: 1px solid #30343e; border-radius: 8px; overflow-x: auto; font-size: 13px; line-height: 1.7; }
pre code { overflow-wrap: normal; font-size: inherit; }
.table-wrap { width: 100%; overflow-x: auto; margin-bottom: 20px; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 14px; text-align: left; }
caption { text-align: left; color: #a7aebb; padding-bottom: 12px; }
th, td { border-bottom: 1px solid #30343e; padding: 12px 16px; vertical-align: top; }
th { color: #dfe5f2; font-weight: 600; background: #191c22; }
td { color: #adb5c5; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.cards a { min-width: 0; display: block; border: 1px solid #343945; border-radius: 8px; padding: 20px; text-decoration: none; background: var(--surface); }
.cards strong { display: block; font-size: 15px; line-height: 1.4; }
.cards span { display: block; color: #a7aebb; font-size: 13px; margin-top: 10px; }
footer { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; font-size: 12px; color: #8c94a4; padding-block: 28px 12px; }
footer > a:last-child { margin-left: auto; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 5; background: #fff; color: #111; padding: 8px 14px; transform: translateY(-200%); }
.skip:focus { transform: none; }
@media (min-width: 761px) and (max-width: 1050px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .sidebar { padding-right: 16px; }
}
@media (max-width: 760px) {
  :root { --header-height: 64px; --gutter: 20px; }
  .header-inner { gap: 12px; }
  .header span { display: none; }
  .header img { width: 145px; }
  .header-inner > a:last-child { font-size: 13px; padding: 8px 12px; }
  .layout { display: block; }
  .sidebar { position: sticky; top: var(--header-height); z-index: 2; height: auto; padding: 0; overflow: visible; border-right: 0; border-bottom: 1px solid var(--border); background: var(--background); }
  .topics-toggle { display: list-item; padding: 14px var(--gutter); cursor: pointer; font-size: 14px; font-weight: 600; }
  .sidebar nav { max-height: calc(100dvh - var(--header-height) - 80px); overflow-y: auto; padding: 8px var(--gutter) 16px; border-top: 1px solid var(--border); scrollbar-width: thin; }
  .sidebar .home-link { margin-bottom: 8px; }
  .sidebar nav details { margin-bottom: 4px; }
  .sidebar nav summary { min-height: 44px; padding: 10px 8px; }
  .sidebar a { min-height: 44px; padding: 12px; }
  main { padding: 28px var(--gutter) 16px; }
  section { scroll-margin-top: calc(var(--header-height) + 72px); padding-block: 32px; }
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  h3 { font-size: 19px; margin-top: 24px; }
  .lead { font-size: 18px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .cards a { padding: 18px; }
  pre { padding: 16px; font-size: 12px; }
  footer { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 24px; }
  footer > a:last-child { margin-left: 0; }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .header img { width: 130px; }
  .header-inner > a:last-child { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
