:root {
  --bg: #f7f4ee;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #5d6875;
  --line: #e7dfd2;
  --above: #83b692;
  --below: #d98f75;
  --accent: #263238;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top, #fffaf2 0, var(--bg) 50%, #ebe2d6 100%);
}

.app-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 28px 18px 42px;
}

.screen { display: none; }
.screen.active { display: block; }

.hero, .section-header, .result-card {
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(3.2rem, 12vw, 6rem);
  letter-spacing: -0.08em;
  line-height: 0.95;
}

h2 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: -0.05em;
}

h3 { margin: 28px 0 8px; }

.subtitle, .section-header p:not(.eyebrow), .small-note {
  color: var(--muted);
  font-size: 1.05rem;
}

.choice-grid {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.category-card, .option-card, .result-card, .contact-form {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(231, 223, 210, 0.9);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.category-card {
  width: 100%;
  padding: 28px 24px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.category-card:hover, .category-card:focus-visible {
  transform: translateY(-2px);
  border-color: #c8bcae;
}

.category-title {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
}

.category-hint {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.small-note { margin-top: 28px; text-align: center; font-size: 0.9rem; }

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 18px;
}

.options-list {
  display: grid;
  gap: 10px;
  margin: 26px 0 96px;
}

.option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px;
  cursor: pointer;
  box-shadow: none;
  transition: background 120ms ease, border-color 120ms ease;
}

.option-card input { margin-top: 3px; width: 18px; height: 18px; }
.option-card.selected { border-color: #7d725f; background: #fffaf3; }

.sticky-actions {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(724px, calc(100% - 32px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 14px 12px 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: white;
  font-weight: 800;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  font-size: 1rem;
}

.primary-button:disabled { opacity: 0.42; cursor: not-allowed; }
.full-width { width: 100%; margin-top: 18px; }

.contact-form {
  margin-top: 24px;
  padding: 22px;
  text-align: left;
}

.contact-form label {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-form input:not([type="checkbox"]) {
  width: 100%;
  margin-top: 7px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 1rem;
  background: #fffdf9;
}

.consent-row {
  display: flex !important;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500 !important;
  color: var(--muted) !important;
  font-size: 0.9rem;
}

.consent-row input { margin-top: 3px; }
.form-error { color: #a33a2f; min-height: 1.2em; }

.result-card {
  padding: 28px 22px;
  text-align: left;
}
.result-card .eyebrow, .result-card h2 { text-align: center; }
.result-body { color: var(--text); line-height: 1.65; font-size: 1.04rem; }

.score-bar {
  display: flex;
  overflow: hidden;
  height: 16px;
  border-radius: 999px;
  background: var(--line);
  margin: 22px 0 8px;
}
.above-bar { background: var(--above); }
.below-bar { background: var(--below); }
.score-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.9rem; }

ul { padding-left: 20px; line-height: 1.65; }

@media (min-width: 680px) {
  .choice-grid { grid-template-columns: repeat(3, 1fr); }
  .category-card { min-height: 170px; }
}
