/* /stables/ supply tracker (Kai 2026-10-13, assets/stable-market.js). Tokens only; sizes follow DESIGN.md. */
.sm-card { padding: var(--card-pad); min-width: 0; }
.sm-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.sm-head > div { min-width: 0; flex: 1 1 320px; }
.sm-head h2 { margin: 0 0 var(--space-1); font-size: var(--fs-lg); font-weight: 600; letter-spacing: var(--ls-title); }
.sm-lede { margin: 0; font-size: var(--fs-md); line-height: var(--lh-prose); color: var(--text-mid); max-width: 760px; }
.sm-head-r { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-left: auto; }
.sm-share { flex: none; margin-left: auto; }
.sm-tabs { display: inline-flex; gap: var(--space-1); }
.sm-foot { margin: var(--space-3) 0 0; font-size: var(--fs-xs); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.sm-foot a { color: var(--text-mid); }
.sm-v { font-variant-numeric: tabular-nums; }
.sm-tbl-wrap { min-width: 0; }

/* total */
.sm-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); margin-bottom: var(--space-3); }
.sm-big { font-size: var(--fs-3xl); font-weight: 600; letter-spacing: var(--ls-title); line-height: var(--lh-tight); color: var(--text); font-variant-numeric: tabular-nums; }
.sm-big-l { font-size: var(--fs-md); color: var(--text-mid); }
.sm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-bottom: var(--space-4); }
.sm-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-2); color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.sm-tile:hover, .sm-tile:focus-visible { border-color: var(--border-strong); }
.sm-tile-k { font-size: var(--fs-xs); color: var(--text-dim); font-weight: 600; }
.sm-tile-v { font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: var(--ls-title); white-space: nowrap; }
.sm-tile-s { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.sm-sharebar { display: flex; height: 14px; border-radius: var(--radius-ctl); overflow: hidden; border: 1px solid var(--border); }
.sm-seg { height: 100%; min-width: 1px; }
.sm-seg + .sm-seg { border-left: 1px solid var(--bg); }
.sm-seg.go { cursor: pointer; }
.sm-seg.go:hover { filter: brightness(1.15); }
.sm-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-top: var(--space-2); font-size: var(--fs-xs); color: var(--text-mid); }
.sm-lg { display: inline-flex; align-items: center; gap: var(--space-1); padding: 0; border: 0; background: none; color: inherit; font: inherit; }
button.sm-lg { cursor: pointer; }
button.sm-lg:hover span { color: var(--text); text-decoration: underline; }
.sm-lg i { width: 9px; height: 9px; border-radius: 2px; flex: none; display: inline-block; }
.sm-lg b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sm-note { margin: var(--space-3) 0 0; font-size: var(--fs-md); line-height: var(--lh-prose); color: var(--text-mid); }
.sm-note b { color: var(--text); font-variant-numeric: tabular-nums; }
.sm-link { padding: 0; border: 0; background: none; color: var(--text-mid); font: inherit; cursor: pointer; border-bottom: 1px dotted var(--text-dim); }
.sm-link:hover { color: var(--text); }
.sm-left { margin-top: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-2); font-size: var(--fs-md); }
.sm-left ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-1); }
.sm-left li { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); }

/* tables */
.sm-sort { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
.sm-sort:hover { color: var(--text); }
.sm-top tbody tr.go, .sm-chains tbody tr.go { cursor: pointer; }
.sm-top tbody tr.sm-on td, .sm-chains tbody tr.sm-on td { background: rgba(var(--accent-rgb), .07); }
.sm-sym { display: inline-flex; align-items: center; font-weight: 600; }
.sm-tags { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); margin-left: var(--space-1); vertical-align: 1px; }
.sm-share-c { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--space-1); }
.sm-share-c i { display: inline-block; height: 4px; border-radius: 2px; background: var(--accent); opacity: .55; }
.sm-sub td { background: var(--surface-2); }
.sm-comp { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); padding: var(--space-1) 0; font-size: var(--fs-md); }
.sm-comp-h { color: var(--text-dim); margin-right: var(--space-1); }
.sm-chip { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-ctl); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-md); cursor: pointer; }
.sm-chip:hover { border-color: var(--border-strong); }
.sm-more { margin: var(--space-2) 0 0; }

/* coin detail */
.sm-coin { margin-top: var(--space-3); padding: var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-card); background: var(--surface-2); scroll-margin-top: 90px; }
.sm-coin-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.sm-coin-t { display: flex; align-items: center; gap: var(--space-2); }
.sm-coin-t h3 { margin: 0; font-size: var(--fs-xl); font-weight: 600; letter-spacing: var(--ls-title); }
.sm-coin-k { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; }
.sm-coin-k div { display: flex; flex-direction: column; }
.sm-coin-k dt { font-size: var(--fs-xs); color: var(--text-dim); }
.sm-coin-k dd { margin: 0; font-size: var(--fs-base); font-weight: 600; font-variant-numeric: tabular-nums; }
.sm-coin-k dd .vn-sub { display: inline; margin-left: var(--space-1); font-weight: 400; }
.sm-coin-act { display: inline-flex; gap: var(--space-1); margin-left: auto; }
.sm-coin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-4); }
.sm-coin-grid h4 { margin: 0 0 var(--space-2); font-size: var(--fs-md); font-weight: 600; }
.sm-coin-ch-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1); margin-bottom: var(--space-2); }
.sm-coin-ch-h h4 { margin: 0; }
.sm-cbar { display: grid; grid-template-columns: minmax(70px, 110px) minmax(40px, 1fr) auto 48px; align-items: center; gap: var(--space-2); margin-bottom: var(--space-1); font-size: var(--fs-md); }
.sm-cbar-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-cbar-t { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.sm-cbar-t i { display: block; height: 100%; background: var(--accent); opacity: .7; }
.sm-cbar-v, .sm-cbar-s { text-align: right; font-variant-numeric: tabular-nums; }
.sm-cbar-s { color: var(--text-dim); }
.sm-coin-all { margin-top: var(--space-3); }
.sm-coin-all summary { cursor: pointer; font-size: var(--fs-md); color: var(--text-mid); }

/* issuance */
.sm-flow-sum { margin: 0 0 var(--space-3); font-size: var(--fs-md); color: var(--text-mid); }
.sm-flow-sum b { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.sm-flow-sum .vn-sub { display: block; margin-top: 2px; }
.sm-flow-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.sm-flow-cols h3 { margin: 0 0 var(--space-2); font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.sm-frow { display: grid; grid-template-columns: minmax(90px, 130px) minmax(40px, 1fr) auto 60px; align-items: center; gap: var(--space-2); width: 100%; padding: var(--space-1) var(--space-1); border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); font: inherit; font-size: var(--fs-md); text-align: left; cursor: pointer; }
.sm-frow:hover { background: rgba(var(--accent-rgb), .05); }
.sm-frow-s { display: inline-flex; align-items: center; gap: var(--space-1); min-width: 0; overflow: hidden; }
/* 2026-11-11: at 360/390px the "new" tag after a long symbol passed the clipped name cell by 4px (deploy audit hoverflow); it wraps to the next line instead */
#smIssuerRows .sm-frow-s { flex-wrap: wrap; }
.sm-frow-t { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.sm-frow-t i { display: block; height: 100%; }
.sm-frow-t i.in { background: var(--gain); opacity: .65; }
.sm-frow-t i.out { background: var(--loss); opacity: .65; margin-left: auto; }
.sm-frow-v, .sm-frow-p { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sm-frow-p { font-size: var(--fs-xs); }

/* charts */
.sm-chart-top { margin: 0 0 var(--space-2); font-size: var(--fs-md); color: var(--text-mid); font-variant-numeric: tabular-nums; }
.sm-chart-top b { color: var(--text); }
.sm-chart { position: relative; min-height: 120px; }
.sm-svg { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: pan-y; }
.sm-tip { position: absolute; top: 4px; width: 180px; padding: var(--space-1) var(--space-2); border: 1px solid var(--border-strong); border-radius: var(--radius-ctl); background: var(--surface); font-size: var(--fs-xs); color: var(--text-mid); pointer-events: none; font-variant-numeric: tabular-nums; }
.sm-tip b { display: block; color: var(--text); }
.sm-tip span { display: block; }
.sm-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: var(--space-1); }

@media (max-width: 720px) {
  .sm-tiles { gap: var(--space-1); }
  .sm-tile { padding: var(--space-2); }
  .sm-tile-v { font-size: var(--fs-base); }
  .sm-coin-grid, .sm-flow-cols { grid-template-columns: minmax(0, 1fr); }
  .sm-m-hide { display: none; }
  .sm-big { font-size: var(--fs-2xl); }
  .sm-frow { grid-template-columns: minmax(80px, 110px) minmax(30px, 1fr) auto 52px; }
}

/* helpers scoped to the tracker cards (venues.css is not loaded on /stables/) */
.sm-card .vn-sub { color: var(--text-dim); font-size: var(--fs-xs); }
.sm-card td .vn-sub { display: block; margin-top: 1px; }
.sm-card .vn-note { margin: var(--space-2) 0 0; font-size: var(--fs-md); line-height: var(--lh-prose); color: var(--text-mid); }
.sm-card .vn-tag { display: inline-block; font-size: var(--fs-xs); font-weight: 600; padding: 1px var(--space-1); border-radius: var(--radius-ctl); border: 1px solid var(--border-strong); color: var(--text-mid); white-space: nowrap; }
.sm-card .vn-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }   /* no frame inside the card */
.sm-card .vn-tbl { font-variant-numeric: tabular-nums; }
.sm-card .vn-tbl thead th { white-space: nowrap; }
.sm-card .vn-tbl tbody td { white-space: nowrap; vertical-align: middle; }
.sm-card .vn-tbl tbody tr:last-child td { border-bottom: 0; }
.sm-card .vn-tbl td.num, .sm-card .vn-tbl th.num { text-align: right; }
.sm-card .sm-tags { display: flex; margin: 3px 0 0; }
/* + green / − red on every change, the percent line included (table cell colour otherwise wins) */
.sm-card .gain { color: var(--gain); }
.sm-card .loss { color: var(--loss); }
.sm-card .flat { color: var(--flat); }
.sm-card .gain .vn-sub, .sm-card .loss .vn-sub { color: inherit; opacity: .85; }
.sm-card .tbl tbody td.num.gain { color: var(--gain); }
.sm-card .tbl tbody td.num.loss { color: var(--loss); }
.sm-card .tbl tbody td.num.flat { color: var(--flat); }

/* Density (Kai 2026-10-13, approved mock docs/density-2026-10-13): title and lede on one line, the total with its
   24h·7d·30d tiles beside it (no card inside a card), the lede of the total card in its title tooltip, and table rows
   on one line on wide screens (second lines sit beside the value instead of under it). Spacing from the space tokens. */
.sf-head { padding-top: var(--space-4); display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-6); align-items: baseline; }
.sf-head h1 { margin: 0; }
.sf-head p.desc { grid-column: 2; margin: 0; font-size: var(--fs-md); color: var(--text-mid); max-width: none; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sf-head + .sm-jump, .sm-jump { margin: var(--space-2) 0 0; }
#supply { margin-top: var(--space-4); }
.sm-head { margin-bottom: var(--space-2); }
#supply .sm-lede { display: none; }
@media (min-width: 1200px) {
  #smSum { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-6); align-items: center; }
  #smSum .sm-total { margin: 0; }
  #smSum .sm-tiles { margin: 0; }
  #smSum .sm-tile { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); padding: var(--space-2) var(--space-3); }
  #smSum .sm-tile-v { font-size: var(--fs-lg); }
  #smSum > :not(.sm-total):not(.sm-tiles) { grid-column: 1 / -1; }
  #smSum .sm-sharebar { margin-top: var(--space-3); }
}
@media (min-width: 1101px) {
  .sm-card td:not(.num) .vn-sub { display: inline; margin: 0 0 0 var(--space-2); }
  .sm-card td.num .vn-sub { display: none; }   /* moved to the cell title (assets/stable-market.js subTitles) */
  .sm-card .vn-tbl tbody td { vertical-align: baseline; padding-block: var(--space-1); }
}
@media (max-width: 900px) {
  .sf-head { display: block; }
  .sf-head p.desc { margin-top: var(--space-1); }
}

/* Same-window supply comparisons use the shared decision-page primitives. */
.sm-insights { margin-bottom: var(--space-4); }
.sm-insights .insight-card { border: 0; border-radius: 0; padding: 0; background: transparent; }
.sm-insights .insight-label { margin-top: 0; }
.sm-compare-fill.gain { background: var(--gain); }
.sm-compare-fill.loss { background: var(--loss); }
.sm-chain-jump { display: inline-flex; align-items: center; min-height: var(--control-height); color: var(--accent); }
.sm-tile[aria-pressed="true"] { background: rgba(var(--accent-rgb), .12); }
.sm-tile[aria-pressed="true"] .sm-tile-k::after { content: ' ✓'; }
#smIssuerRows { scroll-margin-top: calc(var(--control-height) * 2); }
.sm-total-detail { margin-top: var(--space-2); font-size: var(--fs-md); }
.sm-total-detail summary { display: list-item; min-height: var(--control-height); align-content: center; cursor: pointer; color: var(--text-mid); }

/* round 3 2026-10-15 (P13-06): "Copy table" under the By stablecoin table */
.sf-tbl-act { margin: var(--space-2) var(--card-pad) var(--card-pad); }
.sf-copy { min-height: var(--control-height); padding: 0 var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-ctl); background: var(--surface); color: var(--text-mid); font: inherit; font-size: var(--fs-md); cursor: pointer; }
.sf-copy:hover { color: var(--text); border-color: var(--border-strong); }
@media print { .sf-tbl-act { display: none !important; } }
