/* Card anatomy, controls, plot overlays, legend, tables, the research list and methodology. Tokens only. */

.ic { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ic svg { display: block; }

/* ---------- card ---------- */
/* a faint translucent surface on the page, a hairline, a 1px highlight along the top edge; the hairline brightens
   when the card is pointed at or holds focus. Every card keeps one rhythm: title row 28, figure 8 under it, plot 16
   under that, legend 12 under the plot, 20 round the edge (16 on a phone) */
.card {
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0;
  padding: var(--sp-5);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--hi);
  /* a card opened by a link lands 16px under the stuck header through html's scroll-padding-top alone */
  transition: opacity var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}
/* the hairline is drawn above the border box, lighter toward the top left; it brightens when the card is pointed at */
.card { border-color: transparent; }
.card::before {
  content: ""; position: absolute; inset: -1px; z-index: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: filter var(--t-mid) var(--ease);
}
.card:hover::before, .card:focus-within::before { filter: brightness(1.6); }
.card.is-loading { opacity: 0.6; }
.card.is-target::before { background: var(--accent); }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); flex-wrap: wrap; min-height: 28px; }
.card-t { display: flex; align-items: center; gap: var(--sp-1); min-height: 28px; min-width: 0; }
.card-title { font: var(--fw-label) var(--fs-13)/var(--lh-13) var(--sans); letter-spacing: var(--tr-13); color: var(--text); }

.icon-btn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: var(--r-ctl);
  color: var(--text-3);
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.icon-btn:hover:not(:disabled), .icon-btn[aria-expanded="true"] { color: var(--text); background: var(--fill-hover); }
.icon-btn:active:not(:disabled) { background: var(--fill-press); }
.icon-btn:disabled { color: var(--text-off); cursor: default; }
/* the ⓘ and the ⋯ stay quiet until the card is pointed at or holds focus; the ⓘ is a 24px target beside the title */
.icon-btn.info { width: 24px; height: 24px; border-radius: var(--r-sm); }
.icon-btn.info:hover, .icon-btn.info[aria-expanded="true"] { background: none; color: var(--text); }
.icon-btn.more { margin-right: calc(-1 * var(--sp-1)); }
.card:hover .icon-btn.info, .card:focus-within .icon-btn.info { color: var(--text-2); }
.card:hover .icon-btn.more, .card:focus-within .icon-btn.more { color: var(--text-2); }
/* the camera sits just before the ⋯ and is as quiet until the card is pointed at */
.icon-btn.cam { margin-right: calc(-1 * var(--sp-1)); }
.card:hover .icon-btn.cam, .card:focus-within .icon-btn.cam { color: var(--text-2); }

.card-ctl { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-left: auto; min-height: 28px; }
/* a header whose only control is the ⋯ keeps it on the title row: a long title wraps beside it instead (so does
   one whose only other control is the camera) */
.card-head:has(> .card-ctl > .more:only-child) { flex-wrap: nowrap; }
.card-head:has(> .card-ctl > .cam):not(:has(> .card-ctl > :not(.cam):not(.more))) { flex-wrap: nowrap; }
.ctl {
  height: 28px; padding: 0 var(--sp-2) 0 var(--sp-3);
  display: inline-flex; align-items: center; gap: var(--sp-1);
  background: var(--fill);
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  font: var(--fw-label) var(--fs-12)/1 var(--sans);
  letter-spacing: var(--tr-12);
  color: var(--text-2);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.ctl:hover:not(:disabled), .ctl[aria-expanded="true"] { background: var(--fill-hover); color: var(--text); }
.ctl:active:not(:disabled) { background: var(--fill-press); }
.ctl-k { color: var(--text-3); }
.ctl-v { color: var(--text); }
.ctl .ic { margin-left: 2px; color: var(--text-3); }
.ctl:disabled { color: var(--text-off); cursor: default; }
.ctl.tog { padding: 0 var(--sp-3); }
.ctl.tog[aria-pressed="true"] { color: var(--brand-tint); border-color: var(--brand-line); background: var(--brand-fill); }
.grain { margin-right: 2px; font: var(--fw-label) var(--fs-12)/1 var(--sans); color: var(--text-3); white-space: nowrap; }

/* ---------- headline: the figure leads ---------- */
.hl { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin-top: var(--sp-2); }
.hl-v {
  font: var(--fw-figure) var(--fs-28)/var(--lh-28) var(--sans); letter-spacing: var(--tr-28);
  font-variant-numeric: var(--nums); color: var(--text); white-space: nowrap;
}
/* a figure is one colour; a unit that is a word (bps, pp) is set smaller in the same tone */
.hl-u.is-word { font-size: 0.625em; font-weight: var(--fw-label); letter-spacing: 0; }
.hl-d { display: inline-flex; align-items: center; gap: var(--sp-1); font: var(--fw-label) var(--fs-12)/var(--lh-12) var(--sans); letter-spacing: var(--tr-12); font-variant-numeric: var(--nums); }
.hl-d.up { color: var(--up); }
.hl-d.down { color: var(--down); }
.hl-d.flat { color: var(--text-3); }
/* the quiet layer one step quieter: the basis of a figure in the text weight */
.hl-l { font: var(--fw-text) var(--fs-12)/var(--lh-12) var(--sans); letter-spacing: var(--tr-12); color: var(--text-3); }

/* ---------- body: plot, overlays ---------- */
.card-body { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; margin-top: var(--sp-4); }
/* a short plot keeps its height: the legend follows it and the spare height of a stretched card falls beneath */
.card.is-fit > .card-body { flex: 0 0 auto; }
.plot { position: relative; flex: 1 1 auto; min-height: var(--plot-6); }
.span-12 > .card-body > .plot { min-height: var(--plot-12); }
.span-4 > .card-body > .plot { min-height: var(--plot-4); }
.is-md > .card-body > .plot { min-height: var(--plot-6); }
.is-xs > .card-body > .plot { min-height: var(--plot-4); }
.is-sm > .card-body > .plot { min-height: var(--plot-sm); }
.plot-canvas { position: absolute; inset: 0; border-radius: var(--r-sm); }
.plot-canvas:focus-visible { outline-offset: var(--sp-1); }
.xhair { position: absolute; pointer-events: none; opacity: 0; transition: opacity var(--t-fast) var(--ease); }

.tip {
  position: absolute; left: 0; top: 0; z-index: 5;
  min-width: 136px; max-width: 320px;
  padding: var(--sp-2) var(--sp-3);
  pointer-events: none; opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
}
.tip-d { margin-bottom: var(--sp-2); font: var(--fw-label) var(--fs-11)/var(--lh-11) var(--sans); letter-spacing: var(--tr-11); font-variant-numeric: var(--nums); color: var(--text-3); white-space: nowrap; }
.tip-e { margin: calc(-1 * var(--sp-1)) 0 var(--sp-2); font: var(--fw-label) var(--fs-11)/var(--lh-11) var(--sans); color: var(--text-2); }
.tip-rows { display: grid; grid-template-columns: 8px auto 1fr; column-gap: var(--sp-2); row-gap: var(--sp-1); align-items: center; }
.tip-row { display: contents; }
/* a line's key is a short rule; a bar's or a band's a small square; a point's a dot */
.tip-key { width: 8px; height: 2px; border-radius: 1px; }
.tip-key.sq { height: 8px; border-radius: var(--r-mark); }
.tip-key.dot { height: 8px; border-radius: 50%; }
.tip-v { font: var(--fw-label) var(--fs-12)/var(--lh-12) var(--mono); font-variant-numeric: var(--nums); color: var(--text); text-align: right; white-space: nowrap; }
.tip-n { font: var(--fw-text) var(--fs-12)/var(--lh-12) var(--sans); letter-spacing: var(--tr-12); color: var(--text-2); white-space: nowrap; }
.tip-row.is-total::before { content: ""; grid-column: 1 / -1; height: 1px; margin: 2px 0; background: var(--line-strong); }

.nodata {
  flex: 1 1 auto; min-height: 120px;
  display: flex; align-items: center; justify-content: center;
  font: var(--fw-text) var(--fs-12)/var(--lh-12) var(--sans); color: var(--text-3);
}
.card.is-empty .card-body { margin-top: 0; }

/* ---------- legend ---------- */
.legend { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: var(--sp-1) var(--sp-4); margin: var(--sp-3) 0 0 -2px; }
.lg { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 2px; border-radius: var(--r-sm); font: var(--fw-label) var(--fs-12)/var(--lh-12) var(--sans); letter-spacing: var(--tr-12); color: var(--text-2); white-space: nowrap; transition: opacity var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
button.lg:hover { color: var(--text); }
button.lg:active { opacity: 0.7; }
.lg.is-off { color: var(--text-3); }
.lg.is-off .lg-key { opacity: 0.35; }
.lg-key { flex: none; }
.lg-key.rect { width: 8px; height: 8px; border-radius: var(--r-mark); }
.lg-key.line { width: 12px; height: 2px; border-radius: 1px; }
.lg-key.dot { width: 8px; height: 8px; border-radius: 50%; }
.lg-key.ring { width: 8px; height: 8px; border-radius: 50%; border: 2px solid; }

/* ---------- popovers and menus (the surface is shared with the tooltip and the toast: base.css) ---------- */
.pop { position: absolute; animation: pop-in var(--t-fast) var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-2px); } }
.pop-info { width: 304px; max-width: calc(100vw - 16px); padding: var(--sp-3) var(--sp-4); font: var(--fw-text) var(--fs-13)/var(--lh-13) var(--sans); letter-spacing: var(--tr-13); color: var(--text-2); }
.pop-info p + p { margin-top: var(--sp-2); }
.pop-meta { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line-strong); font: var(--fw-text) var(--fs-11)/var(--lh-11) var(--sans); letter-spacing: var(--tr-11); font-variant-numeric: var(--nums); color: var(--text-2); }
.pop-meta-r { display: flex; gap: var(--sp-3); }
.pop-meta-r + .pop-meta-r { margin-top: var(--sp-1); }
.pop-meta-k { flex: 0 0 44px; color: var(--text-3); }
.menu { min-width: 176px; max-height: 336px; padding: var(--sp-1); display: flex; flex-direction: column; overflow-y: auto; }
.menu-i {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
  height: 32px; padding: 0 var(--sp-2);
  border-radius: var(--r-sm);
  font: var(--fw-label) var(--fs-13)/1 var(--sans); letter-spacing: var(--tr-13); color: var(--text-2);
  text-align: left; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.menu-i:hover, .menu-i:focus-visible { background: var(--fill-hover); color: var(--text); outline: none; }
.menu-i:active { background: var(--fill-press); }
.menu-i[aria-checked="true"], .menu-i[aria-selected="true"] { color: var(--text); }
.menu-ck { color: var(--brand); }
.menu-sep { height: 1px; margin: var(--sp-1); background: var(--line); }
.picker { width: 224px; padding: var(--sp-2); }
.pick-in {
  width: 100%; height: 28px; padding: 0 var(--sp-2);
  background: var(--fill); border: 1px solid var(--line); border-radius: var(--r-sm);
  font: var(--fw-label) var(--fs-12)/1 var(--sans); color: var(--text);
}
.pick-in:focus { outline: none; border-color: var(--brand); }
.pick-list { display: flex; flex-direction: column; max-height: 264px; margin-top: var(--sp-2); overflow-y: auto; }
.pick-none { padding: var(--sp-3) var(--sp-2); font: var(--fw-text) var(--fs-12)/var(--lh-12) var(--sans); color: var(--text-3); }

/* ---------- tables ---------- */
/* figures in Geist Mono, every column of figures right-aligned with one decimal count, so the points line up */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font: var(--fw-text) var(--fs-12)/var(--lh-12) var(--mono); font-variant-numeric: var(--nums); color: var(--text); }
.tbl th, .tbl td { height: 36px; padding: 0 var(--sp-3); border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-weight: var(--fw-text); transition: background-color var(--t-fast) var(--ease); }
.tbl thead th { position: sticky; top: 0; z-index: 2; background: var(--card-solid); font: var(--fw-label) var(--fs-12)/var(--lh-12) var(--sans); letter-spacing: var(--tr-12); color: var(--text-2); border-bottom-color: var(--line-strong); }
.tbl .num { text-align: right; }
.tbl tbody th { color: var(--text-2); }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl tbody tr:hover > * { background: var(--fill); }
.tbl tr.is-link { cursor: pointer; }
.tbl tr.is-link:active > * { background: var(--fill-hover); }
.tbl tr:focus-visible { outline-offset: calc(-1 * var(--ring-off)); }
/* a header is the metric, with its qualifier beneath in a quieter line */
.th-sort { display: inline-flex; flex-direction: column; align-items: flex-start; font: inherit; color: inherit; text-align: left; transition: color var(--t-fast) var(--ease); }
.num .th-sort { align-items: flex-end; text-align: right; }
.th-l { position: relative; display: inline-flex; align-items: center; gap: var(--sp-1); }
.th-sort > .th-l { font: inherit; }
.th-q { display: block; font: var(--fw-text) var(--fs-11)/var(--lh-11) var(--sans); letter-spacing: var(--tr-11); color: var(--text-3); }
.th-sort:focus-visible { border-radius: var(--r-sm); }
.th-sort:hover { color: var(--text); }
.th-sort.is-on { color: var(--text); }
.th-ar { opacity: 0; color: var(--text-3); transition: opacity var(--t-fast) var(--ease); }
/* beside a right-aligned label the arrow hangs in the gutter, so labels stay flush with their figures */
.num .th-ar { position: absolute; left: 100%; top: 50%; margin: -4px 0 0 var(--sp-1); }
.th-sort:hover .th-ar { opacity: 0.6; }
.th-sort.is-on .th-ar { opacity: 1; color: var(--text-2); }

.tview { flex: 1 1 auto; height: var(--plot-6); min-height: var(--plot-6); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.span-12 > .card-body > .tview { height: var(--plot-12); min-height: var(--plot-12); }
.span-4 > .card-body > .tview { height: var(--plot-4); min-height: var(--plot-4); }
.is-sm > .card-body > .tview { height: var(--plot-sm); min-height: var(--plot-sm); }
.tview:focus-visible { outline-offset: var(--ring-off); }

/* markets table */
.tscroll { margin: 0 calc(-1 * var(--sp-5)); }
.tbl-mk th:first-child, .tbl-mk td:first-child { padding-left: var(--sp-5); }
.tbl-mk th:last-child, .tbl-mk td:last-child { padding-right: var(--sp-5); }
.tbl-mk th, .tbl-mk td { height: 44px; }
.tbl-mk thead th { height: 44px; padding-top: var(--sp-2); padding-bottom: var(--sp-2); vertical-align: top; top: calc(var(--fx-h) + var(--head-h)); }
/* the sorted column's figures are the strong ones; the rest step back, and plain-text columns further */
.tbl-mk td { color: var(--text-2); }
.tbl-mk td.is-sorted { color: var(--text); font-weight: var(--fw-label); }
.tbl-mk td.c-txt { font-family: var(--sans); font-size: var(--fs-13); letter-spacing: var(--tr-13); color: var(--text-3); }
.tbl-mk tbody th { background: var(--card-solid); }
.tbl-mk tr[aria-selected="true"] > * { background: var(--brand-fill); }
.tbl-mk tr[aria-selected="true"] > th { box-shadow: inset 2px 0 0 var(--brand); }
/* Long share: the figure, with a small long and short split bar before it */
.ls { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--sp-2); }
.ls-bar { display: flex; gap: 1px; width: 40px; height: 4px; flex: none; }
.ls-bar > i { display: block; height: 100%; min-width: 1px; }
.ls-bar > i:first-child { background: var(--s-long); border-radius: var(--r-mark) 0 0 var(--r-mark); }
.ls-bar > i:last-child { flex: 1 1 auto; background: var(--s-short); border-radius: 0 var(--r-mark) var(--r-mark) 0; }
.mkt { display: flex; flex-direction: column; gap: 2px; }
.mkt-t { font: var(--fw-strong) var(--fs-13)/var(--lh-12) var(--sans); letter-spacing: var(--tr-13); color: var(--text); }
.mkt-n { font: var(--fw-text) var(--fs-11)/var(--lh-11) var(--sans); letter-spacing: var(--tr-11); color: var(--text-3); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.closed { font-family: var(--sans); color: var(--text-3); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-1); margin-top: var(--sp-3); }
.pager-t { margin-right: var(--sp-2); font: var(--fw-text) var(--fs-12)/var(--lh-12) var(--sans); letter-spacing: var(--tr-12); font-variant-numeric: var(--nums); color: var(--text-3); }
.search {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: 28px; padding: 0 var(--sp-2);
  background: var(--fill);
  border: 1px solid transparent; border-radius: var(--r-ctl);
  color: var(--text-3);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.search:hover { background: var(--fill-hover); }
.search:focus-within { border-color: var(--brand); background: var(--fill); }
.search-in { width: 132px; padding: 0; background: none; border: 0; font: var(--fw-label) var(--fs-12)/1 var(--sans); letter-spacing: var(--tr-12); color: var(--text); }
.search-in::placeholder, .pick-in::placeholder { color: var(--text-3); }
.search-in:focus { outline: none; }
.search-in::-webkit-search-cancel-button, .pick-in::-webkit-search-cancel-button { -webkit-appearance: none; }
.card-ctl .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.card-ctl .seg::-webkit-scrollbar { display: none; }
.card-ctl .seg button { flex: none; }

/* small multiples: four across by default, three by two for the market detail */
.panels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-8); }
.panels.is-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* five panels with no hole: two wide, then three */
.panels.is-five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.panels.is-five > .panel { grid-column: span 2; }
.panels.is-five > .panel:nth-child(-n+2) { grid-column: span 3; }
.panel { display: flex; flex-direction: column; min-width: 0; }
.panel-title { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); font: var(--fw-label) var(--fs-12)/var(--lh-12) var(--sans); letter-spacing: var(--tr-12); color: var(--text-2); }
.panel .plot { flex: none; height: var(--plot-sm); min-height: 0; }
.panel .legend { margin-top: var(--sp-2); gap: var(--sp-1) var(--sp-3); }
.panel .nodata { min-height: var(--plot-sm); }
.panels.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- the points calculator (Token, $VAR) ---------- */
.calc { display: flex; flex-direction: column; gap: var(--sp-4); }
.calc-fs { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.calc-f { display: flex; flex-direction: column; gap: var(--sp-1); flex: 1 1 140px; min-width: 0; }
.calc-k { font: var(--fw-text) var(--fs-12)/var(--lh-12) var(--sans); letter-spacing: var(--tr-12); color: var(--text-3); }
.calc-in {
  height: 36px; width: 100%; padding: 0 var(--sp-3);
  background: var(--fill); border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  font: var(--fw-label) var(--fs-13)/1 var(--sans); letter-spacing: var(--tr-13); font-variant-numeric: var(--nums); color: var(--text);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.calc-in::placeholder { color: var(--text-off); }
.calc-in:hover { border-color: var(--line-hover); }
.calc-in:focus { outline: none; border-color: var(--brand-line); background: var(--fill-hover); }
.calc-o { display: flex; flex-direction: column; gap: var(--sp-1); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.calc-v { font: var(--fw-figure) var(--fs-28)/var(--lh-28) var(--sans); letter-spacing: var(--tr-28); font-variant-numeric: var(--nums); color: var(--text); white-space: nowrap; }
.calc-v.is-none { color: var(--text-3); }

/* ---------- unlocks over time (Token, $VAR) ---------- */
.ul { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-1); }
.ul-r, .ul-ax { display: grid; grid-template-columns: 148px minmax(0, 1fr); column-gap: var(--sp-4); align-items: center; }
.ul-l { display: flex; flex-direction: column; min-width: 0; }
.ul-n { font: var(--fw-label) var(--fs-12)/var(--lh-12) var(--sans); letter-spacing: var(--tr-12); color: var(--text-2); }
.ul-p { font: var(--fw-text) var(--fs-12)/var(--lh-12) var(--sans); font-variant-numeric: var(--nums); color: var(--text-3); }
.ul-t { position: relative; height: 32px; border-radius: var(--r-sm); background: var(--fill); }
.ul-b { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; min-width: 0; padding: 0 var(--sp-2); overflow: hidden; border-radius: var(--r-sm); font: var(--fw-strong) var(--fs-12)/1 var(--sans); white-space: nowrap; }
.ul-b + .ul-b { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ul-b:has(+ .ul-b) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ul-b > span { overflow: hidden; text-overflow: ellipsis; }
.ul-free { position: absolute; left: var(--sp-2); top: 50%; transform: translateY(-50%); padding: 3px var(--sp-2); border: 1px dashed; border-radius: var(--r-sm); font: var(--fw-label) var(--fs-12)/var(--lh-12) var(--sans); color: var(--text-2); white-space: nowrap; }
.ul-ticks { position: relative; height: 16px; }
.ul-tick { position: absolute; top: 0; transform: translateX(-50%); font: var(--fw-text) var(--fs-11)/var(--lh-11) var(--sans); letter-spacing: var(--tr-11); font-variant-numeric: var(--nums); color: var(--text-3); white-space: nowrap; }
.ul-tick.is-first { transform: none; }
.ul-tick.is-last { transform: translateX(-100%); }

/* ---------- figures without a plot ---------- */
.segwrap { flex: none; padding: var(--sp-2) 0 0; }
.segbar { display: flex; gap: 2px; width: 100%; height: 28px; }
.seg-b { display: flex; align-items: center; min-width: 0; padding: 0 var(--sp-2); border-radius: var(--r-sm); font: var(--fw-strong) var(--fs-12)/1 var(--sans); font-variant-numeric: var(--nums); }
.seg-b:focus-visible { outline-offset: var(--ring-off); }
/* a stat tile: a card that is one figure, in main's proportions (110px tall). The label on top, the figure beneath it,
   then the change and the basis on one line; on Overview a faint line of the tile's own series runs along its bottom
   edge, inside the bottom padding */
.card.is-stat { padding: 16px var(--sp-5); }
/* the title takes the room a longer neighbour's needs, so the figures of a row share one baseline */
.card.is-stat .card-head { flex: 1 0 auto; flex-wrap: nowrap; align-items: flex-start; min-height: 18px; }
.card.is-stat .card-title { color: var(--text-2); line-height: 18px; }
.card.is-stat .card-t { align-items: flex-start; min-height: 18px; padding-right: var(--sp-6); }
/* the ⓘ is a 24px target that takes an 18px row */
.card.is-stat .icon-btn.info { margin: -3px 0; }
.card.is-stat .card-ctl { position: absolute; top: 11px; right: var(--sp-3); min-height: 0; margin: 0; } /* the ⋯ centred on the title row */
.card.is-stat > .hl { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: var(--sp-2); }
.card.is-stat .hl-v { font-size: var(--fs-tile); line-height: 30px; letter-spacing: var(--tr-tile); }
.hl-sub { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); min-height: 16px; }
.card.is-stat > .card-body, .card.is-stat > .legend { display: none; }
.spark { position: absolute; left: 0; bottom: 0; width: 100%; height: var(--spark-h); display: block; pointer-events: none; border-radius: 0 0 calc(var(--r-card) - 1px) calc(var(--r-card) - 1px); overflow: hidden; }
.spark path { vector-effect: non-scaling-stroke; }
/* it draws in from the left once, as its tile is first shown */
.page > .card:not(.is-held) .spark { animation: wipe-in var(--t-slow) var(--ease) both; }
@keyframes wipe-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (min-width: 761px) and (hover: hover) {
  /* with a pointer the tile's ⋯ shows when the tile is pointed at, holds focus or has its menu open */
  .card.is-stat .icon-btn.more { opacity: 0; }
  .card.is-stat:hover .icon-btn.more, .card.is-stat:focus-within .icon-btn.more, .card.is-stat .icon-btn.more[aria-expanded="true"] { opacity: 1; }
}
/* a pointer tile (Overview) opens the card it summarises */
.card.is-pointer { cursor: pointer; }
.card.is-pointer:hover .card-title, .card.is-pointer:focus-visible .card-title { color: var(--text); }
.card.is-pointer:active::before { filter: brightness(2); }
.card.is-pointer:focus-visible { outline: var(--ring); outline-offset: var(--ring-off); }
/* a chart on the summary page: its title opens the card it summarises */
.card-title.is-pointer { cursor: pointer; transition: color var(--t-fast) var(--ease); }
.card-title.is-pointer::after { content: '\203A'; margin-left: var(--sp-2); color: var(--text-3); transition: color var(--t-fast) var(--ease); }
.card-title.is-pointer:hover, .card-title.is-pointer:focus-visible { text-decoration: none; }
.card-title.is-pointer:hover::after, .card-title.is-pointer:focus-visible::after { color: var(--brand); }

/* ranked lists and the cohort heatmap sit in the card as tables */
.card-body > .tscroll .tbl:not(.tbl-mk) th:first-child, .card-body > .tscroll .tbl:not(.tbl-mk) td:first-child { padding-left: var(--sp-5); }
.card-body > .tscroll .tbl:not(.tbl-mk) th:last-child, .card-body > .tscroll .tbl:not(.tbl-mk) td:last-child { padding-right: var(--sp-5); }
.card-body > .tscroll .tbl:not(.tbl-mk) thead th { position: static; border-top: 1px solid var(--line); }
.c-rank { width: 64px; color: var(--text-3); }
.tbl tbody th.c-rank { color: var(--text-3); }
/* a row set apart in a ranked list (Omni among the venues): the selected market row's treatment */
.tbl tr.is-self > * { background: var(--brand-fill); }
.tbl tr.is-self > th { box-shadow: inset 2px 0 0 var(--brand); color: var(--text); }
.addr { font: var(--fw-text) var(--fs-12)/var(--lh-12) var(--mono); color: var(--text); }
a.addr:hover { color: var(--brand); text-decoration: none; }
.hscroll { overflow-x: auto; overscroll-behavior-x: contain; }
/* the statement: line items as rows, periods as columns; the first column stays put */
.st th, .st td { height: 36px; padding: 0 var(--sp-4); }
.st thead th { font-family: var(--sans); font-size: var(--fs-12); font-variant-numeric: var(--nums); }
.st thead th a { color: var(--text-3); }
.st thead th a:hover { color: var(--brand); text-decoration: none; }
.st .st-l { position: sticky; left: 0; z-index: 1; min-width: 264px; background: var(--card-solid); font: var(--fw-text) var(--fs-13)/var(--lh-12) var(--sans); letter-spacing: var(--tr-13); color: var(--text-2); }
.st thead .st-l { z-index: 3; background: var(--card-solid); }
.st td { min-width: 104px; color: var(--text-2); }
.st .st-s { color: var(--text); background: rgba(255, 255, 255, 0.02); }
.st thead .st-s { color: var(--text-2); font-family: var(--sans); font-size: var(--fs-12); background: var(--hover-solid); }
.st .st-e { box-shadow: inset -1px 0 0 var(--line-strong); }
.st tr.is-strong > .st-l, .st tr.is-strong > td { color: var(--text); font-weight: var(--fw-strong); }
.st tr.is-strong > td { font-weight: var(--fw-label); }
.st tr.is-rule > * { border-top: 1px solid var(--line-strong); }
.st tbody tr:hover > .st-l { background: var(--hover-solid); }
.hm th, .hm td { height: 36px; }
.hm th:first-child { position: sticky; left: 0; z-index: 1; background: var(--card-solid); }
.hm tbody th { font-family: var(--sans); font-size: var(--fs-13); letter-spacing: var(--tr-13); color: var(--text-2); }
.hm .hm-c { padding: 2px 1px; text-align: center; min-width: 40px; }
.hm tr > .hm-c:last-child { padding-right: var(--sp-5); }
.hm thead .hm-c { padding: 0 1px; }
.hm td.num { padding-right: var(--sp-3); }
.hm-v { display: block; height: 32px; border-radius: var(--r-sm); font: var(--fw-label) var(--fs-11)/32px var(--mono); font-variant-numeric: var(--nums); }
.hm tbody tr:hover > * { background: none; }
/* every card in a row takes the row's height, so no row ends with a tall card beside a short one */

/* ---------- the Research Library: title, author, publisher, date ---------- */
.lib { padding: var(--sp-2) var(--sp-6) var(--sp-2); }
.lib-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 140px 180px 120px;
  align-items: center; column-gap: var(--sp-6);
  min-height: 48px; margin: 0 calc(-1 * var(--sp-3)); padding: var(--sp-1) var(--sp-3);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
}
.lib-row:last-child { border-bottom: 0; }
.lib-row.th-head { min-height: 32px; font: var(--fw-label) var(--fs-12)/var(--lh-12) var(--sans); letter-spacing: var(--tr-12); color: var(--text-3); border-bottom-color: var(--line-strong); }
.lib-row.th-head > :last-child, .lib-d { text-align: right; }
.lib-t { font: var(--fw-strong) var(--fs-13)/var(--lh-13) var(--sans); letter-spacing: var(--tr-13); }
.lib-t a { color: var(--text); }
.lib-t a:hover { color: var(--brand); text-decoration: none; }
.lib-c { font: var(--fw-text) var(--fs-13)/var(--lh-13) var(--sans); color: var(--text-2); }
/* dates are prose, not a column of figures: the text face, with tabular numerals */
.lib-d { font: var(--fw-text) var(--fs-13)/var(--lh-13) var(--sans); font-variant-numeric: var(--nums); color: var(--text-2); white-space: nowrap; }
/* a piece not yet out: a quiet tag after its title */
.tag-sched, .tag-new { display: inline-block; margin-left: var(--sp-2); padding: 0 var(--sp-1); border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: var(--fw-label) var(--fs-11)/14px var(--sans); letter-spacing: var(--tr-11); color: var(--text-3); vertical-align: 1px; white-space: nowrap; }
.tag-new { color: var(--text-2); border-color: var(--line-hover); }

/* the market page: five cards on the page grid */
.mkpage { display: contents; }

/* the Data page */
.stack { display: grid; gap: var(--gap); }
.ds-list { margin-top: var(--sp-3); }
.ds-row {
  display: grid; grid-template-columns: 168px minmax(0, 1fr) 192px 112px;
  align-items: center; column-gap: var(--sp-6);
  min-height: 40px; margin: 0 calc(-1 * var(--sp-3)); padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.ds-row:last-child { border-bottom: 0; }
.ds-n { font: var(--fw-label) var(--fs-13)/var(--lh-13) var(--sans); color: var(--text); }
.ds-d { font: var(--fw-text) var(--fs-13)/var(--lh-13) var(--sans); color: var(--text-2); }
.ds-a { font: var(--fw-text) var(--fs-11)/var(--lh-11) var(--sans); letter-spacing: var(--tr-11); font-variant-numeric: var(--nums); color: var(--text-3); text-align: right; white-space: nowrap; }
/* a dataset's as-of time fills in after the page shows: its line is there from the start (a phone gives it a row) */
.ds-a.is-file { min-height: 16px; }
.ds-g { display: flex; justify-content: flex-end; gap: var(--sp-2); }
.ds-b {
  display: inline-flex; align-items: center; height: 28px; padding: 0 var(--sp-3);
  background: var(--fill); border-radius: var(--r-ctl);
  font: var(--fw-label) var(--fs-12)/1 var(--sans); letter-spacing: var(--tr-12); color: var(--text-2);
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.ds-b:hover:not(:disabled):not([aria-disabled]) { color: var(--text); background: var(--fill-hover); text-decoration: none; }
.ds-b:active:not(:disabled):not([aria-disabled]) { background: var(--fill-press); }
.ds-b:disabled, .ds-b[aria-disabled] { color: var(--text-off); cursor: default; pointer-events: none; }
.th-group { margin: var(--sp-6) 0 var(--sp-1); font: var(--fw-strong) var(--fs-13)/var(--lh-13) var(--sans); color: var(--text-2); }
.th-sec { margin-right: var(--sp-1); font-weight: var(--fw-label); color: var(--text-3); }

/* ---------- methodology ---------- */
.method { padding: var(--sp-6) var(--sp-6) var(--sp-3); }
.method-h { font: var(--fw-strong) var(--fs-15)/var(--lh-15) var(--sans); letter-spacing: var(--tr-15); }
.method-row {
  display: grid; grid-template-columns: 300px minmax(0, 1fr) 240px; gap: var(--sp-1) var(--sp-8);
  margin: 0 calc(-1 * var(--sp-3)); padding: var(--sp-3);
  border-bottom: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  transition: background-color var(--t-fast) var(--ease);
}
a.method-row:hover { background: var(--fill); text-decoration: none; }
.method-tab:last-child .method-row:last-child { border-bottom: 0; }
.method-t { font: var(--fw-strong) var(--fs-13)/var(--lh-13) var(--sans); }
.method-i { font: var(--fw-text) var(--fs-13)/var(--lh-13) var(--sans); color: var(--text-2); max-width: 70ch; }
.method-s { font: var(--fw-text) var(--fs-11)/var(--lh-13) var(--sans); color: var(--text-3); text-align: right; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .panels, .panels.is-six, .panels.is-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panels.is-five > .panel, .panels.is-five > .panel:nth-child(-n+2) { grid-column: span 1; }
  .panels.is-five > .panel:last-child:nth-child(odd) { grid-column: span 2; }
  .method-row { grid-template-columns: 240px minmax(0, 1fr); }
  .method-s { grid-column: 2; text-align: left; }
}

@media (max-width: 1320px) {
  .tscroll { overflow-x: auto; overscroll-behavior-x: contain; }
  .tbl-mk thead th { top: 0; }
  .tbl-mk th:first-child { position: sticky; left: 0; z-index: 1; }
  .tbl-mk thead th:first-child { z-index: 3; }
  .tbl-mk tbody th { box-shadow: inset -1px 0 0 var(--line); }
  .tbl-mk tbody tr:hover > th { background: var(--hover-solid); }
}

@media (max-width: 760px) {
  .card { padding: var(--sp-4); }
  .card.is-stat { padding: 14px var(--sp-4); }
  /* the ⋯ menu rides the title row; the controls take their own row beneath */
  .card-t { padding-right: var(--sp-8); }
  .card-ctl { margin-left: 0; width: 100%; min-height: 0; }
  .card-ctl .more { position: absolute; top: var(--sp-4); right: var(--sp-3); margin: 0; }
  .card.is-stat .card-ctl .more { top: 11px; right: 11px; height: 24px; }
  .card-ctl:has(> .more:only-child) { display: contents; }
  /* the camera rides the title row beside the ⋯ */
  .card-ctl .cam { position: absolute; top: var(--sp-4); right: calc(var(--sp-3) + 28px); margin: 0; }
  .card:has(> .card-head .cam) .card-t { padding-right: calc(var(--sp-8) + 28px); }
  .card-ctl:has(> .cam):not(:has(> :not(.cam):not(.more))) { display: contents; }
  .card-head { gap: var(--sp-2); }
  .hl-v { font-size: var(--fs-28); line-height: var(--lh-28); letter-spacing: var(--tr-28); }
  .card.is-stat .hl-v { font-size: var(--fs-28); letter-spacing: var(--tr-28); }
  .tscroll { margin: 0 calc(-1 * var(--sp-4)); }
  .tbl-mk th:first-child, .tbl-mk td:first-child { padding-left: var(--sp-4); }
  .tbl-mk th:last-child, .tbl-mk td:last-child { padding-right: var(--sp-4); }
  .card-body > .tscroll .tbl:not(.tbl-mk) th:first-child, .card-body > .tscroll .tbl:not(.tbl-mk) td:first-child { padding-left: var(--sp-4); }
  .card-body > .tscroll .tbl:not(.tbl-mk) th:last-child, .card-body > .tscroll .tbl:not(.tbl-mk) td:last-child { padding-right: var(--sp-4); }
  .mkt-n { max-width: 132px; }
  .search { flex: 1 1 96px; min-width: 0; }
  .search-in { width: 100%; min-width: 0; }
  .panels, .panels.is-six, .panels.is-five { grid-template-columns: minmax(0, 1fr); }
  .panels.is-five > .panel, .panels.is-five > .panel:nth-child(-n+2), .panels.is-five > .panel:last-child:nth-child(odd) { grid-column: span 1; }
  .panels.is-quad { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-3); }
  .panels.is-quad.is-two { grid-template-columns: minmax(0, 1fr); }
  .ul-r, .ul-ax { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-1); }
  .ul-ax > .ul-l { display: none; }
  .ul-r > .ul-l { flex-direction: row; gap: var(--sp-2); }
  .ul-tick:nth-child(2), .ul-tick:nth-child(4) { display: none; }   /* launch, two years, four years */

  .method { padding: var(--sp-5) var(--sp-4) var(--sp-2); }
  .st .st-l { min-width: 152px; max-width: 152px; white-space: normal; line-height: 16px; }
  .st td { min-width: 92px; }
  .st th, .st td { padding: 0 var(--sp-3); }
  .lib { padding: var(--sp-2) var(--sp-4); }
  /* a phone stacks each row: the title, then author, publisher and date on one line */
  .lib-row { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: var(--sp-1); column-gap: var(--sp-3); padding: var(--sp-3); }
  .lib-row .lib-t { grid-column: 1 / -1; }
  .lib-row.th-head { display: none; }
  .ds-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--sp-1); column-gap: var(--sp-3); }
  .ds-d { grid-column: 1 / -1; grid-row: 2; }
  .ds-a { grid-column: 1; text-align: left; }
  .ds-g { grid-row: 1; grid-column: 2; }
  .method-row { grid-template-columns: minmax(0, 1fr); }
  .method-s { grid-column: 1; }
}

/* Markets, All markets: while the TradFi share card is off the page its two neighbours share the row */
.page:has(> [data-card="tf.share"][hidden]) > [data-card="mk.listed"],
.page:has(> [data-card="tf.share"][hidden]) > [data-card="mk.concentration"] { grid-column: span 6; }
@media (max-width: 760px) {
  .page:has(> [data-card="tf.share"][hidden]) > [data-card="mk.listed"],
  .page:has(> [data-card="tf.share"][hidden]) > [data-card="mk.concentration"] { grid-column: span 12; }
}

/* ---------- quick search (js/search.js): a text control, then a box and a list; no icons ---------- */
.qs-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex: none;
  height: 32px; padding: 0 var(--sp-2) 0 var(--sp-3);
  background: var(--fill); border: 1px solid transparent; border-radius: var(--r-ctl);
  font: var(--fw-label) var(--fs-12)/1 var(--sans); letter-spacing: var(--tr-12); color: var(--text-3);
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.qs-btn:hover { color: var(--text); background: var(--fill-hover); }
.qs-btn:active { background: var(--fill-press); }
.qs-k { padding: 1px var(--sp-1); border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: var(--fw-label) var(--fs-11)/14px var(--sans); color: var(--text-3); }
.rail-foot .qs-btn { width: 104px; margin-left: var(--sp-2); }
/* a card that waits to be read (card.js `lazy`) keeps its place, quiet */
.card.is-lazy > .card-body, .card.is-lazy > .legend, .card.is-lazy > .hl { visibility: hidden; }
.mbar .qs-btn { display: none; }
@media (max-width: 760px) {
  .mbar .qs-btn { display: inline-flex; width: 72px; justify-content: center; margin-left: auto; margin-right: var(--sp-1); }
  .mbar .qs-btn .qs-k, .rail-foot .qs-btn { display: none; }
}
