/* Guide layout: a contents column and a readable text column. */
.layout { max-width: 1240px; margin: 0 auto; padding: 32px 20px 72px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
.toc { position: sticky; top: 84px; align-self: start; font-size: .9rem; }
.toc-title { font-weight: 700; margin-bottom: .5em; list-style: none; cursor: default; }
.toc-title::-webkit-details-marker { display: none; }
.toc details { margin: 0; }
.toc ol { list-style: none; padding: 0; margin: 0 0 16px; border-left: 2px solid var(--rule); }
.toc li { margin: 0; }
.toc a:not(.btn) { display: block; padding: 4px 0 4px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--pencil); text-decoration: none; }
.toc a:not(.btn):hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--teal); font-weight: 600; }
.toc-cta { width: 100%; }

.doc { max-width: 820px; min-width: 0; }
.doc h1 { font-size: 2.25rem; margin-bottom: .3em; }
.lede { font-size: 1.15rem; line-height: 1.55; max-width: 66ch; }
.doc > p, .doc section > p { max-width: 72ch; }

/* The flow diagram: the one illustrated element. */
.flow { margin: 0 0 1em; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 16px; overflow-x: auto; }
.flow svg { display: block; width: 100%; min-width: 640px; height: auto; color: var(--ink); }
.flow .lane-labels text { font: 700 14px var(--ui); fill: var(--ink); text-anchor: middle; }
.flow .lanes line { stroke: var(--rule-strong); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; }
.flow .arrows line, .flow .arrows path { stroke: var(--teal); stroke-width: 2; fill: none; color: var(--teal); }
.flow .arrows .dashed { stroke-dasharray: 6 5; }
.flow .steps-text text { font: 13px var(--mono); fill: var(--pencil); text-anchor: middle; }

.steps-list { list-style: none; counter-reset: q; padding: 0; margin: 0; }
.steps-list > li { counter-increment: q; position: relative; padding-left: 44px; margin: 0 0 8px; }
.steps-list > li::before { content: counter(q); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--panel); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.steps-list > li h3 { margin-top: 2px; }

.endpoints { display: grid; gap: 10px; }
.ep { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 14px 16px; }
.ep h3 { margin: 0 0 6px; font-size: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ep h3 code { background: none; border: 0; padding: 0; font-size: .95rem; }
.ep p { margin: 0; font-size: .95rem; }
.codes { display: flex; flex-wrap: wrap; gap: 6px; }
.checklist { padding-left: 1.2em; }
.checklist li::marker { content: "✓  "; color: var(--ok); font-weight: 700; }
.doc-foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--rule); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .toc { position: static; margin-bottom: 24px; }
  .toc-title { cursor: pointer; border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 8px 12px; background: var(--panel); }
  .toc details[open] .toc-title { margin-bottom: 8px; }
  .toc ol { columns: 2; column-gap: 16px; border-left: 0; }
  .toc a:not(.btn) { padding-left: 0; border-left: 0; }
}
@media (max-width: 720px) {
  .layout { padding: 20px 16px 56px; }
  .doc h1 { font-size: 1.75rem; }
  .toc ol { columns: 1; }
}
