:root {
  color-scheme: light;
  --bg: #fafafa;
  --panel: #ffffff;
  --panel-soft: #fcfcfc;
  --text: #111111;
  --muted: #5f6368;
  --muted-strong: #3d4043;
  --line: #e7e7e7;
  --line-strong: #d8d8d8;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
  --sans: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", "Menlo", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 250, 0.98) 100%),
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.025), transparent 24%);
}

a {
  color: inherit;
  text-decoration-color: rgba(17, 17, 17, 0.25);
  text-underline-offset: 0.14em;
}

code,
pre {
  font-family: var(--mono);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 250, 250, 0.9);
  border-bottom: 1px solid rgba(231, 231, 231, 0.92);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 28px;
}

.brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.header-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-nav {
  flex: 1;
  margin-left: 10px;
}

.header-nav a,
.header-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.1s;
}

.header-nav a:hover,
.header-link:hover {
  color: var(--text);
}

/* Shell layout */

.docs-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 52px;
  align-self: start;
  height: calc(100vh - 52px);
  padding: 32px 20px 40px;
  overflow: auto;
}

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

/* Sidebar */

.sidebar-group + .sidebar-group {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sidebar-label,
.eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar a {
  display: block;
  padding: 6px 10px;
  margin: 0 -10px;
  border-radius: 7px;
  color: var(--muted-strong);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}

.sidebar a:hover {
  background: rgba(17, 17, 17, 0.04);
  color: var(--text);
}

.sidebar a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  background: rgba(17, 17, 17, 0.06);
}

/* Main content */

.docs-main {
  min-width: 0;
  padding: 40px 72px 96px;
  max-width: none;
}

.doc {
  max-width: 780px;
}

.page-intro {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.page-intro h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 4.7rem);
  line-height: 0.94;
  max-width: 22ch;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 720px;
  margin: 22px 0 0;
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--muted-strong);
}

.cover-image {
  display: block;
  width: 100%;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

/* Doc content typography */

.doc-content {
  padding-top: 28px;
}

.doc-content h2,
.doc-content h3 {
  letter-spacing: -0.04em;
}

.doc-content h2 {
  margin: 42px 0 14px;
  font-size: clamp(2rem, 3.5vw, 2.9rem);
  line-height: 1.04;
}

.doc-content h3 {
  margin: 28px 0 10px;
  font-size: 1.2rem;
}

.doc-content p,
.doc-content li {
  color: var(--muted-strong);
  line-height: 1.8;
}

.doc-content ul,
.doc-content ol {
  padding-left: 22px;
}

.doc-content blockquote {
  margin: 20px 0;
  padding: 0 0 0 16px;
  border-left: 3px solid var(--line-strong);
  color: var(--muted);
}


/* Grid layouts */

.button-row,
.card-grid,
.step-grid,
.comparison-grid,
.link-grid {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.card-grid,
.comparison-grid,
.link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.step-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.button-row {
  grid-template-columns: repeat(2, minmax(0, max-content));
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.button:hover {
  border-color: var(--line-strong);
  box-shadow: 0 2px 6px rgba(17, 17, 17, 0.07);
}

.button-primary {
  color: #ffffff;
  background: #111111;
  border-color: #111111;
}

.button-primary:hover {
  background: #2a2a2a;
  border-color: #2a2a2a;
}

.button-secondary {
  background: var(--panel);
}

/* Surface / cards */

.surface,
.reference-card,
.callout,
.command-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.surface,
.callout,
.command-list {
  padding: 18px 20px;
}

.surface h3,
.reference-card strong {
  color: var(--text);
}

.surface p:last-child,
.callout p:last-child {
  margin-bottom: 0;
}

/* Reference card */

.reference-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.reference-card div {
  display: grid;
  gap: 5px;
}

.reference-card span {
  color: var(--muted);
  line-height: 1.6;
}

.reference-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.07);
}

/* Eyebrow labels */

.eyebrow-inline {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Command list */

.command-list {
  margin-top: 18px;
}

.command-list dt {
  margin: 0;
  font-weight: 700;
}

.command-list dd {
  margin: 6px 0 18px;
  color: var(--muted-strong);
}

.command-list dd:last-child {
  margin-bottom: 0;
}

/* Code blocks */

pre {
  overflow-x: auto;
  margin: 18px 0;
  padding: 16px 18px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 10px;
}

pre code {
  display: block;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
}

code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: rgba(17, 17, 17, 0.05);
  font-size: 0.94em;
}

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

/* Responsive */

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

@media (max-width: 960px) {
  .site-header-inner {
    padding: 14px 18px;
  }

  .header-nav {
    display: none;
  }

  .docs-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
    border: 0;
    overflow: visible;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
  }

  .docs-main {
    padding: 28px 18px 72px;
  }

  .doc,
  .page-intro h1 {
    max-width: none;
  }

  .card-grid,
  .comparison-grid,
  .step-grid,
  .link-grid,
  .button-row {
    grid-template-columns: 1fr;
  }
}
