:root {
  --bg: #f3f8f4;
  --card: #ffffff;
  --text: #173a2f;
  --muted: #5d7b6e;
  --accent: #1f8f57;
  --accent-2: #c3f0d4;
  --border: #dbe9df;
  --shadow: 0 16px 44px rgba(20, 61, 44, 0.1);
  --shadow-soft: 0 10px 28px rgba(25, 79, 55, 0.08);
}

* {
  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: 940px;
  margin: 0 auto;
  padding: 56px 22px 90px;
}

.hero {
  margin-bottom: 34px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #2f8e65;
  margin-bottom: 10px;
}

h1 {
  margin: 0;
  line-height: 1.12;
  font-size: clamp(2.2rem, 4.1vw, 3.2rem);
  letter-spacing: -0.02em;
}

.hero-copy {
  color: var(--muted);
  margin-top: 14px;
  max-width: 68ch;
  line-height: 1.65;
  font-size: 1.05rem;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-chips span {
  background: #eaf8ef;
  border: 1px solid #cce8d6;
  color: #1f6143;
  font-size: 0.83rem;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.progress-wrap {
  margin-bottom: 30px;
}

.step-dots {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 7px;
}

.step-dot {
  height: 5px;
  border-radius: 999px;
  background: #dbe9df;
}

.step-dot.active {
  background: #1f8f57;
}

.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;
}


.guided-banner {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eaf8ef;
  border: 1px solid #cce8d6;
  color: #1f6143;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-feedback {
  margin: 0 0 18px;
  color: #2f6d4f;
  font-weight: 600;
  min-height: 24px;
}

.step {
  display: none;
}

.step.active {
  display: block;
  animation: stepFadeSlide 260ms ease;
}

@keyframes stepFadeSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  margin: 0 0 20px;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.option-card {
  border: 1px solid #d5e6db;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #234838;
  cursor: pointer;
  background: #ffffff;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.option-card:hover {
  border-color: #83cfa0;
  background: #f7fdf9;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.option-card:has(input:checked) {
  border-color: var(--accent);
  background: #f3fcf7;
  box-shadow: 0 12px 20px rgba(45, 132, 86, 0.12), inset 0 0 0 1px #52b87e;
}

input[type="radio"] {
  accent-color: var(--accent);
}

.validation-message {
  min-height: 20px;
  margin: 16px 0 8px;
  color: #b23834;
  font-size: 0.92rem;
}

.actions,
.results-header {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.btn {
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #1f8f57, #2da56a);
  color: #fff;
  box-shadow: 0 10px 20px rgba(32, 130, 82, 0.24);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(32, 130, 82, 0.3);
}

.btn-secondary {
  background: #edf5f1;
  color: #1d5b42;
  border: 1px solid #d2e4d8;
}

.btn-secondary:hover:not(:disabled) {
  background: #e4efe9;
  transform: translateY(-1px);
}

.hidden {
  display: none;
}

.results {
  margin-top: 28px;
}

.results-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fcf9);
  box-shadow: var(--shadow-soft);
}

.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: 768px) {
  .app-shell {
    padding: 28px 14px 60px;
  }

  h1 {
    font-size: clamp(1.85rem, 8vw, 2.35rem);
    line-height: 1.18;
  }

  .hero-copy {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  h2 {
    font-size: clamp(1.2rem, 5vw, 1.45rem);
  }

  .card {
    border-radius: 20px;
    padding: 22px;
  }

  .best-match,
  .start-growing,
  .eco-journey-card,
  .email-capture,
  .care-panel {
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
  }

  .results-grid,
  .start-growing-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .result-card {
    padding: 16px;
    border-radius: 14px;
  }

  .actions,
  .results-header,
  .dashboard-actions,
  .eco-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .email-form .btn,
  .eco-actions .btn {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    font-size: 0.98rem;
  }

  .email-form input[type="text"],
  .email-form input[type="email"] {
    font-size: 1rem;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding: 20px 12px 44px;
  }

  .hero {
    margin-bottom: 22px;
  }

  .hero-chips {
    gap: 8px;
  }

  .hero-chips span {
    font-size: 0.76rem;
    padding: 5px 8px;
  }

  .step-feedback {
    font-size: 0.92rem;
    min-height: 0;
  }

  .card {
    padding: 16px;
  }

  .progress-labels {
    font-size: 0.86rem;
  }

  .option-grid {
    gap: 10px;
  }

  .option-card {
    padding: 12px;
    font-size: 0.95rem;
  }

  .result-card h3,
  .best-match h3 {
    font-size: 1.15rem;
  }

  .score-pill {
    font-size: 0.74rem;
  }
}

.best-match {
  border: 1px solid #bde6cb;
  background: linear-gradient(160deg, #f2fff6, #f8fffb);
  border-radius: 22px;
  padding: 24px;
  margin: 22px 0;
  box-shadow: var(--shadow-soft);
}

.best-match h3 {
  margin: 2px 0;
  font-size: 1.5rem;
}

.best-match-copy {
  color: #285b45;
  margin: 8px 0 12px;
}

.best-match-cta {
  margin-top: 12px;
}

.section-title {
  margin: 22px 0 14px;
  font-size: 1.16rem;
  letter-spacing: -0.01em;
}

.care-panel {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: #fcfffd;
}

.dashboard-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.email-capture {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  background: #f9fffb;
}

.email-helper {
  color: var(--muted);
  margin-top: 4px;
}

.email-form {
  display: grid;
  gap: 10px;
}

.email-form .btn {
  width: fit-content;
}

.email-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

.email-form input[type="text"],
.email-form input[type="email"] {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
}

.email-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #1b6945;
  font-weight: 500;
}


.start-growing {
  margin-top: 20px;
  border: 1px solid #b7e1c8;
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(155deg, #f0fff5, #f8fffb);
  box-shadow: var(--shadow-soft);
}

.start-growing h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.start-growing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.grow-tip {
  background: #ffffff;
  border: 1px solid #d3e9dc;
  border-radius: 12px;
  padding: 12px;
}

.grow-tip .label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4f7e69;
  margin-bottom: 6px;
}

.grow-tip p {
  margin: 0;
  color: #204533;
  line-height: 1.45;
}

.eco-journey-card {
  margin-top: 24px;
  border: 1px solid #cfe5d7;
  border-radius: 16px;
  padding: 20px;
  background: #fbfffc;
  box-shadow: var(--shadow-soft);
}

.eco-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.eco-actions .btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.loading-screen {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 180px;
  text-align: center;
}

.loading-screen p {
  margin: 0;
  color: #2b5e47;
  font-size: 1.02rem;
  font-weight: 600;
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid #d5eadf;
  border-top-color: #1f8f57;
  animation: spin 0.8s linear infinite;
}

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