:root {
  --bg: #f3f8f4;
  --card: #ffffff;
  --text: #173a2f;
  --muted: #5d7b6e;
  --accent: #1f8f57;
  --accent-2: #c3f0d4;
  --border: #dbe9df;
  --shadow: 0 14px 40px rgba(20, 61, 44, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: linear-gradient(150deg, #eef7f0 0%, #f9fcf9 50%, #edf6ff 100%);
  color: var(--text);
  min-height: 100vh;
}

.app-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px 70px;
}

.hero {
  margin-bottom: 22px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  font-weight: 700;
  color: #2f8e65;
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
}

.hero-copy {
  color: var(--muted);
  margin-top: 10px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.progress-wrap {
  margin-bottom: 24px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e6efe9;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 14%;
  background: linear-gradient(90deg, #46b176, #1f8f57);
  border-radius: inherit;
  transition: width 250ms ease;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.3rem;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.option-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: #234838;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.option-card:hover {
  border-color: #95d4ad;
  transform: translateY(-1px);
}

.option-card:has(input:checked) {
  border-color: var(--accent);
  background: #f3fcf7;
  box-shadow: inset 0 0 0 1px #52b87e;
}

input[type="radio"] {
  accent-color: var(--accent);
}

.validation-message {
  min-height: 20px;
  margin: 12px 0 4px;
  color: #b23834;
  font-size: 0.92rem;
}

.actions,
.results-header {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.btn {
  border: 0;
  border-radius: 12px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: #e8f1ec;
  color: #1d5b42;
}

.hidden {
  display: none;
}

.results {
  margin-top: 18px;
}

.results-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fcf9);
}

.rank {
  display: inline-flex;
  background: var(--accent-2);
  color: #236b44;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.77rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.result-card h3 {
  margin: 0;
}

.score-pill {
  margin: 10px 0;
  display: inline-block;
  background: #153f2f;
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.result-card h4 {
  margin: 10px 0 6px;
  font-size: 0.9rem;
  color: #2f6650;
}

.result-card ul {
  margin: 0;
  padding-left: 18px;
  color: #2b5342;
}

.result-card p {
  margin: 0;
  color: #2a5644;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .card {
    padding: 18px;
  }

  .actions,
  .results-header {
    flex-direction: column;
    align-items: stretch;
  }
}

.best-match {
  border: 1px solid #bde6cb;
  background: linear-gradient(160deg, #f2fff6, #f8fffb);
  border-radius: 18px;
  padding: 18px;
  margin: 16px 0;
}

.best-match h3 {
  margin: 2px 0;
  font-size: 1.5rem;
}

.best-match-copy {
  color: #285b45;
  margin: 8px 0 12px;
}

.section-title {
  margin: 10px 0 12px;
  font-size: 1.05rem;
}

.care-panel {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fcfffd;
}

.dashboard-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
