/* Blocks: TrenchBrain's own building blocks, shared by the pages. A row of
   figures, a coin as a card and as a row, people as rows, the rail beside a
   page, who's on stream, and the feed from the trenches with its items. The
   markup for each comes from TB.blocks (js/blocks.js). */

/* ───────── Figures ───────── */
/* A row of figures: a label, a big number, a note under it. */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
}
.stat {
  position: relative;
  min-width: 0;
  padding: 11px 14px 12px 16px;
}
.stat + .stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--line-soft);
}
.stat-label {
  overflow: hidden;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-value {
  margin-top: 6px;
  font-size: var(--text-figure);
  line-height: 27px;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-value.soft {
  font-size: 15px;
  font-weight: var(--weight-medium);
  color: var(--ink-3);
  letter-spacing: var(--tracking);
}
.stat-note {
  margin-top: 2px;
  font-size: var(--text-md);
  line-height: 17px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
/* The info link beside "We saw it": its hover says what the words mean, and it opens the coins we saw that ran. */
.saw-help {
  display: inline-flex;
  vertical-align: -2px;
  margin: -4px -4px -4px 2px;
  padding: 4px;
  color: var(--ink-3);
  text-decoration: none;
}
.saw-help:hover {
  color: var(--ink);
}

/* ───────── A coin as a card ───────── */
/* Its picture, ticker and price, what it is, the hour's price and who's on it. */

.coin-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px 10px;
  text-align: left;
  transition:
    box-shadow 150ms,
    background 150ms,
    transform 150ms var(--ease);
}
button.coin-card:hover {
  background: #1a1a1e;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 13%),
    0 1px 2px rgb(0 0 0 / 30%),
    0 10px 24px -14px rgb(0 0 0 / 80%);
  transform: translateY(-1px);
}
.coin-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.coin-card-id {
  display: grid;
  flex: 1;
  min-width: 0;
}
.coin-card-id b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xl);
  line-height: 19px;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking);
}
.coin-card-id b .tb-chip {
  height: 18px;
  padding: 0 5px;
  font-size: var(--text-xs);
}
.coin-card-id small {
  overflow: hidden;
  font-size: var(--text-md);
  color: var(--ink-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coin-card-num {
  display: grid;
  justify-items: end;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.coin-card-num b {
  font-size: var(--text-xl);
  line-height: 19px;
  font-weight: var(--weight-bold);
}
.coin-card-num span {
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
}
.coin-card-num small {
  font-size: inherit;
  color: var(--ink-2);
  font-weight: var(--weight-regular);
}
.coin-card-what {
  display: -webkit-box;
  min-height: 54px;
  overflow: hidden;
  font-size: var(--text-md);
  line-height: 18px;
  color: var(--ink-2);
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}
.coin-card-what b {
  color: var(--ink);
  font-weight: var(--weight-strong);
}
.coin-card-edge {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--text-md);
  line-height: 20px;
  color: var(--violet-ink);
}
.coin-card-edge .i {
  width: 13px;
  height: 13px;
  margin-top: 3px;
}
.coin-card .spark {
  width: 100%;
  height: 34px;
  margin-top: auto;
}
.coin-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--text-md);
  color: var(--ink-2);
}
.coin-card-foot.said .says {
  color: var(--violet-ink);
}
.coin-card-foot.warn .says {
  color: var(--orange-ink);
}

/* Our call on a coin, on its card and its row: the chip(s), then its one line; what's against it in orange. */
.coin-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font-size: var(--text-md);
  line-height: 20px;
  color: var(--ink-2);
}
.coin-verdict .verdict-chips {
  display: inline-flex;
  flex-shrink: 0;
  gap: 4px;
}
.coin-verdict .tb-chip {
  height: 18px;
  padding: 0 6px;
  font-size: var(--text-xs);
}
.coin-verdict .against {
  color: var(--orange-ink);
}
.coin-verdict .line {
  flex: 1 1 120px;
}
/* On the lead it is the first line of its story, spaced and sized as the story's lines are. */
.coin-verdict.lead-verdict {
  margin-top: 12px;
  font-size: var(--text-base);
}

/* A line that ends in an ellipsis rather than wrapping. */
.line {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ───────── A page's headline figures ───────── */
/* Beside the title on the right: small labels over big numbers, a line
   between them, like the figures in Now's drop card. */
.head-stats {
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
}
.head-stat {
  display: grid;
  gap: 4px;
  padding: 0 18px;
}
.head-stat:first-child {
  padding-left: 0;
}
.head-stat:last-child {
  padding-right: 0;
}
.head-stat + .head-stat {
  box-shadow: inset 1px 0 0 var(--line);
}
.head-stat > span {
  font-size: var(--text-md);
  color: var(--ink-3);
  white-space: nowrap;
}
.head-stat b small {
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking);
  color: var(--ink-3);
}
.head-stat b {
  font-size: 19px;
  line-height: 23px;
  font-weight: var(--weight-strong);
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
@media (max-width: 760px) {
  .head-stats {
    width: 100%;
  }
  .head-stat {
    min-width: 0;
    padding: 0 12px;
  }
  .head-stat > span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .head-stat b {
    font-size: 17px;
    line-height: 21px;
  }
}

/* A share, drawn under its figure: a thin track and its fill, amber once
   it's a lot (.warn). A .blank one keeps figures in line when one has none. */
.stat-meter {
  display: block;
  height: 5px;
  margin: 9px 16px 7px 0;
  overflow: hidden;
  border-radius: 4px;
  background: rgb(255 255 255 / 7%);
}
.stat-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink-3);
}
.stat-meter.warn i {
  background: var(--amber);
}
.stat-meter.blank {
  background: none;
}

/* ───────── A coin's story ───────── */
/* What a coin is: the post it launched off as a headline and who posted it,
   or what it says it is. A story line adds one fact with its icon. */

.headline {
  max-width: 76ch;
  font-size: var(--text-headline);
  line-height: 23px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.015em;
  color: var(--ink);
  quotes: '“' '”';
}
.headline.what {
  font-size: var(--text-xl);
  line-height: 21px;
  font-weight: 450;
  color: var(--ink-2);
}
.byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 12px;
  font-size: var(--text-md);
  color: var(--ink-3);
}
.byline b {
  color: var(--ink);
  font-weight: var(--weight-strong);
}
.byline .sep {
  color: var(--ink-4);
}
.byline .tb-chip {
  margin-left: 4px;
}
.byline .pending {
  color: var(--ink-3);
}
/* Names in the byline are raised like buttons. */
.byline .name-tag {
  height: 26px;
  padding: 0 10px 0 5px;
  border-radius: 9px;
  background: var(--raised);
  box-shadow: var(--sh-raised);
  line-height: 26px;
}
.story-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: var(--text-base);
  line-height: 18px;
  color: var(--ink-2);
}
.story-line .i {
  margin-top: 1px;
  color: var(--ink-3);
}
.story-line.off,
.story-line.off .i {
  color: var(--orange-ink);
}
@media (max-width: 760px) {
  .headline {
    font-size: 16px;
    line-height: 24px;
  }
}

/* ───────── Coins as a list ───────── */
/* A card of rows: the coin, who's on it, its hour, its age and its price.
   Columns drop out as the list gets narrower. */

.coin-list {
  overflow: hidden;
  container: coins / inline-size;
}
.coin-list-head,
.coin-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 96px 56px 100px;
  align-items: center;
  gap: 12px;
}
.coin-list-head {
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--subtle);
  font-size: var(--text-md);
  color: var(--ink-3);
}
.coin-list-head span:first-child {
  grid-column: 1 / 3;
}
.coin-list-head span:nth-child(n + 2) {
  text-align: right;
}
.coin-row {
  width: 100%;
  min-height: var(--row-h);
  padding: 7px 14px;
  text-align: left;
  transition: background 120ms;
}
.coin-row + .coin-row {
  border-top: 1px solid var(--line-soft);
}
button.coin-row:hover {
  background: var(--hover);
}
.coin-row-main {
  display: grid;
  min-width: 0;
}
.coin-row-main b {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: var(--text-body);
  line-height: 18px;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking);
}
.coin-row-main b small {
  overflow: hidden;
  font-size: var(--text-md);
  font-weight: var(--weight-regular);
  color: var(--ink-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coin-row-main b .tb-chip {
  height: 18px;
  padding: 0 6px;
  font-size: var(--text-xs);
}
.coin-row-why {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: var(--text-base);
  color: var(--ink-3);
}
.coin-row-why.said .says {
  color: var(--violet-ink);
}
.coin-row-why.warn {
  color: var(--orange-ink);
}
.coin-row-why .i {
  width: 13px;
  height: 13px;
}
.coin-row .spark {
  width: 96px;
  height: 28px;
  overflow: visible;
}
.coin-row-age {
  font-size: var(--text-md);
  color: var(--ink-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.coin-row-num {
  display: grid;
  justify-items: end;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.coin-row-num b {
  font-size: var(--text-body);
  font-weight: var(--weight-bold);
}
.coin-row-num span {
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
}
.coin-row-num small {
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--ink-3);
}
@container coins (max-width: 760px) {
  .coin-list-head,
  .coin-row {
    grid-template-columns: 28px minmax(0, 1fr) 84px 100px;
  }
  .coin-row-age,
  .coin-list-head span:nth-child(3) {
    display: none;
  }
}
@container coins (max-width: 520px) {
  .coin-list-head,
  .coin-row {
    grid-template-columns: 28px minmax(0, 1fr) 92px;
    gap: 10px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .coin-row .spark,
  .coin-list-head span:nth-child(2) {
    display: none;
  }
}

/* ───────── People as rows ───────── */
/* A face, the name with what they did under it, and how it went. */

.person-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 5px 8px;
  border-radius: 9px;
  transition: background 120ms;
}
a.person-row:hover {
  background: var(--hover);
}
.person-text {
  display: grid;
  flex: 1;
  min-width: 0;
}
.person-text strong {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: var(--text-body);
  font-weight: var(--weight-strong);
}
.person-text strong .tb-chip {
  height: 18px;
  padding: 0 5px;
  font-size: var(--text-xs);
}
/* What a person did is data (in at, how much in, what they sold): it wraps, never ends in an ellipsis. */
.person-text small {
  font-size: var(--text-md);
  color: var(--ink-3);
  overflow-wrap: anywhere;
}
.person-text small .said {
  color: var(--violet-ink);
}
.person-end {
  flex-shrink: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
.person-more {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  margin-top: 4px;
  padding: 0 8px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: var(--text-base);
  font-weight: var(--weight-strong);
}
.person-more:hover {
  background: var(--hover);
  color: var(--ink);
}
.person-note {
  padding: 4px 8px 0;
  font-size: var(--text-md);
  color: var(--ink-3);
}

/* ───────── The rail beside a page ───────── */
/* It sticks just under the header (the scroll area's padding already clears
   the header) and always reaches the sheet's bottom edge: TB.blocks.fitRail
   sets its height as the page moves, so the rail itself never scrolls, only
   its lists. This height is the stuck one. */

.rail {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  height: max(420px, calc(100dvh - 2 * var(--sheet-gap) - var(--hdr-h) - 16px));
}
.rail-block {
  flex-shrink: 0;
  padding: 2px 0 14px;
}
.rail-block + .rail-block {
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.rail-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.rail-label h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--ink-3);
}
.rail-label > span {
  font-size: var(--text-md);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ───────── On stream ───────── */

.stream-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% + 16px);
  margin: 0 -8px;
  padding: 5px 8px;
  border-radius: 10px;
  text-align: left;
  transition: background 120ms;
}
.stream-row:hover,
.stream-row.on {
  background: var(--hover);
}
.stream-row .av {
  --av-halo: var(--sheet);
}
.stream-text {
  display: grid;
  flex: 1;
  min-width: 0;
}
.stream-text strong {
  font-size: var(--text-base);
  font-weight: var(--weight-strong);
}
.stream-text small {
  overflow: hidden;
  font-size: var(--text-md);
  color: var(--ink-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stream-text .mention {
  color: var(--violet-ink);
  font-weight: var(--weight-strong);
}
.stream-viewers {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-md);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.stream-viewers .i {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
}
/* A stream playing in place: a bar with its name and close, then the stream in a 16:9 frame nothing covers. */
.stream-player {
  position: relative;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(120% 100% at 30% 20%, hsl(var(--h) 45% 32% / 70%) 0%, transparent 60%),
    linear-gradient(160deg, #1d1d24 0%, #0c0c0f 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
  animation: tb-rise 240ms var(--ease) both;
}
.stream-player[hidden] {
  display: none;
}
.stream-player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgb(255 255 255 / 14%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 20%);
  transform: translate(-50%, -50%);
}
.stream-player-meta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-md);
  color: var(--ink-2);
}
.stream-player-meta b {
  color: var(--ink);
  font-weight: var(--weight-strong);
}
.stream-player-live {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--down);
  color: #fff;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.stream-player-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 4px 4px 10px;
  font-size: var(--text-md);
  color: var(--ink-3);
}
.stream-player-bar b {
  overflow: hidden;
  min-width: 0;
  color: var(--ink);
  font-weight: var(--weight-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stream-player-bar small {
  flex: none;
  font-size: inherit;
}
.stream-player-bar .tb-icon-btn {
  flex: none;
  width: 28px;
  height: 28px;
  margin-left: auto;
}
.stream-player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
/* Who's on stream as a strip of chips, when there is no rail. */
.stream-strip {
  display: none;
  gap: 8px;
  padding: 0 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stream-strip::-webkit-scrollbar {
  display: none;
}
.stream-strip-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding-right: 4px;
  color: var(--ink-3);
  font-size: var(--text-base);
}
.stream-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  height: 36px;
  padding: 0 11px 0 6px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--sh-card);
  font-size: var(--text-base);
  white-space: nowrap;
}
.stream-chip b {
  font-weight: var(--weight-strong);
}
.stream-chip span {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.stream-chip .mention {
  color: var(--violet-ink);
}
.stream-chip .av {
  --av-halo: var(--surface);
}

/* ───────── From the trenches: the feed ───────── */
/* Tabs by source, a filter for one coin, and a list that scrolls on its own. */

.feed {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 0;
}
.feed > :not(.feed-wrap) {
  flex-shrink: 0;
}
/* In a card of its own when there is no rail. */
.feed-card {
  display: flex;
  flex-direction: column;
  height: 560px;
  padding: 16px 16px 0;
}
.feed-tabs {
  display: flex;
  width: 100%;
  margin-bottom: 10px;
}
.feed-tabs:empty {
  display: none;
}
.feed-tabs .tb-seg {
  flex: 1 1 auto;
  min-width: 0;
  gap: 0;
  padding: 0 6px;
}
.feed-tabs .seg-tx {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The chosen tab's icon opens beside its name; fomo always shows its logo. */
.feed-tabs .seg-ic {
  display: inline-flex;
  flex-shrink: 0;
  width: 0;
  margin-right: 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.4);
  transition:
    width 380ms var(--glide),
    margin-right 380ms var(--glide),
    opacity 240ms,
    transform 380ms var(--glide);
}
.feed-tabs .tb-seg:is(.on, .keep) .seg-ic {
  width: 14px;
  margin-right: 5px;
  opacity: 1;
  transform: none;
}
.feed-tabs .tb-seg .i {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}
.feed-tabs .logo-fomo {
  transition: opacity 240ms;
}
.feed-tabs .tb-seg:not(.on) .logo-fomo {
  opacity: 0.55;
}
/* Only what they said about one coin. */
.feed-coin {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 34px;
  margin-bottom: 8px;
  padding: 0 9px;
  border-radius: 10px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 6%);
  color: var(--ink-2);
  font-size: var(--text-body);
  text-align: left;
  transition:
    background 120ms,
    box-shadow 120ms;
}
.feed-coin[hidden] {
  display: none;
}
.feed-coin .fc-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-coin b {
  color: var(--ink);
  font-weight: var(--weight-bold);
}
.feed-coin[aria-pressed='true'] {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--accent-ink);
}
.feed-coin[aria-pressed='true'] b {
  color: #fff;
}
.feed-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}
.feed-list {
  position: absolute;
  inset: 0 -8px;
  padding: 4px 8px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to bottom, transparent 0, #000 8px, #000 calc(100% - 28px), transparent);
}
.feed-list::-webkit-scrollbar {
  display: none;
}
/* In the rail the list runs to the sheet's bottom edge; the room at its end
   lets the last item scroll clear of the ask bar. */
.rail :is(.feed-list, .rounds, .room, .catch, .buys-list) {
  padding-bottom: 88px;
  scroll-padding-bottom: 88px;
}
/* What's new while you read further down waits in this pill. */
.feed-new {
  position: absolute;
  z-index: 2;
  bottom: 18px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px 0 10px;
  border-radius: var(--r-pill);
  background: #f4f4f5;
  color: #0f0f11;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  box-shadow: 0 10px 24px -8px rgb(0 0 0 / 70%);
  translate: -50% 0;
  animation: tb-rise 240ms var(--ease) both;
}
.feed-new[hidden] {
  display: none;
}
.feed-empty {
  padding: 22px 4px;
  font-size: var(--text-base);
  color: var(--ink-3);
}
.feed-empty.error {
  color: var(--down-ink);
}

/* One thing that came in: who, where, when, what they said, the coins. */
.feed-item {
  position: relative;
  display: flex;
  gap: 10px;
  margin: 0 -8px;
  padding: 8px;
  border-radius: 10px;
}
/* Rows are divided by a straight line, however round their corners are:
   it runs along the text, clear of the corners (--rule-inset). */
.feed-item + .feed-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: var(--rule-inset, 8px);
  left: var(--rule-inset, 8px);
  border-top: 1px solid var(--line-soft);
  pointer-events: none;
}
.feed-item.fresh {
  animation:
    feed-item-in 420ms var(--ease) both,
    feed-item-glow 4s ease-out;
}
.feed-item-body {
  flex: 1;
  min-width: 0;
}
.feed-item-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: var(--text-base);
  line-height: 18px;
}
.feed-item-head b {
  flex-shrink: 0;
  color: var(--ink);
  font-weight: var(--weight-bold);
}
.feed-item-head .feed-item-who {
  flex-shrink: 0;
  color: var(--ink);
  font-weight: var(--weight-bold);
  transition: color 150ms;
}
.feed-item-head .feed-item-who:hover {
  color: var(--accent-ink);
}
.feed-item-src {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  font-size: var(--text-md);
  color: var(--ink-3);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.feed-item-src .i,
.feed-item-src .logo-fomo {
  width: 13px;
  height: 13px;
}
.feed-item-src .twitch {
  color: #a970ff;
}
.feed-item-src .discord {
  color: #8e98ff;
}
.feed-item-src .telegram {
  color: #45b2e8;
}
.feed-item-src .x {
  color: var(--ink);
}
.feed-item time {
  flex-shrink: 0;
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.feed-item-text {
  margin-top: 2px;
  font-size: var(--text-base);
  line-height: 18px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.feed-item-text .soft {
  color: var(--ink-3);
}
.feed-item-text mark {
  background: none;
  color: var(--ink);
  font-weight: var(--weight-strong);
}
.feed-item-glyph {
  display: grid;
  place-items: center;
  width: var(--s, 28px);
  height: var(--s, 28px);
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #1e1e22 0%, #18181b 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 6%);
  color: var(--ink-2);
}
.feed-item-glyph .i {
  width: 15px;
  height: 15px;
}
/* A trade: a dark tile lit from inside in its colour, a wallet taking the
   coin in or letting it go. */
.feed-item-glyph.buy {
  box-shadow:
    inset 0 0 0 1px rgb(18 183 106 / 24%),
    inset 0 0 14px rgb(18 183 106 / 22%);
  color: var(--up-ink);
}
.feed-item-glyph.sell {
  box-shadow:
    inset 0 0 0 1px rgb(255 100 133 / 24%),
    inset 0 0 14px rgb(255 100 133 / 20%);
  color: var(--down-ink);
}
.feed-item-coins {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}
/* Pills and a figure on one line, with room for an action at its end. */
.feed-item-text.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
/* An action on a line (replay the moment, read the post, open a run of
   trades): a small raised pill like a chosen tab, at the right end. */
.feed-item-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: var(--seg-h);
  margin-left: auto;
  padding: 0 9px 0 7px;
  border-radius: 7px;
  background: var(--selected);
  box-shadow: var(--sh-selected);
  color: var(--ink-2);
  font: var(--weight-strong) var(--text-md) / 1 var(--font);
  white-space: nowrap;
  transition:
    color 150ms,
    background 150ms;
}
.feed-item-link .i {
  width: 13px;
  height: 13px;
  color: var(--ink-3);
  transition:
    color 150ms,
    transform 200ms var(--ease);
}
.feed-item-link:hover,
.feed-burst > summary:hover .feed-item-link {
  background: var(--raised-hover);
  color: var(--ink);
}
.feed-item-link:hover .i,
.feed-burst > summary:hover .feed-item-link .i {
  color: var(--ink-2);
}
/* A wallet's record, under its trade. */
.feed-item-note {
  margin-top: 5px;
  font-size: var(--text-md);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
/* A streamer's earlier lines, folded under the latest. */
.feed-item-more {
  margin-top: 6px;
}
.feed-item-more summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-md);
  color: var(--ink-3);
  cursor: pointer;
  list-style: none;
  transition: color 150ms;
}
.feed-item-more summary::-webkit-details-marker {
  display: none;
}
.feed-item-more summary::before {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 200ms var(--ease);
}
.feed-item-more[open] summary::before {
  transform: rotate(45deg);
}
.feed-item-more summary:hover {
  color: var(--ink-2);
}
.feed-item-more p {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  margin-top: 6px;
  font-size: var(--text-base);
  line-height: 18px;
  color: var(--ink-3);
}
.feed-item-more mark {
  background: none;
  color: var(--ink-2);
  font-weight: var(--weight-strong);
}
.feed-item-more p time {
  font-size: var(--text-sm);
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
/* A run of trades, folded: the summary reads like one item, and opens into
   the trades, set in under it. */
.feed-burst > summary {
  display: block;
  cursor: pointer;
  list-style: none;
}
.feed-burst > summary::-webkit-details-marker {
  display: none;
}
.feed-burst-toggle .hide,
.feed-burst[open] .feed-burst-toggle .show {
  display: none;
}
.feed-burst[open] .feed-burst-toggle .hide {
  display: inline;
}
.feed-burst[open] .feed-burst-toggle .i {
  transform: rotate(180deg);
}
.feed-burst-list {
  margin-left: 38px;
}
.feed-burst-list .feed-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: var(--rule-inset, 8px);
  left: var(--rule-inset, 8px);
  border-top: 1px solid var(--line-soft);
  pointer-events: none;
}
@keyframes feed-item-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@keyframes feed-item-glow {
  from,
  20% {
    background: rgb(255 255 255 / 4.5%);
  }
}

/* ───────── A coin as a compact row ───────── */
/* For lists beside a page: picture, ticker and a line, price and change. */
.coin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 11px;
  text-align: left;
  transition: background 120ms;
}
.coin-item:hover {
  background: rgb(255 255 255 / 4%);
}
.coin-item.on {
  background: rgb(255 255 255 / 6%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 6%);
}
.coin-item .coin {
  --s: 32px;
  border-radius: 9px;
  font-size: 13px;
}
.coin-item-text,
.coin-item-num {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.coin-item-text {
  flex: 1;
}
.coin-item-text b {
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-body);
  font-weight: var(--weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coin-item-text span {
  overflow: hidden;
  color: var(--ink-3);
  font-size: var(--text-md);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coin-item-num {
  flex-shrink: 0;
  justify-items: end;
  font-variant-numeric: tabular-nums;
}
.coin-item-num b {
  color: var(--ink);
  font-size: var(--text-body);
  font-weight: var(--weight-strong);
}
.coin-item-num span {
  font-size: var(--text-md);
}

/* A coin mentioned in a line: its picture, ticker and price. */
.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  margin: 1px 0;
  padding: 0 7px 0 3px;
  border-radius: 7px;
  background: rgb(255 255 255 / 6%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 5%);
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  vertical-align: middle;
  white-space: nowrap;
  transition: background 120ms;
}
button.coin-pill:hover {
  background: rgb(255 255 255 / 10%);
}
.coin-pill.unknown {
  padding: 0 7px;
  background: none;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-3);
}
/* A coin a room was on when a line was said, in a line that does not name it: shown, never a claim. */
.coin-pill.context {
  background: none;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
}
.coin-pill i {
  font-style: normal;
  font-weight: var(--weight-medium);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.coin-pill .coin {
  --s: 16px;
  border-radius: 5px;
  font-size: 9px;
}

/* ───────── Copy a contract ───────── */
/* A light button that says Copy and shows the short address; after a click
   it turns green for a moment and says Copied (the page handles data-copy). */
.copy-contract.tb-btn-sm ~ .feed-item-link {
  height: var(--control-h-sm);
  padding: 0 10px 0 8px;
  border-radius: var(--r-control);
  font-size: var(--text-base);
}
.copy-contract .addr {
  color: rgb(15 15 17 / 50%);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
}
.copy-contract.tb-btn-ok .addr {
  color: inherit;
  opacity: 0.7;
}

/* ───────── Nothing yet ───────── */
/* An empty list, drawn: faded rows where the items would be, with the icon
   of what's missing on top, then a line on what that means. */
.nothing {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 26px 16px 28px;
  text-align: center;
}
.nothing-art {
  position: relative;
  display: grid;
  gap: 6px;
  width: 210px;
  margin-bottom: 16px;
}
.nothing-row {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  background: rgb(255 255 255 / 3%);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.nothing-row:nth-child(2) {
  margin: 0 14px;
  opacity: 0.6;
}
.nothing-row:nth-child(3) {
  margin: 0 28px;
  opacity: 0.3;
}
.nothing-row i {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 9%);
}
.nothing-row b {
  width: 62%;
  height: 6px;
  border-radius: 3px;
  background: rgb(255 255 255 / 8%);
}
.nothing-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(180deg, #27272c 0%, #1d1d21 100%);
  box-shadow:
    var(--sh-raised),
    0 10px 22px -8px rgb(0 0 0 / 75%);
  color: var(--tone, var(--ink-2));
  transform: translate(-50%, -50%);
}
.nothing h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
}
.nothing p {
  max-width: 340px;
  font-size: var(--text-base);
  color: var(--ink-3);
}
@media (max-width: 380px) {
  .feed-item-head b {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* A coin with no price we can quote says why in words, quietly, in the price's place. */
.no-price {
  color: var(--ink-2);
  font-weight: var(--weight-regular);
  font-size: var(--text-md);
  white-space: nowrap;
}
/* The stream itself, Twitch's or Kick's own player, filling its frame. */
.stream-player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
