:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #5f6368;
  --line: #d9dedb;
  --paper: #fbfbf8;
  --panel: #ffffff;
  --panel-soft: #f3f7f5;
  --accent: #276a50;
  --accent-strong: #184a39;
  --accent-soft: #e2efe8;
  --warm: #f0d384;
  --blue: #275f94;
  --red: #a03d34;
  --code-bg: #111414;
  --code-line: #27302d;
  --code-ink: #eef4ef;
  --code-muted: #87958f;
  --code-keyword: #7fc7ff;
  --code-type: #f1cf78;
  --code-string: #a8d986;
  --code-number: #d9a6ff;
  --code-comment: #86928c;
  --shadow: 0 20px 54px rgba(20, 26, 24, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 92px;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 248, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
}

.docs-menu-button,
.docs-drawer-close {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.docs-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.docs-menu-button:hover,
.docs-drawer-close:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.hamburger-line + .hamburger-line {
  margin-top: 5px;
}

.brand-word {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-word:hover {
  color: var(--accent-strong);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav-link {
  border-radius: 8px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 76px;
}

.home-page,
.docs-article,
.article-flow {
  display: grid;
  gap: 38px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: 64px;
  min-height: 470px;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: 4.75rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.docs-article h1 {
  font-size: 3.25rem;
}

h2 {
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  font-size: 1.1rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.22rem;
}

.lede.compact {
  font-size: 1.05rem;
}

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

.primary-action,
.secondary-action {
  min-height: 42px;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 750;
  text-decoration: none;
}

.primary-action {
  background: var(--accent-strong);
  color: white;
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--accent-strong);
}

.doc-section {
  display: grid;
  gap: 12px;
}

.doc-section p code,
.docs-article .lede code,
.chapter-list span code,
.feature-list span code {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  background: var(--panel-soft);
  color: var(--accent-strong);
  font-size: 0.95em;
}

.doc-section p {
  max-width: 780px;
  color: var(--muted);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  gap: 7px;
  min-height: 154px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.feature-list strong {
  color: var(--accent-strong);
}

.feature-list span {
  color: var(--muted);
  font-size: 0.96rem;
}

.chapter-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapter-list a {
  display: grid;
  gap: 6px;
  min-height: 106px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-decoration: none;
}

.chapter-list a:hover {
  border-color: #b7c9bf;
  background: var(--panel-soft);
}

.chapter-list strong {
  color: var(--accent-strong);
}

.chapter-list span {
  color: var(--muted);
  font-size: 0.94rem;
}

.note-block {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #d9c47f;
  border-radius: 8px;
  background: #fff8df;
}

.note-block strong {
  color: #614d0d;
}

.note-block p {
  color: #5e562f;
}

.docs-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 52px;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 22px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding-right: 8px;
}

.docs-content {
  display: grid;
  min-width: 0;
  gap: 28px;
}

.docs-context-bar {
  display: none;
}

.docs-breadcrumb {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 9px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.docs-breadcrumb-section,
.docs-breadcrumb-page {
  overflow-wrap: anywhere;
}

.docs-breadcrumb-section {
  color: var(--accent-strong);
}

.docs-breadcrumb-separator {
  color: #8b928e;
}

.docs-drawer-layer,
.docs-drawer,
.docs-drawer-backdrop {
  display: none;
}

.docs-nav-group {
  display: grid;
  gap: 8px;
}

.docs-nav-group strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.docs-nav-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav-link {
  display: block;
  border-radius: 8px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.docs-nav-link:hover,
.docs-nav-link.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.docs-article {
  min-width: 0;
  max-width: 820px;
  padding-bottom: 28px;
}

.article-flow {
  gap: 30px;
}

.code-panel {
  overflow: hidden;
  border: 1px solid #232928;
  border-radius: 8px;
  background: var(--code-bg);
  box-shadow: var(--shadow);
}

.heading-code-panel {
  max-width: 780px;
  box-shadow: none;
}

.heading-code-panel .code-title {
  padding: 7px 12px;
}

.heading-code-panel pre {
  padding: 12px;
}

.heading-code-panel code {
  font-size: 13px;
  line-height: 1.55;
}

.code-title {
  border-bottom: 1px solid var(--code-line);
  padding: 10px 14px;
  color: #c3d6cc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

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

code {
  color: var(--code-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.65;
  tab-size: 4;
}

.token.keyword {
  color: var(--code-keyword);
}

.token.type {
  color: var(--code-type);
}

.token.string {
  color: var(--code-string);
}

.token.number {
  color: var(--code-number);
}

.token.comment {
  color: var(--code-comment);
  font-style: italic;
}

.token.operator {
  color: #f19f8f;
}

.token.function {
  color: #8fd3c4;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px max(24px, calc((100vw - 1180px) / 2));
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .layout {
    padding-top: 18px;
  }

  .hero,
  .docs-shell,
  .feature-list,
  .chapter-list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .docs-shell {
    gap: 0;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-context-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 42px;
  }

  .docs-menu-button {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
  }

  .docs-drawer-layer {
    display: block;
  }

  .docs-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 8;
    display: block;
    background: rgba(17, 20, 20, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
  }

  .docs-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 9;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(84vw, 340px);
    max-width: 100%;
    border-right: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .docs-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }

  .docs-drawer-header strong {
    font-size: 1rem;
  }

  .docs-drawer-close {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 8px;
  }

  .close-line {
    position: absolute;
    top: 20px;
    left: 11px;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .close-line.first {
    transform: rotate(45deg);
  }

  .close-line.second {
    transform: rotate(-45deg);
  }

  .docs-drawer-scroll {
    display: grid;
    align-content: start;
    gap: 22px;
    overflow: auto;
    padding: 18px 14px 28px;
  }

  .docs-nav-open .docs-drawer {
    transform: translateX(0);
  }

  .docs-nav-open .docs-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .docs-nav-lock {
    overflow: hidden;
  }

  .docs-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    gap: 16px;
    min-height: 58px;
    padding: 8px 14px;
  }

  .nav {
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: auto;
  }

  .nav-link {
    padding: 7px 9px;
  }

  .layout {
    width: min(100% - 28px, 1180px);
    padding-top: 12px;
  }

  h1,
  .docs-article h1 {
    font-size: 2.8rem;
  }

  .lede {
    font-size: 1.06rem;
  }

  .docs-nav-list {
    grid-template-columns: 1fr;
  }

  pre {
    padding: 14px;
  }
}
