/* SHIPHOOD — docs, report and 404 (inner pages in the green / paper / deep system). */
.band__in { position: relative; z-index: 1; }
.band .h-lg, .band .h-xl { max-width: 14ch; }
.band .lead { max-width: 52ch; }
/* art: fills the band height, stays clear of the bar links (fades in below the bar and from the left) */
.band .band__art { height: 100%; opacity: .62; -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent calc(var(--bar) - 4px), #000 calc(var(--bar) + 70px)), linear-gradient(90deg, transparent, #000 42%); -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, transparent 0, transparent calc(var(--bar) - 4px), #000 calc(var(--bar) + 70px)), linear-gradient(90deg, transparent, #000 42%); mask-composite: intersect; }
.dsec:has(+ .dsec--deep) { border-bottom: 0; margin-bottom: 0; }

/* ---------- docs layout ---------- */
.dx { padding: clamp(48px, 8vh, 96px) 0 clamp(64px, 10vh, 120px); }
.dx__grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.toc { position: sticky; top: 96px; display: grid; gap: 0; border-left: 1px solid var(--hair); }
.toc__t { font: 400 10.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); padding: 0 0 14px 16px; }
.toc a { position: relative; display: flex; align-items: center; min-height: 36px; padding: 0 0 0 16px; font: 400 10.5px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); transition: color .2s; }
.toc a::before { content: ''; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 2px; background: var(--fg); transform: scaleY(0); transition: transform .25s var(--ease); }
.toc a:hover { color: var(--fg); }
.toc a.is-on { color: var(--fg); }
.toc a.is-on::before { transform: scaleY(1); }
.dx__body { min-width: 0; max-width: 860px; }

.dsec { padding: 0 0 56px; margin-bottom: 56px; border-bottom: 1px solid var(--hair); scroll-margin-top: 90px; }
.dsec:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.dsec .eyebrow { margin-bottom: 12px; }
.dh2 { font-size: clamp(34px, 3.6vw, 52px); line-height: .95; margin-bottom: 22px; }
.dsec > p { font-size: 16.5px; margin-bottom: 18px; max-width: 68ch; }
.dsec > p:last-child { margin-bottom: 0; }
.dsec code, .dlist code, .tbl code { font-size: .86em; padding: 1px 4px; background: var(--hair); }
.t-deep code { background: rgba(244, 247, 240, .1); }
.dh3 { font: 300 26px/1 var(--cond); text-transform: uppercase; margin: 34px 0 14px; }
.dnote { margin-top: 18px; padding: 14px 16px; border-left: 2px solid var(--fg); background: var(--panel-bg); font-size: 15px !important; color: var(--mute); }
.dsec .dnote { margin-bottom: 0; }
.dfoot { margin-top: 20px; color: var(--fg) !important; }

/* deep blocks inside the paper column */
.dsec--deep { margin-left: calc(-1 * clamp(20px, 3vw, 44px)); margin-right: calc(-1 * clamp(20px, 3vw, 44px)); padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 44px); border-bottom: 0; margin-bottom: 0; }
.dsec--deep + .dsec--deep { border-top: 1px solid var(--hair); }
.dsec--deep + .dsec:not(.dsec--deep) { margin-top: 56px; }

/* steps */
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hair); }
.steps3 li { padding: 20px 20px 22px 0; border-right: 1px solid var(--hair); min-width: 0; }
.steps3 li + li { padding-left: 20px; }
.steps3 li:last-child { border-right: 0; padding-right: 0; }
.steps3__n { display: block; font: 200 52px/.85 var(--cond); margin-bottom: 14px; }
.steps3 h3 { font: 300 24px/1 var(--cond); text-transform: uppercase; margin-bottom: 10px; }
.steps3 p { font-size: 15px; color: var(--mute); }

/* tables */
.tblw { overflow-x: auto; margin: 22px 0 0; border-top: 1px solid var(--hair-2); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 13px 14px 13px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
.tbl thead th { font: 400 10.5px/1.3 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); padding-top: 14px; }
.tbl td:first-child { white-space: nowrap; }
.tbl b { font-weight: 500; font-family: var(--mono); font-size: 14px; }
.tbl--api td:first-child code { white-space: nowrap; }
.tbl--api td:first-child { width: 1%; }

/* lists */
.dlist { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--hair); }
.dlist li { position: relative; padding: 13px 0 13px 22px; border-bottom: 1px solid var(--hair); font-size: 15.5px; }
.dlist li::before { content: '–'; position: absolute; left: 0; color: var(--mute); }
.dlist--num { counter-reset: n; }
.dlist--num li { padding-left: 38px; counter-increment: n; }
.dlist--num li::before { content: counter(n, decimal-leading-zero); font: 400 11px/1 var(--mono); letter-spacing: .1em; top: 18px; color: var(--fg); }
.rules { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hair); }
.rules li { position: relative; padding: 13px 18px 13px 22px; border-bottom: 1px solid var(--hair); font-size: 15px; }
.rules li:nth-child(odd) { border-right: 1px solid var(--hair); }
.rules li::before { content: '×'; position: absolute; left: 0; top: 12px; font: 400 14px/1 var(--mono); }

/* perks + tools */
.perks, .tools2 { display: grid; gap: 0; border-top: 1px solid var(--hair); margin-top: 22px; }
.perks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tools2 { grid-template-columns: 1fr 1fr; margin-bottom: 26px; }
.perk, .tool2 { padding: 20px 20px 22px 0; border-right: 1px solid var(--hair); min-width: 0; }
.perk + .perk, .tool2 + .tool2 { padding-left: 20px; }
.perk:last-child, .tool2:last-child { border-right: 0; padding-right: 0; }
.perk h3 { font: 300 24px/1 var(--cond); text-transform: uppercase; margin: 14px 0 8px; }
.perk p, .tool2 p { font-size: 15px; color: var(--mute); }
.tool2 p { margin-top: 12px; }

/* code blocks */
.cb { margin-top: 16px; border: 1px solid var(--hair-2); }
.cb__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 0 6px 0 14px; border-bottom: 1px solid var(--hair); background: var(--deep); color: var(--paper); }
.cb__bar span { font: 400 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(244, 247, 240, .72); }
.cb .code { border: 0; margin: 0; }
.t-deep .cb { border-color: rgba(244, 247, 240, .2); }
.t-deep .cb__bar { background: #0a0b0a; }
.t-deep .code { background: #0a0b0a; }

/* token facts */
.tok { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hair-2); }
.tok div { padding: 16px 16px 18px 0; border-bottom: 1px solid var(--hair); min-width: 0; }
.tok dt { font: 400 10.5px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.tok dd { margin: 10px 0 0; font: 300 26px/1.05 var(--cond); text-transform: uppercase; }
.tok dd .mut { font: 300 14px/1.4 var(--sans); text-transform: none; }
.tok .tok__ca { grid-column: 1 / -1; }
.tok .tok__ca dd { font: 300 16px/1.5 var(--sans); text-transform: none; }

/* ---------- report ---------- */
.rp { padding: clamp(40px, 7vh, 80px) 0 clamp(64px, 10vh, 120px); }
.rp__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.rp__side p { font-size: 15.5px; color: var(--mute); max-width: 44ch; }
.rp__side p + p { margin-top: 14px; }
.rp__side .eyebrow { margin-bottom: 14px; color: var(--mute); font-size: 10.5px; max-width: none; }
.rp__form { display: grid; gap: 22px; padding-top: 22px; border-top: 1px solid var(--hair-2); }
.field { display: grid; gap: 10px; }
.field > span { font: 400 10.5px/1.3 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.rp__page { display: grid; gap: 10px; }
.rp__page span { font: 400 10.5px/1.3 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.rp__page a { font: 400 14px/1.4 var(--mono); overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 4px; }
.rp__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp__chips .chip[aria-pressed=true] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.rp__count { justify-self: end; margin-top: -14px; font: 400 10.5px/1 var(--mono); letter-spacing: .1em; color: var(--mute); }
.rp__fine { font-size: 13.5px; color: var(--mute); }
.rp__done { display: grid; gap: 18px; justify-items: start; padding-top: 22px; border-top: 1px solid var(--hair-2); }
.rp__done h2 { font: 200 clamp(64px, 9vw, 128px)/.85 var(--cond); text-transform: uppercase; }
.rp__done p { font-size: 16px; color: var(--mute); max-width: 44ch; }
.rp__done .eyebrow { font-size: 10.5px; }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: flex; align-items: center; padding-bottom: clamp(40px, 8vh, 96px); }
.nf .band__art { width: 54%; }
.nf .h-xl { max-width: none; }
.nf__code { margin-bottom: 18px; }
.nf .lead { margin-top: 22px; }
.nf__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }

@media (max-width: 980px) {
  .dx__grid { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: relative; top: auto; z-index: 1; display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; border-left: 0; border-bottom: 1px solid var(--hair); background: var(--bg); margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); }
  .toc::-webkit-scrollbar { display: none; }
  .toc__t { display: none; }
  .toc a { flex: none; min-height: 48px; padding: 0 12px; white-space: nowrap; }
  .toc a::before { left: 12px; right: 12px; top: auto; bottom: -1px; width: auto; height: 2px; transform: scaleX(0); }
  .toc a.is-on::before { transform: scaleX(1); }
  .rp__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .band .band__art { display: none; width: 100%; opacity: .16; -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent var(--bar), #000 calc(var(--bar) + 60px)); mask-image: linear-gradient(180deg, transparent 0, transparent var(--bar), #000 calc(var(--bar) + 60px)); }
  .dx { padding-top: 0; }
  .dsec { padding-bottom: 40px; margin-bottom: 40px; }
  .dsec--deep { margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); padding: 32px var(--gut); }
  .steps3, .perks, .tools2, .rules { grid-template-columns: 1fr; }
  .steps3 li, .steps3 li + li, .perk, .perk + .perk, .tool2, .tool2 + .tool2 { padding: 18px 0 20px; border-right: 0; border-bottom: 1px solid var(--hair); }
  .rules li:nth-child(odd) { border-right: 0; }
  .tok { grid-template-columns: 1fr 1fr; }
  .tok dd { font-size: 22px; }
  .tbl { font-size: 14px; }
  .tbl td:first-child { white-space: normal; }
  .tbl--api td:first-child code { white-space: normal; overflow-wrap: anywhere; }
  .nf { align-items: flex-start; padding-top: calc(var(--bar) + 48px); }
  .nf .band__art { display: block; top: auto; height: 45%; opacity: .35; }
  .nf__acts .btn { flex: 1; }
}
