:root {
  --paper: #f4f1e9;
  --panel: #fffdfa;
  --ink: #151513;
  --muted: #626660;
  --line: #d5d4cd;
  --line-dark: #a8aaa5;
  --red: #b91422;
  --red-dark: #8f0e19;
  --steel: #48636d;
  --green: #235c42;
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'PT Serif', Georgia, serif;
  --condensed: 'Oswald', 'Arial Narrow', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-height: 100%; background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 1px), rgba(21, 21, 19, .035) 50%, transparent calc(50% + 1px)),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, .option, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[tabindex='-1']:focus { outline: none; }

.site-header,
.site-footer {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header { min-height: 72px; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-family: var(--serif); font-size: 24px; font-weight: 700; text-decoration: none; }
.brand span { color: var(--red); }
.header-note { color: var(--muted); font-family: var(--condensed); font-size: 12px; font-weight: 600; text-transform: uppercase; }

.survey-shell {
  width: min(100% - 32px, 760px);
  min-height: calc(100vh - 152px);
  margin: 0 auto;
  padding: 40px 0 56px;
  display: flex;
  flex-direction: column;
}

.progress-region { margin-bottom: 42px; }
.progress-copy { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; color: var(--muted); font-family: var(--condensed); font-size: 12px; font-weight: 600; text-transform: uppercase; }
.progress-track { height: 5px; overflow: hidden; background: #deddd7; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--red); transition: width .3s ease; }

.screen { flex: 1; }
.eyebrow { margin: 0 0 14px; color: var(--red); font-family: var(--condensed); font-size: 13px; font-weight: 700; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: var(--serif); line-height: 1.08; }
h1 { max-width: 720px; font-size: clamp(34px, 7vw, 54px); }
h2 { font-size: clamp(29px, 5vw, 42px); }
.support { max-width: 620px; margin: 16px 0 0; color: var(--muted); font-size: 16px; }

.motivation-screen { max-width: 680px; }
.motivation-visual {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  background: var(--panel);
}
.motivation-app-preview { display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: center; }
.motivation-timer { aspect-ratio: 1; display: grid; place-items: center; border: 12px solid #d9d8d2; border-top-color: var(--red); border-right-color: var(--red); border-radius: 50%; text-align: center; }
.motivation-timer strong { display: block; font-family: var(--serif); font-size: 24px; line-height: 1; }
.motivation-timer span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.motivation-list { margin: 0; padding: 0; list-style: none; }
.motivation-list li { padding: 11px 0; border-top: 1px solid var(--line); }
.motivation-list li:first-child { border-top: 0; }
.motivation-products { display: grid; gap: 0; }
.motivation-product { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.motivation-product:first-child { border-top: 0; }
.motivation-product b { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--condensed); font-size: 12px; }
.motivation-product strong { display: block; }
.motivation-product span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.member-note { margin-top: 16px; color: var(--red-dark); font-family: var(--condensed); font-size: 12px; font-weight: 700; text-transform: uppercase; }

.options { display: grid; gap: 10px; margin-top: 30px; }
.option {
  width: 100%;
  min-height: 60px;
  padding: 15px 50px 15px 18px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 253, 250, .74);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.option:hover { border-color: var(--line-dark); transform: translateY(-1px); }
.option:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(72, 99, 109, .35); outline-offset: 2px; }
.option::after {
  content: '';
  width: 18px;
  height: 18px;
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  border: 1.5px solid var(--line-dark);
  border-radius: 50%;
}
.options.multi .option::after { border-radius: 3px; }
.option.selected { border-color: var(--ink); background: var(--panel); }
.option.selected::after { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 4px var(--panel); }
.options.multi .option.selected::after { box-shadow: inset 0 0 0 3px var(--panel); }
.option strong { display: block; margin-bottom: 2px; font-weight: 700; }

.gender-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.gender-card { min-width: 0; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); cursor: pointer; text-align: left; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.gender-card:hover { border-color: var(--line-dark); transform: translateY(-1px); }
.gender-card:focus-visible { outline: 3px solid rgba(72, 99, 109, .35); outline-offset: 2px; }
.gender-card::after { display: none; }
.gender-card img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; }
.gender-card span { display: block; padding: 14px 16px 16px; font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.gender-card.selected { border: 2px solid var(--red); box-shadow: 0 0 0 2px rgba(185, 20, 34, .08); }
.gender-card.selected span { padding: 13px 15px 15px; }
.gender-secondary { display: block; min-height: 44px; margin: 16px auto 0; padding: 8px 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.gender-secondary:hover, .gender-secondary:focus-visible { color: var(--ink); }

.measurement-panel { margin-top: 30px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #e9e7e0; }
.segmented button { min-height: 38px; padding: 0 15px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 700; }
.segmented button.active { background: var(--panel); color: var(--ink); box-shadow: 0 1px 5px rgba(21, 21, 19, .12); }
.measurement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.measurement-grid label, #accountForm > label:not(.check-row), .email-form > label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 600; }
.input-with-unit { position: relative; }
input[type='number'], input[type='email'], input[type='password'] {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 15px;
}
.input-with-unit input { padding-right: 48px; }
.input-with-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.bmi-readout { margin-top: 18px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--steel); font-weight: 700; }

.survey-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 34px; }
.icon-button { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--ink); cursor: pointer; font-size: 24px; }
.primary-button {
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 5px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-family: var(--condensed);
  font-weight: 700;
  text-transform: uppercase;
}
.primary-button:hover { background: #292925; }
.primary-button:disabled { cursor: wait; opacity: .55; }
.primary-button.full { width: 100%; margin-top: 18px; }
.status { min-height: 24px; margin: 12px 0 0; color: var(--red-dark); font-size: 14px; }

.generation { padding-top: 4vh; }
.generation-list { list-style: none; padding: 0; margin: 32px 0 0; }
.generation-list li { padding: 15px 0 15px 34px; position: relative; border-top: 1px solid var(--line); color: var(--muted); }
.generation-list li::before { content: ''; width: 12px; height: 12px; position: absolute; left: 3px; top: 20px; border: 2px solid var(--line-dark); border-radius: 50%; }
.generation-list li.active { color: var(--ink); }
.generation-list li.active::before { border-color: var(--red); border-top-color: transparent; animation: spin .7s linear infinite; }
.generation-list li.complete { color: var(--green); }
.generation-list li.complete::before { content: '✓'; width: auto; height: auto; top: 14px; border: 0; font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }

.email-form { max-width: 600px; margin-top: 28px; }
.email-form input[type='email'] { font-size: 17px; }
.check-row { display: flex; gap: 11px; align-items: flex-start; margin-top: 16px; color: var(--muted); font-size: 13px; cursor: pointer; }
.check-row input { width: 19px; height: 19px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--red); }
.privacy-note { margin-top: 18px; color: var(--muted); font-size: 12px; }

.offer-header { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.offer-header h1 { max-width: 650px; }
.offer-intro { max-width: 640px; margin: 18px 0 0; color: var(--muted); font-size: 17px; }
.offer-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 26px; margin-top: 30px; }
.value-stack { padding: 0; margin: 0; list-style: none; }
.value-stack li { position: relative; padding: 13px 0 13px 27px; border-bottom: 1px solid var(--line); }
.value-stack li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.plan-selector { display: grid; gap: 10px; }
.plan-option { padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; text-align: left; }
.plan-option.selected { border: 2px solid var(--red); padding: 17px; }
.plan-kicker { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.save-badge { color: var(--red); }
.plan-price { margin-top: 8px; font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.plan-detail { margin-top: 5px; color: var(--muted); font-size: 13px; }
.guarantee { display: grid; gap: 4px; margin: 16px 0; padding: 14px; border: 1px solid var(--line); text-align: center; }
.guarantee span { color: var(--muted); font-size: 14px; }
.purchase-button { width: 100%; margin-top: 12px; }
.renewal-copy { margin: 14px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.decline-button { display: block; margin: 20px auto 0; padding: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: underline; }

.free-screen { max-width: 620px; padding-top: 5vh; }
.free-list { margin: 26px 0; padding-left: 22px; }
.free-list li { margin: 10px 0; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(21, 21, 19, .72); }
.modal-backdrop[hidden] { display: none; }
.account-modal { width: min(100%, 520px); max-height: calc(100vh - 40px); overflow-y: auto; position: relative; padding: 30px; border-radius: 7px; background: var(--panel); box-shadow: 0 32px 90px rgba(0, 0, 0, .32); }
.modal-close { width: 44px; height: 44px; position: absolute; top: 12px; right: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 28px; }
.modal-intro { margin: 13px 0 20px; color: var(--muted); }
.account-modal .segmented { margin-bottom: 20px; }
#accountForm > label:not(.check-row) { margin-top: 13px; }
.field-note, .secure-note { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.terms-row { margin-top: 18px; }
.form-error { min-height: 20px; margin: 12px 0 0; color: var(--red-dark); font-size: 13px; }
.secure-note { margin-top: 15px; text-align: center; }

.site-footer { min-height: 80px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer a { margin-left: 14px; }
.noscript { padding: 20px; text-align: center; }

@media (max-width: 720px) {
  .site-header { min-height: 62px; }
  .header-note { display: none; }
  .survey-shell { min-height: calc(100vh - 132px); padding-top: 25px; }
  .progress-region { margin-bottom: 30px; }
  .measurement-grid, .offer-grid { grid-template-columns: 1fr; }
  .survey-actions { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent 0, var(--paper) 22%); }
  .primary-button { min-height: 52px; }
  .survey-actions .primary-button { flex: 1; }
  .account-modal { padding: 26px 20px; }
  .motivation-app-preview { grid-template-columns: 1fr; }
  .motivation-timer { width: 142px; margin: 0 auto; }
  .motivation-visual { padding: 20px; }
  .site-footer { align-items: flex-start; padding: 20px 0; }
}

@media (max-width: 420px) {
  .gender-options { gap: 8px; }
  .gender-card span { padding: 12px 12px 14px; font-size: 18px; }
  .gender-card.selected span { padding: 11px 11px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
