/* Veritura Docs — dark documentation shell.
   Committed static asset served by serveDocsSite at docs.veritura.co.
   Pages are generated from a shared shell; edit content in the HTML, layout here. */

:root {
  --bg: #0a0c10;
  --bg-raise: #0e1117;
  --panel: #11141c;
  --panel-2: #151a24;
  --code-bg: #0d1017;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #e8ecf4;
  --muted: #9aa3b3;
  --faint: #667085;
  --body: #b9c2d0;
  --accent: #6790ff;
  --accent-soft: rgba(103, 144, 255, 0.13);
  --accent-ink: #a8beff;
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.12);
  --amber: #f4b74f;
  --amber-soft: rgba(244, 183, 79, 0.1);
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --topbar-h: 58px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: calc(var(--topbar-h) + 24px); }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(168, 190, 255, 0.5); }
::selection { background: rgba(103, 144, 255, 0.28); }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 20px;
  background: rgba(10, 12, 16, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 25px; height: 25px; display: block; }
.brand .wordmark { font-size: 17.5px; font-weight: 700; letter-spacing: -0.015em; color: #fff; line-height: 1; }
.brand .docs-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint); padding-left: 10px; border-left: 1px solid var(--line-2); line-height: 1.6;
  transform: translateY(1px);
}
.top-tabs { display: flex; gap: 4px; align-items: center; height: 100%; }
.top-tabs a {
  display: flex; align-items: center; height: 100%;
  padding: 0 13px; font-size: 13.5px; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent; border-top: 2px solid transparent;
}
.top-tabs a:hover { color: var(--text); text-decoration: none; }
.top-tabs a.active { color: #fff; border-bottom-color: var(--accent); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-btn {
  display: flex; align-items: center; gap: 8px;
  font: 400 12.5px var(--sans); color: var(--faint);
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px 6px 12px; cursor: pointer; min-width: 190px;
}
.search-btn:hover { border-color: var(--line-2); color: var(--muted); }
.search-btn svg { width: 13px; height: 13px; stroke: currentColor; }
.search-btn .kbd { margin-left: auto; }
.kbd {
  font: 500 10.5px var(--mono); color: var(--faint);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 5px; background: var(--panel);
}
.site-link {
  font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: transparent;
}
.site-link:hover { color: #fff; border-color: var(--line-2); text-decoration: none; }
.site-link.primary { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; }
.site-link.primary:hover { background: #7b9eff; }
.menu-btn { display: none; }

/* ---------- Frame ---------- */
.frame {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr) 224px;
  max-width: 1360px; margin: 0 auto;
  padding-top: var(--topbar-h);
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 14px 40px 20px;
  border-right: 1px solid var(--line);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.nav-sec {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--faint); margin: 26px 0 7px 10px;
}
.nav-sec:first-child { margin-top: 2px; }
.sidebar a.nav {
  display: block; padding: 6px 10px; margin: 1px 0;
  font-size: 13.5px; color: var(--muted); border-radius: 7px; line-height: 1.45;
}
.sidebar a.nav:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); text-decoration: none; }
.sidebar a.nav.active { color: #fff; background: rgba(255, 255, 255, 0.06); font-weight: 500; box-shadow: inset 2px 0 0 var(--accent); }
.side-foot { margin: 34px 10px 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); line-height: 1.8; }

/* ---------- Main column ---------- */
main { padding: 44px 52px 30px; max-width: 780px; }
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 10px;
}
h1 { font-size: 31px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; color: #fff; }
.lede { margin: 14px 0 6px; font-size: 15.5px; color: var(--muted); line-height: 1.7; }
.h1-rule { border: 0; border-top: 1px solid var(--line); margin: 26px 0 4px; }
h2 {
  font-size: 19.5px; font-weight: 600; letter-spacing: -0.01em; color: #fff;
  margin: 48px 0 14px; scroll-margin-top: calc(var(--topbar-h) + 22px);
}
h3 { font-size: 15.5px; font-weight: 600; color: var(--text); margin: 26px 0 8px; }
main p { margin: 13px 0; color: var(--body); }
main ul, main ol { margin: 13px 0 13px 22px; color: var(--body); }
main li { margin: 8px 0; }
main li::marker { color: var(--faint); }
main strong, main b { color: var(--text); font-weight: 600; }
main em { color: var(--text); }
.anchor { color: var(--faint); font-weight: 400; margin-left: 8px; opacity: 0; font-size: 0.85em; }
h2:hover .anchor { opacity: 1; }
.anchor:hover { color: var(--accent-ink); text-decoration: none; }

/* code */
code {
  font: 450 0.875em/1.5 var(--mono); color: #e3e9f4;
  background: rgba(148, 163, 184, 0.09);
  border-radius: 4px; padding: 1px 5px; white-space: nowrap;
}
pre {
  position: relative;
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 9px;
  padding: 16px 20px; margin: 18px 0; overflow-x: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent;
}
pre code {
  background: none; border: 0; padding: 0; white-space: pre;
  font: 400 12.75px/1.7 var(--mono); color: #d7deea;
}
pre .c { color: #5b6577; }
pre .k { color: #9db4ff; }
pre .s { color: #86d3a8; }
.copy-btn {
  position: absolute; top: 9px; right: 9px;
  font: 500 11px var(--sans); color: var(--faint);
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 9px; cursor: pointer; opacity: 0; transition: opacity 0.12s;
}
pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--text); border-color: var(--line-2); }
.copy-btn.done { color: var(--green); border-color: rgba(52, 211, 153, 0.4); opacity: 1; }

/* endpoint row */
.ep {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 0 0 14px; margin: 26px 0 16px;
  border-bottom: 1px solid var(--line-2);
}
.ep > code { background: none; padding: 0; color: #fff; font-size: 15.5px; font-weight: 500; white-space: normal; word-break: break-all; }
.method { font: 700 12px var(--mono); letter-spacing: 0.05em; flex: none; }
.method.get { color: var(--green); }
.method.post { color: var(--accent); }
.auth-chip {
  margin-left: auto; flex: none;
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint);
}
.auth-chip.session { color: var(--green); }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 18px 0 28px; }
table { border-collapse: collapse; width: 100%; font-size: 13.75px; }
th {
  text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: 0;
  color: var(--muted); padding: 0 20px 9px 0; border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
td { padding: 13px 20px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--body); line-height: 1.6; }
td code { white-space: normal; overflow-wrap: break-word; }

/* notes */
.note {
  border-left: 2px solid var(--accent);
  padding: 3px 0 3px 18px; margin: 24px 0;
}
.note p { margin: 0; font-size: 14px; color: var(--body); line-height: 1.7; }
.note p + p { margin-top: 8px; }
.note strong { color: var(--text); }
.note.warn { border-left-color: var(--amber); }
.note.boundary { border-left-color: var(--green); }

/* cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.card {
  display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 13px;
  padding: 18px 20px; transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.card:hover { border-color: rgba(103, 144, 255, 0.45); background: var(--panel-2); transform: translateY(-1px); text-decoration: none; }
.card b { display: block; font-size: 14.5px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.card b::after { content: " →"; color: var(--accent-ink); font-weight: 400; opacity: 0; transition: opacity 0.15s; }
.card:hover b::after { opacity: 1; }
.card span { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* steps */
ol.steps { counter-reset: step; margin: 20px 0; list-style: none; }
ol.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 22px 42px; margin: 0;
}
ol.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 3px;
  color: var(--accent); font: 600 12.5px var(--mono); letter-spacing: 0.04em;
}
ol.steps > li > b { color: #fff; }

/* pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 52px 0 0; }
.pager a {
  display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; transition: border-color 0.15s;
}
.pager a:hover { border-color: rgba(103, 144, 255, 0.45); text-decoration: none; }
.pager a.next { text-align: right; grid-column: 2; }
.pager a.prev { grid-column: 1; }
.pager .dir { display: block; font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.pager .pt { font-size: 14px; font-weight: 600; color: var(--text); }

/* footer */
.page-foot { margin-top: 46px; padding: 22px 0 8px; border-top: 1px solid var(--line); }
.page-foot .boundary-line { font-size: 12.5px; color: var(--faint); line-height: 1.7; margin: 0; }
.page-foot .meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--faint); margin-top: 12px; }
.page-foot .meta a { color: var(--muted); }

/* ---------- Right rail ---------- */
.toc {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto; padding: 44px 20px 40px 6px;
  font-size: 12.5px;
}
.toc-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 10px;
}
.toc a {
  display: block; color: var(--faint); padding: 4px 0 4px 12px; line-height: 1.45;
  border-left: 2px solid var(--line);
}
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--accent-ink); border-left-color: var(--accent); }

/* ---------- Search modal ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 6, 9, 0.72); backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center; padding: 12vh 20px 0;
}
.search-overlay.open { display: flex; }
.search-panel {
  width: 100%; max-width: 560px;
  background: var(--bg-raise); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); overflow: hidden;
}
.search-panel input {
  width: 100%; background: transparent; border: 0; outline: 0;
  font: 400 15px var(--sans); color: var(--text);
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.search-panel input::placeholder { color: var(--faint); }
.search-results { max-height: 46vh; overflow-y: auto; padding: 8px; }
.search-results a {
  display: block; padding: 9px 12px; border-radius: 8px; color: var(--muted); font-size: 13.5px;
}
.search-results a .in { display: block; font-size: 11px; color: var(--faint); margin-top: 1px; }
.search-results a.sel, .search-results a:hover { background: var(--accent-soft); color: #fff; text-decoration: none; }
.search-empty { padding: 18px 14px; font-size: 13px; color: var(--faint); }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .frame { grid-template-columns: 256px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .top-tabs, .search-btn .kbd { display: none; }
  .search-btn { min-width: 0; }
  .site-link { display: none; }
  .frame { grid-template-columns: minmax(0, 1fr); }
  main { padding: 30px 22px 20px; }
  h1 { font-size: 26px; }
  .cards, .pager { grid-template-columns: 1fr; }
  .pager a.next { grid-column: auto; text-align: left; }
  .menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: none;
    background: var(--bg-raise); border: 1px solid var(--line); border-radius: 8px;
    color: var(--muted); cursor: pointer;
  }
  .sidebar {
    position: fixed; inset: var(--topbar-h) auto 0 0; z-index: 50;
    width: min(300px, 84vw); background: var(--bg-raise);
    transform: translateX(-102%); transition: transform 0.18s ease;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.5);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open::after {
    content: ""; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 40;
    background: rgba(5, 6, 9, 0.6);
  }
}

@media (max-width: 900px) {
  .search-btn .sb-label { display: none; }
  .search-btn { padding: 7px 9px; }
}
