/* Ax0s Memory + Docs · NOW-06
   Extends the Ember tokens in /v2-ledger.css; no external assets. */

.product-main,
.docs-main {
  padding-top: 82px;
}

.product-hero {
  min-height: 72svh;
  display: grid;
  align-content: center;
  padding: clamp(110px, 16vh, 180px) var(--pad-x) clamp(82px, 11vh, 130px);
}

.docs-hero {
  min-height: auto;
  display: grid;
  align-content: start;
  padding: clamp(48px, 7vh, 76px) var(--pad-x) clamp(40px, 6vh, 64px);
}

.product-kicker,
.docs-kicker,
.section-label,
.verification-state {
  color: var(--verm);
  font: 500 12px/1.45 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.product-title,
.docs-title {
  max-width: 12em;
  margin-top: 26px;
  font-size: clamp(50px, 8.6vw, 96px);
  font-weight: 800;
  font-stretch: 66%;
  line-height: .95;
  letter-spacing: -.015em;
  text-transform: uppercase;
  text-wrap: balance;
}

.product-title em,
.docs-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: 0;
  text-transform: none;
}

.product-summary,
.docs-summary {
  max-width: 64ch;
  margin-top: 30px;
  color: var(--cream-dim);
  font-size: clamp(17px, 1.45vw, 21px);
}

.product-actions,
.doc-actions,
.reference-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 34px;
}

.reference-links a,
.inline-link,
.doc-body a,
.mechanism-card a {
  color: inherit;
  text-decoration-color: var(--verm);
  text-underline-offset: 4px;
}

.mechanism-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(42px, 7vw, 74px);
  border: 2px solid var(--hair-paper);
}

.mechanism-card {
  padding: clamp(24px, 3vw, 36px);
}

.mechanism-card + .mechanism-card {
  border-left: 2px solid var(--hair-paper);
}

.mechanism-card .mechanism-index {
  color: var(--verm-paper);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .14em;
}

.mechanism-card h3 {
  margin-top: 32px;
  color: var(--paper-ink);
  font-size: clamp(21px, 2vw, 28px);
}

.mechanism-card p {
  margin-top: 13px;
  color: var(--paper-dim);
  font-size: 15px;
}

.flow-figure {
  margin-top: clamp(42px, 7vw, 72px);
  border: 2px solid var(--hair-dark);
  background: var(--ink-2);
}

.flow-figure svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--verm);
}

.flow-figure .flow-box,
.flow-figure .flow-path,
.flow-figure .flow-arrow {
  fill: none;
  stroke: currentColor;
}

.flow-figure .history-path {
  fill: none;
  stroke: var(--cream-faint);
}

.flow-figure .flow-title {
  fill: var(--cream);
  font: 700 18px var(--mono);
}

.flow-figure .flow-detail,
.flow-figure .flow-caption {
  fill: var(--bronze-muted);
  font: 13px var(--mono);
}

.flow-figure figcaption {
  padding: 18px 22px;
  border-top: 0;
  border-bottom: 1px solid var(--hair-dark);
  color: var(--cream-faint);
  font: inherit;
}

.record-chain-figure {
  margin-top: clamp(36px, 6vw, 64px);
  border: 2px solid var(--hair-dark);
  background: var(--ink-2);
}

.record-chain-figure > figcaption {
  display: grid;
  gap: 10px;
  padding: clamp(22px, 3.5vw, 34px);
  border-bottom: 1px solid var(--hair-dark);
}

.record-chain-figure > figcaption h2,
.record-chain-figure > figcaption h3 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
}

.record-chain-figure > figcaption p {
  margin: 0;
  color: var(--cream-faint);
  font-size: 14px;
  line-height: 1.5;
}

.record-chain-scroll {
  overflow-x: auto;
  scrollbar-color: var(--verm) var(--ink-2);
  scrollbar-width: thin;
}

.record-chain-scroll:focus-visible { outline: 2px solid var(--verm); outline-offset: -3px; }

.record-chain-figure svg {
  display: block;
  width: 100%;
  min-width: 980px;
  height: auto;
}

.record-node rect {
  fill: var(--ink-2);
  stroke: var(--hair-dark);
  stroke-width: 1.5;
}

.record-node-current rect { stroke: var(--verm); }
.record-node-queue rect { fill: var(--ink-3); stroke: var(--cream-faint); stroke-dasharray: 7 6; }
.record-node-decision rect { fill: var(--ink-3); stroke: var(--verm); }
.record-node-history rect { fill: transparent; stroke: var(--cream-faint); }
.record-node-source .record-surface { fill: var(--ink-3); stroke: var(--bronze-muted); stroke-dasharray: 4 4; }
.record-node .record-plane { fill: var(--ink); stroke: var(--hair-dark); stroke-width: 1; }
.record-node .record-plane-back { opacity: .35; }
.record-node .record-plane-mid { opacity: .65; }

.record-node-kind,
.record-node-title,
.record-node-copy,
.record-node-field,
.record-path-label {
  font-family: var(--mono);
}

.record-node-kind { fill: var(--verm); font-size: 12px; font-weight: 700; letter-spacing: 1.1px; }
.record-node-title { fill: var(--cream); font-size: 14px; font-weight: 700; }
.record-node-copy { fill: var(--cream); font-size: 13px; }
.record-node-field { fill: var(--cream-dim); font-size: 12px; }
.record-chain-path { fill: none; stroke: var(--verm); stroke-width: 1.5; }
.record-pointer-path { stroke: var(--cream-faint); stroke-dasharray: 6 5; }
.record-chain-path + .record-path-label,
.record-path-label { fill: var(--cream-dim); font-size: 12px; letter-spacing: .5px; }
.record-chain-figure marker path { fill: var(--verm); }

.record-chain-overflow {
  display: none;
  margin: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--hair-dark);
  color: var(--cream-faint);
  font: 600 12px/1.45 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.record-chain-takeaway {
  margin: 0;
  padding: 20px clamp(20px, 3.5vw, 34px);
  border-top: 1px solid var(--hair-dark);
  color: var(--cream-dim);
  font-size: 15px;
  line-height: 1.6;
}

.record-chain-takeaway strong { color: var(--cream); }
.record-chain-takeaway a { color: inherit; text-decoration-color: var(--verm); text-underline-offset: 4px; }

.boundary-grid,
.interface-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 42px;
  gap: 2px;
  border: 2px solid var(--hair-dark);
  background: var(--hair-dark);
}

.boundary-card,
.interface-card {
  min-height: 190px;
  padding: clamp(24px, 4vw, 38px);
  background: var(--ink-2);
}

.boundary-card h3,
.interface-card h3 {
  color: var(--cream);
  font-size: 22px;
}

.boundary-card p,
.interface-card p {
  margin-top: 14px;
  color: var(--cream-dim);
}

.state-chip {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 9px;
  border: 2px solid var(--verm);
  color: var(--verm);
  font: 500 12px/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.roadmap-panel {
  margin-top: 44px;
  padding: clamp(28px, 5vw, 48px);
  border: 2px solid transparent;
  background: var(--olive);
}

.roadmap-panel h3 {
  margin-top: 16px;
  font-size: clamp(25px, 3vw, 36px);
}

.roadmap-panel p {
  max-width: 68ch;
  margin-top: 13px;
  color: var(--cream);
}

.roadmap-panel .section-label {
  color: var(--cream-bright);
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 86px);
  padding: 0 var(--pad-x) clamp(72px, 10vh, 118px);
}

.docs-nav {
  position: sticky;
  top: 112px;
  align-self: start;
  padding: 20px;
  border: 2px solid var(--hair-dark);
  background: var(--ink-2);
}

.docs-nav h2 {
  color: var(--verm);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.docs-nav ul {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  list-style: none;
}

.docs-nav a {
  color: var(--cream-dim);
  font: 400 12px/1.35 var(--mono);
  text-decoration: none;
}

.docs-nav a:hover,
.docs-nav a:focus-visible,
.docs-nav a[aria-current="page"] {
  color: var(--cream);
}

.docs-nav a[aria-current="page"]::after {
  content: " · Current";
  color: var(--verm);
  font-size: 12px;
  text-transform: uppercase;
}

.doc-body {
  min-width: 0;
  max-width: 980px;
}

.doc-section {
  padding: clamp(36px, 5vw, 54px) 0;
  border-top: 1px solid var(--hair-dark);
}

.doc-section:first-child {
  border-top-color: var(--verm);
}

.doc-section h2 {
  max-width: 18em;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  text-wrap: balance;
}

.doc-section h3 {
  margin-top: 34px;
  font-size: 22px;
}

.doc-section > p,
.doc-section li {
  max-width: 72ch;
  color: var(--cream-dim);
}

.doc-section > p {
  margin-top: 18px;
}

.doc-section ul,
.doc-section ol {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-left: 1.25em;
}

.doc-callout,
.test-status {
  margin-top: 28px;
  padding: 22px 24px;
  border: 2px solid var(--hair-dark);
  background: var(--ink-2);
}

.doc-callout strong,
.test-status strong {
  color: var(--cream);
}

.test-status[data-state="pending"] {
  border-style: dashed;
}

.code-triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
  border: 2px solid var(--hair-dark);
}

.terminal-receipt-figure {
  margin-top: 34px;
  border: 2px solid var(--hair-dark);
  background: var(--ink-2);
}

.terminal-receipt-figure > figcaption {
  display: grid;
  gap: 10px;
  padding: clamp(22px, 3vw, 32px);
  border-bottom: 1px solid var(--hair-dark);
}

.terminal-receipt-figure > figcaption h3 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
}

.terminal-receipt-figure > figcaption p {
  margin: 0;
  color: var(--cream-faint);
  font-size: 14px;
  line-height: 1.5;
}

.terminal-receipt-figure .code-triptych { margin-top: 0; border: 0; }

.code-panel {
  min-width: 0;
  background: var(--ink-3);
}

.code-panel + .code-panel {
  border-left: 2px solid var(--hair-dark);
}

.code-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hair-dark);
}

.code-panel-header > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.code-panel-title {
  color: var(--cream);
  font: 500 12px/1.3 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.specimen-stamp {
  color: var(--verm);
  font: 600 12px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: lowercase;
}

.copy-code {
  flex: none;
  padding: 7px 9px;
  border: 2px solid var(--hair-dark);
  background: transparent;
  color: var(--verm);
  font: 500 12px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.copy-code:hover,
.copy-code:focus-visible {
  border-color: var(--verm);
}

.code-panel pre,
.code-block pre {
  max-width: 100%;
  margin: 0;
  padding: 20px;
  overflow-x: hidden;
  color: var(--cream-dim);
  font: 400 12px/1.65 var(--mono);
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.code-block {
  margin-top: 24px;
  border: 2px solid var(--hair-dark);
  background: var(--ink-3);
}

.code-block .code-panel-header {
  border-bottom: 1px solid var(--hair-dark);
}

.tok-key,
.tok-command,
.tok-flag {
  color: var(--verm);
}

.tok-string {
  color: var(--cream);
}

.tok-literal,
.tok-number {
  color: var(--ember-soft);
}

.code-panel[data-active-link="true"] {
  box-shadow: inset 0 0 0 1px var(--verm);
}

.code-note {
  padding: 0 20px 20px;
  color: var(--cream-faint);
  font: 400 12px/1.55 var(--mono);
}

.receipt-takeaway {
  margin: 0;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--hair-dark);
  color: var(--cream-dim);
  font-size: 14px;
  line-height: 1.6;
}

.receipt-takeaway strong { color: var(--cream); font-weight: 650; }

.contract-table {
  width: 100%;
  margin-top: 28px;
  border-collapse: collapse;
  font-size: 14px;
}

.contract-table th,
.contract-table td {
  padding: 14px 16px;
  border: 1px solid var(--hair-dark);
  text-align: left;
  vertical-align: top;
}

.contract-table th {
  color: var(--verm);
  font: 640 12px/1.4 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.contract-table td {
  color: var(--cream-dim);
}

.contract-table code {
  color: var(--cream);
  font-family: var(--mono);
}

.docs-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 34px;
  gap: 2px;
  border: 2px solid var(--hair-dark);
  background: var(--hair-dark);
}

.docs-index-card {
  min-height: 190px;
  padding: 28px;
  border: 2px solid transparent;
  background: var(--ink-2);
  color: inherit;
  text-decoration: none;
}

.docs-index-card:hover,
.docs-index-card:focus-visible {
  border-color: var(--verm);
}

.docs-index-card span {
  color: var(--verm);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.docs-index-card h3 {
  margin-top: 26px;
  color: var(--cream);
  font-size: 24px;
}

.docs-index-card p {
  margin-top: 12px;
  color: var(--cream-dim);
  font-size: 15px;
}

.paper .docs-index-grid {
  border-color: var(--hair-paper);
  background: var(--hair-paper);
}

.paper .docs-index-card,
.paper .docs-map-grid .docs-index-feature,
.paper .docs-artifact-card {
  background: var(--paper-card);
}

.paper .docs-index-card:hover,
.paper .docs-index-card:focus-visible,
.paper .docs-artifact-card {
  border-color: var(--verm-paper);
}

.paper .docs-index-card span,
.paper .docs-artifact-card::before,
.paper .docs-artifact-card > strong {
  color: var(--verm-paper);
}

.paper .docs-index-card h3 { color: var(--paper-ink); }
.paper .docs-index-card p { color: var(--paper-dim); }
.paper .doc-callout {
  border-color: var(--hair-paper);
  background: var(--paper-card);
  color: var(--paper-dim);
}
.paper .doc-callout strong { color: var(--paper-ink); }
.paper .doc-callout a { text-decoration-color: var(--verm-paper); }

.http-surface-grid,
.http-auth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(34px, 5vw, 56px);
  border: 2px solid var(--hair-dark);
  background: var(--hair-dark);
}

.http-surface-grid article,
.http-auth-grid article {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  background: var(--ink-2);
}

.http-path,
.http-auth-grid article > span {
  color: var(--verm);
  font: 650 12px/1.4 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.http-surface-grid h3,
.http-auth-grid h3,
.http-errors h3 {
  margin-top: 22px;
  color: var(--cream);
  font-size: clamp(20px, 2.3vw, 29px);
  line-height: 1.15;
}

.http-surface-grid p,
.http-auth-grid p {
  margin-top: 14px;
  color: var(--cream-dim);
  font-size: 15px;
  line-height: 1.6;
}

.http-surface-grid strong { color: var(--cream); }
.http-auth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.http-auth-grid a { color: inherit; text-decoration-color: var(--verm); text-underline-offset: 4px; }

.http-route-table-wrap {
  margin-top: clamp(32px, 5vw, 52px);
  overflow-x: auto;
  border: 2px solid var(--hair-dark);
  background: var(--ink-2);
  scrollbar-color: var(--verm) var(--ink-3);
  scrollbar-width: thin;
}

.http-route-table-wrap:focus-visible { outline: 2px solid var(--verm); outline-offset: 4px; }
.http-route-table { width: 100%; min-width: 780px; border-collapse: collapse; color: var(--cream-dim); font-size: 14px; line-height: 1.55; }
.http-route-table th,
.http-route-table td { padding: 18px; border-right: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark); text-align: left; vertical-align: top; }
.http-route-table thead th { color: var(--verm); font: 640 12px/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.http-route-table tbody th { width: 27%; color: var(--cream); font-weight: 600; }
.http-route-table th:last-child,
.http-route-table td:last-child { border-right: 0; }
.http-route-table tbody tr:last-child th,
.http-route-table tbody tr:last-child td { border-bottom: 0; }

.http-errors {
  margin-top: clamp(32px, 5vw, 52px);
  padding: clamp(22px, 3vw, 34px);
  border: 2px solid var(--hair-dark);
  background: var(--ink-2);
}

.http-errors h3 { margin-top: 0; }
.http-errors ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 30px; margin-top: 20px; padding-left: 1.2em; }
.http-errors li { color: var(--cream-dim); font-size: 15px; line-height: 1.55; }
.http-evidence-wording { margin-top: 32px; color: var(--cream); font-size: 18px; }
.http-evidence-wording strong { color: var(--verm); }
#http-surface > p:not(.eyebrow):not(.lede) { max-width: 72ch; }
#http-surface .section-support { margin-top: 14px; color: var(--cream-dim); font-size: 15px; line-height: 1.65; }
#http-surface .section-support a { color: inherit; text-decoration-color: var(--verm); text-underline-offset: 4px; }

.doc-section.paper {
  margin-top: clamp(42px, 7vw, 72px);
  padding: clamp(34px, 5vw, 56px);
  border: 2px solid var(--hair-paper);
}

.doc-section.paper .section-label { color: var(--verm-paper); }
.doc-section.paper > p,
.doc-section.paper li { color: var(--paper-dim); }
.doc-section.paper a { text-decoration-color: var(--verm-paper); }

@media (max-width: 1040px) {
  .mechanism-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mechanism-card:nth-child(3) {
    border-left: 0;
  }

  .mechanism-card:nth-child(n+3) {
    border-top: 2px solid var(--hair-paper);
  }

  .code-triptych {
    grid-template-columns: 1fr;
  }

  .code-panel + .code-panel {
    border-top: 2px solid var(--hair-dark);
    border-left: 0;
  }

  .http-surface-grid { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .product-main,
  .docs-main {
    padding-top: 72px;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
    padding: 20px;
    border: 2px solid var(--hair-dark);
  }

  .docs-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-figure {
    overflow-x: auto;
  }

  .flow-figure svg {
    width: 900px;
    max-width: none;
  }

  .record-chain-overflow { display: block; }
}

@media (max-width: 640px) {
  .mechanism-grid,
  .boundary-grid,
  .interface-grid,
  .docs-index-grid,
  .http-auth-grid,
  .http-errors ul {
    grid-template-columns: 1fr;
  }

  .mechanism-card + .mechanism-card,
  .mechanism-card:nth-child(3) {
    border-top: 2px solid var(--hair-paper);
    border-left: 0;
  }

  .docs-nav ul {
    grid-template-columns: 1fr;
  }

  .contract-table,
  .contract-table tbody,
  .contract-table tr,
  .contract-table th,
  .contract-table td {
    display: block;
  }

  .contract-table tr + tr {
    margin-top: 16px;
  }

  .contract-table th,
  .contract-table td {
    border-bottom: 0;
  }

  .contract-table td:last-child {
    border-bottom: 1px solid var(--hair-dark);
  }
}

/* Memory page · a record moves through a sequence, while interfaces read as a ledger. */
.hero-record-chain {
  min-width: 0;
  max-width: 1120px;
  margin-top: clamp(54px, 8vw, 92px);
}

.hero-record-chain svg {
  min-width: 1120px;
}

.hero-record-chain .record-chain-state {
  color: var(--verm);
  font: 650 12px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-record-chain .hero-prior {
  opacity: .52;
}

.hero-record-chain .hero-current .record-surface {
  stroke-width: 2.5;
}

.memory-sequence {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 48px);
  margin-top: clamp(46px, 7vw, 78px);
  padding: 0;
  list-style: none;
}

.memory-step:nth-child(1) { --memory-pass-delay: 0ms; }
.memory-step:nth-child(2) { --memory-pass-delay: 240ms; }
.memory-step:nth-child(3) { --memory-pass-delay: 480ms; }
.memory-step:nth-child(4) { --memory-pass-delay: 720ms; }

.memory-step {
  position: relative;
  min-width: 0;
  padding: 40px clamp(0px, 1.5vw, 22px) 0 0;
  border-top: 1px solid var(--hair-paper);
}

.memory-step::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  width: 13px;
  height: 13px;
  border: 2px solid var(--verm-paper);
  border-radius: 50%;
  background: var(--paper-card);
  box-shadow: 0 0 0 7px var(--paper-card);
}

.memory-step::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--verm-paper);
  transform-origin: left center;
}

.memory-step-adjudication::before {
  border-radius: 0;
}

.memory-step .mechanism-index {
  color: var(--verm-paper);
  font: 650 12px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.memory-step h3 {
  margin-top: 24px;
  color: var(--paper-ink);
  font-size: clamp(23px, 2.5vw, 34px);
  text-wrap: balance;
}

.memory-step p {
  margin-top: 14px;
  color: var(--paper-dim);
  font-size: 15px;
}

.memory-step a {
  color: inherit;
  text-decoration-color: var(--verm-paper);
  text-underline-offset: 4px;
}

.interface-ledger {
  margin-top: clamp(40px, 6vw, 68px);
  border-top: 1px solid var(--hair-dark);
}

.interface-entry {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(260px, 1.8fr) minmax(150px, .7fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: start;
  padding: clamp(24px, 3.5vw, 38px) 0;
  border-bottom: 1px solid var(--hair-dark);
}

.interface-entry .state-chip {
  justify-self: start;
  margin: 0;
}

.interface-entry h3 {
  color: var(--cream);
  font-size: clamp(21px, 2vw, 28px);
}

.interface-entry p {
  margin-top: 10px;
  color: var(--cream-dim);
}

.interface-entry .reference-links {
  justify-content: flex-end;
  margin: 0;
  font: 500 12px/1.5 var(--mono);
  text-align: right;
}

/* Docs index · directory, surface, auth, and evidence each use a distinct density. */
.docs-map-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.docs-map-grid .docs-index-feature {
  grid-column: span 2;
  min-height: 260px;
  display: grid;
  align-content: end;
  background: var(--ink-2);
}

.docs-map-grid .docs-index-feature h3 {
  font-size: clamp(30px, 4vw, 48px);
}

.docs-artifact-card {
  position: relative;
  background: var(--ink-2);
  border-color: var(--verm);
}

.docs-artifact-card::before,
.source-count-receipt::before {
  content: "{}";
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--verm);
  font: 650 16px/1 var(--mono);
}

.docs-artifact-card > strong,
.source-count-receipt > strong {
  display: block;
  margin-top: 24px;
  color: var(--verm);
  font: 650 12px/1.4 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

#http-surface .http-surface-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
}

#http-surface .http-surface-grid article:first-child {
  grid-row: span 2;
  display: grid;
  align-content: center;
}

#http-surface .http-auth-grid {
  display: block;
  border: 0;
  border-top: 1px solid var(--hair-dark);
  background: transparent;
}

#http-surface .http-auth-grid article {
  display: grid;
  grid-template-columns: minmax(140px, .6fr) minmax(210px, 1fr) minmax(280px, 1.7fr);
  gap: clamp(18px, 3vw, 42px);
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--hair-dark);
  background: transparent;
}

#http-surface .http-auth-grid h3,
#http-surface .http-auth-grid p {
  margin-top: 0;
}

.docs-count-link {
  color: var(--verm);
  text-decoration: none;
}

#http-surface .docs-count-link {
  color: var(--verm);
}

.docs-count {
  display: inline-block;
  min-width: 1.2em;
  font-variant-numeric: tabular-nums;
}

.http-evidence-wording {
  display: flex;
  gap: 18px;
  align-items: baseline;
}

.docs-count-reading {
  flex: none;
  font: 620 clamp(38px, 5vw, 64px)/.9 var(--sans);
  letter-spacing: -.03em;
}

.source-count-ledger {
  margin-top: clamp(36px, 6vw, 66px);
  border-top: 1px solid var(--hair-dark);
}

.source-count-entry {
  display: grid;
  grid-template-columns: minmax(190px, .6fr) minmax(0, 1.4fr);
  gap: clamp(26px, 6vw, 90px);
  align-items: center;
  padding: clamp(30px, 5vw, 52px) 0;
  border-bottom: 1px solid var(--hair-dark);
}

.source-count-entry > div {
  display: grid;
  gap: 12px;
}

.source-count-entry span,
.source-count-receipt > span {
  color: var(--verm);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.source-count-entry .docs-count {
  color: var(--cream);
  font: 620 clamp(58px, 8vw, 108px)/.82 var(--sans);
  letter-spacing: -.03em;
}

.source-count-entry h3 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1.25;
}

.source-count-receipt {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, .6fr) minmax(0, 1fr) minmax(180px, .4fr);
  gap: clamp(26px, 6vw, 90px);
  align-items: center;
  margin-top: 28px;
  padding: 26px 64px 26px 26px;
  border: 2px solid var(--hair-dark);
  background: var(--ink-2);
  color: inherit;
  text-decoration: none;
}

.source-count-receipt h3,
.source-count-receipt p,
.source-count-receipt > strong {
  margin: 0;
}

.source-count-receipt h3 {
  color: var(--cream);
  font-size: 22px;
}

.source-count-receipt p {
  color: var(--cream-dim);
  font-size: 14px;
}

@media (prefers-reduced-motion: no-preference) {
  .fx-armed .hero-record-chain.fx .record-chain-path {
    stroke-dasharray: 8 7;
    stroke-dashoffset: 30;
  }

  .fx-armed .hero-record-chain.fx.seen .record-chain-path {
    animation: memory-chain-trace 1.1s var(--ease) both;
  }

  .fx-armed .hero-record-chain.fx.seen .hero-prior {
    animation: prior-settle 1.5s var(--ease) 0.25s both;
  }

  .fx-armed .hero-record-chain.fx.seen .hero-current rect {
    transform-box: fill-box;
    transform-origin: center;
    animation: current-land 0.8s var(--ease) 0.15s both;
  }

  @keyframes prior-settle {
    from { opacity: 1; }
    to { opacity: 0.52; }
  }

  @keyframes current-land {
    from { transform: scale(0.975); }
    to { transform: scale(1); }
  }

  .memory-step::before {
    transition: background-color .45s var(--ease), box-shadow .6s var(--ease), transform .6s var(--ease);
    transition-delay: var(--memory-pass-delay, 0ms);
  }

  .memory-step.seen::before {
    background: var(--verm-paper);
    box-shadow: 0 0 0 7px var(--paper-card), 0 0 0 8px var(--verm-paper);
    transform: scale(1.08);
  }

  .fx-armed .memory-step::after {
    transform: scaleX(0);
  }

  .fx-armed .memory-step.seen::after {
    animation: memory-correction-pass .58s var(--ease) var(--memory-pass-delay, 0ms) both;
  }
}

@keyframes memory-chain-trace {
  from { stroke-dashoffset: 30; }
  to { stroke-dashoffset: 0; }
}

@keyframes memory-correction-pass {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes memory-correction-pass-vertical {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-record-chain .record-chain-path {
    animation: none;
    stroke-dashoffset: 0;
  }

  .memory-step::before {
    transition: none;
    transform: none;
  }

  .memory-step::after {
    animation: none;
    transform: none;
  }

  .docs-count {
    transition: none;
  }
}

@media (max-width: 1040px) {
  .memory-sequence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: clamp(42px, 7vw, 64px);
  }

  .docs-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #http-surface .http-surface-grid {
    grid-template-columns: 1fr;
  }

  #http-surface .http-surface-grid article:first-child {
    grid-row: auto;
  }

  #http-surface .http-auth-grid article {
    grid-template-columns: minmax(140px, .6fr) minmax(0, 1.4fr);
  }

  #http-surface .http-auth-grid article p {
    grid-column: 2;
  }

  .source-count-receipt {
    grid-template-columns: 1fr 1fr;
  }

  .source-count-receipt > strong {
    grid-column: 2;
  }
}

@media (max-width: 840px) {
  .interface-entry {
    grid-template-columns: minmax(140px, .6fr) minmax(0, 1.4fr);
  }

  .interface-entry .reference-links {
    grid-column: 2;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .memory-sequence,
  .docs-map-grid {
    grid-template-columns: 1fr;
  }

  .memory-sequence {
    gap: 0;
    padding: 0 0 0 32px;
    border-top: 0;
    border-left: 1px solid var(--hair-paper);
  }

  .memory-step {
    padding: 0 0 42px;
    border-top: 0;
  }

  .memory-step::before {
    top: 4px;
    left: -39px;
  }

  .memory-step::after {
    top: 4px;
    left: -32px;
    width: 2px;
    height: calc(100% - 18px);
    transform-origin: center top;
  }

  .docs-map-grid .docs-index-feature {
    grid-column: auto;
  }

  .interface-entry,
  #http-surface .http-auth-grid article,
  .source-count-entry,
  .source-count-receipt {
    grid-template-columns: 1fr;
  }

  .interface-entry .reference-links,
  #http-surface .http-auth-grid article p,
  .source-count-receipt > strong {
    grid-column: auto;
  }

  .source-count-receipt {
    gap: 16px;
  }

  .http-evidence-wording {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .fx-armed .memory-step::after {
    transform: scaleY(0);
  }

  .fx-armed .memory-step.seen::after {
    animation-name: memory-correction-pass-vertical;
  }
}
