:root {
  --bg: #fff;
  --surface: #f7f7f5;
  --surface-strong: #efefec;
  --ink: #111111;
  --ink-soft: #3f3f3a;
  --ink-muted: #72726b;
  --line: #e6e6e0;
  --line-strong: #d6d6cd;
  --accent: #0f766e;
  --accent-soft: #e8f4f2;
  --code-bg: #101314;
  --code-ink: #f4f7f8;
  --code-muted: #98a2a6;
  --max: 1480px;
  --left: 280px;
  --right: 220px;
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15.5px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.topbar__inner {
  max-width: var(--max);
  min-height: 58px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 720;
  white-space: nowrap;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions a {
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.top-actions a:hover {
  background: var(--surface);
  color: var(--ink);
}

.menu-button {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.docs-shell {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--left) minmax(0, 1fr) var(--right);
  gap: 34px;
  padding: 0 22px;
}

.sidebar,
.toc {
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
  padding: 28px 0;
}

.sidebar {
  border-right: 1px solid var(--line);
  padding-right: 22px;
}

.sidebar__group + .sidebar__group {
  margin-top: 28px;
}

.sidebar__label,
.toc__label {
  margin: 0 0 8px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar a,
.toc a {
  display: block;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 14px;
}

.sidebar a {
  padding: 7px 9px;
  margin: 1px 0;
}

.toc a {
  padding: 4px 0;
  font-size: 13px;
}

.sidebar a:hover,
.sidebar a.is-active,
.toc a:hover {
  color: var(--accent);
}

.sidebar a.is-active {
  background: var(--accent-soft);
  font-weight: 720;
}

.doc-main {
  min-width: 0;
  padding: 54px 0 90px;
}

.doc-main article {
  max-width: 820px;
}

.doc-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.15rem, 4.8vw, 4.15rem);
}

h2 {
  padding-top: 32px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
}

h3 {
  margin-top: 24px;
  font-size: 1.18rem;
}

h4 {
  margin-top: 18px;
  font-size: 1rem;
}

p {
  color: var(--ink-soft);
}

.lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1.13rem;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 720;
}

.button--light {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.concept-grid,
.path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.concept-card,
.path-card,
.method-card,
.release-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.concept-card,
.path-card {
  padding: 18px;
}

.concept-card p,
.path-card p,
.method-card p,
.release-card p {
  margin-bottom: 0;
}

.method-list,
.release-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.method-card,
.release-card {
  padding: 18px 20px;
}

.method-card header,
.release-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.method-card code,
.release-card code {
  color: var(--accent);
}

.meta {
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 650;
}

.callout {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.callout strong {
  color: var(--ink);
}

.callout p {
  margin: 0;
}

.code-block {
  margin: 20px 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
}

.code-block__header {
  min-height: 40px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--code-muted);
  font-size: 13px;
}

.code-block button {
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 5px 9px;
  cursor: pointer;
}

pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
}

pre code {
  color: var(--code-ink);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.step {
  position: relative;
  padding: 18px 18px 18px 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 760;
}

.field-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-table th,
.field-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.field-table th {
  background: var(--surface);
  font-size: 13px;
}

.field-table tr:last-child td {
  border-bottom: 0;
}

.check-list {
  padding-left: 20px;
  color: var(--ink-soft);
}

.check-list li + li {
  margin-top: 9px;
}

.footer-nav {
  max-width: 820px;
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.footer-nav a {
  color: var(--accent);
  font-weight: 720;
}

@media (max-width: 1120px) {
  .docs-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 820px) {
  .topbar__inner {
    min-height: 56px;
  }

  .top-actions {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .docs-shell {
    display: block;
    padding: 0 20px;
  }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    top: 56px;
    z-index: 35;
    display: none;
    height: auto;
    max-height: calc(100vh - 56px);
    padding: 18px 20px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }

  .sidebar.is-open {
    display: block;
  }

  .doc-main {
    padding-top: 34px;
  }

  .concept-grid,
  .path-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .method-card header,
  .release-card header,
  .footer-nav {
    display: block;
  }

  .footer-nav a {
    display: block;
    margin-top: 10px;
  }
}
