/* DinD Hosting — manual. One stylesheet, dark only.
   Order: tokens · base · topbar · landing · docs layout · prose · components · UI mock-up kit · FAQ · search · responsive · print */

/* ───────────────────────── tokens ───────────────────────── */
:root {
  color-scheme: dark;
  --bg: #070a11;
  --bg-elev: #0b0f17;
  --surface: #0f1520;
  --surface-2: #141c2a;
  --surface-3: #1b2536;
  --line: rgba(150, 165, 205, 0.13);
  --line-strong: rgba(150, 165, 205, 0.27);
  --text: #e9edf6;
  --text-2: #bcc5d8;
  --muted: #8493ab;
  --faint: #5f6c84;

  --brand: #5b8def;
  --brand-2: #8b7cf6;
  --brand-3: #d17bf0;
  --cyan: #37d3e6;
  --green: #43d99a;
  --amber: #f5b64a;
  --red: #ff7a86;

  --grad: linear-gradient(120deg, #5b8def 0%, #8b7cf6 52%, #d17bf0 100%);
  --grad-soft: linear-gradient(135deg, rgba(91, 141, 239, 0.2), rgba(139, 124, 246, 0.18));

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;

  --r: 14px;
  --r-sm: 9px;
  --topbar: 64px;
  --sidebar: 256px;
  --toc: 216px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

/* ───────────────────────── base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
body::before {            /* soft aurora behind everything */
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 560px at 82% -8%, rgba(91, 141, 239, 0.16), transparent 62%),
    radial-gradient(900px 520px at 4% 2%, rgba(139, 124, 246, 0.12), transparent 58%),
    radial-gradient(700px 400px at 50% 110%, rgba(55, 211, 230, 0.06), transparent 60%);
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: #86a9f6; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(91, 141, 239, 0.35); color: #fff; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #04101f; padding: 8px 14px; border-radius: 8px; z-index: 200; font-weight: 600; }
.skip:focus { left: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code, kbd, pre, samp { font-family: var(--mono); }
kbd {
  font-size: 0.78em; padding: 2px 7px; border-radius: 6px; color: var(--text);
  background: var(--surface-3); border: 1px solid var(--line-strong); border-bottom-width: 2px; white-space: nowrap;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #243047; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #31405c; }
::-webkit-scrollbar-track { background: transparent; }

/* ───────────────────────── topbar ───────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 60; height: var(--topbar);
  background: rgba(7, 10, 17, 0.74);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { height: 100%; display: flex; align-items: center; gap: 22px; max-width: 1440px; margin: 0 auto; padding: 0 28px; }
.brand { flex: none; white-space: nowrap; display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 700; letter-spacing: -0.01em; font-size: 1.04rem; }
.brand:hover { color: #fff; }
.brand svg { flex: none; }
.brand small {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
  padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 999px;
}
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a { color: var(--text-2); padding: 8px 13px; border-radius: 9px; font-size: 0.93rem; font-weight: 500; }
.nav a:hover { color: #fff; background: var(--surface-2); }
.nav a[aria-current] { color: #fff; background: var(--surface-3); }
.topbar .spacer { flex: 1; }
.search-btn {
  display: flex; align-items: center; gap: 10px; min-width: 232px; padding: 8px 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--muted); font: inherit; font-size: 0.9rem;
}
.search-btn:hover { border-color: #3a4a69; color: var(--text-2); }
.search-btn kbd { margin-left: auto; font-size: 0.7rem; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 9px; padding: 8px 10px; cursor: pointer; }

/* language switcher + suggestion toast */
.langsw { display: flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); flex: none; }
.langsw a, .langsw span { padding: 5px 10px; border-radius: 7px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.3; }
.langsw a { color: var(--muted); }
.langsw a:hover { color: #fff; background: var(--surface-3); }
.langsw span[aria-current] { color: #fff; background: rgba(91, 141, 239, 0.28); }
.lang-toast { position: fixed; z-index: 90; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.lang-toast a { font-weight: 600; font-size: 0.92rem; }
.lang-toast button { border: 0; background: none; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: 6px 10px; cursor: pointer; border-radius: 8px; }
.lang-toast button:hover { color: #fff; background: var(--surface-3); }

/* ───────────────────────── buttons / pills ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 11px; font: inherit; font-weight: 600; font-size: 0.97rem;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); cursor: pointer; transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
}
.btn:hover { border-color: #3c4d6e; background: var(--surface-3); color: #fff; transform: translateY(-1px); }
.btn.primary { background: var(--grad); border-color: transparent; color: #060b16; box-shadow: 0 10px 30px rgba(110, 120, 245, 0.35); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 14px 38px rgba(110, 120, 245, 0.5); color: #060b16; }
.btn.sm { padding: 8px 14px; font-size: 0.88rem; border-radius: 9px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); background: var(--surface-2); white-space: nowrap; line-height: 1.6; }
.pill.ok { color: var(--green); border-color: rgba(67, 217, 154, 0.4); background: rgba(67, 217, 154, 0.1); }
.pill.warn { color: var(--amber); border-color: rgba(245, 182, 74, 0.4); background: rgba(245, 182, 74, 0.1); }
.pill.bad { color: var(--red); border-color: rgba(255, 122, 134, 0.4); background: rgba(255, 122, 134, 0.1); }
.pill.info { color: #8db0f7; border-color: rgba(91, 141, 239, 0.4); background: rgba(91, 141, 239, 0.1); }
.pill.vio { color: #b6a9fa; border-color: rgba(139, 124, 246, 0.45); background: rgba(139, 124, 246, 0.1); }

/* ───────────────────────── landing ───────────────────────── */
.hero { position: relative; padding: 84px 0 56px; overflow: hidden; }
.hero::before {           /* faint engineering grid, masked to a soft ellipse */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.55;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px; font-size: 0.83rem; font-weight: 600; color: var(--text-2);
  background: rgba(91, 141, 239, 0.1); border: 1px solid rgba(91, 141, 239, 0.32);
}
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(67, 217, 154, 0.6); animation: ping 2.4s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(67, 217, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(67, 217, 154, 0); } }
.hero h1 { font-size: clamp(2.3rem, 4.5vw, 3.7rem); line-height: 1.05; letter-spacing: -0.035em; color: #fff; margin: 22px 0 22px; font-weight: 800; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.16rem; line-height: 1.65; color: var(--text-2); max-width: 60ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 38px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 22px; padding-top: 26px; border-top: 1px solid var(--line); }
.stat b { display: block; font-size: 1.7rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { font-size: 0.84rem; color: var(--muted); display: block; line-height: 1.35; margin-top: 4px; }
.hero-art { position: relative; animation: rise 1s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-art .glow { position: absolute; inset: -8% -6%; background: radial-gradient(closest-side, rgba(110, 120, 245, 0.28), transparent 70%); filter: blur(20px); z-index: -1; }
.hero-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5)); }
.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

.section { padding: 84px 0; position: relative; }
.section.tint { background: linear-gradient(180deg, transparent, rgba(15, 21, 32, 0.7) 18%, rgba(15, 21, 32, 0.7) 82%, transparent); }
.eyebrow { display: inline-block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.section h2 { font-size: clamp(1.75rem, 3.2vw, 2.55rem); line-height: 1.12; letter-spacing: -0.028em; color: #fff; margin: 0 0 16px; font-weight: 800; max-width: 22ch; }
.section h2 + .grid { margin-top: 38px; }
.section .sub { font-size: 1.08rem; color: var(--text-2); max-width: 66ch; margin: 0 0 44px; }
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  position: relative; background: linear-gradient(180deg, rgba(20, 28, 42, 0.78), rgba(15, 21, 32, 0.78)); border: 1px solid var(--line); border-radius: var(--r); padding: 24px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
a.card { display: block; color: inherit; }
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 18px 50px rgba(30, 50, 110, 0.22); }
.card h3 { margin: 16px 0 8px; font-size: 1.08rem; color: #fff; letter-spacing: -0.01em; line-height: 1.3; }
.card p { margin: 0; font-size: 0.95rem; color: var(--muted); line-height: 1.62; }
.card p + p { margin-top: 8px; }
.card .more { display: inline-block; margin-top: 14px; font-size: 0.88rem; font-weight: 600; color: var(--brand); }
.ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid rgba(139, 124, 246, 0.3); color: #aebffb;
}
.ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico.g { background: rgba(67, 217, 154, 0.1); border-color: rgba(67, 217, 154, 0.3); color: var(--green); }
.ico.a { background: rgba(245, 182, 74, 0.1); border-color: rgba(245, 182, 74, 0.3); color: var(--amber); }
.ico.c { background: rgba(55, 211, 230, 0.1); border-color: rgba(55, 211, 230, 0.3); color: var(--cyan); }
.ico.r { background: rgba(255, 122, 134, 0.1); border-color: rgba(255, 122, 134, 0.3); color: var(--red); }

.rt { display: flex; flex-direction: column; gap: 14px; }
.rt .head { display: flex; align-items: center; gap: 12px; }
.rt .head h3 { margin: 0; }
.rt dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.88rem; }
.rt dt { color: var(--faint); }
.rt dd { margin: 0; color: var(--text-2); }
.rt code { color: #c9d6f5; }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: s; position: relative; }
.three .s { position: relative; padding: 0 28px 0 0; }
.three .s::before {
  counter-increment: s; content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad); color: #060b16; font-weight: 800; margin-bottom: 18px; box-shadow: 0 8px 24px rgba(110, 120, 245, 0.4);
}
.three .s:not(:last-child)::after { content: ""; position: absolute; top: 21px; left: 56px; right: 12px; height: 2px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.three h3 { margin: 0 0 8px; color: #fff; font-size: 1.14rem; }
.three p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.honest { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 26px 28px; background: rgba(15, 21, 32, 0.5); }
.honest ul { margin: 12px 0 0; padding-left: 20px; columns: 2; column-gap: 40px; }
.honest li { margin-bottom: 7px; break-inside: avoid; color: var(--text-2); }

.cta-band {
  text-align: center; padding: 56px 28px; border-radius: 22px; border: 1px solid rgba(139, 124, 246, 0.35);
  background: radial-gradient(600px 240px at 50% 0%, rgba(110, 120, 245, 0.28), transparent 70%), var(--surface);
}
.cta-band h2 { margin: 0 auto 12px; max-width: 20ch; }
.cta-band p { max-width: 52ch; margin: 0 auto; color: var(--text-2); }
.cta-band .cta { justify-content: center; margin-bottom: 0; }

/* inline code outside .prose (landing, FAQ, cards) */
:is(.section, .hero, .cta-band, .honest, .card, details.qa) :not(pre):not(.mock *) > code {
  font-size: 0.86em; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line); color: #c4d3f7;
}
.card p, .card dd { line-height: 1.65; }

/* ───────────────────────── docs layout ───────────────────────── */
.docs {
  display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--toc); gap: 0 44px;
  max-width: 1440px; margin: 0 auto; padding: 0 28px;
}
.docs.no-toc { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar, .toc { position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar)); overflow-y: auto; padding: 30px 0 40px; }
.sidebar { padding-right: 14px; margin-right: -14px; }
.sb-group { margin-bottom: 22px; }
.sb-group h4 { margin: 0 0 6px; font-size: 0.7rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); font-weight: 700; padding-left: 12px; }
.sb-group a {
  display: flex; gap: 10px; align-items: baseline; padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-size: 0.92rem; line-height: 1.4; border-left: 2px solid transparent;
}
.sb-group a .n { color: var(--faint); font-family: var(--mono); font-size: 0.74rem; min-width: 1.4em; }
.sb-group a:hover { background: var(--surface-2); color: #fff; }
.sb-group a[aria-current="page"] { background: linear-gradient(90deg, rgba(91, 141, 239, 0.16), transparent); color: #fff; border-left-color: var(--brand); font-weight: 600; }
.toc { padding-top: 38px; }
.toc h4 { margin: 0 0 10px; font-size: 0.7rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 0.85rem; line-height: 1.4; color: var(--muted); }
.toc li.l3 a { padding-left: 28px; font-size: 0.8rem; }
.toc a:hover { color: #fff; }
.toc a.on { color: #fff; border-left-color: var(--brand); }
.scrim { display: none; }
.doc-main { min-width: 0; padding: 40px 0 72px; }
.crumbs { font-size: 0.84rem; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: #fff; }
.crumbs i { font-style: normal; opacity: 0.5; }

/* ───────────────────────── prose ───────────────────────── */
.prose { max-width: 860px; }
.prose > .chapter { display: inline-block; font-family: var(--mono); font-size: 0.78rem; color: var(--brand); letter-spacing: 0.06em; margin-bottom: 8px; }
.prose h1 { font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.1; letter-spacing: -0.032em; color: #fff; margin: 0 0 16px; font-weight: 800; }
.prose .lede { font-size: 1.15rem; line-height: 1.65; color: var(--text-2); margin: 0 0 8px; }
.prose h2 { font-size: 1.62rem; letter-spacing: -0.022em; color: #fff; margin: 60px 0 14px; padding-top: 34px; border-top: 1px solid var(--line); line-height: 1.2; font-weight: 750; }
.prose h2:first-of-type { margin-top: 40px; }
.prose h3 { font-size: 1.2rem; color: #f1f4fb; margin: 38px 0 10px; letter-spacing: -0.012em; line-height: 1.3; font-weight: 700; }
.prose h4 { font-size: 1rem; color: #f1f4fb; margin: 26px 0 8px; font-weight: 700; }
.prose :is(h2, h3, h4) .anchor { margin-left: 10px; color: var(--faint); opacity: 0; font-weight: 400; transition: opacity .15s; }
.prose :is(h2, h3, h4):hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--faint); }
.prose strong { color: #f3f6fc; font-weight: 650; }
.prose a { text-decoration: underline; text-decoration-color: rgba(91, 141, 239, 0.4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose :not(pre) > code {
  font-size: 0.86em; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line); color: #c4d3f7; white-space: break-spaces; overflow-wrap: anywhere;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose blockquote { margin: 20px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand-2); color: var(--text-2); }
.table-wrap { overflow-x: auto; margin: 22px 0 26px; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(15, 21, 32, 0.6); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.5; }
.prose th { text-align: left; padding: 11px 16px; font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.prose td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: rgba(91, 141, 239, 0.05); }
.prose td code { white-space: nowrap; }
.prose dl { margin: 18px 0; }
.prose dt { color: #f3f6fc; font-weight: 650; margin-top: 14px; }
.prose dd { margin: 4px 0 0 0; padding-left: 18px; border-left: 2px solid var(--line); }

/* callouts */
.admonition {
  margin: 24px 0; padding: 16px 20px 16px 54px; position: relative; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); --c: var(--brand);
  border-left: 3px solid var(--c);
}
.admonition::before {
  content: ""; position: absolute; left: 18px; top: 18px; width: 20px; height: 20px; background: var(--c);
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
  --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E");
}
.admonition > :last-child { margin-bottom: 0; }
.admonition-title { margin: 0 0 6px; font-weight: 700; color: #fff; font-size: 0.95rem; }
.admonition p { font-size: 0.95rem; }
.admonition.tip { --c: var(--green); background: rgba(67, 217, 154, 0.06); }
.admonition.tip::before { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.8.8 1 1.5 1 2.5h6c0-1 .2-1.7 1-2.5A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.admonition.warning { --c: var(--amber); background: rgba(245, 182, 74, 0.06); }
.admonition.warning::before { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0zM12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.admonition.danger { --c: var(--red); background: rgba(255, 122, 134, 0.06); }
.admonition.danger::before { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 2h8.2L22 7.9v8.2L16.1 22H7.9L2 16.1V7.9zM12 8v5M12 16.5h.01'/%3E%3C/svg%3E"); }
.admonition.example { --c: var(--brand-2); background: rgba(139, 124, 246, 0.06); }
.admonition.example::before { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9zM19 16l.7 1.8L21.5 18.5l-1.8.7L19 21l-.7-1.8-1.8-.7 1.8-.7z'/%3E%3C/svg%3E"); }
.admonition.note { --c: var(--brand); background: rgba(91, 141, 239, 0.06); }

/* numbered steps */
.prose ol.steps { list-style: none; padding: 0; margin: 26px 0; counter-reset: st; }
.prose ol.steps > li { position: relative; counter-increment: st; padding: 0 0 22px 56px; margin: 0; min-height: 40px; }
.prose ol.steps > li::before {
  content: counter(st); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--line-strong); color: #fff; font-weight: 700; font-size: 0.92rem;
}
.prose ol.steps > li::after { content: ""; position: absolute; left: 17.5px; top: 40px; bottom: 4px; width: 1px; background: var(--line-strong); }
.prose ol.steps > li:last-child::after { display: none; }
.prose ol.steps > li > :first-child { margin-top: 0; }
.prose ol.steps > li > strong:first-child { color: #fff; font-size: 1.04rem; }

/* code */
.code { margin: 22px 0; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #080c13; overflow: hidden; }
.code figcaption, .code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 8px 7px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 0.74rem; color: var(--muted); font-family: var(--mono); letter-spacing: 0.03em; }
.code .title { color: var(--text-2); }
.copy { background: none; border: 1px solid transparent; color: var(--muted); font: inherit; font-size: 0.72rem; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.copy:hover { color: #fff; border-color: var(--line-strong); background: var(--surface-3); }
.copy.done { color: var(--green); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 0.84rem; line-height: 1.68; color: #d3dcf0; tab-size: 2; }
.code pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; white-space: pre; }
.t-k, .t-kd, .t-kn, .t-kc, .t-kt, .t-kr { color: #c792ea; }
.t-s, .t-s1, .t-s2, .t-sb, .t-sd, .t-se, .t-si, .t-sa { color: #9be59d; }
.t-c, .t-c1, .t-cm, .t-cs, .t-ch { color: #5e6d88; font-style: italic; }
.t-m, .t-mi, .t-mf, .t-mh, .t-il, .t-ma { color: #f7a86a; }
.t-nt, .t-na, .t-nc, .t-nn { color: #7fb4ff; }
.t-nb, .t-nf, .t-bp, .t-fm { color: #62d6e8; }
.t-nv, .t-vi, .t-vg, .t-vc { color: #f2d28a; }
.t-o, .t-ow { color: #9aa8c5; }
.t-p { color: #8a97b3; }
.t-nd { color: #f2d28a; }
.t-l, .t-ld { color: #9be59d; }
.t-gp { color: #5f6c84; user-select: none; }
.t-go { color: #8a97b3; }
.t-gh, .t-gu { color: #7fb4ff; font-weight: 600; }
.t-err { color: inherit; background: none; }

/* tabs */
.tabset { margin: 26px 0; border: 1px solid var(--line-strong); border-radius: var(--r); background: rgba(15, 21, 32, 0.55); overflow: hidden; }
.tabset > .tab-bar { display: flex; gap: 2px; padding: 8px 8px 0; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabset .tab-btn { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; font-size: 0.88rem; padding: 9px 16px; border-radius: 8px 8px 0 0; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabset .tab-btn:hover { color: #fff; }
.tabset .tab-btn[aria-selected="true"] { color: #fff; border-bottom-color: var(--brand); background: rgba(91, 141, 239, 0.1); }
.tabset .tab { padding: 6px 22px 8px; }
.tabset .tab > :first-child { margin-top: 18px; }
.tabset .code { margin-left: 0; margin-right: 0; }
html:not(.js) .tabset .tab::before { content: attr(data-title); display: block; margin-top: 16px; font-weight: 700; color: #fff; }

/* figures */
.fig { margin: 30px 0; counter-increment: fig; border: 1px solid var(--line-strong); border-radius: var(--r); background: linear-gradient(180deg, #0c121c, #0a0f17); overflow: hidden; }
.fig > .fig-body { padding: 20px; overflow-x: auto; }
.fig > .fig-body > svg.dg { min-width: 0 !important; }
.fig > .fig-body svg { display: block; margin: 0 auto; width: 100%; height: auto; }
.fig figcaption { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); background: rgba(20, 28, 42, 0.6); }
.fig figcaption::before { content: "Fig. " counter(fig) " — "; color: var(--brand); font-weight: 650; }
html[lang="uk"] .fig figcaption::before { content: "Рис. " counter(fig) " — "; }
.prose { counter-reset: fig; }
.legend { margin: -6px 0 24px; padding-left: 0; list-style: none; counter-reset: lg; display: grid; gap: 8px; font-size: 0.92rem; }
.legend li { counter-increment: lg; position: relative; padding-left: 34px; margin: 0; }
.legend li::before { content: counter(lg); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #04101f; font-weight: 800; font-size: 0.72rem; }
.pin { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #04101f; font: 800 0.68rem/1 var(--font); font-style: normal; vertical-align: middle; margin-left: 6px; box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.3); flex: none; }

/* flow (horizontal pipeline) */
ol.flow { list-style: none; margin: 26px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; counter-reset: fl; }
ol.flow > li { flex: 1 1 130px; position: relative; margin: 0; padding: 16px 16px 16px 18px; background: var(--surface-2); border: 1px solid var(--line-strong); border-right: 0; min-width: 130px; counter-increment: fl; }
ol.flow > li:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
ol.flow > li:last-child { border-right: 1px solid var(--line-strong); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
ol.flow > li::before { content: counter(fl); display: block; font-family: var(--mono); font-size: 0.7rem; color: var(--brand); margin-bottom: 4px; }
ol.flow > li b { display: block; color: #fff; font-size: 0.94rem; margin-bottom: 3px; }
ol.flow > li span { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
ol.flow > li:not(:last-child)::after {
  content: ""; position: absolute; right: -9px; top: 50%; width: 16px; height: 16px; margin-top: -8px; transform: rotate(45deg); z-index: 2;
  background: var(--surface-2); border-top: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong);
}
ol.flow.accent > li:first-child { background: rgba(91, 141, 239, 0.12); }
ol.flow.accent > li:last-child { background: rgba(67, 217, 154, 0.1); }

/* cards inside prose, chapter map */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 26px 0; }
.cards .card { padding: 20px; }
.cards .card h3 { margin: 12px 0 6px; font-size: 1rem; }
.cards .card p { font-size: 0.88rem; }
.cards .card .num { font-family: var(--mono); font-size: 0.74rem; color: var(--brand); }
.prose .cards a.card { text-decoration: none; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kvgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 22px 0; }
.kvgrid > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.kvgrid b { display: block; color: #fff; font-size: 1.15rem; letter-spacing: -0.01em; }
.kvgrid span { font-size: 0.82rem; color: var(--muted); }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0; }
.cols-2 > * { min-width: 0; }
.cols-2 .code { margin: 0; }

/* cards that live inside prose: neutralise the prose heading/list rules */
.prose .card h3 { margin: 14px 0 6px; font-size: 1.02rem; }
.prose .rt .head h3 { margin: 0; }
.prose .rt dl { margin: 0; }
.prose .rt dt { margin: 0; color: var(--faint); font-weight: 400; }
.prose .rt dd { margin: 0; padding: 0; border: 0; }
.prose .card p { font-size: 0.9rem; }

/* pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.pager a { display: block; padding: 18px 22px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text-2); transition: border-color .15s, transform .15s; text-decoration: none; }
.pager a:hover { border-color: var(--brand); transform: translateY(-2px); color: #fff; }
.pager small { display: block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pager b { color: #fff; font-size: 1.02rem; }
.pager .next { text-align: right; }
.pager .only-next { grid-column: 2; }

/* footer */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 38px 0 54px; color: var(--muted); font-size: 0.88rem; }
.footer-in { max-width: 1440px; margin: 0 auto; padding: 0 28px; display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: flex-start; justify-content: space-between; }
.footer a { color: var(--text-2); }
.footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer p { margin: 6px 0 0; max-width: 60ch; }

/* ───────────────────────── UI mock-up kit (mirrors the real console's dark theme) ───────────────────────── */
.mock {
  --m-bg: #12161d; --m-surface: #1b212b; --m-surface2: #252d39; --m-input: #141920; --m-text: #e6eaf2; --m-muted: #9aa5b8; --m-border: #323b4a; --m-border2: #4a5568;
  --m-primary: #4f8ef7; --m-ok: #62d68c; --m-okbg: #173325; --m-warn: #f2b24c; --m-warnbg: #3a2e14; --m-danger: #ff7b7b; --m-dangerbg: #3a1f23; --m-code: #0b0f16;
  border-radius: 12px; overflow: hidden; border: 1px solid #2a3446; background: var(--m-bg); color: var(--m-text); font: 13.5px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; text-align: left;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.mock * { box-sizing: border-box; }
.mock-bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: #0c1017; border-bottom: 1px solid #232c3b; }
.mock-bar .dots { display: flex; gap: 6px; }
.mock-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #2c3647; }
.mock-bar .dots i:nth-child(1) { background: #ff6b6b; opacity: 0.8; }
.mock-bar .dots i:nth-child(2) { background: #f5b64a; opacity: 0.8; }
.mock-bar .dots i:nth-child(3) { background: #43d99a; opacity: 0.8; }
.mock-bar .url { flex: 1; max-width: 420px; margin: 0 auto; padding: 3px 12px; border-radius: 7px; background: #141a24; color: #7f8da5; font: 12px var(--mono); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-nav { display: flex; align-items: center; gap: 2px; padding: 9px 14px; background: var(--m-surface); border-bottom: 1px solid var(--m-border); flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.m-nav b { margin-right: 8px; }
.m-nav span { color: var(--m-muted); padding: 4px 8px; border-radius: 8px; }
.m-nav span.on { color: var(--m-text); background: var(--m-surface2); font-weight: 600; }
.m-nav .sp { flex: 1; }
.m-nav .m-lang { padding: 2px 8px; border: 1px solid var(--m-border2); border-radius: 7px; color: var(--m-text); font-size: 12px; margin-right: 6px; }
.m-nav .btn-s { padding: 3px 10px; border: 1px solid var(--m-border2); border-radius: 7px; color: var(--m-text); }
.m-body { padding: 18px 20px 22px; overflow-x: auto; }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.m-head h4 { margin: 0; font-size: 1.28rem; color: var(--m-text); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.m-muted { color: var(--m-muted); }
.m-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--m-border); margin-bottom: 16px; overflow-x: auto; }
.m-tabs span { padding: 7px 10px; color: var(--m-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.m-tabs span.on { color: var(--m-text); font-weight: 600; border-bottom-color: var(--m-primary); }
.m-card { background: var(--m-surface); border: 1px solid var(--m-border); border-radius: 10px; padding: 14px 18px; margin-bottom: 14px; }
.m-card > h5 { margin: 0 0 10px; font-size: 1.02rem; color: var(--m-text); font-weight: 650; }
.m-card p { margin: 0 0 10px; color: var(--m-text); font-size: 13.5px; }
.m-card p.m-muted { color: var(--m-muted); font-size: 12.5px; }
.m-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.m-table th { text-align: left; padding: 7px 10px; color: var(--m-muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; background: var(--m-surface2); border-bottom: 1px solid var(--m-border); font-weight: 600; }
.m-table td { padding: 8px 10px; border-bottom: 1px solid var(--m-border); color: var(--m-text); vertical-align: middle; }
.m-table tr:last-child td { border-bottom: 0; }
.m-table td.r { text-align: right; white-space: nowrap; }
.m-table .m-btn { padding: 3px 9px; font-size: 12px; }
.m-table td { white-space: normal; }
.m-table td:has(.pin) { white-space: nowrap; }
.m-table code, .m-card code { font: 12px var(--mono); background: var(--m-surface2); padding: 1px 6px; border-radius: 4px; color: #cfe0ff; }
.m-badge { display: inline-block; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--m-border2); color: var(--m-muted); line-height: 1.6; white-space: nowrap; }
.m-badge.ok { color: var(--m-ok); border-color: var(--m-ok); background: var(--m-okbg); }
.m-badge.bad { color: var(--m-danger); border-color: var(--m-danger); background: var(--m-dangerbg); }
.m-badge.warn { color: var(--m-warn); border-color: var(--m-warn); background: var(--m-warnbg); }
.m-btn { display: inline-block; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--m-border2); background: var(--m-surface); color: var(--m-text); font-size: 12.5px; line-height: 1.4; }
.m-btn.p { background: var(--m-primary); border-color: var(--m-primary); color: #0b1220; font-weight: 600; }
.m-btn.d { border-color: var(--m-danger); color: var(--m-danger); }
.m-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.m-in { display: block; width: 100%; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--m-border2); background: var(--m-input); color: var(--m-text); font-size: 13px; min-height: 31px; }
.m-in.mono { font-family: var(--mono); font-size: 12px; }
.m-lbl { display: block; margin-bottom: 10px; font-size: 12.5px; font-weight: 500; color: var(--m-text); }
.m-lbl .m-muted { font-weight: 400; }
.m-lbl .m-in { margin-top: 4px; }
.m-log { background: var(--m-code); border: 1px solid var(--m-border); border-radius: 8px; padding: 10px 12px; font: 11.8px/1.6 var(--mono); color: #d8e6ff; white-space: pre; overflow-x: auto; margin: 0; }
.m-log .ok { color: #62d68c; } .m-log .dim { color: #6b7a94; } .m-log .hl { color: #f2d28a; } .m-log .er { color: #ff8f8f; }
.m-kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 4px 0; font-size: 13px; }
.m-kv dt { color: var(--m-muted); } .m-kv dd { margin: 0; color: var(--m-text); overflow-wrap: anywhere; }
.m-banner { padding: 8px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 12px; border: 1px solid; }
.m-banner.warn { background: var(--m-warnbg); color: var(--m-warn); border-color: var(--m-warn); }
.m-banner.ok { background: var(--m-okbg); color: var(--m-ok); border-color: var(--m-ok); }
.m-chart { width: 100%; height: auto; display: block; }
.m-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.m-modal { max-width: 460px; margin: 0 auto; background: var(--m-surface); border: 1px solid var(--m-border); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); padding: 16px 20px 18px; }
.m-modal h5 { margin: 0 0 12px; font-size: 1.1rem; color: var(--m-text); }
.m-dim { background: rgba(5, 8, 14, 0.55); padding: 22px; }

/* real console screenshots in a browser frame */
.shot { border: 1px solid #2a3446; border-radius: 12px; overflow: hidden; background: #12161d; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.shot img { display: block; width: 100%; height: auto; }
.shot a { display: block; cursor: zoom-in; }
.shot .mock-bar .url { color: #7f8da5; font: 12px var(--mono); }

/* terminal (non-copy illustration) */
.term { border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #070a10; overflow: hidden; margin: 22px 0; font-family: var(--mono); font-size: 0.82rem; }
.term-bar { display: flex; gap: 6px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2c3647; }
.term pre { margin: 0; padding: 14px 16px; line-height: 1.7; overflow-x: auto; color: #cdd7ee; }
.term .p { color: #5f6c84; } .term .g { color: var(--green); } .term .y { color: var(--amber); } .term .b { color: #7fb4ff; } .term .m { color: #c792ea; } .term .d { color: #62718c; }

/* chat illustration (agent flow) */
.chat { display: grid; gap: 12px; margin: 22px 0; }
.chat .u, .chat .a, .chat .t { padding: 12px 16px; border-radius: 14px; max-width: 92%; font-size: 0.92rem; line-height: 1.55; }
.chat .u { background: var(--surface-3); border: 1px solid var(--line-strong); justify-self: end; color: var(--text); border-bottom-right-radius: 4px; }
.chat .a { background: rgba(91, 141, 239, 0.08); border: 1px solid rgba(91, 141, 239, 0.25); color: var(--text-2); border-bottom-left-radius: 4px; }
.chat .t { font-family: var(--mono); font-size: 0.78rem; background: #080c13; border: 1px solid var(--line); color: #9fb0cf; border-radius: 10px; }
.chat .t b { color: #62d6e8; font-weight: 600; } .chat .t em { color: #9be59d; font-style: normal; }
.chat small { display: block; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; font-family: var(--font); }

/* ───────────────────────── SVG diagram primitives ───────────────────────── */
.dg text { font-family: var(--font); fill: var(--text-2); font-size: 13.5px; }
.dg .tt { fill: #fff; font-weight: 700; font-size: 14.5px; }
.dg .ts { fill: var(--muted); font-size: 12px; }
.dg .tm { font-family: var(--mono); font-size: 11.5px; fill: #9db4ee; }
.dg .tc { text-anchor: middle; }
.dg .te { text-anchor: end; }
.dg .tl { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; fill: var(--faint); font-weight: 700; }
.dg .box { fill: #111a29; stroke: rgba(150, 165, 205, 0.3); stroke-width: 1.2; }
.dg .box.main { fill: rgba(91, 141, 239, 0.045); stroke: rgba(91, 141, 239, 0.6); stroke-dasharray: 7 5; }
.dg .box.net { fill: rgba(150, 165, 205, 0.035); stroke: rgba(150, 165, 205, 0.22); stroke-dasharray: 3 4; }
.dg .box.user { fill: rgba(139, 124, 246, 0.07); stroke: rgba(139, 124, 246, 0.6); }
.dg .box.dbx { fill: rgba(55, 211, 230, 0.06); stroke: rgba(55, 211, 230, 0.55); }
.dg .box.ok { fill: rgba(67, 217, 154, 0.08); stroke: rgba(67, 217, 154, 0.6); }
.dg .box.warn { fill: rgba(245, 182, 74, 0.08); stroke: rgba(245, 182, 74, 0.6); }
.dg .box.bad { fill: rgba(255, 122, 134, 0.08); stroke: rgba(255, 122, 134, 0.6); }
.dg .box.hot { fill: rgba(91, 141, 239, 0.14); stroke: #5b8def; }
.dg .box.glow { filter: drop-shadow(0 0 14px rgba(91, 141, 239, 0.35)); }
.dg .app { fill: #16223a; stroke: #5b8def; stroke-width: 1.2; }
.dg .pg { fill: #0f2630; stroke: #37d3e6; stroke-width: 1.2; }
.dg .ln { stroke: #5d6e90; stroke-width: 1.5; fill: none; }
.dg .ln.hot { stroke: #8b7cf6; }
.dg .ln.cy { stroke: #37d3e6; }
.dg .ln.gr { stroke: #43d99a; }
.dg .ln.dash { stroke-dasharray: 5 5; }
.dg .ln.thin { stroke-width: 1; }
.dg .dot { fill: #5b8def; }
.dg .dot.v { fill: #8b7cf6; } .dg .dot.g { fill: #43d99a; } .dg .dot.c { fill: #37d3e6; } .dg .dot.a { fill: #f5b64a; } .dg .dot.r { fill: #ff7a86; }
.dg .num { fill: #04101f; font-weight: 800; font-size: 11px; text-anchor: middle; }
.dg .numbg { fill: #5b8def; }

/* ───────────────────────── FAQ ───────────────────────── */
.faq-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 22px; }
.faq-tools input[type="search"] {
  flex: 1 1 280px; padding: 12px 16px 12px 42px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238493ab' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 14px 50% / 18px no-repeat;
  color: var(--text); font: inherit; font-size: 0.97rem;
}
.faq-tools input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91, 141, 239, 0.2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip { cursor: pointer; font: inherit; font-size: 0.86rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); }
.chip:hover { color: #fff; border-color: #3d4d6e; }
.chip[aria-pressed="true"] { background: rgba(91, 141, 239, 0.18); border-color: var(--brand); color: #fff; }
.faq-group { margin-bottom: 44px; scroll-margin-top: 90px; }
.faq-group > h2 { max-width: none; font-size: 1.3rem; color: #fff; margin: 0 0 14px; letter-spacing: -0.015em; display: flex; align-items: center; gap: 12px; }
.faq-group > h2 .ico { width: 36px; height: 36px; border-radius: 10px; }
.faq-group > h2 .ico svg { width: 19px; height: 19px; }
details.qa { border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(15, 21, 32, 0.7); margin-bottom: 10px; transition: border-color .15s, background .15s; }
details.qa:hover { border-color: var(--line-strong); }
details.qa[open] { border-color: rgba(91, 141, 239, 0.45); background: rgba(20, 28, 42, 0.85); }
details.qa > summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; position: relative; color: #f1f4fb; font-weight: 600; font-size: 1.02rem; line-height: 1.45; }
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
details.qa[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--brand); }
details.qa > .a { padding: 0 22px 18px 20px; color: var(--text-2); font-size: 0.97rem; }
details.qa > .a > :first-child { margin-top: 0; }
details.qa .a p { margin: 0 0 12px; }
details.qa .a ul, details.qa .a ol { margin: 0 0 12px; padding-left: 22px; }
details.qa .a li { margin: 4px 0; }
details.qa .a code { font-size: 0.86em; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--line); color: #c4d3f7; }
details.qa .a .code { margin: 12px 0; }
details.qa .a .code code { background: none; border: 0; padding: 0; }
details.qa .a a { text-decoration: underline; text-decoration-color: rgba(91, 141, 239, 0.4); text-underline-offset: 3px; }
details.qa .a .more { font-size: 0.88rem; }
.faq-empty { display: none; text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r); }
.faq-empty.show { display: block; }
mark { background: rgba(245, 182, 74, 0.28); color: #fff; border-radius: 3px; padding: 0 2px; }

/* ───────────────────────── search ───────────────────────── */
.search-modal { position: fixed; inset: 0; z-index: 120; display: none; align-items: flex-start; justify-content: center; padding: 11vh 16px 16px; background: rgba(4, 7, 12, 0.72); backdrop-filter: blur(6px); }
.search-modal.open { display: flex; }
.search-box { width: min(680px, 100%); max-height: 72vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.search-box input { width: 100%; padding: 20px 22px; background: none; border: 0; border-bottom: 1px solid var(--line); color: #fff; font: inherit; font-size: 1.08rem; outline: none; }
.search-res { overflow-y: auto; padding: 8px; }
.search-res a { display: block; padding: 11px 14px; border-radius: 10px; color: var(--text-2); }
.search-res a:hover, .search-res a.sel { background: var(--surface-3); color: #fff; }
.search-res b { display: block; color: #fff; font-size: 0.95rem; }
.search-res small { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.45; margin-top: 2px; }
.search-res .where { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.search-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 0.76rem; color: var(--muted); }
.search-empty { padding: 28px; text-align: center; color: var(--muted); }

/* reveal on scroll (only with JS, only without reduced-motion) */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .float, .kicker i, .hero-art { animation: none; }
}

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width: 1240px) {
  .docs { grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: 0 44px; }
  .toc { display: none; }
}
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three { grid-template-columns: 1fr; gap: 26px; }
  .three .s:not(:last-child)::after { display: none; }
  .honest ul { columns: 1; }
}
@media (max-width: 900px) {
  .docs, .docs.no-toc { grid-template-columns: minmax(0, 1fr); padding: 0 18px; }
  .sidebar {
    position: fixed; z-index: 70; left: 0; top: var(--topbar); bottom: 0; width: min(310px, 86vw); height: auto; padding: 22px 16px 40px; margin: 0;
    background: var(--bg-elev); border-right: 1px solid var(--line-strong); transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: var(--topbar) 0 0 0; z-index: 65; background: rgba(4, 7, 12, 0.6); }
  .scrim.show { display: block; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; }
  .search-btn { min-width: 0; }
  .search-btn span, .search-btn kbd { display: none; }
  .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar-in, .wrap, .footer-in { padding: 0 18px; }
  .brand small { display: none; }
  .hero { padding-top: 52px; }
  .hero h1 { font-size: 2.05rem; }
  .section { padding: 56px 0; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .only-next { grid-column: 1; }
  .prose h2 { font-size: 1.4rem; }
  .fig > .fig-body { padding: 12px; }
  .fig > .fig-body > svg.dg { min-width: 680px !important; }
  ol.flow { flex-direction: column; }
  ol.flow > li { border-right: 1px solid var(--line-strong); border-bottom: 0; }
  ol.flow > li:first-child { border-radius: var(--r-sm) var(--r-sm) 0 0; }
  ol.flow > li:last-child { border-bottom: 1px solid var(--line-strong); border-radius: 0 0 var(--r-sm) var(--r-sm); }
  ol.flow > li:not(:last-child)::after { right: auto; left: 28px; top: auto; bottom: -9px; margin: 0; transform: rotate(135deg); }
  .m-grid2 { grid-template-columns: 1fr; }
  .mock { font-size: 12.5px; }
  .stats { gap: 14px 26px; }
}

/* ───────────────────────── print ───────────────────────── */
@media print {
  body::before, .topbar, .sidebar, .toc, .pager, .footer, .search-modal, .copy, .scrim, .menu-btn { display: none !important; }
  body { background: #fff; color: #111; }
  .docs { display: block; padding: 0; }
  .prose h1, .prose h2, .prose h3, .prose strong { color: #000; }
  .code, .fig, .mock { break-inside: avoid; }
}
