/* OpenR5 — site styles. No framework, no build step. */
:root {
  --bg: #ffffff;
  --bg-2: #f7f6fb;
  --bg-3: #efedf7;
  --ink: #16131f;
  --ink-2: #4a4558;
  --ink-3: #625d73;
  --line: #e4e1ee;
  --line-2: #cfcae0;
  --brand: #5b2bc9;
  --brand-2: #7c4ef0;
  --brand-ink: #ffffff;
  --brand-soft: #f0eafe;
  --ok: #137047;
  --err: #b3203a;
  --bar-other: #8a83a6;
  --code-bg: #15121f;
  --code-ink: #e9e5f5;
  --code-dim: #8f88a8;
  --shadow: 0 1px 2px rgba(22,19,31,.04), 0 8px 24px rgba(22,19,31,.06);
  --radius: 14px;
  --maxw: 1180px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0b14; --bg-2: #13101d; --bg-3: #1b1728;
    --ink: #f1eefa; --ink-2: #bdb6d2; --ink-3: #8c85a4;
    --line: #26213a; --line-2: #3a3354;
    --brand: #9d7bff; --brand-2: #b89cff; --brand-ink: #120d22; --brand-soft: #1f1836;
    --ok: #4fd49a; --err: #ff8a9a; --bar-other: #7a7298; --code-bg: #0a0810;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0b14; --bg-2: #13101d; --bg-3: #1b1728;
  --ink: #f1eefa; --ink-2: #bdb6d2; --ink-3: #8c85a4;
  --line: #26213a; --line-2: #3a3354;
  --brand: #9d7bff; --brand-2: #b89cff; --brand-ink: #120d22; --brand-soft: #1f1836;
  --ok: #4fd49a; --err: #ff8a9a; --bar-other: #7a7298; --code-bg: #0a0810;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre, kbd { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: -.01em; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand small { font-weight: 500; color: var(--ink-3); font-size: 13px; margin-left: 2px; }
.nav-links { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links a { color: var(--ink-2); font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--bg-3); text-decoration: none; }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); background: var(--bg-3); text-decoration: none; }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.mobile-menu { display: none; border-top: 1px solid var(--line); padding: 8px 0 16px; }
.mobile-menu a { display: block; padding: 10px 24px; color: var(--ink); font-weight: 500; }
.nav.open .mobile-menu { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: var(--bg); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px/1 var(--mono);
  letter-spacing: .06em; text-transform: uppercase; color: var(--brand);
}
h1, h2, h3 { letter-spacing: -.025em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(36px, 5.2vw, 60px); font-weight: 750; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 720; }
h3 { font-size: 20px; font-weight: 680; letter-spacing: -.015em; }
.lead { font-size: clamp(17px, 1.6vw, 19.5px); color: var(--ink-2); line-height: 1.6; }
.muted { color: var(--ink-3); }

section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { margin: 14px 0 14px; }
.section-head p { color: var(--ink-2); font-size: 17.5px; margin: 0; }
.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 60% at 85% 10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
          mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
  opacity: .9;
}
.hero-grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr); gap: 56px; align-items: center; }
.hero h1 { margin: 18px 0 20px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { max-width: 560px; margin: 0 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); font-size: 13.5px; color: var(--ink-2);
}
.pill b { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 650; }
.pill:hover { text-decoration: none; border-color: var(--line-2); }

/* terminal */
.term {
  background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(40,20,90,.45); border: 1px solid #2a2440; overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid #2a2440; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3354; }
.term-bar span { margin-left: 8px; font: 12px var(--mono); color: var(--code-dim); }
.term pre { margin: 0; padding: 18px 20px 22px; font-size: 13.5px; line-height: 1.75; overflow-x: auto; }
.term .c { color: var(--code-dim); }
.term .p { color: #b89cff; user-select: none; }
.term .ok { color: #4fd49a; }
.term .y { color: #ffd479; }

.trust { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--ink-3); font-size: 14px; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 16px; height: 16px; color: var(--ok); }

/* ---------- Core cards ---------- */
.cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.core {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); overflow: hidden; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.core:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.core-art { background: #fbfaf7; aspect-ratio: 16 / 10; display: grid; place-items: center; border-bottom: 1px solid var(--line); position: relative; }
.core-art img { height: 88%; width: auto; mix-blend-mode: multiply; }
.core-art .tag { position: absolute; left: 14px; top: 14px; font: 600 11.5px var(--mono); color: #5b2bc9; background: #fff; border: 1px solid #e4e1ee; padding: 4px 8px; border-radius: 6px; letter-spacing: .04em; }
.core-body { padding: 22px 22px 20px; display: flex; flex-direction: column; flex: 1; }
.core-body h3 { display: flex; align-items: baseline; gap: 10px; }
.core-body h3 small { font-weight: 500; font-size: 14px; color: var(--ink-3); letter-spacing: 0; }
.core-role { color: var(--brand); font-weight: 600; font-size: 14px; margin: 4px 0 12px; }
.core-body p { color: var(--ink-2); font-size: 15px; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.chip { font: 500 12px var(--mono); padding: 4px 8px; border-radius: 6px; background: var(--bg-3); color: var(--ink-2); }
.core-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: auto; }
.core-stats div { background: var(--bg); padding: 10px 12px; }
.core-stats b { display: block; font-size: 20px; letter-spacing: -.02em; }
.core-stats span { font-size: 12px; color: var(--ink-3); }
.core-links { display: flex; gap: 8px; margin-top: 16px; }
.core-links .btn { flex: 1; justify-content: center; }

/* ---------- Compare table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
table.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 720px; }
.compare th, .compare td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: 15px; background: var(--bg-2); position: sticky; top: 0; }
.compare thead th small { display: block; font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
.compare tbody th { color: var(--ink-3); font-weight: 500; width: 22%; white-space: nowrap; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare td code { font-size: 13px; }
.compare .grp th { background: var(--bg-2); color: var(--ink); font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding-top: 10px; padding-bottom: 10px; }
.yes { color: var(--ok); font-weight: 600; }

/* ---------- Benchmarks ---------- */
.bench { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 26px; }
.card h3 { margin-bottom: 4px; }
.card > p { color: var(--ink-3); font-size: 14px; margin: 0 0 22px; }
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 92px 1fr 56px; align-items: center; gap: 12px; font-size: 14px; }
.bar .track { height: 12px; border-radius: 6px; background: var(--bg-3); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 6px; background: var(--brand); }
.bar b { text-align: right; font-variant-numeric: tabular-nums; }
.note { font-size: 13px; color: var(--ink-3); margin-top: 18px; }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.feature .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; }
.feature .ic svg { width: 20px; height: 20px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { font-size: 14.5px; color: var(--ink-2); margin: 0; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 22px; }
.step-list li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.step-list li::before {
  content: counter(s); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); font: 600 14px var(--mono); color: var(--brand); background: var(--bg);
}
.step-list h3 { font-size: 17px; margin: 4px 0 4px; }
.step-list p { margin: 0; color: var(--ink-2); font-size: 15px; }
.tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid #2a2440; }
.tabs button {
  font: 500 13px var(--mono); color: var(--code-dim); background: none; border: 0; padding: 8px 12px 10px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--code-ink); border-color: #b89cff; }
.copy {
  float: right; margin: 10px 12px 0 0; font: 500 12px var(--sans); color: var(--code-dim);
  background: #221d33; border: 1px solid #2f2946; border-radius: 6px; padding: 4px 10px; cursor: pointer;
}
.copy:hover { color: var(--code-ink); }

/* ---------- CTA band ---------- */
.band {
  border-radius: 20px; padding: 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
  background: linear-gradient(135deg, #3b1c8f, #5b2bc9 55%, #7c4ef0); color: #fff; position: relative; overflow: hidden;
}
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.82); font-size: 17px; margin: 14px 0 0; }
.band .cta { justify-content: flex-end; }
.band .btn-primary { background: #fff; color: #3b1c8f; }
.band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14px; color: var(--ink-2); }
.foot { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot h4, .foot .foot-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 12px; font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--ink); }
.foot p { max-width: 320px; margin: 14px 0 0; }
.legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--ink-3); font-size: 13px; }

/* ---------- Core detail page ---------- */
.page-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); margin: 14px 0 14px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.detail { padding: 80px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
.detail-grid { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; }
.detail-art { position: sticky; top: 96px; }
.detail-art .core-art { border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; }
.detail-art dl { margin: 18px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.detail-art dt { color: var(--ink-3); }
.detail-art dd { margin: 0; font-weight: 600; }
.detail h2 { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.detail h2 small { font-size: 18px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.detail h3 { margin: 36px 0 12px; font-size: 18px; }
.detail ul.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.detail ul.ticks li { padding-left: 28px; position: relative; color: var(--ink-2); }
.detail ul.ticks li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 12px; height: 7px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.detail ul.ticks b { color: var(--ink); font-weight: 600; }
.mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini th, .mini td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.mini th { color: var(--ink-3); font-weight: 500; }
.mini td:not(:first-child), .mini th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.code {
  background: var(--code-bg); color: var(--code-ink); border-radius: 12px; padding: 16px 18px; font-size: 13.5px; line-height: 1.7;
  overflow-x: auto; margin: 0;
}
.code .c { color: var(--code-dim); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .term { max-width: 640px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .detail-art { position: static; max-width: 420px; }
}
@media (max-width: 860px) {
  .nav-links, .nav-end .btn { display: none; }
  .menu-btn { display: inline-grid; }
  .hero-grid, .steps, .bench, .band { grid-template-columns: 1fr; }
  .band { padding: 36px 28px; }
  .band .cta { justify-content: flex-start; }
  .foot { grid-template-columns: 1fr 1fr; }
  section { padding: 72px 0; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .cores { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .foot { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 80px 1fr 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Let grid children shrink so wide code and tables scroll inside themselves, not the page. */
.hero-grid > *, .detail-grid > *, .steps > *, .bench > *, .band > * { min-width: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.field em { color: var(--brand); font-style: normal; }
.field input, .field select, .field textarea {
  font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); width: 100%;
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot p { margin: 0; font-size: 13.5px; }
.form-status { padding: 12px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 500; }
.form-status.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.form-status.err { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.contact-side { display: grid; gap: 20px; }
.contact-side .card p { color: var(--ink-2); font-size: 15px; margin: 8px 0 14px; }
.link-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; font-size: 15px; font-weight: 500; }
@media (max-width: 860px) { .contact-grid, .field-row { grid-template-columns: 1fr; } }

/* ---------- Comparison with other cores ---------- */
.bar .fill { background: var(--bar-other); }
.bars .bar.ours .fill, #benchmarks .bar .fill { background: var(--brand); }
.bar.ours span { font-weight: 650; color: var(--ink); }
.bar sup, .vs sup { font-size: 10px; color: var(--ink-3); margin-left: 2px; }
#vs-others .bar { grid-template-columns: 124px 1fr 44px; }
.legend { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; white-space: nowrap; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--bar-other); margin-left: 6px; }
.sw.ours { background: var(--brand); margin-left: 0; }
.table-wrap.flat { border: 0; border-radius: 0; }
.vs td, .vs th { text-align: left !important; }
.vs tr.ours td:first-child { font-weight: 650; color: var(--brand); }
.sources { margin-top: 24px; }
.sources p { margin: 0 0 10px; }
.sources ol { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 4px; }
@media (max-width: 620px) { #vs-others .bar { grid-template-columns: 104px 1fr 40px; font-size: 13px; } }

/* ---------- Headings styled small ---------- */
.card-h { font-size: 20px; font-weight: 680; letter-spacing: -.015em; margin: 0; }

/* ---------- Without JavaScript ---------- */
/* Menu, tabs and copy buttons need JS; show everything plainly when it is off. */
@media (max-width: 860px) {
  html:not(.js) .nav .wrap { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; row-gap: 6px; }
  html:not(.js) .nav-links { display: flex; flex-wrap: wrap; order: 3; width: 100%; }
  html:not(.js) .menu-btn { display: none; }
}
html:not(.js) .tabs, html:not(.js) .copy, html:not(.js) [data-theme-toggle] { display: none; }
html:not(.js) [role="tabpanel"][hidden] { display: block; border-top: 1px solid #2a2440; }

/* ---------- Documentation index ---------- */
.doc-grid { display: grid; gap: 20px; }
.doc-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; align-items: center; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.doc-card:hover { text-decoration: none; border-color: var(--line-2); transform: translateY(-2px); }
.doc-card img { width: 96px; height: 96px; border-radius: 12px; background: #fbfaf7; object-fit: contain; }
.doc-card p { margin: 6px 0 10px; color: var(--ink-2); }
.doc-link { color: var(--brand); font-weight: 600; font-size: 15px; }
@media (max-width: 620px) { .doc-card { grid-template-columns: 64px minmax(0, 1fr); } .doc-card img { width: 64px; height: 64px; } }

/* ---------- Diagrams ---------- */
.diagram { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.diagram img { width: 100%; height: auto; }
.diagram figcaption { padding: 10px 14px; font-size: 13.5px; color: #4a4558; background: #f7f6fb; border-top: 1px solid #e4e1ee; }
