/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Backgrounds — neutral near-black, no color cast */
  --bg-primary:     #0d0d0d;
  --bg-secondary:   #141414;
  --bg-card:        #1a1a1a;
  --bg-card-hover:  #202020;

  /* Green — the single accent color */
  --green:          #22c55e;
  --green-hover:    #1da852;
  --green-dim:      rgba(34, 197, 94, 0.09);
  --green-border:   rgba(34, 197, 94, 0.22);

  /* Semantic aliases */
  --positive:        #22c55e;
  --positive-dim:    rgba(34, 197, 94, 0.09);
  --positive-border: rgba(34, 197, 94, 0.25);
  --negative:        #f43f5e;
  --negative-dim:    rgba(244, 63, 94, 0.09);
  --negative-border: rgba(244, 63, 94, 0.28);

  /* Typography */
  --text-primary:   #f2f2f0;
  --text-secondary: #96a89c;  /* brighter — was too dark */
  --text-muted:     #5e7264;  /* brighter — was too dark */

  /* Structure */
  --border:  rgba(255, 255, 255, 0.07);
  --shadow:  0 4px 28px rgba(0, 0, 0, 0.65);
}

html, body {
  height: 100%;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Page System ───────────────────────────────────────────────────────────── */
.page {
  display: none;
  min-height: 100vh;
  padding: 32px 20px 72px;
}
.page.active { display: block; }

.page-content {
  max-width: 680px;
  margin: 0 auto;
}

/* ── Shared: Back Button ───────────────────────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}
.back-btn:hover {
  border-color: var(--green-border);
  color: var(--text-primary);
  background: var(--green-dim);
}

/* ── Shared: Page Header ───────────────────────────────────────────────────── */
.page-header { margin-bottom: 28px; }
.page-title h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-title p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Shared: Primary Button ────────────────────────────────────────────────── */
.primary-btn {
  width: 100%;
  padding: 13px 24px;
  background: var(--green);
  border: none;
  border-radius: 8px;
  color: #050f08;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.primary-btn:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.28);
}
.primary-btn:active { transform: translateY(0); }

/* ════════════════════════════════════════════════════════════════════════════ */
/* HOME PAGE                                                                   */
/* ════════════════════════════════════════════════════════════════════════════ */
.home-header {
  text-align: center;
  padding: 52px 0 40px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 28px;
}
.logo-icon { font-size: 16px; }

.home-header h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.65;
  font-weight: 400;
}

/* Game type card */
.game-type-grid { margin: 36px 0; }

.game-type-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.18s ease;
}
.game-type-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--green-border);
  box-shadow: 0 0 0 1px var(--green-border), var(--shadow);
  transform: translateY(-1px);
}

.card-icon {
  font-size: 28px;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  border-radius: 8px;
}
.card-content { flex: 1; }
.card-content h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}
.card-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.card-arrow {
  font-size: 17px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.18s, color 0.18s;
}
.game-type-card:hover .card-arrow {
  transform: translateX(4px);
  color: var(--green);
}

/* How It Works */
.how-it-works { padding: 28px 0 0; }

.how-it-works h3 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 14px;
  font-weight: 600;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
}
.step-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 8px;
  line-height: 1;
}
.step-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
  font-weight: 400;
}

/* ════════════════════════════════════════════════════════════════════════════ */
/* FERMI QUESTIONS PAGE                                                        */
/* ════════════════════════════════════════════════════════════════════════════ */
.question-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.15s;
}
.question-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--green-border);
  box-shadow: 0 0 0 1px var(--green-border);
}

.question-card-icon { font-size: 24px; flex-shrink: 0; }
.question-card-body { flex: 1; }

.question-card-category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 3px;
}
.question-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}
.question-card-preview {
  font-size: 12px;
  color: var(--text-secondary);
}
.question-card-arrow {
  color: var(--text-muted);
  font-size: 15px;
}

/* ════════════════════════════════════════════════════════════════════════════ */
/* SETUP PAGE                                                                  */
/* ════════════════════════════════════════════════════════════════════════════ */
.setup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 30px;
}

.setup-section { margin-bottom: 30px; }

.setup-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.rounds-control {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.range-bound {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  width: 18px;
  text-align: center;
}

/* Custom range slider */
.rounds-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 7px;
  background: var(--bg-secondary);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
}
.rounds-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  background: var(--green);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
  transition: box-shadow 0.18s;
}
.rounds-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.22);
}
.rounds-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  background: var(--green);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* Difficulty toggle */
.difficulty-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.diff-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s;
}
.diff-btn:hover {
  border-color: var(--green-border);
  background: var(--green-dim);
}
.diff-btn.active {
  border-color: var(--green);
  background: var(--green-dim);
  box-shadow: 0 0 0 1px var(--green);
}
.diff-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.diff-desc {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 400;
}

.rounds-value-display {
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1;
}
#rounds-value {
  font-size: 56px;
  font-weight: 600;
  color: var(--green);
}
.rounds-unit {
  font-size: 15px;
  color: var(--text-secondary);
  margin-left: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
}

/* ════════════════════════════════════════════════════════════════════════════ */
/* GAME PAGE                                                                   */
/* ════════════════════════════════════════════════════════════════════════════ */

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.round-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 4px;
}
.round-badge strong { color: var(--text-primary); }

/* Difficulty badge */
.diff-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.diff-badge.beginner { color: var(--green);  border-color: var(--green-border); }
.diff-badge.advanced { color: #f59e0b;       border-color: rgba(245, 158, 11, 0.3); }

/* Progress bar */
.round-progress { margin-bottom: 22px; }
.progress-bar {
  height: 2px;
  background: var(--bg-secondary);
  border-radius: 1px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 1px;
  transition: width 0.4s ease;
}

/* Question display */
.question-display {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 26px;
  margin-bottom: 16px;
}
.question-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 10px;
}
.question-text {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Quote form card */
.quote-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 26px;
  margin-bottom: 14px;
}
.quote-form-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 18px;
}

/* Bid / ask inputs row */
.quote-inputs {
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.input-label.bid-label { color: var(--green); }
.input-label.ask-label { color: #f87171; }

.price-input {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 14px;
  color: var(--text-primary);
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
  appearance: textfield;
}
.price-input::-webkit-inner-spin-button,
.price-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.price-input.bid-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.price-input.ask-input:focus {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

/* Spread center column */
.spread-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 24px;
  gap: 5px;
}
.spread-arrow {
  font-size: 16px;
  color: var(--text-muted);
}
.spread-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-align: center;
  min-height: 14px;
  transition: color 0.15s;
  font-weight: 500;
}
.spread-value.valid     { color: var(--positive); }
.spread-value.invalid   { color: var(--negative); }
.spread-value.too-wide  { color: var(--negative); }
.spread-value.neutral   { color: var(--text-muted); }

.spread-limit {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.03em;
}

.error-msg {
  color: var(--negative);
  font-size: 12px;
  min-height: 20px;
  margin-bottom: 12px;
  font-weight: 500;
}

/* ── Round Result Card ─────────────────────────────────────────────────────── */
.result-round-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.result-card {
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 14px;
  border: 1px solid;
}
.result-card.profit  { background: var(--positive-dim); border-color: var(--positive-border); }
.result-card.loss    { background: var(--negative-dim); border-color: var(--negative-border); }
.result-card.neutral { background: var(--bg-card);      border-color: var(--border); }

.result-quote-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 400;
}
.result-quote-line .hl { color: var(--text-secondary); }

.bot-action-line {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.bot-action-line .price-hl {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
}

.round-pnl {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 42px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 14px;
}
.round-pnl.positive { color: var(--positive); }
.round-pnl.negative { color: var(--negative); }

.result-hint {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 400;
}

.auto-submit-notice {
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-style: italic;
}

/* Next round button */
.next-btn {
  width: 100%;
  padding: 13px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.next-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--green-border);
  color: var(--green);
}

/* ════════════════════════════════════════════════════════════════════════════ */
/* RESULTS PAGE                                                                */
/* ════════════════════════════════════════════════════════════════════════════ */

/* Answer reveal */
.answer-reveal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  animation: fadeScaleIn 0.5s ease-out;
}
.answer-reveal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--green);
}

.answer-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 16px;
}
.answer-number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 84px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 10px;
}
.answer-unit {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}
.answer-question {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Total P&L */
.total-pnl-card {
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  margin-bottom: 16px;
  border: 1px solid;
  animation: fadeScaleIn 0.5s ease-out 0.1s both;
}
.total-pnl-card.positive { background: var(--positive-dim); border-color: var(--positive-border); }
.total-pnl-card.negative { background: var(--negative-dim); border-color: var(--negative-border); }
.total-pnl-card.neutral  { background: var(--bg-card);      border-color: var(--border); }

.total-pnl-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 10px;
}
.total-pnl-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 8px;
}
.total-pnl-card.positive .total-pnl-value { color: var(--positive); }
.total-pnl-card.negative .total-pnl-value { color: var(--negative); }
.total-pnl-card.neutral  .total-pnl-value { color: var(--text-primary); }
.performance-msg {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Rounds table */
.rounds-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  animation: fadeScaleIn 0.5s ease-out 0.2s both;
}
.rounds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rounds-table thead tr { background: var(--bg-secondary); }
.rounds-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}
.rounds-table td {
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}
.rounds-table tr:hover td { background: rgba(255,255,255,0.02); }

.cell-round    { color: var(--text-muted); font-family: 'Space Grotesk', sans-serif; font-size: 12px; }
.cell-bid      { color: var(--green); }
.cell-ask      { color: #f87171; }
.cell-spread   { color: var(--text-secondary); }
.cell-action   { color: var(--text-secondary); font-family: 'Space Grotesk', sans-serif; font-size: 12px; }
.cell-positive { color: var(--positive); font-weight: 600; }
.cell-negative { color: var(--negative); font-weight: 600; }

/* Results back btn */
.results-back-btn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  animation: fadeScaleIn 0.4s ease-out 0.3s both;
}
.results-back-btn:hover {
  border-color: var(--green-border);
  color: var(--text-primary);
  background: var(--green-dim);
}

/* ── Pnl badge (retained for completeness) ─────────────────────────────────── */
.pnl-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.pnl-badge.positive { color: var(--positive); border-color: var(--positive-border); }
.pnl-badge.negative { color: var(--negative); border-color: var(--negative-border); }
.pnl-badge.neutral  { color: var(--text-secondary); }

/* ════════════════════════════════════════════════════════════════════════════ */
/* ADVANCED OPTIONS PANEL                                                      */
/* ════════════════════════════════════════════════════════════════════════════ */
.adv-options-panel {
  border: 1px solid var(--green-border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  background: var(--green-dim);
}

.adv-options-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green);
  margin-bottom: 16px;
}

.adv-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.adv-opt-row:first-of-type { border-top: none; padding-top: 0; }

.adv-opt-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.adv-opt-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.adv-opt-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.adv-opt-sub {
  padding: 10px 0 4px;
}

/* Toggle switch */
.tog { display: inline-flex; cursor: pointer; flex-shrink: 0; }
.tog input { display: none; }
.tog-track {
  width: 42px;
  height: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 3px;
  transition: all 0.18s;
}
.tog input:checked + .tog-track {
  background: var(--green);
  border-color: var(--green);
}
.tog-thumb {
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.18s;
  flex-shrink: 0;
}
.tog input:checked + .tog-track .tog-thumb {
  background: #050f08;
  transform: translateX(18px);
}

/* Duration row label */
.dur-row-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Duration picker buttons */
.dur-btns {
  display: flex;
  gap: 8px;
}
.dur-btn {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: all 0.15s;
}
.dur-btn:hover  { border-color: var(--green-border); color: var(--text-primary); }
.dur-btn.active { background: var(--green-dim); border-color: var(--green); color: var(--green); box-shadow: 0 0 0 1px var(--green); }

/* Round 1 duration buttons — same style, separate selector for independent active state */
.dur-btn-r1 {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: all 0.15s;
}
.dur-btn-r1:hover  { border-color: var(--green-border); color: var(--text-primary); }
.dur-btn-r1.active { background: var(--green-dim); border-color: var(--green); color: var(--green); box-shadow: 0 0 0 1px var(--green); }

/* Result screen timer duration buttons */
.dur-btn-result {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: all 0.15s;
}
.dur-btn-result:hover  { border-color: var(--green-border); color: var(--text-primary); }
.dur-btn-result.active { background: var(--green-dim); border-color: var(--green); color: var(--green); box-shadow: 0 0 0 1px var(--green); }

/* ════════════════════════════════════════════════════════════════════════════ */
/* TIMER                                                                       */
/* ════════════════════════════════════════════════════════════════════════════ */
.timer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.timer-countdown {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  min-width: 34px;
  transition: color 0.3s;
}
.timer-countdown.warning { color: #f59e0b; }
.timer-countdown.danger  { color: var(--negative); }

.timer-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}
.timer-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 1s linear, background 0.3s;
}
.timer-fill.warning { background: #f59e0b; }
.timer-fill.danger  { background: var(--negative); }

/* ════════════════════════════════════════════════════════════════════════════ */
/* CHALLENGE CARD                                                              */
/* ════════════════════════════════════════════════════════════════════════════ */
.challenge-card {
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
  animation: fadeScaleIn 0.4s ease-out;
}

.challenge-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #f59e0b;
  margin-bottom: 20px;
}

.challenge-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.challenge-item:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.challenge-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}

/* Break-even context box */
.be-context {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.7;
}
.be-position {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.be-trades {
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.be-trades strong { color: var(--text-primary); }
.be-cash {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
  margin-top: 2px;
}
.be-cash strong { color: var(--text-primary); }

.challenge-input {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-primary);
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
  appearance: textfield;
  margin-bottom: 10px;
}
.challenge-input::-webkit-inner-spin-button,
.challenge-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.challenge-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}
.challenge-input:disabled { opacity: 0.5; cursor: not-allowed; }

.challenge-feedback {
  font-size: 14px;
  font-weight: 500;
  min-height: 20px;
  padding: 4px 0;
}
.challenge-feedback.correct   { color: var(--positive); }
.challenge-feedback.incorrect { color: var(--negative); }
.challenge-feedback strong { font-weight: 700; }

.challenge-error {
  color: var(--negative);
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 12px;
}

/* ── Animation ─────────────────────────────────────────────────────────────── */
@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.97) translateY(5px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .page { padding: 20px 14px 52px; }

  .home-header h1 { font-size: 34px; }
  .hero-subtitle  { font-size: 14px; }

  .steps { grid-template-columns: repeat(2, 1fr); }

  .card-icon { width: 44px; height: 44px; font-size: 24px; }
  .card-content h2 { font-size: 16px; }

  .quote-inputs {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .spread-center { display: none; }

  .price-input { font-size: 22px; }

  .answer-number   { font-size: 62px; }
  .total-pnl-value { font-size: 42px; }
  .round-pnl       { font-size: 34px; }

  .rounds-table th, .rounds-table td { padding: 9px 12px; }
}
