/* Blu Labs Docs */
@font-face { font-family: "Geist"; src: url("../fonts/Geist-400.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Noto Sans Devanagari"; src: url("../fonts/NotoSansDevanagari-500.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0900-097F, U+200C-200D, U+20B9, U+25CC; }

:root {
  --bg: #ffffff; --surface: #f6f7f9; --surface-2: #eef0f3; --line: #e6e8ec; --line-2: #d9dce2;
  --ink: #0b0c0e; --ink-2: #2b2f36; --muted: #5a606b; --soft: #6b717c;
  --blu: #0b74b8; --blu-deep: #075985; --blu-tint: #e8f4fc;
  --green: #0e6e4f; --green-tint: #e6f5ee; --amber: #7a4a00; --amber-tint: #fff3dc;
  --sans: "Geist", "Noto Sans Devanagari", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --side: 300px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
::selection { background: var(--blu); color: #fff; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blu); outline-offset: 2px; border-radius: 6px; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i--sm { width: 13px; height: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.mono { font-family: var(--mono); font-size: .88em; }

/* sidebar */
.side { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--side); display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--line); }
.side__top { padding: 22px 24px 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark { width: 28px; height: 28px; }
.logo__word { font-weight: 600; font-size: 1.15rem; letter-spacing: -.03em; }
.logo__dot { color: var(--blu); }
.logo__labs { font-weight: 500; color: var(--muted); }
.logo__docs { padding-left: 10px; border-left: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.search { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 22px; height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--soft); cursor: pointer; text-align: left; transition: border-color .15s; }
.search:hover { border-color: var(--line-2); }
.search span { flex: 1; font-size: .92rem; }
.search kbd { font-family: var(--sans); font-size: .76rem; color: var(--soft); }
.side__nav { flex: 1; overflow-y: auto; padding: 14px 16px 24px; }
.side__group { margin-top: 18px; }
.side__group:first-child { margin-top: 4px; }
.side__h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 0 8px; font-size: .88rem; font-weight: 500; color: var(--ink); }
.side__nav ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; }
.side__group:not(:first-child) ul { margin-left: 15px; padding-left: 8px; border-left: 1px solid var(--line); }
.side__nav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; font-size: .9rem; color: var(--muted); text-decoration: none; transition: background-color .12s, color .12s; }
.side__nav a .i { color: var(--soft); }
.side__nav a:hover { background: var(--surface); color: var(--ink); }
.side__nav a[aria-current="page"] { background: var(--blu-tint); color: var(--blu-deep); font-weight: 500; }
.side__nav a[aria-current="page"] .i { color: var(--blu); }
.side__tag { margin-left: auto; padding: 0 6px; border-radius: 6px; background: var(--amber-tint); color: var(--amber); font-size: .66rem; font-weight: 500; white-space: nowrap; }
.side__foot { padding: 10px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 1px; }
.side__foot a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: .9rem; color: var(--muted); text-decoration: none; }
.side__foot a span { flex: 1; }
.side__foot a:hover { background: var(--surface); color: var(--ink); }

/* main column */
.main { margin-left: var(--side); min-height: 100vh; }
.tabs { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 40px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tabs__nav { display: flex; gap: 26px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs__nav a { display: inline-flex; align-items: center; gap: 8px; height: 100%; border-bottom: 2px solid transparent; font-size: .92rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tabs__nav a:hover { color: var(--ink); }
.tabs__nav a[aria-current="page"] { color: var(--ink); font-weight: 500; border-bottom-color: var(--blu); }
.menu { display: none; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer; }

.body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 56px; max-width: 1120px; padding: 56px 40px 80px; }
.article { min-width: 0; max-width: 720px; }
.crumb { margin: 0 0 8px; font-size: .86rem; font-weight: 500; color: var(--blu-deep); }
.title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.title h1 { margin: 0; font-size: 2.15rem; font-weight: 500; letter-spacing: -.035em; line-height: 1.15; }
.copy { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.copy:hover { background: var(--surface); }
.lede { margin: 10px 0 0; font-size: 1.15rem; line-height: 1.55; color: var(--muted); }

.prose { margin-top: 28px; }
.prose > p, .prose li { color: var(--ink-2); }
.prose h2 { margin: 40px 0 12px; font-size: 1.35rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--soft); }
.prose a:not(.btn):not(.card):not(.logo-card) { color: var(--blu-deep); text-decoration: underline; text-decoration-color: rgba(7, 89, 133, .3); text-underline-offset: .2em; }
.prose a:not(.btn):not(.card):not(.logo-card):hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 600; color: var(--ink); }

.badge { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: .74rem; font-weight: 500; white-space: nowrap; line-height: 1.7; }
.badge--ready { background: var(--green-tint); color: var(--green); }
.badge--req { background: var(--amber-tint); color: var(--amber); }
.badge--soon { background: var(--surface-2); color: var(--muted); }
.legend { list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.legend li { display: flex; align-items: center; gap: 10px; margin: 0; }

.btn { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: .92rem; font-weight: 500; text-decoration: none; }
.btn:hover { background: #2a2c31; }

.cards { display: grid; gap: 14px; margin: 18px 0; }
.cards--2 { grid-template-columns: 1fr 1fr; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: #bfe2f7; box-shadow: 0 6px 20px -12px rgba(11, 116, 184, .35); }
.card__i { width: 22px; height: 22px; margin-bottom: 8px; fill: none; stroke: var(--blu); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card__t { font-weight: 500; font-size: 1.02rem; color: var(--ink); }
.card__d { font-size: .92rem; line-height: 1.55; color: var(--muted); }
.card__k { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 500; color: var(--blu-deep); }
.card__k .i { color: var(--blu); }
.card__go { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 12px; font-size: .9rem; font-weight: 500; color: var(--blu-deep); }

.steps { list-style: none; margin: 18px 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; margin: 0; padding: 0 0 24px 46px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: .85rem; font-weight: 500; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 34px; bottom: 6px; width: 1px; background: var(--line); }
.steps__t { display: block; font-weight: 500; color: var(--ink); }
.steps__d { display: block; margin-top: 2px; color: var(--muted); }
.steps a { color: var(--blu-deep); }

.callout { margin: 20px 0; padding: 14px 16px; border-radius: 12px; border: 1px solid; }
.callout strong { display: block; font-size: .88rem; font-weight: 600; }
.callout p { margin: 2px 0 0; font-size: .95rem; }
.callout--tip { background: #effaf4; border-color: #cdeedd; color: #0c4f39; }
.callout--note { background: var(--blu-tint); border-color: #cde6f7; color: #0b3a5c; }
.callout--info { background: var(--surface); border-color: var(--line); color: var(--ink-2); }

.example { margin: 20px 0; padding: 16px 18px; border-radius: 12px; background: var(--surface); }
.example figcaption { margin-bottom: 10px; font-size: .84rem; font-weight: 500; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0; font-size: .95rem; }
.kv dt { font-family: var(--mono); font-size: .86rem; color: var(--blu-deep); }
.kv dd { margin: 0; }
.gloss { display: grid; gap: 0; margin: 0; }
.gloss dt { margin-top: 16px; font-weight: 600; }
.gloss dd { margin: 2px 0 0; color: var(--muted); }

.table { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.example .table { margin: 0; }
.cap, .mini { width: 100%; border-collapse: collapse; font-size: .93rem; }
.cap th, .cap td, .mini th, .mini td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cap thead th, .mini thead th { background: var(--surface); font-size: .8rem; font-weight: 500; color: var(--muted); }
.cap tbody th { font-weight: 500; border-right: 1px solid var(--line); white-space: nowrap; }
.cap tbody tr:last-child td, .cap tbody tr:last-child th, .mini tbody tr:last-child td { border-bottom: 0; }
.cap td:last-child { width: 1%; white-space: nowrap; }
.prose .cap td a { color: var(--ink); text-decoration: none; }
.prose .cap td a:hover { color: var(--blu-deep); text-decoration: underline; }

.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 14px 0; }
.logo-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-weight: 500; text-decoration: none; }
a.logo-card:hover { border-color: #bfe2f7; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.pager a:hover { border-color: #bfe2f7; }
.pager span { font-size: .8rem; color: var(--soft); }
.pager strong { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--blu-deep); }
.pager__next { text-align: right; justify-items: end; }
.article__foot { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--soft); }
.article__foot a { color: var(--soft); }

.toc { position: sticky; top: 100px; align-self: start; font-size: .88rem; }
.toc__h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 500; color: var(--ink); }
.toc ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc a { display: block; margin-left: -1px; padding: 4px 0 4px 14px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { border-left-color: var(--blu); color: var(--blu-deep); font-weight: 500; }

/* home */
.article--home { max-width: 1040px; grid-column: 1 / -1; }
.hero { padding: 24px 0 8px; text-align: center; }
.hero h1 { margin: 0; font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.08; }
.hero p { margin: 12px 0 0; font-size: 1.15rem; color: var(--muted); }
.hero__cards { margin-top: 40px; }
.tabrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.tabrow a { display: flex; gap: 12px; text-decoration: none; }
.tabrow .i { width: 18px; height: 18px; margin-top: 3px; color: var(--blu); }
.tabrow span { display: grid; font-size: .9rem; color: var(--muted); line-height: 1.45; }
.tabrow strong { font-weight: 500; color: var(--ink); }
.tabrow a:hover strong { color: var(--blu-deep); }

/* search */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; background: rgba(11, 12, 14, .35); backdrop-filter: blur(2px); }
.modal[hidden] { display: none; }
.modal__box { width: min(600px, 100%); border-radius: 14px; background: var(--bg); box-shadow: 0 24px 60px -20px rgba(11, 12, 14, .45); overflow: hidden; }
.modal__field { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--soft); }
.modal__field input { flex: 1; height: 54px; border: 0; outline: 0; background: transparent; font-size: 1rem; color: var(--ink); }
.modal__results { max-height: 50vh; overflow-y: auto; margin: 0; padding: 8px; list-style: none; }
.modal__results a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.modal__results a:hover, .modal__results a[aria-selected="true"] { background: var(--blu-tint); }
.modal__results strong { font-weight: 500; }
.modal__results span { font-size: .85rem; color: var(--muted); }
.modal__empty { padding: 16px 12px; color: var(--muted); font-size: .92rem; }

/* responsive */
@media (max-width: 1180px) { .body { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .25s cubic-bezier(.16, 1, .3, 1); box-shadow: none; }
  .side.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(11, 12, 14, .3); }
  .main { margin-left: 0; }
  .menu { display: grid; }
  .tabs { padding: 0 16px; }
  .body { padding: 32px 20px 64px; }
  .title h1 { font-size: 1.8rem; }
  .copy { margin-left: 0; }
  .cards--2, .cards--3, .tabrow { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .001ms !important; } }
