:root {
  --ink: #17211b;
  --muted: #607064;
  --line: #dce4dd;
  --paper: #fbfaf4;
  --white: #ffffff;
  --mint: #dff5e7;
  --green: #167a4a;
  --green-dark: #0d4f32;
  --coral: #f06f4f;
  --sky: #dceeff;
  --yellow: #ffe69a;
  --shadow: 0 18px 60px rgba(23, 33, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(220, 228, 221, 0.8);
  background: rgba(251, 250, 244, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--white);
  background: var(--green);
  font-weight: 900;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.header-nav a:hover {
  color: var(--green-dark);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  min-height: calc(100vh - 66px);
  padding: clamp(44px, 7vw, 92px) clamp(18px, 4vw, 56px) 42px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 11em;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.lead {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 12px 30px rgba(22, 122, 74, 0.22);
}

.button.secondary {
  color: var(--ink);
  background: var(--yellow);
}

.button.ghost {
  border-color: var(--line);
  background: var(--white);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
  margin: 36px 0 0;
}

.hero-metrics div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-metrics dt {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.hero-metrics dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  display: block;
  width: 100%;
  min-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 28px 42px rgba(23, 33, 27, 0.18));
}

.pain-section,
.category-section,
.proof-section,
.diagnosis-section {
  padding: clamp(56px, 8vw, 108px) clamp(18px, 4vw, 56px);
}

.section-heading {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-bottom: 28px;
}

.pain-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pain-grid article,
.category-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.pain-grid p,
.category-card p,
.proof-section p,
.diagnosis-copy p {
  color: var(--muted);
}

.diagnosis-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.2fr);
  gap: clamp(22px, 5vw, 60px);
  align-items: start;
  background: var(--mint);
  border-block: 1px solid var(--line);
}

.diagnosis-copy {
  position: sticky;
  top: 94px;
}

.diagnosis-card {
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid rgba(13, 79, 50, 0.16);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 900;
}

.check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.check-row:hover {
  border-color: rgba(22, 122, 74, 0.45);
  background: #f8fcf8;
}

.check-row input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--green);
}

.check-row strong,
.check-row small {
  display: block;
}

.check-row small {
  margin-top: 4px;
  color: var(--muted);
}

.result-panel {
  margin-top: 20px;
  padding: 20px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
}

.result-label {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 700;
}

#savingAmount {
  display: block;
  margin-top: 4px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

#resultMessage {
  color: rgba(255, 255, 255, 0.76);
}

.category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 34px;
  border-radius: 8px;
  background: var(--sky);
  color: #195d8f;
  font-weight: 900;
}

.category-card a {
  margin-top: auto;
  color: var(--green-dark);
  font-weight: 900;
}

.proof-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 60px);
  border-top: 1px solid var(--line);
}

.proof-list {
  display: grid;
  gap: 12px;
}

.proof-list div {
  padding: 20px;
  border-left: 5px solid var(--coral);
  border-radius: 8px;
  background: var(--white);
}

.proof-list span {
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
}

.proof-list strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.click-tracker {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 15;
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(23, 33, 27, 0.14);
  font-size: 13px;
}

.click-tracker strong {
  color: var(--green);
  font-size: 22px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 27, 0.54);
}

.modal-panel {
  position: relative;
  width: min(100%, 520px);
  padding: 28px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-size: 24px;
}

.signup-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.signup-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.signup-form input {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
}

.signup-form input:focus {
  outline: 3px solid rgba(22, 122, 74, 0.18);
  border-color: var(--green);
}

.form-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .hero,
  .diagnosis-section,
  .proof-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual img {
    min-height: 260px;
  }

  .pain-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagnosis-copy {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 12px;
  }

  .header-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .header-cta {
    margin-left: auto;
  }

  .hero {
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .hero-metrics,
  .pain-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .click-tracker {
    right: 12px;
    bottom: 12px;
  }

  .site-footer {
    display: grid;
  }
}
