:root {
  --bg: #efeeea;
  --bg-elev: #eae8e3;
  --card: #f3f2ee;
  --card-hover: #f7f6f2;
  --border: #d8d5ce;
  --border-light: #c6c2b9;
  --text: #1d1616;
  --text-dim: #3a3430;
  --muted: #6d6660;
  --accent: #ff6414;
  --accent-2: #ff6414;
  --accent-dim: #e35505;
  --accent-soft: #ffe3d2;
  --accent-glow: rgba(255, 100, 20, 0.12);
  --danger: #c0392b;
  --mono: "Fira Code", "SF Mono", ui-monospace, Menlo, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  --display: "Funnel Display", Inter, sans-serif;
  --radius: 0px;
  --maxw: 1440px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: var(--display); font-weight: 600; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #c9c5bc; }
::-webkit-scrollbar-thumb:hover { background: #b3aea3; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.mono { font-family: var(--mono); }

/* Architectural side rails, like the brand site's framed column. */
body::before, body::after {
  content: ""; position: fixed; top: 0; bottom: 0; width: 1px;
  background: var(--border); z-index: 90; pointer-events: none;
}
body::before { left: max(16px, calc((100vw - var(--maxw)) / 2)); }
body::after { right: max(16px, calc((100vw - var(--maxw)) / 2)); }
@media (max-width: 1000px) { body::before, body::after { display: none; } }

/* ---------- Nav ---------- */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(239, 238, 234, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; position: relative; }
/* Centered link cluster, like the brand site; the action button rides right. */
.nav-links { position: absolute; left: 50%; transform: translateX(-50%); }
.nav-side { display: flex; align-items: center; gap: 12px; }
@media (max-width: 940px) { .nav-links { position: static; transform: none; } }
.logo {
  font-family: var(--display); font-weight: 700; font-size: 23px; letter-spacing: -0.01em;
  color: var(--text); display: flex; align-items: baseline; gap: 7px; text-transform: lowercase;
}
.logo .mark { display: none; }
/* The liquidity product's own mark: "ordo" black, "liquidity" on the accent block. Height sets the size; the PNG is 680×154. */
.logo-liq img { display: block; height: 28px; width: auto; }
.footer-brand .logo-liq img { height: 26px; }
@media (max-width: 640px) { .logo-liq img { height: 24px; } }
.logo .logo-app {
  font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--accent);
  letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid var(--accent);
  padding: 2px 6px; transform: translateY(-4px);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: 14px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.here { color: var(--accent); }
.btn {
  background: var(--accent); color: #fff; padding: 9px 18px; border-radius: 0;
  font-weight: 600; font-size: 13.5px; white-space: nowrap; font-family: var(--sans);
  transition: background .18s; border: 1px solid var(--accent);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border-light); }
.btn.ghost:hover { background: transparent; border-color: var(--text); color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: 92px 0 56px; text-align: left; border-bottom: 1px solid var(--border); }
.badge-link {
  display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--border-light);
  padding: 7px 14px; font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-bottom: 34px;
  transition: border-color .2s, color .2s;
}
.badge-link:hover { border-color: var(--accent); color: var(--accent); }
.badge-link .arrow { color: var(--accent); }
.hero h1 {
  font-size: clamp(44px, 6.2vw, 84px); line-height: 1.02; letter-spacing: -0.02em;
  font-weight: 500; margin-bottom: 26px; max-width: 17ch;
}
.tag { display: none; }
.grad { color: var(--accent); }
.hero p.sub { font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); max-width: 560px; margin: 0 0 34px; line-height: 1.6; }
.cta { display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap; align-items: center; }

/* Framed hero visual with corner ticks */
.frame { position: relative; margin-top: 64px; border: 1px solid var(--border-light); padding: 36px; background: transparent; }
.frame::before, .frame::after,
.frame > .ctl, .frame > .ctr { content: ""; position: absolute; width: 8px; height: 8px; background: var(--accent); }
.frame::before { top: -4px; left: -4px; }
.frame::after { top: -4px; right: -4px; }
.frame > .ctl { bottom: -4px; left: -4px; }
.frame > .ctr { bottom: -4px; right: -4px; }
.frame svg { width: 100%; height: auto; display: block; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; border: 1px solid var(--border); border-top: none; }
.stat { text-align: left; padding: 34px 32px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--display); font-size: clamp(30px, 3.6vw, 44px); font-weight: 500; letter-spacing: -0.02em; color: var(--text); line-height: 1.1; }
.stat .lbl { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
/* The counters that are ours: what went through our RPC, what the auction
   captured and paid back, who is competing for it right now. */
.stats.routed { background: var(--card); }
.stats.routed .stat .num { color: var(--accent); }
.stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats.five .stat { padding: 30px 24px; }
.stats.five .stat .num { font-size: clamp(24px, 2.6vw, 34px); }
.stat .sub { font-family: var(--mono); font-size: 11px; line-height: 1.5; color: var(--muted); margin-top: 6px; }

/* ---------- Ticker ---------- */
.ticker { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; white-space: nowrap; position: relative; background: var(--bg); }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ticker::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.ticker .track { display: inline-block; padding: 12px 0; animation: scroll 60s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
.ticker .item { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 24px; }
.ticker .item b { color: var(--accent); font-weight: 500; }
.ticker .item i { color: var(--text-dim); font-style: normal; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { padding: 96px 0; position: relative; }
.section-alt { background: var(--bg); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 24px; font-weight: 500;
}
.eyebrow::before { content: "[ "; }
.eyebrow::after { content: " ]"; }
.section-head h2 { font-size: clamp(30px, 3.8vw, 50px); letter-spacing: -0.015em; font-weight: 500; margin-bottom: 16px; line-height: 1.08; }
.section-head p { color: var(--muted); font-size: 16.5px; line-height: 1.65; }

/* ---------- Problem cards ---------- */
.problems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); }
.problem { background: var(--bg); border-right: 1px solid var(--border); padding: 34px 30px; }
.problem:last-child { border-right: none; }
.problem .pnum { font-family: var(--mono); font-size: 28px; font-weight: 600; color: var(--accent); letter-spacing: -0.02em; margin-bottom: 16px; }
.problem h4 { font-size: 19px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.problem p { color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* ---------- Product blocks ---------- */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.product {
  display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border);
  padding: 38px 34px; transition: border-color .2s; min-height: 240px; position: relative;
}
.product:hover { border-color: var(--accent); }
.product .ptag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; font-weight: 500; }
.product h3 { font-size: 26px; font-weight: 500; letter-spacing: -0.015em; margin-bottom: 14px; }
.product p { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin-bottom: 24px; }
.product .plink { margin-top: auto; font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--accent); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--border); }
.step { background: var(--bg); border-right: 1px solid var(--border); padding: 30px 26px; }
.step:last-child { border-right: none; }
.step .n { font-family: var(--mono); font-size: 12px; color: #fff; background: var(--accent); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; font-weight: 500; }
.step h4 { font-size: 17px; font-weight: 600; margin-bottom: 9px; letter-spacing: -0.01em; }
.step p { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ---------- Values ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.value h4 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 12px; }
.value p { color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* ---------- Code ---------- */
.code {
  position: relative; background: #191512; border: 1px solid #2c2620;
  padding: 24px 24px; font-family: var(--mono); font-size: 13px; line-height: 1.75;
  overflow-x: auto; color: #e3ddd2; white-space: pre-wrap; word-break: break-word;
}
.code::before { content: none; }
.code .c { color: #837a6d; }
.code .k { color: #ff8347; }
.code .s { color: #d8c07a; }

/* ---------- Ecosystem ---------- */
.eco { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.eco .chip { display: flex; align-items: center; gap: 9px; padding: 12px 22px; border: 1px solid var(--border); background: var(--bg); font-weight: 500; font-size: 14px; color: var(--text-dim); transition: border-color .2s, color .2s; font-family: var(--mono); }
.eco .chip:hover { border-color: var(--accent); color: var(--accent); }
.eco .chip .dot { display: none; }

/* ---------- Roadmap ---------- */
.roadmap { display: flex; flex-direction: column; max-width: 900px; margin: 0 auto; }
.phase { display: grid; grid-template-columns: 120px 1fr; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--border); align-items: start; }
.phase:first-child { border-top: 1px solid var(--border); }
.phase .badge { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); padding-top: 5px; }
.phase.live .badge { color: var(--accent); }
.phase h4 { font-size: 19px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.phase p { color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 0; font-size: 17px; font-weight: 500;
  font-family: var(--display); letter-spacing: -0.005em; display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 20px; color: var(--accent); font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); font-size: 15px; line-height: 1.7; padding-bottom: 24px; max-width: 92%; }

/* ---------- CTA ---------- */
.cta-banner { text-align: center; background: var(--bg); border: 1px solid var(--border); padding: 72px 40px; position: relative; }
.cta-banner::before, .cta-banner::after { content: ""; position: absolute; width: 8px; height: 8px; background: var(--accent); }
.cta-banner::before { top: -4px; left: -4px; }
.cta-banner::after { bottom: -4px; right: -4px; }
.cta-banner h2 { font-size: clamp(30px, 4vw, 52px); letter-spacing: -0.015em; font-weight: 500; margin-bottom: 16px; line-height: 1.08; }
.cta-banner p { color: var(--muted); font-size: 16.5px; margin-bottom: 32px; }
.cta-banner .cta { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 68px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand .logo { margin-bottom: 18px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 300px; line-height: 1.65; }
.footer-col h5 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 18px; font-weight: 500; }
.footer-col a { display: block; color: var(--text-dim); font-size: 14px; margin-bottom: 11px; transition: color .15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom .disclaimer { color: #8a847a; font-size: 12px; max-width: 680px; line-height: 1.6; font-family: var(--mono); }
.footer-bottom .socials { display: flex; gap: 20px; }
.footer-bottom .socials a { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.footer-bottom .socials a:hover { color: var(--accent); }

/* ---------- Doc / content pages ---------- */
.doc { max-width: 860px; margin: 0 auto; padding: 64px 0 100px; }
.doc h1 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -0.015em; font-weight: 500; margin-bottom: 14px; }
.doc > .lead { color: var(--muted); font-size: 18px; margin-bottom: 8px; line-height: 1.6; }
.doc h2 { font-size: 27px; margin: 54px 0 16px; letter-spacing: -0.01em; font-weight: 500; }
.doc h3 { font-size: 14px; margin: 32px 0 10px; color: var(--accent); font-family: var(--mono); font-weight: 500; }
.doc p, .doc li { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.doc ul, .doc ol { margin: 14px 0 14px 22px; }
.doc li { margin-bottom: 8px; }
.doc .code { margin: 18px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13.5px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.doc th, .doc td { text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--border); }
.doc th { color: var(--text); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; background: var(--bg-elev); }
.doc td { color: var(--muted); }
.doc code { font-family: var(--mono); font-size: 0.88em; background: var(--accent-soft); padding: 1px 6px; color: var(--accent-dim); }
.doc .code code { background: none; padding: 0; color: inherit; }
.pill { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 3px 9px; background: var(--accent-soft); color: var(--accent-dim); vertical-align: middle; font-weight: 500; }
.callout { background: var(--bg); border: 1px solid var(--border); border-left: 2px solid var(--accent); padding: 20px 22px; margin: 22px 0; color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }
.cta-row { display: flex; gap: 12px; margin: 32px 0; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .wrap { padding: 0 22px; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.btn) { display: none; }
  .products, .values { grid-template-columns: 1fr; }
  .problems { grid-template-columns: 1fr; }
  .problem { border-right: none; border-bottom: 1px solid var(--border); }
  .problem:last-child { border-bottom: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2n) { border-right: none; }
  .stats, .stats.five { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n) { border-right: none; }
  .stat { border-bottom: 1px solid var(--border); }
  .stats.five .stat:last-child { grid-column: 1 / -1; border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .phase { grid-template-columns: 1fr; gap: 10px; }
  .frame { padding: 22px; }
}
@media (max-width: 600px) {
  .stats, .stats.five, .steps { grid-template-columns: 1fr; }
  .stat { border-right: none; }
  .step { border-right: none; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
}

/* ---------- Sidebar layout (docs and other long reference pages) ---------- */
.side-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 60px; align-items: start; padding-top: 48px; padding-bottom: 110px; }
.sidenav { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto; padding-right: 10px; scrollbar-width: thin; }
.sidenav .sn-search { width: 100%; padding: 8px 10px; border: 1px solid var(--border); background: var(--card); font-family: var(--mono); font-size: 12px; color: var(--text); outline: none; margin-bottom: 16px; }
.sidenav .sn-search:focus { border-color: var(--accent); }
.sidenav h6 { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 20px 0 8px; }
.sidenav h6:first-of-type { margin-top: 0; }
.sidenav a { display: block; font-size: 13.5px; color: var(--text-dim); padding: 5px 0 5px 12px; border-left: 1px solid var(--border); transition: color .12s, border-color .12s; line-height: 1.4; }
.sidenav a:hover { color: var(--text); }
.sidenav a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.sidenav a.sub { padding-left: 24px; font-size: 12.5px; }
.sidenav a.hide, .sidenav h6.hide { display: none; }
.sidenav .sn-foot { margin-top: 24px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.sidenav .sn-foot b { color: var(--text-dim); font-weight: 500; }
.sn-toggle { display: none; margin-bottom: 14px; }
.doc-main { min-width: 0; }
.doc-main .doc { max-width: none; margin: 0; padding: 0; }
.doc h2, .doc h3 { scroll-margin-top: 86px; }
.doc h2 { border-top: 1px solid var(--border); padding-top: 40px; margin-top: 64px; }
.doc h2:first-of-type { border-top: none; padding-top: 0; margin-top: 40px; }
.doc h2 .anchor, .doc h3 .anchor { opacity: 0; margin-left: 10px; color: var(--accent); font-family: var(--mono); font-weight: 400; font-size: .75em; }
.doc h2:hover .anchor, .doc h3:hover .anchor { opacity: 1; }
.doc .lead { color: var(--muted); font-size: 17px; line-height: 1.65; margin-bottom: 10px; max-width: 760px; }
.doc .meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin: 0 0 8px; display: flex; gap: 18px; flex-wrap: wrap; }
.doc .meta b { color: var(--text-dim); font-weight: 500; }
.doc pre.code { margin: 18px 0; font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; tab-size: 2; }
.doc .code .n { color: #9fd6ff; }
.doc .code .t { color: #9be09b; }
.method { display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 2px 7px; letter-spacing: .04em; vertical-align: middle; margin-right: 6px; }
.method.get { background: #dcefe5; color: #1e7a52; }
.method.post { background: var(--accent-soft); color: var(--accent-dim); }
.method.ws { background: #e3e7f5; color: #3b4a9c; }
.method.rpc { background: #ece7dd; color: #6b5a3c; }
.method.sol { background: #e9e3f2; color: #5b3f8f; }
.doc table.compact td, .doc table.compact th { padding: 8px 12px; font-size: 12.5px; vertical-align: top; }
.doc table td code, .doc table th code { white-space: nowrap; }
.doc table td.wrap code { white-space: normal; word-break: break-all; }
.doc .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
.doc .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 22px 0; }
.doc .card { border: 1px solid var(--border); background: var(--bg); padding: 18px 20px; }
.doc .card h4 { font-size: 15px; margin-bottom: 8px; font-weight: 600; letter-spacing: -0.005em; }
.doc .card p { font-size: 13.5px; line-height: 1.6; }
.doc .card .mono { font-size: 11.5px; color: var(--muted); display: block; margin-top: 8px; word-break: break-all; }
.doc .addr { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.doc dl { margin: 14px 0; border-top: 1px solid var(--border); }
.doc dl > div { display: grid; grid-template-columns: 260px 1fr; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.doc dt { font-family: var(--mono); font-size: 12.5px; color: var(--text); word-break: break-word; }
.doc dd { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
.doc dd code { white-space: nowrap; }
.doc .callout.warn { border-left-color: var(--danger); }
.doc .callout h5 { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; color: var(--accent); font-weight: 500; }
.doc .callout.warn h5 { color: var(--danger); }
.doc .diagram { font-size: 12px; line-height: 1.55; }
.doc .toc-inline { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.doc .toc-inline a { font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--border); padding: 5px 10px; color: var(--text-dim); }
.doc .toc-inline a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 940px) {
  .side-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .sidenav { position: static; max-height: none; display: none; }
  .sidenav.open { display: block; }
  .sn-toggle { display: inline-flex; }
  .doc .grid2, .doc .grid3 { grid-template-columns: 1fr; }
  .doc dl > div { grid-template-columns: 1fr; gap: 6px; }
}
