/* ═══ §9 · TAB: HOME ══════════════════════════════════════════════════════════════════ */

/* scoped to .active so the base `.view { display: none }` still hides Home on other tabs —
   without `.active` the ID selector wins and Home leaks across every tab. */
#view-home.active {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  /* NO side inset: the shell already owns the one card inset. An 8px of its own is what made
     every Home card 16px narrower than every Race card. */
  padding: var(--sp-md) 0;
}
.home-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-radius: 14px;
  padding: var(--sp-md) var(--sp-md) calc(var(--sp-md) + 2px);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.home-section:active { transform: scale(0.985); }
.home-empty {
  padding: var(--sp-md) 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Portfolio rows ── */
.home-portfolio-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-portfolio-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: var(--sp-sm);
  align-items: baseline;
  padding: 6px 4px;
  font-size: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.home-portfolio-row:last-child { border-bottom: none; }
.home-portfolio-row .sym { font-weight: 700; color: var(--text-primary); }
.home-portfolio-row .qty { font-family: var(--font-mono); color: var(--text-dim); font-size: 0.7rem; }
.home-portfolio-row .mkt { font-family: var(--font-mono); color: var(--text-secondary); font-size: 0.7rem; }
.home-portfolio-row .pnl { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; }
.home-portfolio-row .pnl.pos  { color: var(--outcome-win); }
.home-portfolio-row .pnl.neg  { color: #ff6b6b; }
.home-portfolio-row .pnl.flat { color: #8892b0; }

/* ── the SFTi scanner grid (S · F · T · i) ── */
.sfti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
}
.sfti-grid-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.sfti-grid-tile:hover { border-color: rgba(0, 229, 255, 0.5); transform: translateY(-1px); }
.sfti-grid-tile-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.12);
  margin-bottom: 4px;
}
.sfti-grid-label {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.04em;
}
.sfti-grid-meta { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-dim); }
.sfti-grid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  font-size: 0.78rem;
  cursor: pointer;
}
.sfti-grid-row .sym { font-weight: 700; color: var(--text-primary); }
.sfti-grid-row .px {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-left: auto;
  padding-right: 6px;
}
.sfti-grid-row .pct { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; }
.sfti-grid-row .pct.pos { color: var(--outcome-win); }
.sfti-grid-row .pct.neg { color: #ff6b6b; }
.sfti-grid-empty {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
  padding: 6px 0;
}

/* ── News ── */
.home-news-rows { display: flex; flex-direction: column; gap: 6px; }
.home-news-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-sm);
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
}
.home-news-row:last-child { border-bottom: none; }
.home-news-row .chip {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-cyan);
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 700;
  height: fit-content;
}
.home-news-row .summary { color: var(--text-secondary); line-height: 1.35; }
.home-news-row .ts { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.62rem; }

/* ── Signals feed ── */
.home-signals-rows { display: flex; flex-direction: column; gap: 6px; }
.home-signal-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.12s ease;
}
.home-signal-row:last-child { border-bottom: none; }
.home-signal-row:hover { background: rgba(0, 229, 255, 0.05); }
.home-signal-row .chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-cyan);
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 700;
  grid-row: 1;
  grid-column: 1;
}
.home-signal-row .strategy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  grid-row: 1;
  grid-column: 2;
  align-self: center;
}
.home-signal-row .meta {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  grid-row: 1;
  grid-column: 3;
  align-self: center;
}
.home-signal-row .entries {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}
.home-signal-row .entries b { color: var(--text-secondary); font-weight: 700; margin-right: 2px; }

