:root {
  --ink: #15212d;
  --ink-soft: #334155;
  --muted: #64748b;
  --paper: #ffffff;
  --wash: #f7fafb;
  --wash-strong: #eef5f5;
  --line: #d9e4e7;
  --line-strong: #bfd1d4;
  --teal: #0e9f91;
  --teal-dark: #08766e;
  --teal-wash: #e8f7f5;
  --purple: #5b4bb7;
  --purple-wash: #f4f1ff;
  --amber: #986b00;
  --amber-wash: #fff8e8;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.09);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: var(--teal-dark); }
a:hover { color: #04564f; }

:focus-visible {
  outline: 3px solid rgba(14, 159, 145, 0.38);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 7px;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 120ms ease;
}

.skip-link:focus { color: #fff; transform: translateY(0); }

code,
pre,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

code {
  padding: 0.12em 0.34em;
  border: 1px solid #dce7e9;
  border-radius: 5px;
  color: #075c57;
  background: #f0f7f7;
  font-size: 0.9em;
}

pre {
  overflow-x: auto;
  margin: 18px 0 22px;
  padding: 16px 18px;
  border: 1px solid #cbdadd;
  border-radius: 10px;
  color: #e8f7f5;
  background: #16232d;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre;
}

pre code {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 228, 231, 0.95);
  background: rgba(247, 250, 251, 0.94);
  backdrop-filter: blur(15px);
}

.nav {
  width: min(1240px, calc(100% - 48px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 820;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
  flex: 0 0 auto;
}

.brand-context {
  padding-left: 18px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-left: auto;
}

.nav-links a {
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--teal-dark);
  background: var(--teal-wash);
}

.nav-github {
  margin-left: 5px;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.nav-github:hover { color: var(--ink) !important; background: var(--wash-strong) !important; }

.wrap {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(390px, 1.12fr);
  gap: 56px;
  align-items: center;
  padding: 90px 0 84px;
}

.eyebrow,
.sidebar-label,
.tag {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow { margin: 0 0 14px; }

h1, h2, h3 { letter-spacing: -0.038em; line-height: 1.14; }
h1 { max-width: 850px; margin: 0; font-size: clamp(40px, 5.4vw, 68px); }
h2 { margin: 0 0 13px; font-size: 31px; }
h3 { margin: 0 0 8px; font-size: 18px; }

.lede {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.58;
}

.hero h1 { max-width: 540px; font-size: clamp(42px, 4.6vw, 62px); }
.hero .lede { max-width: 500px; font-size: 17px; line-height: 1.5; }

.hero-actions,
.button-row,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions { margin-top: 30px; }

.button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.button-primary { color: #fff; background: var(--teal-dark); }
.button-primary:hover { color: #fff; background: #04564f; }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--line-strong); }
.button-secondary:hover { color: var(--ink); background: var(--wash-strong); }

.hero-figure {
  margin: 0;
  padding: 12px;
  border: 1px solid #e8e2da;
  border-radius: 18px;
  background: #fdfbf9;
  box-shadow: 0 22px 55px rgba(22, 37, 48, 0.12);
}

.hero-shot {
  aspect-ratio: 1180 / 760;
  overflow: hidden;
  border: 1px solid #e8e2da;
  border-radius: 10px;
  background: #fdfbf9;
}

.hero-video,
.hero-poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-poster { display: none; }

.hero-figure figcaption {
  display: grid;
  gap: 5px;
  padding: 15px 4px 3px;
  color: #e8e9ed;
}

.hero-figure figcaption strong { font-size: 14px; }
.hero-figure figcaption span { color: #b5b7c0; font-size: 12px; line-height: 1.45; }
.hero-figure figcaption small { color: #7f818c; font-size: 10px; }

.section { padding: 74px 0; }
.section-muted { background: var(--wash-strong); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 31px; }
.section-head p { margin: 0; color: var(--muted); font-size: 16px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.card {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card p + p { margin-top: 10px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--teal-dark); }
.card .tag { display: inline-block; margin-bottom: 15px; }
.card-purple { border-color: #d7d0f5; background: #fcfbff; }
.card-purple .tag { color: var(--purple); }

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 28px;
}

.flow-step {
  position: relative;
  min-height: 175px;
  padding: 19px 17px;
  border: 1px solid var(--line);
  border-right: 0;
  background: #fff;
}

.flow-step:first-child { border-radius: 12px 0 0 12px; }
.flow-step:last-child { border-right: 1px solid var(--line); border-radius: 0 12px 12px 0; }
.flow-step::after { content: ">"; position: absolute; top: 18px; right: -10px; z-index: 2; color: var(--teal); font-weight: 900; }
.flow-step:last-child::after { content: ""; }
.flow-number { color: var(--teal); font-size: 11px; font-weight: 820; }
.flow-step h3 { margin-top: 22px; font-size: 16px; }
.flow-step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.page-hero {
  padding: 70px 0 56px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #eef8f7 0%, var(--wash) 100%);
}

.breadcrumbs { margin: 0 0 17px; color: var(--muted); font-size: 12px; font-weight: 650; }
.page-hero h1 { font-size: clamp(38px, 5vw, 58px); }
.page-hero p:last-child { max-width: 760px; margin: 18px 0 0; color: var(--ink-soft); font-size: 18px; }

.docs-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 800px);
  gap: 66px;
  align-items: start;
  padding-top: 58px;
  padding-bottom: 86px;
}

.sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  padding: 4px 8px 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.sidebar-label { margin: 0 0 9px; font-size: 10px; }
.sidebar-label:not(:first-child) { margin-top: 27px; }
.side-link { display: block; padding: 5px 9px; border-left: 2px solid transparent; color: var(--muted); font-size: 13px; text-decoration: none; }
.side-link:hover { color: var(--teal-dark); background: var(--teal-wash); }
.side-link[aria-current="page"] { color: var(--teal-dark); border-left-color: var(--teal); background: var(--teal-wash); font-weight: 760; }
.side-link-detail {
  position: relative;
  padding-left: 24px;
  color: #7a899b;
  font-size: 12px;
}
.side-link-detail::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 13px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
  transform: translateY(-50%);
}
.side-link-detail:hover::before { background: var(--teal); }

.doc-content { min-width: 0; }
.doc-content h1 { margin-bottom: 15px; font-size: clamp(36px, 5vw, 52px); }
.doc-content h2 { margin-top: 47px; font-size: 28px; }
.doc-content h2[id] { scroll-margin-top: 96px; }
.doc-content h3 { margin-top: 27px; }
.doc-content p { color: var(--ink-soft); }
.doc-content ul,
.doc-content ol { padding-left: 23px; color: var(--ink-soft); }
.doc-content li { margin: 7px 0; }
.doc-content hr { margin: 42px 0; border: 0; border-top: 1px solid var(--line); }

.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.meta-chip { padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 700; }
.meta-chip.teal { border-color: #a6d9d4; color: var(--teal-dark); background: var(--teal-wash); }
.meta-chip.purple { border-color: #d3caf6; color: var(--purple); background: var(--purple-wash); }

.intro { margin: 0 0 25px; color: var(--ink-soft); font-size: 18px; line-height: 1.62; }
.lead-note { margin: 24px 0; padding: 15px 17px; border-left: 4px solid var(--teal); background: var(--teal-wash); }
.lead-note strong { display: block; margin-bottom: 3px; }
.lead-note p { margin: 0; font-size: 14px; }
.note { margin: 23px 0; padding: 16px 18px; border: 1px solid #b8ded9; border-left: 4px solid var(--teal); border-radius: 8px; background: var(--teal-wash); }
.note-purple { border-color: #d7cff6; border-left-color: var(--purple); background: var(--purple-wash); }
.note-amber { border-color: #ecd99d; border-left-color: var(--amber); background: var(--amber-wash); }
.note strong { display: block; margin-bottom: 3px; }
.note p { margin: 0; font-size: 14px; }

.step-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 15px;
  margin: 28px 0;
  padding: 21px 0;
  border-top: 1px solid var(--line);
}

.step-card:first-of-type { margin-top: 19px; }
.step-num { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--teal-dark); font-size: 13px; font-weight: 820; }
.step-card h3 { margin: 0 0 7px; font-size: 20px; }
.step-card p { margin: 0 0 11px; font-size: 15px; }
.step-card p:last-child { margin-bottom: 0; }

.os-grid,
.choice-grid,
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 25px; }
.os-card,
.choice-card,
.check-card { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.os-card h3,
.choice-card h3,
.check-card h3 { margin: 0 0 6px; font-size: 15px; }
.os-card p,
.choice-card p,
.check-card p { margin: 0; color: var(--muted); font-size: 13px; }
.choice-card strong { display: block; margin-bottom: 5px; }

.screenshot { margin: 25px 0 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.screenshot img { display: block; width: 100%; height: auto; border-radius: 5px; }
.caption { margin: 8px 0 22px; color: var(--muted); font-size: 12px; font-style: italic; }

.screenshot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0 10px; }
.screenshot-card { overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.screenshot-card:first-child { grid-column: 1 / -1; }
.screenshot-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.screenshot-card figcaption { padding: 11px 13px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.screenshot-card figcaption strong { color: var(--ink); }

.table-wrap { overflow-x: auto; margin: 20px 0 25px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--ink); background: var(--wash-strong); font-size: 11px; font-weight: 820; letter-spacing: 0.04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td { color: var(--ink-soft); }

.diagram { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 16px; align-items: stretch; margin-top: 25px; }
.diagram-column { display: grid; gap: 11px; }
.diagram-node { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.diagram-node strong { display: block; margin-bottom: 4px; font-size: 14px; }
.diagram-node span { color: var(--muted); font-size: 12px; }
.diagram-center { display: grid; place-items: center; padding: 25px; border: 1px solid #a8dad5; border-radius: 13px; background: linear-gradient(145deg, #e4f8f5, #f8fffe); text-align: center; }
.diagram-center strong { display: block; margin-bottom: 7px; font-size: 20px; }
.diagram-center span { color: var(--muted); font-size: 13px; }

.pill-row { margin-top: 15px; }
.pill { padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 720; }
.pill-teal { border-color: #a6d9d4; color: var(--teal-dark); background: var(--teal-wash); }
.pill-purple { border-color: #d3caf6; color: var(--purple); background: var(--purple-wash); }

.footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.footer a { color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 5px 16px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }

.home-card { min-height: 165px; }
.home-card .card-arrow { display: inline-block; margin-top: 17px; color: var(--teal-dark); font-size: 13px; font-weight: 760; }
.small-print { color: var(--muted); font-size: 12px; }

@media (max-width: 950px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 64px; }
  .docs-shell { grid-template-columns: 175px minmax(0, 1fr); gap: 35px; }
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow-step,
  .flow-step:last-child { min-height: auto; border-right: 1px solid var(--line); border-bottom: 0; border-radius: 0; }
  .flow-step:first-child { border-radius: 12px 12px 0 0; }
  .flow-step:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 12px 12px; }
  .flow-step::after { content: "v"; top: auto; right: 18px; bottom: -13px; }
  .flow-step:last-child::after { content: ""; }
}

@media (max-width: 720px) {
  .nav,
  .wrap { width: min(100% - 30px, 1240px); }
  .nav { min-height: auto; align-items: flex-start; flex-wrap: wrap; padding: 13px 0; }
  .brand-context { display: none; }
  .nav-links { width: 100%; justify-content: flex-start; margin-left: 0; }
  .nav-links a { padding: 6px 7px; font-size: 11px; }
  .nav-github { margin-left: 0; }
  .hero { padding: 53px 0 60px; }
  h1 { font-size: 42px; }
  h2 { font-size: 27px; }
  .lede { font-size: 17px; }
  .section { padding: 56px 0; }
  .grid-2,
  .grid-3,
  .screenshot-grid,
  .os-grid,
  .choice-grid,
  .check-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 52px 0 42px; }
  .docs-shell { display: block; padding-top: 35px; padding-bottom: 60px; }
  .sidebar { position: static; max-height: none; overflow: visible; display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 34px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
  .sidebar-label { width: 100%; margin: 7px 0 0 !important; }
  .side-link { padding: 4px 8px; border-left: 0; border-radius: 6px; font-size: 12px; }
  .side-link[aria-current="page"] { border-left: 0; }
  .side-link-detail { padding-left: 8px; }
  .side-link-detail::before { display: none; }
  .diagram { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 17px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skip-link { transition: none; }
  .hero-video { display: none; }
  .hero-poster { display: block; }
}
