/* ============================================================
   layout-v2.css — October 2026 layout pass. Loaded last.

   Desktop: navigation on the left, reading column centred, page
   contents (TOC) on the right, thicker navigation scrollbar.
   Mobile: full-screen navigation behind the hamburger; a page
   shows only its content and the hamburger in the top-left.
   ============================================================ */

/* ── Navigation scrollbar, all widths ───────────────────────── */
.sb-body { scrollbar-width: auto; scrollbar-color: #C9C0AE transparent; }
.sb-body::-webkit-scrollbar { width: 12px !important; display: block !important; }
.sb-body::-webkit-scrollbar-track { background: var(--ivory-2); }
.sb-body::-webkit-scrollbar-thumb {
  background: #C9C0AE;
  border-radius: 8px;
  border: 3px solid var(--ivory-2);
}
.sb-body::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* Mobile-only lock button inside the navigation. */
.sb-lock-mobile { display: none; }

/* ── Typography: Lora headings, Lato text (same pairing as the briefs) ── */
:root {
  --font:  'Lato', -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
}
body { font-family: var(--font); letter-spacing: normal; }
.doc-body h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.01em;
}
.doc-body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: -0.005em;
}
.doc-body h4 { font-family: var(--serif); }
.ov-heading { font-family: var(--serif); letter-spacing: -0.015em; }
.doc-body p, .doc-body li { font-size: 14.5px; line-height: 1.75; font-weight: 400; color: var(--ink-2); }
.doc-body td { font-weight: 400; color: var(--ink-2); }
.sb-item, .toc-link { font-weight: 400; }

/* ── Desktop: TOC on the right, as wide as the navigation ───── */
@media (min-width: 901px) {
  .doc-layout { justify-content: center; }
  .doc-body {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
    padding: 44px 40px 88px;
  }
  .doc-toc {
    order: 2;
    width: var(--sidebar-w);
    flex-shrink: 0;
    border-right: 0;
    border-left: 1px solid var(--ivory-3);
    padding: 32px 0;
    scrollbar-width: thin;
    scrollbar-color: #C9C0AE transparent;
  }
  .doc-toc::-webkit-scrollbar { width: 6px !important; }
  .doc-toc::-webkit-scrollbar-track { background: transparent; }
  .doc-toc::-webkit-scrollbar-thumb { background: #C9C0AE !important; border-radius: 6px; }
  .doc-toc .toc-hdr { padding: 0 20px 12px; }
  .doc-toc .toc-link { font-size: 12px; padding: 5px 20px; margin-left: 0; }
  .doc-toc .toc-link.l2 { padding-left: 32px; font-size: 11.5px; }
  .doc-toc .toc-link.l3 { padding-left: 44px; font-size: 11px; }
  .toc-toggle { display: none !important; }
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Top bar carries only the hamburger. */
  .topbar {
    background: var(--ivory);
    border-bottom: 0;
    box-shadow: none;
  }
  .topbar-mark,
  .wordmark,
  .topbar-right { display: none !important; }

  /* The navigation covers the whole screen when open. */
  .sidebar {
    width: 100vw !important;
    right: 0;
    box-shadow: none;
    background: var(--ivory);
    border-right: 0;
  }
  .sidebar-backdrop { display: none !important; }

  .sb-lock-mobile {
    display: block;
    margin: 4px 14px 28px;
    width: calc(100% - 28px);
    height: 40px;
    background: transparent;
    border: 1px solid var(--ink);
    border-radius: var(--r);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
  }

  /* A page is the page only: no contents bar. */
  .doc-toc { display: none !important; }

  /* Keep the reading column to the screen width; wide tables scroll inside their wrapper. */
  .main, #main-content { overflow-x: hidden; }
  .doc-layout { width: 100%; min-width: 0; }
  .doc-body { width: 100%; min-width: 0; }
  .table-wrapper { max-width: 100%; overflow-x: auto; }
}
