*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --surface:       oklch(98.5% 0.006 252);
  --surface-2:     oklch(95% 0.010 252);
  --surface-blue:  oklch(93% 0.028 265);
  --surface-nav:   oklch(98.5% 0.006 252 / .95);
  --blue:          oklch(50% 0.22 265);
  --blue-hover:    oklch(55% 0.22 265);
  --on-light:      oklch(34% 0.025 252);
  --on-light-2:    oklch(40% 0.012 252);
  --on-light-3:    oklch(60% 0.010 252);
  --ink:           oklch(13% 0.025 252);
  --ink-2:         oklch(19% 0.022 252);
  --ink-3:         oklch(26% 0.018 252);
  --on-dark:       oklch(96% 0.006 252);
  --on-dark-2:     oklch(63% 0.014 252);
  --border:        oklch(0% 0 0 / .09);
  --code-bg:       oklch(97% 0.006 252);
  --code-block-bg: oklch(17% 0.022 252);
  --note-bg:       oklch(92% 0.028 265);
  --note-border:   oklch(50% 0.22 265);
  --note-text:     oklch(35% 0.025 252);
  --code-comment:  oklch(52% 0.010 252);
  --code-label:    oklch(63% 0.014 252);
  --footer-bg:     oklch(19% 0.022 252);
  --footer-copy:   oklch(52% 0.010 252);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--on-light);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { text-decoration: none; color: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Skip-to-content ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: .5rem 1rem;
  background: var(--blue);
  color: var(--on-dark);
  font-size: .875rem;
  font-weight: 600;
  border-radius: 0 0 6px 6px;
  z-index: 9999;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

/* ── Top nav ── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-nav);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topnav__back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--on-light-2);
  transition: color .15s;
}
.topnav__back:hover { color: var(--blue); }
.topnav__back svg { flex-shrink: 0; }

.topnav__breadcrumb {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--on-light-3);
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* ── Page layout ── */
.page-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 5vw, 3rem);
}

/* ── Page header ── */
.page-header {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header__eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .75rem;
}

.page-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.2;
  color: var(--on-light);
  margin-bottom: 1rem;
}

.page-header__lead {
  font-size: 1.0625rem;
  color: var(--on-light-2);
  max-width: 65ch;
  line-height: 1.7;
}

/* ── Sidebar TOC + content grid ── */
.doc-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 720px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .doc-toc { display: none; }
}

.doc-toc {
  position: sticky;
  top: 80px;
  font-size: .8125rem;
}

.doc-toc__label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--on-light-3);
  margin-bottom: .875rem;
}

.doc-toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .125rem;
}

.doc-toc__list a {
  display: block;
  padding: .3rem .6rem;
  border-radius: 6px;
  color: var(--on-light-2);
  font-weight: 500;
  line-height: 1.4;
  transition: background .15s, color .15s;
}
.doc-toc__list a:hover {
  background: var(--surface-2);
  color: var(--on-light);
}
.doc-toc__list a.active {
  background: var(--surface-blue);
  color: var(--blue);
}

.doc-toc__list--sub { margin-top: .125rem; margin-left: .75rem; }
.doc-toc__list--sub a { font-size: .75rem; color: var(--on-light-3); }

/* ── Doc content ── */
.doc-content { min-width: 0; }

.doc-section {
  padding-top: 2.5rem;
  margin-bottom: 3rem;
  border-top: 1px solid var(--border);
}
.doc-section:first-child { border-top: none; padding-top: 0; }

/* Headings */
.doc-content h2 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--on-light);
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

.doc-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--on-light);
  margin-top: 2rem;
  margin-bottom: .75rem;
}

.doc-content h4 {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--on-light-2);
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

/* Paragraphs */
.doc-content p {
  color: var(--on-light-2);
  max-width: 68ch;
  margin-bottom: 1rem;
}

.doc-content p strong, .doc-content li strong { color: var(--on-light); font-weight: 600; }

/* Lists */
.doc-content ul, .doc-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--on-light-2);
}
.doc-content li { margin-bottom: .35rem; max-width: 65ch; }

/* Checklist */
.doc-checklist { list-style: none; padding-left: 0; }
.doc-checklist li {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .45rem .75rem;
  border-radius: 8px;
  transition: background .12s;
}
.doc-checklist li:hover { background: var(--surface-2); }
.doc-checklist input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: .28em;
  accent-color: var(--blue);
  cursor: pointer;
}

/* Inline code */
code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: .82em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1em .4em;
  color: var(--on-light);
}

/* Code blocks */
pre {
  background: var(--code-block-bg);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  position: relative;
}

pre code {
  font-size: .8125rem;
  background: none;
  border: none;
  padding: 0;
  color: var(--on-dark);
  line-height: 1.65;
}

.code-label {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--code-label);
  margin-bottom: .5rem;
}

pre .comment { color: var(--code-comment); }

/* Tables */
.table-wrap { overflow-x: auto; margin-bottom: 1.5rem; border-radius: 10px; border: 1px solid var(--border); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

thead th {
  background: var(--surface-2);
  color: var(--on-light);
  font-weight: 700;
  font-size: .8125rem;
  letter-spacing: .02em;
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: oklch(97% 0.007 252); }

td {
  padding: .75rem 1rem;
  color: var(--on-light-2);
  vertical-align: top;
}

td:first-child { color: var(--on-light); font-weight: 500; }
td code { font-size: .78em; }

/* Blockquotes / Notes */
blockquote {
  background: var(--note-bg);
  border-left: 3px solid var(--note-border);
  border-radius: 0 8px 8px 0;
  padding: .875rem 1.125rem;
  margin-bottom: 1.25rem;
  max-width: 68ch;
}

blockquote p {
  margin-bottom: 0;
  color: var(--note-text);
  font-size: .9375rem;
}

/* Section divider */
.doc-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* Feature table special */
.feat-table td:first-child { font-weight: 600; color: var(--on-light); }

/* ── Footer ── */
.footer__logo-img { height: 22px; width: auto; opacity: .55; }

.footer {
  background: var(--footer-bg);
  padding: 1.75rem 0;
  border-top: 1px solid oklch(100% 0 0 / .06);
}
.footer__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
}
.footer__product {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--on-dark-2);
}
.footer__sep { color: oklch(40% 0.010 252); font-size: .625rem; }
.footer__links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin-left: auto;
}
.footer__links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: .8125rem;
  color: var(--on-dark-2);
  font-weight: 500;
  text-decoration: none;
  transition: color .12s;
}
.footer__links a:hover { color: var(--on-dark); }
.footer__copy {
  width: 100%;
  font-size: .75rem;
  color: var(--footer-copy);
  padding-top: 1.25rem;
  margin-top: .25rem;
  border-top: 1px solid oklch(100% 0 0 / .04);
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 5vw, 5rem);
  padding-right: clamp(1.25rem, 5vw, 5rem);
}
