.info-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--line);
}
.info-title {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 20px 0 24px;
  max-width: 18ch;
}
.info-lede {
  color: var(--fg-dim);
  font-size: 16px;
  line-height: 1.6;
  max-width: 72ch;
  margin: 0;
}

.info-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  padding: 56px 0 24px;
}

.toc {
  position: sticky;
  top: 32px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.toc a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-mute);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: color 120ms;
}
.toc a:hover { color: var(--fg); }
.toc a.active { color: var(--accent); }

.info-main { min-width: 0; }

.doc-section {
  padding: 40px 0 64px;
  border-bottom: 1px solid var(--line);
}
.doc-section:last-child { border-bottom: none; }

/* Markdown typography */
.doc-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg);
  max-width: 78ch;
}
.doc-body h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 24px;
  line-height: 1.15;
}
.doc-body h2 {
  font-size: 20px;
  letter-spacing: 0;
  font-weight: 600;
  text-transform: none;
  margin: 40px 0 14px;
  color: var(--fg);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.doc-body h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 28px 0 10px;
}
.doc-body p { margin: 12px 0; color: var(--fg); }
.doc-body strong { color: var(--fg); font-weight: 600; }
.doc-body em { color: var(--fg-dim); font-style: italic; }
.doc-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.doc-body a:hover { border-bottom-color: var(--accent); }
.doc-body ul, .doc-body ol { padding-left: 22px; margin: 12px 0; }
.doc-body li { margin: 6px 0; }
.doc-body li::marker { color: var(--fg-mute); }
.doc-body blockquote {
  border-left: 2px solid var(--accent);
  margin: 20px 0;
  padding: 6px 0 6px 18px;
  color: var(--fg-dim);
}
.doc-body hr { border: none; border-top: 1px solid var(--line); margin: 32px 0; }

/* Inline + block code */
.doc-body code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-soft);
  color: var(--accent);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.doc-body pre {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 0;
  max-width: 100%;
}
.doc-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--fg);
  font-size: 12.5px;
  line-height: 1.55;
}

/* Tables */
.doc-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12.5px;
  margin: 20px 0;
}
.doc-body th {
  text-align: left;
  font-weight: 600;
  color: var(--fg-dim);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.2em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-strong);
}
.doc-body td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--fg);
}

/* Mermaid diagrams — let them breathe */
.doc-body .mermaid {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 32px;
  margin: 24px 0;
  text-align: center;
  overflow-x: auto;
  max-width: 100%;
}
.doc-body .mermaid svg { max-width: 100%; height: auto; }

@media (max-width: 900px) {
  .info-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    padding-left: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    gap: 16px;
  }
  .doc-body { font-size: 14.5px; }
}
