/* TechFlow Intelligence–style ETF Data dashboard */
.tf-intel {
  --tf-bg: #f3f4f6;
  --tf-card: #ffffff;
  --tf-ink: #111827;
  --tf-muted: #6b7280;
  --tf-line: #e8eaed;
  --tf-accent: #2563eb;
  --tf-live: #ef4444;
  --tf-up: #16a34a;
  --tf-down: #ef4444;
  --tf-blue: #3b82f6;
  margin: 0 0 3rem;
  color: var(--tf-ink);
  font-family: "DM Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(59, 130, 246, 0.08), transparent 60%),
    radial-gradient(900px 360px at 90% 0%, rgba(245, 158, 11, 0.07), transparent 55%),
    var(--tf-bg);
  padding: 1.25rem 0 2rem;
  border-radius: 0;
}

.tf-intel__hero {
  margin: 0 0 1.25rem;
  padding: 0 0.15rem;
}

.tf-intel__title {
  margin: 0;
  font-size: clamp(1.85rem, 3.2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.tf-hl {
  font-style: normal;
  color: var(--tf-accent);
  font-weight: 800;
}

.tf-intel__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.tf-card {
  background: var(--tf-card);
  border: 1px solid var(--tf-line);
  border-radius: 16px;
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  min-height: 180px;
  overflow: hidden;
}

.tf-card--wide,
.tf-card--span2 {
  grid-column: span 2;
}

.tf-card--wide {
  grid-column: span 3;
}

.tf-card h2 {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--tf-ink);
  line-height: 1.35;
}

.tf-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.tf-card__head h2 {
  margin: 0;
}

/* Fear gauge */
.tf-fear-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 140px;
}

.tf-fear-center {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  text-align: center;
  display: grid;
  gap: 0.15rem;
}

.tf-fear__value {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.tf-fear__label {
  font-weight: 700;
  color: var(--tf-down);
  font-size: 0.95rem;
}

.tf-gauge {
  display: block;
  max-width: 100%;
  height: auto;
}

/* VIX */
.tf-vix-layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: start;
}

.tf-vix-side {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}

.tf-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tf-pill--blue {
  background: #eff6ff;
  color: var(--tf-blue);
}

.tf-vix__value {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--tf-blue);
  line-height: 1;
}

.tf-badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tf-badge.is-ok {
  background: #ecfdf5;
  color: #059669;
}

.tf-badge.is-low {
  background: #fff7ed;
  color: #c2410c;
}

.tf-badge.is-high {
  background: #fef2f2;
  color: #dc2626;
}

.tf-vix__legend {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--tf-line);
  color: var(--tf-muted);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.tf-vix__legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tf-vix__legend span {
  opacity: 0.75;
}

.tf-vix__legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.tf-vix__legend .dot.is-low {
  background: #f97316;
}

.tf-vix__legend .dot.is-ok {
  background: #22c55e;
}

.tf-vix__legend .dot.is-high {
  background: #ef4444;
}

/* Charts */
.tf-spark,
.tf-bars,
.tf-donut {
  display: block;
  width: 100%;
  max-width: 100%;
}

.tf-chart-empty {
  height: 80px;
  background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
  border-radius: 8px;
  opacity: 0.6;
}

/* ETF tabs / panels */
.tf-etf-tabs {
  display: inline-flex;
  gap: 0.3rem;
  margin: 0;
}

.tf-etf-tabs button,
.tf-etf-tabs span {
  appearance: none;
  cursor: default;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--tf-line);
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tf-muted);
}

.tf-etf-tabs button {
  cursor: pointer;
}

.tf-etf-tabs .is-active,
.tf-etf-tabs button.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.tf-etf-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.tf-etf-meta img {
  border-radius: 50%;
}

.tf-etf-meta strong {
  font-weight: 800;
}

.tf-chip {
  display: inline-flex;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.tf-chip.is-up {
  background: #ecfdf5;
  color: var(--tf-up);
}

.tf-chip.is-down {
  background: #fef2f2;
  color: var(--tf-down);
}

/* Stablecoin */
.tf-stable-chart {
  margin-bottom: 0.75rem;
}

.tf-stable-stack {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  background: #e5e7eb;
}

.tf-stable-stack .is-usdt {
  background: #26a17b;
}

.tf-stable-stack .is-usdc {
  background: #2775ca;
}

.tf-stable {
  display: grid;
  gap: 0.65rem;
}

.tf-stable__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.8rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.tf-stable__sym {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
}

.tf-stable__sym img {
  border-radius: 50%;
}

/* Dominance */
.tf-dom-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.tf-dom-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  color: var(--tf-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.tf-dom-legend li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tf-dom-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.tf-dom-legend b {
  color: var(--tf-ink);
  margin-left: auto;
  padding-left: 0.75rem;
}

.tf-onchain__price {
  margin: 0 0 0.65rem;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Liquidations */
.tf-liq__main {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  letter-spacing: -0.03em;
}

.tf-liq-bars {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.tf-liq-bars__row {
  display: grid;
  grid-template-columns: 52px 1fr 42px;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.tf-liq-bars__lab.is-long {
  color: var(--tf-up);
}

.tf-liq-bars__lab.is-short {
  color: var(--tf-down);
}

.tf-liq-bars__track {
  height: 10px;
  border-radius: 999px;
  background: #ecfdf5;
  overflow: hidden;
}

.tf-liq-bars__track i {
  display: block;
  height: 100%;
  background: var(--tf-up);
  border-radius: 999px;
}

.tf-liq-bars__track.is-short {
  background: #fef2f2;
}

.tf-liq-bars__track.is-short i {
  background: var(--tf-down);
}

.tf-liq__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--tf-muted);
}

.tf-liq__grid strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--tf-ink);
  font-size: 1.05rem;
}

.tf-liq__grid .is-up {
  color: var(--tf-up);
}

.tf-liq__grid .is-down {
  color: var(--tf-down);
}

/* Sections */
.tf-section {
  margin-top: 1.25rem;
  background: var(--tf-card);
  border: 1px solid var(--tf-line);
  border-radius: 16px;
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.tf-section__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.tf-section__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.tf-section__tag {
  color: var(--tf-muted);
  font-size: 0.85rem;
}

.tf-live {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--tf-live);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.tf-anom-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.tf-anom-list li {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--tf-line);
}

.tf-anom-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.tf-anom-list__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
  background: #f3f4f6;
}

.tf-anom-list__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.tf-anom-list__price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tf-muted);
}

.tf-anom-list__chg {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tf-up);
}

.tf-anom-list__chg.is-down {
  color: var(--tf-down);
}

.tf-anom-list p {
  margin: 0.35rem 0 0;
  color: var(--tf-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.tf-table-wrap {
  overflow-x: auto;
}

.tf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.tf-table th,
.tf-table td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--tf-line);
}

.tf-table th {
  color: var(--tf-muted);
  font-weight: 700;
  font-size: 0.8rem;
}

.tf-table__asset {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.tf-table__asset img {
  border-radius: 50%;
}

.tf-hot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.tf-hot {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--tf-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fafbfc);
}

.tf-hot img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #f3f4f6;
}

.tf-hot strong {
  display: block;
  font-size: 0.95rem;
}

.tf-hot span {
  color: var(--tf-muted);
  font-size: 0.78rem;
}

.tf-intel__attr {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  color: var(--tf-muted);
  padding: 0 0.15rem;
}

.tf-intel__empty {
  padding: 1rem;
  border: 1px dashed var(--tf-line);
  background: #fff;
  border-radius: 10px;
}

.is-up {
  color: var(--tf-up);
}

.is-down {
  color: var(--tf-down);
}

@media (max-width: 980px) {
  .tf-intel__grid {
    grid-template-columns: 1fr 1fr;
  }

  .tf-card--wide {
    grid-column: span 2;
  }

  .tf-card--span2 {
    grid-column: span 2;
  }

  .tf-liq__grid {
    grid-template-columns: 1fr 1fr;
  }

  .tf-hot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tf-vix-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tf-intel__grid,
  .tf-hot-grid {
    grid-template-columns: 1fr;
  }

  .tf-card--wide,
  .tf-card--span2 {
    grid-column: span 1;
  }

  .tf-vix__legend {
    flex-direction: column;
    gap: 0.4rem;
  }
}
