/* The docs page: one column of reading text with a small contents list beside it. */
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
.docs-tag { color: var(--muted); background: var(--hover); }
.docs { display: grid; grid-template-columns: 190px minmax(0, 680px); gap: 48px; max-width: 980px; margin: 0 auto; padding: 34px 20px 110px; }
.toc { position: sticky; top: 86px; align-self: start; display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line); }
.toc a { padding: 6px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); font-size: 13.5px; }
.toc a:hover { color: var(--text); border-color: var(--accent); }
.doc { font-size: 15.5px; line-height: 1.65; color: #c9c9d2; }
.doc h1 { font-size: 30px; margin: 0 0 12px; color: var(--text); }
.doc .intro { font-size: 17px; color: var(--text); margin-bottom: 16px; }
.doc section { padding-top: 34px; margin-top: 34px; border-top: 1px solid var(--line); }
.doc h2 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 12px; color: var(--text); }
.doc h3 { font: 500 11.5px var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }
.doc b { color: var(--text); font-weight: 600; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; }
.doc ol { counter-reset: n; list-style: none; padding-left: 0; }
.doc ol li { counter-increment: n; display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.doc ol li::before { content: counter(n); width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; display: grid; place-items: center; background: var(--hover); color: var(--accent); font: 500 12px var(--mono); }
.doc ol li > * { grid-column: 2; }
.doc ul li::marker { color: var(--muted); }
.callout, .aside { font-size: 14px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.callout { color: var(--warn); border-color: rgba(240, 198, 116, 0.28); background: rgba(240, 198, 116, 0.06); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.pair > div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px 6px; }
.pair h3 { margin-top: 14px; }
.pair > div:first-child h3 { color: var(--good); }
@media (max-width: 760px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 22px 16px 80px; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; border: 0; }
  .toc a { margin: 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; }
  .pair { grid-template-columns: 1fr; }
  .doc h1 { font-size: 26px; }
}

/* Small figures. */
.fig { margin: 18px 0 20px; }
.fig figcaption { font: 500 11.5px var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.fig p { font-size: 13.5px; color: var(--muted); margin: 9px 0 0; }
.fig .redact { width: 46px; height: 9px; margin-right: 8px; }
.fig.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel, .mock, .bars { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.panel svg { display: block; width: 100%; height: auto; }
.grid { stroke: rgba(125, 125, 140, 0.16); stroke-width: 1; fill: none; }
.line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.line.bad, .pt.bad { stroke: var(--bad); } .pt.bad { fill: var(--bad); stroke: none; }
.line.good { stroke: var(--good); } .pt.good { fill: var(--good); }
.flow { display: flex; align-items: stretch; gap: 0; }
.node { flex: 1; min-width: 0; display: grid; gap: 2px; align-content: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.node .k { color: var(--text); font-weight: 600; font-size: 14px; }
.node .v { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.node.hot { border-color: rgba(255, 102, 77, 0.5); background: rgba(255, 102, 77, 0.07); }
.node.good { border-color: rgba(127, 224, 168, 0.4); }
.node.burn { border-color: rgba(240, 198, 116, 0.4); }
.arrow { flex: none; width: 84px; display: grid; justify-items: center; align-content: center; gap: 3px; font: 500 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.arrow i { position: relative; width: 62px; height: 1px; background: var(--accent); }
.arrow i::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); transform: rotate(45deg); }
.arrow.both i::before { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; border-bottom: 1px solid var(--accent); border-left: 1px solid var(--accent); transform: rotate(45deg); }
.arrow em { font-style: normal; color: var(--accent); }
.mrow { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 0.8fr; gap: 10px; align-items: center; padding: 8px 0; font-size: 14px; color: var(--text); }
.mrow.head { padding: 0 0 8px; border-bottom: 1px solid var(--line); font: 500 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mrow span { display: flex; align-items: center; white-space: nowrap; }
.tile { width: 26px; height: 26px; margin-right: 9px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 102, 77, 0.12); color: var(--accent); font-size: 12px; }
.chipg { font: 500 12px var(--mono); color: var(--good); background: rgba(127, 224, 168, 0.1); padding: 2px 8px; border-radius: 6px; }
.mock .sol, .steps3 .sol { width: 13px; height: 13px; margin-left: 5px; }
.watcher { max-width: 340px; display: grid; gap: 7px; font-size: 14px; }
.watcher div { display: flex; justify-content: space-between; align-items: center; }
.watcher div span:first-child { color: var(--muted); }
.watcher .redact { width: 74px; margin: 0; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps3 > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.steps3 .n { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 7px; background: var(--hover); color: var(--accent); font: 500 12px var(--mono); }
.steps3 p { margin: 6px 0 0; font-size: 13px; }
.clock { height: 4px; margin-top: 10px; border-radius: 2px; background: var(--hover); overflow: hidden; }
.clock i { display: block; width: 72%; height: 100%; background: var(--accent); }
.tree { display: grid; justify-items: center; }
.tree > .node { width: min(100%, 300px); text-align: center; }
.down { width: 1px; height: 16px; background: var(--accent); margin: 0 auto; }
.split { width: 50%; height: 14px; border: 1px solid var(--accent); border-bottom: 0; border-radius: 8px 8px 0 0; margin-top: 0; }
.tree .node.hot + .split { margin-top: 14px; position: relative; }
.tree .node.hot + .split::before { content: ""; position: absolute; left: 50%; top: -15px; width: 1px; height: 14px; background: var(--accent); }
.branches { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; }
.branches > div { display: grid; text-align: center; }
.branches .tag { justify-self: center; margin: 6px 0 8px; font-size: 11.5px; color: var(--muted); background: var(--hover); padding: 2px 10px; border-radius: 999px; }
.bars { display: grid; gap: 10px; }
.bars div { display: grid; grid-template-columns: 82px 1fr; column-gap: 12px; row-gap: 3px; align-items: center; font-size: 13.5px; }
.bars span { color: var(--muted); }
.bars i { height: 8px; border-radius: 4px; background: var(--accent); }
.bars b { grid-column: 2; font-weight: 500; font-size: 12.5px; }
.bars .off i { background: #3a3a44; }
.bars .off b { color: var(--muted); }
@media (max-width: 760px) {
  .fig.two, .steps3, .branches { grid-template-columns: 1fr; }
  .flow { flex-direction: column; }
  .arrow { width: auto; grid-auto-flow: column; justify-content: center; gap: 10px; padding: 8px 0; }
  .arrow i { width: 1px; height: 22px; }
  .arrow i::after { right: -3px; top: auto; bottom: 0; transform: rotate(135deg); }
  .arrow.both i::before { left: -3px; top: 0; transform: rotate(135deg); }
  .split { display: none; }
  .mrow { grid-template-columns: 1fr 1fr; }
  .mrow.head { display: none; }
}
/* Numbered steps: the number sits in the margin so the text wraps as one paragraph. */
.doc ol li { display: block; position: relative; padding-left: 38px; }
.doc ol li::before { position: absolute; left: 0; top: 1px; margin: 0; }
