/*
 * css/pages/learn.css: the learn group (SPEC 5.2): /docs, /docs/api, /how-it-works, /about. Tokens and every shared
 * component come from css/site.css; this sheet lays out the group's own parts and never sets a colour of its own.
 * Order: shared, docs frame, docs article, reference (the generated contract sections), quickstart parts,
 * how it works, about, touch sizes. Designed at 360px first.
 */

/* ------------------------------------------------------------------------------------------------ shared */
.learn-head { padding-block: calc(var(--section) * .7) calc(var(--section) * .4); }
.learn-head .kicker { margin-bottom: 14px; }
.learn-head .lede { margin-top: var(--s5); }
.learn-sec__head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.learn-sec__head .lede { max-width: 60ch; }
[data-fact-if][hidden], [data-fact-else][hidden], [data-when][hidden] { display: none !important; }

.bandstate { display: inline-flex; align-items: baseline; gap: 9px; font: 600 15px/1.3 var(--font-mono); color: var(--text); }
.bandstate .live-dot { flex: none; transform: translateY(-2px); }
.bandstate--idle { color: var(--muted); font-weight: 500; }
.bandstate--warn { color: var(--warn); }
.bandstate--warn .live-dot { background: var(--warn); }

/* a code block with the one sentence that says what it is for */
.snip { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.snip__cap { font-size: 14px; line-height: 1.5; color: var(--muted); }
[data-snip] { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
[data-snip]:empty { display: none; }
.codeblock pre { white-space: pre; }

/* ------------------------------------------------------------------------------------------------ docs frame */
.docs { display: grid; grid-template-columns: minmax(0, 1fr); padding-bottom: var(--section); }
.docs__rail { display: contents; }
.docs__article { min-width: 0; }
.docs-nav__panel { display: flex; flex-direction: column; gap: 22px; }
.docs-nav__group { display: flex; flex-direction: column; gap: 2px; }
.docs-nav__label { padding: 0 12px 6px; }
.docs-nav__group a, .docs-toc a {
  position: relative; display: flex; align-items: center; min-height: 32px; padding: 5px 12px; border-radius: var(--r2);
  font: 400 14px/1.35 var(--font-body); color: var(--body); transition: color var(--t1), background-color var(--t1);
}
.docs-nav__group a:hover, .docs-toc a:hover { color: var(--text); background: var(--panel-2); }
.docs-nav__group a.is-page { font-weight: 600; color: var(--text); }
.docs-nav__group a[aria-current="page"] { color: var(--accent); }
.docs-nav__group a.is-current, .docs-toc a.is-current { color: var(--accent); background: var(--accent-tint); }
.docs-nav__group a.is-current::before, .docs-toc a.is-current::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--accent);
}
.docs-nav__sub { display: flex; flex-direction: column; gap: 2px; }
.docs-nav__sub a { padding-left: 24px; font-size: 13.5px; }

.docs-toc { display: none; }
.docs-toc__title { display: flex; align-items: center; gap: 8px; padding: 0 12px 10px; }
.docs-toc__title .icon { width: 14px; height: 14px; color: var(--muted); }
.docs-toc ol { list-style: none; display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line); }
.docs-toc a { font-size: 13.5px; min-height: 30px; border-radius: 0 var(--r2) var(--r2) 0; }
.docs-toc a.is-current::before { left: -1px; top: 4px; bottom: 4px; }

/* phones and tablets: a sticky Contents bar under the header that opens the whole map */
.docs-bar {
  position: sticky; top: var(--header-h); z-index: 30;
  margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
  background: var(--header-glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.docs-bar__btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; text-align: left;
  font: 600 14px/1.3 var(--font-body); color: var(--text);
}
.docs-bar__btn .label { flex: none; color: var(--accent); }
.docs-bar__now { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-weight: 500; }
.docs-bar__btn .icon { color: var(--muted); transition: transform var(--t2) var(--ease-out); }
.docs-bar__btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.docs-bar__panel { display: none; max-height: calc(100dvh - var(--header-h) - 48px); overflow-y: auto; overscroll-behavior: contain; padding: 8px 0 20px; border-top: 1px solid var(--line); }
.docs-bar__panel.is-open { display: flex; }
.docs-bar .docs-nav__group a { min-height: 44px; }

@media (min-width: 1024px) {
  .docs { grid-template-columns: 232px minmax(0, 1fr); gap: 0 48px; align-items: start; }
  .docs__rail {
    display: block; grid-column: 1; grid-row: 1; position: sticky; top: var(--header-h);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-block: 36px 24px;
  }
  .docs__article { grid-column: 2; grid-row: 1; max-width: 76ch; }
  .docs-bar { position: static; margin: 0; padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; }
  .docs-bar__btn { display: none; }
  .docs-bar__panel { display: flex; max-height: none; overflow: visible; padding: 0; border: 0; }
  .docs-bar .docs-nav__group a { min-height: 32px; }
}
@media (min-width: 1280px) {
  .docs { grid-template-columns: 232px minmax(0, 76ch) 208px; gap: 0 48px; justify-content: space-between; }
  .docs__rail { display: contents; }
  .docs-nav {
    grid-column: 1; grid-row: 1; position: sticky; top: var(--header-h); max-height: calc(100vh - var(--header-h));
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-block: 36px 24px;
  }
  .docs-toc {
    display: block; grid-column: 3; grid-row: 1; position: sticky; top: var(--header-h); padding-block: 36px 24px;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; scrollbar-width: thin;
  }
  .docs__article { max-width: none; }
  .docs-nav__sub--here { display: none; }
}

/* ------------------------------------------------------------------------------------------------ docs article */
.doc-head { padding-block: 40px 8px; }
.doc-head .kicker { margin-bottom: 14px; }
.doc-head .kicker a:hover { text-decoration: underline; text-underline-offset: 3px; }
.doc-title { font: 400 clamp(36px, 4.2vw, 56px)/1.05 var(--font-display); letter-spacing: 0; color: var(--text); }
.doc-head .lede { margin-top: 18px; font-size: 18px; max-width: 64ch; }
@media (max-width: 639px) { .doc-head .lede { font-size: 16px; } }
.doc-checked { margin-top: 16px; max-width: 72ch; }
.doc-checked a { color: var(--dim); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

.doc-sec { padding-top: 48px; margin-top: 48px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 56px); }
.doc-sec:first-of-type { margin-top: 28px; }
@media (min-width: 1024px) { .doc-sec { scroll-margin-top: calc(var(--header-h) + 24px); } }
.doc-h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font: 750 28px/1.2 var(--font-body); letter-spacing: -0.02em; color: var(--text); }
@media (max-width: 639px) { .doc-h2 { font-size: 24px; } }
.doc-step { font: 600 13px/1 var(--font-mono); letter-spacing: .08em; color: var(--accent); }
.doc-h2 .anchor, .doc-h3 .anchor {
  display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; border-radius: var(--r1);
  font: 500 16px/1 var(--font-mono); color: var(--muted); opacity: 0; transition: opacity var(--t1), color var(--t1);
}
.doc-h2:hover .anchor, .doc-h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
.anchor:hover { color: var(--accent); }
.doc-h3 { display: flex; align-items: baseline; gap: 8px; margin-top: 36px; font: 700 19px/1.3 var(--font-body); letter-spacing: -0.01em; color: var(--text); scroll-margin-top: calc(var(--header-h) + 56px); }
.doc-sec > * + * { margin-top: 18px; }
.doc-sec > .doc-h3 { margin-top: 36px; }
.doc-sec > .spec-source { margin-top: 10px; }
:where(.doc) p:not([class]) { font-size: 16px; line-height: 1.72; color: var(--body); max-width: 72ch; }
.doc p strong, .doc li strong { color: var(--text); font-weight: 600; }
.doc :is(p, li, dd, span) a:not([class]) { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: color var(--t1), text-decoration-color var(--t1); }
.doc :is(p, li, dd, span) a:not([class]):hover { color: var(--accent); text-decoration-color: currentColor; }
.doc ul:not([class]), .doc ol:not([class]) { list-style: none; display: flex; flex-direction: column; gap: 10px; max-width: 72ch; }
.doc ul:not([class]) li, .doc ol:not([class]) li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.65; color: var(--body); }
.doc ul:not([class]) li::before { content: "/"; position: absolute; left: 0; top: 0; color: var(--accent); font-family: var(--font-mono); }
.doc ol:not([class]) { counter-reset: li; }
.doc ol:not([class]) li { padding-left: 34px; counter-increment: li; }
.doc ol:not([class]) li::before { content: counter(li, decimal-leading-zero); position: absolute; left: 0; top: 3px; font: 600 12px/1.6 var(--font-mono); color: var(--accent); letter-spacing: .04em; }
.doc :not(pre) > code { overflow-wrap: anywhere; }
.doc .callout { line-height: 1.6; }
.doc .callout strong { color: var(--text); }
.doc sup { font-size: 11px; line-height: 0; }

/* key and value box */
.kv { border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); overflow: hidden; }
.kv > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 16px; border-top: 1px solid var(--line-row); align-items: baseline; }
.kv > div:first-child { border-top: 0; }
.kv dt { font-size: 14px; color: var(--muted); }
.kv dd { font-size: 15px; line-height: 1.55; color: var(--dim); min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) { .kv > div { grid-template-columns: minmax(120px, 170px) minmax(0, 1fr); gap: 8px 20px; padding: 13px 18px; } }

/* field list: name and type over what it means */
.fields { border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); min-width: 0; }
.fields > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 16px; border-top: 1px solid var(--line-row); min-width: 0; }
.fields > div:first-child { border-top: 0; }
.fields dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.fields dt code { background: none; padding: 0; font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.fields dt .type { font: 400 12px/1.4 var(--font-mono); color: var(--faint); overflow-wrap: anywhere; }
.fields dt .chip { margin-left: auto; }
.fields dd { font-size: 14.5px; line-height: 1.55; color: var(--body); min-width: 0; overflow-wrap: anywhere; }
.fields dd code { overflow-wrap: anywhere; }
@media (min-width: 640px) { .fields > div { grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 6px 20px; padding: 12px 18px; } }
.fields--s > div { padding-block: 10px; }

/* endpoint list: verb, path, what */
.endpoints { list-style: none; border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); }
.endpoints li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 12px 16px; border-top: 1px solid var(--line-row); }
.endpoints li:first-child { border-top: 0; }
.endpoints .verb { font: 600 11.5px/1.4 var(--font-mono); letter-spacing: .06em; color: var(--accent); }
.endpoints a.path, .endpoints .path { font: 500 13.5px/1.45 var(--font-mono); color: var(--text); overflow-wrap: anywhere; text-decoration: none; }
.endpoints a.path:hover { color: var(--accent); }
.endpoints .what { grid-column: 2; font-size: 14.5px; line-height: 1.55; color: var(--body); }
@media (min-width: 768px) {
  .endpoints li { grid-template-columns: 44px minmax(0, 230px) minmax(0, 1fr); gap: 6px 16px; padding: 12px 18px; }
  .endpoints .what { grid-column: 3; }
}

/* live spec table: what, now, rule */
.spec { border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); }
.spec__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 16px; border-top: 1px solid var(--line-row); align-items: baseline; }
.spec__row:first-child { border-top: 0; }
.spec__row--head { display: none; }
.spec__row--head > * { font: 600 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.spec__what { font-size: 14.5px; color: var(--dim); }
.spec__now { font: 500 14px/1.45 var(--font-mono); color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.spec__now .sk { width: 5em; }
.spec__rule { grid-column: 1 / -1; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.spec__rule a { color: var(--dim); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.spec-source { margin-top: 10px; }
@media (min-width: 640px) {
  .spec__row { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, 1.2fr); gap: 4px 20px; padding: 12px 18px; }
  .spec__row--head { display: grid; padding-block: 10px; }
  .spec__now { text-align: left; }
  .spec__rule { grid-column: auto; }
}

/* status and error table */
.ctable { border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); }
.ctable > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line-row); }
.ctable > div:first-child { border-top: 0; }
.ctable__status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.ctable__status b { font: 600 15px/1.3 var(--font-mono); color: var(--text); }
.ctable__status code { font-size: 12.5px; overflow-wrap: anywhere; }
.ctable__what { font-size: 14.5px; line-height: 1.55; color: var(--body); }
.ctable__then { margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
@media (min-width: 640px) {
  .ctable > div { grid-template-columns: 190px minmax(0, 1fr); gap: 6px 20px; padding: 14px 18px; }
  .ctable__status { flex-direction: column; gap: 4px; }
}

/* the contract table: /docs/api only, the one page besides /protocol/agents that shows addresses */
.addr-list { border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); }
.addr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 8px 12px 16px; border-top: 1px solid var(--line-row); }
.addr-row:first-child { border-top: 0; }
.addr-row__name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.addr-row__name span { display: block; font: 400 12px/1.4 var(--font-mono); color: var(--faint); }
.addr-row__addr { grid-column: 1; grid-row: 2; font: 500 12.5px/1.45 var(--font-mono); color: var(--dim); overflow-wrap: anywhere; min-width: 0; background: none; padding: 0; }
.addr-row__act { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: center; gap: 4px; }
.addr-row__act a.icon-btn { color: var(--muted); }
.addr-row__act a.icon-btn:hover { color: var(--text); }
@media (min-width: 768px) {
  .addr-row { grid-template-columns: minmax(0, 190px) minmax(0, 1fr) auto; gap: 6px 16px; padding: 12px 12px 12px 18px; }
  .addr-row__addr { grid-column: 2; grid-row: 1; font-size: 13px; }
  .addr-row__act { grid-column: 3; grid-row: 1; }
}

.doc-state:empty { display: none; }
.doc-live { min-width: 0; }
.doc-live > * + * { margin-top: 12px; }
.doc-check { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); font-size: 14.5px; line-height: 1.55; color: var(--dim); }
.doc-check > span { flex: 1 1 260px; }
.doc-checks dd code { font-size: 12.5px; color: var(--dim); background: none; padding: 0; }

details.doc-more { border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); min-width: 0; }
details.doc-more summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 16px; cursor: pointer; list-style: none; font: 600 14.5px/1.4 var(--font-body); color: var(--text); }
details.doc-more summary::-webkit-details-marker { display: none; }
details.doc-more summary .icon { color: var(--muted); transition: transform var(--t2) var(--ease-out); }
details.doc-more[open] summary .icon { transform: rotate(180deg); }
details.doc-more > pre { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r3) var(--r3); max-height: 460px; overflow: auto; }
details.doc-more .doc-more__body { padding: 0 12px 12px; }
details.doc-more .doc-more__body .codeblock pre { max-height: 520px; overflow: auto; }

.glossary { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
.glossary > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.glossary dt { font: 600 15px/1.5 var(--font-body); color: var(--text); }
.glossary dd { font-size: 15px; line-height: 1.6; color: var(--body); }
@media (min-width: 640px) { .glossary > div { grid-template-columns: 160px minmax(0, 1fr); } }

.pager { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 64px; }
.pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; min-height: 76px; border: 1px solid var(--line); border-radius: var(--r3);
  background: var(--panel); transition: border-color var(--t2), box-shadow var(--t2), transform var(--t2) var(--ease-out);
}
.pager a:hover { border-color: var(--line-strong); box-shadow: var(--ring); transform: translateY(-2px); }
.pager .label { display: flex; align-items: center; gap: 6px; }
.pager .label .icon { width: 14px; height: 14px; color: var(--accent); }
.pager__title { font: 600 16px/1.35 var(--font-body); color: var(--text); }
.pager__next { text-align: right; align-items: flex-end; }
@media (min-width: 480px) { .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pager__next { grid-column: 2; } }

/* the payment flow as a sequence: who, then what */
.seq { list-style: none; counter-reset: seq; border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); }
.seq li { counter-increment: seq; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 16px 12px 48px; border-top: 1px solid var(--line-row); }
.seq li:first-child { border-top: 0; }
.seq li::before { content: counter(seq, decimal-leading-zero); position: absolute; left: 16px; top: 14px; font: 600 12px/1.4 var(--font-mono); color: var(--muted); letter-spacing: .04em; }
.seq__who { font: 600 12px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.seq__arrow { color: var(--faint); font-weight: 500; text-transform: lowercase; letter-spacing: 0; }
.seq__what { font-size: 14.5px; line-height: 1.55; color: var(--body); }
.seq__chain { background: var(--accent-tint); }
.seq li.seq__chain::before { color: var(--accent); }
.seq__chain:last-child { border-radius: 0 0 var(--r3) var(--r3); }
@media (min-width: 768px) { .seq li { grid-template-columns: 180px minmax(0, 1fr); gap: 4px 16px; padding-left: 52px; } }

/* ------------------------------------------------------------------------------------------------ reference */
.ref-lede { font-size: 17px; line-height: 1.6; color: var(--dim); max-width: 64ch; }
.ref-counts a { color: var(--dim); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ref-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.ref-fn { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-block: 22px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 56px); }
@media (min-width: 1024px) { .ref-fn { scroll-margin-top: calc(var(--header-h) + 24px); } }
.ref-fn:target { background: linear-gradient(90deg, var(--accent-tint), transparent 60%); }
/* the name is an inline link in a block heading, so on a phone it is a text link, not a small button */
.ref-fn__name { display: block; font: 600 17px/1.6 var(--font-mono); letter-spacing: -0.01em; color: var(--text); overflow-wrap: anywhere; }
.ref-fn__link { color: inherit; }
.ref-fn__link:hover { color: var(--accent); }
.ref-fn__tags { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 12px; vertical-align: 2px; }
.ref-tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  font: 600 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.ref-tag--owner { color: var(--warn); border-color: var(--line-input); }
.ref-sig {
  margin: 0; padding: 12px 14px; font-size: 13px; line-height: 1.6; color: var(--dim);
  white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible;
}
.ref-sig--wrap { word-break: break-all; }
@media (max-width: 479px) { .ref-sig { font-size: 12px; padding: 10px 12px; } }
.ref-fn__what, .ref-fn__dev { font-size: 15px; line-height: 1.65; color: var(--body); max-width: 72ch; }
.ref-fn__dev { font-size: 14px; color: var(--muted); }
.ref-fn__label { margin-top: 6px; }
.ref-fn .fields dd { font-size: 14px; }
/* a sentence of chips: inline boxes that wrap like words, so each one is a link in running text */
.ref-fn__reverts { font-size: 13px; line-height: 2.3; }
.ref-fn__sel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; font-size: 13px; }
.ref-fn__reverts .label, .ref-fn__sel .label { margin-right: 8px; }
.ref-fn__sel code { font-size: 12px; color: var(--faint); background: none; padding: 0; overflow-wrap: anywhere; }
.ref-err {
  display: inline; padding: 3px 8px; margin-right: 6px; border-radius: var(--r1); background: var(--panel-2);
  font: 500 12px/1.4 var(--font-mono); color: var(--dim); overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
a.ref-err:hover { color: var(--accent); background: var(--accent-tint); }
.ref-consts dd, .ref-errors dd { display: flex; flex-direction: column; gap: 4px; }
.ref-const__value { font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.ref-const__what, .ref-err__words { font-size: 14px; line-height: 1.55; color: var(--body); }
.ref-err__by { font-size: 13px; line-height: 1.5; color: var(--muted); }
.ref-err__by a { color: var(--dim); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ref-errors > div, .ref-consts > div { scroll-margin-top: calc(var(--header-h) + 56px); }
.ref-errors > div:target, .ref-consts > div:target { background: var(--accent-tint); }

/* ------------------------------------------------------------------------------------------------ quickstart parts */
.progress { display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; border: 1px solid var(--line-strong); border-radius: var(--r3); background: var(--panel); min-width: 0; }
.progress__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.progress__who { font: 500 12.5px/1.4 var(--font-mono); color: var(--muted); }
.progress__list { list-style: none; display: flex; flex-direction: column; }
.progress__row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 2px 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line-row); }
.progress__row:first-child { border-top: 0; }
.progress__icon { display: grid; place-items: center; width: 20px; height: 20px; color: var(--muted); align-self: start; margin-top: 1px; }
.progress__row.is-done .progress__icon { color: var(--accent); }
.progress__title { font-size: 15px; font-weight: 600; color: var(--text); }
.progress__title:hover { color: var(--accent); }
.progress__status { grid-column: 2; font: 500 13px/1.5 var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.progress__row.is-done .progress__status { color: var(--dim); }
@media (min-width: 640px) {
  .progress { padding: 20px 22px; }
  .progress__row { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .progress__status { grid-column: 3; text-align: right; }
}
.progress > .state { border: 0; padding: 0; background: none; }
.progress.state, .progress .state { margin: 0; }

/* ------------------------------------------------------------------------------------------------ how it works */
.how-title { font: 800 clamp(38px, 5.2vw, 72px)/1.04 var(--font-body); letter-spacing: -0.035em; color: var(--text); max-width: 18ch; }
.how-title em { display: block; font-family: var(--font-display); font-style: normal; font-weight: 400; letter-spacing: 0; color: var(--accent); }
.how-band { margin-top: 36px; }
.how-band dd .is-launch { color: var(--muted); font-weight: 500; font-size: 15px; }
.how-band__note { margin-top: 10px; }

.how-stages { list-style: none; display: flex; flex-direction: column; gap: 56px; }
.how-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; scroll-margin-top: calc(var(--header-h) + 24px); }
.how-fig { display: flex; flex-direction: column; gap: 0; min-width: 0; border: 1px solid var(--line); border-radius: var(--r4); background: var(--panel); overflow: hidden; box-shadow: var(--shadow-card); }
.how-art {
  display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; padding: 18px 20px 10px;
  background: var(--panel-3); border-bottom: 1px solid var(--line-row);
  fill: none; stroke: none; stroke-linecap: round; stroke-linejoin: round;
}
.how-art * { vector-effect: non-scaling-stroke; }
.how-art .dg-line { stroke: var(--line-input); stroke-width: 1.5; }
.how-art .dg-accent { stroke: var(--accent); stroke-width: 2; }
.how-art .dg-fill { fill: var(--panel-2); }
.how-art .dg-tint { fill: var(--accent-tint); }
.how-art .dg-dot, .how-art .dg-bar { fill: var(--accent); }
.how-art .dg-dash { stroke-dasharray: 3 4; }
@media (min-width: 820px) { .how-art { padding: 26px 32px 14px; } .how-art .dg-line { stroke-width: 1.75; } .how-art .dg-accent { stroke-width: 2.25; } }

/* the states under each drawing, in the order the drawing reads */
.how-states { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: st; }
.how-states li { counter-increment: st; position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 10px 16px; min-width: 0; border-left: 1px solid var(--line-row); }
.how-states li:first-child { border-left: 0; }
.how-states li::before { content: counter(st, decimal-leading-zero); font: 600 11px/1 var(--font-mono); letter-spacing: .08em; color: var(--faint); }
.how-state {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: var(--r-pill);
  border: 1px solid var(--accent-line); background: var(--accent-tint);
  font: 600 11px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); overflow-wrap: anywhere;
}
.how-state--on { background: var(--accent); border-color: var(--accent); color: var(--on-action); }
.how-state--exit { background: var(--panel-2); border-color: var(--line-strong); color: var(--dim); }
.how-state__sub { font-size: 13px; line-height: 1.45; color: var(--muted); }
@media (min-width: 640px) { .how-states li { padding: 16px 18px 18px; } .how-state__sub { font-size: 13.5px; } }

.how-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.how-copy .kicker { margin: 0; }
.how-copy > p:not([class]) { font-size: 16px; line-height: 1.7; color: var(--body); max-width: 60ch; }
.how-copy a:not([class]), .how-who a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.how-who { margin-top: 6px; }
@media (min-width: 1024px) {
  .how-stage { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; }
  .how-stages { gap: 72px; }
}

.life { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); overflow: hidden; }
.life__step { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-top: 1px solid var(--line-row); min-width: 0; }
.life__step:first-child { border-top: 0; }
.life__step p:not([class]) { font-size: 14.5px; line-height: 1.55; color: var(--body); }
.life__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.life__where { font: 500 12px/1.4 var(--font-mono); color: var(--faint); }
@media (min-width: 1024px) {
  .life { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .life__step { border-top: 0; border-left: 1px solid var(--line-row); padding: 18px 18px 20px; }
  .life__step:first-child { border-left: 0; }
  .life__step:not(:last-child)::after {
    content: ""; position: absolute; right: -5px; top: 24px; z-index: 1; width: 9px; height: 9px;
    border-top: 1px solid var(--line-input); border-right: 1px solid var(--line-input); background: var(--panel); transform: rotate(45deg);
  }
}
.life-exits { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 16px; }
.life-exits li { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: var(--r3); min-width: 0; }
.life-exits li p:not([class]) { font-size: 14.5px; line-height: 1.55; color: var(--body); }
@media (min-width: 820px) { .life-exits { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.how-costs .card { display: flex; flex-direction: column; gap: 12px; }
.how-costs .card .h3 + p { margin-top: 0; }
.how-costs .card a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.card__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r2); background: var(--accent-tint); color: var(--accent); }

.how-rules { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.how-rules__col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.how-list { list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.how-list li { position: relative; padding: 14px 0 14px 30px; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.6; color: var(--body); }
.how-list li::before { position: absolute; left: 0; top: 14px; font: 600 13px/1.6 var(--font-mono); }
.how-list--yes li::before { content: "+"; color: var(--accent); }
.how-list--no li::before { content: "!"; color: var(--warn); left: 4px; }
@media (min-width: 820px) { .how-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; } }

.how-demand {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center;
  padding: 24px; border-radius: var(--r4); border: 1px solid var(--accent-line);
  background: linear-gradient(135deg, var(--accent-tint), var(--panel) 62%);
}
.how-demand__copy { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; min-width: 0; }
.how-demand__copy p { color: var(--body); max-width: 58ch; }
.how-demand .slashlist { border-left: 0; padding-left: 0; padding-top: 18px; border-top: 1px solid var(--accent-line); }
@media (min-width: 1024px) {
  .how-demand { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; padding: 40px; }
  .how-demand .slashlist { border-top: 0; padding-top: 0; padding-left: 24px; border-left: 1px solid var(--accent-line); }
}

.outro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-block: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.outro__text { font: 700 clamp(20px, 2vw, 24px)/1.3 var(--font-body); letter-spacing: -0.015em; color: var(--text); max-width: 34ch; }
.outro__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

/* ------------------------------------------------------------------------------------------------ about */
.about {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center;
  padding-block: calc(var(--section) * .8) var(--section); min-height: calc(100vh - var(--header-h));
}
.about__copy { display: flex; flex-direction: column; gap: 28px; min-width: 0; max-width: 640px; }
.about__title { font: 400 clamp(26px, 3.1vw, 40px)/1.22 var(--font-display); letter-spacing: 0; color: var(--text); text-wrap: pretty; }
.about__text { display: flex; flex-direction: column; gap: 16px; }
.about__text p { font-size: 17px; line-height: 1.7; color: var(--body); max-width: 58ch; }
.about__text a, .about__group a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-input); text-underline-offset: 4px; transition: color var(--t1), text-decoration-color var(--t1); }
.about__text a:hover, .about__group a:hover { color: var(--accent); text-decoration-color: currentColor; }
.about__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; padding-top: 8px; }
.about__group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.about__h { font: 600 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.about__group ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.about__group a { display: inline-flex; align-items: center; min-height: 32px; font-size: 16px; overflow-wrap: anywhere; }
.about__art { margin: 0; justify-self: center; width: min(280px, 72vw); }
.about-art { display: block; width: 100%; height: auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.about-art * { vector-effect: non-scaling-stroke; }
.about-art__bands path { stroke: var(--line-input); stroke-width: 1; }
.about-art__bands .about-art__line { stroke: var(--line-strong); stroke-width: .75; }
.about-art__ring { stroke: var(--muted); stroke-width: 1; }
.about-art__pill { stroke-width: 1.25; }
.about-art__pill--amber { stroke: var(--spec-amber); }
.about-art__pill--red { stroke: var(--spec-red); }
@media (min-width: 640px) { .about__links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .about { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 64px; }
  .about__art { width: min(440px, 100%); justify-self: end; }
}

/* ------------------------------------------------------------------------------------------------ touch sizes */
@media (max-width: 819px) {
  .docs-nav__group a { min-height: 44px; }
  .doc-h2 .anchor, .doc-h3 .anchor { display: none; }
  .addr-row__act .icon-btn { width: 44px; height: 44px; }
  .about__group a { min-height: 44px; }
  .about__group a { min-width: 44px; }
  .progress__title { display: inline-flex; align-items: center; min-height: 32px; }
}
