/* =========================================================
   DASHBOARD V3 — ELITE DECISION LAB (FINAL)
   Scope: Dashboard only
   Philosophy: Authority • Calm • Hierarchy
   ========================================================= */

/* ---------------------------------------------------------
   Tokens (dashboard-scoped)
   --------------------------------------------------------- */

:root {
  --dash-bg: #f6fbfc;
  --dash-surface: #ffffff;
  --dash-surface-soft: #f1f7f8;

  --dash-border: rgba(15,23,42,.06);
  --dash-border-strong: rgba(0,109,119,.25);

  --dash-shadow-low: 0 6px 18px rgba(15,23,42,.06);
  --dash-shadow-mid: 0 18px 48px rgba(15,23,42,.10);

  --dash-radius-xl: 28px;
  --dash-radius-lg: 22px;
  --dash-radius-md: 16px;

  --space-xs: .5rem;
  --space-sm: .75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
}

/* ---------------------------------------------------------
   HERO SECTION — SINGLE COMMAND SURFACE
   --------------------------------------------------------- */

.dashv3-hero {
  background:
    radial-gradient(1200px 420px at 15% -20%, rgba(131,197,190,.28), transparent 60%),
    linear-gradient(180deg, #eef7f9, #ffffff);
  padding: var(--space-xl) 0;
}

/* GRID: message dominates, controls defer */
.dashv3-hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: var(--space-lg);
  align-items: stretch;
}

/* ---------------------------------------------------------
   HERO — LEFT (AUTHORITY)
   --------------------------------------------------------- */

.dashv3-hero-left {
  background: var(--dash-surface);
  border-radius: var(--dash-radius-xl);
  padding: 3rem;
  box-shadow: var(--dash-shadow-mid);
  border: 1px solid var(--dash-border);
  position: relative;
  overflow: hidden;
}

.dashv3-hero-left::after {
  content: "";
  position: absolute;
  bottom: -40px;   /* adjust to taste */
  right: -40px;
  width: 520px;    /* controls illustration size */
  height: 520px;

  background-image: url("/Images/abstract2.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: bottom right;

  opacity: 0.14;   /* KEY: elite subtlety */
  pointer-events: none;
  z-index: 0;
  bottom: -20px;
  right: -20px;
}

.dashv3-hero-left > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .dashv3-hero-left::after {
    width: 360px;
    height: 360px;
    opacity: 0.08;
  }
}

.eyebrow {
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-deep-teal);
  margin-bottom: var(--space-sm);
}

.dashv3-title {
  font-size: clamp(2.6rem, 3.8vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.dashv3-lead {
  max-width: 62ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* Actions — clear hierarchy */
.dashv3-hero-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.dashv3-hero-actions .btn-primary {
  height: 48px;
  padding: 0 1.4rem;
  font-weight: 700;
  box-shadow: 0 16px 36px rgba(0,109,119,.32);
}

.dashv3-hero-actions .btn-ghost {
  height: 48px;
  background: rgba(15,23,42,.05);
  border-radius: 999px;
}

/* Disclaimer — visually quiet */
.dashv3-disclaimer {
  font-size: .8rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  border-left: 3px solid rgba(0,109,119,.35);
  padding-left: var(--space-sm);
}

/* ---------------------------------------------------------
   HERO — RIGHT (SUBORDINATE CONTROLS)
   --------------------------------------------------------- */

.dashv3-hero-right {
  background: linear-gradient(
    180deg,
    rgba(245, 250, 249, 0.9),
    rgba(245, 250, 249, 0.75)
  );
  border-radius: var(--dash-radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--dash-border);
  box-shadow: var(--dash-shadow-low);
}

.dashv3-hero-toprow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.dashv3-panel-title {
  font-size: 1.05rem;
}

.dashv3-controls {
  display: grid;
  gap: var(--space-md);
}

.dashv3-control-label {
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: .35rem;
}

/* ================================
   Scenario pills — shared styling
   ================================ */

.dashv3-pill {
  /* match scenario-pill */
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  color: #223;
  transition: all 0.18s ease;
}

/* Active state (dashboard uses .is-active instead of .active) */
.dashv3-pill.is-active {
  background: linear-gradient(
    135deg,
    var(--color-deep-teal),
    var(--color-seafoam)
  );
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(0, 109, 119, 0.35);
}

/* Optional hover polish */
.dashv3-pill:not(.is-active):hover {
  background: #e7f1f1;
}

.dashv3-pillrow {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.35rem;
  background: #f1f5f6;
  border-radius: 999px;
}

/* Dashboard spacing polish */
.dash-assumptions {
  margin-top: 0.75rem;
  gap: 0.75rem;
}

/* ---------------------------------------------------------
   INSIGHT BAR — SINGLE LINE OF TRUTH
   --------------------------------------------------------- */

.dashv3-insight {
  margin-top: var(--space-lg);
  padding: .9rem 1.1rem;
  border-radius: var(--dash-radius-md);
  background: rgba(131,197,190,.14);
  display: flex;
  gap: .75rem;
}

.dashv3-insight-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-deep-teal);
  box-shadow: 0 0 0 6px rgba(0,109,119,.15);
  margin-top: .45rem;
}

.dashv3-insight-text {
  font-size: .95rem;
  line-height: 1.45;
}

/* ---------------------------------------------------------
   KPI STRIP — INSTRUMENT CLUSTER
   --------------------------------------------------------- */

.dashv3-kpi {
  position: relative;
  padding: 1.6rem 1.75rem;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: linear-gradient(
    180deg,
    #ffffff,
    #f9fbfc
  );
}

.dashv3-kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-teal),
    var(--color-seafoam)
  );
  opacity: 0.6;
}

.dashv3-kpi-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.35rem;
}

.dashv3-kpi-value {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.dashv3-kpi-sub {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #475569;
}

.dashv3-kpi-sub strong {
  font-weight: 600;
}

.dashv3-kpi-sub strong.positive {
  color: #0f766e;
}

.dashv3-kpi-sub strong.negative {
  color: #b91c1c;
}

.dashv3-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
}

.dashv3-kpi:first-child {
  background: linear-gradient(
    180deg,
    rgba(0, 128, 128, 0.06),
    #ffffff 60%
  );
}

.dashv3-kpi::after {
  content: "◦";
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.1rem;
  color: rgba(0, 0, 0, 0.15);
}

.dashv3-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.dashv3-bsheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.dashv3-btitle {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
}

.dashv3-row {
  padding: 0.28rem 0;
  font-size: 0.88rem;
}

.dashv3-row strong {
  font-variant-numeric: tabular-nums;
}

.dashv3-traj-row,
.dashv3-list-row,
.dashv3-trade-row {
  padding: 0.25rem 0;
  font-size: 0.85rem;
}

/* ==============================
   BALANCE SHEET — ELITE UPGRADE
   ============================== */

/* Card head polish */
.dashv3-card.dashv3-card--bsheet .dashv3-cardhead,
.dashv3-card .dashv3-cardhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(14, 26, 42, 0.08);
}

.dashv3-card .dashv3-muted {
  font-size: 0.9rem;
  color: rgba(14, 26, 42, 0.60);
  width: 100%;
}

/* Two-column symmetry + vertical spine */
.dashv3-bsheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .dashv3-bsheet { grid-template-columns: 1fr; }
}

/* Column container */
.dashv3-bcol {
  position: relative;
  padding: 0.25rem 0.25rem 0.25rem 0.25rem;
}

/* add a spine between columns on desktop */
@media (min-width: 901px) {
  .dashv3-bcol:first-child {
    padding-right: 1.25rem;
  }
  .dashv3-bcol:last-child {
    padding-left: 1.25rem;
  }
  .dashv3-bcol:first-child::after {
    content: "";
    position: absolute;
    top: 0.25rem;
    right: -0.625rem;
    width: 1px;
    height: calc(100% - 0.5rem);
    background: rgba(14, 26, 42, 0.08);
  }
}

/* Column header row (Assets / Debts) */
.dashv3-btitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(14, 26, 42, 0.55);
  margin-bottom: 0.75rem;
}

/* Track: make it look like a designed component */
.dashv3-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(14, 26, 42, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(14, 26, 42, 0.06);
  margin-bottom: 0.85rem;
}

/* Segments */
.dashv3-seg {
  height: 100%;
  float: left;
  position: relative;
  min-width: 0; /* prevents label weirdness */
}

/* Segment labels: hide by default (they clutter on small widths) */
.dashv3-seg .seg-label { display: none; }

/* Color system: CSS-only; adjust to your tokens */
#segCash { background: rgba(0, 109, 119, 0.55); }
#segInvest { background: rgba(0, 109, 119, 0.35); }
#segHome { background: rgba(0, 109, 119, 0.22); }

#segMortgage { background: rgba(14, 26, 42, 0.55); }
#segOtherDebt { background: rgba(14, 26, 42, 0.28); }

/* Debt variant makes sure it stays differentiated */
.dashv3-seg.dashv3-debt { filter: saturate(0.85); }

/* Ghost overlays: a fine “after” layer */
.dashv3-ghost {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  background: rgba(255, 196, 0, 0.25); /* warm “gold” glow */
  box-shadow: 0 0 0 1px rgba(255, 196, 0, 0.25);
}

.dashv3-ghost.dashv3-debt {
  background: rgba(255, 196, 0, 0.18);
}

/* Rows: turn into an aligned “statement” with strong rhythm */
.dashv3-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(14, 26, 42, 0.06);
}

.dashv3-row span {
  color: rgba(14, 26, 42, 0.70);
}

.dashv3-row strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* Totals = “header row” treatment */
.dashv3-row:first-of-type {
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(14, 26, 42, 0.10);
}

.dashv3-row:first-of-type span {
  font-weight: 600;
  color: rgba(14, 26, 42, 0.82);
}

.dashv3-row:first-of-type strong {
  font-size: 1.05rem;
}

/* Footnote: calmer + tighter */
.dashv3-footnote {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(14, 26, 42, 0.08);
  color: rgba(14, 26, 42, 0.62);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Optional: add subtle section padding inside card */
.card.dashv3-card {
  padding: 1.5rem;
}

/* ==============================
   DEBT BAR — PREMIUM TREATMENT
   ============================== */

/* Base debt segment */
.dashv3-seg.dashv3-debt {
  background: linear-gradient(
    180deg,
    rgba(20, 28, 38, 0.55),
    rgba(20, 28, 38, 0.45)
  );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.18);
}

/* Differentiate “other” debt subtly */
#segOtherDebt {
  background: linear-gradient(
    180deg,
    rgba(20, 28, 38, 0.35),
    rgba(20, 28, 38, 0.28)
  );
}

/* Track background slightly darker for debts */
.dashv3-bcol .dashv3-track[aria-label*="Debt"] {
  background: rgba(20, 28, 38, 0.10);
}

/* Ghost comparison layer = warm gold overlay */
.dashv3-ghost.dashv3-debt {
  background: rgba(255, 196, 0, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 196, 0, 0.22);
}

.dashv3-bcol .dashv3-btitle {
  color: rgba(20, 28, 38, 0.65);
}

.dashv3-lab {
  position: relative;
  background:
    linear-gradient(
      180deg,
      rgba(237,246,249,.85),
      #ffffff
    );
  border-top: 1px solid rgba(0,109,119,.25);
  padding-top: 3rem;
}

.dashv3-lab::before {
  content: "LAB MODE";
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  opacity: 0.35;
}

.dashv3-mini--assumptions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: #f4faf9;
  border-radius: 10px;
  font-size: 0.85rem;
}

.mini-item {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
}

.mini-label {
  color: #5b6f73;
  font-weight: 500;
}

.dashv3-horizon input[type="range"] {
  width: 100%;
  margin: 0.5rem 0;
}

.dashv3-horizon-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: 0.85rem;
  color: #6b7c80;
}

.dashv3-horizon-meta strong {
  min-width: 260px;          /* key line */
  text-align: center;
  display: inline-block;
  color: #0f766e;
  font-weight: 700;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.dashv3-stress-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #f7fbfb;
  border-radius: 12px;
  border: 1px solid #e3eeee;
}

.dashv3-stress-input {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.dashv3-stress-input input {
  width: 70px;
}

.dashv3-mini--stress {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.dashv3-includes {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 0.9rem;
  color: #3a4a4a;
}

.dashv3-includes-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dashv3-includes ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashv3-includes li {
  padding-left: 1.1rem;
  position: relative;
  margin: 0.35rem 0;
}

.dashv3-includes li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-deep-teal);
}

.dashv3-control-block {
  margin-bottom: 1.5rem;
}

/* ==============================
   LIQUIDITY LENS — PRIMARY GRID
   ============================== */

.dashv3-lens-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.dashv3-lens-tile {
  padding: 1.25rem 1.25rem 1.4rem;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(245, 250, 250, 0.9),
    rgba(235, 245, 245, 0.9)
  );
  border: 1px solid rgba(0, 109, 119, 0.10);
  box-shadow: 0 10px 28px rgba(0,0,0,0.05);
}

.dashv3-lens-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 60, 70, 0.65);
  margin-bottom: 0.4rem;
}

.dashv3-lens-val {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.15;
}

.dashv3-lens-sub {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: rgba(0,0,0,0.55);
}

.dashv3-lens-val.calm {
  color: var(--teal-700);
}

.dashv3-lens-val.watch {
  color: #9c6b00; /* warm gold, not red */
}

.dashv3-list {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.6rem;
}

.dashv3-list-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
  font-size: 0.9rem;
}

.dashv3-list-row span {
  color: rgba(0,0,0,0.6);
}

.dashv3-list-row strong {
  font-weight: 600;
  color: var(--ink-900);
}

.dashv3-card[data-lens="liquidity"] {
  background:
    radial-gradient(
      900px 200px at top center,
      rgba(0, 109, 119, 0.06),
      transparent
    ),
    white;
}
/* ---------------------------------------------------------
   TRAJECTORY
   --------------------------------------------------------- */

.dashv3-traj-hero {
  margin: 1.2rem 0 1.6rem;
}

.dashv3-traj-hero-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0,0,0,0.55);
}

.dashv3-traj-hero-value {
  font-size: 2.4rem;
  font-weight: 700;
  margin-top: 0.3rem;
  color: var(--ink-900);
}

.dashv3-spark-wrap {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.dashv3-traj-legend {
  display: flex;
  gap: 1.4rem;
  font-size: 0.85rem;
  color: rgba(0,0,0,0.6);
  margin-bottom: 0.6rem;
}

.dashv3-traj-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.35rem;
}

.dashv3-traj-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1.4rem;
}

.dashv3-traj-metric span {
  font-size: 0.8rem;
  color: rgba(0,0,0,0.55);
}

.dashv3-traj-metric strong {
  display: block;
  margin-top: 0.15rem;
  font-weight: 600;
  font-size: 1rem;
}

.dashv3-traj-legend span {
  opacity: 0.5;
}

.dashv3-traj-legend span.is-active {
  opacity: 1;
  font-weight: 600;
}

body:not(.has-sandbox) .dot.a,
body:not(.has-sandbox) .dot.b {
  display: none;
}

.dashv3-traj-legend {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--slate-600);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-item em {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--slate-500);
}

.legend-line {
  width: 28px;
  height: 0;
  border-top: 2px solid;
}

.legend-line.baseline { border-color: var(--teal-700); }
.legend-line.option-a {
  border-color: var(--teal-400);
  border-top-style: dashed;
}
.legend-line.option-b {
  border-color: var(--slate-400);
  border-top-style: dotted;
}

.dashv3-traj-insight {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--teal-50);
  border-radius: 12px;
}

.dashv3-traj-insight .label {
  display: block;
  font-size: 0.75rem;
  color: var(--slate-500);
}

.dashv3-traj-insight .delta {
  font-weight: 600;
  font-size: 0.9rem;
}

.dashv3-traj-insight .delta.positive {
  color: var(--teal-700);
}

.dashv3-traj-insight .delta.muted {
  color: var(--slate-500);
}

.dashv3-traj-legend {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--slate-500);
}

.legend-item strong {
  font-weight: 500;
}

.legend-item em {
  font-size: 0.7rem;
}

/* ==============================
   SANDBOX
   ============================== */

  .dashv3-sandbox-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 1.2rem;
  align-items: end;
  margin-top: 0.75rem;
}

.sandbox-amount {
  grid-column: span 1;
}

.sandbox-option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.option-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
}

.sandbox-option select {
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  background: #fff;
}

.sandbox-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.dashv3-sandbox-stack {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 0.75rem;
}

.sandbox-row {
  display: flex;
  align-items: flex-end;
  gap: 1.2rem;
}

.sandbox-row-primary {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--slate-200);
}

.sandbox-amount {
  max-width: 360px;
}

.sandbox-row-compare {
  align-items: center;
}

.sandbox-option {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
}

.option-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
}

.sandbox-option select {
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--slate-200);
  background: #fff;
}

.sandbox-vs {
  font-size: 0.75rem;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0.3rem;
}

.sandbox-actions {
  display: flex;
  gap: 0.6rem;
  margin-left: auto;
}

.sandbox-option select:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 2px rgba(0,109,119,0.15);
}

/* Amount emphasis */
.sandbox-amount-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;

  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  margin-top: 0.5rem;
  background: linear-gradient(
    135deg,
    rgba(0, 109, 119, 0.08),
    rgba(0, 109, 119, 0.04)
  );

  border: 1px solid rgba(0, 109, 119, 0.25);
}

.sandbox-amount-pill .currency {
  font-size: 0.9rem;
  color: var(--slate-600);
}

.sandbox-amount-pill input {
  width: 5.5ch;
  border: none;
  background: transparent;

  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink-900);

  outline: none;
}

.sandbox-amount-pill .suffix {
  font-size: 0.8rem;
  color: var(--slate-500);
}

/* subtle focus polish */
.sandbox-amount-pill:focus-within {
  box-shadow: 0 0 0 2px rgba(0, 109, 119, 0.18);
}

.dashv3-cardhead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.dashv3-cardhead-row .section-kicker {
  margin: 0;
  padding: 0;
  line-height: 1;
  white-space: nowrap;
}

.dashv3-cardhead-row .dashv3-muted {
  margin: 0;
  font-size: 0.8rem;
  white-space: nowrap;
}
.dashv3-sandbox-grid {
  align-items: end;
}

.sandbox-option select {
  font-weight: 500;
}

.sandbox-option select:hover {
  border-color: var(--teal-400);
}

.sandbox-amount-pill {
  min-width: 180px;
}

@media (max-width: 900px) {
  .dashv3-sandbox-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .sandbox-actions {
    margin-left: 0;
    justify-content: flex-start;
  }
}
/* ============================
   OUTCOMES (Premium)
   ============================== */

.dashv3-outcomes {
  --tile-radius: 14px;
}

.dashv3-out-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 0.75rem;
}

.dashv3-out-tile {
  padding: 1rem 1.1rem;
  border-radius: var(--tile-radius);
  border: 1px solid var(--slate-200);
  background: #fff;

  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Baseline = calm anchor */
.dashv3-out-tile.is-baseline {
  background: var(--slate-50);
}

/* Options = slightly elevated */
.dashv3-out-tile.is-option {
  border-color: rgba(0,109,119,0.25);
  background: linear-gradient(
    180deg,
    rgba(0,109,119,0.04),
    rgba(0,109,119,0.01)
  );
}

.dashv3-out-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.dashv3-out-val {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink-900);
}

.dashv3-out-sub {
  font-size: 0.8rem;
  color: var(--slate-500);
}

.dashv3-out-compare {
  margin-top: 1.2rem;
  padding: 0.75rem 1rem;

  display: flex;
  justify-content: space-between;
  align-items: center;

  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(0,109,119,0.08),
    rgba(0,109,119,0.04)
  );

  border: 1px solid rgba(0,109,119,0.25);
}

.dashv3-out-compare span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-600);
}

.dashv3-out-compare strong {
  font-size: 1.2rem;
  font-weight: 700;
}

/* ==============================
   TRADEOFF LENS (Premium)
   ============================== */

.dashv3-tradeoff-card {
  --row-radius: 12px;
}

.dashv3-tradeoff {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.dashv3-trade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0.6rem 0.85rem;
  border-radius: var(--row-radius);

  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.015),
    rgba(0,0,0,0.005)
  );

  border: 1px solid var(--slate-200);
}

.trade-label {
  font-size: 0.78rem;
  color: var(--slate-500);
}

.trade-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: 0.02em;
  text-align: right;

}

.dashv3-tradeoff {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.015),
    rgba(0,0,0,0.005)
  );
  border-radius: 16px;
  padding: 0.5rem;
}

.dashv3-trade-row:first-child {
  background: linear-gradient(
    180deg,
    rgba(0,109,119,0.06),
    rgba(0,109,119,0.02)
  );
  border-color: rgba(0,109,119,0.25);
}

/* Exact Mapping */

.dashv3-change-list {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.02),
    rgba(0,0,0,0.005)
  );
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
}

.dashv3-change-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.dashv3-change-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: var(--teal-600);
  font-weight: 700;
}

.dashv3-change-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

/* ==============================
   Trajectory SVG — single source
   ============================== */

#trajSpark { width: 100%; height: 100%; display: block; }

.traj-grid {
  stroke: var(--slate-200);
  stroke-width: 1;
  opacity: 0.9;
}

.traj-axislabel {
  font-size: 9px;
  fill: var(--slate-500);
}

.traj-area.baseline {
  fill: rgba(0, 109, 119, 0.10); /* teal tint */
}

.traj-line {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.traj-line.baseline { stroke: var(--teal-600); stroke-width: 2.6; }
.traj-line.option-a { stroke: var(--teal-400); stroke-width: 1.9; stroke-dasharray: 6 4; opacity: 0.95; }
.traj-line.option-b { stroke: var(--slate-400); stroke-width: 1.7; stroke-dasharray: 2 4; opacity: 0.85; }

.traj-dot { vector-effect: non-scaling-stroke; }
.traj-dot.baseline { fill: var(--teal-600); }
.traj-dot.option-a { fill: var(--teal-400); }
.traj-dot.option-b { fill: var(--slate-400); }

.dashv3-traj-summary {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.9rem;
  margin: 0.75rem 0 0.5rem;
}

.dashv3-traj-summary strong {
  font-weight: 600;
  color: var(--ink-900);
}

.dashv3-traj-summary .muted {
  color: var(--slate-500);
  font-size: 0.85rem;
}

/* ---------------------------------------------------------
   ANALYTICAL CARDS
   --------------------------------------------------------- */

.dashv3-card {
  background: var(--dash-surface);
  border-radius: var(--dash-radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--dash-shadow-low);
  border: 1px solid var(--dash-border);
}

.dashv3-cardhead {
  margin-bottom: 0.75rem; /* tighter for control rails */
}

/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 980px) {
  .dashv3-hero-grid {
    grid-template-columns: 1fr;
  }

  .dashv3-hero-left {
    padding: 2.2rem 1.6rem;
  }
}

/* ---------------------------------------------------------
   Reveal
   --------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* CRITICAL: allow grid children to shrink */
.budget-layout > *,
.dashv3-main-grid > *,
.dashv3-hero-grid > *,
.dashv3-lab-grid > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .dashv3-hero-grid,
  .dashv3-main-grid,
  .dashv3-lab-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Liquidity Lens Grid ===== */
.dashv3-lens-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .dashv3-lens-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Lens Tile ===== */
.dashv3-lens-tile {
  padding: 0.85rem 0.75rem;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.85),
    rgba(245,250,249,0.9)
  );
  border: 1px solid rgba(0,0,0,0.05);
  text-align: center;
}

/* Labels */
.dashv3-lens-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

/* Values (CRITICAL FIX) */
.dashv3-lens-val {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;     /* prevents ugly line breaks */
}

/* Subtext */
.dashv3-lens-sub {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.dashv3-divider {
  height: 1px;
  background: rgba(0,0,0,0.06);
  margin: 1rem 0 0.75rem;
}

.dashv3-list {
  display: grid;
  gap: 0.35rem;
}

.dashv3-list-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.25rem 0;
}

.dashv3-list-row strong {
  font-weight: 600;
}

/* ===== Trajectory Hero ===== */
.dashv3-traj-hero {
  padding: 1rem 0 0.75rem;
}

.dashv3-traj-hero-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* BIG NUMBER */
.dashv3-traj-hero-value {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  margin: 0.25rem 0 0.5rem;
}

/* Insight block */
.dashv3-traj-insight {
  display: grid;
  gap: 0.35rem;
}

.insight-primary strong {
  font-weight: 700;
}

/* Deltas */
.delta {
  font-size: 0.85rem;
}

.delta.positive {
  color: var(--positive);
}

.delta.muted {
  color: var(--muted);
}

.dashv3-traj-legend {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.legend-item.is-muted {
  opacity: 0.6;
}

.dashv3-spark-wrap {
  height: 90px;
  margin-top: 0.5rem;
}

.dashv3-traj-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (max-width: 900px) {
  .dashv3-traj-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dashv3-traj-metric span {
  font-size: 0.75rem;
  color: var(--muted);
}

.dashv3-traj-metric strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.dashv3-lens-val:empty::after,
.dashv3-traj-hero-value:empty::after,
strong:empty::after {
  content: "—";
  opacity: 0.4;
}

/* ===============================
   TRAJECTORY – HERO
================================ */

.dashv3-trajectory .dashv3-traj-hero {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem 0 1rem;
}

/* Label */
.dashv3-traj-hero-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* BIG number = single focal point */
.dashv3-traj-hero-value {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1;
}

/* Insight block */
.dashv3-traj-insight {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding-top: 0.25rem;
}

.insight-primary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
}

.insight-primary .label {
  font-size: 0.75rem;
  color: var(--muted);
}

.insight-primary strong {
  font-size: 0.95rem;
  font-weight: 700;
}

/* ===============================
   DELTAS
================================ */

.delta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  padding-left: 0.5rem;
  border-left: 3px solid transparent;
}

.delta.positive {
  color: var(--positive);
  border-left-color: var(--positive);
}

.delta.muted {
  color: var(--muted);
  border-left-color: rgba(0,0,0,0.1);
}

/* ===============================
   LEGEND
================================ */

.dashv3-traj-legend {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-item em {
  font-size: 0.7rem;
  color: var(--muted);
}

.legend-item.is-muted {
  opacity: 0.55;
}

/* ===============================
   SPARKLINE
================================ */

.dashv3-spark-wrap {
  margin-top: 0.75rem;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  height: 90px;
}

.dashv3-traj-summary {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.dashv3-traj-summary strong {
  font-weight: 700;
}

.dashv3-traj-summary .muted {
  color: var(--muted);
}

/* ===============================
   OUTCOMES GRID
================================ */

.dashv3-traj-grid {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(0,0,0,0.08);

  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .dashv3-traj-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dashv3-traj-metric span {
  font-size: 0.7rem;
  color: var(--muted);
}

.dashv3-traj-metric strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.dashv3-traj-hero-value:empty::after,
#trajNetWorth:contains("–"),
strong:contains("–") {
  opacity: 0.45;
}

/* ===============================
   CARD HEAD (GLOBAL FIX)
================================ */

.dashv3-cardhead {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}


