/* Olibato documentation — repository-backed Read mode. */
:root {
  --docs-header-height: 68px;
  --docs-sidebar: 238px;
  --docs-toc: 176px;
  --docs-gap: clamp(30px, 4vw, 58px);
}

html { scroll-padding-top: calc(var(--docs-header-height) + 24px); }
body { min-width: 320px; background: var(--canvas); }

.docs-shell { min-height: 100vh; color: var(--ink); }

.docs-header {
  position: sticky;
  z-index: 60;
  inset-block-start: 0;
  display: flex;
  align-items: center;
  min-height: var(--docs-header-height);
  padding-inline: clamp(20px, 3vw, 42px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
}

.docs-product-divider { width: 1px; height: 22px; margin-inline: 18px; background: var(--border); }
.docs-product-name { color: var(--ink); font-weight: 800; text-decoration: none; letter-spacing: -0.02em; }
.docs-header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.docs-header-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 13px;
  color: var(--muted-strong);
  border-radius: var(--radius-control);
  font-size: var(--text-label);
  font-weight: 800;
  text-decoration: none;
}
.docs-header-actions a:hover { color: var(--ink); background: var(--surface); }
.docs-header-actions .docs-header-primary { color: var(--canvas); background: var(--control); padding-inline: 17px; }
.docs-header-actions .docs-header-primary:hover { color: var(--canvas); background: var(--launch-deep); }

.docs-layout {
  display: grid;
  grid-template-columns: var(--docs-sidebar) minmax(0, 760px) var(--docs-toc);
  gap: var(--docs-gap);
  width: min(100% - 48px, 1320px);
  margin-inline: auto;
  padding-block: 38px 92px;
}

.docs-sidebar, .docs-on-page { align-self: start; position: sticky; inset-block-start: calc(var(--docs-header-height) + 34px); }
.docs-navigation { font-size: var(--text-label); }
.docs-navigation-home {
  display: block;
  margin-block-end: 25px;
  color: var(--muted-strong);
  font-weight: 750;
  text-decoration: none;
}
.docs-navigation section + section { margin-block-start: 25px; }
.docs-navigation h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: var(--text-label);
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.docs-navigation ul { margin: 0; padding: 0; list-style: none; }
.docs-navigation li + li { margin-block-start: 2px; }
.docs-navigation a {
  display: block;
  padding: 7px 10px;
  color: var(--muted-strong);
  border-radius: 8px;
  line-height: 1.35;
  text-decoration: none;
}
.docs-navigation a:hover { color: var(--ink); background: var(--surface); }
.docs-navigation a.is-current { color: var(--launch-deep); background: var(--violet-wash); font-weight: 800; }

.docs-main { min-width: 0; }
.docs-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; padding: 0; list-style: none; }
.docs-breadcrumbs li { display: inline-flex; align-items: center; color: var(--muted); font-size: var(--text-label); font-weight: 700; }
.docs-breadcrumbs li:not(:last-child)::after { content: "/"; margin-inline-start: 6px; color: var(--quiet-slate); }
.docs-breadcrumbs a { color: var(--muted-strong); text-decoration: none; }
.docs-breadcrumbs a:hover { color: var(--launch-deep); text-decoration: underline; text-underline-offset: 3px; }

.docs-page-header { padding-block-end: 30px; border-bottom: 1px solid var(--border); }
.docs-page-header h1 {
  max-width: 18ch;
  margin: 0;
  color: var(--ink);
  font-size: var(--text-headline);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
}
.docs-page-header > p { max-width: 66ch; margin: 18px 0 0; color: var(--muted-strong); font-size: var(--text-body); line-height: 1.65; }
.docs-page-meta { display: flex; flex-wrap: wrap; gap: 14px 26px; margin: 24px 0 0; }
.docs-page-meta > div { display: flex; align-items: baseline; gap: 7px; }
.docs-page-meta dt { color: var(--muted); font-size: var(--text-label); font-weight: 800; text-transform: uppercase; letter-spacing: 0.035em; }
.docs-page-meta dd { margin: 0; color: var(--ink); font-size: var(--text-label); font-weight: 700; }
.docs-page-meta a { color: var(--launch-deep); text-underline-offset: 3px; }
.docs-status { display: inline-flex; padding: 3px 8px; border-radius: 8px; background: var(--surface); }
.docs-status-current { color: var(--success); background: var(--mint); }
.docs-status-unavailable { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--canvas)); }
.docs-status-internal-private { color: var(--launch-deep); background: var(--violet-wash); }

.docs-prose { max-width: 72ch; padding-block-start: 38px; color: var(--muted-strong); line-height: 1.75; }
.docs-prose > :first-child { margin-block-start: 0; }
.docs-prose h2, .docs-prose h3, .docs-prose h4 { position: relative; color: var(--ink); text-wrap: balance; }
.docs-prose h2 { margin: 52px 0 17px; font-size: var(--text-title); line-height: 1.2; letter-spacing: -0.03em; }
.docs-prose h3 { margin: 38px 0 13px; font-size: var(--text-body); line-height: 1.3; letter-spacing: -0.02em; }
.docs-prose h4 { margin: 30px 0 10px; font-size: var(--text-body); line-height: 1.4; }
.docs-prose p, .docs-prose ul, .docs-prose ol, .docs-prose table, .docs-prose blockquote { margin-block: 0 20px; }
.docs-prose ul, .docs-prose ol { padding-inline-start: 1.35rem; }
.docs-prose li { padding-inline-start: 0.28rem; }
.docs-prose li + li { margin-block-start: 8px; }
.docs-prose a { color: var(--launch-deep); font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.docs-prose a:hover { color: var(--ink); }
.heading-anchor { margin-inline-start: 8px; color: var(--quiet-slate) !important; font-weight: 600 !important; text-decoration: none !important; opacity: 0; }
.docs-prose h2:hover .heading-anchor, .docs-prose h3:hover .heading-anchor, .docs-prose h4:hover .heading-anchor, .heading-anchor:focus { opacity: 1; }
.docs-prose blockquote { padding: 18px 20px; color: var(--muted-strong); background: var(--violet-wash); border-radius: var(--radius-control); }
.docs-prose blockquote > :last-child { margin-block-end: 0; }
.docs-prose code { padding: 0.12em 0.34em; color: var(--launch-deep); background: var(--violet-wash); border-radius: 8px; font-size: inherit; }
.docs-prose pre { margin: 0; padding: 54px 22px 22px; overflow-x: auto; color: var(--canvas); background: var(--control); border-radius: var(--radius-card); line-height: 1.6; tab-size: 2; }
.docs-prose pre code { padding: 0; color: inherit; background: transparent; border-radius: 0; font-size: var(--text-label); }
.docs-code-block { position: relative; margin-block: 24px; }
.docs-copy-button {
  position: absolute;
  inset: 10px 10px auto auto;
  min-height: 44px;
  padding: 6px 10px;
  color: var(--canvas);
  background: color-mix(in srgb, var(--control) 84%, var(--canvas));
  border: 0;
  border-radius: 8px;
  font-size: var(--text-label);
  font-weight: 800;
}
.docs-copy-button:hover { background: var(--launch-deep); color: var(--canvas); }
.docs-prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: var(--text-body); }
.docs-prose th, .docs-prose td { min-width: 130px; padding: 11px 13px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
.docs-prose th { color: var(--ink); background: var(--surface); font-size: var(--text-label); font-weight: 850; }
.docs-prose hr { height: 1px; margin: 42px 0; background: var(--border); border: 0; }

.docs-on-page { padding-block-start: 2px; font-size: var(--text-label); }
.docs-on-page strong { display: block; margin-block-end: 10px; color: var(--ink); }
.docs-on-page ol { margin: 0; padding: 0; list-style: none; }
.docs-on-page li + li { margin-block-start: 8px; }
.docs-on-page a { color: var(--muted-strong); line-height: 1.35; text-decoration: none; }
.docs-on-page a:hover { color: var(--launch-deep); }

.docs-related { margin-block-start: 66px; padding-block-start: 28px; border-top: 1px solid var(--border); }
.docs-related h2 { margin: 0 0 16px; font-size: var(--text-body); letter-spacing: -0.02em; }
.docs-related ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.docs-related a { display: block; min-height: 100%; padding: 15px 16px; color: var(--ink); background: var(--surface); border-radius: 12px; text-decoration: none; }
.docs-related a:hover { background: var(--violet-wash); }
.docs-related span { display: block; font-weight: 800; }
.docs-related small { display: block; margin-block-start: 5px; color: var(--muted-strong); line-height: 1.45; }

.docs-mobile-navigation { display: none; }
.docs-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px clamp(20px, 3vw, 42px); color: var(--muted); border-top: 1px solid var(--border); font-size: var(--text-label); }
.docs-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.docs-footer a { color: var(--muted-strong); text-decoration: none; }
.docs-footer a:hover { color: var(--launch-deep); }

@media (max-width: 1080px) {
  .docs-layout { grid-template-columns: var(--docs-sidebar) minmax(0, 760px); width: min(100% - 40px, 1050px); }
  .docs-on-page { display: none; }
}

@media (max-width: 760px) {
  :root { --docs-header-height: 64px; }
  .docs-header { padding-inline: 18px; }
  .docs-product-divider { margin-inline: 12px; }
  .docs-header-actions > a:first-child { display: none; }
  .docs-header-actions a { min-height: 44px; padding-inline: 12px; }
  .docs-sidebar { display: none; }
  .docs-mobile-navigation { display: block; margin: 14px 18px 0; border-bottom: 1px solid var(--border); }
  .docs-mobile-navigation summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: var(--ink); font-size: var(--text-label); font-weight: 800; cursor: pointer; list-style: none; }
  .docs-mobile-navigation summary::-webkit-details-marker { display: none; }
  .docs-mobile-navigation summary svg { transition: transform 180ms ease; }
  .docs-mobile-navigation[open] summary svg { transform: rotate(180deg); }
  .docs-mobile-navigation .docs-navigation { max-height: min(62vh, 520px); padding: 8px 0 20px; overflow-y: auto; }
  .docs-layout { display: block; width: auto; padding: 24px 18px 70px; }
  .docs-page-header h1 { max-width: 20ch; font-size: var(--text-headline); }
  .docs-page-header > p { font-size: var(--text-body); }
  .docs-prose { padding-block-start: 30px; }
  .docs-prose h2 { margin-block-start: 42px; font-size: var(--text-title); }
  .docs-related { margin-block-start: 54px; }
  .docs-related ul { grid-template-columns: 1fr; }
  .docs-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .docs-product-name { font-size: var(--text-label); }
  .docs-product-divider { margin-inline: 9px; }
  .docs-header-actions .docs-header-primary { padding-inline: 10px; }
  .docs-page-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .docs-page-meta > div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .docs-prose pre { padding: 50px 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .docs-mobile-navigation summary svg { transition: none; }
}
