/* hybnomic.com/feed: mobile only. Always light (data-theme="light" on <html>), whatever the phone uses. Grouped screen (cards on bg-grouped), Compact type (trading),
   Korean market colours (red up, blue down) where the user ruled them charts (2026-10-20): price moves,
   the fear & greed gauge, futures long/short, ETF flows, trader P&L and long/short, and the metric
   changes (stablecoin, DeFi, Korea premium). Tokens from design-system.css.
   Sections are 32 apart, not the 64 of CLAUDE.md §4: a dense market page; revisit as it develops. */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg-grouped);
}
body {
  margin: 0;
  background: var(--bg-grouped);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
:lang(ko) {
  word-break: keep-all;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}
ul,
ol {
  list-style: none;
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Phone width even on a desktop browser */
.fd {
  max-width: 480px;
  margin: 0 auto;
  padding: var(--space-24) var(--space-16) var(--space-40);
  padding-top: max(var(--space-24), env(safe-area-inset-top));
  padding-bottom: max(var(--space-40), env(safe-area-inset-bottom));
}

.fd-head h1,
.fd-sec h2 {
  text-wrap: balance;
}
.fd-head h1 {
  font-size: var(--text-title-1-size);
  line-height: var(--text-title-1-line);
  font-weight: var(--text-title-1-weight);
  letter-spacing: var(--tracking-title);
}
.fd-updated {
  margin-top: var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
}

/* ---- page head: title | seconds to the next refresh; the data's time under the title ---- */
.fd-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}
/* Shown only when refreshing fails: the shared warning triangle + body text */
.fd-live {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-primary);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
  font-weight: 600;
  white-space: nowrap;
}
.fd-live:empty {
  display: none;
}
/* Right of the title: the seconds to the next refresh */
.fd-status {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
  font-variant-numeric: tabular-nums;
}
/* Seconds to the next refresh: tabular figures so the line does not shift as they count down */
.fd-count {
  font-variant-numeric: tabular-nums;
}

/* The bar that sticks once the head has scrolled away: material bar + bottom separator */
.fd-sticky {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: env(safe-area-inset-top) var(--space-16) 0;
  background: var(--material-bar);
  -webkit-backdrop-filter: var(--blur-bar);
  backdrop-filter: var(--blur-bar);
  border-bottom: var(--stroke-width-hairline) solid var(--stroke-separator);
  transform: translateY(-100%);
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.fd-sticky.is-on {
  transform: none;
}
.fd-sticky-in {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  width: 100%;
  max-width: calc(480px - var(--space-32));
  min-height: 48px;
  font-size: var(--text-footnote-size);
}
.fd-sticky-in b {
  white-space: nowrap;
  font-size: var(--text-headline-size);
  line-height: var(--text-headline-line);
  font-weight: 700;
}
.fd-sticky-time {
  margin-left: auto;
}
.fd-sticky-time,
.fd-sticky-in .fd-count {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (prefers-reduced-transparency: reduce) {
  .fd-sticky {
    background: var(--surface-card);
  }
}

.fd-sec {
  margin-top: var(--space-32);
}
.fd-sec h2 {
  font-size: var(--text-title-3-size);
  line-height: var(--text-title-3-line);
  font-weight: var(--text-title-3-weight);
  letter-spacing: var(--tracking-title);
  margin-bottom: var(--space-12);
}
.fd-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}
.fd-sec-head h2 {
  margin-bottom: 0;
}
.fd-lead {
  color: var(--text-secondary);
  font-size: var(--text-subhead-size);
  line-height: var(--text-subhead-line);
  margin: calc(var(--space-4) * -1) 0 var(--space-12);
  text-wrap: pretty;
}
.fd-note {
  margin-top: var(--space-8);
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
  text-wrap: pretty;
}
.fd-body {
  font-size: var(--text-subhead-size);
  line-height: var(--text-subhead-line);
  text-wrap: pretty;
}

/* Cards sit on the grouped background and are told apart by colour alone */
.fd-card {
  background: var(--surface-card);
  border-radius: var(--radius-card);
}
.fd-stack {
  display: grid;
  gap: var(--space-16);
}
.fd-empty {
  padding: var(--space-20);
  color: var(--text-secondary);
  font-size: var(--text-subhead-size);
}

/* ---- rows ---- */
.fd-list {
  padding: var(--space-8) var(--space-20);
}
.fd-row {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  min-height: 60px;
  padding: var(--space-8) 0;
}
.fd-row + .fd-row {
  border-top: var(--stroke-width-hairline) solid var(--stroke-separator);
}
.fd-row.fd-empty {
  padding: var(--space-16) 0;
}
/* Price lists are one table: the rows share the list's columns (subgrid), so names start, prices end
   and charts start on the same line in every row. coin | name | price over change | 24h chart */
.fd-table {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 88px;
  column-gap: var(--space-12);
}
/* Head and body of the majors table sit on the card's columns too */
.fd-table > .fd-thead,
.fd-table > .fd-tbody,
.fd-tbody > .fd-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
}
/* Column labels (the sort is the segmented control in the section head) */
.fd-thead {
  min-height: 36px;
  border-bottom: var(--stroke-width-hairline) solid var(--stroke-separator);
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
  white-space: nowrap;
}
.fd-th-price {
  justify-self: end;
}
.fd-th-coin {
  grid-column: 1 / 3;
}
.fd-coin {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
}
.fd-coin.is-text {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--fill-subtle);
  font-weight: 600;
}
/* An image from the API sits in the letter's cell (hidden until it has loaded and been measured)
   and removes itself if it fails. Round badges fill the circle; bare marks sit at 62% on a filled
   disc (fill, never a stroke ring), so every coin reads as the same circle. */
.fd-coin.is-text > * {
  grid-area: 1 / 1;
}
.fd-coin.is-text img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  visibility: hidden;
}
.fd-coin.has-img img {
  visibility: visible;
}
.fd-coin.has-img > span {
  visibility: hidden;
}
.fd-coin.is-badge {
  background: none;
}
.fd-coin.is-mark {
  background: var(--fill-subtle);
}
.fd-coin.is-mark img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}
.fd-coin.is-s {
  width: 28px;
  height: 28px;
  font-size: var(--text-footnote-size);
}
.fd-coin.is-l {
  width: 40px;
  height: 40px;
}
.fd-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.fd-name b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fd-name small,
.fd-price small,
.fd-weight small {
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
  white-space: nowrap;
}
.fd-price,
.fd-weight {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fd-price b,
.fd-weight b {
  font-weight: 600;
}
.fd-move {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fd-move.is-up {
  color: var(--market-up);
}
.fd-move.is-down {
  color: var(--market-down);
}
.fd-move.is-flat {
  color: var(--text-secondary);
}
/* Signed market numbers in the metric cards (user ruled them market moves, 2026-10-20) */
.fd-mk.is-up {
  color: var(--market-up);
}
.fd-mk.is-down {
  color: var(--market-down);
}
.fd-price b.is-up {
  color: var(--market-up);
}
.fd-price b.is-down {
  color: var(--market-down);
}
/* 24h line, the previous close dotted, a soft area under the line */
.fd-spark {
  --spark: var(--text-secondary);
  display: block;
  width: 100%;
  height: 32px;
  overflow: visible;
}
.fd-spark.is-up {
  --spark: var(--market-up);
}
.fd-spark.is-down {
  --spark: var(--market-down);
}
.fd-spark polyline {
  fill: none;
  stroke: var(--spark);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.fd-spark-base {
  stroke: var(--stroke-strong);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  vector-effect: non-scaling-stroke;
}
.fd-spark-top {
  stop-color: var(--spark);
  stop-opacity: 0.16;
}
.fd-spark-end {
  stop-color: var(--spark);
  stop-opacity: 0;
}
.fd-rank {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--fill-subtle);
  font-size: var(--text-footnote-size);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fd-rank.is-big {
  width: 32px;
  height: 32px;
  background: var(--surface-inverse);
  color: var(--text-on-inverse);
  font-size: var(--text-subhead-size);
}

.fd-skel {
  background: linear-gradient(90deg, var(--fill-faint), var(--fill-subtle), var(--fill-faint));
  background-size: 200% 100%;
  border-radius: var(--radius-s);
  margin: var(--space-8) 0;
  min-height: 44px;
  animation: fd-skel 1.2s linear infinite;
}
.fd-row.fd-skel + .fd-row.fd-skel {
  border-top: 0;
}
@keyframes fd-skel {
  to {
    background-position: -200% 0;
  }
}

/* ---- movers: rank · mark · name over symbol · change over price ---- */
.fd-mv {
  padding: var(--space-8) var(--space-20);
}
.fd-mv li {
  display: grid;
  grid-template-columns: 16px 32px minmax(0, 1fr) auto;
  column-gap: var(--space-12);
  align-items: center;
  min-height: 64px;
  padding: var(--space-8) 0;
}
.fd-mv li + li {
  border-top: var(--stroke-width-hairline) solid var(--stroke-separator);
}
.fd-mv li.fd-skel {
  display: block;
}
.fd-mv-rank {
  color: var(--text-secondary);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fd-mv-name,
.fd-mv-num {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fd-mv-num {
  align-items: flex-end;
  text-align: right;
}
.fd-mv-name b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fd-mv-name small,
.fd-mv-num small {
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fd-mv-pct {
  font-size: var(--text-title-3-size);
  line-height: var(--text-title-3-line);
  font-weight: 700;
  letter-spacing: var(--tracking-title);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fd-mv-pct.is-up {
  color: var(--market-up);
}
.fd-mv-pct.is-down {
  color: var(--market-down);
}

/* ---- reveal: a card's first time on screen (.is-pre until then) ----
   Headline numbers rise in, sell/buy bars fill from the outer ends, the 24-hour line draws and
   its area fades in after it, ETF bars grow from the zero line one after another (30 ms apart).
   Longer than UI motion on purpose: it explains the chart once per card. */
.fd-metric-value,
.fd-ls-num b {
  transition: opacity 400ms var(--ease-standard), transform 400ms var(--ease-standard);
}
.is-pre .fd-metric-value,
.is-pre .fd-ls-num b {
  opacity: 0;
  transform: translateY(6px);
}
.fd-split i {
  transition: transform 700ms var(--ease-standard) 100ms;
}
.fd-split .is-short {
  transform-origin: left;
}
.fd-split .is-long {
  transform-origin: right;
}
.is-pre .fd-split i {
  transform: scaleX(0);
}
.fd-area polyline {
  stroke-dasharray: 100;
  transition: stroke-dashoffset 600ms var(--ease-standard) 200ms;
}
.is-pre .fd-area polyline {
  stroke-dashoffset: 100;
}
.fd-area .fd-spark-area {
  transition: opacity 300ms var(--ease-standard) 450ms;
}
.is-pre .fd-area .fd-spark-area {
  opacity: 0;
}
.fd-flow-bar i {
  transition: transform 400ms var(--ease-standard) calc(150ms + var(--i, 0) * 30ms);
}
.fd-flow-bar .is-in {
  transform-origin: bottom;
}
.fd-flow-bar .is-out {
  transform-origin: top;
}
.is-pre .fd-flow-bar i {
  transform: scaleY(0);
}

/* A value that changed since the last refresh: a short wash of its market colour behind it */
/* Prices and changes carry a little inline room for the wash at all times, so nothing shifts */
.fd-table .fd-price b,
.fd-mv-pct {
  padding-inline: var(--space-4);
  margin-inline: calc(var(--space-4) * -1);
}
.is-tick-up,
.is-tick-down {
  border-radius: var(--radius-xs);
  animation: fd-tick 800ms var(--ease-standard);
}
.is-tick-up {
  --tick: var(--market-up);
}
.is-tick-down {
  --tick: var(--market-down);
}
@keyframes fd-tick {
  from {
    background-color: color-mix(in oklab, var(--tick) 18%, transparent);
  }
  to {
    background-color: transparent;
  }
}

/* ---- segmented control ---- */
.fd-seg {
  display: inline-flex;
  padding: var(--space-2);
  border-radius: var(--radius-s);
  background: var(--fill-subtle);
}
.fd-seg button {
  min-width: 56px;
  height: 28px;
  padding: 0 var(--space-12);
  border-radius: var(--radius-xs);
  font-size: var(--text-footnote-size);
  font-weight: 600;
  color: var(--text-secondary);
}
/* The pill stays 28 high (Compact S); the touch area reaches 44 above and below it */
.fd-seg button {
  position: relative;
}
.fd-seg button::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-8) * -1) 0;
}
.fd-seg button[aria-selected="true"] {
  background: var(--surface-card);
  color: var(--text-primary);
}

/* ---- Fear & greed index (alternative.me) ----
   One scale from cold to hot built from tokens: market-down blue -> chart violet -> market-up red.
   The colour lives on the gauge, the band behind the value and the small legend dots (chart marks);
   labels and numbers stay in text colours. */
.fd-fx .fd-metric-top {
  margin-bottom: calc(var(--space-4) * -1);
}
.fd-fx {
  --fx-xfear: var(--market-down);
  --fx-fear: color-mix(in oklch, var(--market-down) 50%, var(--chart-3));
  --fx-neutral: var(--chart-3);
  --fx-greed: color-mix(in oklch, var(--chart-3) 50%, var(--market-up));
  --fx-xgreed: var(--market-up);
  padding: var(--space-20);
  display: grid;
  gap: var(--space-16);
}
.fd-fx .is-xfear { --fx: var(--fx-xfear); }
.fd-fx .is-fear { --fx: var(--fx-fear); }
.fd-fx .is-neutral { --fx: var(--fx-neutral); }
.fd-fx .is-greed { --fx: var(--fx-greed); }
.fd-fx .is-xgreed { --fx: var(--fx-xgreed); }
/* gauge: gradient arc, tick dots, a ring marker that sweeps to the value */
.fd-fx-gauge {
  position: relative;
}
.fd-fx-gauge svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.fd-fx-arc {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 700ms var(--ease-standard);
}
.fd-fx-tick {
  fill: var(--fill-strong);
}
.fd-fx-marker {
  transform-box: view-box;
  transform: rotate(var(--deg));
  transition: transform 700ms var(--ease-standard) 100ms;
}
.fd-fx-marker circle {
  fill: var(--surface-card);
  stroke: var(--text-primary);
  stroke-width: 3;
}
.fd-fx.is-pre .fd-fx-arc {
  stroke-dashoffset: 100;
  transition: none;
}
.fd-fx.is-pre .fd-fx-marker {
  transform: rotate(0deg);
  transition: none;
}
.fd-fx-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-title);
}
.fd-fx-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--fx);
}
.fd-fx-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-8);
  border-radius: var(--radius-full);
  background: var(--fill-subtle);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
  font-weight: 600;
  white-space: nowrap;
}

/* Five bands behind a large gauge, period rows below */
.fd-fx-gauge.is-large {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}
.fd-fx-band {
  fill: var(--fill-faint);
  transition: fill var(--motion-release) var(--ease-standard);
}
.fd-fx-band.is-on {
  fill: color-mix(in oklab, var(--fx) 14%, transparent);
}
/* Band names and 0 / 100: HTML centred on a point of the gauge */
.fd-fx-tag {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
  text-align: center;
  white-space: nowrap;
}
.fd-fx-tag.is-on {
  color: var(--text-primary);
  font-weight: 700;
}
.fd-fx-tag.is-axis {
  font-size: var(--text-caption-2-size);
  line-height: var(--text-caption-2-line);
  font-variant-numeric: tabular-nums;
}
.fd-fx-center {
  position: absolute;
  inset: auto 0 var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.fd-fx-gauge.is-large .fd-fx-num {
  font-size: var(--text-large-title-size);
  line-height: var(--text-large-title-line);
}
/* Past values in one row of three: period and number, then the same band badge as the centre */
.fd-fx-past {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: var(--space-16);
  border-top: var(--stroke-width-hairline) solid var(--stroke-separator);
}
.fd-fx-past li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.fd-fx-past p {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
  white-space: nowrap;
}
.fd-fx-past p span {
  color: var(--text-secondary);
}
.fd-fx-past b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fd-center {
  text-align: center;
}
.fd-bars-axis {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
}
.fd-source {
  margin-top: calc(var(--space-8) * -1);
  color: var(--text-secondary);
  font-size: var(--text-caption-2-size);
  line-height: var(--text-caption-2-line);
  text-align: right;
}
.fd-source.is-section {
  margin-top: var(--space-4);
}

/* ---- long/short ---- */
.fd-ls {
  display: grid;
  gap: var(--space-8);
}
.fd-ls-num {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.fd-ls-num > span {
  display: flex;
  flex-direction: column;
}
.fd-ls-num .is-long {
  align-items: flex-end;
}
.fd-ls-num small {
  font-size: var(--text-footnote-size);
  font-weight: 600;
}
.fd-ls-num b {
  font-size: var(--text-title-2-size);
  line-height: var(--text-title-2-line);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fd-ls-num .is-long {
  color: var(--market-up);
}
.fd-ls-num .is-short {
  color: var(--market-down);
}
.fd-split.is-large {
  height: 16px;
}
.fd-split.is-large i {
  border-radius: var(--radius-xs);
}
.fd-ls-chart {
  margin-top: var(--space-8);
}
.fd-area {
  height: 48px;
}

/* ---- ETF flows ---- */
.fd-flow-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: var(--space-4);
}
.fd-flow-bars li {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
}
.fd-flow-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 72px;
}
/* Zero line in the middle: inflows grow up from it, outflows down */
.fd-flow-bar::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: var(--stroke-width-hairline) solid var(--stroke-default);
}
.fd-flow-bar i {
  position: absolute;
  left: 15%;
  right: 15%;
  max-height: 50%;
  border-radius: var(--space-2);
}
.fd-flow-bar .is-in {
  bottom: 50%;
  background: var(--market-up);
}
.fd-flow-bar .is-out {
  top: 50%;
  background: var(--market-down);
}
.fd-flow-bars small {
  color: var(--text-secondary);
  font-size: var(--text-caption-2-size);
  line-height: var(--text-caption-2-line);
  font-variant-numeric: tabular-nums;
}
.fd-flow-legend {
  display: flex;
  gap: var(--space-12);
  margin-top: var(--space-8);
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
}
.fd-flow-legend .is-in {
  color: var(--market-up);
  font-weight: 600;
}
.fd-flow-legend .is-out {
  color: var(--market-down);
  font-weight: 600;
}

/* ---- onchain metrics ---- */
.fd-metric {
  padding: var(--space-20);
  display: grid;
  gap: var(--space-8);
}
.fd-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}
.fd-metric h3,
.fd-fx h3 {
  font-size: var(--text-subhead-size);
  line-height: var(--text-subhead-line);
  font-weight: 600;
  color: var(--text-secondary);
}
.fd-metric-value {
  font-size: var(--text-title-2-size);
  line-height: var(--text-title-2-line);
  font-weight: 700;
  letter-spacing: var(--tracking-title);
  font-variant-numeric: tabular-nums;
}
.fd-metric-sub {
  margin-top: calc(var(--space-8) * -1);
  color: var(--text-secondary);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
}
.fd-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
  font-weight: 600;
  white-space: nowrap;
  background: var(--fill-subtle);
}
.fd-chip.is-caution {
  background: var(--warning-bg);
  color: var(--text-primary);
}
.fd-why summary {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: var(--space-4);
  min-height: 32px;
  color: var(--text-secondary);
  font-size: var(--text-footnote-size);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.fd-why:not([open]) summary {
  margin-bottom: calc(var(--space-8) * -1);
}
.fd-why summary::-webkit-details-marker {
  display: none;
}
.fd-why p {
  padding: var(--space-12);
  border-radius: var(--radius-m);
  background: var(--fill-faint);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
}

/* Metric rows: name over change line, value over chip, a caret; the row opens in place */
.fd-mrows {
  padding: var(--space-4) var(--space-20);
}
.fd-mrow + .fd-mrow {
  border-top: var(--stroke-width-hairline) solid var(--stroke-separator);
}
.fd-mrow summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  column-gap: var(--space-12);
  align-items: center;
  min-height: 64px;
  padding: var(--space-8) 0;
  list-style: none;
  cursor: pointer;
}
.fd-mrow summary::-webkit-details-marker {
  display: none;
}
.fd-mrow-name,
.fd-mrow-val {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fd-mrow-val {
  align-items: flex-end;
  gap: var(--space-4);
}
.fd-mrow-name b {
  font-weight: 600;
}
.fd-mrow-name small {
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
  font-variant-numeric: tabular-nums;
}
.fd-mrow-val b {
  font-size: var(--text-headline-size);
  line-height: var(--text-headline-line);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fd-mrow-caret {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: transform var(--motion-release) var(--ease-standard);
}
.fd-mrow details[open] .fd-mrow-caret {
  transform: rotate(180deg);
}
.fd-mrow-more {
  display: grid;
  gap: var(--space-12);
  padding-bottom: var(--space-16);
}
/* Only the explanation sits on a panel; the reading and the source stay plain lines */
.fd-mrow-more > p:not(.fd-body, .fd-source) {
  padding: var(--space-12);
  border-radius: var(--radius-m);
  background: var(--fill-faint);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
}

/* Icons sit in a square box the size of the icon */
.fd-ibox {
  flex: none;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
}
.fd-icon {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* ---- traders ---- */
/* The summary is information, not a page-head highlight: info status (tint + Fill icon + body text).
   The tint is mixed onto the card colour, not laid over the grey page, which turned it dusky navy. */
.fd-callout {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-l);
  background: color-mix(in oklab, var(--info-fill) 8%, var(--surface-card));
  color: var(--text-primary);
  font-size: var(--text-subhead-size);
  line-height: var(--text-subhead-line);
  font-weight: 600;
}
.fd-callout .fd-ibox {
  width: 16px;
  height: 16px;
  color: var(--info-fill);
}
.fd-trader {
  padding: var(--space-20);
  display: grid;
  gap: var(--space-16);
}
.fd-trader-head {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}
/* On a narrow phone the profile name wraps instead of pushing the P&L off the card */
.fd-trader-head .fd-name b {
  white-space: normal;
}
.fd-trader-head .fd-price b.is-up {
  color: var(--market-up);
}
.fd-trader-head .fd-price b.is-down {
  color: var(--market-down);
}
.fd-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* The three figures as rows in one faint panel: name left, value right, one line each */
.fd-facts {
  display: grid;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-m);
  background: var(--fill-faint);
}
.fd-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-12);
  min-width: 0;
}
.fd-facts dt {
  color: var(--text-secondary);
  font-size: var(--text-footnote-size);
  line-height: var(--text-footnote-line);
}
.fd-facts dd {
  display: flex;
  align-items: baseline;
  gap: var(--space-8);
  font-size: var(--text-subhead-size);
  line-height: var(--text-subhead-line);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fd-facts dd small {
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
  font-weight: 400;
}
.fd-split {
  display: flex;
  gap: var(--space-2);
  height: 8px;
}
.fd-split i {
  flex-basis: 0;
  min-width: 2px;
  border-radius: var(--radius-full);
}
.fd-split .is-long {
  background: var(--market-up);
}
.fd-split .is-short {
  background: var(--market-down);
}
.fd-split-legend {
  display: flex;
  justify-content: space-between;
  margin-top: calc(var(--space-8) * -1);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
  font-weight: 600;
}
.fd-split-legend .is-long {
  color: var(--market-up);
}
.fd-split-legend .is-short {
  color: var(--market-down);
}
.fd-positions {
  border-top: var(--stroke-width-hairline) solid var(--stroke-separator);
}
.fd-pos {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  min-height: 52px;
  padding: var(--space-8) 0;
}
.fd-pos + .fd-pos {
  border-top: var(--stroke-width-hairline) solid var(--stroke-separator);
}
.fd-side {
  flex: none;
  padding: var(--space-2) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
  font-weight: 600;
}
.fd-side.is-long {
  color: var(--market-up);
  background: color-mix(in oklab, var(--market-up) 10%, transparent);
}
.fd-side.is-short {
  color: var(--market-down);
  background: color-mix(in oklab, var(--market-down) 10%, transparent);
}
.fd-weight {
  min-width: 72px;
}
/* Column head of an opened position list: the same three columns, in caption type */
.fd-pos.is-head {
  min-height: 0;
  padding: var(--space-8) 0 var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
}
.fd-pos.is-head .fd-side {
  font-weight: 400;
}
.fd-pos.is-head + .fd-pos {
  border-top: 0;
}
/* Folded: the first rows show and the list fades out over the third, so there is visibly more */
.fd-positions.is-peek {
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent);
  mask-image: linear-gradient(to bottom, black 55%, transparent);
}
.fd-positions.is-peek + .fd-more {
  margin-top: calc(var(--space-12) * -1);
}
.fd-more {
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: var(--control-m);
  border-radius: var(--radius-m);
  background: var(--fill-subtle);
  font-size: var(--text-subhead-size);
  font-weight: 600;
}
.fd-more .fd-ibox {
  width: 16px;
  height: 16px;
  transition: transform var(--motion-release) var(--ease-standard);
}
.fd-more .fd-ibox.is-open {
  transform: rotate(180deg);
}
.fd-more:active {
  transform: scale(var(--state-press-scale));
}

/* ---- footer: who made this, the notice, ©; sources sit with each section ---- */
.fd-foot {
  margin-top: var(--space-40);
  display: grid;
  gap: var(--space-16);
  color: var(--text-secondary);
  font-size: var(--text-caption-1-size);
  line-height: var(--text-caption-1-line);
}
/* Who made this: the inverse surface, as the landing footer */
.fd-brand {
  display: grid;
  justify-items: start;
  gap: var(--space-12);
  padding: var(--space-20);
  border-radius: var(--radius-card);
  background: var(--surface-inverse);
  color: var(--text-on-inverse);
}
.fd-brand img {
  display: block;
  height: 24px;
  width: auto;
}
.fd-brand p {
  color: color-mix(in oklab, var(--text-on-inverse) 72%, transparent);
  font-size: var(--text-subhead-size);
  line-height: var(--text-subhead-line);
  text-wrap: pretty;
}
.fd-brand-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 32px;
  margin-top: calc(var(--space-4) * -1);
  color: inherit;
  font-size: var(--text-subhead-size);
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.fd-brand-link .fd-ibox {
  width: 16px;
  height: 16px;
}
.fd-brand-link:active {
  transform: scale(var(--state-press-scale));
}
.fd-brand-link:focus-visible {
  outline: var(--stroke-width-focus) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-xs);
}

/* Phones 340-374 (most Android, 360): the eight-digit bitcoin price needs the room, so the
   mark, the line and the gaps get smaller and the names keep their width */
@media (max-width: 374px) {
  .fd-table {
    grid-template-columns: 28px minmax(0, 1fr) auto 56px;
    column-gap: var(--space-8);
  }
  .fd-table img.fd-coin,
  .fd-table .fd-coin {
    width: 28px;
    height: 28px;
  }
}
/* The narrowest phones (320): the 24-hour line gives way to the names; price and change stay */
@media (max-width: 339px) {
  .fd-sticky-time {
    display: none;
  }
  .fd-sticky-in .fd-count {
    margin-left: auto;
  }
  .fd-table {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }
  .fd-table .fd-spark,
  .fd-thead > span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Movement goes; the colour wash on a changed value stays (it is not motion) */
  .fd-skel {
    animation: none;
  }
  .fd-sticky {
    transition: none;
  }
  .fd-fx-arc,
  .fd-fx-marker,
  .fd-fx-band,
  .fd-split i,
  .fd-metric-value,
  .fd-ls-num b,
  .fd-area polyline,
  .fd-area .fd-spark-area,
  .fd-flow-bar i {
    transition: none;
  }
  .fd-more,
  .fd-brand-link,
  .fd-more .fd-ibox,
  .fd-mrow-caret {
    transition: none;
  }
}
