/* Tendências do mercado — sala escura, gramática do design system:
   painéis nus, fio hairline, números em mono, holo só na nav/chip ativa.
   Estrutura: índices em cards + altas/quedas em duas colunas com
   sparkline. */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
}

.td { max-width: 1160px; margin: 0 auto; padding: 34px 20px 60px; }

.td-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.td-head h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  letter-spacing: 0.01em;
}
.td-updated {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.td-sec { margin-top: 34px; }
.td-sec-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 10px;
}
.td-sec-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}
.td-hint { color: var(--muted); font-size: 0.78rem; }

/* ------------------------------------------------------ índice por jogo */

.td-idx {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.ti {
  background: var(--panel);
  border: 1px solid var(--hairline);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.ti-left { min-width: 0; }
.ti-name { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; }
.ti-value { font-family: var(--font-mono); font-weight: 600; font-size: 1.3rem; margin-top: 6px; white-space: nowrap; }
.ti-sub { color: var(--muted); font-size: 0.72rem; margin-top: 5px; }
.ti-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.ti-right .spark { width: 96px; height: 30px; display: block; }
.ti-win {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ti-chip { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.ti-chip .ti-win { margin-left: 5px; }
.ti-chip.up { color: var(--up); }
.ti-chip.down { color: var(--down); }
.ti-chip.off { color: var(--muted); font-weight: 400; font-size: 10.5px; }
.ti-nospark { color: var(--muted); font-size: 10.5px; }

.spark.up { color: var(--up); }
.spark.down { color: var(--down); }

/* ------------------------------------------------------- altas e quedas */

.td-chips { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.td-chips button {
  background: transparent;
  border: 1px solid var(--hairline-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
}
.td-chips button:hover { color: var(--ink); }
.td-chips button.on { color: var(--ink); border-image: var(--holo-line) 1; }

.td-mv { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 4px; }
.td-col h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 0 8px;
}
.td-win { font-weight: 400; }
.td-col ol { list-style: none; }
.td-col li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-top: 1px solid var(--hairline);
  cursor: pointer;
}
.td-col li:hover { background: var(--panel); }
.td-col li.td-empty-li { color: var(--muted); font-size: 0.82rem; cursor: default; }
.td-col li.td-empty-li:hover { background: none; }
.td-col img {
  width: 34px;
  height: 47px;
  object-fit: cover;
  border-radius: var(--radius-card);
  background: var(--panel-2);
  flex: none;
}
.td-ph {
  width: 34px;
  height: 47px;
  background: var(--panel-2);
  border-radius: var(--radius-card);
  flex: none;
}
.td-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.td-nm { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-set { color: var(--muted); font-size: 0.73rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-num { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.td-pct { font-family: var(--font-mono); font-weight: 600; font-size: 0.88rem; }
.td-pct.up { color: var(--up); }
.td-pct.down { color: var(--down); }
.td-usd { color: var(--muted); font-family: var(--font-mono); font-size: 0.7rem; }
.td-li-spark { flex: none; width: 76px; }
.td-li-spark .spark { width: 76px; height: 24px; display: block; }

.td-note { color: var(--muted); font-size: 0.78rem; margin-top: 14px; }

.td-method {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
  max-width: 760px;
  margin-top: 42px;
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
}

.td-empty { color: var(--muted); padding: 60px 0; text-align: center; }

@media (max-width: 880px) {
  .td-mv { grid-template-columns: 1fr; gap: 6px; }
  .td-li-spark { display: none; }
}
