/* TraderBuddy — trader personality quiz
   Design system ported from the Claude Design handoff bundle. */

:root {
  --teal: #04C198;
  --teal-2: #0AE0B0;
  --teal-dim: rgba(4, 193, 152, 0.18);
  --navy: #0D1B2E;
  --navy-2: #0A1626;
  --surface: #132338;
  --surface-2: #1A2C44;
  --gold: #F5A623;
  --gold-2: #FFC25C;
  --white: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.62);
  --muted-2: rgba(255, 255, 255, 0.42);
  --hairline: rgba(255, 255, 255, 0.08);
  --sticky-top: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: #07111e;
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(4, 193, 152, 0.08), transparent 60%),
    radial-gradient(1000px 700px at 80% 90%, rgba(245, 166, 35, 0.05), transparent 60%),
    #07111e;
}

/* Mobile-first app column; reads as a phone app, centers on desktop */
#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background: var(--navy);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.5);
}

button { font-family: inherit; }

/* ── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes tbFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes tbPulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(4, 193, 152, 0.55); }
  50%      { box-shadow: 0 0 0 14px rgba(4, 193, 152, 0); }
}
@keyframes tbCardFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes tbJoinPulse {
  0%, 100% {
    box-shadow: 0 6px 18px rgba(4, 193, 152, 0.45), 0 0 0 0 rgba(4, 193, 152, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 8px 24px rgba(4, 193, 152, 0.65), 0 0 0 8px rgba(4, 193, 152, 0);
    transform: scale(1.02);
  }
}
/* Landing mosaic drift — grid of cards slides upward continuously */
@keyframes tbMosaicDrift {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ── Shared ────────────────────────────────────────────────────────────── */
.screen { min-height: 100vh; min-height: 100dvh; }

.btn-primary {
  width: 100%;
  height: 58px;
  border-radius: 0;
  border: none;
  background: linear-gradient(180deg, var(--teal-2), var(--teal));
  color: #04261E;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(4, 193, 152, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-ghost {
  width: 100%;
  height: 48px;
  border-radius: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-back-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 0;
  white-space: nowrap;
}

/* ── Landing ───────────────────────────────────────────────────────────── */
.landing {
  position: relative;
  color: #fff;
  background: #07111e;
  overflow: hidden;
}
.carousel { position: absolute; inset: 0; overflow: hidden; background: #07111e; }

/* Mosaic carousel — tilted grid of cards drifting upward */
.mosaic-carousel { overflow: hidden; }
.mosaic-drift {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 200%;
  transform: rotate(-12deg);
  animation: tbMosaicDrift 40s linear infinite;
}
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px;
  width: 100%;
}
.mosaic-cell {
  aspect-ratio: 0.65;
  border-radius: 12px;
  overflow: hidden;
}
.mosaic-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(3px) saturate(1.1);
  opacity: 0.8;
}
.carousel-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 30%, transparent 40%, rgba(7, 17, 30, 0.45) 100%);
}
.landing-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 27, 46, 0.25) 0%, rgba(13, 27, 46, 0.55) 50%, rgba(7, 17, 30, 0.92) 100%);
}
.landing-logo {
  position: absolute;
  top: max(24px, env(safe-area-inset-top));
  left: 24px;
  z-index: 5;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.landing-logo img { height: 36px; width: auto; display: block; }
.landing-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 120px 24px 40px;
  justify-content: flex-end;
}
.kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 18px;
  animation: tbFadeUp .6s ease both;
}
.landing-title {
  font-size: 38px;
  line-height: 1.05;
  font-weight: 800;
  margin: 0;
  letter-spacing: -1px;
  text-wrap: balance;
  animation: tbFadeUp .7s .05s ease both;
}
.landing-title .accent {
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.landing-sub {
  margin: 18px 0 28px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 320px;
  animation: tbFadeUp .7s .15s ease both;
}
.landing .btn-primary {
  height: 60px;
  font-size: 16px;
  animation: tbFadeUp .7s .25s ease both, tbPulseGlow 2.6s ease-in-out 1.5s infinite;
}
.landing-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted-2);
  font-size: 12px;
  animation: tbFadeUp .7s .35s ease both;
}
.dot-teal { width: 6px; height: 6px; border-radius: 3px; background: var(--teal); flex-shrink: 0; }

/* ── Quiz ──────────────────────────────────────────────────────────────── */
.quiz {
  background: var(--navy);
  color: #fff;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: 40px;
  background-image:
    radial-gradient(600px 300px at 80% 0%, rgba(4, 193, 152, 0.10), transparent 60%),
    radial-gradient(500px 400px at 0% 100%, rgba(245, 166, 35, 0.05), transparent 60%);
}
.quiz-top { padding: 8px 20px 0; display: flex; align-items: center; gap: 12px; }
.btn-back-circle {
  width: 36px;
  height: 36px;
  border-radius: 0;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.progress-wrap { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.progress-meta .count { letter-spacing: 1.5px; font-weight: 700; }
.progress-meta .pct { color: var(--teal); font-weight: 600; }
.progress-track { height: 4px; border-radius: 0; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-fill {
  height: 100%;
  border-radius: 0;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
  transition: width .55s cubic-bezier(.4, .2, .2, 1);
  box-shadow: 0 0 8px rgba(4, 193, 152, 0.5);
}
.q-head { padding: 28px 24px 0; animation: tbFadeUp .4s ease both; }
.q-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 0;
  background: rgba(4, 193, 152, 0.12);
  border: 1px solid rgba(4, 193, 152, 0.3);
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 1.2px;
}
.q-title {
  margin: 16px 0 0;
  font-size: 22px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.4px;
  text-wrap: pretty;
}
.answers { padding: 24px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.answer {
  text-align: left;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: #fff;
  padding: 14px;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .25s cubic-bezier(.4, .2, .2, 1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
  animation: tbFadeUp .4s ease both;
}
.answer:nth-child(1) { animation-delay: .05s; }
.answer:nth-child(2) { animation-delay: .10s; }
.answer:nth-child(3) { animation-delay: .15s; }
.answer:nth-child(4) { animation-delay: .20s; }
.answer:hover:not(:disabled),
.answer.active {
  border-color: var(--teal);
  border-left: 4px solid var(--teal);
  background: linear-gradient(180deg, rgba(4, 193, 152, 0.16), rgba(4, 193, 152, 0.06));
  box-shadow: 0 8px 24px rgba(4, 193, 152, 0.18);
}
.answer.active {
  transform: translateX(2px);
}
.answer:disabled { cursor: default; }
.answer-emoji {
  width: 44px;
  height: 44px;
  border-radius: 0;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  font-size: 22px;
}
.answer:hover:not(:disabled) .answer-emoji,
.answer.active .answer-emoji {
  background: rgba(4, 193, 152, 0.22);
  border-color: rgba(4, 193, 152, 0.5);
}
.answer-text { flex: 1; font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, 0.85); font-weight: 500; }
.answer:hover:not(:disabled) .answer-text,
.answer.active .answer-text { color: #fff; }
.answer-radio {
  width: 22px;
  height: 22px;
  border-radius: 0;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  display: grid;
  place-items: center;
}
.answer:hover:not(:disabled) .answer-radio { border-color: var(--teal); }
.answer.active .answer-radio { border-color: var(--teal); background: var(--teal); }
.answer-radio svg { display: none; }
.answer.active .answer-radio svg { display: block; }
.quiz-hint { text-align: center; color: var(--muted-2); font-size: 11px; margin-top: 28px; }

/* ── Loading ───────────────────────────────────────────────────────────── */
.loading {
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background-image: radial-gradient(500px 500px at 50% 50%, rgba(4, 193, 152, 0.12), transparent 70%);
}
.candle-chart-wrap {
  width: 330px;
  height: 180px;
  margin-bottom: 36px;
  filter: drop-shadow(0 0 22px rgba(4, 193, 152, 0.3));
}
.candle-chart { width: 100%; height: 100%; overflow: visible; }
.candle {
  --dy: 0px;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: tbCandleIn .85s cubic-bezier(.22, .85, .25, 1.15) forwards;
}
@keyframes tbCandleIn {
  0%   { opacity: 0; transform: translateY(var(--dy)) scaleY(0.2) scaleX(0.5); }
  50%  { opacity: 1; transform: translateY(calc(var(--dy) * -0.18)) scaleY(1.25) scaleX(1.12); }
  75%  { transform: translateY(calc(var(--dy) * 0.06)) scaleY(0.94) scaleX(0.98); }
  100% { opacity: 1; transform: translateY(0) scaleY(1) scaleX(1); }
}
.loading-phrases { position: relative; height: 56px; width: 100%; }
.loading-phrases div {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  opacity: 0;
  transform: translateY(8px);
  transition: all .5s ease;
}
.loading-phrases div.on { opacity: 1; transform: translateY(0); }
.loading-dots { margin-top: 8px; display: flex; gap: 8px; }
.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  transition: background .3s;
}
.loading-dots span.on { background: var(--teal); }

/* ── Result ────────────────────────────────────────────────────────────── */
.result {
  background: var(--navy);
  color: #fff;
  padding-top: max(40px, env(safe-area-inset-top));
  padding-bottom: 40px;
}
.result-kicker {
  text-align: center;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--teal);
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.7;
  animation: tbFadeUp .5s ease both;
}
.card-wrap { margin-top: 18px; display: grid; place-items: center; animation: tbFadeUp .7s .1s ease both; }
.result-meta { text-align: center; padding: 20px 28px 0; animation: tbFadeUp .6s .25s ease both; }
.result-name { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.result-tagline { font-size: 13px; font-weight: 600; margin-top: 4px; color: var(--teal); }
.result-desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 12px 0 0; }
.result-actions { padding: 26px 24px 0; animation: tbFadeUp .6s .35s ease both; }
.result-actions .btn-primary {
  height: 56px;
  font-size: 15px;
  animation: tbPulseGlow 2.6s ease-in-out 1s infinite;
}
.result-actions .btn-ghost { margin-top: 12px; }

/* Trader card (real image + SVG fallback) */
.trader-card { position: relative; }
.trader-card.floaty { animation: tbCardFloat 5s ease-in-out infinite; }
.trader-card .card-glow {
  position: absolute;
  inset: -28px;
  border-radius: 36px;
  filter: blur(18px);
  pointer-events: none;
}
.trader-card img, .trader-card svg { position: relative; display: block; }
.trader-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

/* Card flip */
.trader-card[data-action="flip-card"] { cursor: pointer; }
.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform: perspective(1000px) rotateY(0deg);
  transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}
.trader-card.flipped .card-flip-inner { transform: perspective(1000px) rotateY(180deg); }
.card-flip-front, .card-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.card-flip-back { transform: rotateY(180deg); }
.card-flip-front img, .card-flip-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.card-flip-hint {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  opacity: 0.6;
  animation: tbFadeUp .6s .5s ease both;
}

/* ── Email gate ────────────────────────────────────────────────────────── */
.email-screen {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-top: max(56px, env(safe-area-inset-top));
  padding-bottom: 40px;
}
.email-collage {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  filter: blur(38px) saturate(110%);
  transform: scale(1.2);
}
.email-collage div { background-size: cover; background-position: center; }
.email-collage div:nth-child(3),
.email-collage div:nth-child(4) { transform: scaleX(-1); }
.email-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(800px 500px at 50% 35%, rgba(4, 193, 152, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(7, 17, 30, 0.72) 0%, rgba(7, 17, 30, 0.88) 60%, rgba(7, 17, 30, 0.96) 100%);
}
.email-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(4, 193, 152, 0.025) 0 2px, transparent 2px 6px);
}
.email-head { position: relative; z-index: 5; padding: 20px 24px 0; text-align: center; }
.lock-badge {
  margin: 12px auto 18px;
  width: 56px;
  height: 56px;
  border-radius: 0;
  background: rgba(4, 193, 152, 0.12);
  border: 1px solid rgba(4, 193, 152, 0.4);
  display: grid;
  place-items: center;
  box-shadow: 0 0 30px rgba(4, 193, 152, 0.25);
}
.email-kicker { font-size: 11px; letter-spacing: 3px; color: var(--teal); font-weight: 700; }
.email-title { font-size: 30px; font-weight: 800; margin: 8px 0; letter-spacing: -0.6px; }
.email-sub { font-size: 14px; color: var(--muted); margin: 0 auto 28px; max-width: 280px; }
.email-card-wrap { position: relative; z-index: 5; padding: 0 24px; }
.email-card {
  background: rgba(13, 27, 46, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(4, 193, 152, 0.18);
  border-radius: 0;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.email-card label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1.4px;
  font-weight: 700;
  margin-bottom: 8px;
}
.email-card input {
  width: 100%;
  height: 50px;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid var(--hairline);
  border-radius: 0;
  padding: 0 14px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.email-card input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(4, 193, 152, 0.18);
}
.btn-submit {
  width: 100%;
  height: 54px;
  margin-top: 14px;
  border-radius: 0;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
  font-size: 15px;
  font-weight: 700;
  cursor: not-allowed;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-submit.valid {
  background: linear-gradient(180deg, var(--teal-2), var(--teal));
  color: #04261E;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(4, 193, 152, 0.35);
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
}
.consent-row input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
  cursor: pointer;
}
.email-card label.consent-label {
  display: inline;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--muted-2);
  line-height: 1.5;
  cursor: pointer;
  margin-bottom: 0;
}
.email-helper {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}
.privacy-link { color: var(--muted-2); text-decoration: underline; }

/* ── Dashboard / Prop firms ────────────────────────────────────────────── */
.dash {
  background: var(--navy);
  color: #fff;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: 40px;
  background-image: radial-gradient(700px 400px at 50% 0%, rgba(4, 193, 152, 0.12), transparent 60%);
}
.screen-back { padding: 12px 20px 0; }
.profile-strip {
  margin: 14px 16px 0;
  padding: 10px;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(4, 193, 152, 0.18);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(4, 193, 152, 0.08);
  transition: transform .2s, box-shadow .2s;
}
.profile-strip .mini-card { flex-shrink: 0; }
.profile-strip .name { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.1; }
.profile-strip .tagline { font-size: 11px; color: var(--teal); font-weight: 600; margin-top: 4px; }
.profile-strip .profile-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--teal);
  text-transform: uppercase;
}
.profile-strip .info { min-width: 0; flex: 1; }
.chevron-badge {
  width: 30px;
  height: 30px;
  border-radius: 0;
  flex-shrink: 0;
  background: rgba(4, 193, 152, 0.14);
  border: 1px solid rgba(4, 193, 152, 0.4);
  display: grid;
  place-items: center;
}
.plan-title-wrap { padding: 22px 20px 14px; }
.plan-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: #fff;
  padding-bottom: 2px;
}
.plan-title .accent {
  display: inline-block;
  font-style: italic;
  font-weight: 800;
  background: linear-gradient(90deg, var(--teal-2), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding-right: 0.22em;
  line-height: 1.2;
}

/* Sticky-stack cards (BrandExtract-style scroll reveal) */
.stack {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.stack-card {
  position: sticky;
  top: var(--sticky-top);
  height: 600px;
  border-radius: 0;
  overflow: hidden;
  background: var(--navy);
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
.stack-card.prop-card {
  height: auto;
  overflow: hidden;
  background: var(--navy) !important;
  border: none !important;
  box-shadow: none !important;
}
.stack-hero {
  height: 300px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #0a1322;
}
.stack-hero-img {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 104.3%;
  height: auto;
  display: block;
  pointer-events: none;
}
.stack-hero.prop-hero {
  height: auto;
  aspect-ratio: 1080 / 1350;
  background-color: var(--navy);
}
.prop-hero .stack-hero-img {
  position: static;
  top: 0;
  left: auto;
  transform: none;
  width: 100%;
}
.stack-hero.placeholder { background-color: rgba(255, 255, 255, 0.04); }
.stack-hero .hue-shift {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: hue-rotate(40deg) saturate(0.9);
}
.stack-hero .insert-note {
  position: absolute;
  inset: 16px;
  border-radius: 0;
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 12px;
  line-height: 1.4;
}
.discount-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 14px;
  border-radius: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  color: #3a2a05;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.5);
}
.hero-fade { display: none; }
.stack-body {
  padding: 18px 20px 20px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stack-title-row { display: flex; align-items: center; gap: 12px; }
.stack-title-row .name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex: 1;
  min-width: 0;
  line-height: 1.1;
}
.arrow-badge {
  width: 34px;
  height: 34px;
  border-radius: 0;
  flex-shrink: 0;
  border: 1px solid rgba(4, 193, 152, 0.4);
  background: rgba(4, 193, 152, 0.12);
  display: grid;
  place-items: center;
}
.stack-divider { height: 1px; background: rgba(255, 255, 255, 0.10); margin: 2px 0; }
.stack-meta {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.3px;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.4;
}
.stack-meta.prop {
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1.2px;
  font-weight: 600;
  text-transform: uppercase;
}
.stack-desc { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
.prop-code-line { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.7); }
.prop-code-line strong { color: var(--teal); font-weight: 700; }

/* Compatibility indicator */
.compat { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.compat-top { display: flex; align-items: baseline; gap: 6px; }
.compat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.5px;
  line-height: 1;
}
.compat-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  opacity: 0.7;
}
.compat-word {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1.4px;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 4px;
}
.compat-bars { display: flex; gap: 2.5px; }
.compat-bars span { flex: 1; height: 4px; border-radius: 0; background: rgba(255, 255, 255, 0.10); }
.compat-bars span.on { background: var(--teal); }
.compat-bars span.tip { box-shadow: 0 0 6px var(--teal); }
.compat-label { font-size: 11px; color: rgba(255, 255, 255, 0.78); font-weight: 600; margin-top: 1px; }

.stack-cta {
  width: 100%;
  height: 46px;
  border-radius: 0;
  margin-top: auto;
  border: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.4px;
  background: linear-gradient(180deg, var(--teal-2), var(--teal));
  color: #04261E;
  animation: tbJoinPulse 1.6s ease-in-out infinite;
  box-shadow: 0 6px 18px rgba(4, 193, 152, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.stack-cta.gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #3a2a05;
  box-shadow: 0 6px 18px rgba(245, 166, 35, 0.45);
}

/* Prop CTA card — last card in dashboard stack.
   Non-sticky + full-viewport tall so it slides up over the last (pinned)
   mentor card and fully covers it once you scroll to the bottom. */
.stack-propcta {
  position: relative;
  min-height: 100dvh;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--navy);
  color: #fff;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  border: none;
  text-align: left;
  padding: 0;
  font-family: inherit;
}
/* 4 equal-height bands, each logo strip blended into its own band colour */
.propcta-bands {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
}
.propcta-bands .pband {
  flex: 1;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}
.pband-1 { background-color: rgb(37, 89, 90); background-image: url('../assets/propcta-band-1-tradeify.png'); }
.pband-2 { background-color: rgb(83, 58, 36); background-image: url('../assets/propcta-band-2-apex.png'); }
.pband-3 { background-color: rgb(35, 82, 37); background-image: url('../assets/propcta-band-3-topstep.png'); }
.pband-4 { background-color: rgb(33, 58, 87); background-image: url('../assets/propcta-band-4-ftmo.png'); }
/* Readability scrim above the bands, below the text */
.stack-propcta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(6, 20, 16, 0.42) 0%, rgba(6, 20, 16, 0.28) 50%, rgba(6, 20, 16, 0.48) 100%);
}
.stack-propcta .inner {
  flex: 1;
  padding: 40px 24px 240px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 2px 16px rgba(0, 0, 0, 0.55);
}
.stack-propcta .step {
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 800;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 14px;
}
.stack-propcta .big {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.05;
}
.stack-propcta p {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  max-width: 280px;
}
.stack-propcta .explore {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 12px 18px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

/* ── Trader type detail ────────────────────────────────────────────────── */
.detail {
  background: var(--navy);
  color: #fff;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: 50px;
}
.detail-head { text-align: center; padding: 20px 28px 0; }
.detail-kicker {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}
.detail-name { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-top: 6px; }
.detail-tagline { font-size: 13px; font-weight: 600; margin-top: 4px; }
.panel-wrap { padding: 16px 16px 0; }
.panel-wrap.first { padding-top: 24px; }
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: 16px;
}
.panel.teal-border { border-color: rgba(4, 193, 152, 0.18); }
.panel-label { font-size: 10px; color: var(--teal); font-weight: 800; letter-spacing: 2px; }
.panel p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.85); }
.traits { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.trait-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.trait-row .k { font-size: 12px; color: rgba(255, 255, 255, 0.78); font-weight: 600; }
.trait-row .v { font-size: 11px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.trait-track { height: 5px; border-radius: 0; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.trait-fill { height: 100%; border-radius: 0; }
.behaviors { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.behavior { display: flex; gap: 10px; align-items: flex-start; }
.behavior .dot { width: 6px; height: 6px; border-radius: 3px; margin-top: 6px; flex-shrink: 0; }
.behavior .line { font-size: 13px; color: rgba(255, 255, 255, 0.85); line-height: 1.5; }
.card-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center; z-index: 200; backdrop-filter: blur(6px); }
.card-modal.hidden { display: none; }
.card-modal-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.card-modal-hint { font-size: 12px; color: rgba(255,255,255,0.45); letter-spacing: 1px; text-transform: uppercase; margin: 0; }
.affiliate-disclaimer { margin: 64px 16px 8px; font-size: 10.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.32); text-align: center; }
.affiliate-disclaimer + .affiliate-disclaimer { margin-top: 4px; }
.disclosure-link { color: rgba(255, 255, 255, 0.45); text-decoration: underline; cursor: pointer; }
.disclosure-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center; z-index: 200; backdrop-filter: blur(6px); padding: 24px; }
.disclosure-modal.hidden { display: none; }
.disclosure-modal-inner {
  max-width: 360px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 0;
  padding: 24px;
}
.disclosure-modal-inner h2 { font-size: 16px; font-weight: 800; margin: 0 0 14px; }
.disclosure-modal-inner p { font-size: 12.5px; line-height: 1.6; color: rgba(255, 255, 255, 0.75); margin: 0 0 12px; }
.disclosure-close {
  margin-top: 8px;
  width: 100%;
  padding: 12px;
  border-radius: 0;
  border: none;
  background: var(--teal);
  color: #04261E;
  font-weight: 700;
  cursor: pointer;
}
