:root {
  --bg-deep: #06080d;
  --bg: #0b0f15;
  --bg-elevated: #121820;
  --surface: #161d28;
  --surface-hover: #1c2533;
  --border: rgba(148, 163, 184, 0.11);
  --border-strong: rgba(148, 163, 184, 0.2);
  --text: #f1f5f9;
  --text-soft: #94a3b8;
  --muted: #64748b;
  --profit: #34d399;
  --profit-on: #052e1c;
  --profit-glow: rgba(52, 211, 153, 0.22);
  --loss: #f87171;
  --loss-soft: #fecaca;
  --cogs: #60a5fa;
  --fees: #fbbf24;
  --shipping: #a78bfa;
  --ads: #fb7185;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --accent: #2ee6a8;
  --accent-dim: rgba(46, 230, 168, 0.12);
  --sidebar-w: 300px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(52, 211, 153, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(52, 211, 153, 0.07), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(96, 165, 250, 0.05), transparent),
    radial-gradient(ellipse 40% 35% at 0% 80%, rgba(167, 139, 250, 0.04), transparent),
    linear-gradient(175deg, var(--bg-deep) 0%, var(--bg) 45%, #0d1219 100%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 75%);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(6, 8, 13, 0.78);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-mark {
  color: var(--profit);
  font-size: 1rem;
}

.logo span {
  color: var(--profit);
}

.header-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.header-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.header-nav a:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}

/* Hero */
.hero {
  padding: 2.5rem 1.25rem 1.75rem;
  animation: rise 0.7s var(--ease) both;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--profit);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(2.1rem, 6.5vw, 3.4rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.hero h1 em {
  font-style: italic;
  color: var(--text-soft);
}

.lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 46ch;
}

/* Workspace */
.workspace {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 2rem;
}

@media (min-width: 860px) {
  .workspace {
    grid-template-columns: 1fr 1.05fr;
    align-items: start;
    gap: 1.5rem;
  }

  .results {
    position: sticky;
    top: 4.5rem;
  }
}

.panel {
  background: rgba(22, 29, 40, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: rise 0.7s var(--ease) 0.1s both;
}

.results {
  animation-delay: 0.18s;
  background:
    linear-gradient(165deg, var(--surface) 0%, #131a24 55%, rgba(52, 211, 153, 0.04) 100%);
  border-color: var(--border-strong);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.dashboard-panel {
  overflow: hidden;
}

.dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--profit);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  flex-shrink: 0;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--profit);
  box-shadow: 0 0 8px var(--profit);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 520px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi-card {
  position: relative;
  padding: 0.85rem 0.9rem;
  background: rgba(11, 15, 21, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
  animation: kpi-in 0.5s var(--ease) both;
}

.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.1s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.2s; }

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 55%);
  pointer-events: none;
}

.kpi-card.kpi-hero {
  grid-column: span 2;
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.1) 0%, rgba(11, 15, 21, 0.8) 60%);
  border-color: rgba(52, 211, 153, 0.25);
}

@media (min-width: 520px) {
  .kpi-card.kpi-hero {
    grid-column: span 1;
  }
}

.kpi-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.kpi-value {
  display: block;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}

.kpi-value.fees {
  color: var(--fees);
}

.kpi-value.negative {
  color: var(--loss);
}

.kpi-card .chip {
  display: none;
}

.kpi-delta {
  display: none;
}

@keyframes kpi-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Dashboard charts */
.dashboard-charts {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

@media (min-width: 640px) {
  .dashboard-charts {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.chart-panel {
  padding: 1rem;
  background: rgba(11, 15, 21, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.chart-title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.donut-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 0.75rem;
}

.donut-chart {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 12px rgba(52, 211, 153, 0.15));
}

.donut-ring {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dasharray 0.65s var(--ease), stroke-dashoffset 0.65s var(--ease);
}

.donut-ring.profit { stroke: var(--profit); }
.donut-ring.cogs { stroke: var(--cogs); }
.donut-ring.fees { stroke: var(--fees); }
.donut-ring.shipping { stroke: var(--shipping); }
.donut-ring.ads { stroke: var(--ads); }

.donut-bg {
  fill: none;
  stroke: var(--bg);
  stroke-width: 14;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.donut-pct {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--profit);
  line-height: 1;
  transition: color 0.3s var(--ease);
}

.donut-pct.negative {
  color: var(--loss);
}

.donut-sub {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* Horizontal bars */
.hbar-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hbar-row {
  animation: hbar-in 0.45s var(--ease) both;
}

.hbar-row:nth-child(1) { animation-delay: 0.05s; }
.hbar-row:nth-child(2) { animation-delay: 0.1s; }
.hbar-row:nth-child(3) { animation-delay: 0.15s; }
.hbar-row:nth-child(4) { animation-delay: 0.2s; }
.hbar-row:nth-child(5) { animation-delay: 0.25s; }

.hbar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
}

.hbar-head span:first-child {
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hbar-head span:last-child {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text);
}

.hbar-track {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.hbar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 0.7s var(--ease-spring);
  min-width: 2px;
}

.hbar-fill.profit { background: linear-gradient(90deg, #059669, var(--profit)); box-shadow: 0 0 12px var(--profit-glow); }
.hbar-fill.cogs { background: var(--cogs); }
.hbar-fill.fees { background: var(--fees); }
.hbar-fill.shipping { background: var(--shipping); }
.hbar-fill.ads { background: var(--ads); }

@keyframes hbar-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.bar-chart-wide {
  height: 18px;
  margin-top: 0.85rem;
  border-radius: 9px;
}

.bar-segment {
  position: relative;
  overflow: hidden;
}

.bar-segment::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.5s ease-in-out infinite;
}

.bar-segment:nth-child(2)::after { animation-delay: 0.3s; }
.bar-segment:nth-child(3)::after { animation-delay: 0.6s; }
.bar-segment:nth-child(4)::after { animation-delay: 0.9s; }

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.net-profit.value-pulse {
  animation: value-pulse 0.45s var(--ease);
}

@keyframes value-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Platform compare bars */
.platform-viz {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.75rem 0 1rem;
  padding: 0.85rem;
  background: rgba(11, 15, 21, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.platform-bar-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 4rem;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  animation: hbar-in 0.4s var(--ease) both;
}

.platform-bar-row:nth-child(1) { animation-delay: 0.05s; }
.platform-bar-row:nth-child(2) { animation-delay: 0.12s; }
.platform-bar-row:nth-child(3) { animation-delay: 0.19s; }

.platform-bar-label {
  font-weight: 600;
  color: var(--text-soft);
}

.platform-bar-label.best {
  color: var(--profit);
}

.platform-bar-track {
  height: 10px;
  background: var(--bg);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.platform-bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0;
  transition: width 0.75s var(--ease-spring);
}

.platform-bar-fill.positive {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.5), var(--profit));
}

.platform-bar-fill.negative {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.4), var(--loss));
}

.platform-bar-value {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: right;
}

.platform-bar-value.positive { color: var(--profit); }
.platform-bar-value.negative { color: var(--loss); }

/* Projection chart */
.projection-chart {
  margin: 0.85rem 0 0.5rem;
  padding: 0.75rem;
  background: rgba(11, 15, 21, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.projection-svg {
  width: 100%;
  height: 80px;
  display: block;
}

.projection-line {
  fill: none;
  stroke: var(--profit);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw-line 1.2s var(--ease) forwards;
}

.projection-area {
  fill: url(#profitGradient);
  opacity: 0;
  animation: fade-area 0.8s var(--ease) 0.4s forwards;
}

.projection-grid line {
  stroke: var(--border);
  stroke-width: 1;
}

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

@keyframes fade-area {
  to { opacity: 0.25; }
}

.projection-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: var(--muted);
  font-family: var(--mono);
}

.panel-head {
  margin-bottom: 1.25rem;
}

.panel h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-sub {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Platform pills */
.platform-field {
  border: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.platform-field legend {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

.platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.pill.active {
  background: var(--profit);
  border-color: var(--profit);
  color: var(--profit-on);
  font-weight: 600;
  box-shadow: 0 0 20px var(--profit-glow);
}

/* Fields */
.field-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 480px) {
  .field-grid {
    grid-template-columns: 1fr 1fr;
  }

  .field-grid.compact {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: block;
}

.category-field select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: var(--panel, rgba(12, 16, 24, 0.6));
  color: var(--text, #e8edf5);
  font: inherit;
  font-size: 0.85rem;
}

.pro-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent, #34d399);
  text-decoration: none;
  margin-left: 0.35rem;
}

.field span {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-soft);
}

.field input,
.field select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--profit);
  box-shadow: 0 0 0 3px var(--profit-glow);
}

.money {
  display: flex;
  align-items: stretch;
}

.money .currency {
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.money input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.advanced {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.advanced summary {
  cursor: pointer;
  color: var(--profit);
  font-weight: 500;
  list-style: none;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced[open] summary {
  margin-bottom: 0.85rem;
}

/* Results */
.compare-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(18, 24, 32, 0.85);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.compare-item.highlight {
  padding: 0.35rem 0.55rem;
  margin: -0.35rem -0.55rem -0.35rem 0;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.15);
}

.compare-item {
  flex: 1;
  min-width: 0;
}

.compare-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.compare-value {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
}

.compare-item.highlight .compare-value {
  color: var(--profit);
}

.compare-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.net-profit {
  font-family: var(--display);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 500;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--profit);
  transition: color 0.3s var(--ease);
}

.kpi-hero .net-profit {
  font-size: clamp(2rem, 9vw, 2.75rem);
}

.net-profit.negative {
  color: var(--loss);
}

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.chip {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.1);
  color: var(--profit);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.chip.muted {
  background: var(--bg-elevated);
  color: var(--text-soft);
  border-color: var(--border);
}

.chip.bad {
  background: rgba(248, 113, 113, 0.1);
  color: var(--loss);
  border-color: rgba(248, 113, 113, 0.25);
}

/* Viz */
.viz-block {
  margin-bottom: 1.1rem;
}

.bar-chart {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}

.bar-segment {
  height: 100%;
  transition: flex 0.35s var(--ease);
  min-width: 2px;
}

.bar-segment.profit { background: var(--profit); }
.bar-segment.cogs { background: var(--cogs); }
.bar-segment.fees { background: var(--fees); }
.bar-segment.shipping { background: var(--shipping); }
.bar-segment.ads { background: var(--ads); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-top: 0.65rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-dot.profit { background: var(--profit); }
.legend-dot.cogs { background: var(--cogs); }
.legend-dot.fees { background: var(--fees); }
.legend-dot.shipping { background: var(--shipping); }
.legend-dot.ads { background: var(--ads); }

/* Breakdown */
.breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding: 0.55rem 0.85rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.breakdown-row:last-child {
  border-bottom: none;
}

.breakdown-row .label {
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.breakdown-row .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-cogs { background: var(--cogs); }
.dot-fees { background: var(--fees); }
.dot-shipping { background: var(--shipping); }
.dot-ads { background: var(--ads); }

.breakdown-row .amount {
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* Verdict */
.verdict {
  font-size: 0.92rem;
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--profit);
  color: var(--text-soft);
  line-height: 1.5;
}

.verdict.warn {
  border-left-color: var(--fees);
}

.verdict.bad {
  border-left-color: var(--loss);
  color: var(--loss-soft);
}

/* Buttons */
.btn-row {
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 420px) {
  .btn-row {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.btn.pro-gated::after {
  content: "Pro";
  margin-left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.65;
  vertical-align: middle;
}

.btn {
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: var(--profit);
  color: var(--profit-on);
  box-shadow: 0 4px 20px var(--profit-glow);
}

.btn.primary:hover {
  filter: brightness(1.06);
}

.btn.ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-soft);
}

.btn.ghost:hover {
  color: var(--text);
  border-color: var(--text-soft);
}

/* Guides */
.guides {
  padding: 0 1.25rem 2rem;
}

.guides h2 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.guide-cards {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .guide-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}

.guide-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.guide-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--profit);
}

.guide-card strong {
  font-size: 1rem;
  color: var(--text);
}

.guide-desc {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Guide pages (shared) */
.guide-page {
  background: var(--bg);
}

.guide-page .prose {
  max-width: 42rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.65;
  padding: 2rem 0;
}

.guide-page .prose h1 {
  font-family: var(--display);
  color: var(--text);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.guide-page .prose h2 {
  color: var(--text);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.guide-page .prose p {
  margin: 0 0 0.85rem;
}

.guide-page .prose ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.guide-page .prose a {
  color: var(--profit);
}

.guide-page .cta {
  display: inline-block;
  margin: 1rem 0 2rem;
  padding: 0.7rem 1.2rem;
  background: var(--profit);
  color: var(--profit-on);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: filter 0.2s;
}

.guide-page .cta:hover {
  filter: brightness(1.08);
}

/* Footer */
.disclaimer {
  padding: 1.5rem 1.25rem 3rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.disclaimer p {
  margin: 0 0 0.5rem;
  max-width: 60ch;
}

.credit {
  margin-top: 0.75rem;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .panel,
  .kpi-card,
  .hbar-row,
  .platform-bar-row {
    animation: none;
  }

  .bar-segment,
  .net-profit,
  .hbar-fill,
  .platform-bar-fill,
  .donut-ring {
    transition: none;
  }

  .bar-segment::after,
  .live-dot,
  .projection-line,
  .projection-area {
    animation: none;
  }

  .projection-line {
    stroke-dashoffset: 0;
  }

  .projection-area {
    opacity: 0.25;
  }
}

/* Scale Lab */
.scale-lab {
  padding: 0 1.25rem 2.5rem;
}

.lab-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.lab-header h2 {
  margin: 0.25rem 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.lab-lead {
  margin: 0;
  color: var(--text-soft);
  max-width: 42ch;
  font-size: 0.95rem;
}

.save-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.scenario-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
  min-width: 10rem;
}

.lab-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lab-panel h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.compare-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.compare-table th,
.compare-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.compare-table .best-row {
  background: rgba(52, 211, 153, 0.06);
}

.compare-table .best-row td:first-child::after {
  content: " · best";
  color: var(--profit);
  font-size: 0.75rem;
  font-weight: 600;
}

.compare-table .loss-row {
  opacity: 0.85;
}

.compare-table .positive {
  color: var(--profit);
  font-family: var(--mono);
  font-weight: 500;
}

.compare-table .negative {
  color: var(--loss);
  font-family: var(--mono);
  font-weight: 500;
}

.lab-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.slider-field input[type="range"] {
  width: 100%;
  margin-top: 0.5rem;
  accent-color: var(--profit);
}

.field-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.scale-stats {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.scale-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55rem 0.65rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.scale-stat span {
  color: var(--text-soft);
}

.scale-stat strong {
  font-family: var(--mono);
  font-size: 0.95rem;
}

.scale-stat.highlight {
  border: 1px solid rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.06);
}

.scale-stat .positive {
  color: var(--profit);
}

.scale-stat .negative {
  color: var(--loss);
}

.be-number {
  margin: 0.5rem 0 0;
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--profit);
  line-height: 1;
}

.be-label {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.be-bad {
  margin: 0.5rem 0 0;
  color: var(--loss);
  font-size: 0.9rem;
}

.scenario-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.scenario-item {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.scenario-load {
  flex: 1;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.scenario-load:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.scenario-load strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.scenario-load span {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
}

.scenario-delete {
  width: 2rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.scenario-delete:hover {
  color: var(--loss);
  border-color: rgba(248, 113, 113, 0.35);
}

.empty-note {
  font-style: italic;
}

/* Pro page & monetization */
.nav-pro {
  color: var(--profit) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
}

.nav-pro.active {
  background: rgba(52, 211, 153, 0.12) !important;
}

.scale-upsell {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-color: rgba(52, 211, 153, 0.2);
  background: rgba(52, 211, 153, 0.05);
}

.scale-upsell p {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.upsell-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.upsell-links a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--profit);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px;
}

.upsell-links a:hover {
  background: rgba(52, 211, 153, 0.1);
}

.pro-page .pro-main {
  padding: 2rem 1.25rem 3rem;
  max-width: 720px;
}

.pro-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1rem;
}

.pro-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0.75rem;
}

.pro-price .price {
  font-family: var(--display);
  font-size: 2.75rem;
  color: var(--profit);
  font-weight: 500;
}

.pro-price .period {
  font-size: 1.1rem;
  color: var(--text-soft);
}

.pro-price .price-alt {
  font-size: 0.85rem;
  color: var(--muted);
}

.pro-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.pro-cta-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.pro-compare,
.pro-tools {
  margin-top: 1.5rem;
}

.pro-table td,
.pro-table th {
  text-align: center;
}

.pro-table td:first-child,
.pro-table th:first-child {
  text-align: left;
}

.tool-cards {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

@media (min-width: 540px) {
  .tool-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tool-card {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s var(--ease);
}

.tool-card:hover {
  border-color: var(--border-strong);
}

.tool-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.tool-card span {
  font-size: 0.75rem;
  color: var(--muted);
}

.affiliate-disclosure {
  margin: 1rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

.panel-sub a {
  color: var(--profit);
}

/* ═══ v4 Command Center ═══ */
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 40% at 15% 10%, rgba(46, 230, 168, 0.09), transparent 55%),
    radial-gradient(ellipse 40% 35% at 85% 15%, rgba(96, 165, 250, 0.06), transparent 50%),
    radial-gradient(ellipse 45% 30% at 50% 100%, rgba(167, 139, 250, 0.05), transparent 55%);
}

.command-center {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem 1.25rem 2.5rem;
  max-width: 1320px;
  position: relative;
  z-index: 1;
}

@media (min-width: 960px) {
  .command-center {
    grid-template-columns: var(--sidebar-w) 1fr;
    align-items: start;
    gap: 1.5rem;
  }

  .cmd-sidebar {
    position: sticky;
    top: 4.5rem;
  }
}

.cmd-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.compete-strip {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(46, 230, 168, 0.08), rgba(96, 165, 250, 0.05));
  border: 1px solid rgba(46, 230, 168, 0.18);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.5;
  animation: rise 0.6s var(--ease) both;
}

.compete-strip strong {
  color: var(--accent);
}

.compete-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.cmd-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.6rem;
  background:
    linear-gradient(145deg, rgba(46, 230, 168, 0.07) 0%, rgba(22, 29, 40, 0.95) 45%, rgba(11, 15, 21, 0.98) 100%);
  border-color: rgba(46, 230, 168, 0.2);
  animation: rise 0.65s var(--ease) 0.05s both;
}

.cmd-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.cmd-platform {
  font-size: 0.75rem;
  color: var(--muted);
}

.cmd-hero-num {
  font-family: var(--display);
  font-size: clamp(2.5rem, 9vw, 4rem);
  font-weight: 400;
  line-height: 0.95;
  margin: 0.15rem 0 0.35rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cmd-hero-num.negative {
  background: linear-gradient(135deg, #fff 20%, var(--loss) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.cmd-hero-sub {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-soft);
}

.health-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.health-gauge-wrap {
  position: relative;
  width: 110px;
  height: 110px;
}

.health-gauge {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.health-ring-bg {
  fill: none;
  stroke: var(--bg-elevated);
  stroke-width: 10;
}

.health-ring {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s var(--ease), stroke 0.4s;
}

.health-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.health-score {
  font-family: var(--mono);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.health-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 0.15rem;
}

.health-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.health-badge.strong {
  color: var(--accent);
  border-color: rgba(46, 230, 168, 0.35);
  background: var(--accent-dim);
}

.health-badge.stable {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.3);
  background: rgba(134, 239, 172, 0.08);
}

.health-badge.thin {
  color: var(--fees);
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
}

.health-badge.critical {
  color: var(--loss);
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
}

.whatif-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  animation: rise 0.6s var(--ease) 0.1s both;
}

.whatif-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  grid-column: 1 / -1;
}

.whatif-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.whatif-delta {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.whatif-slider {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--accent);
  height: 6px;
}

.whatif-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.whatif-result strong {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--text);
}

.whatif-margin {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.kpi-icon {
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.5;
}

.viz-command-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .viz-command-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.chart-sub {
  margin: -0.5rem 0 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Waterfall */
.waterfall {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wf-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 4.5rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  animation: hbar-in 0.4s var(--ease) both;
}

.wf-row:nth-child(1) { animation-delay: 0.02s; }
.wf-row:nth-child(2) { animation-delay: 0.06s; }
.wf-row:nth-child(3) { animation-delay: 0.1s; }
.wf-row:nth-child(4) { animation-delay: 0.14s; }
.wf-row:nth-child(5) { animation-delay: 0.18s; }
.wf-row:nth-child(6) { animation-delay: 0.22s; }
.wf-row:nth-child(7) { animation-delay: 0.26s; }

.wf-label {
  color: var(--text-soft);
  font-weight: 500;
}

.wf-label.positive { color: var(--accent); font-weight: 600; }
.wf-label.negative { color: var(--loss); }

.wf-track {
  height: 22px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.wf-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.75s var(--ease-spring);
  min-width: 3px;
}

.wf-fill.sale { background: linear-gradient(90deg, #475569, #94a3b8); }
.wf-fill.profit { background: linear-gradient(90deg, #059669, var(--accent)); box-shadow: 0 0 16px var(--profit-glow); }
.wf-fill.cogs { background: var(--cogs); }
.wf-fill.fees { background: var(--fees); }
.wf-fill.shipping { background: var(--shipping); }
.wf-fill.ads { background: var(--ads); }
.wf-fill.deduct { background: linear-gradient(90deg, rgba(248,113,113,0.5), var(--loss)); }

.wf-amount {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: right;
}

.wf-amount.positive { color: var(--accent); }
.wf-amount.negative { color: var(--loss); }

.wf-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

/* Platform cards */
.platform-cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.plat-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.25s, transform 0.25s var(--ease);
  animation: kpi-in 0.45s var(--ease) both;
}

.plat-card:nth-child(1) { animation-delay: 0.05s; }
.plat-card:nth-child(2) { animation-delay: 0.12s; }
.plat-card:nth-child(3) { animation-delay: 0.19s; }

.plat-card.winner {
  border-color: rgba(46, 230, 168, 0.4);
  background: linear-gradient(135deg, rgba(46, 230, 168, 0.1), var(--bg-elevated));
  box-shadow: 0 0 24px rgba(46, 230, 168, 0.08);
}

.plat-card.loser {
  opacity: 0.75;
}

.plat-name {
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.plat-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--profit-on);
}

.plat-keep {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 600;
  text-align: right;
}

.plat-keep.positive { color: var(--accent); }
.plat-keep.negative { color: var(--loss); }

.plat-meta {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.85rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--mono);
}

/* P&L preview */
.pnl-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.pnl-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.pnl-row:last-child { border-bottom: none; }

.pnl-row.total {
  background: var(--accent-dim);
  border-top: 1px solid rgba(46, 230, 168, 0.2);
  font-weight: 600;
}

.pnl-row.total.negative {
  background: rgba(248, 113, 113, 0.08);
}

.pnl-row span:last-child {
  font-family: var(--mono);
}

.pnl-row .positive { color: var(--accent); }
.pnl-row .negative { color: var(--loss); }

.cmd-sidebar .field-grid {
  grid-template-columns: 1fr;
}

.scale-lab {
  padding: 0;
  margin-top: 0.5rem;
}

.guides {
  padding: 0;
}

@media (max-width: 959px) {
  .cmd-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .health-block {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
  }
}
