/* Score Assessment — modern wellness-app aesthetic.
 * Looks like Calm meets a government portal.
 * Soft greens, whites, gentle radius. Trustworthy. Friendly.
 * The horror is in the content, never the design.
 */

:root {
  --bg: #FAFBF9;
  --surface: #FFFFFF;
  --text: #1A2E1A;
  --text-secondary: #4A5E4A;
  --text-muted: #8A9A8A;
  --accent: #2D7A4F;
  --accent-soft: #E8F5EE;
  --accent-hover: #1F5C3A;
  --border: #E2E8E2;
  --ring-bg: #E8EDE8;
  --ring-color: #2D7A4F;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(26, 46, 26, 0.06);
  --shadow-lg: 0 8px 32px rgba(26, 46, 26, 0.1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ─── App Shell ─── */
.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  padding: 2rem 1.5rem;
  animation: fadeIn 0.3s ease;
}
.screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Brand ─── */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.brand-mark { color: var(--accent); }
.brand-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ─── Landing ─── */
.landing-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
}
.landing-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
}
.landing-content h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.landing-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 380px;
}
.landing-desc--sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.landing-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ─── Buttons ─── */
.btn {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.9rem 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 122, 79, 0.25);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45, 122, 79, 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ─── Quiz ─── */
.quiz-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--ring-bg);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 10%;
}
.progress-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.quiz-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.question-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.question-text {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.answer-btn {
  font-family: var(--font);
  font-size: 0.95rem;
  text-align: left;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text);
  line-height: 1.4;
}
.answer-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.answer-btn:active {
  transform: scale(0.98);
}
.answer-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 500;
}

/* ─── Result ─── */
.screen--result {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.result-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
}
.result-badge {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
}
.result-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
}
.score-pct {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}
.result-classification {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.result-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.result-details {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: left;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.result-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.result-case {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  opacity: 0.6;
}

/* ─── Engine Whisper ─── */
.engine-whisper {
  margin-top: 2rem;
  padding: 1.5rem;
  text-align: left;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: 420px;
  width: 100%;
}
.engine-whisper p { margin-bottom: 0.5rem; }
.engine-whisper a { color: var(--accent); }

/* ─── Footer ─── */
.app-footer {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.app-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.app-footer a:hover { color: var(--accent); }
.byline-wordmark { font-size: 0.62rem; opacity: 0.5; }

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .screen { padding: 1.5rem 1.25rem; }
  .landing-content h1 { font-size: 1.8rem; }
  .question-text { font-size: 1.15rem; }
  .result-card { padding: 2rem 1.5rem; }
}

/* ─── Score color states ─── */
.score-high { --ring-color: #2D7A4F; }
.score-mid { --ring-color: #B8860B; }
.score-low { --ring-color: #8B1A1A; }
.score-unindexed { --ring-color: #4A4A4A; }

/* ─── Referral (Report a Friend) ─── */
.referral {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: left;
}
.referral-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.referral-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.referral-input-row {
  display: flex;
  gap: 0.5rem;
}
.referral-input {
  flex: 1;
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.referral-input:focus {
  border-color: var(--accent);
}
.btn-referral {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  background: var(--facade-navy, #1B2845);
  color: #F4ECD8;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.btn-referral:hover { opacity: 0.85; }
.referral-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
  min-height: 1em;
}
