/* Shared reference-document layout for wiki pages (tools/wikify.py). */
body.wiki-doc{font-size:16px;line-height:1.7;word-break:keep-all;background:#0f1620;color:#dbe3ee}
body.wiki-doc main{max-width:1180px!important;margin:0 auto!important;padding:28px 32px 64px!important}
.wiki-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:48px;align-items:start}
.wiki-layout.wiki-single{grid-template-columns:minmax(0,1fr)}
.wiki-body{max-width:820px;min-width:0}
.wiki-toc{position:sticky;top:20px;font-size:14px;padding:14px 0 14px 16px;border-left:2px solid #243449}
.wiki-toc p{margin:0 0 8px;color:#8fa1b8;font-size:12px;letter-spacing:.08em;font-weight:700}
.wiki-toc ol{list-style:none;margin:0;padding:0}
.wiki-toc li{margin:0}
.wiki-toc a{display:block;padding:4px 0;color:#b7c3d3;text-decoration:none;line-height:1.45}
.wiki-toc a:hover{color:#74e0c0}

body.wiki-doc h1{max-width:none!important;font-size:32px!important;line-height:1.3!important;margin:8px 0 14px!important;letter-spacing:-.01em;color:#f4f7fb}
body.wiki-doc h2{max-width:none!important;font-size:22px!important;line-height:1.35!important;margin:40px 0 12px!important;padding-top:20px;border-top:1px solid #243449;color:#f0f4f9;scroll-margin-top:16px}
body.wiki-doc h3{font-size:17px!important;margin:24px 0 8px!important;color:#e6ecf4}
body.wiki-doc p,body.wiki-doc li{font-size:16px;line-height:1.72;max-width:none}
body.wiki-doc p{margin:0 0 12px}
body.wiki-doc a{color:#9bc2ff}
body.wiki-doc code{font-size:.88em;background:#18222f;border:1px solid #243449;border-radius:5px;padding:.05em .35em;color:#ffd9a0;overflow-wrap:anywhere}
body.wiki-doc pre{font-size:13.5px;line-height:1.55;padding:14px 16px;border-radius:10px;background:#0b111a;border:1px solid #243449}
body.wiki-doc pre code{background:none;border:0;padding:0;color:#dbe3ee}
body.wiki-doc table{font-size:14.5px;line-height:1.55;width:100%;border-collapse:collapse;margin:8px 0 18px}
body.wiki-doc th,body.wiki-doc td{padding:8px 10px!important;border:0!important;border-bottom:1px solid #243449!important;text-align:left;vertical-align:top}
body.wiki-doc th{background:transparent!important;color:#8fa1b8;font-size:13px;font-weight:700;border-bottom:2px solid #34475f!important}
body.wiki-doc .contract,body.wiki-doc .notice{font-size:15px;padding:12px 16px;border-radius:0 8px 8px 0}

/* Step sequences: a compact numbered stepper instead of large tiles. */
body.wiki-doc ol.sequence{display:block!important;list-style:none;counter-reset:step;margin:10px 0 18px;padding:0}
body.wiki-doc ol.sequence li{counter-increment:step;position:relative;margin:0!important;padding:5px 0 10px 40px!important;background:none!important;border-radius:0!important;font-size:15.5px;line-height:1.55}
body.wiki-doc ol.sequence li::before{content:counter(step);position:absolute;left:0;top:4px;width:24px;height:24px;border-radius:50%;background:#1d4b49;color:#e9fff8;font-size:13px;font-weight:700;display:grid;place-items:center}
body.wiki-doc ol.sequence li:not(:last-child)::after{content:"";position:absolute;left:11px;top:30px;bottom:-2px;width:2px;background:#2d4a52}
body.wiki-doc ol.sequence li::marker{content:none}

/* Inline diagrams inside wiki pages stay figure-sized, not slide-sized. */
body.wiki-doc figure{margin:14px 0 20px}
body.wiki-doc figure svg,body.wiki-doc .diagram svg{max-width:640px;width:100%;height:auto;display:block}
body.wiki-doc figure img{max-width:560px;width:100%;height:auto;border-radius:10px}
body.wiki-doc figcaption{font-size:13.5px;color:#8fa1b8;margin-top:6px}

@media (max-width:900px){
  .wiki-layout{grid-template-columns:1fr;gap:12px}
  .wiki-toc{position:static;border-left:0;border-bottom:1px solid #243449;padding:0 0 10px}
  .wiki-toc ol{display:flex;flex-wrap:wrap;gap:4px 14px}
  body.wiki-doc main{padding:18px 16px 48px!important}
  body.wiki-doc h1{font-size:26px!important}
  body.wiki-doc h2{font-size:20px!important}
  body.wiki-doc table{display:block;overflow-x:auto}
}
/* Markdown-rendered wiki pages: drop the slide-like hero/chapter frame. */
.wiki-body .hero{padding:0!important;margin:0 0 6px!important;background:none!important;border:0!important;min-height:0!important;text-align:left!important}
.wiki-body .hero .lead{font-size:16px!important;color:#b7c3d3;max-width:none}
.wiki-body .hero .eyebrow{font-size:13px;color:#74e0c0;margin:0 0 4px}
.wiki-body .chapter,.wiki-body .rendered-doc{max-width:none!important;width:auto!important;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
.wiki-body .hero~.rendered-doc>h1:first-child{display:none}
.wiki-body .rendered-doc>h2:first-of-type{margin-top:22px!important}
/* Small flow figures keep their natural 1:1 size so labels stay body-sized. */
body.wiki-doc svg.flow-svg{width:260px!important;max-width:100%;height:auto;margin:6px 0 10px}

/* identifiers in table cells stay whole (no mid-word wrap) */
.wiki-body td:first-child code,.wiki-body td code:only-child{white-space:nowrap}
.wiki-body td{overflow-wrap:normal;word-break:keep-all}
