:root {
  --bg: #ffffff;
  --surface: #f7f7f8;
  --surface-strong: #eeeeef;
  --border: #dedee2;
  --text: #202124;
  --muted: #6b6f76;
  --faint: #92969d;
  --accent: #101827;
  --accent-soft: #edf2f7;
  --code-bg: #151719;
  --code-text: #e7eaf0;
  --warning: #8a5a00;
  --warning-bg: #fff8e6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.72;
}

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

code {
  border-radius: 4px;
  background: var(--surface-strong);
  padding: 0.12rem 0.32rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

pre {
  overflow-x: auto;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 18px 20px;
  line-height: 1.58;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.95rem;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #3b3d42;
  background: var(--surface);
  font-weight: 650;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  height: 82px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  padding: 0 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--text);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name {
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: 0;
}

.topnav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.94rem;
}

.topnav a:hover {
  color: var(--text);
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: 9px;
}

.menu-button span {
  display: block;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

.doc-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1040px);
  gap: 64px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 82px;
  height: calc(100vh - 82px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: #fbfbfc;
  padding: 24px 28px 48px;
}

.side-nav {
  display: grid;
  gap: 2px;
}

.side-nav a,
.side-nav summary {
  display: flex;
  align-items: center;
  min-height: 34px;
  border-radius: 6px;
  color: #34363a;
  padding: 5px 8px;
  font-size: 0.98rem;
  cursor: pointer;
}

.side-nav a:hover,
.side-nav summary:hover {
  background: var(--surface);
}

.side-nav > a.active {
  position: relative;
  background: var(--surface);
  color: #111;
  font-weight: 700;
}

.side-nav > a.active::before {
  content: "";
  position: absolute;
  left: -28px;
  width: 3px;
  height: 100%;
  background: var(--text);
}

.side-nav details {
  margin: 14px 0 4px;
}

.side-nav summary {
  justify-content: space-between;
  font-weight: 750;
  list-style: none;
}

.side-nav summary::-webkit-details-marker {
  display: none;
}

.side-nav summary::after {
  content: "⌄";
  color: var(--faint);
}

.side-nav details a {
  margin-left: 0;
  color: #3f4248;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.content {
  min-width: 0;
  padding: 42px 0 96px;
}

.doc-section {
  scroll-margin-top: 110px;
  margin-bottom: 58px;
}

.doc-section h1,
.doc-section h2,
.doc-section h3 {
  letter-spacing: 0;
  line-height: 1.2;
}

.doc-section h1 {
  margin: 0 0 8px;
  font-size: 2.35rem;
}

.doc-section h2 {
  margin: 0 0 14px;
  font-size: 1.72rem;
}

.doc-section h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
}

.doc-section p {
  color: var(--muted);
  margin: 0 0 16px;
}

.hero {
  min-height: 720px;
}

.eyebrow {
  color: var(--faint) !important;
  font-size: 0.94rem;
  font-weight: 650;
}

.lead {
  max-width: 780px;
  font-size: 1.08rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 34px;
}

.intro-grid > div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.intro-grid p {
  margin: 0;
}

.terminal-shot {
  margin: 56px auto 0;
  max-width: 760px;
  border: 1px solid #3c4352;
  border-radius: 14px 14px 0 0;
  background: #0f1115;
  box-shadow: 0 24px 48px rgba(16, 24, 39, 0.22);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  background: #34394a;
  padding: 0 14px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.red {
  background: #ff5f57;
}

.yellow {
  background: #ffbd2e;
}

.green {
  background: #28c840;
}

.window-title {
  margin-left: 6px;
  color: #c7ccd8;
  font-size: 0.86rem;
  font-weight: 650;
}

.terminal-shot pre {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

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

.example {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 16px 18px;
}

.example p {
  margin: 0;
}

.callout {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
  margin: 12px 0;
}

.callout strong,
.callout span {
  display: block;
}

.callout span {
  color: var(--muted);
  margin-top: 4px;
}

.callout.warning {
  border-color: #f1d48b;
  background: var(--warning-bg);
  color: var(--warning);
}

@media (max-width: 1180px) {
  .doc-shell {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
  }
}

@media (max-width: 820px) {
  .topbar {
    height: 68px;
    padding: 0 18px;
  }

  .brand {
    min-width: 0;
  }

  .brand-name {
    font-size: 1.08rem;
  }

  .topnav {
    display: none;
  }

  .menu-button {
    display: block;
    margin-left: auto;
  }

  .doc-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 68px auto 0 0;
    z-index: 30;
    width: min(84vw, 320px);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    top: 68px;
    height: calc(100vh - 68px);
    box-shadow: 18px 0 32px rgba(0, 0, 0, 0.12);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    padding: 32px 20px 72px;
  }

  .doc-section h1 {
    font-size: 2rem;
  }

  .doc-section h2 {
    font-size: 1.45rem;
  }

  .hero {
    min-height: auto;
  }

  .terminal-shot {
    margin-top: 30px;
  }

  .example-grid {
    grid-template-columns: 1fr;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }
}
