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

:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --primary-light: #ede9fe;
  --bg: #f8f7fc;
  --card: #ffffff;
  --text: #1a1a2e;
  --muted: #667085;
  --border: #e4e3ea;
  --green: #2fa84f;
  --amber: #f5a623;
  --red: #e5484d;
  --radius: 14px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(600px 400px at 15% -10%, rgba(124, 58, 237, 0.10), transparent 60%),
    radial-gradient(600px 400px at 90% 0%, rgba(79, 70, 229, 0.10), transparent 60%);
  z-index: -1;
}

.container { max-width: 760px; margin: 0 auto; padding: 0 24px; width: 100%; }

.hidden { display: none !important; }

/* Header */
.site-header { padding: 20px 0; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff; font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.logo-text { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.header-link { color: var(--muted); font-size: 14px; text-decoration: none; }
.header-link:hover { color: var(--primary); }

/* Hero */
.hero { text-align: center; padding: 64px 24px 40px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--muted);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04); margin-bottom: 28px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero-title { font-size: clamp(34px, 5.5vw, 54px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 18px; }
.grad { background: linear-gradient(135deg, #7c3aed, #4f46e5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 17px; color: var(--muted); line-height: 1.6; max-width: 560px; margin: 0 auto 32px; }
.hero-sub strong { color: var(--text); }
.hero-trust { margin-top: 22px; font-size: 14px; color: var(--muted); font-weight: 500; }
.dot-sep { margin: 0 10px; color: var(--border); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 15px;
  padding: 12px 22px; transition: all 0.15s ease; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(124, 58, 237, 0.36); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-arrow { font-size: 18px; }

/* Card + form */
.form-wrap { padding: 20px 24px 48px; flex: 1; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}

.progress-area { margin-bottom: 28px; }
.step-count { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.progress-track { height: 6px; background: #f0eef6; border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.progress-fill { height: 100%; width: 20%; background: linear-gradient(90deg, #7c3aed, #4f46e5); border-radius: 999px; transition: width 0.3s ease; }
.step-label { font-size: 14px; font-weight: 600; color: var(--muted); }

/* Questions */
.q-group { margin-bottom: 26px; }
.q-text { font-size: 17px; font-weight: 600; line-height: 1.4; margin-bottom: 12px; }

.q-options { display: grid; gap: 8px; }
.q-option {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 14px; cursor: pointer; transition: all 0.12s ease;
  background: #fff;
}
.q-option:hover { border-color: var(--primary); }
.q-option.selected { border-color: var(--primary); background: var(--primary-light); }
.q-option input { accent-color: var(--primary); width: 16px; height: 16px; }
.q-option .opt-label { font-size: 14px; font-weight: 500; }

/* Identification fields */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--red); }
.field input, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-family: inherit; font-size: 15px; color: var(--text);
  background: #fff; outline: none; transition: border-color 0.12s ease;
}
.field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12); }
.field input.error { border-color: var(--red); }
.field .field-help { font-size: 12px; color: var(--muted); margin-top: 4px; }

.checkbox-field { display: flex; align-items: flex-start; gap: 10px; background: #f8f7fc; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.checkbox-field input { accent-color: var(--primary); margin-top: 3px; width: 18px; height: 18px; }
.checkbox-field .check-label { font-size: 14px; color: var(--text); line-height: 1.4; }

.form-nav { display: flex; justify-content: space-between; margin-top: 28px; }

/* Loading */
.loading-card { text-align: center; padding: 64px 32px; }
.spinner {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 24px;
  border: 4px solid var(--primary-light); border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-card h2 { font-size: 22px; margin-bottom: 8px; }
.loading-card p { color: var(--muted); }

/* Result */
.result-top { display: flex; gap: 28px; align-items: center; margin-bottom: 28px; flex-wrap: wrap; }
.score-ring {
  width: 148px; height: 148px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--primary) 0deg, #ede9fe 0deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.score-ring::before {
  content: ''; position: absolute; inset: 12px; border-radius: 50%; background: #fff;
}
.score-num { font-size: 44px; font-weight: 800; position: relative; z-index: 1; }
.score-label { font-size: 13px; color: var(--muted); position: relative; z-index: 1; }
.result-headline { flex: 1; min-width: 220px; }
.result-band {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.band-survival { background: #fdecec; color: var(--red); }
.band-growing { background: #fdf3e3; color: #b45309; }
.band-healthy { background: #e6f6ec; color: var(--green); }
.result-headline h2 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 8px; }
.result-headline p { color: var(--muted); font-size: 14px; line-height: 1.5; }

.dims { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.dim-card { background: #f8f7fc; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.dim-card .dim-name { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.dim-card .dim-value { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.dim-bar { height: 6px; background: #e9e7f1; border-radius: 999px; overflow: hidden; }
.dim-bar-fill { height: 100%; border-radius: 999px; }

.goal-box { background: var(--primary-light); border-radius: 10px; padding: 14px 18px; font-size: 14px; color: var(--text); margin-bottom: 24px; }
.goal-box strong { color: var(--primary-dark); }

.section-title { font-size: 18px; margin-bottom: 14px; letter-spacing: -0.01em; }

.rec-card {
  border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: 10px; padding: 18px 20px; margin-bottom: 14px; background: #fff;
}
.rec-card .rec-title { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.rec-card .rec-line { font-size: 13.5px; color: #444; line-height: 1.55; margin-bottom: 6px; }
.rec-card .rec-line strong { color: var(--primary-dark); font-weight: 700; }
.rec-card.rec-quick { border-left-color: var(--green); }
.rec-card.rec-quick .rec-title { color: var(--green); }
.rec-num { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; align-items: center; justify-content: center; margin-right: 8px; }

.cta-box {
  margin-top: 28px; background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-radius: 12px; padding: 28px; text-align: center; color: #fff;
}
.cta-box h3 { font-size: 20px; margin-bottom: 8px; }
.cta-box p { font-size: 14px; opacity: 0.9; line-height: 1.5; margin-bottom: 20px; }
.cta-box .btn-primary { background: #fff; color: var(--primary-dark); box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
.cta-box .btn-primary:hover { transform: translateY(-1px); }
.cta-note { font-size: 12px; opacity: 0.85; margin-top: 16px; }

/* Footer */
.site-footer { padding: 24px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; gap: 12px; justify-content: center; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--primary); }

/* Error banner */
.error-banner {
  background: #fdecec; border: 1px solid #f5c2c4; color: #b42318;
  border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-top: 16px;
}

@media (max-width: 560px) {
  .hero { padding: 44px 24px 32px; }
  .card { padding: 24px 20px; }
  .dims { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 6px; }
}
