:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #18202d;
  --muted: #5d697a;
  --border: #d8dde6;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --code: #111827;
}

* { box-sizing: border-box; }
html { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; color: var(--text); background: var(--bg); }
body { margin: 0; }
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #0a4f4a; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(15, 118, 110, 0.32); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: .65rem .85rem; background: var(--text); color: #fff; border-radius: 6px; }
.skip-link:focus { top: 1rem; }
.topbar { border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 2; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: .85rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { font-weight: 780; color: var(--text); text-decoration: none; }
.topnav { display: flex; gap: .75rem; flex-wrap: wrap; font-size: .93rem; }
.topnav a[aria-current="page"], .sidebar a[aria-current="page"] { color: var(--text); font-weight: 720; text-decoration: none; }
.lang { margin-left: auto; display: flex; gap: .5rem; font-size: .9rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 1.25rem 1rem 3rem; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.sidebar { position: sticky; top: 5rem; border: 1px solid var(--border); background: var(--panel); border-radius: 8px; padding: .9rem; }
.sidebar h2 { margin: .2rem 0 .55rem; font-size: .8rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.sidebar a { display: block; padding: .34rem .2rem; font-size: .94rem; }
.search { margin: .5rem 0 1rem; }
.search input { width: 100%; min-height: 40px; border: 1px solid var(--border); border-radius: 6px; padding: .55rem .65rem; font: inherit; }
.search-results { margin-top: .5rem; display: grid; gap: .4rem; font-size: .9rem; }
.search-results a { display: block; padding: .5rem; border: 1px solid var(--border); border-radius: 6px; background: #fbfcfe; }
main { min-width: 0; border: 1px solid var(--border); background: var(--panel); border-radius: 8px; padding: clamp(1.1rem, 2vw, 2rem); }
.eyebrow { margin: 0 0 .35rem; color: var(--accent); font-size: .82rem; font-weight: 760; text-transform: uppercase; letter-spacing: .04em; }
h1 { margin: 0 0 1rem; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; text-wrap: balance; letter-spacing: 0; }
h2 { margin-top: 2rem; font-size: 1.35rem; text-wrap: balance; letter-spacing: 0; }
h3 { margin-top: 1.5rem; font-size: 1.05rem; letter-spacing: 0; }
p, li { color: var(--muted); }
ul, ol { padding-left: 1.25rem; }
.lead { font-size: 1.08rem; max-width: 72ch; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin: 1rem 0; }
.tile { border: 1px solid var(--border); border-radius: 8px; padding: .9rem; background: #fbfcfe; }
.tile h3 { margin: 0 0 .35rem; }
pre { overflow-x: auto; padding: .9rem; border-radius: 8px; background: var(--code); color: #f8fafc; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
th, td { border-bottom: 1px solid var(--border); padding: .55rem; text-align: left; vertical-align: top; }
.next { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; flex-wrap: wrap; }
footer { max-width: 1180px; margin: 0 auto; padding: 0 1rem 2rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 780px) {
  .wrap { display: block; padding-top: .75rem; }
  .sidebar { position: static; margin-bottom: 1rem; }
  .lang { margin-left: 0; }
  main { padding: 1rem; }
  .grid { grid-template-columns: 1fr; }
}
