:root {
  --bg: #F0EDE6;
  --card: #FFFFFF;
  --border: #E0DDD6;
  --accent: #262f9e;
  --accent-dim: rgba(38, 47, 158, 0.08);
  --red: #e54635;
  --red-dim: rgba(229, 70, 53, 0.08);
  --yellow: #e9b458;
  --yellow-dim: rgba(233, 180, 88, 0.10);
  --text: #1a1a1a;
  --muted: #0f172a;
  --sub: #777470;

  --c-interest: #262f9e;
  --c-completion: #e54635;
  --c-students: #50b8f2;
  --c-ads: #e9b458;
}

.secondary-text {
  color: #0f172a;
  font-weight: 500;
  font-weight: bold;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 40px;
  /* Reduced from 40px to 20px */
}

/* ── HEADER ── */
.top {
  width: 100%;
  max-width: 620px;
  text-align: center;
  margin-bottom: 20px;
  /* Reduced from 36px */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.brand-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 52px;
}

.brand-bar {
  width: 14px;
  border-radius: 3px 3px 0 0;
}

.brand-bar-1 {
  height: 52%;
  background: #262f9e;
}

.brand-bar-2 {
  height: 68%;
  background: #e54635;
}

.brand-bar-3 {
  height: 82%;
  background: #e9b458;
}

.brand-bar-4 {
  height: 100%;
  background: #50b8f2;
}

.brand-wordmark {
  text-align: left;
}

.brand-name {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #1a1a1a;
  line-height: 1;
}

.brand-tagline {
  font-size: 10px;
  font-weight: 600;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0f172a;
  margin-top: 5px;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 10px;
}

.skool-word {
  display: inline;
  font-weight: 900;
  font-size: 1em;
  letter-spacing: -0.01em;
}

.s-S {
  color: #262f9e;
}

.s-K {
  color: #e54635;
}

.s-O1 {
  color: #e9b458;
}

.s-O2 {
  color: #50b8f2;
}

.s-L {
  color: #d2513d;
}

.top-sub {
  font-size: 14px;
  color: var(--sub);
  font-weight: bold;
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto;
}

/* ── SEGMENTED PROGRESS BAR ── */
.progress-wrap {
  width: 100%;
  max-width: 620px;
  margin-bottom: 3px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.seg-bar {
  display: flex;
  gap: 4px;
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
}

.seg {
  flex: 1;
  border-radius: 3px;
  background: #E0DDD6;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.seg-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s ease;
}

.seg-labels {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.seg-label {
  flex: 1;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C8C5BE;
  transition: color 0.3s;
}

.seg-label.active {
  color: var(--muted);
}

.seg-label.complete {
  color: var(--accent);
}

/* ── CARD ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 620px;
  padding: 36px 36px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.15;
}

.pillar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.pillar-badge.interest {
  background: rgba(38, 47, 158, 0.08);
  color: var(--c-interest);
  border: 1px solid rgba(38, 47, 158, 0.2);
}

/* Swap the completion and students badge styles */
.pillar-badge.completion {
  background: rgba(229, 70, 53, 0.08);
  color: #e54635;
  border: 1px solid rgba(229, 70, 53, 0.2);
}

.pillar-badge.students {
  background: rgba(80, 184, 242, 0.10);
  color: #50b8f2;
  border: 1px solid rgba(80, 184, 242, 0.3);
}

.pillar-badge.ads {
  background: rgba(233, 180, 88, 0.12);
  color: #9a6200;
  border: 1px solid rgba(233, 180, 88, 0.35);
}

.pillar-badge.leadform {
  background: rgba(0, 0, 0, 0.03);
  color: var(--muted);
  border: 1px solid var(--border);
}

.step-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  display: block;
}

.question {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 8px;
}

.question-hint {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.6;
  margin-bottom: 26px;
}

.answers {
  display: grid;
  grid-template-columns: 1fr;
  /* One column */
  grid-auto-rows: 1fr;
  /* FORCES all rows to the height of the tallest item */
  gap: 10px;
}

.answer-btn {
  display: flex;
  align-items: center;
  /* Vertically centers the content inside the button */
  gap: 14px;
  background: #F8F5EF;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;

  /* Ensure the button takes up the full height of the grid cell */
  height: 100%;
}

.answer-btn:hover {
  border-color: #C8C5BE;
  background: #F0EDE6;
}

.answer-btn.selected-yes {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.answer-btn.selected-no {
  border-color: var(--red);
  background: var(--red-dim);
}

.answer-btn.selected-unsure {
  border-color: var(--yellow);
  background: var(--yellow-dim);
}

.answer-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: #EAE7E0;
}

.answer-btn.selected-yes .answer-icon {
  background: rgba(38, 47, 158, 0.12);
}

.answer-btn.selected-no .answer-icon {
  background: rgba(229, 70, 53, 0.12);
}

.answer-btn.selected-unsure .answer-icon {
  background: rgba(233, 180, 88, 0.15);
}

.answer-text {
  flex: 1;
}

.answer-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.answer-sub {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.4;
  display: block;
  /* Always visible */
  margin-top: 4px;
  /* Adds space between label and description */
}

.answer-btn.selected-no .answer-label {
  color: var(--red);
}

.answer-btn.selected-yes .answer-label {
  color: var(--accent);
}

.answer-btn.selected-unsure .answer-label {
  color: #9a6200;
}

.reveal {
  margin-top: 20px;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.6;
  display: none;
  animation: fadeUp 0.35s ease forwards;
}

.reveal.show {
  display: block;
}

.reveal.bad {
  background: var(--red-dim);
  border: 1px solid rgba(229, 70, 53, 0.2);
  color: #b83020;
}

.reveal.warn {
  background: var(--yellow-dim);
  border: 1px solid rgba(233, 180, 88, 0.3);
  color: #7a4e00;
}

.reveal.good {
  background: var(--accent-dim);
  border: 1px solid rgba(38, 47, 158, 0.2);
  color: #262f9e;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Revenue input */
.revenue-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #F8F5EF;
  transition: border-color 0.2s;
}

.revenue-input-wrap:focus-within {
  border-color: var(--accent);
}

.currency-prefix {
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  background: #F0EDE6;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.revenue-input-wrap input {
  flex: 1;
  height: 52px;
  padding: 0 16px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-family: inherit;
}

.revenue-input-wrap input::placeholder {
  color: #C8C5BE;
  font-weight: 400;
}

/* Lead form fields */
.lead-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lead-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lead-input {
  height: 50px;
  padding: 0 16px;
  background: #F8F5EF;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.lead-input:focus {
  border-color: var(--accent);
}

.lead-input::placeholder {
  color: #C8C5BE;
}

.lead-note {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: bold;
  margin-top: 4px;
  text-align: center;
  line-height: 1.5;
}

/* Next button */
.next-btn {
  margin-top: 24px;
  width: 100%;
  height: 52px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.1s;
  opacity: 0.35;
  pointer-events: none;
  font-family: inherit;
}

.next-btn.ready {
  opacity: 1;
  pointer-events: all;
}

.next-btn.ready:hover {
  opacity: 0.9;
}

.next-btn.ready:active {
  transform: scale(0.99);
}

/* ── RESULTS ── */
#results-screen {
  display: none;
  width: 100%;
  max-width: 620px;
}

.results-header {
  text-align: center;
  margin-bottom: 32px;
}

.results-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.results-header p {
  font-size: 14px;
  color: var(--sub);
  font-weight: bold;
}

.big-loss {
  background: var(--red-dim);
  border: 1px solid rgba(229, 70, 53, 0.2);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  margin-bottom: 20px;
}

.big-loss-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(229, 70, 53, 0.7);
  margin-bottom: 10px;
}

.big-loss-num {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--red);
  line-height: 1;
  animation: countUp 1.2s ease forwards;
}

.big-loss-year {
  font-size: 14px;
  color: rgba(229, 70, 53, 0.6);
  margin-top: 8px;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.pillar-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.pillar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pillar-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pillar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pillar-section-loss {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pillar-section-loss.red {
  color: var(--red);
}

.pillar-section-loss.zero {
  color: var(--accent);
  font-size: 14px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 12px;
}

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

.blabel {
  color: var(--sub);
  font-weight: bold;
  flex: 1;
  line-height: 1.5;
}

.bval {
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bval.zero {
  color: var(--accent);
}

.unknown-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(233, 180, 88, 0.12);
  border: 1px solid rgba(233, 180, 88, 0.3);
  color: #9a6200;
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.cta-card {
  background: linear-gradient(135deg, #f0f4ff 0%, #F0EDE6 100%);
  border: 1px solid rgba(38, 47, 158, 0.2);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  margin-bottom: 20px;
  margin-top: 20px;
}

.cta-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.cta-card p {
  font-size: 14px;
  color: var(--sub);
  font-weight: bold;
  line-height: 1.6;
  margin-bottom: 20px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  letter-spacing: 0.01em;
  font-family: inherit;
  transition: opacity 0.2s;
}

.cta-btn:hover {
  opacity: 0.88;
}

.restart-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  transition: border-color 0.2s, color 0.2s;
}

.restart-btn:hover {
  border-color: #C8C5BE;
  color: var(--text);
}

#quiz-screen {
  width: 100%;
  max-width: 620px;
}

/* ── MOBILE OPTIMIZATIONS ── */
/* ── ULTRA-COMPACT MOBILE OPTIMIZATIONS ── */
@media (max-width: 480px) {
  body {
    padding: 10px 10px 20px;
    /* Minimal page padding */
  }

  /* Hide the extra subheadline to save massive space */
  .top-sub {
    display: none;
  }

  .top {
    margin-bottom: 8px;
  }

  .brand {
    margin-bottom: 8px;
    gap: 8px;
  }

  .brand-bars {
    height: 28px;
    /* Tiny logo */
  }

  .brand-bar {
    width: 8px;
  }

  .brand-name {
    font-size: 18px;
  }

  h1 {
    font-size: 16px;
    margin-bottom: 0;
  }

  /* Progress Section */
  .progress-wrap {
    margin-bottom: 10px;
  }

  .progress-meta {
    margin-bottom: 4px;
    font-size: 10px;
  }

  /* Hide labels like "Interest", "Completion" on mobile to save height */
  .seg-labels {
    display: none;
  }

  .seg-bar {
    height: 4px;
  }

  /* Question Card */
  .card {
    padding: 15px 14px 12px;
    /* Super tight padding */
    border-radius: 12px;
  }

  .pillar-badge {
    margin-bottom: 6px;
    padding: 2px 6px;
    font-size: 8px;
  }

  .question {
    font-size: 15px;
    margin-bottom: 4px;
    line-height: 1.3;
  }

  .question-hint {
    font-size: 11px;
    margin-bottom: 12px;
    line-height: 1.4;
  }

  /* Answer Buttons (Mobile) */
  .answers {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 1fr;
    /* Keeps buttons uniform on iPhone */
    gap: 6px;
  }

  .answer-btn {
    padding: 4px 8px;
    gap: 8px;
    height: 100%;
    /* Ensures it fills the uniform grid row */
  }

  .answer-icon {
    width: 24px;
    height: 24px;
    font-size: 12px;
    border-radius: 6px;
  }

  .answer-label {
    font-size: 12px;
    margin-bottom: 1px;
  }

  .answer-sub {
    font-size: 10.5px;
    line-height: 1.3;
  }

  /* The Reveal Box (The purple info box) */
  .reveal {
    margin-top: 10px;
    padding: 10px 12px;
    font-size: 11.5px;
  }

  .next-btn {
    margin-top: 12px;
    height: 44px;
    font-size: 14px;
  }
}