/* docs — a reference, so it reads like one: a fixed contents rail, a narrow
 * measure, and the serif doing the explaining while the mono does the naming. */

.docWrap {
  display: grid; grid-template-columns: 14rem minmax(0, 1fr);
  gap: 3.5rem; align-items: start;
  width: min(100% - 2.5rem, 66rem); margin: 0 auto; padding: 3rem 0 5rem;
}
@media (max-width: 900px) {
  .docWrap { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2rem; }
}

.toc { position: sticky; top: 4.5rem; }
@media (max-width: 900px) {
  .toc { position: static; border: 1px solid var(--rule); background: var(--ink-2); padding: .9rem 1rem; }
}
.toc nav { display: flex; flex-direction: column; gap: .1rem; }
@media (max-width: 900px) { .toc nav { flex-flow: row wrap; gap: .35rem .9rem; } }
.toc a {
  border: 0; font-size: .8125rem; color: var(--paper-2); padding: .22rem 0 .22rem .75rem;
  border-left: 2px solid transparent; line-height: 1.35;
}
.toc a:hover { color: var(--paper); border-left-color: var(--rule-2); }
.toc a.on { color: var(--green); border-left-color: var(--green); background: rgba(207,246,5,.07); }
@media (max-width: 900px) { .toc a, .toc a.on { border-left: 0; padding-left: 0; background: none; } }

.docBody { min-width: 0; }
.docBody h1 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); margin-bottom: 1rem; }
.docBody h2 {
  font-size: 1.25rem; margin: 3rem 0 .9rem; padding-top: 1.5rem;
  border-top: 1px dashed var(--rule); scroll-margin-top: 4.5rem;
}
.docBody > h2:first-of-type { border-top: 0; }
.docBody p { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.62;
             max-width: 62ch; color: #dfe3dc; }
.docBody p.lede, .docBody p.tiny { font-family: var(--mono); }
.docBody p.lede { color: var(--paper-2); font-size: 1rem; }
.docBody p.big { font-family: var(--mono); font-size: clamp(1.8rem, 6vw, 2.8rem);
                 margin: .5rem 0 1rem; }
.docBody code { font-family: var(--mono); font-size: .9em; background: var(--ink-2);
                padding: .05em .35em; border-radius: 2px; }

pre.code {
  font-family: var(--mono); font-size: .8125rem; line-height: 1.6;
  background: var(--ink-2); border: 1px solid var(--rule); border-left: 3px solid var(--green);
  padding: .95rem 1.1rem; overflow-x: auto; margin: 1.25rem 0; white-space: pre;
}

table.spec { width: 100%; border-collapse: collapse; margin: 1.25rem 0; min-width: 0; }
table.spec tr { border-bottom: 1px solid var(--rule); }
table.spec th {
  text-align: left; vertical-align: top; width: 14rem; font-weight: 500;
  font-family: var(--mono); font-size: .8125rem; letter-spacing: 0; text-transform: none;
  color: var(--paper); background: transparent; padding: .7rem .9rem .7rem 0; position: static;
}
table.spec td {
  text-align: left; vertical-align: top; font-family: var(--serif); font-size: .9375rem;
  line-height: 1.55; color: var(--paper-2); padding: .7rem 0; white-space: normal;
}
table.spec td code { font-size: .85em; }
table.spec.code th { color: var(--green); }
@media (max-width: 620px) {
  table.spec th, table.spec td { display: block; width: auto; padding: .5rem 0 0; }
  table.spec td { padding: .1rem 0 .7rem; }
}

.callout {
  border: 1px solid var(--rule-2); border-left: 4px solid var(--green);
  background: var(--ink-2); padding: 1rem 1.15rem; margin: 1.5rem 0;
  font-family: var(--serif); font-size: .9375rem; line-height: 1.55; color: var(--paper-2);
}
.callout b { color: var(--paper); font-family: var(--mono); font-size: .875rem; }
.callout.warn { border-left-color: var(--warn); }

ol.steps { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.6;
           color: #dfe3dc; max-width: 62ch; padding-left: 1.3rem; }
ol.steps li { margin-bottom: .45rem; }
ol.steps::marker { font-family: var(--mono); }

ul.edges { font-family: var(--serif); font-size: 1rem; line-height: 1.6; color: var(--paper-2);
           max-width: 64ch; padding-left: 1.1rem; }
ul.edges li { margin-bottom: .7rem; }
ul.edges b { color: var(--paper); font-family: var(--mono); font-size: .875rem; }
