/* Logthread landing page — brand UI v2 (docs/design/brand-ui.md). */
:root {
  --ink-950: #071318;
  --ink-900: #0b1c23;
  --ink-800: #11272f;
  --ink-700: #1a3640;
  --text-inv: #e9f3f5;
  --text-inv-2: #9bb3bb;
  --accent: #2fd6c3;
  --accent-ink: #04221f;
  --accent-soft: rgba(47, 214, 195, .14);
  --ok: #3ccf91;
  --warn: #f5b64a;
  --err: #ff6b6b;
  --info: #5cb8ff;
  --r-pill: 999px;
  --r-card: 14px;
  --r-sm: 8px;
  --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --cut: 56px;
  --pad: 112px;
  /* light sections */
  --bg: #ffffff;
  --bg-alt: #f3f7f8;
  --line: #dfe7ea;
  --text: #0d1f26;
  --text-2: #4a5d65;
  --accent-text: #0b7569;
  --accent-line: #0e8a7d;
  --card: #ffffff;
  --code-bg: #0b1c23;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1c23; --bg-alt: #0e2129; --line: #1f3b45; --text: #e9f3f5; --text-2: #a9bfc6;
    --accent-text: #2fd6c3; --accent-line: #2fd6c3; --card: #11272f; --code-bg: #071318; color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0b1c23; --bg-alt: #0e2129; --line: #1f3b45; --text: #e9f3f5; --text-2: #a9bfc6;
  --accent-text: #2fd6c3; --accent-line: #2fd6c3; --card: #11272f; --code-bg: #071318; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, figure, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--accent-text); }
svg { flex: none; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 3px; border-radius: 6px; }
.dark :focus-visible, .top :focus-visible, .bar :focus-visible { outline-color: var(--accent); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--r-pill); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: var(--r-pill); border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 600 15px/1 var(--font); text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: #5ae3d4; border-color: #5ae3d4; }
.btn--line { background: transparent; color: var(--text); border-color: currentColor; }
.btn--line:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.dark .btn--line, .bar .btn--line { color: var(--text-inv); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn .ic { width: 16px; height: 16px; }

/* Announcement + header */
.top { background: var(--ink-950); color: var(--text-inv-2); font-size: 14px; border-bottom: 1px solid var(--ink-800); }
.top__in { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 40px; padding-block: 6px; text-align: center; }
.top b { color: var(--text-inv); font-weight: 500; }
.top a { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; text-decoration: none; border: 1px solid rgba(47, 214, 195, .35); }
.top a:hover { background: rgba(47, 214, 195, .24); }

.bar { position: sticky; top: 0; z-index: 50; background: rgba(11, 28, 35, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--ink-700); color: var(--text-inv); }
.bar__in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-inv); text-decoration: none; font: 600 19px/1 var(--font); letter-spacing: -.01em; }
.brand__mark { width: 30px; height: 30px; flex: none; display: block; }
.brand__word span { color: var(--accent); }
.nav ul { display: flex; gap: 4px; }
.nav a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-inv-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text-inv); background: rgba(255, 255, 255, .06); }
.auth { margin-left: auto; display: flex; align-items: center; }
.auth__out, .auth__in { display: flex; align-items: center; gap: 8px; }
.auth__in { display: none; }
.js .auth:not([data-state]) { visibility: hidden; }
.auth[data-state='in'] .auth__out { display: none; }
.auth[data-state='in'] .auth__in { display: flex; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); color: var(--text-inv); cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu summary:hover { background: rgba(255, 255, 255, .07); }
.menu nav { position: absolute; right: 0; top: 50px; min-width: 210px; display: flex; flex-direction: column; padding: 6px; background: var(--ink-900); border: 1px solid var(--ink-700); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.menu nav a { padding: 10px 12px; border-radius: var(--r-sm); color: var(--text-inv); text-decoration: none; font-size: 15px; }
.menu nav a:hover { background: rgba(255, 255, 255, .07); }
.menu__signin { border-top: 1px solid var(--ink-700); margin-top: 4px; display: none !important; }
.auth[data-state='in'] ~ .menu .menu__signin { display: none !important; }
@media (max-width: 1040px) { .nav { display: none; } .menu { display: block; } .bar__in { gap: 12px; } }
@media (max-width: 520px) { .auth .btn--line { display: none; } .menu__signin { display: block !important; } }

/* Sections, cuts and type */
.sec { position: relative; padding: var(--pad) 0; }
.sec--alt { background: var(--bg-alt); }
.dark { position: relative; z-index: 1; background: var(--ink-950); color: var(--text-inv); }
.cut-b { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 50% 100%, 0 calc(100% - var(--cut))); padding-bottom: calc(var(--pad) + var(--cut)); }
.cut-b + .sec { margin-top: calc(var(--cut) * -1); padding-top: calc(var(--pad) + var(--cut)); }
.cut-t { margin-top: calc(var(--cut) * -1); padding-top: calc(var(--pad) + var(--cut)); clip-path: polygon(0 0, 50% var(--cut), 100% 0, 100% 100%, 0 100%); }
.cut-t.cut-b { clip-path: polygon(0 0, 50% var(--cut), 100% 0, 100% calc(100% - var(--cut)), 50% 100%, 0 calc(100% - var(--cut))); }
.pre-cut { padding-bottom: calc(var(--pad) + var(--cut)); }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--accent-text); font: 500 12px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.dark .eyebrow { color: var(--accent); }
h1, h2 { font-weight: 400; letter-spacing: -.02em; line-height: 1.05; }
h1 { font-size: clamp(38px, 6.2vw, 64px); color: var(--text-inv); }
h2 { font-size: clamp(32px, 4.4vw, 52px); max-width: 21ch; }
h1 em, h2 em { font-style: normal; color: var(--accent-text); }
.dark h1 em, .dark h2 em { color: var(--accent); }
h3 { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.sub { margin-top: 18px; max-width: 60ch; color: var(--text-2); font-size: 18px; }
.dark .sub { color: var(--text-inv-2); }
.head { margin-bottom: 56px; }
.head--c { text-align: center; }
.head--c h2, .head--c .sub { margin-left: auto; margin-right: auto; }
.ticks li { position: relative; padding-left: 26px; margin-top: 10px; color: var(--text-2); }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--accent-line); border-bottom: 2px solid var(--accent-line); transform: rotate(-45deg); }

/* Hero */
.hero { padding-top: 88px; background: radial-gradient(900px 480px at 85% 10%, rgba(47, 214, 195, .12), transparent 60%), var(--ink-950); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 56px; align-items: center; }
.term { display: inline-flex; align-items: center; margin: 26px 0 0; padding: 8px 14px; border-radius: var(--r-sm); background: var(--ink-800); border: 1px solid var(--ink-700); color: var(--text-inv); font: 500 15px/1.2 var(--mono); }
.term::before { content: '$'; margin-right: 10px; color: var(--accent); }
.term i { display: inline-block; width: .6em; height: 1.1em; margin-left: 3px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { margin-top: 22px; max-width: 34em; font-size: 19px; color: var(--text-inv-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__note { margin-top: 20px; color: var(--text-inv-2); font-size: 14px; }

/* Product UI cards (always dark, like the app) */
.ui { position: relative; min-width: 0; border-radius: var(--r-card); background: var(--ink-900); border: 1px solid var(--ink-700); color: var(--text-inv); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); font-size: 13px; overflow: hidden; }
.ui__bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--ink-700); background: var(--ink-950); }
.ui__dots { display: flex; gap: 6px; }
.ui__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-700); }
.ui__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-inv-2); font: 500 12px/1 var(--mono); }
.tag { flex: none; margin-left: auto; padding: 3px 8px; border-radius: var(--r-pill); border: 1px solid var(--ink-700); color: var(--text-inv-2); font: 500 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.ui__body { padding: 14px; }
.mono { font-family: var(--mono); }
.chip { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font: 500 11px/1.4 var(--mono); }
.chip--err { background: rgba(255, 107, 107, .14); color: #ff8f8f; }
.chip--n { background: var(--ink-800); color: var(--text-inv-2); }
.svc { display: inline-flex; align-items: center; gap: 5px; color: var(--text-inv-2); font-size: 12px; }
.svc::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.lv { display: inline-block; min-width: 46px; padding: 1px 0; border-radius: 4px; text-align: center; font: 600 10px/1.5 var(--mono); background: rgba(92, 184, 255, .14); color: var(--info); }
.lv--warn { background: rgba(245, 182, 74, .15); color: var(--warn); }
.lv--err { background: rgba(255, 107, 107, .16); color: #ff8f8f; }
.lv--dbg { background: var(--ink-800); color: var(--text-inv-2); }
.num { color: var(--accent); }
.rows { width: 100%; border-collapse: collapse; font: 12px/1.5 var(--mono); }
.rows th { padding: 6px 8px; text-align: left; color: var(--text-inv-2); font: 500 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--ink-700); }
.rows td { padding: 5px 8px; border-bottom: 1px solid rgba(26, 54, 64, .6); white-space: nowrap; }
.rows td:last-child { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rows tr > td:first-child { border-left: 2px solid var(--info); color: var(--text-inv-2); }
.rows tr.w > td:first-child { border-left-color: var(--warn); }
.rows tr.e > td:first-child { border-left-color: var(--err); }
.rows tr.d > td:first-child { border-left-color: var(--ink-700); }
.rows tr.pin td { background: rgba(245, 182, 74, .08); }

/* Story card */
.story__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.story__id { font: 600 13px/1 var(--mono); }
.story__sum { margin: 10px 0 12px; color: var(--text-inv-2); font-size: 12.5px; }
.first { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm); background: rgba(255, 107, 107, .1); border: 1px solid rgba(255, 107, 107, .4); font: 12px/1.4 var(--mono); }
.first b { color: #ff8f8f; font: 600 12.5px/1 var(--font); white-space: nowrap; }
.first span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.first .ic { color: #ff8f8f; }
.tl { margin: 14px 0 12px; }
.tl__cap { color: var(--text-inv-2); font-size: 11.5px; margin-bottom: 8px; }
.lane { display: grid; grid-template-columns: 84px 1fr; align-items: center; height: 26px; }
.lane__n { color: var(--text-inv-2); font: 11px/1 var(--mono); overflow: hidden; text-overflow: ellipsis; }
.lane__t { position: relative; height: 18px; border-radius: 4px; background: linear-gradient(90deg, rgba(155, 179, 187, .12) 1px, transparent 1px) 0 0 / 25% 100%, var(--ink-800); transform-origin: left; }
.lane__t i { position: absolute; top: 3px; width: 6px; height: 12px; border-radius: 2px; background: var(--info); }
.lane__t i.w { background: var(--warn); }
.lane__t i.e { background: var(--err); }
.lane__t i.f { box-shadow: 0 0 0 2px var(--ink-900), 0 0 0 4px rgba(255, 107, 107, .55); }
.axis { display: flex; justify-content: space-between; margin-left: 84px; color: var(--text-inv-2); font: 10px/1 var(--mono); padding-top: 6px; }

/* Hero assembly animation (transform/opacity only: no layout shift) */
@media (prefers-reduced-motion: no-preference) {
  .anim .lane { animation: rise .5s ease-out both; }
  .anim .lane:nth-child(2) { animation-delay: .15s; }
  .anim .lane:nth-child(3) { animation-delay: .3s; }
  .anim .lane__t { animation: grow .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: inherit; }
  .anim .lane__t i { animation: drop .4s cubic-bezier(.3, 1.4, .5, 1) both; }
  .anim .lane__t i:nth-child(1) { animation-delay: .9s; }
  .anim .lane__t i:nth-child(2) { animation-delay: 1.15s; }
  .anim .lane__t i:nth-child(3) { animation-delay: 1.4s; }
  .anim .lane:nth-child(2) i { animation-delay: 1.05s; }
  .anim .lane:nth-child(3) i { animation-delay: 1.3s; }
  .anim .lane__t i.f { animation: drop .4s cubic-bezier(.3, 1.4, .5, 1) 1.6s both, ping 2.4s ease-out 2.2s infinite; }
  .anim .first { animation: pin .6s cubic-bezier(.2, .7, .2, 1) 2s both; }
  .anim .rows tbody tr { animation: rise .4s ease-out both; }
  .anim .rows tbody tr:nth-child(1) { animation-delay: 1s; }
  .anim .rows tbody tr:nth-child(2) { animation-delay: 1.15s; }
  .anim .rows tbody tr:nth-child(3) { animation-delay: 1.3s; }
  .anim .rows tbody tr:nth-child(4) { animation-delay: 1.45s; }
  .anim .rows tbody tr:nth-child(5) { animation-delay: 1.6s; }
  .anim .rows tbody tr:nth-child(6) { animation-delay: 1.75s; }
  .live .rows tbody tr:first-child { animation: rise .5s ease-out both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
@keyframes pin { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes ping { 0% { box-shadow: 0 0 0 2px var(--ink-900), 0 0 0 4px rgba(255, 107, 107, .55); } 70%, 100% { box-shadow: 0 0 0 2px var(--ink-900), 0 0 0 12px rgba(255, 107, 107, 0); } }
@media (prefers-reduced-motion: reduce) { .term i { animation: none; } html { scroll-behavior: auto; } }

/* Use-case selector */
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 40px; }
.tab { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font: 500 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-align: left; text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.tab .ic { width: 22px; height: 22px; color: var(--accent-text); }
.tab:hover { border-color: var(--accent-line); color: var(--text); }
.tab[aria-selected='true'] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.panel { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.panel h3 { font-size: 28px; font-weight: 400; letter-spacing: -.015em; }
.panel p { margin-top: 14px; color: var(--text-2); }
.panel[hidden] { display: none; }
/* Without JS: tabs are links; show the first panel, or the one the URL targets. */
html:not(.js) .panel:target { display: grid; }
html:not(.js) .uc:has(.panel:target) #uc-1:not(:target) { display: none; }

/* Explore visual */
.ex { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.q { display: flex; align-items: center; gap: 6px; padding: 7px 10px; margin-bottom: 12px; border-radius: var(--r-sm); background: var(--ink-950); border: 1px solid var(--ink-700); font: 12px/1 var(--mono); color: var(--text-inv-2); overflow: hidden; }
.facet h4 { margin: 0 0 6px; color: var(--text-inv-2); font: 500 10px/1.4 var(--mono); letter-spacing: .1em; }
.facet + .facet { margin-top: 14px; }
.facet li { position: relative; padding: 3px 6px; font: 11.5px/1.4 var(--mono); }
.facet li::after { content: ''; position: absolute; left: 6px; bottom: 0; height: 2px; width: var(--w); background: var(--accent); opacity: .55; border-radius: 2px; }
.facet li.on { background: var(--accent-soft); border-radius: 4px; }
.hist { display: flex; align-items: flex-end; gap: 3px; height: 74px; padding: 6px 0 0; border-bottom: 1px solid var(--ink-700); margin-bottom: 10px; }
.hist i { flex: 1; display: flex; flex-direction: column-reverse; height: var(--h); border-radius: 2px 2px 0 0; overflow: hidden; background: var(--info); }
.hist i::before { content: ''; height: var(--e, 0%); background: var(--err); }
.hist i::after { content: ''; height: var(--v, 0%); background: var(--warn); }
.hist i.sel { outline: 1px solid var(--accent); outline-offset: 1px; }
.hist__cap { display: flex; justify-content: space-between; color: var(--text-inv-2); font: 10.5px/1 var(--mono); margin-bottom: 6px; }
.legend { display: flex; gap: 10px; }
.legend span::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 2px; background: var(--c); }

/* Live tail visual */
.lt__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.lt__bar .q { flex: 1 1 200px; margin: 0; }
.ghost { padding: 5px 10px; border-radius: var(--r-sm); border: 1px solid var(--ink-700); color: var(--text-inv); font-size: 12px; }
.dot-live { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font: 500 11.5px/1 var(--mono); }
.dot-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(60, 207, 145, .2); }
.pat { margin-top: 12px; border-top: 1px solid var(--ink-700); padding-top: 10px; }
.pat h4 { margin: 0 0 6px; color: var(--text-inv-2); font: 500 10px/1.4 var(--mono); letter-spacing: .1em; }
.pat li { display: flex; align-items: center; gap: 10px; padding: 4px 0; font: 11.5px/1.4 var(--mono); }
.pat li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pat em { font-style: normal; color: var(--accent); }
.spark { width: 72px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.5; }

/* Usage visual */
.us { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
.box { padding: 12px; border-radius: 10px; border: 1px solid var(--ink-700); background: var(--ink-800); }
.box h4 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; font: 600 13px/1.3 var(--font); }
.kv { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--ink-700); font-size: 12px; color: var(--text-inv-2); }
.kv b { color: var(--text-inv); font-weight: 600; }
.daily { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 96px; padding-top: 14px; }
.daily i { flex: 1; height: var(--h); border-radius: 2px 2px 0 0; background: var(--accent); opacity: .75; }
.lim { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--text-inv-2); }
.lim span { position: absolute; right: 0; top: -15px; color: var(--text-inv-2); font: 10px/1 var(--mono); }
.lim--80 { bottom: 64px; border-color: var(--warn); }
.lim--80 span { color: var(--warn); }
.lim--100 { bottom: 80px; border-color: var(--err); }
.lim--100 span { color: #ff8f8f; }
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.meters .box { font-size: 12px; color: var(--text-inv-2); }
.meters .box b { display: block; margin-top: 8px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p), var(--ink-700) var(--p)); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.steps li { padding: 28px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--card); }
.steps__n { display: block; margin-bottom: 18px; color: var(--accent-text); font: 500 13px/1 var(--mono); letter-spacing: .1em; }
.steps p { margin-top: 10px; color: var(--text-2); }
.snippets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.code { min-width: 0; border-radius: var(--r-card); overflow: hidden; background: var(--code-bg); border: 1px solid var(--ink-700); color: #d6e6ea; }
.code__bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--ink-700); color: var(--text-inv-2); font: 500 12px/1.3 var(--mono); }
.code pre { padding: 16px; overflow-x: auto; font: 12.5px/1.7 var(--mono); }
.t-cmd, .t-kw { color: var(--accent); }
.t-str { color: #9ee6a8; }
.t-key { color: #8cc8ff; }
.fine { margin-top: 16px; color: var(--text-2); font-size: 14px; }

/* Delivery / security / region */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.blk { padding: 32px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--card); }
.blk__ic { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 22px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.blk__ic .ic { width: 22px; height: 22px; }
.blk > p { margin-top: 10px; color: var(--text-2); }
.blk--region { background: var(--ink-900); border-color: var(--ink-700); color: var(--text-inv); }
.blk--region > p, .blk--region .ticks li { color: var(--text-inv-2); }
.blk--region .blk__ic { color: var(--accent); }
.blk--region .ticks li::before { border-color: var(--accent); }
.blk .ticks { margin-top: 8px; }

/* Integrations wall */
.wall { position: relative; overflow: hidden; }
.wall__bg { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(auto-fill, 128px); grid-auto-rows: 64px; gap: 12px; justify-content: center; align-content: center; pointer-events: none; -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 52%, #000 78%, transparent 100%); mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 52%, #000 78%, transparent 100%); opacity: .8; }
.wall__bg i { border-radius: 12px; border: 1px solid var(--ink-700); background: var(--ink-900); }
.wall__in { position: relative; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 980px; margin: 0 auto; -webkit-mask-image: radial-gradient(ellipse 85% 120% at 50% 50%, #000 62%, rgba(0, 0, 0, .55) 100%); mask-image: radial-gradient(ellipse 85% 120% at 50% 50%, #000 62%, rgba(0, 0, 0, .55) 100%); }
.tiles li { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--ink-700); background: var(--ink-900); font-size: 14px; line-height: 1.3; }
.tiles li small { display: block; color: var(--text-inv-2); font: 11px/1.4 var(--mono); }
.glyph { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font: 600 12px/1 var(--mono); }
.wall .cta { justify-content: center; margin-top: 40px; }

/* Roadmap */
.roadmap, .avail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.avail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.roadmap li, .avail li { padding: 26px; border-radius: var(--r-card); border: 1px dashed var(--line); background: var(--card); }
.avail li { border-style: solid; }
.roadmap p, .avail p { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.pill { display: inline-block; margin-bottom: 18px; padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--text-2); font: 500 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 56px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; cursor: pointer; list-style: none; font-size: 18px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid var(--accent-line); border-bottom: 2px solid var(--accent-line); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 0 22px; max-width: 64ch; color: var(--text-2); }

/* Final + footer */
.final { text-align: center; background: radial-gradient(700px 360px at 50% 100%, rgba(47, 214, 195, .14), transparent 70%), var(--ink-950); }
.final h2 { margin: 0 auto; max-width: 16ch; }
.final .cta { justify-content: center; }
.foot { background: var(--ink-950); color: var(--text-inv-2); border-top: 1px solid var(--ink-800); font-size: 14px; }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--text-inv); text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 1080px) {
  .hero__in, .panel, .faq { grid-template-columns: minmax(0, 1fr); }
  .hero__in { gap: 48px; }
  .roadmap, .avail, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trio { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --pad: 64px; --cut: 28px; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 56px; }
  .lead, .sub { font-size: 17px; }
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .snippets, .us { grid-template-columns: minmax(0, 1fr); }
  .ex { grid-template-columns: minmax(0, 1fr); }
  .ex .facets, .wall__bg { display: none; }
  .head { margin-bottom: 36px; }
  .blk { padding: 24px; }
  .top__in { font-size: 13px; }
}
@media (max-width: 520px) {
  .roadmap, .avail { grid-template-columns: minmax(0, 1fr); }
  .tiles { gap: 8px; }
  .tiles li { gap: 8px; padding: 10px; font-size: 13px; }
  .glyph { width: 28px; height: 28px; font-size: 11px; }
  .rows th:nth-child(3), .rows td:nth-child(3) { display: none; }
  .lane { grid-template-columns: 70px 1fr; }
  .axis { margin-left: 70px; }
  .top b { display: none; }
}

/* Developers page (sdk.html): download cards, copy buttons, purpose picker */
.nav a[aria-current='page'] { color: var(--text-inv); background: rgba(255, 255, 255, .08); }
.menu nav a[aria-current='page'] { background: rgba(255, 255, 255, .07); }
.hero__in .code { align-self: center; }
.code__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; border-top: 1px solid var(--ink-700); color: var(--text-inv-2); font-size: 13px; }
.code__foot a { color: var(--accent); }
.code--wide { margin-bottom: 24px; }
.code--in { position: relative; margin-top: 14px; }
.code--in .copy { position: absolute; top: 8px; right: 8px; }
.code--in pre { padding-right: 76px; }
.copy { display: none; align-items: center; justify-content: center; flex: none; height: 28px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--ink-700); background: var(--ink-800); color: var(--text-inv); font: 500 12px/1 var(--mono); cursor: pointer; }
.js .copy { display: inline-flex; }
.copy:hover { border-color: var(--accent); color: var(--accent); }
.copy--sm { height: 22px; padding: 0 8px; font-size: 11px; }
.note { margin: 0 0 28px; padding: 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); border-left: 3px solid var(--accent-line); background: var(--card); color: var(--text-2); font-size: 15px; }
.sub code, .blk p code, .faq details p code, .fine code, .note code, .dl__sum code { padding: 1px 5px; border-radius: 5px; background: var(--bg-alt); border: 1px solid var(--line); color: var(--text); font: .88em/1.4 var(--mono); }
.sec--alt .sub code, .sec--alt .blk p code, .sec--alt .faq details p code { background: var(--card); }
.dark .sub code { background: var(--ink-800); border-color: var(--ink-700); color: var(--text-inv); }

.pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pick .blk { padding: 24px; display: flex; flex-direction: column; }
.pick .blk p { margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 18px; }
.chips a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--text); text-decoration: none; font: 500 13px/1 var(--mono); }
.chips a:hover { border-color: var(--accent-line); background: var(--accent-soft); }

.lang + .lang { margin-top: 44px; }
.lang > h3 { margin-bottom: 16px; font-size: 22px; font-weight: 500; }
.dls { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.dl, .blk--wide, .grid2 .blk { min-width: 0; }
.dl { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--card); scroll-margin-top: 84px; }
.dl:target, .blk:target { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.dl__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dl__lang { margin: 0 0 8px; color: var(--accent-text); font: 500 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.dl__top .dl__lang { margin: 0; }
.dl__ver { padding: 2px 9px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--text-2); font: 500 12px/1.5 var(--mono); }
.dl h4 { margin: 0; font: 600 19px/1.3 var(--mono); letter-spacing: -.01em; overflow-wrap: anywhere; }
.dl__what { color: var(--text); font-weight: 500; }
.dl__sum { color: var(--text-2); font-size: 15px; }
.dl__step { margin: 4px 0 -4px; color: var(--text-2); font-size: 13px; }
.cmd { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 14px; border-radius: var(--r-sm); background: var(--code-bg); border: 1px solid var(--ink-700); color: #d6e6ea; }
.cmd code { flex: 1; min-width: 0; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd .copy { margin-top: 1px; }
.dl__meta { display: grid; gap: 6px; margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.dl__meta div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.dl__meta dt { color: var(--text-2); }
.dl__meta dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.dl__meta .sha { font: 12.5px/1.4 var(--mono); }
.dl .copy, .copy--sm { background: var(--bg-alt); border-color: var(--line); color: var(--text); }
.dl .cmd .copy { background: var(--ink-800); border-color: var(--ink-700); color: var(--text-inv); }
.dl__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid2--in { margin-top: 16px; }
.grid2 .blk, .blk--wide { padding: 28px; }
.blk--wide { margin-top: 24px; }
.grid2 .blk .dl__lang, .blk--wide .dl__lang { margin-bottom: 10px; }
.blk .links { margin-top: 14px; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; color: var(--text-2); }
.blk .code--in + .links { margin-top: 12px; }
.blk--wide .grid2 .links b { color: var(--text); }
.hero__in .code pre, .code--wide pre { white-space: pre; }
.code pre { tab-size: 2; }

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--text-2); }
.tbl th { color: var(--text); font-weight: 600; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { white-space: nowrap; }
.tbl td code { font: 12px/1.5 var(--mono); word-break: break-all; color: var(--text); }
.fine code { font-size: .85em; overflow-wrap: anywhere; }

@media (max-width: 1080px) {
  .pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .grid2 .blk, .blk--wide { padding: 22px; }
  .dl { padding: 20px; }
}
@media (max-width: 560px) {
  .pick { grid-template-columns: minmax(0, 1fr); }
  .dl__meta div { flex-wrap: wrap; }
}
.dark .sub a { color: var(--accent); }

/* Docs layout. Appended to site.css by sdk_site.py (docs/docs.css), so tokens, header, footer, buttons and
   code blocks are the marketing site's own. Everything here is scoped to .docs / .doc. */
.docs { display: grid; grid-template-columns: 272px minmax(0, 1fr) 228px; gap: 0 48px; max-width: 1360px; margin: 0 auto; padding: 0 24px; align-items: start; }
.docs__side { position: sticky; top: 64px; display: flex; flex-direction: column; height: calc(100vh - 64px); padding: 28px 0 24px; border-right: 1px solid var(--line); margin-right: -24px; padding-right: 24px; }
.docs__bar { display: none; }
.docs__nav { overflow-y: auto; overscroll-behavior: contain; margin-top: 18px; padding-bottom: 8px; scrollbar-width: thin; }
.docs__nav .grp { max-width: none; margin: 22px 0 6px; font: 600 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.docs__nav .grp:first-child { margin-top: 0; }
.docs__nav a { display: block; padding: 6px 12px; margin: 1px 0; border-radius: var(--r-sm); color: var(--text-2); font-size: 15px; line-height: 1.4; text-decoration: none; border-left: 2px solid transparent; }
.docs__nav a:hover { color: var(--text); background: var(--bg-alt); }
.docs__nav a[aria-current='page'] { color: var(--accent-text); background: var(--accent-soft); border-left-color: var(--accent-line); font-weight: 600; }

/* Search */
.search { position: relative; }
.search__box { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-alt); color: var(--text-2); }
.search__box:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.search__box svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 15px/1 var(--font); }
.search input::placeholder { color: var(--text-2); }
.search kbd { padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; font: 12px/1.5 var(--mono); color: var(--text-2); background: var(--bg); }
.search__list { position: absolute; z-index: 30; top: 48px; left: 0; width: min(440px, calc(100vw - 32px)); max-height: min(70vh, 460px); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 18px 44px rgba(7, 19, 24, .28); }
.search__list[hidden] { display: none; }
.search__list a { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; }
.search__list a[aria-selected='true'], .search__list a:hover { background: var(--accent-soft); }
.search__t { display: block; font-size: 15px; font-weight: 600; }
.search__p { display: block; margin-top: 1px; color: var(--accent-text); font: 500 11.5px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.search__x { display: block; margin-top: 3px; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.search__list mark { background: var(--accent-soft); color: inherit; border-radius: 3px; box-shadow: 0 0 0 1px var(--accent-line) inset; }
.search__none { padding: 12px; color: var(--text-2); font-size: 14px; }

/* Article */
.doc { min-width: 0; padding: 32px 0 80px; max-width: 800px; }
.crumbs { margin-bottom: 18px; color: var(--text-2); font-size: 14px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: '\203A'; margin-right: 8px; color: var(--text-2); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }
.doc h1 { color: var(--text); font-size: clamp(32px, 4.6vw, 44px); font-weight: 500; line-height: 1.12; letter-spacing: -.02em; overflow-wrap: anywhere; }
.doc__lead { margin-top: 14px; color: var(--text-2); font-size: 18px; line-height: 1.55; }
.doc__tag { display: inline-block; margin-bottom: 14px; padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--accent-text); font: 500 12px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; }

.pkgs { display: grid; gap: 0; margin: 24px 0 8px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.pkg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 18px; }
.pkg + .pkg { border-top: 1px solid var(--line); }
.pkg__name { font: 600 15px/1.3 var(--mono); overflow-wrap: anywhere; }
.pkg__ver { padding: 2px 9px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--text-2); font: 500 12px/1.5 var(--mono); }
.pkg__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; flex-basis: 100%; color: var(--text-2); font-size: 14px; min-width: 0; }
.pkg__facts code { font: 12.5px/1.4 var(--mono); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line); background: var(--bg-alt); color: var(--text); }
.pkg .copy { background: var(--bg-alt); border-color: var(--line); color: var(--text); height: 22px; padding: 0 8px; font-size: 11px; }
.pkg .copy:hover { border-color: var(--accent-line); color: var(--accent-text); }

.doc__body { margin-top: 28px; color: var(--text-2); font-size: 16.5px; line-height: 1.7; }
.doc__body > :first-child { margin-top: 0; }
.doc__body p, .doc__body ul, .doc__body ol, .doc__body blockquote, .doc__body .code, .doc__body .tbl { margin-top: 1em; }
.doc__body h2, .doc__body h3, .doc__body h4 { position: relative; max-width: none; color: var(--text); font-family: var(--font); letter-spacing: -.012em; scroll-margin-top: 84px; }
.doc__body h2 { margin-top: 2.4em; padding-top: 1.1em; border-top: 1px solid var(--line); font-size: 27px; font-weight: 500; line-height: 1.25; }
.doc__body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc__body h3 { margin-top: 2em; font-size: 20px; font-weight: 600; }
.doc__body h4 { margin-top: 1.6em; font-size: 16.5px; font-weight: 600; }
.doc__body .anchor { margin-left: 8px; color: var(--accent-text); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .12s; }
.doc__body :is(h2, h3, h4):hover .anchor, .doc__body .anchor:focus-visible { opacity: 1; }
.doc__body ul, .doc__body ol { padding-left: 1.4em; list-style: revert; }
.doc__body li { margin: .35em 0; padding-left: .2em; }
.doc__body li::marker { color: var(--accent-line); }
.doc__body strong { color: var(--text); font-weight: 600; }
.doc__body a { text-underline-offset: 2px; overflow-wrap: anywhere; }
.doc__body code { padding: 1px 6px; border-radius: 5px; background: var(--bg-alt); border: 1px solid var(--line); color: var(--text); font: .87em/1.4 var(--mono); overflow-wrap: anywhere; }
.doc__body .code { position: relative; }
.doc__body .code pre { padding: 16px 84px 16px 18px; font: 13px/1.7 var(--mono); white-space: pre; }
.doc__body .code code { padding: 0; border: 0; background: none; color: inherit; font: inherit; overflow-wrap: normal; }
.doc__body .code[data-lang]::before { content: attr(data-lang); position: absolute; top: 12px; right: 76px; color: var(--text-inv-2); font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.doc__body .code .copy { top: 10px; right: 10px; }
.doc__body blockquote { padding: 2px 18px; border-left: 3px solid var(--accent-line); background: var(--bg-alt); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.doc__body blockquote p { margin: .6em 0; }
.doc__body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line); }
.doc__body .tbl { max-width: 100%; }
.doc__body .tbl table { min-width: 520px; }
.doc__body .tbl td:first-child { white-space: normal; }
.doc__body .tbl code { word-break: normal; }
.doc__body .reference__live { color: var(--text-2); font-size: .9em; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); text-decoration: none; color: var(--text); min-width: 0; transition: border-color .15s, background .15s; }
.pager a:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.pager small { display: block; color: var(--text-2); font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pager b { display: block; margin-top: 4px; font-weight: 600; overflow-wrap: anywhere; }
.pager__next { grid-column: 2; text-align: right; }

/* On this page */
.toc { position: sticky; top: 64px; max-height: calc(100vh - 64px); overflow-y: auto; padding: 32px 0 24px; font-size: 14px; scrollbar-width: thin; }
.toc .grp { max-width: none; margin: 0 0 10px; font: 600 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.toc ul { border-left: 1px solid var(--line); }
.toc a { display: block; margin-left: -1px; padding: 4px 0 4px 14px; border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; line-height: 1.4; overflow-wrap: anywhere; }
.toc a:hover { color: var(--text); }
.toc a[aria-current='location'] { color: var(--accent-text); border-left-color: var(--accent-line); font-weight: 600; }
.toc .toc__h3 a { padding-left: 28px; font-size: 13.5px; }

/* Docs home */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; margin-top: 16px; }
.card { display: block; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; min-width: 0; }
.card:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.card b { display: block; font-size: 17px; font-weight: 600; }
.card span { display: block; margin-top: 6px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.doc__body .group { margin-top: 2.2em; padding-top: 0; border-top: 0; font-size: 13px; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); font-weight: 600; }

@media (max-width: 1180px) {
  .docs { grid-template-columns: 252px minmax(0, 1fr); gap: 0 40px; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .docs { display: block; padding: 0 16px; }
  .docs__side { position: static; height: auto; max-height: none; margin: 0 -16px; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
  .docs__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
  .docs__menu { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 600 14px/1 var(--font); cursor: pointer; }
  .docs__menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .docs__menu:hover { border-color: var(--accent-line); }
  .docs__bar span { color: var(--text-2); font-size: 14px; }
  .js .docs__nav { display: none; }
  .js .docs__side[data-open] .docs__nav { display: block; max-height: 60vh; }
  .search__list { width: calc(100vw - 32px); }
  .search kbd { display: none; }
  .doc { padding-top: 24px; }
}
@media (max-width: 560px) {
  .doc__body { font-size: 16px; }
  .doc__body h2 { font-size: 24px; }
  .doc__body .code pre { padding-right: 70px; font-size: 12.5px; }
  .pager { grid-template-columns: 1fr; }
  .pager__next { grid-column: 1; }
}
