/* Winston V3 — Home screen.
   Winston-first redesign (2026-05-29):
     - Hero folds equity + day delta + cash/BP + positions/orders into one
       block (was a separate stat strip + hero that restated equity 2×).
     - "Needs your review" card sits beside the up-next schedule (the
       earlier "Winston's read" verdict card was removed 2026-06-07 — the
       review card already carries the needs-you / nothing-needs-you state).
     - Allocation bar + 4-up plan board ("what Winston's planning next"):
       each sleeve card carries its NOW state + NEXT planned trade + a
       deep-link into its playbook. Replaces the old 6-chip picks strip +
       7 picks cards + separate engine row (all of which duplicated each
       other). Backed by /api/winston/next-trades.
     - Two-zone cockpit: main column (plan board + activity) + rail
       (top positions + up next).
   Mockup baseline: dashboard/v3/mockups/home-redesign-b2.html. */

/* ── Page-level refresh row ──────────────────────────────────── */
#screen-home .home-page-refresh-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 var(--space-2);
}

/* ── Hero (equity + stats folded in) ─────────────────────────── */
#screen-home .home-hero {
  display: flex;
  align-items: flex-end;
  gap: var(--space-5);
  flex-wrap: wrap;
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}
#screen-home .home-hero .eyebrow {
  font-size: var(--type-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2);
}
#screen-home .home-hero .hero-amount {
  font-size: 48px;
  font-weight: var(--weight-black);
  letter-spacing: -0.03em;
  font-family: var(--font-mono);
  line-height: 0.95;
  color: var(--ink);
}
#screen-home .home-hero .home-hero-meta {
  margin-left: auto;
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  flex-wrap: wrap;
  font-size: var(--type-sm);
  color: var(--ink-3);
}
#screen-home .home-hero .home-hero-meta strong { color: var(--ink); font-weight: var(--weight-semi); }
#screen-home .home-hero .dot-sep { color: var(--ink-faint); }
#screen-home .home-hero .hero-meta { margin-top: var(--space-3); font-size: var(--type-sm); flex-basis: 100%; }
@media (max-width: 720px) {
  #screen-home .home-hero { gap: var(--space-3); }
  #screen-home .home-hero .hero-amount { font-size: var(--type-3xl); }
  #screen-home .home-hero .home-hero-meta { margin-left: 0; flex-basis: 100%; }
}

/* ── Incident banner ─────────────────────────────────────────── */
#screen-home .incident-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--money-down-soft);
  border-left: 4px solid var(--money-down);
  border-radius: var(--radius-md);
  color: var(--ink);
  min-height: var(--tap-min);
  text-decoration: none;
  font-size: var(--type-sm);
}
#screen-home .incident-banner:hover {
  background: var(--money-down-soft);
  text-decoration: none;
  filter: brightness(0.97);
}
#screen-home .incident-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--money-down);
  flex: 0 0 28px;
}
#screen-home .incident-banner-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
#screen-home .incident-banner-body strong {
  color: var(--money-down);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-snug);
}
#screen-home .incident-banner-detail {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#screen-home .incident-banner-cta {
  flex: 0 0 auto;
  color: var(--money-down);
  font-weight: var(--weight-semi);
  font-size: var(--type-sm);
}
@media (max-width: 600px) {
  #screen-home .incident-banner { padding: var(--space-3); }
  #screen-home .incident-banner-cta { display: none; }
}

/* ── Section heading ─────────────────────────────────────────── */
#screen-home .home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: var(--space-1) var(--space-1) var(--space-3);
}
#screen-home .home-section-head h2 {
  font-size: var(--type-md);
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin: 0;
  letter-spacing: var(--tracking-snug);
}
#screen-home .home-section-head .meta {
  font-size: var(--type-xs);
  color: var(--ink-muted);
}

/* ── Two-zone cockpit ────────────────────────────────────────── */
#screen-home .home-zone {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: var(--space-4);
  align-items: start;
  margin-bottom: var(--space-5);
}
#screen-home .home-zone-rail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
/* Read-row: Needs-your-review (wide) + up-next schedule, side by side. Both
   stretch to equal height. When there's nothing to review the row collapses to
   a single column so the schedule fills the width instead of hugging the right. */
#screen-home .home-read-row {
  grid-template-columns: 1.9fr 1fr;
  align-items: stretch;
}
#screen-home .home-read-row.review-empty { grid-template-columns: 1fr; }
#screen-home .home-read-row > [data-role="exit-review"] { height: 100%; margin-bottom: 0; }
/* Bottom-row: activity (wide) + top positions rail, equal height. */
#screen-home .home-bottom-row { align-items: stretch; }
#screen-home .home-bottom-row > .card,
#screen-home .home-bottom-row .home-zone-rail > .card { height: 100%; margin-bottom: 0; }
@media (max-width: 1024px) {
  #screen-home .home-zone { grid-template-columns: 1fr; }
}

/* ── Allocation bar ──────────────────────────────────────────── */
#screen-home .alloc-eyebrow {
  font-size: var(--type-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2);
}
#screen-home .alloc-bar {
  display: flex;
  height: 28px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: var(--space-2);
}
#screen-home .alloc-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  min-width: 2px;
}
#screen-home .alloc-legend {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--type-xs);
  color: var(--ink-3);
  margin-bottom: var(--space-4);
}
#screen-home .alloc-leg-item { display: inline-flex; align-items: center; }
#screen-home .alloc-leg-item i {
  width: 9px; height: 9px;
  border-radius: 3px;
  margin-right: 6px;
  display: inline-block;
}
#screen-home .alloc-swing    { background: var(--sleeve-swing); }
#screen-home .alloc-scalp    { background: var(--sleeve-scalp); }
#screen-home .alloc-rotation { background: var(--sleeve-rotation); }
#screen-home .alloc-short    { background: var(--sleeve-short); }
#screen-home .alloc-options  { background: var(--sleeve-options); }
#screen-home .alloc-reversion{ background: var(--sleeve-reversion); }
#screen-home .alloc-trend    { background: var(--sleeve-trend); }
#screen-home .alloc-income   { background: var(--sleeve-income); }
#screen-home .alloc-pead     { background: var(--sleeve-pead); }
#screen-home .alloc-cta     { background: var(--sleeve-cta); }
#screen-home .alloc-momentum { background: var(--sleeve-momentum); }

/* ── Plan board — 4 sleeve cards (NOW + NEXT) ────────────────── */
/* Kit Today.jsx: all five engine cards in ONE row (repeat(5,1fr)), with the
   kit's exact responsive descent — 5 → 3 → 2 → 1. */
#screen-home .plan-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
}
@media (max-width: 1100px) { #screen-home .plan-board { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { #screen-home .plan-board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px)  { #screen-home .plan-board { grid-template-columns: 1fr; } }
#screen-home .plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  border-top: 3px solid var(--ink-faint);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
#screen-home .plan-card.plan-swing    { border-top-color: var(--sleeve-swing); }
#screen-home .plan-card.plan-scalp    { border-top-color: var(--sleeve-scalp); }
#screen-home .plan-card.plan-rotation { border-top-color: var(--sleeve-rotation); }
#screen-home .plan-card.plan-short    { border-top-color: var(--sleeve-short); }
#screen-home .plan-card.plan-options  { border-top-color: var(--sleeve-options); }
#screen-home .plan-card.plan-reversion{ border-top-color: var(--sleeve-reversion); }
#screen-home .plan-card.plan-trend    { border-top-color: var(--sleeve-trend); }
#screen-home .plan-card.plan-income   { border-top-color: var(--sleeve-income); }
#screen-home .plan-card.plan-pead     { border-top-color: var(--sleeve-pead); }
#screen-home .plan-card.plan-cta     { border-top-color: var(--sleeve-cta); }
#screen-home .plan-card.plan-momentum { border-top-color: var(--sleeve-momentum); }
#screen-home .plan-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
#screen-home .plan-dot {
  width: 9px; height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--ink-faint);
}
#screen-home .plan-swing    .plan-dot { background: var(--sleeve-swing); }
#screen-home .plan-scalp    .plan-dot { background: var(--sleeve-scalp); }
#screen-home .plan-rotation .plan-dot { background: var(--sleeve-rotation); }
#screen-home .plan-short    .plan-dot { background: var(--sleeve-short); }
#screen-home .plan-options  .plan-dot { background: var(--sleeve-options); }
#screen-home .plan-reversion .plan-dot { background: var(--sleeve-reversion); }
#screen-home .plan-trend     .plan-dot { background: var(--sleeve-trend); }
#screen-home .plan-income    .plan-dot { background: var(--sleeve-income); }
#screen-home .plan-pead      .plan-dot { background: var(--sleeve-pead); }
#screen-home .plan-cta      .plan-dot { background: var(--sleeve-cta); }
#screen-home .plan-momentum  .plan-dot { background: var(--sleeve-momentum); }
#screen-home .plan-name {
  font-size: var(--type-md);
  font-weight: var(--weight-bold);
  color: var(--ink);
  letter-spacing: -0.01em;
}
#screen-home .plan-pill {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: var(--weight-bold);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
#screen-home .plan-pill.on    { background: var(--money-up-soft); color: var(--money-up); }
#screen-home .plan-pill.watch { background: var(--ai-soft); color: var(--ai); }
#screen-home .plan-pill.off   { background: var(--surface-3); color: var(--ink-muted); }
/* Rotation is a permanently-dormant mockup engine (#319) — teal-tinted pill
   so it reads as "demo / not live", never as On. */
#screen-home .plan-pill.dormant {
  background: var(--sleeve-rotation-soft);
  color: var(--sleeve-rotation);
}
#screen-home .plan-now {
  font-size: var(--type-xs);
  color: var(--ink-muted);
  line-height: 1.4;
}
#screen-home .plan-now strong { color: var(--ink-3); font-weight: var(--weight-semi); }
#screen-home .plan-next {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-top: 2px;
}
#screen-home .plan-next-lbl {
  font-size: 10px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ai);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-1);
}
#screen-home .plan-next-body {
  font-size: var(--type-sm);
  color: var(--ink-2);
  line-height: 1.45;
}
#screen-home .plan-next-body.muted { color: var(--ink-muted); }
#screen-home .plan-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-2);
}
#screen-home .plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: inherit;
  font-size: var(--type-xs);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 9px;
  color: var(--ink-3);
  cursor: pointer;
}
#screen-home .plan-chip:hover { border-color: var(--ai-line); background: var(--surface-3, var(--surface-2)); }
/* Queued = the actual next buy → ai-accent so it pops. Held = calm/neutral
   with a ✓. NEVER P&L-green: the % is an analyst target, not realized P&L
   (audit fux-1 — green there reads as "up 73%"). */
#screen-home .plan-chip.queued {
  background: var(--ai-soft);
  border-color: var(--ai-line);
  color: var(--ai);
}
#screen-home .plan-chip-mark { color: var(--ink-muted); font-weight: var(--weight-bold); }
#screen-home .plan-chip .mono { font-family: var(--font-mono); font-weight: var(--weight-bold); }
#screen-home .plan-chip-up { color: var(--ink-3); font-weight: var(--weight-semi); font-family: var(--font-mono); }
#screen-home .plan-link {
  margin-top: auto;
  padding-top: var(--space-2);
  color: var(--ai);
  font-size: var(--type-sm);
  font-weight: var(--weight-semi);
  text-decoration: none;
}
#screen-home .plan-link:hover { text-decoration: underline; }

/* ── Up next card (kit Today.jsx upnext-card) ─────────────────────
   Highlighted next routine + countdown, then a dashed list of what
   follows. Lives in the read-row beside Winston's read; stretches to
   match its height. */
#screen-home .upnext-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  height: 100%;
}
#screen-home .upnext-card-head {
  font-size: var(--type-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-muted);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-3);
}
#screen-home .upnext-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
#screen-home .upnext-next-what { font-size: var(--type-md); font-weight: var(--weight-bold); }
#screen-home .upnext-next-when {
  font-family: var(--font-mono);
  font-size: var(--type-sm);
  color: var(--ink-3);
  margin-top: 2px;
}
#screen-home .upnext-next .countdown {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: var(--weight-bold);
  color: var(--ai);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
#screen-home .upnext-next .countdown .unit {
  font-size: var(--type-xs);
  font-weight: var(--weight-semi);
  color: var(--ink-muted);
  margin-left: 4px;
}
/* Imminent (<15m) next gets the ai accent + a gentle pulse on the countdown. */
#screen-home .upnext-next[data-tier="imminent"] .countdown {
  animation: home-upnext-pulse 1.2s ease-in-out infinite;
}
@keyframes home-upnext-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}
#screen-home .upnext-list { display: flex; flex-direction: column; flex: 1; }
#screen-home .upnext-row {
  display: grid;
  grid-template-columns: 64px auto 1fr;
  gap: var(--space-2);
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dashed var(--hairline);
}
#screen-home .upnext-row:last-child { border-bottom: none; }
#screen-home .upnext-row-time { font-size: var(--type-xs); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
#screen-home .upnext-row-what { font-size: var(--type-sm); font-weight: var(--weight-semi); }
#screen-home .upnext-row-sub {
  font-size: var(--type-xs);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Holding preview rows ────────────────────────────────────── */
#screen-home .holding-preview {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--hairline);
}
#screen-home .holding-preview:last-child { border-bottom: none; }
#screen-home .holding-preview-btn {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  padding-left: var(--space-2);
  padding-right: var(--space-2);
  margin-left: calc(-1 * var(--space-2));
  margin-right: calc(-1 * var(--space-2));
  border-radius: var(--radius-sm);
  transition: background-color var(--motion-fast) var(--ease-out);
}
#screen-home .holding-preview-btn:hover { background: var(--surface-2); }
#screen-home .holding-symbol {
  font-weight: var(--weight-semi);
  font-size: var(--type-md);
}
#screen-home .holding-sub {
  display: block;
  font-size: var(--type-xs);
  color: var(--ink-muted);
}
#screen-home .holding-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-semi);
}

/* ── Needs your review — warn-accent wrapper around reused thesis cards ── */
#screen-home .home-review {
  border: 1px solid var(--warn-line, rgba(217, 119, 6, 0.40));
  background: var(--warn-soft);
  margin-bottom: var(--space-5);
}
#screen-home .home-review .card-title::before {
  content: "\26A0\FE0E";              /* ⚠ attention marker, text-style */
  color: var(--warn); margin-right: 6px; font-weight: var(--weight-bold);
}
#screen-home .review-intro {
  font-size: var(--type-sm); line-height: var(--leading-snug);
  margin: 2px 0 var(--space-3);
}
/* The card bodies carry their own margins; the list is a plain stack. */
#screen-home .review-list .thx-card:last-child { margin-bottom: 0; }
