/* Docs layout, tables, and the architecture figure.
   A separate file so it is not part of the landing page CSS budget. */
.docs .wrap { padding-block: 28px 72px; }
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px 56px; }
.docs-tabs { grid-column: 1 / -1; position: sticky; top: var(--nav-h); z-index: 30; display: flex; gap: 4px; margin: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.docs-tabs a { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 -1px; padding: 10px 16px 12px; color: var(--text); font-weight: 600; border-bottom: 2px solid transparent; }
.docs-tabs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.docs-tabs a:hover { color: var(--ink); text-decoration: none; }
.docs-tabs a[aria-current] { color: var(--coral-ink); border-bottom-color: var(--coral-ink); }
.docs-side { position: sticky; top: calc(var(--nav-h) + 48px); align-self: start; font-size: 15px; }
.docs-side ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.docs-side a { display: block; margin-left: -1px; padding: 6px 16px; color: var(--text); border-left: 2px solid transparent; }
.docs-side a:hover { color: var(--ink); text-decoration: none; }
.docs-side a[aria-current="page"] { color: var(--coral-ink); border-left-color: var(--coral-ink); font-weight: 600; }
.doc { max-width: 780px; min-width: 0; }
.doc h1 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -.03em; }
.doc h2 { font-size: 26px; margin-top: 1.9em; }
.doc h3 { margin-top: 1.5em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--ink); }
.doc .term { margin: 0 0 22px; box-shadow: none; }
.guide-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; margin-top: 8px; }
.guide-card { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-height: 248px; padding: 22px; border-radius: 18px; background: #1c2736; color: #fff; }
.guide-card:hover { background: #243244; text-decoration: none; }
.guide-icon { display: grid; place-items: center; width: 72px; height: 72px; flex: none; border-radius: 16px; background: #3b6cff; }
.guide-icon svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.guide-copy { margin-top: auto; }
.guide-title { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; color: #fff; }
.guide-time { display: block; margin-top: 8px; color: #93a4b8; font-size: 15px; }
.guide-code { display: block; width: max-content; max-width: 100%; padding: 16px 18px 16px 0; border-radius: 14px; background: #3156d4; color: #fff; box-shadow: 0 16px 40px rgba(8, 16, 32, .35); }
.guide-code ol { list-style: none; margin: 0; padding: 4px 8px 4px 0; counter-reset: line; font-family: var(--mono); font-size: 14px; line-height: 1.65; }
.guide-code li { counter-increment: line; display: grid; grid-template-columns: 2.4em minmax(0, 1fr); margin: 0; white-space: pre; }
.guide-code li::before { content: counter(line); color: rgba(255, 255, 255, .62); text-align: right; padding-right: 12px; }
@media (max-width: 820px) {
  .guide-row { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .docs-layout > * { min-width: 0; max-width: calc(100vw - 48px); }
  .docs-tabs { top: 61px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .docs-tabs a { justify-content: center; gap: 6px; padding: 10px 0 12px; font-size: 14px; }
  .docs-side { position: static; }
  .docs-side ul { display: flex; flex-wrap: wrap; gap: 2px 4px; border-left: 0; }
  .docs-side a { padding: 4px 10px; border-left: 0; margin: 0; }
}

.scroll { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--r); }
table.fields { border-collapse: collapse; width: 100%; font-size: 15px; }
table.fields th, table.fields td { text-align: left; vertical-align: top; padding: 9px 14px; border-bottom: 1px solid var(--line); }
table.fields tr:last-child td { border-bottom: 0; }
table.fields th { background: var(--soft); color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
table.fields td.n, table.fields th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.arch { margin: 1.6em 0 .4em; padding: 24px; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; }
.arch-box { padding: 12px 16px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); text-align: center; box-shadow: var(--shadow); }
.arch-core { background: var(--night); border-color: var(--night); }
.arch-name { margin: 0; font-weight: 700; color: var(--ink); }
.arch-note { margin: 2px 0 0; font-size: 14.5px; line-height: 1.45; }
.arch-core .arch-name { color: #fff; }
.arch-core .arch-note { color: var(--mist); }
.arch-down { display: flex; flex-direction: column; align-items: center; margin: 0; color: #5f7386; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.6; }
.arch-down::before, .arch-down::after { content: ""; width: 2px; height: 8px; background: #b9c6d3; }
.arch-down-split, .arch-or { display: none; }
.arch-fork { width: 2px; height: 12px; margin: 0 auto; background: #b9c6d3; }
.arch-hosts { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 14px; }
.arch-hosts::before { content: ""; position: absolute; top: 0; left: calc(25% - 3px); right: calc(25% - 3px); height: 2px; background: #b9c6d3; }
.arch-hosts > .arch-box { position: relative; }
.arch-hosts > .arch-box::before { content: ""; position: absolute; top: -15px; left: calc(50% - 1px); width: 2px; height: 14px; background: #b9c6d3; }
.arch figcaption { margin: 16px 0 0; font-size: 14.5px; }
@media (max-width: 560px) {
  .arch-fork, .arch-hosts::before, .arch-hosts > .arch-box::before { display: none; }
  .arch-down-split { display: flex; }
  .arch-hosts { grid-template-columns: 1fr; padding-top: 0; }
  .arch-or { display: block; margin: 0; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #5f7386; }
}
