/* OpenBonds: the shared design system (css/base.css).
   An editorial credit house, not a crypto dashboard: warm near-black paper, bone ink, EB Garamond for what we say,
   Schibsted Grotesk for how it works, IBM Plex Mono for numbers you would copy or compare. Thin rules, numbered
   chapters, rectangular buttons (2px), no pills, no glow, no tracked-out capitals, no emoji. Orange is the accent:
   the italic word in a headline, the primary button, the live mark. Colours come from css/tokens.css only.

   Mobile first. Breakpoints: 640px (large phone / small tablet), 900px (the nav shows its links), 1120px (desktop).
   DESIGN.md is the catalogue: every class here, the markup it expects and when to use it. */

/* ================================================================== 0. base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); color: var(--ink); overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* body stays transparent so the code-run background (canvas#codebg, z-index -1) shows between the sections */
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: transparent; color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body > main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }
code, kbd, pre, .mono { font-family: var(--mono); }
.num, .mono, .tnum { font-variant-numeric: lining-nums tabular-nums; }
::selection { background: var(--selection); }
:focus-visible { outline: 2px solid var(--orange-ink); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 12px 18px; background: var(--ink); color: var(--paper); font-weight: 500; }
.skip-link:focus { top: 10px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }
abbr[title] { text-decoration: underline dotted 1px; text-underline-offset: 3px; cursor: help; }
/* code inside running text sits a size down, so a serif line does not jump */
:where(p, li, dd, td, figcaption, .note, .help, .banner) code { font-size: .82em; color: var(--ink); }

/* text helpers */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ink-2 { color: var(--ink-2); }
.accent { color: var(--orange-ink); }
.up { color: var(--up); }
.down { color: var(--down); }
.warn { color: var(--warn); }
.serif { font-family: var(--serif); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.sub { color: var(--muted); font-size: 14px; }
.label { font-size: 13px; color: var(--muted); }
/* a value the app cannot know: an em dash, the reason in title="" */
.na { color: var(--faint); cursor: help; }

/* ================================================================== 1. the code-run background */
/* The mask follows the reading column, not the centre of the screen: the layout is left-aligned, so every eyebrow,
   headline, lede and chapter number sits in the .wrap column (max 1180px). Under it the code runs at about a third of
   its strength; it comes to full strength only in the margins outside the column. On phones and tablets the column
   is the whole screen, so the code stays calm everywhere and lifts a little towards the bottom edge. */
#codebg { position: fixed; inset: 0; z-index: -1; width: 100vw; height: 100vh; pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, black 0, black calc(50% - 650px), rgba(0, 0, 0, .35) calc(50% - 560px), rgba(0, 0, 0, .35) calc(50% + 560px), black calc(50% + 650px), black 100%);
  mask-image: linear-gradient(90deg, black 0, black calc(50% - 650px), rgba(0, 0, 0, .35) calc(50% - 560px), rgba(0, 0, 0, .35) calc(50% + 560px), black calc(50% + 650px), black 100%); }
@media (max-width: 899px) {
  #codebg { -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .35) 0, rgba(0, 0, 0, .35) 75%, rgba(0, 0, 0, .75) 100%); mask-image: linear-gradient(180deg, rgba(0, 0, 0, .35) 0, rgba(0, 0, 0, .35) 75%, rgba(0, 0, 0, .75) 100%); }
}

/* ================================================================== 2. layout */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.wrap.wide { max-width: var(--wrap-wide); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.stack.sm { gap: 12px; } .stack.lg { gap: 40px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grid2, .grid3, .grid4, .split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.grid2 > *, .grid3 > *, .grid4 > *, .split > * { min-width: 0; }
@media (min-width: 640px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
  .split { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
  .split.rev { grid-template-columns: 340px minmax(0, 1fr); }
}
/* a section of an inner page: transparent, so the code background shows; padded like a chapter but tighter */
.section { padding-block: 56px; }
.section + .section { padding-top: 0; }
@media (min-width: 900px) { .section { padding-block: 72px; } }

/* ================================================================== 3. masthead: nav */
.nav { position: sticky; top: 0; z-index: var(--z-nav); background: var(--nav-bg); border-bottom: 1px solid var(--ink); }
.nav > .wrap { display: flex; align-items: center; gap: 28px; height: var(--nav-h); }
.nav.solid { box-shadow: 0 8px 28px var(--shade); }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; color: var(--ink); }
.brand img { width: auto; height: 22px; }
.brand span { position: relative; top: -1px; font: 500 22px/1 var(--serif); letter-spacing: -.01em; }
@media (min-width: 900px) { .brand img { height: 24px; } .brand span { font-size: 26px; top: -2px; } }

.links { display: none; align-items: center; gap: 18px; font-size: 14.5px; padding-top: 3px; }
@media (min-width: 900px) { .links { display: flex; } }
@media (min-width: 1120px) { .links { gap: 24px; font-size: 15px; } }
.links > a, .dd-top { color: var(--ink-2); padding: 4px 0; border-bottom: 1px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s; }
.links > a:hover, .dd-top:hover { color: var(--ink); }
.links > a[aria-current="page"], .dd-top[aria-current="page"] { color: var(--ink); border-bottom-color: var(--orange); }

/* dropdowns: open on hover and keyboard focus with CSS alone; shell.js adds tap-to-open, arrow keys and Escape */
.dd { position: relative; display: inline-flex; }
.dd-top { position: relative; display: inline-flex; align-items: center; }
.dd-top::after { content: ""; position: absolute; left: -16px; right: -16px; top: 100%; height: 26px; } /* the pointer's path to the menu */
.dd-caret { display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .2s var(--ease); }
.dd:hover .dd-caret, .dd:focus-within .dd-caret, .dd.open .dd-caret { transform: translateY(0) rotate(225deg); }
.dd-menu { position: absolute; top: calc(100% + 19px); left: -18px; z-index: var(--z-menu); min-width: 300px; padding: 6px 0; background: var(--paper); border: 1px solid var(--rule); border-top-color: var(--ink); box-shadow: 0 18px 40px var(--shade); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s var(--ease), transform .16s var(--ease), visibility 0s linear .16s; }
.dd:hover .dd-menu, .dd:focus-within .dd-menu, .dd.open .dd-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.dd.shut .dd-menu { opacity: 0; visibility: hidden; }
.dd.shut .dd-caret { transform: translateY(-3px) rotate(45deg); }
.dd-menu a { display: block; padding: 11px 18px 12px; color: var(--ink); white-space: nowrap; }
.dd-menu a + a { border-top: 1px solid var(--rule-2); }
.dd-menu a b { display: block; font: 500 15px/1.3 var(--sans); }
.dd-menu a span { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.dd-menu a:hover, .dd-menu a:focus-visible { background: var(--paper-2); outline-offset: -2px; }
.dd-menu a[aria-current="page"] b { color: var(--orange-ink); }

.nav .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (min-width: 640px) { .nav .right { gap: 10px; } }
@media (min-width: 1120px) { .nav .right { gap: 12px; } }

/* the chain reader: a square that pulses orange on every new block, and the block height in mono */
.status { display: none; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--rule); border-radius: var(--radius); font: 500 12px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
@media (min-width: 640px) { .status { display: inline-flex; } }
.status .dot { position: relative; flex: none; width: 6px; height: 6px; background: var(--faint); }
.status .dot::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--orange); opacity: 0; }
.status.live { color: var(--ink-2); }
.status.live .dot { background: var(--orange); }
.status.pulse .dot::after { animation: blockPulse 1.1s var(--ease) both; }
@keyframes blockPulse { 0% { inset: 0; opacity: .9; } 100% { inset: -6px; opacity: 0; } }
.status.offline { color: var(--down); }
.status.offline .dot { background: var(--down); }
/* when the nav would not fit on one line (shell.js fitNav): first the X link goes (it is in the footer), then the block
   shortens to "#89.0M", and only then the dot stands alone; the block is the live heartbeat, kept while it fits */
.nav.fit-x .right > .xlink { display: none; }
.nav.fit-dot .status .status-text { display: none; }
.nav.fit-dot .status { width: 34px; padding: 0; justify-content: center; }

/* square icon buttons: the X link, the theme toggle, the menu button */
.icon-btn { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; background: transparent; border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink-2); transition: border-color .15s, color .15s, background .15s; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .x-glyph { width: 14px; height: 14px; }
.nav .xlink { display: none; }
@media (min-width: 640px) { .nav .xlink { display: inline-grid; } }
.theme-btn .i-sun { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: block; }
[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (max-width: 399px) { .nav .theme-btn { display: none; } }
.menu-btn { display: inline-grid; }
@media (min-width: 900px) { .menu-btn { display: none; } }
.menu-btn .bars, .menu-btn .bars::before, .menu-btn .bars::after { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .2s var(--ease), opacity .2s; }
.menu-btn .bars { position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; }
.menu-btn .bars::before { top: -5px; } .menu-btn .bars::after { top: 5px; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-5px) rotate(-45deg); }

/* the wallet button: ink when it asks, an address with a square mark when connected */
.wallet-btn .short { display: inline; }
.wallet-btn .long { display: none; }
@media (min-width: 640px) { .wallet-btn .short { display: none; } .wallet-btn .long { display: inline; } }
.wallet-btn.on { background: transparent; color: var(--ink); border-color: var(--rule); font-family: var(--mono); font-size: 13px; gap: 9px; }
.wallet-btn.on:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.wallet-btn.on::before { content: ""; width: 7px; height: 7px; background: var(--up); flex: none; }
.wallet-btn.on.wrong::before { background: var(--warn); }

/* the mobile sheet (built by shell.js from the nav links, under 900px) */
.sheet { position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: calc(var(--z-nav) - 1); overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-top: 1px solid var(--ink); padding: 8px var(--gutter) 40px; opacity: 0; transform: translateY(-6px); transition: opacity .18s var(--ease), transform .18s var(--ease); }
.sheet.open { opacity: 1; transform: none; }
.sheet .s-group { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.sheet .s-top { display: block; padding: 6px 0; font: 400 28px/1.15 var(--serif); color: var(--ink); }
.sheet .s-top[aria-current="page"] { color: var(--orange-ink); font-style: italic; }
.sheet .s-sub { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin-top: 6px; }
.sheet .s-sub a { display: block; padding: 8px 0 8px 14px; border-left: 1px solid var(--rule); }
.sheet .s-sub a b { display: block; font: 500 15px/1.3 var(--sans); color: var(--ink); }
.sheet .s-sub a span { display: block; font-size: 13px; color: var(--muted); }
.sheet .s-sub a[aria-current="page"] { border-left-color: var(--orange); }
.sheet .s-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 20px; }
.sheet .s-foot .status { display: inline-flex; }
.sheet .s-foot .icon-btn { display: inline-grid; }
@media (min-width: 900px) { .sheet { display: none !important; } }
body.sheet-open { overflow: hidden; }

/* ================================================================== 4. dateline */
.dateline { border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--muted); background: var(--nav-bg); }
.dateline > .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.dateline > .wrap > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dateline > .wrap > span:nth-child(2) { display: none; }
.dateline > .wrap > [data-ca] { flex: none; overflow: visible; }
@media (min-width: 900px) { .dateline > .wrap > span:nth-child(2) { display: inline; } }
/* phones: no room for the strapline beside the CA, and an ellipsis on every page reads as a fault: the CA stands alone */
@media (max-width: 639px) { .dateline > .wrap > span:first-child { display: none; } .dateline > .wrap { justify-content: flex-start; } }
.dateline a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 4px; }
.dateline a:hover { color: var(--orange-ink); }

/* ================================================================== 5. hero and page heads */
.hero > .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 44px 48px; align-items: center; }
@media (min-width: 1000px) { .hero > .wrap { grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 48px; padding-block: 64px 60px; } }
.kicker { margin: 0 0 18px; font-size: 15px; color: var(--orange-ink); }
.hero h1, .h1 { font: 400 clamp(42px, 6.4vw, 86px)/.98 var(--serif); letter-spacing: -.022em; margin: 0 0 26px; text-wrap: balance; }
/* the italic word of a headline is display text (24px and up): the display orange, which stays orange in light */
h1 em, h2 em, h3 em, .h1 em { font-style: italic; color: var(--orange-display); }
.lede { font: 400 19px/1.5 var(--serif); color: var(--ink-2); max-width: 32em; margin: 0 0 30px; }
@media (min-width: 900px) { .lede { font-size: 21px; margin-bottom: 34px; } }
.actions { display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap; }

/* the hero yield surface (js/ui/surface.js) */
.surface { position: relative; margin: 0; display: flex; flex-direction: column; min-width: 0; }
.surface canvas { width: 100%; height: clamp(280px, 40vw, 470px); touch-action: pan-y; cursor: crosshair;
  /* paper behind the wireframe, fading out, so the code background stays clear of the curves and the axis labels */
  background: radial-gradient(ellipse 78% 72% at 52% 50%, var(--paper) 62%, transparent 100%); }
.surface canvas:focus-visible { outline-offset: -2px; }
.surface figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; border-top: 1px solid var(--ink); padding-top: 12px; font: italic 400 16px/1.4 var(--serif); color: var(--muted); }
.surface figcaption b { font: normal 500 14px/1.4 var(--sans); color: var(--orange-ink); white-space: nowrap; }
.surface-tip { position: absolute; z-index: 2; pointer-events: none; padding: 7px 10px; background: var(--paper); border: 1px solid var(--rule); border-left: 2px solid var(--orange); font: 500 13px/1.3 var(--sans); color: var(--ink); white-space: nowrap; box-shadow: 0 8px 24px var(--shade); transform: translate(-50%, calc(-100% - 12px)); transition: opacity .12s; }
.surface-tip .mono { font-weight: 500; color: var(--orange-ink); }
.surface-tip[hidden] { display: block !important; opacity: 0; }

/* the heading of an inner page */
.page-head { padding-block: 40px 28px; }
@media (min-width: 900px) { .page-head { padding-block: 56px 36px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; } }
.eyebrow { margin-bottom: 14px; font: italic 400 18px/1.2 var(--serif); color: var(--orange-ink); }
.page-head h1 { font: 400 clamp(38px, 5.2vw, 64px)/1.02 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
/* the lede: a paragraph of the head's first column that is not its eyebrow. :where() keeps the specificity of
   ".page-head p" (0,1,1), so a page's own rule for a paragraph in its head (".bd-head .bd-sk-h1") still wins */
.page-head > :where(div:first-child) > p:where(:not(.eyebrow)) { margin-top: 16px; max-width: 40em; font: 400 19px/1.55 var(--serif); color: var(--ink-2); }
.page-head .eyebrow { margin: 0 0 14px; }
/* the aside: the same small sans note on every page (a date, a source, who is connected) */
.page-head .aside { margin-top: 16px; font: 400 14px/1.5 var(--sans); color: var(--muted); max-width: 24em; }
@media (min-width: 900px) { .page-head .aside { margin-top: 0; text-align: right; } }

/* ================================================================== 6. stats row (figures as a ruled ledger row) */
.band { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--panel); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.band .stats { border: 0; }
.stats .cell { min-width: 0; padding: 20px 14px 18px; border-left: 1px solid var(--rule); }
.stats .cell:nth-child(odd) { border-left: 0; padding-left: 0; }
.stats .cell:nth-child(n+3) { border-top: 1px solid var(--rule); }
/* phones and tablets: two by two; an odd cell out at the end (a strip of three) spans the row instead of leaving a hole */
@media (max-width: 899px) { .stats > .cell:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats .cell, .stats .cell:nth-child(odd) { padding: 28px 28px 24px; border-left: 1px solid var(--rule); border-top: 0; }
  .stats .cell:first-child { border-left: 0; padding-left: 0; }
}
.stats .k { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.stats .v { font: 400 clamp(34px, 4vw, 54px)/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats .v .u { font-size: .5em; letter-spacing: 0; color: var(--muted); margin-left: 3px; }
.stats .v.accent { color: var(--orange-display); } .stats .v.up { color: var(--up); } .stats .v.down { color: var(--down); }
.stats .v.sm { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.15; }
.stats .v.mono { font: 500 clamp(20px, 2.1vw, 28px)/1.35 var(--mono); letter-spacing: 0; }
/* the narrowest phones: two cells a row leave ~115px, so an eleven-character value ("#89,005,381", "15 Oct 2026",
   "Not deployed") would end in an ellipsis; a live number must never be cut */
@media (max-width: 359px) { .stats .v.sm { font-size: 23px; } .stats .v.mono { font-size: 17px; } }
.stats .s { margin-top: 10px; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.source { padding-top: 12px; font-size: 13px; color: var(--muted); }
.source code { font-size: 12px; color: var(--ink-2); }

/* ================================================================== 7. chapters */
.chapter { padding-block: 64px; }
@media (min-width: 900px) { .chapter { padding-block: 104px; } }
.chapter.tight { padding-block: 48px; }
@media (min-width: 900px) { .chapter.tight { padding-block: 72px; } }
.chead { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 36px; }
@media (min-width: 900px) { .chead { grid-template-columns: 280px minmax(0, 1fr); gap: 64px; margin-bottom: 52px; } }
.chead .no { font: italic 400 22px/1 var(--serif); color: var(--orange-ink); border-top: 1px solid var(--ink); padding-top: 14px; }
.chead h2 { font: 400 clamp(32px, 4vw, 52px)/1.04 var(--serif); letter-spacing: -.018em; text-wrap: balance; }
@media (min-width: 900px) { .chead h2 { border-top: 1px solid var(--ink); padding-top: 12px; } }
.chead p { margin-top: 16px; max-width: 36em; font: 400 19px/1.55 var(--serif); color: var(--ink-2); }
.chead .tags { margin-top: 14px; }
/* the row of links that closes a chapter: <div class="after"> as a direct child of the chapter's .wrap (or of the
   chapter itself); .after-links works anywhere. Scoped so a component's own "after" class is left alone. */
:where(.wrap, .chapter, .section) > .after, .after-links { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px 28px; font-size: 15px; }
h2.h2 { font: 400 clamp(30px, 3.4vw, 44px)/1.08 var(--serif); letter-spacing: -.016em; }
h3.h3 { font: 400 26px/1.15 var(--serif); letter-spacing: -.01em; }

/* ================================================================== 8. ledger tables */
.ledger-wrap { position: relative; overflow-x: auto; overscroll-behavior-x: contain; background: var(--panel); -webkit-overflow-scrolling: touch; }
.ledger-wrap.tall { max-height: min(72vh, 680px); overflow: auto; }
.ledger { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.ledger.wide { min-width: 820px; }
.ledger.fit { min-width: 0; }
.ledger caption { caption-side: bottom; padding-top: 12px; text-align: left; font-size: 13px; color: var(--muted); }
.ledger th, .ledger td { padding: 11px 10px; text-align: left; vertical-align: middle; white-space: nowrap; border-bottom: 1px solid var(--rule-2); }
.ledger th:first-child, .ledger td:first-child { padding-left: 0; }
.ledger th:last-child, .ledger td:last-child { padding-right: 0; }
.ledger.boxed th:first-child, .ledger.boxed td:first-child { padding-left: 14px; }
.ledger.boxed th:last-child, .ledger.boxed td:last-child { padding-right: 14px; }
.ledger thead th { position: sticky; top: 0; z-index: 1; background: var(--paper); font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--ink); }
.ledger th .unit { font-weight: 400; color: var(--faint); margin-left: 4px; }
.ledger .num { text-align: right; font-family: var(--mono); font-size: 13.5px; font-variant-numeric: lining-nums tabular-nums; }
.ledger thead .num { font-family: var(--sans); font-size: 13px; }
.ledger td.wrapcell { white-space: normal; min-width: 180px; color: var(--ink-2); }
.ledger td.rank { width: 40px; color: var(--faint); font: 12.5px var(--mono); }
.ledger tbody tr { transition: background-color .25s; }
.ledger tbody tr:hover td { background: var(--hover); }
.ledger tbody tr.sel td { background: var(--orange-soft); }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger tbody tr[data-href] { cursor: pointer; }
.ledger tfoot td { border-top: 1px solid var(--ink); border-bottom: 0; font-weight: 500; }
.ledger tr.empty td { padding: 28px 0; white-space: normal; color: var(--muted); }
.ledger .nm { display: block; font: 500 17px/1.2 var(--serif); color: var(--ink); }
.ledger .nm-s { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.ledger a.nm:hover, .ledger a:hover .nm { color: var(--orange-ink); }
/* the name cell of a ledger row (scoped to table cells, so .way .who and a component's own "who" are left alone) */
:where(td, th) .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* a country or issuer code in a quiet box */
.cc { flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 5px; border: 1px solid var(--rule); font: 500 11px/1 var(--mono); color: var(--ink-2); }
/* sortable headers: <th aria-sort="descending"><button class="sort">10Y</button></th> */
.sort { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.sort:hover { color: var(--ink); }
@media (pointer: coarse) { .sort { min-height: 32px; } }
th[aria-sort] .sort { color: var(--ink); }
th[aria-sort="descending"] .sort::after { content: " \2193"; color: var(--orange-ink); }
th[aria-sort="ascending"] .sort::after { content: " \2191"; color: var(--orange-ink); }
/* a small inline bar inside a cell (a share, a real yield): <span class="cellbar up" style="--w:42%"></span> */
.cellbar { display: inline-block; vertical-align: middle; width: 64px; height: 4px; background: var(--rule-2); position: relative; margin-left: 10px; }
.cellbar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--ink-2); }
.cellbar.up::after { background: var(--up); } .cellbar.down::after { background: var(--down); } .cellbar.accent::after { background: var(--orange); }
/* rows that print like a terminal on first view (shell.js printRows) */
@keyframes printIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes printUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.printing > td, tr.printing > td { animation: printIn .42s steps(3, jump-end) both; animation-delay: calc(var(--i, 0) * 32ms); }
.printing:not(tr) { animation: printUp .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 32ms); }
@keyframes rowFlash { from { background: var(--orange-soft); } to { background: transparent; } }
tr.flash > td { animation: rowFlash 2.4s ease-out both; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--ink); font-size: 14px; color: var(--muted); }

/* the toolbar above a ledger: tabs or a segmented control on the left, a search field on the right */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 12px 0; border-bottom: 1px solid var(--rule-2); }
.toolbar .grow { flex: 1 1 auto; }
.toolbar .search { width: 100%; }
@media (min-width: 640px) { .toolbar .search { width: 240px; margin-left: auto; } }

/* ================================================================== 9. tabs and segmented control */
.tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--rule); }
.tabs::-webkit-scrollbar { display: none; }
/* a row that scrolls sideways (tabs, a filter's segments) says so: the edge with more behind it fades out. shell.js
   edgeFade() (initTabs calls it) sets .fade-l / .fade-r only while the row overflows, so a row that fits is untouched */
.fade-r { -webkit-mask-image: linear-gradient(90deg, black calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, black calc(100% - 44px), transparent); }
.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, black 28px); mask-image: linear-gradient(90deg, transparent, black 28px); }
.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent 0, black 28px, black calc(100% - 44px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, black 28px, black calc(100% - 44px), transparent 100%); }
@media (max-width: 639px) { .tabs { scroll-padding-inline: 16px; padding-right: 28px; } }
.tabs [role="tab"], .tabs > a { flex: none; position: relative; display: inline-flex; align-items: baseline; gap: 7px; padding: 12px 0 11px; border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; background: none; font: 500 15px/1.2 var(--sans); color: var(--muted); white-space: nowrap; cursor: pointer; }
.tabs [role="tab"]:hover, .tabs > a:hover { color: var(--ink); }
.tabs [aria-selected="true"], .tabs > a[aria-current] { color: var(--ink); border-bottom-color: var(--orange); }
.tabs .n { font: 400 12px var(--mono); color: var(--faint); }
.tabs.serif { gap: 28px; border-bottom-color: var(--ink); }
.tabs.serif [role="tab"], .tabs.serif > a { font: 400 22px/1.15 var(--serif); padding: 14px 0 12px; }
.tabs.serif [aria-selected="true"], .tabs.serif > a[aria-current] { font-style: italic; color: var(--orange-ink); border-bottom-color: var(--orange); border-bottom-width: 2px; margin-bottom: -1px; }
@media (min-width: 900px) {
  .tabs.serif [role="tab"], .tabs.serif > a { font-size: 26px; }
  /* 26px is display size: the chosen book takes the display orange, like the italic word in a headline */
  .tabs.serif [aria-selected="true"], .tabs.serif > a[aria-current] { color: var(--orange-display); }
}
[role="tabpanel"]:focus-visible { outline-offset: 6px; }

/* a segmented control: <div class="seg" role="group"> of aria-pressed buttons. Scoped to the grouping roles, with :where()
   so the specificity stays that of .seg, and a component's own "seg" class (a timeline segment) is left alone. */
.seg:where([role="group"], [role="radiogroup"], [role="toolbar"]) { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); }
.seg:where([role="group"], [role="radiogroup"], [role="toolbar"]) button { padding: 7px 12px; border: 0; background: none; font: 500 13.5px/1 var(--sans); color: var(--muted); white-space: nowrap; }
.seg:where([role="group"], [role="radiogroup"], [role="toolbar"]) button + button { border-left: 1px solid var(--rule); }
.seg:where([role="group"], [role="radiogroup"], [role="toolbar"]) button:hover { color: var(--ink); }
.seg:where([role="group"], [role="radiogroup"], [role="toolbar"]) button[aria-pressed="true"], .seg:where([role="group"], [role="radiogroup"], [role="toolbar"]) button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.seg.mono:where([role="group"], [role="radiogroup"], [role="toolbar"]) button { font-family: var(--mono); font-size: 12.5px; }

/* ================================================================== 10. cards and panels */
.ways { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--ink); background: var(--panel); }
.way { padding: 26px 0; border-bottom: 1px solid var(--rule); min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.way:last-child { border-bottom: 0; }
@media (min-width: 900px) {
  .ways { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ways.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .way { padding: 34px 32px 38px 0; border-bottom: 0; border-right: 1px solid var(--rule); }
  .way + .way { padding-left: 32px; }
  .way:last-child { border-right: 0; }
}
.way .who { font-size: 14px; color: var(--muted); }
.way h3 { margin: 10px 0 14px; font: 400 32px/1.08 var(--serif); letter-spacing: -.012em; }
.way p { margin-bottom: 22px; color: var(--ink-2); }
.way ul { width: 100%; margin: 0 0 24px; list-style: none; font-size: 15px; }
.way li { padding: 8px 0; border-top: 1px dotted var(--rule); color: var(--ink-2); }
.way li b { font-weight: 500; color: var(--ink); }
.way .btn { margin-top: auto; }
.way .link.sm { margin-top: 14px; }

.panel { min-width: 0; background: var(--panel); border: 1px solid var(--rule); border-top-color: var(--ink); }
.panel-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.panel-h h3, .panel-h h2 { font: 400 24px/1.15 var(--serif); letter-spacing: -.01em; }
.panel-h .sub { font-size: 14px; }
.panel-h > :last-child:not(:first-child) { margin-left: auto; }
.panel-b { padding: 18px; }
.panel-b.flush { padding: 0; }
.panel-f { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--rule-2); }
.panel.flat { border: 0; border-top: 1px solid var(--ink); }
.panel.flat .panel-h, .panel.flat .panel-b, .panel.flat .panel-f { padding-inline: 0; }

/* a clickable tile (a bond series, an asset) */
.card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px; background: var(--panel); border: 1px solid var(--rule); transition: border-color .15s; }
a.card:hover, .card.link:hover { border-color: var(--ink); }
.card .card-k { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.card h3 { font: 400 24px/1.12 var(--serif); letter-spacing: -.01em; }
.card .card-v { font: 400 34px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* label: value rows (bond terms, an account) */
.kv { display: grid; grid-template-columns: minmax(0, 1fr); }
.kv > div { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule-2); font-size: 14.5px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt, .kv .k { color: var(--muted); }
.kv dd, .kv .v { margin: 0; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.kv .v.mono, .kv dd.mono { font-size: 13.5px; }
dl.kv { margin: 0; }
/* the editorial version: a label on the left, a serif statement on the right */
.terms { border-top: 1px solid var(--ink); background: var(--panel); }
.terms > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 640px) { .terms > div { grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 18px 0; } }
.terms span { font-size: 14px; color: var(--muted); }
.terms b { font: 400 21px/1.3 var(--serif); }

/* ================================================================== 11. tags and status marks: a word with a square, never a pill */
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 7px; font: 500 12.5px/1.2 var(--sans); color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.tag::before { content: ""; flex: none; width: 7px; height: 7px; background: currentColor; }
.tag.live { color: var(--orange-ink); }
/* the live square beats once when a value under it is rewritten (shell.js adds .tick and takes it off when the beat
   ends); the nav's block dot is the only heartbeat that never stops */
.tag.live.tick::before { animation: livePulse 1.2s ease-in-out 1; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 45% { opacity: .3; } }
.tag.indicative, .tag.soon { color: var(--muted); }
.tag.indicative::before, .tag.soon::before { background: transparent; border: 1px solid currentColor; }
.tag.verified { color: var(--up); }
.tag.verified::before { width: 9px; height: 9px; background: none; border: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg) scale(.7, 1); }
.tag.sale { color: var(--orange-ink); }
.tag.active { color: var(--ink-2); }
.tag.repaid { color: var(--up); }
.tag.grace { color: var(--warn); }
.tag.defaulted { color: var(--down); }
.tag.up { color: var(--up); } .tag.down { color: var(--down); } .tag.warn { color: var(--warn); }
/* boxed: the same mark with a hairline frame, for a status that must stand out in a busy row */
.tag.box { padding: 3px 7px 3px 6px; border: 1px solid currentColor; border-radius: var(--radius); }
.tag.plain::before { display: none; }

/* ================================================================== 12. buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 12px 18px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--panel); color: var(--ink); font: 500 15px/1 var(--sans); white-space: nowrap; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.btn.primary:hover { background: var(--orange-2); border-color: var(--orange-2); color: var(--on-orange); }
.btn.ink { background: var(--ink); color: var(--paper); }
.btn.ink:hover { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); border-color: var(--rule); color: var(--ink); }
.btn.danger { border-color: var(--down); color: var(--down); }
.btn.danger:hover { background: var(--down); color: var(--paper); }
.btn.sm { min-height: 34px; padding: 8px 13px; font-size: 14px; }
.btn.lg { min-height: 52px; padding: 16px 24px; font-size: 16px; }
.btn.block { display: flex; width: 100%; }
.btn .arr { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
/* disabled: the label says why ("Connect a wallet"), so it stays readable (muted on paper-2: 6.5:1 dark, 4.9:1 light) */
.btn:disabled, .btn[aria-disabled="true"], .btn:disabled:hover { opacity: 1; cursor: not-allowed; background: var(--paper-2); color: var(--muted); border: 1px solid var(--rule); }
.btn.primary:disabled, .btn.primary:disabled:hover { background: var(--paper-3); color: var(--ink-2); border-color: var(--rule); }
.btn:disabled .arr { transform: none; }
/* busy: a short rule that runs under the label while a wallet or the chain works */
.btn.busy { position: relative; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 6px; height: 1px; background: currentColor; transform-origin: left; animation: busyRun 1.1s var(--ease) infinite; }
@keyframes busyRun { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@media (pointer: coarse) { .btn.sm { min-height: 40px; } }

.link { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--rule); transition: color .15s, text-decoration-color .15s; }
.link:hover { color: var(--orange-ink); text-decoration-color: currentColor; }
.link.sm { font-size: 14px; color: var(--muted); }
.link.sm:hover { color: var(--ink); }
.link.muted { color: var(--muted); font-weight: 400; }
a.ext::after { content: "\00a0\2197"; }
.prose a, a.inline { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--field-edge); }
.prose a:hover, a.inline:hover { color: var(--orange-ink); text-decoration-color: currentColor; }
.txlink { font: 13px var(--mono); color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.txlink:hover { color: var(--orange-ink); }
.addr { font-family: var(--mono); font-size: .92em; overflow-wrap: anywhere; }

/* ================================================================== 13. form fields */
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; min-width: 0; }
.field-k { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink); }
.field-k .sub { font-weight: 400; font-size: 13px; }
.input { display: flex; align-items: stretch; min-width: 0; background: var(--field); border: 1px solid var(--field-edge); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.input:focus-within { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.input input, .input select, .input textarea { flex: 1 1 auto; min-width: 0; padding: 12px 12px; border: 0; background: transparent; color: var(--ink); font: 400 15px/1.3 var(--sans); outline: none; border-radius: 0; }
.input.num input { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; }
.input.lg input { padding-block: 15px; font-size: 22px; font-family: var(--serif); }
.input.lg.num input { font-family: var(--mono); font-size: 19px; }
.input .unit { display: flex; align-items: center; padding: 0 12px; border-left: 1px solid var(--rule); font: 500 13px var(--mono); color: var(--muted); white-space: nowrap; }
.input .max { padding: 0 12px; border: 0; border-left: 1px solid var(--rule); background: none; font: 500 13px var(--sans); color: var(--orange-ink); cursor: pointer; }
.input .max:hover { background: var(--orange-soft); }
.input input::placeholder, .input textarea::placeholder { color: var(--faint); opacity: 1; }
.input:has(input:disabled) { background: var(--paper-2); }
.input input:disabled { cursor: not-allowed; color: var(--muted); }
.input textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
/* select: the native control with a drawn caret */
.input.select { position: relative; }
.input.select select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.input.select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.input.select select option { background: var(--paper); color: var(--ink); }
.help { font-size: 13px; line-height: 1.45; color: var(--muted); }
.err { display: none; font-size: 13px; line-height: 1.45; color: var(--down); }
.field.invalid .input { border-color: var(--down); box-shadow: inset 0 0 0 1px var(--down); }
.field.invalid .err { display: block; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 640px) { .fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* a bare input outside .input (search boxes) */
input.plain, .search { width: 100%; padding: 10px 12px; background: var(--field); border: 1px solid var(--field-edge); border-radius: var(--radius); color: var(--ink); font: 400 14px var(--sans); outline: none; }
input.plain:focus, .search:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
input.plain::placeholder, .search::placeholder { color: var(--faint); opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--orange); width: 16px; height: 16px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
/* range: a hairline track and a square orange thumb */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--orange) 0 var(--fill, 0%), var(--rule) var(--fill, 0%) 100%); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--rule); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--orange); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; background: var(--orange); border: 2px solid var(--paper); outline: 1px solid var(--orange); border-radius: 1px; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; background: var(--orange); border: 2px solid var(--paper); border-radius: 1px; }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--orange-ink); outline-offset: 2px; }

/* ================================================================== 14. transaction steps */
.steps { display: grid; grid-template-columns: minmax(0, 1fr); list-style: none; counter-reset: step; }
.steps > li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding: 12px 0; counter-increment: step; color: var(--muted); }
.steps > li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--rule); font: italic 400 16px/1 var(--serif); color: var(--muted); background: var(--paper); position: relative; z-index: 1; }
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 40px; bottom: -12px; width: 1px; background: var(--rule); }
.steps b { display: block; font: 500 15px/1.35 var(--sans); color: var(--ink-2); }
.steps .sub { display: block; margin-top: 2px; font-size: 13.5px; }
.steps .txlink { display: inline-block; margin-top: 4px; }
.steps > li[data-state="active"]::before { border-color: var(--orange); color: var(--orange-ink); animation: stepPulse 1.6s ease-in-out infinite; }
.steps > li[data-state="active"] b { color: var(--ink); }
@keyframes stepPulse { 0%, 100% { box-shadow: 0 0 0 0 var(--orange-soft); } 50% { box-shadow: 0 0 0 5px var(--orange-soft); } }
.steps > li[data-state="done"]::before { content: "\2713"; background: var(--up); border-color: var(--up); color: var(--paper); font: 600 14px/1 var(--sans); }
.steps > li[data-state="done"] b { color: var(--ink); }
.steps > li[data-state="done"]:not(:last-child)::after { background: var(--up); }
.steps > li[data-state="error"]::before { content: "!"; font: 600 14px/1 var(--sans); border-color: var(--down); color: var(--down); background: var(--down-soft); }
.steps > li[data-state="error"] b { color: var(--down); }
.steps > li[data-state="error"] .sub { color: var(--ink-2); }
.steps > li[data-state="skipped"] { opacity: .55; }
.steps > li[data-state="skipped"]::before { content: "\2013"; }

/* ================================================================== 15. overlays: modal, drawer (shell.js owns focus) */
#overlay-root { position: relative; z-index: var(--z-overlay); }
.scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .2s var(--ease); }
.ov-open .scrim { opacity: 1; }
.modal, .drawer { position: fixed; display: flex; flex-direction: column; max-height: 100%; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); box-shadow: 0 30px 80px var(--shade); outline: none; }
.modal { left: 0; right: 0; bottom: 0; max-height: 90vh; max-height: 90dvh; border-width: 1px 0 0; opacity: 0; transform: translateY(16px); transition: opacity .2s var(--ease), transform .24s var(--ease); }
@media (min-width: 640px) {
  .modal { left: 50%; top: 50%; right: auto; bottom: auto; width: min(480px, calc(100vw - 48px)); max-height: min(720px, calc(100vh - 64px)); border-width: 1px; transform: translate(-50%, calc(-50% + 12px)); }
  .modal.wide { width: min(640px, calc(100vw - 48px)); }
  .ov-open .modal { transform: translate(-50%, -50%); }
}
.ov-open .modal { opacity: 1; transform: none; }
@media (min-width: 640px) { .ov-open .modal { transform: translate(-50%, -50%); } }
.drawer { top: 0; right: 0; bottom: 0; width: min(460px, 100vw); border-width: 0 0 0 1px; transform: translateX(100%); transition: transform .28s var(--ease); }
.ov-open .drawer { transform: none; }
.ov-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 16px; border-bottom: 1px solid var(--rule); }
.ov-title { font: 400 26px/1.1 var(--serif); letter-spacing: -.01em; }
.ov-title em { font-style: italic; color: var(--orange-display); }
.ov-close { margin-left: auto; }
.ov-close svg { width: 14px; height: 14px; }
.ov-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 20px; }
.ov-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--rule); }
.ov-foot .btn { flex: 1 1 auto; }
body.ov-lock { overflow: hidden; }

/* the wallet list and the account panel (shell.js) */
.wallets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.wallet-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); font: 500 15px var(--sans); text-align: left; transition: border-color .15s, background .15s; }
.wallet-opt:hover { border-color: var(--ink); }
.wallet-opt img, .wallet-opt .wi { width: 28px; height: 28px; flex: none; border-radius: 4px; }
.wallet-opt .wi { display: grid; place-items: center; background: var(--paper-3); font: 500 12px var(--mono); color: var(--muted); }
.wallet-opt .go { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 400; }
.wallet-opt.busy .go { color: var(--orange-ink); }
.ov-note { margin-top: 16px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.ov-err { margin-top: 12px; font-size: 14px; color: var(--down); }
.acct-addr { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--paper-2); border: 1px solid var(--rule); font: 13px/1.5 var(--mono); overflow-wrap: anywhere; }
.acct-addr code { flex: 1 1 auto; min-width: 0; }
.acct-bal-h { margin-top: 18px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.acct-bal { margin-top: 2px; }
.acct-bal .v { font-family: var(--mono); }

/* banners: wrong chain, protocol not deployed, paused token */
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; border: 1px solid var(--rule); border-left: 2px solid var(--muted); background: var(--panel); font-size: 14px; color: var(--ink-2); }
.banner b { color: var(--ink); font-weight: 500; }
.banner .btn { margin-left: auto; }
.banner.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.banner.error { border-left-color: var(--down); background: var(--down-soft); }
.banner.info { border-left-color: var(--orange); }
.banner.ok { border-left-color: var(--up); }

/* ================================================================== 16. toasts */
.toasts { position: fixed; z-index: var(--z-toast); left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (min-width: 640px) { .toasts { left: auto; right: 24px; bottom: 24px; width: 380px; } }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; background: var(--paper-2); border: 1px solid var(--rule); border-left: 2px solid var(--muted); box-shadow: 0 14px 36px var(--shade); font-size: 14px; line-height: 1.45; color: var(--ink); animation: toastIn .28s var(--ease) both; }
.toast.ok { border-left-color: var(--up); }
.toast.error { border-left-color: var(--down); }
.toast.info { border-left-color: var(--orange); }
.toast .t-body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.toast a { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.toast a:hover { color: var(--orange-ink); }
.toast .t-x { flex: none; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--muted); }
.toast .t-x:hover { color: var(--ink); }
.toast .t-x svg { width: 11px; height: 11px; }
.toast.out { animation: toastOut .22s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* ================================================================== 17. token CA: the strip (full) and the dateline control (compact) */
.ca { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "k a" "acts acts"; max-width: 640px; background: var(--paper-2); border: 1px solid var(--ink); }
.ca .ca-k { grid-area: k; display: flex; align-items: center; padding: 13px 14px; border-right: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.ca code { grid-area: a; display: flex; align-items: center; min-width: 0; padding: 13px 14px; font: 13px/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.ca .ca-acts { grid-area: acts; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.ca .ca-acts > * { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; border-left: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink-2); font: 500 14px var(--sans); white-space: nowrap; }
.ca .ca-acts > :first-child { border-left: 0; }
.ca .ca-acts > :hover { background: var(--hover); color: var(--ink); }
.ca .ca-acts .ca-buy { background: var(--orange); color: var(--on-orange); }
.ca .ca-acts .ca-buy:hover { background: var(--orange-2); color: var(--on-orange); }
.ca .ca-acts [disabled], .ca .ca-acts [aria-disabled="true"] { cursor: not-allowed; color: var(--faint); background: transparent; }
.ca .ca-acts .ca-buy[disabled], .ca .ca-acts .ca-buy[aria-disabled="true"] { background: var(--paper-3); color: var(--muted); }
.ca.soon code { color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 17px; user-select: none; }
.ca-c { display: inline-flex; align-items: center; gap: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ca-c .ca-k { padding-right: 8px; color: var(--muted); }
.ca-c code { padding-right: 10px; font: 12.5px var(--mono); color: var(--ink-2); }
.ca-c.soon code { font: italic 14px var(--serif); color: var(--ink-2); }
.ca-c button, .ca-c a { padding: 3px 8px; border: 0; border-left: 1px solid var(--rule); background: none; font: 500 12.5px var(--sans); color: var(--ink-2); cursor: pointer; }
.ca-c button:hover, .ca-c a:hover { color: var(--orange-ink); }
.ca-c button[disabled] { color: var(--faint); cursor: not-allowed; }
.ca-c .ca-buy:not([disabled]) { color: var(--orange-ink); }
@media (pointer: coarse) { .ca-c button, .ca-c a { min-height: 32px; padding: 6px 10px; } }

/* ================================================================== 18. loading, empty, unavailable */
@keyframes skShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk { display: inline-block; min-width: 3.4em; height: 1em; vertical-align: middle; color: transparent !important; background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper-3) 50%, var(--paper-2) 75%); background-size: 200% 100%; animation: skShimmer 1.5s linear infinite; border-radius: 1px; }
.sk > * { visibility: hidden; }
.sk.wide { min-width: min(100%, 14em); }
.sk.block { display: block; width: 100%; }
.sk.v { height: .8em; min-width: 2.6em; }
tbody.sk-rows td { padding-block: 14px; }
tbody.sk-rows .sk { width: 100%; min-width: 2em; }

.empty { padding: 36px 0; text-align: left; max-width: 34em; }
.empty .e-t { font: italic 400 22px/1.3 var(--serif); color: var(--ink-2); }
.empty .e-s { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.empty .actions { margin-top: 18px; }
.empty.center { margin-inline: auto; text-align: center; }
.empty.center .actions { justify-content: center; }

/* small print, notes and the honesty copy near an action */
/* the honesty sentences near an action: on paper, so they are the calmest text on the page */
.note { padding: 12px 14px; border-left: 1px solid var(--rule); background: var(--panel); font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.note b { color: var(--ink-2); font-weight: 500; }
.note.warn { border-left-color: var(--warn); }
.fine { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.asof { font-size: 13px; color: var(--muted); }
.asof time { color: var(--ink-2); }

/* allocation bar (the shield's split) */
.alloc { display: flex; height: 10px; overflow: hidden; background: var(--rule-2); gap: 2px; }
.alloc > i { display: block; height: 100%; flex: none; width: var(--w, 0%); background: var(--orange); transition: width .5s var(--ease); }
.alloc > i:nth-child(2) { background: var(--ink-2); } .alloc > i:nth-child(3) { background: var(--muted); } .alloc > i:nth-child(4) { background: var(--orange-2); opacity: .55; } .alloc > i:nth-child(5) { background: var(--faint); }
.alloc-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.alloc-key span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 0; background: var(--orange); }
.alloc-key span:nth-child(2)::before { background: var(--ink-2); } .alloc-key span:nth-child(3)::before { background: var(--muted); } .alloc-key span:nth-child(4)::before { background: var(--orange-2); opacity: .55; } .alloc-key span:nth-child(5)::before { background: var(--faint); }

/* ================================================================== 19. long-form text (learn) */
/* long text: no slab behind it (a borderless translucent block reads as a glitch); the code background is masked
   down under the reading column, so a paragraph stays calm on the page itself */
.prose { max-width: 40em; font: 400 18px/1.62 var(--serif); color: var(--ink-2); }
.prose > * + * { margin-top: 14px; }
.prose h2 { margin-top: 44px; font: 400 32px/1.1 var(--serif); letter-spacing: -.014em; color: var(--ink); }
.prose h3 { margin-top: 30px; font: 500 21px/1.25 var(--serif); color: var(--ink); }
.prose b, .prose strong { color: var(--ink); font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--orange-ink); }
.prose code { font-size: .8em; padding: 1px 5px; background: var(--paper-2); border: 1px solid var(--rule-2); color: var(--ink); }
pre.code { margin: 0; padding: 16px 18px; overflow-x: auto; background: var(--paper-2); border: 1px solid var(--rule-2); font: 13px/1.7 var(--mono); color: var(--ink-2); white-space: pre; }
pre.code .cm { color: var(--faint); } pre.code .k { color: var(--orange-ink); }
/* questions: <details class="faq"><summary>…</summary><div>…</div></details> */
.faq { border-bottom: 1px solid var(--rule); }
.faq summary { display: flex; gap: 14px; align-items: baseline; padding: 16px 0; cursor: pointer; list-style: none; font: 400 21px/1.3 var(--serif); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; flex: none; width: 14px; font: 400 18px/1 var(--mono); color: var(--orange-ink); }
.faq[open] summary::before { content: "\2212"; }
.faq summary:hover { color: var(--orange-ink); }
.faq > div { padding: 0 0 18px 28px; color: var(--ink-2); max-width: 42em; }
.faq > div > * + * { margin-top: 10px; }

/* ================================================================== 20. charts (js/ui/charts.js) */
.chart { position: relative; width: 100%; min-width: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 400 11px var(--mono); fill: var(--faint); }
.chart .ch-grid { stroke: var(--rule-2); stroke-width: 1; shape-rendering: crispEdges; }
.chart .ch-axis { stroke: var(--rule); stroke-width: 1; shape-rendering: crispEdges; }
.chart .ch-zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; shape-rendering: crispEdges; }
.chart .ch-line { fill: none; stroke: var(--orange); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ch-line.s1 { stroke: var(--ink-2); stroke-width: 1.5; }
.chart .ch-line.s2 { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .ch-line.s3 { stroke: var(--up); stroke-width: 1.5; }
.chart .ch-line.s4 { stroke: var(--warn); stroke-width: 1.5; }
.chart .ch-line.dim { opacity: .3; }
.chart .ch-area { fill: var(--orange); opacity: .08; stroke: none; }
.chart .ch-dot { fill: var(--paper); stroke: var(--orange); stroke-width: 1.6; }
.chart .ch-dot.s1 { stroke: var(--ink-2); } .chart .ch-dot.s2 { stroke: var(--muted); } .chart .ch-dot.s3 { stroke: var(--up); } .chart .ch-dot.s4 { stroke: var(--warn); }
.chart .ch-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; shape-rendering: crispEdges; }
.chart .ch-bar { fill: var(--ink-2); }
.chart .ch-bar.up { fill: var(--up); } .chart .ch-bar.down { fill: var(--down); } .chart .ch-bar.accent { fill: var(--orange); } .chart .ch-bar.ink { fill: var(--ink-2); }
.chart .ch-row:hover .ch-bar, .chart .ch-row.on .ch-bar { opacity: .75; }
.chart .ch-row:hover text.ch-name, .chart .ch-row.on text.ch-name { fill: var(--ink); }
.chart text.ch-name { font: 400 12.5px var(--sans); fill: var(--ink-2); }
.chart text.ch-val { font: 500 11.5px var(--mono); fill: var(--ink-2); }
.chart text.ch-val.up { fill: var(--up); } .chart text.ch-val.down { fill: var(--down); } .chart text.ch-val.accent { fill: var(--orange-ink); } .chart text.ch-val.ink { fill: var(--ink-2); }
.chart text.ch-lab { font: 500 11.5px var(--sans); fill: var(--ink-2); }
.chart .ch-hit { fill: transparent; }
.ch-card { position: absolute; z-index: 2; top: 0; pointer-events: none; min-width: 140px; padding: 8px 10px; background: var(--paper); border: 1px solid var(--rule); border-left: 2px solid var(--orange); box-shadow: 0 8px 24px var(--shade); font-size: 13px; line-height: 1.45; color: var(--ink-2); white-space: nowrap; }
.ch-card b { display: block; font-weight: 500; color: var(--ink); }
.ch-card .mono { color: var(--ink); }
.ch-card i { display: inline-block; width: 8px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--orange); }
.ch-card i.s1 { background: var(--ink-2); } .ch-card i.s2 { background: var(--muted); } .ch-card i.s3 { background: var(--up); } .ch-card i.s4 { background: var(--warn); }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.ch-legend span::before { content: ""; display: inline-block; width: 12px; height: 2px; margin-right: 7px; vertical-align: middle; background: var(--orange); }
.ch-legend .s1::before { background: var(--ink-2); } .ch-legend .s2::before { background: var(--muted); } .ch-legend .s3::before { background: var(--up); } .ch-legend .s4::before { background: var(--warn); }
.spark { display: inline-block; vertical-align: middle; overflow: visible; }
.spark .ch-line { fill: none; stroke: var(--orange); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark .ch-line.up { stroke: var(--up); } .spark .ch-line.down { stroke: var(--down); } .spark .ch-line.ink { stroke: var(--ink-2); }
.spark .ch-area { fill: var(--orange); opacity: .1; }
.spark .ch-area.up { fill: var(--up); } .spark .ch-area.down { fill: var(--down); } .spark .ch-area.ink { fill: var(--ink-2); }
.spark .ch-end { fill: var(--orange); }
.spark .ch-end.up { fill: var(--up); } .spark .ch-end.down { fill: var(--down); }

/* ================================================================== 21. footer */
.foot { margin-top: 0; padding: 44px 0 28px; border-top: 1px solid var(--ink); background: var(--nav-bg); font-size: 14px; color: var(--muted); }
.foot > .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.foot .f-brand { grid-column: 1 / -1; }
@media (min-width: 640px) { .foot > .wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .foot > .wrap { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; } .foot .f-brand { grid-column: auto; } }
.foot .brand span { font-size: 22px; }
.foot .brand img { height: 20px; }
.foot p { margin-top: 14px; max-width: 32em; line-height: 1.55; }
.foot h4 { margin: 0 0 12px; font: 500 14px var(--sans); color: var(--ink); }
.foot nav a, .foot .f-col a { display: flex; align-items: center; gap: 8px; width: fit-content; padding: 4px 0; color: var(--muted); }
.foot nav a:hover, .foot .f-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.foot .x-glyph { width: 13px; height: 13px; }
.foot .f-bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 13px; }
.foot [data-chain-foot] { font-family: var(--mono); font-size: 12px; }

/* ================================================================== 22. not found (404.html) */
.notfound { padding-block: 80px 120px; }
.notfound .no { font: italic 400 22px/1 var(--serif); color: var(--orange-ink); margin-bottom: 18px; }
.notfound h1 { font: 400 clamp(40px, 6vw, 76px)/1 var(--serif); letter-spacing: -.02em; max-width: 14em; }
.notfound p { margin-top: 18px; max-width: 34em; font: 400 19px/1.55 var(--serif); color: var(--ink-2); }
.notfound .actions { margin-top: 30px; }
.notfound code { font-size: .8em; color: var(--ink); }

/* ================================================================== 23. motion: reveals (shell.js adds html.reveal-ready only when motion is allowed) */
.reveal-ready [data-reveal]:not(.in) { opacity: 0; transform: translateY(10px); }
.reveal-ready [data-reveal] { transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.reveal-ready [data-reveal="rows"]:not(.in) { transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .001ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .reveal-ready [data-reveal]:not(.in) { opacity: 1; transform: none; }
  .tag.live::before, .tag.live.tick::before, .sk { animation: none !important; }
}

/* the issuer of an OpenBonds series (js/ui/issuer.js): a short address in mono, or "OpenBonds Lab" for the factory
   owner; either way a link to the explorer with the full address in its title */
.iss-link { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.iss-link:not(.lab) { font-family: var(--mono); }
.iss-link.lab { font-family: var(--sans); font-weight: 500; color: var(--ink); }
.iss-link:hover { color: var(--orange-ink); }

/* ================================================================== 24. Strategy accents (the Strategy book and the landing)
   The bitcoin mark: the ₿ glyph (Schibsted Grotesk carries it) in a small orange-ruled square, the same square as the
   marks of a .tag, set before a Strategy heading. Text, never a logo: <span class="btc" aria-hidden="true">₿</span> */
.btc { display: inline-grid; place-items: center; width: 1.12em; height: 1.12em; margin-right: .32em; border: 1px solid var(--orange); border-radius: var(--radius); font: 500 .66em/1 var(--sans); font-style: normal; color: var(--orange-ink); vertical-align: .16em; letter-spacing: 0; }
h2 .btc, h3 .btc { font-size: .5em; vertical-align: .32em; }

/* the credit stack (js/ui/stack.js): rungs from the most senior claim down to MSTR, the bitcoin as the base */
.cstack { position: relative; width: 100%; min-width: 0; margin: 0; }
.cstack svg { display: block; width: 100%; height: auto; overflow: visible; }
.cstack text { font: 400 11px var(--mono); fill: var(--faint); }
.cstack .st-hit { fill: transparent; }
.cstack .st-rule { stroke: var(--rule-2); stroke-width: 1; shape-rendering: crispEdges; }
.cstack text.st-tk { font: 500 12.5px var(--mono); fill: var(--ink); }
.cstack text.st-tk.btc { font-family: var(--sans); fill: var(--orange-ink); }
.cstack text.st-nm { font: 400 11.5px var(--sans); fill: var(--muted); }
.cstack text.st-v { font: 500 12.5px var(--mono); fill: var(--ink); }
.cstack text.st-v.mute { font: 400 12px var(--sans); fill: var(--muted); }
.cstack text.st-sub { font: 400 11px var(--mono); fill: var(--muted); }
.cstack text.st-in { font: 400 11px var(--sans); fill: var(--muted); }
.cstack .st-lead { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 1 3; }
.cstack .st-bar { fill: var(--ink-2); }
.cstack .st-bar.debt { fill: var(--ink); }
.cstack .st-bar.pref { fill: var(--ink-2); opacity: .78; }
.cstack .st-bar.equity { fill: var(--paper-3); stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.cstack .st-row.pref:nth-of-type(even) .st-bar.pref { opacity: .62; }
.cstack .st-row:hover .st-bar, .cstack .st-row.on .st-bar { opacity: 1; fill: var(--orange-2); }
.cstack .st-row:hover .st-bar.equity, .cstack .st-row.on .st-bar.equity { fill: var(--orange-soft); stroke: var(--orange); }
.cstack .st-row:hover text.st-tk, .cstack .st-row.on text.st-tk { fill: var(--orange-ink); }
.cstack .st-btc { fill: var(--orange); }
.cstack text.st-btc-t { font: 500 11px var(--mono); fill: var(--on-orange); }
.cstack .st-cov { stroke: var(--orange); stroke-width: 1; stroke-dasharray: 4 3; }
.cstack text.st-cov-t { font: 500 11.5px var(--sans); fill: var(--ink-2); }
.cstack text.st-cov-s { font: 400 11px var(--mono); fill: var(--orange-ink); }
.cstack text.st-ax { font: 400 11px var(--mono); fill: var(--faint); }
/* a claim's face amount beside its bar: a paper halo keeps it legible where it crosses the dashed coverage line */
.cstack text.st-amt { font: 400 11px var(--mono); fill: var(--muted); paint-order: stroke; stroke: var(--paper-2); stroke-width: 3px; stroke-linejoin: round; }
.cstack tspan.st-est { font: 400 10.5px var(--sans); fill: var(--muted); }
.cstack .st-cap { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
/* the bars grow in once, on first view (js/ui/stack.js removes .st-wait; never under reduced motion) */
.cstack .st-bar, .cstack .st-btc { transform-box: fill-box; transform-origin: left center; transition: transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.cstack .st-base .st-btc { transition-delay: 0ms; }
.cstack.st-wait .st-bar, .cstack.st-wait .st-btc { transform: scaleX(0); }

/* the coverage meter: how many times the bitcoin covers debt and preferred, on a 0 to 5x rule with a mark at 1x */
.cov-meter { position: relative; display: block; height: 6px; margin-top: 12px; background: var(--rule-2); }
.cov-meter > i { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--orange); transition: width 1s var(--ease); }
.cov-meter > b { position: absolute; top: -3px; bottom: -3px; left: var(--at, 20%); width: 1px; background: var(--ink); }
.cov-meter-k { position: relative; display: block; height: 14px; margin-top: 5px; font: 400 11px/14px var(--mono); color: var(--faint); }
.cov-meter-k > span { position: absolute; top: 0; }
.cov-meter-k > span:nth-child(1) { left: 0; }
.cov-meter-k > span:nth-child(2) { left: var(--at, 20%); transform: translateX(-50%); }
.cov-meter-k > span:nth-child(3) { right: 0; }
