/* -------------------------------------------------------------------------
   Trend — one table, four directions. Dense by design: the numbers are the
   content, the sparkline is the shape of them, and Δ is the order.
   ------------------------------------------------------------------------- */

.trends-page { padding-bottom: 64px; }

.trend-panel { margin-top: 4px; }

/* The table is wider than a phone; let it scroll rather than shrink the type. */
.trend-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .02);
}

.trend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.trend-table th {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: right;
  white-space: nowrap;
}

.trend-table th:nth-child(2) { text-align: left; }

.trend-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trend-table tbody tr:hover { background: rgba(255, 179, 71, .045); }
.trend-table tbody tr:last-child td { border-bottom: 0; }

.trend-col-rank {
  width: 34px;
  color: var(--dim);
  font-size: 10px;
}

.trend-col-hero {
  text-align: left;
  font-family: inherit;
  min-width: 150px;
}

.trend-col-hero a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.trend-col-hero a:hover { color: var(--amber); }

.trend-col-hero img {
  width: 34px;
  height: 26px;
  object-fit: cover;
  border-radius: 3px;
  background: rgba(255, 255, 255, .06);
}

.trend-thin {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-style: normal;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--copper);
}

.trend-cell { color: var(--text-soft, var(--muted)); }
.trend-cell.is-thin { opacity: .55; }

.trend-col-spark { width: 92px; }

/* Δ is the column the rows are ordered by, so it stays put while the table
   scrolls sideways instead of disappearing off the right edge. */
.trend-table th.trend-col-delta,
.trend-table td.trend-col-delta {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #0c0c12;
  border-left: 1px solid var(--line);
}

.trend-table tbody tr:hover td.trend-col-delta { background: #15110d; }

.trend-spark {
  width: 84px;
  height: 22px;
  vertical-align: middle;
  overflow: visible;
}

.trend-spark polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-spark circle { fill: currentColor; }

.trend-col-spark.up, .trend-col-delta.up { color: #7fd18b; }
.trend-col-spark.down, .trend-col-delta.down { color: #e2777d; }

.trend-col-delta {
  width: 78px;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- the "only one snapshot" state ---------- */

.trend-notice {
  padding: 16px 18px;
  border: 1px solid rgba(255, 179, 71, .32);
  border-radius: 8px;
  background: rgba(255, 179, 71, .06);
}

.trend-notice-title {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
}

.trend-notice p:last-child {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft, var(--muted));
}

/* ---------- narrow ---------- */

@media (max-width: 1000px) {
  .trend-col-spark, .trend-table th:nth-last-child(2) { display: none; }
}

@media (max-width: 760px) {
  .trend-table th, .trend-table td { padding: 6px 6px; }
  .trend-table td { font-size: 11.5px; }
  .trend-col-hero { min-width: 118px; }
  .trend-col-hero a { gap: 6px; font-size: 12px; }
  .trend-col-hero img { width: 28px; height: 21px; }
  .trend-col-rank { width: 22px; }
  .trend-col-delta { width: 58px; font-size: 11px; }
}
