/* css/pages/markets.css: the bond board (/markets). Built on css/base.css (DESIGN.md): .page-head, .tabs.serif,
   .stats, .toolbar, .seg, .ledger-wrap > .ledger, .panel, .kv, tags, the drawer. This file only lays the board out
   and adds what a five-book board needs: a sliding ink rule under the tabs, compact strips, a sticky first column on
   phones, a header that sticks under the nav on wide screens, rows that open, and the country drawer.
   Colours only through tokens; mobile first, then 640 / 900 / 1120 / 1200. */

/* an opaque surface that matches --panel, for cells that stay put while the table scrolls under them */
.mk-board { --mk-solid: var(--paper-2); }
[data-theme="light"] .mk-board { --mk-solid: var(--paper); }

/* ================================================================== head */
/* the aside is the shared .page-head .aside (small sans, muted), laid out as a short stack: date, mark, source */
.mk-head { padding-bottom: 20px; }
.mk-head h1 { margin-bottom: 0; }
.mk-head > div > p { max-width: 38em; }
.mk-asof { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.mk-asof p { margin: 0; }
.mk-asof-l time { color: var(--ink-2); font-variant-numeric: lining-nums; }
@media (min-width: 900px) {
  .mk-head { padding-bottom: 28px; }
  .mk-asof { flex-direction: column; align-items: flex-end; gap: 6px; padding-bottom: 6px; }
}

/* ================================================================== the board and its tabs */
.mk-board { padding-bottom: 72px; }
@media (min-width: 900px) { .mk-board { padding-bottom: 104px; } }

.mk-tabs { position: relative; background: var(--nav-bg); }
.mk-tabs .n { transition: color .2s; }
.mk-tabs [aria-selected="true"] .n { color: var(--muted); }
/* the ink rule slides from book to book (shell.js leaves the selected tab its own border until this is placed) */
.mk-tabs.has-ink [role="tab"][aria-selected="true"] { border-bottom-color: transparent; }
.mk-ink { position: absolute; left: 0; bottom: 0; width: var(--w, 0); height: 2px; background: var(--orange); transform: translateX(var(--x, 0)); pointer-events: none; }
.mk-tabs:not(.has-ink) .mk-ink { display: none; }
.mk-ink.ready { transition: transform .42s var(--ease), width .42s var(--ease); }
/* the tab row scrolls on phones: base.css fades the edge that has more (.fade-l / .fade-r from shell.js edgeFade) */

.mk-book { padding-top: 26px; outline-offset: 8px; }
@media (min-width: 900px) { .mk-book { padding-top: 34px; } }
@keyframes mkEnter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mk-book.mk-enter { animation: mkEnter .45s var(--ease) both; }

/* a line on what the book is, with its marks */
.mk-lead { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 40px; }
@media (min-width: 900px) { .mk-lead { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.mk-desc { max-width: 42em; font: 400 18px/1.5 var(--serif); color: var(--ink-2); }
@media (min-width: 900px) { .mk-desc { font-size: 19px; } .mk-lead .tags { justify-content: flex-end; padding-bottom: 4px; } }

/* the summary strip: the stats row, a size down, on paper so the code background stays out of it */
.mk-strip { margin-top: 22px; background: var(--panel); }
.mk-strip .cell { padding-top: 16px; padding-bottom: 15px; }
@media (min-width: 900px) { .mk-strip .cell, .mk-strip .cell:nth-child(odd) { padding-top: 20px; padding-bottom: 18px; } }
.mk-strip .k { margin-bottom: 8px; font-size: 13.5px; }
.mk-strip .v.sm { font-size: clamp(25px, 2.6vw, 34px); line-height: 1.1; }
.mk-strip .v.mono { font-size: clamp(17px, 1.7vw, 22px); line-height: 1.55; }
.mk-strip .v .u { font-size: .48em; }
.mk-strip .s { margin-top: 7px; font-size: 13px; white-space: nowrap; }
.mk-strip .v .sk, .mk-strip .s .sk { height: .8em; }
@media (max-width: 639px) { .mk-strip .s { white-space: normal; } .mk-strip .v.sm { font-size: 25px; } }

/* ================================================================== toolbar */
.mk-tools { margin-top: 18px; gap: 10px 14px; }
.mk-segs { max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mk-segs::-webkit-scrollbar { display: none; }
/* phones: the segments scroll sideways with a faded edge (markets.js edgeFade), and the last one can clear the fade */
@media (max-width: 639px) { .mk-segs { scroll-padding-inline: 16px; padding-right: 28px; } }
.mk-segs .seg button { padding: 9px 12px; }
.mk-select .input { min-height: 0; }
.mk-select .input select { padding: 7px 34px 7px 11px; font-size: 13.5px; }
.mk-count { font-size: 13px; color: var(--muted); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
@media (min-width: 640px) { .mk-count { margin-left: auto; } .mk-tools .search { margin-left: 0; } }
@media (max-width: 639px) { .mk-count { order: 3; } }

/* ================================================================== the ledgers */
.mk-wrap { margin-top: 4px; }
.mk-wrap.mk-gap { margin-top: 22px; }
.mk-table caption { padding-top: 14px; line-height: 1.5; }
.mk-table td, .mk-table th { padding-inline: 9px; }
.mk-table td.num { white-space: nowrap; }
/* the star column: the one the book is about */
.mk-table th.mk-star .sort { color: var(--ink); }
.mk-table td.mk-real, .mk-table td.mk-star-c { font-weight: 500; }
.mk-table td.mk-real { color: var(--ink); }
.mk-table td.mk-real.up { color: var(--up); }
.mk-table td.mk-real.down { color: var(--down); }
.mk-table td.mk-real .cellbar { width: 46px; margin-left: 9px; }

/* the first column stays while a wide table scrolls sideways (phones), with a hairline once it has moved */
.mk-wrap > .ledger > thead > tr > th:first-child,
.mk-wrap > .ledger > tbody > tr > td.mk-first { position: sticky; left: 0; z-index: 1; padding-right: 14px; }
.mk-wrap > .ledger > thead > tr > th:first-child { z-index: 2; }
.mk-wrap > .ledger > tbody > tr > td.mk-first { background: var(--mk-solid); }
.mk-wrap > .ledger > tbody > tr:hover > td.mk-first { background: linear-gradient(var(--hover), var(--hover)), var(--mk-solid); }
.mk-wrap > .ledger > tbody > tr.sel > td.mk-first { background: linear-gradient(var(--orange-soft), var(--orange-soft)), var(--mk-solid); }
.mk-wrap.scrolled > .ledger > tbody > tr > td.mk-first,
.mk-wrap.scrolled > .ledger > thead > tr > th:first-child { box-shadow: 1px 0 0 var(--rule); }
/* wider screens: when the table fits, the page scrolls it and its header sticks under the nav */
@media (min-width: 640px) {
  .mk-wrap.fits { overflow: visible; }
  .mk-wrap.fits > .ledger > thead > tr > th { top: var(--nav-h); }
}

/* names that open something: a button that reads as the name */
.mk-open { display: block; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mk-open:hover .nm, .mk-open:focus-visible .nm { color: var(--orange-ink); }
.mk-open .nm { transition: color .15s; }
.mk-table tbody tr { cursor: default; }
.mk-countries tbody tr, .mk-global tbody tr:not(.mk-detail), .mk-issuers > tbody > tr:not(.mk-detail) { cursor: pointer; }
.mk-table .who { gap: 11px; }
.mk-table .nm { font-size: 16.5px; }
.mk-table .nm-s { font-size: 12px; }
/* "est.": a data note, set right after what it qualifies; muted with a dotted underline, never a warning colour */
.mk-est { margin-left: 4px; font: 500 12px var(--sans); color: var(--muted); text-decoration: underline dotted 1px; text-underline-offset: 3px; cursor: help; }
.nm-s .mk-est { margin-left: 0; font-size: inherit; }
.mk-realtag { margin-left: 6px; font: 500 11px/1 var(--sans); color: var(--orange-ink); text-decoration: none; border-bottom: 1px dotted currentColor; cursor: help; }
.mk-rating { font: 500 13px var(--mono); color: var(--ink-2); }
.mk-ccy { font-size: 13px; color: var(--ink-2); }
.mk-chg { color: var(--ink-2); }

/* countries */
/* desktop: one line per country (name, then region and currency beside it), so the ledger reads dense like priors' */
@media (min-width: 1120px) {
  .mk-countries td.mk-first .nm, .mk-countries td.mk-first .nm-s { display: inline; }
  .mk-countries td.mk-first .nm-s { margin-left: 10px; }
  .mk-countries > tbody > tr > td { padding-block: 9px; }
}
.mk-curve, .mk-curve-h { width: 76px; text-align: right; }
.mk-curve .spark { margin-left: auto; }
.mk-curve .spark .ch-end.ink { fill: var(--ink-2); }
.mk-curve-h span { cursor: help; }

/* rows that open: a caret in the last column, and the detail row under them */
.mk-x-h, .mk-x-c { width: 1%; text-align: right; }
.mk-caret { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease), border-color .15s; }
tr.open .mk-caret { transform: translateY(1px) rotate(225deg); border-color: var(--orange-ink); }
tr:hover .mk-caret { border-color: var(--ink); }
.mk-table tr.open > td { border-bottom-color: transparent; }
.mk-table tr.open > td.mk-first .nm { color: var(--orange-ink); }
.mk-detail > td { padding: 0 0 20px; white-space: normal; background: transparent; }
.mk-detail:hover > td { background: transparent !important; }
.mk-det { position: sticky; left: 0; max-width: min(100%, calc(100vw - 2 * var(--gutter))); padding: 2px 0 2px 16px; border-left: 1px solid var(--orange); }
.mk-det-p { max-width: 46em; font: 400 17px/1.5 var(--serif); color: var(--ink-2); }
.mk-det .sub { margin-top: 8px; max-width: 52em; }
.mk-detail .mk-det { animation: mkEnter .35s var(--ease) both; }
.mk-issuers .mk-country { display: table-cell; }
.mk-issuers .mk-country .cc { margin-right: 9px; min-width: 28px; height: 22px; }
.mk-all { min-height: 28px; padding: 4px 8px; font-size: 13px; }
@media (pointer: coarse) { .mk-all { min-height: 34px; } }

/* an issuer's bonds, inside its detail row */
.mk-bonds-wrap { margin-top: 14px; overflow-x: auto; }
.mk-bonds { min-width: 0; width: auto; font-size: 14px; }
.mk-bonds thead th { position: static; background: transparent; border-bottom-color: var(--rule); font-size: 12.5px; }
.mk-bonds th, .mk-bonds td { padding: 8px 18px 8px 0; }
.mk-bonds th:last-child, .mk-bonds td:last-child { padding-right: 0; }
.mk-bonds tbody tr:hover td { background: transparent; }
.mk-bonds .num { font-size: 13px; }

/* commodities */
/* a sub-header per group while the book is in group order; its label stays in view as the table scrolls sideways */
.mk-table tr.mk-sec > th { padding: 22px 0 8px; border-bottom: 1px solid var(--rule); background: transparent; text-align: left; white-space: nowrap; }
.mk-table tbody tr.mk-sec:first-child > th { padding-top: 12px; }
.mk-table tr.mk-sec > th > span { position: sticky; left: 0; display: inline-flex; align-items: baseline; gap: 9px; font: italic 400 19px/1.2 var(--serif); color: var(--ink); }
.mk-table tr.mk-sec > th .n { font: 400 12px var(--mono); font-style: normal; color: var(--faint); }
.mk-table tbody tr.mk-sec:hover > th { background: transparent; }
.mk-table.by-group .mk-grp-s { display: none; }
.mk-groups button .n { margin-left: 6px; font: 400 11.5px/1 var(--mono); color: var(--faint); }
.mk-groups button[aria-pressed="true"] .n { color: inherit; opacity: .7; }
.mk-unit { margin-left: 2px; font: 400 12px var(--sans); color: var(--muted); }
.mk-role { min-width: 220px; max-width: 360px; font-size: 13.5px; line-height: 1.45; }
.mk-tok { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mk-tok-id { display: inline-flex; align-items: center; gap: 9px; cursor: help; }
.mk-tok-id .cc { color: var(--orange-ink); border-color: var(--orange-soft); }
.mk-px { font: 500 13.5px var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.mk-px .sk { min-width: 4.4em; }
.mk-tok-c { min-width: 210px; }
.mk-tok-h .tag, .mk-onchain th .tag { margin-left: 6px; font-size: 11.5px; }
.mk-risk { margin-top: 22px; max-width: 52em; }

/* on chain: tickers of three and four letters in boxes of one width, so the names line up */
#book-onchain .cc { min-width: 46px; }
.mk-onchain .mk-act { text-align: right; }
.mk-acts { display: inline-flex; gap: 6px; }
.mk-onchain .num .mk-px { font-size: 14px; }
.mk-onchain.no-acct .mk-hold { display: none; }
.mk-holdv { font: 13.5px var(--mono); }
.mk-ref { margin-left: 14px; }
.mk-onchain td .txlink { white-space: nowrap; }

.mk-proto { margin-top: 30px; }
.mk-proto-panel .panel-f { gap: 12px 26px; }
.mk-proto-p { margin-top: 14px; max-width: 46em; font: 400 17px/1.55 var(--serif); color: var(--ink-2); }
.mk-proto-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 900px) { .mk-proto-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 40px; } }
.mk-proto-kv dd { font-family: var(--mono); font-size: 13.5px; }
.mk-proto-tags { margin-top: 14px; }
.mk-series-wrap { overflow-x: auto; }
.mk-series { min-width: 0; }
.mk-series thead th { position: static; background: transparent; }
.mk-sym { margin-right: 10px; font: 500 13px var(--mono); color: var(--ink); }
.mk-bname { font: 400 16px var(--serif); color: var(--ink-2); }
.mk-iss { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.mk-iss .iss-link { font-size: 12.5px; }

.mk-empty { margin-right: 10px; font: italic 400 18px/1.4 var(--serif); color: var(--ink-2); }
.mk-clear { padding: 0; border: 0; background: none; cursor: pointer; }
.mk-table tr.empty td { position: static; background: transparent; }
.mk-note { margin-top: 14px; max-width: 64em; }

/* ================================================================== the country drawer */
.mk-drawer { width: min(520px, 100vw); }
.mk-dr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.mk-dr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mk-dr-meta .sub { font-size: 14px; }
.mk-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.mk-fig { min-width: 0; padding: 14px 12px 12px; border-left: 1px solid var(--rule); }
.mk-fig:first-child { border-left: 0; padding-left: 0; }
.mk-fig .k { font-size: 13px; color: var(--muted); }
.mk-fig .v { margin-top: 6px; font: 400 30px/1.05 var(--serif); letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.mk-fig .v .u { margin-left: 3px; font-size: .5em; color: var(--muted); }
.mk-fig .v.up { color: var(--up); } .mk-fig .v.down { color: var(--down); }
.mk-rank { margin-top: -6px; }
.mk-dr-chart .panel-h { padding: 12px 14px; }
.mk-dr-chart .panel-h h3 { font-size: 20px; }
.mk-dr-chart .panel-b { padding: 14px 14px 10px; }
.mk-dr-chart .empty { padding: 18px 0; }
.mk-tenors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-2); }
.mk-tenors > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-left: 1px solid var(--rule-2); }
.mk-tenors > div:first-child { border-left: 0; }
.mk-tenors .k { font-size: 12px; color: var(--muted); }
.mk-tenors .v { font: 500 13.5px var(--mono); color: var(--ink); }
.mk-facts > div { grid-template-columns: minmax(120px, 44%) minmax(0, 1fr); }
.mk-facts dd.mono { font-size: 13.5px; }
.mk-dr-note { color: var(--ink-2); }
.mk-sgov { display: grid; gap: 12px; padding: 16px; background: var(--paper-2); border: 1px solid var(--rule); border-left: 2px solid var(--orange); }
.mk-sgov-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.mk-sgov-h b { font: 400 21px/1.2 var(--serif); }
.mk-sgov-px { display: inline-flex; align-items: center; gap: 10px; }
.mk-sgov p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.mk-sgov p.fine { font-size: 12.5px; color: var(--muted); }
.mk-sgov .btn { justify-self: start; }
.mk-drawer .ov-foot .btn { flex: 1 1 0; }


/* the issuers toolbar carries the most controls: tighten it so the search stays on the row on wide screens */
@media (min-width: 1120px) {
  #book-issuers .mk-segs .seg button { padding-inline: 10px; }
  #book-issuers .mk-tools .search { width: 200px; }
  #book-issuers .mk-select select { max-width: 190px; }
}

/* the key figure in the sticky first column, only while its own column is out of the visible frame (markets.js
   keyInView sets .key-off): a commodity whose 1Y change is the second column on screen never prints it twice */
.mk-peek { display: none; }
.mk-wrap.key-off .mk-peek { display: inline-block; margin-left: auto; padding-left: 12px; font: 500 13px var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.mk-wrap.key-off .mk-peek.up { color: var(--up); }
.mk-wrap.key-off .mk-peek.down { color: var(--down); }
@media (max-width: 639px) {
  .mk-wrap > .ledger > tbody > tr > td.mk-first .nm,
  .mk-wrap > .ledger > tbody > tr > td.mk-first .nm-s { white-space: normal; }
  .mk-wrap > .ledger > tbody > tr > td.mk-first .mk-open,
  .mk-wrap > .ledger > tbody > tr > td.mk-first .who > span:not([class]) { max-width: 138px; }
  .mk-countries > tbody > tr > td.mk-first .cc { display: none; }
  .mk-wrap > .ledger > tbody > tr > td.mk-first .who { gap: 8px; }
}
@media (max-width: 639px) { .mk-countries .mk-ccy-s { display: none; } }

/* a table wider than the screen: its caption stays in the visible frame and wraps there */
.mk-wrap.overflows > .ledger > caption { position: sticky; left: 0; max-width: calc(100vw - 2 * var(--gutter)); }

/* phones: the latest series fit the panel; names sit under their symbol and dates may wrap */
@media (max-width: 639px) {
  .mk-series th, .mk-series td { white-space: normal; padding-right: 10px; vertical-align: top; }
  .mk-series td:last-child, .mk-series th:last-child { padding-right: 0; }
  .mk-sym, .mk-bname { display: block; }
  .mk-bname { margin-top: 2px; font-size: 15px; line-height: 1.3; }
  .mk-proto-panel .panel-b { padding-inline: 14px; }
  .mk-series .mk-mat-c { display: none; }
}
.mk-mat-s { display: none; }
@media (max-width: 639px) { .mk-mat-s { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); } }

/* ================================================================== the Strategy book (#strategy) */
/* no bitcoin mark beside the company's name (DESIGN.md "Bitcoin accents": it could read as a logo) */
.sx-desc b { font-weight: 500; color: var(--ink); }
.sx-desc .sx-btcn { color: var(--orange-ink); font-variant-numeric: lining-nums; }
.sx-src { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.sx-src .link.sm { font-size: 13px; }

/* the tape: six tickers, their yields and each price in sats, one quiet line (it scrolls sideways on phones) */
.sx-tape { display: flex; align-items: stretch; margin-top: 22px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--panel); font: 400 12.5px/1 var(--mono); font-variant-numeric: lining-nums tabular-nums; }
.sx-tape::-webkit-scrollbar { display: none; }
.sx-tape-k { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px 10px 0; font: 400 12.5px var(--sans); color: var(--muted); white-space: nowrap; }
.sx-tape-k .btc { margin: 0; font-size: 11px; vertical-align: 0; }
.sx-tk { flex: none; display: inline-flex; align-items: baseline; gap: 7px; padding: 10px 13px; border-left: 1px solid var(--rule-2); white-space: nowrap; cursor: help; }
.sx-tk:last-child { padding-right: 0; }
.sx-tk b { font-weight: 500; color: var(--ink); }
.sx-tk .y { color: var(--orange-ink); }
.sx-tk.eq .y { font-family: var(--sans); color: var(--muted); }
.sx-tk .sats { font-size: 11.5px; color: var(--faint); }
.sx-tk .mk-est { margin-left: -3px; font-size: 11.5px; }
@media (max-width: 639px) { .sx-tape { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); } }

/* five figures: two by two on phones (the last spans), five across from 900px */
.sx-strip { margin-top: 0; border-top: 0; }
/* one row from 900px: no cell keeps the top rule the two-by-two layout gives the cells of its second row */
@media (min-width: 900px) { .stats.sx-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); } .stats.sx-strip > .cell:nth-child(n) { border-top: 0; } .sx-strip .cell, .sx-strip .cell:nth-child(odd) { padding-inline: 20px; } .sx-strip .cell:first-child { padding-left: 0; } }
.sx-strip .k .sx-at { margin-left: auto; font: 400 11.5px var(--mono); color: var(--faint); white-space: nowrap; }
.sx-strip .s { white-space: normal; line-height: 1.4; }
.sx-strip .s .mk-est { margin-left: 6px; }
.sx-strip .cov-meter { max-width: 220px; }
.sx-strip .cov-meter-k { max-width: 220px; }

/* every company figure of the snapshot, folded under the strip */
.sx-kpis { margin-top: 14px; max-width: 64em; }
.sx-kpis summary { font-size: 18px; }
.sx-kpis .n { font: 400 12px var(--mono); color: var(--faint); }
.sx-kpis .sx-facts { max-width: none; margin-top: 0; }
@media (min-width: 640px) { .sx-kpis .sx-facts > div { grid-template-columns: 220px minmax(0, 1fr); } }
.sx-kpis .sx-facts dd b { font-weight: 500; color: var(--ink); }
.sx-kpis .sx-facts dd .mk-est { margin-right: 2px; }

/* the credit stack */
.sx-stack { margin-top: 26px; }
.sx-stack .panel-h .sub { flex-basis: 100%; margin-left: 0; max-width: 46em; }
@media (min-width: 900px) { .sx-stack .panel-h .sub { flex-basis: auto; margin-left: auto; text-align: right; max-width: 28em; } }
.sx-stack h3 .btc { font-size: .55em; vertical-align: .3em; }
.sx-stack .panel-b { padding-top: 14px; padding-bottom: 10px; }
.sx-stack .panel-b > .sk.block { height: 300px; }

/* the toolbar is a line of what the ledger holds */
.sx-tools { margin-top: 26px; }
.sx-tools-t { font-size: 14px; color: var(--muted); }

/* the ledger: rank, ticker and nickname in the first column; two-line cells for rate and frequency */
.ledger.wide.mk-strategy { min-width: 1000px; }
.mk-strategy .sx-rank { flex: none; width: 1.4em; font: italic 400 17px/1 var(--serif); color: var(--orange-ink); text-align: right; cursor: help; }
.mk-strategy .cc { min-width: 46px; }
.mk-strategy .sx-s { display: block; margin-top: 2px; font: 400 11.5px var(--sans); color: var(--muted); }
.mk-strategy td.num .sx-s { font-family: var(--sans); }
.mk-strategy td.sx-none { color: var(--muted); font-family: var(--sans); font-size: 13px; }
.mk-strategy tbody tr:not(.mk-detail) { cursor: pointer; }
.mk-strategy .sx-live { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 3px; }
.mk-strategy .sx-live .mk-px { font-size: 12.5px; color: var(--orange-ink); }
.mk-strategy .sx-live .tag { font-size: 11px; }
.mk-strategy .sx-gap { display: block; margin-top: 2px; font: 400 11.5px var(--sans); color: var(--muted); cursor: help; }
.mk-strategy .sx-act { width: 1%; }
.sx-acts { display: inline-flex; align-items: center; gap: 12px; }
.sx-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 12px 0 0; max-width: 52em; }
.sx-facts > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 9px 0; border-top: 1px solid var(--rule-2); }
@media (min-width: 640px) { .sx-facts > div { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; } }
.sx-facts dt { font-size: 13px; color: var(--muted); }
.sx-facts dd { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.sx-facts dd.mono { font-size: 13.5px; }
.sx-chain { display: grid; gap: 12px; max-width: 52em; margin-top: 14px; padding: 14px 16px; background: var(--paper-2); border: 1px solid var(--rule); border-left: 2px solid var(--orange); }
.sx-chain p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.sx-chain p b { font-weight: 500; color: var(--ink); }

/* the convertible notes */
.sx-conv { margin-top: 40px; }
.sx-conv-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.sx-conv-h .sub { font-size: 14px; }
.sx-conv-t { min-width: 860px; }
.sx-conv-t thead th { position: static; background: transparent; }
/* a caption under a table wider than the screen stays in the visible frame and wraps there */
.sx-conv-wrap > .ledger > caption { position: sticky; left: 0; max-width: calc(100vw - 2 * var(--gutter)); }
/* while the right edge fades (more columns to scroll to), the caption stops short of the fade */
.sx-conv-wrap.fade-r > .ledger > caption { max-width: calc(100vw - 2 * var(--gutter) - 44px); }
.sx-conv-t .nm { font-size: 16px; }
.sx-conv-t td.sx-status { min-width: 260px; max-width: 380px; font-size: 13px; line-height: 1.45; }
.sx-conv-t .sx-s { display: block; margin-top: 2px; font: 400 11.5px var(--mono); color: var(--muted); }
.sx-otm { color: var(--ink-2); }
.sx-itm { color: var(--up); }

.sx-risk { margin-top: 26px; }
.sx-sources { margin-top: 18px; max-width: 64em; }
.sx-sources summary { font-size: 18px; }
.sx-sources .n { font: 400 12px var(--mono); color: var(--faint); }
.sx-sources .srclist { margin: 0; padding-left: 2.2em; font-size: 13.5px; line-height: 1.45; }
@media (min-width: 900px) { .sx-sources .srclist { columns: 2; column-gap: 40px; } }
.sx-sources .srclist li { break-inside: avoid; padding: 3px 0; color: var(--muted); }
.sx-sources .srclist a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.sx-sources .srclist a:hover { color: var(--orange-ink); }
.sx-own { margin-top: 12px; }
