/* ─────────────────────────────────────────────────────────────────────────
 * Docs / user-guide wiki — LIGHT theme, layered on styles.css (NOT page.css).
 *
 * The guide is a product surface: users reach it from inside the app and from
 * the marketing pages, and every screenshot in it is of a light app UI. So it
 * follows the same light look as the home / product / compare pages rather
 * than the dark documentation theme that only the legal + about pages use.
 *
 * Do NOT link page.css alongside this — it would flip everything to dark and
 * make the light app screenshots glare.
 *
 * Self-contained for the docs markup: sidebar rail, article typography,
 * screenshot figures, callouts, numbered steps, reference tables, hub cards
 * and prev/next paging — all on the styles.css :root tokens.
 * ─────────────────────────────────────────────────────────────── */

/* ── Compact hero ──────────────────────────────────────────────── */
.dochero {
  position: relative;
  overflow: hidden;
  padding: 52px 0 36px;
  background:
    radial-gradient(60% 120% at 50% -10%, rgba(124, 92, 255, 0.11), transparent 60%),
    radial-gradient(40% 90% at 85% 0%, rgba(33, 212, 253, 0.09), transparent 60%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.dochero__inner { max-width: 780px; }
.dochero__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}
.dochero h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 14px;
}
.dochero__lede {
  font-size: 17.5px;
  line-height: 1.62;
  color: var(--muted);
  margin: 0;
}

/* ── Shell ─────────────────────────────────────────────────────── */
.docs { padding: 36px 0 96px; background: var(--surface); }
.docs__grid {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.docs__side {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.docs__side::-webkit-scrollbar { width: 6px; }
.docs__side::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 3px;
}
.docs-nav__group + .docs-nav__group { margin-top: 24px; }
.docs-nav__h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 8px;
  padding-left: 11px;
}
.docs-nav__group a {
  display: block;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.docs-nav__group a:hover { background: var(--surface-2); color: var(--ink); }
.docs-nav__group a.is-active {
  background: rgba(124, 92, 255, 0.08);
  border-left-color: var(--brand);
  color: var(--brand);
  font-weight: 650;
}

/* Mobile: rail becomes a disclosure above the article. */
.docs__side-toggle { display: none; }
@media (max-width: 900px) {
  .docs__grid { grid-template-columns: 1fr; gap: 0; }
  .docs__side {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 30px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0;
    background: var(--surface-2);
  }
  .docs__side-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: 0;
    color: var(--ink);
    font: inherit;
    font-weight: 650;
    font-size: 14px;
    cursor: pointer;
  }
  .docs__side-toggle::after {
    content: '▾';
    color: var(--muted-2);
    transition: transform 0.18s ease;
  }
  .docs__side.is-open .docs__side-toggle::after { transform: rotate(180deg); }
  .docs-nav { display: none; padding: 0 12px 16px; }
  .docs__side.is-open .docs-nav { display: block; }
}

/* ── Article ───────────────────────────────────────────────────── */
.docs__main { min-width: 0; max-width: 810px; }
.docs__crumb { font-size: 13px; color: var(--muted-2); margin-bottom: 14px; }
.docs__crumb a { color: var(--muted); text-decoration: none; }
.docs__crumb a:hover { color: var(--brand); }

.docs__main h2 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 54px 0 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
/* The first heading on a page shouldn't carry the section divider — it
   follows the breadcrumb (or an intro callout), not another section. */
.docs__main h2:first-child,
.docs__crumb + h2,
.docs__crumb + .callout + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.docs__main h3 {
  font-size: 17.5px;
  font-weight: 650;
  color: var(--ink);
  margin: 32px 0 8px;
}
.docs__main p,
.docs__main li {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--ink-2);
}
.docs__main ul, .docs__main ol { padding-left: 1.2rem; margin: 12px 0; }
.docs__main li { margin-bottom: 7px; }
.docs__main li::marker { color: var(--muted-2); }
.docs__main strong { color: var(--ink); font-weight: 650; }
.docs__main a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.docs__main a:hover { color: #5b3fd6; }
.docs__main code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 13px;
  color: var(--ink);
}
.docs__main hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* ── Screenshot figure ─────────────────────────────────────────── */
.shot {
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption {
  padding: 11px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

/* ── Callouts ──────────────────────────────────────────────────── */
.callout {
  margin: 22px 0;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(124, 92, 255, 0.26);
  border-left-width: 3px;
  background: rgba(124, 92, 255, 0.05);
}
.callout p { margin: 0; font-size: 14.5px; }
.callout p + p { margin-top: 8px; }
.callout__h {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 5px;
}
.callout--warn {
  border-color: rgba(255, 181, 71, 0.5);
  background: rgba(255, 181, 71, 0.09);
}
.callout--warn .callout__h { color: #b57516; }
.callout--admin {
  border-color: rgba(33, 212, 253, 0.42);
  background: rgba(33, 212, 253, 0.07);
}
.callout--admin .callout__h { color: #0b8fae; }

/* ── Numbered steps ────────────────────────────────────────────── */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 22px 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 20px 42px;
  border-left: 1px solid var(--line);
  margin-left: 13px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -13px;
  top: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
}
.steps__t { display: block; color: var(--ink); font-weight: 650; margin-bottom: 3px; }

/* ── Reference table ───────────────────────────────────────────── */
.dtable-wrap { overflow-x: auto; margin: 22px 0; }
.dtable {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.dtable th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.dtable td {
  padding: 11px 14px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  line-height: 1.55;
  vertical-align: top;
}
.dtable td:first-child { color: var(--ink); font-weight: 600; }
.dtable tr:last-child td { border-bottom: 0; }

/* ── Hub cards ─────────────────────────────────────────────────── */
.dcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin: 26px 0 8px;
}
.dcard {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.dcard:hover {
  border-color: rgba(124, 92, 255, 0.45);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.dcard__ico { font-size: 20px; line-height: 1; display: block; margin-bottom: 11px; }
.dcard h3 { font-size: 15.5px; font-weight: 650; color: var(--ink); margin: 0 0 6px; }
.dcard p { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; }

/* ── Prev / next paging ────────────────────────────────────────── */
.docs__paging {
  display: flex;
  gap: 14px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.docs__paging a {
  flex: 1;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none !important;
  background: var(--surface);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.docs__paging a:hover {
  border-color: rgba(124, 92, 255, 0.45);
  box-shadow: var(--shadow-sm);
}
.docs__paging .pg__l {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted-2);
  margin-bottom: 5px;
}
.docs__paging .pg__t { display: block; font-size: 14.5px; font-weight: 650; color: var(--ink); }
.docs__paging .pg--next { text-align: right; }

/* ── Small bits ────────────────────────────────────────────────── */
kbd {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  background: var(--surface-2);
  color: var(--ink);
  white-space: nowrap;
}
.tagline {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid rgba(124, 92, 255, 0.3);
  background: rgba(124, 92, 255, 0.08);
  color: var(--brand);
  vertical-align: middle;
}
.tagline--admin {
  border-color: rgba(33, 212, 253, 0.4);
  background: rgba(33, 212, 253, 0.09);
  color: #0b8fae;
}
