/* ===== QUIZ ===== */
#quiz {
  display: none;
  background: var(--gray-50);
  min-height: 100vh;
}

/* Quiz sticky header */
.quiz-bar {
  position: sticky;
  top: 64px;
  z-index: 100;
  background: rgba(249, 249, 248, 0.98);
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 28px;
}

.quiz-bar-inner {
  max-width: var(--quiz-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qbar-label {
  font-size: 13px;
  color: var(--gray-500);
}

.qbar-label strong {
  color: var(--gray-800);
  font-weight: 600;
}

.qbar-pct {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--gray-600);
  font-style: italic;
}

/* Progress bar */
.progress-track {
  height: 3px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gray-800);
  border-radius: 99px;
  transition: width 0.6s var(--ease);
  width: 0%;
}

/* Step indicators */
.qbar-dots {
  display: flex;
  gap: 4px;
}

.qbar-dot {
  height: 3px;
  flex: 1;
  border-radius: 99px;
  background: var(--gray-200);
  transition: background 0.3s;
}

.qbar-dot.done {
  background: var(--gray-600);
}

.qbar-dot.active {
  background: var(--gray-900);
}

/* Quiz body */
.quiz-body {
  max-width: var(--quiz-w);
  margin: 0 auto;
  padding: 16px 28px 130px;
}

/* Section intro (Compact Horizontal) */
.q-section-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px 24px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: rise 0.45s var(--ease-out) both;
}

.q-sec-icon {
  font-size: 28px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.q-sec-text {
  flex: 1;
  text-align: left;
}

.q-sec-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.q-sec-sub {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.4;
}

/* Question card */
.q-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  animation: rise 0.45s var(--ease-out) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.q-card.invalid {
  border-color: rgba(184, 50, 50, 0.4);
  box-shadow: 0 0 0 3px rgba(184, 50, 50, 0.07);
}

.q-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.q-title {
  font-family: var(--font-heading);
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.q-hint {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 24px;
  line-height: 1.55;
  font-style: italic;
}

.q-type-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 18px;
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
}

/* ===== MCQ OPTIONS ===== */
.opts {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 45vh;
  overflow-y: auto;
  padding-right: 6px;
}

.opts::-webkit-scrollbar {
  width: 6px;
}

.opts::-webkit-scrollbar-track {
  background: transparent;
}

.opts::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}


.opts.grid-2 {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 540px) {
  .opts.grid-2 {
    grid-template-columns: 1fr;
  }
}

.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  background: var(--gray-50);
  cursor: pointer;
  transition: all 0.18s var(--ease);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.opt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.18s;
}

.opt:hover {
  border-color: var(--gray-400);
  background: var(--white);
}

.opt:hover::before {
  background: rgba(0, 0, 0, 0.01);
}

/* Radio circle */
.opt-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-300);
  flex-shrink: 0;
  position: relative;
  transition: all 0.18s var(--ease);
  display: grid;
  place-items: center;
}

.opt-circle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
  transform: scale(0);
  transition: transform 0.18s var(--ease);
}

.opt-text {
  font-size: 14.5px;
  color: var(--gray-700);
  transition: color 0.18s;
  flex: 1;
  line-height: 1.4;
}

.opt-text-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  text-align: left;
}

.opt-title-text {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--gray-900);
  transition: color 0.18s;
  line-height: 1.35;
}

.opt-desc-text {
  font-size: 12px;
  color: var(--gray-500);
  transition: color 0.18s;
  line-height: 1.4;
}

/* States */
.opt.sel {
  border-color: var(--gray-800);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.opt.sel .opt-circle {
  background: var(--gray-900);
  border-color: var(--gray-900);
}

.opt.sel .opt-circle::after {
  transform: scale(1);
}

.opt.sel .opt-text {
  color: var(--gray-900);
  font-weight: 500;
}

/* Multi-select checkbox */
.opt-check {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--gray-300);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: all 0.18s var(--ease);
}

.opt-check svg {
  width: 11px;
  height: 11px;
  stroke: var(--white);
  opacity: 0;
  transition: opacity 0.18s;
}

.opt.sel .opt-check {
  background: var(--gray-900);
  border-color: var(--gray-900);
}

.opt.sel .opt-check svg {
  opacity: 1;
}

/* ===== SLIDER ===== */
.slider-container {
  padding: 4px 0;
}

.slider-value-box {
  text-align: center;
  margin-bottom: 28px;
  padding: 24px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.slider-big-val {
  font-family: var(--font-heading);
  font-size: 52px;
  color: var(--gray-900);
  line-height: 1;
  font-style: italic;
}

.slider-unit {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 4px;
}

.slider-state-label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  padding: 5px 14px;
  border-radius: 99px;
  display: inline-block;
  letter-spacing: 0.03em;
}

.sl-label-good {
  background: var(--positive-bg);
  color: var(--positive);
}

.sl-label-neutral {
  background: var(--gray-100);
  color: var(--gray-600);
}

.sl-label-bad {
  background: var(--negative-bg);
  color: var(--negative);
}

.slider-track-wrap {
  padding: 0 4px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, var(--gray-800) var(--fill, 50%), var(--gray-200) var(--fill, 50%));
  touch-action: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gray-900);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px var(--gray-300), 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: box-shadow 0.18s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 1px var(--gray-400), 0 4px 12px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--white);
  background: var(--gray-900);
  box-shadow: 0 0 0 1px var(--gray-300);
  cursor: pointer;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  color: var(--gray-400);
  padding: 0 2px;
}

.slider-labels span {
  text-align: center;
  flex: 1;
}

.slider-labels span:first-child {
  text-align: left;
}

.slider-labels span:last-child {
  text-align: right;
}

/* Validation error */
.q-err {
  font-size: 12px;
  color: var(--negative);
  margin-top: 10px;
  display: none;
}

.q-card.invalid .q-err {
  display: block;
}

/* ===== QUIZ FOOTER NAV ===== */
.quiz-foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.quiz-foot-inner {
  max-width: var(--quiz-w);
  width: 100%;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .quiz-foot-inner {
    padding: 10px 14px;
    gap: 8px;
  }
  .foot-note {
    display: none !important;
  }
  .quiz-foot-right {
    display: flex;
    gap: 8px;
  }
  .quiz-foot-inner .btn {
    padding: 10px 18px !important;
    font-size: 14px !important;
  }
}

.foot-note {
  font-size: 12px;
  color: var(--gray-400);
}

/* ===== CALCULATING ===== */
#calculating {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--white);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.calc-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  border-top-color: var(--gray-800);
  animation: spin 0.85s linear infinite;
  margin-bottom: 36px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#calculating h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--gray-900);
  margin-bottom: 10px;
}

#calculating p {
  font-size: 15px;
  color: var(--gray-500);
  max-width: 36ch;
  line-height: 1.6;
}

.calc-list {
  margin-top: 40px;
  display: grid;
  gap: 10px;
  text-align: left;
  max-width: 340px;
  width: 100%;
}

.calc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--gray-400);
  transition: color 0.3s;
}

.calc-item.active {
  color: var(--gray-800);
  font-weight: 500;
}

.calc-item.done {
  color: var(--positive);
}

.calc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-200);
  flex-shrink: 0;
  transition: background 0.3s;
}

.calc-item.active .calc-dot {
  background: var(--gray-800);
  animation: pulse-live 1s infinite;
}

.calc-item.done .calc-dot {
  background: var(--positive);
  animation: none;
}

/* ===== RESULTS ===== */
#results {
  display: none;
}

/* Results hero */
.res-hero {
  background: var(--gray-900);
  padding: 100px 28px 80px;
  position: relative;
  overflow: hidden;
}

.res-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(45, 91, 227, 0.12), transparent 70%);
  pointer-events: none;
}

.res-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

.res-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: block;
}

.res-score-block {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 20px;
}

.res-big-score {
  font-family: var(--font-heading);
  font-size: clamp(80px, 14vw, 120px);
  color: var(--white);
  line-height: 1;
  font-style: italic;
}

.res-score-side {
  padding-bottom: 12px;
}

.res-band-name {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  display: inline-block;
  margin-bottom: 8px;
  border: 1px solid;
}

.res-tagline {
  font-size: 14px;
  color: var(--gray-500);
  max-width: 42ch;
  line-height: 1.65;
}

/* Score band row */
.band-row {
  display: flex;
  gap: 8px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.band-pill {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 10px 8px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  transition: all 0.3s;
}

.band-pill.active {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.band-pill .bp-range {
  display: block;
  font-size: 10px;
  margin-top: 2px;
  font-weight: 400;
}

/* Dim section */
.res-section {
  padding: 80px 28px;
}

.res-section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.res-section-alt {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.res-section-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 34px);
  color: var(--gray-900);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.res-section-sub {
  font-size: 15px;
  color: var(--gray-500);
  max-width: 52ch;
  margin-bottom: 48px;
  line-height: 1.6;
}

/* Dim rows */
.dim-list {
  display: grid;
  gap: 12px;
}

.dim-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: box-shadow 0.2s;
}

.dim-row:hover {
  box-shadow: var(--shadow-sm);
}

@media (max-width: 600px) {
  .dim-row {
    grid-template-columns: 1fr;
  }
}

.dim-name-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dim-icon {
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gray-100);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.dim-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.dim-sub {
  font-size: 12px;
  color: var(--gray-400);
}

.dim-bar-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dim-bar-track {
  flex: 1;
  height: 8px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.dim-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 1.1s var(--ease-out);
  width: 0%;
}

.dim-pct {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--gray-800);
  min-width: 52px;
  text-align: right;
}

/* Issue cards */
.issues-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 760px) {
  .issues-grid {
    grid-template-columns: 1fr;
  }
}

.issue-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  border-top: 3px solid;
  transition: box-shadow 0.2s;
}

.issue-card:hover {
  box-shadow: var(--shadow-md);
}

.issue-rank {
  font-family: var(--font-heading);
  font-size: 40px;
  color: var(--gray-200);
  line-height: 1;
  margin-bottom: 14px;
  font-style: italic;
}

.issue-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.issue-card p {
  font-size: 13.5px;
  color: var(--gray-500);
  line-height: 1.65;
  margin-bottom: 16px;
}

.issue-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius);
  display: inline-block;
}

/* Plan section */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 760px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}

.plan-head {
  background: var(--gray-50);
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
}

.plan-head-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  display: block;
  margin-bottom: 4px;
}

.plan-head b {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
}

.plan-items {
  padding: 16px 22px;
  display: grid;
  gap: 0;
}

.plan-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
}

.plan-item:last-child {
  border-bottom: none;
}

.plan-week {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}

.plan-foot {
  background: var(--gray-900);
  padding: 12px 22px;
}

.plan-goal {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

/* Final CTA */
.final-cta {
  padding: 80px 28px;
  text-align: center;
}

.final-cta-inner {
  max-width: 640px;
  margin: 0 auto;
  background: var(--gray-900);
  border-radius: var(--radius-xl);
  padding: 60px 48px;
}

.final-cta-inner h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.5vw, 36px);
  color: var(--white);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.final-cta-inner p {
  font-size: 15px;
  color: var(--gray-400);
  margin-bottom: 32px;
  line-height: 1.65;
}

.final-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-white {
  background: var(--white);
  color: var(--gray-900);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-white:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.btn-ghost-white {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost-white:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Footer */
.site-footer {
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  padding: 28px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

.reveal-d1 {
  transition-delay: 0.1s;
}

.reveal-d2 {
  transition-delay: 0.2s;
}

.reveal-d3 {
  transition-delay: 0.3s;
}

.reveal-d4 {
  transition-delay: 0.4s;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  z-index: 999;
  transform: translateX(-50%) translateY(8px);
  background: var(--gray-900);
  color: var(--white);
  font-size: 13px;
  padding: 11px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .hero {
    padding: 110px 20px 70px;
  }

  .q-card {
    padding: 22px 18px;
  }

  .quiz-body {
    padding: 32px 20px 120px;
  }

  .features-section,
  .how-section {
    padding: 70px 20px;
  }

  .res-hero {
    padding: 80px 20px 60px;
  }

  .res-section {
    padding: 60px 20px;
  }

  .final-cta-inner {
    padding: 40px 24px;
  }
}

