:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-warm: #F4EFE6;
  --ink: #1F2724;
  --muted: #5A6660;
  --sage-dark: #234236;
  --sage-mid: #3D6957;
  --sage-soft: #E8F0EC;
  --terracotta: #B85D43;
  --terracotta-soft: #FBF0EC;
  --border: #E2DACD;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-soft: 0 12px 32px rgba(35, 66, 54, 0.06);
  --font-serif: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--sage-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.topbar {
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--sage-dark);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sage-dark);
  color: #FAF7F2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 700;
}
.topbar-trust {
  font-size: 0.82rem;
  color: var(--sage-mid);
  background: var(--sage-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.hero {
  padding: 44px 0 28px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
}
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 10px;
}
h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--sage-dark);
  margin: 0 0 12px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.95rem, 4vw, 2.85rem); font-weight: 600; }
h2 { font-size: clamp(1.45rem, 2.8vw, 2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 56ch;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.pill {
  font-size: 0.84rem;
  color: var(--sage-dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  font-weight: 500;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}
.card-warm {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease;
  font-family: var(--font-sans);
}
.btn:active { transform: scale(0.99); }
.btn-primary {
  background: var(--sage-dark);
  color: #FAF7F2;
  width: 100%;
}
.btn-primary:hover { background: #1A3329; text-decoration: none; }
.btn-accent {
  background: var(--terracotta);
  color: #FFFFFF;
  width: 100%;
}
.btn-accent:hover { background: #9F4E37; text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--sage-dark);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-warm); text-decoration: none; }

/* Quiz Shell */
.quiz-progress-wrap {
  margin-bottom: 18px;
}
.quiz-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.quiz-progress-track {
  height: 8px;
  background: var(--surface-warm);
  border-radius: 999px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--sage-mid);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.quiz-options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.quiz-option {
  width: 100%;
  text-align: left;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.quiz-option:hover, .quiz-option.selected {
  border-color: var(--sage-dark);
  background: var(--sage-soft);
}
.quiz-option small {
  display: block;
  color: var(--muted);
  font-size: 0.83rem;
  margin-top: 2px;
}

/* Results & Checkout */
.hidden { display: none !important; }

.profile-banner {
  background: var(--sage-dark);
  color: #FAF7F2;
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 24px;
}
.profile-banner h2, .profile-banner h3 { color: #FAF7F2; }
.profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.metric-box {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
}
.metric-label { font-size: 0.78rem; opacity: 0.82; }
.metric-val { font-size: 1.15rem; font-weight: 700; margin-top: 2px; }

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}
.plan-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  background: var(--bg);
  position: relative;
}
.plan-card.active {
  border-color: var(--sage-dark);
  background: var(--sage-soft);
}
.plan-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--terracotta);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.plan-price {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--sage-dark);
}

.bump-box {
  border: 2px dashed var(--terracotta);
  background: var(--terracotta-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 18px 0;
}
.bump-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.bump-label input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--terracotta);
  flex-shrink: 0;
}

.input-field {
  width: 100%;
  padding: 13px 14px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: #fff;
  color: var(--ink);
  margin-bottom: 12px;
}
.input-field:focus {
  outline: none;
  border-color: var(--sage-dark);
}

.anti-trap-box {
  background: var(--sage-soft);
  border: 1px solid #C9DDD3;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--sage-dark);
  margin-top: 16px;
}

/* Member PWA */
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.day-tile {
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sage-dark);
}
.day-tile.active {
  border-color: var(--sage-dark);
  background: var(--sage-soft);
}
.day-tile.done {
  background: var(--sage-dark);
  color: #FAF7F2;
  border-color: var(--sage-dark);
}

.pacer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--surface-warm);
  border-radius: var(--radius-lg);
  margin: 16px 0;
}
.pacer-circle {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, #5A8C77 0%, #234236 100%);
  color: #FAF7F2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform 1.2s ease-in-out;
  box-shadow: 0 10px 28px rgba(35, 66, 54, 0.22);
}
.pacer-circle.inhale { transform: scale(1.18); }
.pacer-circle.hold { transform: scale(1.18); }
.pacer-circle.exhale { transform: scale(0.92); }

.step-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface);
}
.step-card.active-step {
  border-color: var(--sage-dark);
  background: var(--sage-soft);
}

.footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 28px 0 40px;
  font-size: 0.86rem;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .profile-metrics { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .days-grid { grid-template-columns: repeat(4, 1fr); }
  .topbar-trust { display: none; }
}
