/* Layout: terminal sobre papel quadriculado. Coluna de leitura de ~68ch; diagramas abrem até 1120px. Tema único escuro, como o logo. */
:root {
  color-scheme: dark;
  --bg: #0d1113;
  --bg-2: #11171a;
  --panel: #141b1f;
  --panel-2: #192227;
  --line: #243130;
  --grid: rgba(114, 227, 166, 0.05);
  --fg: #e3eae6;
  --muted: #8d9c96;
  --dim: #5c6a65;
  --mint: #72e3a6;
  --mint-soft: rgba(114, 227, 166, 0.14);
  --amber: #f2b04f;
  --amber-soft: rgba(242, 176, 79, 0.14);
  --rose: #ef857f;
  --rose-soft: rgba(239, 133, 127, 0.14);
  --sky: #7fc6ea;
  --sky-soft: rgba(127, 198, 234, 0.14);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --read: 68ch;
  --wide: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  padding-inline: 20px;
  padding-block: 0 96px;
}
a { color: var(--mint); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wide); margin-inline: auto; }
.read { max-width: var(--read); }

/* ---------- nav ---------- */
nav.toc {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  margin-inline: -20px;
  padding: 10px 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
nav.toc .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; align-items: center; }
nav.toc .brand { font-family: var(--mono); font-weight: 700; margin-right: 10px; white-space: nowrap; color: var(--fg); text-decoration: none; }
nav.toc .brand b { color: var(--mint); font-weight: 700; }
nav.toc a.chip {
  font-family: var(--mono); font-size: 12.5px; white-space: nowrap;
  color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent;
}
nav.toc a.chip:hover { color: var(--fg); border-color: var(--line); }

/* ---------- hero ---------- */
header.hero { padding-block: 56px 28px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
h1 {
  font-family: var(--mono); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.05; margin: 14px 0 18px; text-wrap: balance;
}
h1 .cursor { display: inline-block; width: 0.55em; height: 0.9em; background: var(--mint); vertical-align: -0.08em; margin-left: 0.1em; animation: blink 1.1s steps(1) infinite; box-shadow: 0 0 18px var(--mint); }
@keyframes blink { 50% { opacity: 0; } }
.lede { color: var(--muted); font-size: 1.12rem; max-width: 56ch; margin: 0; }
.logo { width: 100%; max-width: 100%; border-radius: 14px; border: 1px solid var(--line); display: block; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 40px; }
.stat { background: var(--bg-2); padding: 18px 18px 16px; }
.stat .n { font-family: var(--mono); font-size: 1.75rem; font-weight: 700; color: var(--mint); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .n small { font-size: 0.55em; color: var(--muted); font-weight: 500; margin-left: 3px; }
.stat .l { color: var(--muted); font-size: 0.86rem; margin-top: 6px; line-height: 1.4; }
.src { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-top: 10px; }

/* ---------- sections ---------- */
section { padding-block: 72px 8px; scroll-margin-top: 56px; }
.sec-head { display: flex; gap: 16px; align-items: baseline; margin-bottom: 10px; }
.sec-num { font-family: var(--mono); color: var(--amber); font-size: 0.95rem; }
h2 { font-family: var(--mono); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h3 { font-family: var(--mono); font-size: 1.05rem; margin: 34px 0 8px; color: var(--fg); }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
code, kbd { font-family: var(--mono); font-size: 0.88em; }
:not(pre) > code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; color: var(--mint); }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; padding: 0 6px; border-radius: 5px; background: var(--panel); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 22px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.panel h4 { margin: 0 0 10px; font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.scroll { overflow-x: auto; }

pre {
  margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--fg);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto;
}
pre .k { color: var(--sky); }
pre .s { color: var(--amber); }
pre .c { color: var(--dim); font-style: italic; }
pre .f { color: var(--mint); }
pre .hl { background: var(--mint-soft); display: inline-block; width: 100%; border-radius: 3px; }
.file { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 6px; }

/* ---------- layers ---------- */
.layers { display: grid; gap: 8px; margin-top: 24px; }
.layer { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; gap: 18px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.layer .name { font-family: var(--mono); font-weight: 700; font-size: 0.95rem; }
.layer .what { color: var(--muted); font-size: 0.93rem; min-width: 0; }
.layer .tag { font-family: var(--mono); font-size: 11.5px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tag.you { background: var(--mint-soft); color: var(--mint); }
.tag.lib { background: var(--sky-soft); color: var(--sky); }
.tag.go { background: var(--amber-soft); color: var(--amber); }
.tag.os { background: var(--rose-soft); color: var(--rose); }

/* ---------- stepper ---------- */
.stage { margin-top: 26px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stage .scroll svg { display: block; width: 100%; min-width: 760px; height: auto; }
.stage-ui { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 18px 20px; border-top: 1px solid var(--line); background: var(--panel); align-items: start; }
.step-meta { font-family: var(--mono); font-size: 12px; color: var(--amber); letter-spacing: 0.06em; text-transform: uppercase; }
.step-title { font-family: var(--mono); font-weight: 700; font-size: 1.12rem; margin: 4px 0 6px; }
.step-body { color: var(--muted); margin: 0 0 10px; max-width: 70ch; }
.step-code { font-family: var(--mono); font-size: 12.5px; color: var(--mint); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
button {
  font-family: var(--mono); font-size: 13px; color: var(--fg); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer;
}
button:hover { border-color: var(--mint); color: var(--mint); }
button.primary { background: var(--mint); color: #08110c; border-color: var(--mint); font-weight: 700; }
button.primary:hover { color: #08110c; filter: brightness(1.08); }
.dots { display: flex; gap: 5px; margin-top: 12px; flex-wrap: wrap; }
.dots button { width: 22px; height: 6px; padding: 0; border-radius: 3px; background: var(--line); border: 0; }
.dots button.on { background: var(--mint); }
.dots button.done { background: var(--mint-d, #2f6e52); }

svg text { font-family: var(--mono); }
.box rect { fill: var(--panel); stroke: var(--line); stroke-width: 1.2; transition: stroke 0.3s, fill 0.3s; }
.box text.t { fill: var(--fg); font-size: 13px; font-weight: 700; }
.box text.d { fill: var(--muted); font-size: 11px; }
.box.on rect { stroke: var(--mint); fill: #15261f; filter: drop-shadow(0 0 10px rgba(114, 227, 166, 0.35)); }
.box.seen rect { stroke: #2f6e52; }
.col-frame { fill: none; stroke: var(--line); stroke-dasharray: 4 5; }
.col-title { fill: var(--amber); font-size: 12px; letter-spacing: 0.06em; }
.wire { stroke: var(--dim); stroke-width: 2; stroke-dasharray: 6 6; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.kern-band { fill: rgba(239, 133, 127, 0.05); }
.kern-label { fill: var(--rose); font-size: 10.5px; letter-spacing: 0.08em; }
.ghost rect { fill: transparent; stroke: var(--dim); stroke-dasharray: 3 4; }
.ghost text { fill: var(--dim); font-size: 11px; }
#pkt rect { fill: var(--amber); }
#pkt text { fill: #1a1206; font-size: 11.5px; font-weight: 700; }
#pkt { filter: drop-shadow(0 0 10px rgba(242, 176, 79, 0.6)); }

/* ---------- handshake ---------- */
.ladder line.life { stroke: var(--line); stroke-width: 2; }
.ladder .arrow { stroke-width: 1.6; fill: none; }
.ladder .a-tcp { stroke: var(--rose); }
.ladder .a-http { stroke: var(--sky); }
.ladder .a-ws { stroke: var(--mint); }
.ladder text.lbl { font-size: 12px; fill: var(--fg); }
.ladder text.sub { font-size: 10.5px; fill: var(--muted); }
.ladder text.who { font-size: 13px; font-weight: 700; fill: var(--fg); }
.ladder text.grp { font-size: 10.5px; letter-spacing: 0.1em; }
.ladder circle.run { r: 4; }

.calc { display: grid; gap: 8px; margin-top: 12px; }
.calc label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
input[type="text"] {
  width: 100%; font-family: var(--mono); font-size: 14px; color: var(--fg); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
}
input[type="text"]:focus { border-color: var(--mint); outline: none; }
.out { font-family: var(--mono); font-size: 13.5px; color: var(--mint); background: var(--bg-2); border: 1px dashed var(--line); border-radius: 8px; padding: 9px 12px; overflow-wrap: anywhere; }
.flow-arrow { font-family: var(--mono); color: var(--dim); font-size: 12px; padding-left: 4px; }

/* ---------- flags ---------- */
.pipeline { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; margin-top: 22px; }
.pipeline .panel { padding: 14px 16px; }
.pipeline .arrow { align-self: center; font-family: var(--mono); color: var(--amber); font-size: 1.3rem; }
.pipeline pre { font-size: 12.5px; }

/* ---------- frame builder ---------- */
.fb-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: var(--panel-2); }
.seg button[aria-pressed="true"] { background: var(--mint); color: #08110c; font-weight: 700; }
.bytes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.byte { font-family: var(--mono); font-size: 14px; width: 44px; text-align: center; padding: 8px 0 6px; border-radius: 6px; border: 1px solid; font-variant-numeric: tabular-nums; }
.byte small { display: block; font-size: 9.5px; opacity: 0.75; margin-top: 2px; }
.b-hdr { color: var(--amber); border-color: rgba(242,176,79,.45); background: var(--amber-soft); }
.b-len { color: var(--sky); border-color: rgba(127,198,234,.45); background: var(--sky-soft); }
.b-mask { color: var(--rose); border-color: rgba(239,133,127,.45); background: var(--rose-soft); }
.b-pay { color: var(--mint); border-color: rgba(114,227,166,.4); background: var(--mint-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: currentColor; }
.legend .l1 { color: var(--amber); } .legend .l2 { color: var(--sky); } .legend .l3 { color: var(--rose); } .legend .l4 { color: var(--mint); }
.bits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.bitrow { display: flex; gap: 3px; margin: 8px 0 6px; }
.bit { font-family: var(--mono); font-size: 13px; width: 26px; text-align: center; padding: 4px 0; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line); }
.bit.on1 { color: var(--amber); border-color: rgba(242,176,79,.5); }
.bitcap { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.note { font-size: 13.5px; color: var(--muted); margin-top: 14px; }

/* ---------- memory ---------- */
.mem { font-family: var(--mono); font-size: 13px; display: grid; gap: 12px; }
.mapbox { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg-2); }
.mapbox .cap { color: var(--muted); font-size: 11.5px; margin-bottom: 8px; }
.entry { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-top: 1px dashed var(--line); }
.entry:first-of-type { border-top: 0; }
.key { color: var(--amber); }
.ptr { color: var(--dim); }
.roombox { border: 1px solid #2f6e52; border-radius: 8px; padding: 10px 12px; background: #13201b; min-width: 0; }
.roombox .rt { color: var(--mint); font-weight: 700; margin-bottom: 6px; }
.field { color: var(--muted); }
.field b { color: var(--fg); font-weight: 500; }
.member { display: flex; gap: 8px; flex-wrap: wrap; margin-left: 14px; }
.member span:first-child { color: var(--sky); }

.lanes { display: grid; gap: 8px; }
.lane { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.lane .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(114,227,166,.6); animation: pulse 2s infinite; justify-self: center; }
.lane .pulse.amber { background: var(--amber); box-shadow: 0 0 0 0 rgba(242,176,79,.6); animation-name: pulseA; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(114,227,166,0); } 100% { box-shadow: 0 0 0 0 rgba(114,227,166,0); } }
@keyframes pulseA { 70% { box-shadow: 0 0 0 9px rgba(242,176,79,0); } 100% { box-shadow: 0 0 0 0 rgba(242,176,79,0); } }
.lane .ln { font-family: var(--mono); font-size: 13.5px; min-width: 0; }
.lane .ln small { display: block; color: var(--muted); font-size: 12px; }
.lane .st { font-family: var(--mono); font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }

.fdlist { font-family: var(--mono); font-size: 13px; }
.fdlist div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.fdlist div:last-child { border-bottom: 0; }
.fdlist .fd { color: var(--amber); text-align: right; }
.fdlist em { color: var(--muted); font-style: normal; }

/* ---------- race ---------- */
.race { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.tl { display: grid; gap: 6px; font-family: var(--mono); font-size: 12.8px; }
.tl div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 7px 10px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--line); }
.tl .who { color: var(--muted); }
.tl .bad { border-color: rgba(239,133,127,.5); background: var(--rose-soft); }
.tl .good { border-color: rgba(114,227,166,.4); background: var(--mint-soft); }
.tl .wait { color: var(--dim); }
.verdict { font-family: var(--mono); font-size: 12.5px; margin-top: 10px; }
.verdict.bad { color: var(--rose); } .verdict.good { color: var(--mint); }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11.5px; }
.chart .axis { stroke: var(--line); }
.chart .gridl { stroke: var(--line); stroke-dasharray: 2 4; }
.chart .val { fill: var(--fg); font-size: 12px; font-weight: 500; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
td.num { font-family: var(--mono); text-align: right; }
th.num { text-align: right; }

/* ---------- roadmap ---------- */
.limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.limit { border-left: 3px solid var(--rose); background: var(--panel); border-radius: 0 10px 10px 0; padding: 14px 16px; min-width: 0; }
.limit b { font-family: var(--mono); display: block; margin-bottom: 4px; }
.limit p { color: var(--muted); font-size: 0.93rem; margin: 0; }
ol.road { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; counter-reset: r; }
ol.road li { counter-increment: r; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
ol.road li::before { content: counter(r, decimal-leading-zero); font-family: var(--mono); color: var(--amber); font-weight: 700; font-size: 1.1rem; }
ol.road b { font-family: var(--mono); }
ol.road p { color: var(--muted); margin: 4px 0 0; font-size: 0.94rem; }
footer { margin-top: 80px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--dim); font-family: var(--mono); font-size: 12px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero-grid, .split, .race, .bits { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limits { grid-template-columns: minmax(0, 1fr); }
  .pipeline { grid-template-columns: minmax(0, 1fr); }
  .pipeline .arrow { transform: rotate(90deg); justify-self: center; }
  .layer { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .layer .tag { justify-self: start; }
  .stage-ui { grid-template-columns: minmax(0, 1fr); }
  .controls { justify-content: flex-start; }
  .fb-controls { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
/* ---------- tela do cliente ---------- */
pre { tab-size: 4; }
pre.screen { line-height: 1.25; color: var(--mint); width: max-content; max-width: 100%; }

/* ---------- botões de link ---------- */
a.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); text-decoration: none; white-space: nowrap;
}
a.btn:hover { border-color: var(--mint); }
a.btn.primary { background: var(--mint); border-color: var(--mint); color: #0b1310; }
a.btn.primary:hover { filter: brightness(1.08); }
nav.toc a.btn { margin-left: auto; padding: 5px 14px; font-size: 13px; }
nav.toc a.btn + a.btn { margin-left: 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 26px; }
.cmd { font-family: var(--mono); font-size: 13.5px; color: var(--muted); }
.cmd b { color: var(--mint); font-weight: 500; }
.tag-soon { font-family: var(--mono); font-size: 11px; color: var(--amber); background: var(--amber-soft); padding: 1px 8px; border-radius: 999px; margin-left: 8px; vertical-align: 2px; font-weight: 500; }

/* ---------- site: princípios e destaques ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.card b { font-family: var(--mono); display: block; margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
ul.feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
ul.feats li { padding-left: 22px; position: relative; }
ul.feats li::before { content: "›"; position: absolute; left: 4px; color: var(--mint); font-family: var(--mono); font-weight: 700; }
ul.feats b { font-family: var(--mono); font-size: 0.95em; }
pre.screen.big { font-size: 14px; }

/* ---------- docs: layout com barra lateral ---------- */
.docs-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; max-width: 1280px; margin-inline: auto; }
.docs-grid main section:first-child { padding-top: 40px; }
aside.side { position: sticky; top: 52px; align-self: start; max-height: calc(100vh - 60px); overflow-y: auto; padding: 36px 0 24px; font-family: var(--mono); font-size: 12.8px; scrollbar-width: thin; }
aside.side .grp { color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; margin: 18px 0 6px 12px; }
aside.side .grp:first-child { margin-top: 0; }
aside.side a { display: block; color: var(--muted); text-decoration: none; padding: 3px 12px; border-left: 2px solid var(--line); }
aside.side a:hover { color: var(--fg); border-left-color: var(--mint); }
dl.ref { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; margin: 18px 0 0; max-width: 92ch; }
dl.ref dt { font-family: var(--mono); font-size: 0.92em; color: var(--mint); }
dl.ref dd { margin: 0; color: var(--muted); }
.callout { border-left: 3px solid var(--amber); background: var(--amber-soft); border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 18px 0; max-width: var(--read); }
.callout p { margin: 0; }

@media (max-width: 960px) {
  .docs-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  aside.side { position: static; max-height: none; padding: 24px 0 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
  aside.side .grp { width: 100%; margin: 10px 0 2px; }
  aside.side a { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
}
@media (max-width: 860px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  dl.ref { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  dl.ref dd { margin-bottom: 10px; }
  nav.toc a.chip { display: none; }
}


/* ---------- site: install and join cards ---------- */
.card pre { margin-top: 12px; font-size: 12.5px; }
.card b + pre { margin-top: 4px; }

/* ---------- site: install, client and server download groups ---------- */
.dl-group { margin-top: 28px; padding: 22px 22px 6px; border: 1px solid var(--line); border-left: 3px solid var(--mint); border-radius: 14px; background: var(--bg-2); }
.dl-group.server { border-left-color: var(--amber); }
.dl-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dl-head h3 { margin: 0; font-size: clamp(1.1rem, 2.4vw, 1.35rem); }
.dl-head h3 code { color: var(--mint); background: none; padding: 0; font-size: 0.85em; }
.dl-group.server .dl-head h3 code { color: var(--amber); }
.dl-head .step { font-family: var(--mono); font-weight: 700; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--mint); color: #0b1310; flex: none; }
.dl-group.server .dl-head .step { background: var(--amber); }
.dl-head .who { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.cards.three { grid-template-columns: minmax(0, 1fr); gap: 10px; }
/* one row per OS: name and download buttons on the left, the whole command on the right */
.dl-group .card { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: "name cmd" "dl cmd"; column-gap: 20px; align-items: center; padding: 14px 18px; }
.dl-group .card b { grid-area: name; align-self: end; }
.dl-group .card .dl { grid-area: dl; align-self: start; }
.dl-group .card pre { grid-area: cmd; margin: 0; }
.card .dl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; min-height: 32px; }
a.btn.small { padding: 6px 12px; font-size: 12.5px; }
a.btn.primary.amber { background: var(--amber); border-color: var(--amber); }
.callout.ok { border-left-color: var(--mint); background: var(--mint-soft); max-width: none; }
.callout.ok.amber { border-left-color: var(--amber); background: var(--amber-soft); }
.callout pre { margin-top: 10px; font-size: 14px; }
@media (max-width: 860px) {
  .dl-group .card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "dl" "cmd"; row-gap: 8px; }
  .dl-group { padding: 16px 14px 4px; }
}
