/* Docs + legal pages (on top of landing.css) */
.lp { overflow-x: clip; } /* 'hidden' would break the sticky table of contents */
.lp-pill a.on { color: var(--text); background: var(--bg-2, #f4f4f5); }

.doc-hero { max-width: 760px; padding: 56px 0 40px; }
.doc-eyebrow { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: #6a64e8; background: var(--accent-wash); padding: 4px 10px; border-radius: 9999px; margin-bottom: 16px; }
.doc-hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.045em; font-weight: 600; margin: 0 0 16px; }
.doc-hero p { font-size: 18px; line-height: 1.6; color: var(--muted); margin: 0; letter-spacing: -0.01em; }

.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.doc-toc { position: sticky; top: 24px; }
.doc-toc-in { display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line); padding-left: 2px; }
.doc-toc-h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 0 12px 10px; }
.doc-toc a { font-size: 14px; color: var(--muted); padding: 6px 12px; border-radius: 8px; margin-left: -3px; border-left: 2px solid transparent; }
.doc-toc a:hover { color: var(--text); background: var(--bg-2, #f4f4f5); text-decoration: none; }
.doc-toc a.on { color: var(--text); font-weight: 500; border-left-color: var(--accent); border-radius: 0 8px 8px 0; }

.doc { min-width: 0; max-width: 760px; font-size: 16px; line-height: 1.7; color: #33343d; }
.doc section { padding-top: 8px; margin-bottom: 52px; scroll-margin-top: 24px; }
.doc h2 { font-size: 26px; letter-spacing: -0.035em; font-weight: 600; color: var(--text); margin: 0 0 14px; line-height: 1.2; }
.doc h3 { font-size: 17px; letter-spacing: -0.02em; font-weight: 600; color: var(--text); margin: 28px 0 8px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--faint); }
.doc a { color: #5b55e0; text-decoration: underline; text-decoration-color: rgba(145, 141, 246, .45); text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: currentColor; }
.doc code { font-family: var(--mono); font-size: .86em; background: #f4f4f6; border: 1px solid #ececf0; padding: 1px 6px; border-radius: 6px; color: var(--text); white-space: nowrap; }
.doc-code { font-family: var(--mono); font-size: 13.5px; line-height: 1.65; background: #17181f; color: #e7e7ee; padding: 16px 18px; border-radius: 12px; overflow-x: auto; margin: 0 0 16px; white-space: pre; }
.doc-note { font-size: 14.5px; color: var(--muted); background: #fafafa; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }

.doc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.doc-cards > div { background: #fff; border-radius: 14px; padding: 18px; box-shadow: var(--shadow-ghost); font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.doc-cards b { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; letter-spacing: -0.015em; }

.doc-steps { list-style: none; padding: 0 !important; counter-reset: s; }
.doc-steps li { counter-increment: s; position: relative; padding: 2px 0 6px 44px; margin-bottom: 14px; }
.doc-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 9px; background: var(--accent-wash); color: #5b55e0; font-weight: 600; font-size: 14px; display: grid; place-items: center; }

.doc-table-wrap { overflow-x: auto; margin: 4px 0 18px; border-radius: 12px; box-shadow: var(--shadow-ghost); }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; background: #fff; }
.doc-table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; padding: 11px 16px; border-bottom: 1px solid var(--line); background: #fcfcfd; }
.doc-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f2; vertical-align: top; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td:first-child { white-space: nowrap; color: var(--text); }
.doc-table-sm { max-width: 420px; }
.doc-table-sm td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }

.doc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.doc-chips span { font-size: 13.5px; font-weight: 500; padding: 5px 11px; border-radius: 9999px; background: #fff; box-shadow: var(--shadow-ghost); color: var(--text); }

.doc-tools { display: flex; flex-direction: column; border-radius: 12px; box-shadow: var(--shadow-ghost); background: #fff; margin-bottom: 8px; }
.doc-tool { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 11px 16px; border-bottom: 1px solid #f0f0f2; font-size: 14px; line-height: 1.5; color: var(--muted); }
.doc-tool:last-child { border-bottom: 0; }
.doc-tool code { background: none; border: 0; padding: 0; font-size: 13px; color: #5b55e0; }

.doc-help { padding: 28px !important; border-radius: 16px; background: var(--accent-wash); }
.doc-help h2 { font-size: 22px; }
.doc-help p { margin: 0; }

/* legal */
.legal { margin: 0 auto; padding: 56px 0 0; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.045em; font-weight: 600; line-height: 1.05; margin: 0 0 8px; }
.legal-meta { color: var(--faint); font-size: 14px; margin-bottom: 32px !important; }
.legal h2 { font-size: 21px; margin-top: 40px; }
.legal h3 { font-size: 16px; margin-top: 20px; }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .doc { min-width: 0; }
  .doc code { white-space: normal; overflow-wrap: anywhere; }
  .doc-toc { position: static; margin-bottom: 32px; }
  .doc-toc-in { flex-direction: row; flex-wrap: wrap; gap: 4px; border: 0; padding: 0; }
  .doc-toc-h { width: 100%; padding: 0 0 6px; }
  .doc-toc a { background: #fff; box-shadow: var(--shadow-ghost); border-radius: 9999px; border-left: 0; margin: 0; font-size: 13px; padding: 5px 11px; }
  .doc-cards { grid-template-columns: 1fr; }
  .doc-tool { grid-template-columns: 1fr; gap: 2px; }
  .doc-hero { padding-top: 32px; }
}
