/* =========================================================================
   CalmDose — Medication List & Doctor-Visit Prep
   Design direction 1b: "One calm page" (Nunito). Tokens from the build spec.
   ========================================================================= */

/* Self-hosted Nunito (variable, latin subset) — the whole page is first-party,
   so nothing (not even a font) is fetched from a third party. Rebuild by curl-ing
   the Google Fonts css2 URL for Nunito and re-saving the latin woff2. */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/nunito-var.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  /* Brand */
  --mist:        #EDF1EC;  /* background                 */
  --sage:        #7D9B86;  /* decorative fills / accents */
  --sage-text:   #557260;  /* sage as TEXT — AA on white/mist/field/pill (>=4.5:1) */
  --pine:        #334D42;  /* primary / headings         */
  --ink:         #212B27;  /* body text                  */
  --honey:       #E4A94F;  /* primary action accent      */
  --on-honey:    #2C4239;  /* label on honey — AA 5.18:1 */

  /* Supporting */
  --card:         #ffffff;
  --field:        #F4F7F3;
  --field-border: #D3DFD6;
  --muted:        #59685f;
  --muted-2:      #4b5a51;
  --pill-bg:      #EAF0EA;
  --dash:         #B9C9BD;
  --dash-soft:    #C0CFC4;
  --placeholder:  #647B6A;  /* readable placeholder — AA on white, ~4.2:1 on field */
  --remove:       #8A6D48;  /* remove-link — AA 4.81:1 on white */

  /* Shape & depth */
  --r-card:  22px;
  --r-field: 14px;
  --shadow-card:  0 6px 18px rgba(51, 77, 66, .06);
  --shadow-honey: 0 10px 22px rgba(228, 169, 79, .40);
  --shadow-lift:  0 20px 55px rgba(51, 77, 66, .18);

  --maxw: 468px;   /* calm single-column width */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Accessibility helpers -------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px;
  z-index: 20; padding: 10px 16px;
  background: var(--pine); color: #fff; border-radius: 10px;
  font-weight: 800; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Field focus mirrors the design's soft ring (pointer focus) … */
.input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 4px rgba(125, 155, 134, .18);
}
/* … but keyboard focus gets the same strong, high-contrast indicator as buttons (WCAG 2.4.11) */
.input:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 1px;
  border-color: var(--pine);
}
.input::placeholder { color: var(--placeholder); opacity: 1; }

/* ---- View plumbing ----------------------------------------------------- */
.view { width: 100%; }
[hidden] { display: none !important; }

.screen,
.intro {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 20px 30px;
}

/* =========================================================================
   INTRO
   ========================================================================= */
.view--intro { min-height: 100dvh; }

.intro {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: 40px;
  padding-bottom: 34px;
}

.brand {
  display: flex; align-items: center; justify-content: center;
  gap: 11px; margin-bottom: auto;
}
.brand__mark {
  width: 32px; height: 32px; border-radius: 10px; background: var(--pine);
  display: inline-flex; align-items: center; justify-content: center;
}
.brand__dot { width: 13px; height: 13px; border-radius: 999px; background: var(--honey); }
.brand__name { font-size: 20px; font-weight: 800; color: var(--pine); letter-spacing: -.01em; }

.intro__hero { margin: 36px 0; text-align: center; }
.intro__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 8vw, 31px);
  line-height: 1.18; font-weight: 800; color: var(--pine);
  letter-spacing: -.02em; text-wrap: balance;
}
.intro__lede {
  margin: 0; font-size: 18px; line-height: 1.55; color: #3f4e46; text-wrap: pretty;
}

.reassure {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--card); border-radius: 18px;
  padding: 16px 18px; box-shadow: var(--shadow-card);
  margin-top: auto;
}
.reassure__icon {
  flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--pill-bg);
  display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.reassure__glyph { width: 10px; height: 10px; border-radius: 3px; background: var(--sage); }
.reassure__text { margin: 0; font-size: 16px; line-height: 1.5; color: #3f4e46; }
.reassure__text b { color: var(--pine); }

.intro__foot {
  margin: 13px 0 0; text-align: center;
  font-size: 15px; font-weight: 700; color: var(--sage-text);
}
/* 1a: the intro CTA sits 20px below the reassurance card (form submit keeps 4px) */
.intro .btn--primary { margin-top: 20px; }

/* Secondary waitlist entry — deliberately quiet so it never competes with "Build my sheet" */
.intro-wl { margin-top: 16px; text-align: center; }
.intro-wl__prompt { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.intro-wl__toggle {
  background: none; border: none; padding: 6px 4px; margin: 0;
  font-family: inherit; font-size: 14px; font-weight: 800; color: var(--sage-text);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
  white-space: nowrap; border-radius: 8px;
}
.intro-wl__toggle:hover { color: var(--pine); }
.intro-wl__panel { margin-top: 12px; }
.intro-wl__form {
  display: flex; gap: 10px; flex-wrap: wrap;
  max-width: 420px; margin: 0 auto;
}
.intro-wl__form .input { flex: 1 1 200px; min-height: 52px; text-align: left; }
.intro-wl__form .btn { flex: 1 1 160px; width: auto; }
.intro-wl__msg { margin: 10px 0 0; font-size: 14.5px; font-weight: 700; text-wrap: pretty; }
.intro-wl__msg--err { color: #A8432F; }
.intro-wl__msg--ok  { color: var(--sage-text); }

/* SEO supporting copy, below the intro fold */
.seo {
  max-width: 640px; margin: 8px auto 0;
  padding: 34px 22px 44px; color: var(--muted);
}
.seo__title {
  margin: 0 0 14px; font-size: 21px; font-weight: 800;
  color: var(--pine); letter-spacing: -.01em; line-height: 1.25;
}
.seo p { margin: 0 0 14px; font-size: 15.5px; line-height: 1.6; }
.seo b { color: var(--pine); font-weight: 800; }

/* =========================================================================
   FORM
   ========================================================================= */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.link-back {
  font-family: inherit; font-size: 16px; font-weight: 800; color: var(--sage-text);
  background: none; border: none; padding: 6px 4px; cursor: pointer;
  border-radius: 8px;
}
.link-back:hover { color: var(--pine); }

.saved {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; color: var(--sage-text);
}
.saved__dot { width: 9px; height: 9px; border-radius: 999px; background: var(--sage); }

.screen__head { margin-bottom: 18px; }
.screen__title {
  margin: 0 0 8px; font-size: 28px; font-weight: 800; color: var(--pine);
  letter-spacing: -.02em; line-height: 1.15;
}
.screen__sub { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); }

/* =========================================================================
   MULTI-STEP: progress + chips + step navigation
   ========================================================================= */
.topbar--steps { justify-content: space-between; }   /* home button (left) + "Saved" chip (right) */

/* Home = explicit house icon + "Home" label. Appears on the form and sheet screens
   (not the welcome — it IS home). A filled white pill so it reads as its own control,
   clearly distinct from the outlined step "Back" button in the step footer. */
.home {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; box-sizing: border-box;   /* comfortable mobile tap target */
  margin: 0; padding: 8px 17px 8px 14px;
  background: var(--card); border: 1.5px solid var(--field-border);
  border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: 16px; font-weight: 800; color: var(--pine); text-decoration: none;
}
.home:hover { background: var(--pill-bg); border-color: var(--sage); color: var(--pine); }
.home__icon { flex: none; width: 20px; height: 20px; }

.steps-head { margin-bottom: 22px; }
.steps-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 9px;
}
.steps-count { font-size: 15px; font-weight: 800; color: var(--sage-text); white-space: nowrap; }
.steps-name  { font-size: 15px; font-weight: 700; color: var(--pine); text-align: right; }

.progress {
  height: 10px; border-radius: 999px; background: #DDE6DD; overflow: hidden;
}
.progress__fill {
  display: block; height: 100%; width: 33.333%;
  background: var(--sage-text); border-radius: 999px;
  transition: width .25s ease;
}

.steps-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  flex: 1 1 auto;   /* grow to fill a row, but never shrink below the label (wraps instead) */
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
  padding: 9px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--pill-bg); color: var(--sage-text);
  border: 1.5px solid transparent;
}
.chip__n {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 999px;
  background: rgba(85, 114, 96, .18); color: var(--sage-text);
  font-size: 11px; font-weight: 800;
}
.chip[aria-current="step"] { background: var(--pine); color: #EDF1EC; }
.chip[aria-current="step"] .chip__n { background: rgba(255, 255, 255, .22); color: #fff; }
.chip:hover { border-color: var(--sage); }

.step[hidden] { display: none !important; }
.step:not([hidden]) { animation: stepIn .2s ease both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.step-nav { display: flex; gap: 12px; margin-top: 22px; }
.step-nav .btn--ghost   { flex: 1 1 0; }
.step-nav .btn--primary { flex: 2 1 0; width: auto; }

/* .btn.btn--ghost (specificity 0,2,0) so the outline wins over .btn { border: none } */
.btn.btn--ghost {
  box-sizing: border-box; text-align: center;
  font-size: 18px; font-weight: 800; color: var(--pine);
  background: transparent; border: 2px solid #C7D3C9; border-radius: 16px; padding: 14px 16px;
}
.btn.btn--ghost:hover { border-color: var(--sage); background: rgba(125, 155, 134, .08); color: var(--pine); }

.step-skip {
  display: block; margin: 14px auto 0; padding: 8px 10px;
  background: none; border: none; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 800; color: var(--sage-text);
  text-decoration: underline; text-underline-offset: 3px;
}
.step-skip:hover { color: var(--pine); }

/* Cards (each fieldset) */
.card {
  background: var(--card);
  border: none; border-radius: var(--r-card);
  padding: 24px 22px; margin: 0 0 18px;
  box-shadow: var(--shadow-card);
}
/* Card heading — a normal block <h2> so it sits inside the card padding,
   left-aligned with the description and field (no <legend> straddle quirk). */
.card__title {
  margin: 0 0 8px; font-size: 22px; font-weight: 800; color: var(--pine); letter-spacing: -.01em;
}
.card__note { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: var(--muted); }

.pill {
  font-size: 13px; font-weight: 800; color: var(--sage-text);
  background: var(--pill-bg); padding: 4px 11px; border-radius: 999px;
}

/* Layout helpers */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack--tight { gap: 12px; }
.stack--meds { gap: 16px; }   /* 1b: 16px between example, med rows, and add button */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Fields */
.field { display: block; }
.field-wrap { display: block; }
.field__label {
  display: block; font-size: 16px; font-weight: 700; color: var(--pine); margin: 0 0 7px;
}
.field__label .opt { color: var(--muted); font-weight: 700; }
/* Gentle inline validation message (shown only on submit) — AA on the white card */
.field-error { margin: 7px 0 0; font-size: 13.5px; font-weight: 700; line-height: 1.4; color: #A8432F; }

.input {
  width: 100%; box-sizing: border-box;
  font-family: inherit; font-size: 18px; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--field-border);
  border-radius: var(--r-field); padding: 15px 16px;
}
.textarea { line-height: 1.5; resize: vertical; min-height: 90px; }
/* 1b textarea heights: allergies shorter, feelings taller (invites longer text) */
#f-allergies { min-height: 84px; }
#f-feelings  { min-height: 96px; }

/* Example medication (guide) */
.example {
  position: relative; opacity: .62;
  background: var(--field); border: 1.5px dashed var(--dash-soft);
  border-radius: 16px; padding: 16px 16px 15px;
}
.example__tag {
  position: absolute; top: 12px; right: 14px;
  font-size: 11.5px; font-weight: 800; color: var(--sage-text);
  letter-spacing: .06em; text-transform: uppercase;
}
.example__name { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 5px; }
.example__detail { font-size: 15.5px; color: var(--muted-2); line-height: 1.5; }

/* A medication entry */
.med { }
.med__head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.eyebrow {
  font-size: 13.5px; font-weight: 800; color: var(--sage-text);
  text-transform: uppercase; letter-spacing: .05em;
}
.link-remove {
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--remove);
  background: none; border: none; padding: 4px 6px; cursor: pointer; border-radius: 8px;
}
.link-remove:hover { color: #6f5636; text-decoration: underline; }

/* Question rows */
.q-row { display: flex; align-items: center; gap: 10px; }
.q-row .input { flex: 1 1 auto; }
.q-remove {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--field); border: 1.5px solid var(--field-border);
  color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.q-remove:hover { border-color: var(--sage); color: var(--pine); }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  font-family: inherit; cursor: pointer; border: none; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}

.btn--primary {
  width: 100%; box-sizing: border-box; text-align: center;
  font-size: 20px; font-weight: 800; color: var(--on-honey);
  background: var(--honey); border-radius: 16px; padding: 18px;
  box-shadow: var(--shadow-honey);
}
.btn--primary:hover { filter: brightness(1.03); }
.btn--primary:active { transform: translateY(1px); }
.btn--xl { margin-top: 4px; }

.btn--dashed {
  gap: 10px; width: 100%; box-sizing: border-box;
  font-size: 17px; font-weight: 800; color: var(--pine);
  background: var(--field); border: 2px dashed var(--dash);
  border-radius: 14px; padding: 15px;
}
.btn--dashed:hover { border-color: var(--sage); }

.plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px;
  background: var(--honey); color: #fff; font-weight: 800; font-size: 18px; line-height: 1;
}
.plus--sm { width: 22px; height: 22px; font-size: 15px; }

.link-add {
  display: inline-flex; align-items: center; gap: 9px; align-self: flex-start;
  background: none; border: none; padding: 8px 0; margin-top: 12px;
  font-family: inherit; font-size: 16px; font-weight: 800; color: var(--pine); cursor: pointer;
}
.link-add:hover { text-decoration: underline; }

.form__foot,
.intro__foot { text-wrap: pretty; }
.form__foot {
  margin: 8px 0 0; text-align: center;
  font-size: 15px; font-weight: 700; color: var(--sage);
}

/* =========================================================================
   SHEET (preview + print)
   ========================================================================= */
.view--sheet {
  max-width: 720px; margin: 0 auto; padding: 22px 20px 40px;
}
.sheet-tools {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.sheet-tools__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn--print {
  width: auto; font-size: 17px; padding: 13px 20px; gap: 9px;
}
.print-ico { font-size: 18px; }

.sheet {
  background: #fff; color: var(--ink);
  border-radius: var(--r-card); box-shadow: var(--shadow-lift);
  padding: 40px 42px; outline: none;
}
.sheet__head {
  display: flex; flex-wrap: wrap; gap: 16px 28px;
  align-items: flex-start; justify-content: space-between;
  padding-bottom: 20px; margin-bottom: 22px;
  border-bottom: 2px solid #E3EAE3;
}
.sheet__title h1 {
  margin: 0 0 4px; font-size: 24px; font-weight: 900; color: var(--pine); letter-spacing: -.01em;
}
.sheet__for { margin: 0; font-size: 15px; color: var(--muted); }
.sheet__for b { color: var(--ink); font-weight: 800; }

.sheet__meta {
  margin: 0; display: grid; grid-template-columns: auto auto; gap: 4px 14px;
  font-size: 13.5px;
}
.sheet__meta dt { color: var(--sage-text); font-weight: 800; }
.sheet__meta dd { margin: 0; color: var(--ink); font-weight: 700; text-align: right; }

.sheet__section { margin: 0 0 22px; }
.sheet__section:last-of-type { margin-bottom: 0; }
.sheet__h3 {
  margin: 0 0 12px; font-size: 15px; font-weight: 900; color: var(--pine);
  text-transform: uppercase; letter-spacing: .06em;
}

.med-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.med-table th {
  text-align: left; font-size: 11.5px; font-weight: 800; color: var(--sage-text);
  text-transform: uppercase; letter-spacing: .05em;
  padding: 0 12px 8px 0; border-bottom: 1.5px solid #E3EAE3;
}
.med-table td {
  padding: 11px 12px 11px 0; vertical-align: top;
  border-bottom: 1px solid #EEF2EE; line-height: 1.4;
}
.med-table tr:last-child td { border-bottom: none; }
.med-table .m-name { font-weight: 800; color: var(--ink); }
.med-table .m-empty { color: var(--muted); font-weight: 400; }

.sheet__text { margin: 0; font-size: 15.5px; line-height: 1.55; white-space: pre-wrap; }

.q-list { margin: 0; padding-left: 22px; }
.q-list li { font-size: 15.5px; line-height: 1.5; margin-bottom: 8px; }
.q-list li:last-child { margin-bottom: 0; }

.sheet__empty { font-size: 15px; color: var(--muted); font-style: italic; }

.sheet__disclaimer {
  margin-top: 26px; padding-top: 18px; border-top: 1.5px solid #E3EAE3;
  font-size: 12px; line-height: 1.55; color: var(--muted);
}
.sheet__disclaimer b { color: var(--pine); }

/* =========================================================================
   WAITLIST
   ========================================================================= */
.waitlist {
  margin: 0 0 20px; background: var(--pine); color: #EAF0EA;
  border-radius: var(--r-card); padding: 26px 24px;
}
.waitlist__title { margin: 0 0 8px; font-size: 22px; font-weight: 800; color: #fff; line-height: 1.2; }
.waitlist__copy { margin: 0 0 18px; font-size: 15.5px; line-height: 1.55; color: #D6E1D8; }
.waitlist__copy b { color: #fff; font-weight: 800; }
.waitlist__form { display: flex; gap: 10px; flex-wrap: wrap; }
.waitlist__form .input { flex: 1 1 220px; min-height: 52px; background: #fff; border-color: transparent; }
.waitlist__form .btn { flex: 1 1 200px; width: auto; }   /* large & thumb-friendly; fills the row on mobile */
.waitlist__note { margin: 12px 0 0; font-size: 13px; color: #C4D6C8; }
.waitlist__error {
  margin: 10px 0 0; font-size: 14px; font-weight: 700; color: #FBD9B0;
}
.waitlist__skip {
  display: inline-block; margin-top: 14px;
  background: none; border: none; padding: 6px 4px;
  font-family: inherit; font-size: 14.5px; font-weight: 700; color: #A9C0AE;
  cursor: pointer; text-decoration: underline; border-radius: 8px;
}
.waitlist__skip:hover { color: #fff; }

.waitlist--done .waitlist__body { text-align: center; }

/* =========================================================================
   SITE FOOTER
   ========================================================================= */
.site-foot {
  max-width: 640px; margin: 0 auto; padding: 30px 22px 46px; text-align: center;
}
.disclaimer { margin: 0 0 12px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.disclaimer b { color: var(--pine); }
.site-foot__brand { margin: 0; font-size: 13px; font-weight: 700; color: var(--sage-text); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 420px) {
  .grid-2 { grid-template-columns: 1fr; }
  .sheet { padding: 28px 22px; }
  .sheet__meta { grid-template-columns: 1fr; }
  .sheet__meta dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   PRINT — only the sheet, clean on white, one page where possible
   ========================================================================= */
@media print {
  @page { margin: 14mm; }

  html, body { background: #fff !important; }

  /* Hide everything except the sheet */
  .no-print,
  #view-intro,
  #view-form,
  .site-foot,
  .sheet-tools,
  .waitlist { display: none !important; }

  .view--sheet { max-width: none; margin: 0; padding: 0; }

  .sheet {
    box-shadow: none !important; border-radius: 0 !important;
    padding: 0 !important; color: #000 !important;
  }
  /* Structural labels/headers must stay dark on paper (screen sage is too light for B&W) */
  .med-table th, .sheet__meta dt { color: #000 !important; }
  .med-table .m-empty { color: #555 !important; }
  /* Hairline borders would vanish in print — give them real ink */
  .sheet__head { border-color: #000 !important; }
  .med-table th { border-bottom-color: #000 !important; }
  .med-table td { border-bottom-color: #999 !important; }
  .sheet__disclaimer { border-top-color: #000 !important; }

  /* Keep rows/items and each heading with its content — but NOT whole sections
     (a long table/paragraph shouldn't be shoved to the next page as one block). */
  .med-table tr, .q-list li { break-inside: avoid; }
  .sheet__h3 { break-after: avoid; }
  .sheet__disclaimer { break-inside: avoid; }
}

/* =========================================================================
   LANDING PAGE (index.html) — mobile-first
   ========================================================================= */
.lp-container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---- Top bar ---- */
.lp-topbar {
  max-width: 1080px; margin: 0 auto; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.lp-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lp-brand__mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--pine);
  display: inline-flex; align-items: center; justify-content: center;
}
.lp-brand__dot { width: 12px; height: 12px; border-radius: 999px; background: var(--honey); }
.lp-brand__name { font-size: 18px; font-weight: 800; color: var(--pine); letter-spacing: -.01em; }
.lp-topbar__link {
  font-size: 15px; font-weight: 800; color: var(--sage-text); text-decoration: none;
  padding: 8px 6px; border-radius: 8px;
}
.lp-topbar__link:hover { color: var(--pine); }

/* ---- Hero ---- */
.lp-hero { padding: 10px 20px 48px; }
.lp-hero__inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 34px; text-align: center;
}
.lp-hero__title {
  margin: 0 0 16px; font-size: clamp(32px, 8.5vw, 52px); line-height: 1.08;
  font-weight: 800; color: var(--pine); letter-spacing: -.025em; text-wrap: balance;
}
.lp-hero__sub {
  margin: 0 auto 26px; max-width: 540px;
  font-size: clamp(17px, 4.4vw, 20px); line-height: 1.5; color: #3f4e46; text-wrap: pretty;
}
/* Hero CTA: inline email form (primary) + quieter "Try the free tool" (secondary) */
.lp-hero__cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lp-hero-form { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; max-width: 480px; margin: 0; }
.lp-hero-form .input { flex: 1 1 210px; min-height: 54px; }
.lp-hero-form .btn { flex: 1 1 150px; width: auto; }
.lp-hero-msg { width: 100%; max-width: 480px; margin: 0; font-size: 14.5px; font-weight: 700; text-align: center; text-wrap: pretty; }
.lp-hero-msg--err { color: #A8432F; }          /* AA on mist (5.24:1) */
.lp-hero-msg--ok  { color: var(--sage-text); }
.lp-cta-tool { width: auto; }
.lp-cta-note { margin: 14px 0 0; font-size: 14px; font-weight: 700; color: var(--sage-text); }

@media (min-width: 820px) {
  .lp-hero { padding: 24px 20px 64px; }
  .lp-hero__inner { flex-direction: row; align-items: center; text-align: left; gap: 52px; }
  .lp-hero__copy { flex: 1 1 0; }
  .lp-hero__sub { margin-left: 0; margin-right: 0; }
  .lp-hero__cta { align-items: flex-start; }
  .lp-hero-msg { text-align: left; }
  .lp-cta-note { text-align: left; }
  .lp-hero__visual { flex: 0 0 auto; }
}

/* ---- Stylized phone mockup (placeholder for a real screenshot) ---- */
.phone {
  width: min(266px, 74vw); aspect-ratio: 10 / 20; margin: 0 auto;
  background: #232F29; border-radius: 44px; padding: 12px;
  box-shadow: 0 30px 60px rgba(51, 77, 66, .22), 0 6px 16px rgba(51, 77, 66, .12);
}
.phone__screen {
  height: 100%; background: var(--mist); border-radius: 33px; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
}
.phone__notch {
  width: 42%; height: 6px; border-radius: 999px; background: rgba(51, 77, 66, .18);
  margin: 10px auto 0;
}
.phone__app { padding: 16px 15px 15px; display: flex; flex-direction: column; gap: 11px; flex: 1; text-align: left; }
.phone__greet { font-size: 12.5px; font-weight: 800; color: var(--sage-text); }
.phone__title { font-size: 21px; font-weight: 800; color: var(--pine); line-height: 1.1; margin-top: 1px; }
.phone__progress { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.p-dose {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border-radius: 16px; padding: 12px 13px;
  box-shadow: 0 4px 12px rgba(51, 77, 66, .06);
}
.p-dose__check {
  flex: none; width: 26px; height: 26px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.p-dose--done .p-dose__check { background: #DCEAE0; color: var(--pine); }
.p-dose--next { border: 1.5px solid rgba(228, 169, 79, .55); }
.p-dose--next .p-dose__check { background: #F6E7CB; color: #A8792E; font-size: 18px; }
.p-dose__name { font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.15; }
.p-dose__meta { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.p-dose--done .p-dose__name { color: #6b7a71; }
.phone__taken {
  margin-top: auto; text-align: center; background: var(--honey); color: var(--on-honey);
  font-weight: 800; font-size: 16px; padding: 13px; border-radius: 15px;
  box-shadow: 0 8px 18px rgba(228, 169, 79, .38);
}

/* ---- Join the waitlist section ---- */
.lp-join { padding: 8px 20px 8px; }
.lp-join__card {
  max-width: 580px; margin: 0 auto; background: var(--pine); color: #EAF0EA;
  border-radius: var(--r-card); padding: 36px 28px; text-align: center;
}
.lp-join__card h2 { margin: 0 0 10px; font-size: clamp(24px, 6vw, 30px); font-weight: 800; color: #fff; line-height: 1.15; }
.lp-join__card p { margin: 0 0 20px; font-size: 16px; line-height: 1.55; color: #D6E1D8; }
.lp-wl-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 470px; margin: 0 auto; }
.lp-wl-form .input { flex: 1 1 220px; min-height: 54px; background: #fff; border-color: transparent; text-align: left; }
.lp-wl-form .btn { flex: 1 1 180px; width: auto; }
.lp-wl-note { margin: 14px 0 0; font-size: 13px; color: #C4D6C8; }
.lp-wl-msg { margin: 14px 0 0; font-size: 15.5px; font-weight: 700; text-wrap: pretty; }
.lp-wl-msg--err { color: #FBD9B0; }
.lp-wl-msg--ok  { color: #fff; }

/* ---- Footer ---- */
.lp-footer { max-width: 640px; margin: 0 auto; padding: 44px 20px 56px; text-align: center; }
.lp-footer__brand { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 16px; font-weight: 800; color: var(--pine); }
.lp-footer__disc { margin: 0 0 14px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.lp-footer__links { margin: 0; font-size: 14px; font-weight: 700; }
.lp-footer__links a { color: var(--sage-text); }
.lp-footer__links a:hover { color: var(--pine); }

/* ---- Shared section scaffold ---- */
.lp-section { max-width: 1080px; margin: 0 auto; padding: 52px 20px; }
.lp-section__head { max-width: 640px; margin: 0 auto 32px; text-align: center; }
.lp-section__title {
  margin: 0 0 12px; font-size: clamp(26px, 6.2vw, 36px); line-height: 1.15;
  font-weight: 800; color: var(--pine); letter-spacing: -.02em; text-wrap: balance;
}
.lp-section__sub { margin: 0; font-size: clamp(16px, 4vw, 18px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }

/* ---- 2 · Problem vignettes ---- */
.lp-vignettes { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .lp-vignettes { grid-template-columns: repeat(3, 1fr); } }
.lp-vignette { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow-card); }
.lp-vignette__tag {
  display: inline-block; margin-bottom: 12px; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sage-text); background: var(--pill-bg);
}
.lp-vignette__text { margin: 0; font-size: 16px; line-height: 1.55; color: #3f4e46; }
.lp-vignette__text b { color: var(--pine); font-weight: 800; }
.lp-problem__close {
  max-width: 620px; margin: 30px auto 0; text-align: center;
  font-size: clamp(17px, 4.4vw, 20px); line-height: 1.5; font-weight: 700; color: var(--pine); text-wrap: pretty;
}

/* ---- 3 · How it works (pillars) ---- */
.lp-pillars { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .lp-pillars { grid-template-columns: repeat(3, 1fr); } }
.lp-pillar {
  background: #fff; border-radius: 22px; padding: 24px 22px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 14px;
}
.lp-pillar__visual { min-height: 56px; display: flex; align-items: center; }
.lp-pillar__title { margin: 0; font-size: 20px; font-weight: 800; color: var(--pine); }
.lp-pillar__desc { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); }

.lp-notif { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--mist); border-radius: 14px; padding: 10px 12px; }
.lp-notif__app { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--pine); display: inline-flex; align-items: center; justify-content: center; }
.lp-notif__dot { width: 12px; height: 12px; border-radius: 999px; background: var(--honey); }
.lp-notif__title { font-size: 11px; font-weight: 800; color: var(--sage-text); text-transform: uppercase; letter-spacing: .04em; }
.lp-notif__text { font-size: 14px; font-weight: 700; color: var(--ink); }

.lp-logrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: var(--mist); border-radius: 14px; padding: 11px 12px; }
.lp-logrow__name { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.lp-logrow__meta { font-size: 12.5px; color: var(--muted); }
.lp-logrow__btn { flex: none; background: var(--honey); color: var(--on-honey); font-size: 13px; font-weight: 800; padding: 8px 13px; border-radius: 10px; }

.lp-lock { display: flex; align-items: center; gap: 11px; width: 100%; background: var(--mist); border-radius: 14px; padding: 11px 12px; }
.lp-lock__ico { flex: none; width: 30px; height: 30px; color: var(--sage-text); }
.lp-lock__t { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.lp-lock__s { font-size: 12.5px; color: var(--muted); }

/* ---- 4 · Free tool ---- */
.lp-freetool {
  background: #fff; border: 1.5px solid rgba(228, 169, 79, .45); border-radius: 26px;
  padding: 32px 28px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px;
}
@media (min-width: 780px) {
  .lp-freetool { flex-direction: row; text-align: left; gap: 44px; padding: 36px 40px; }
  .lp-freetool__text { flex: 1 1 0; }
  .lp-freetool__visual { flex: 0 0 auto; }
}
.lp-freetool__eyebrow {
  display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #7A560E; background: #F6E7CB;
}
.lp-freetool__title { margin: 0 0 12px; font-size: clamp(22px, 5.2vw, 28px); font-weight: 800; color: var(--pine); line-height: 1.2; letter-spacing: -.01em; }
.lp-freetool__copy { margin: 0 0 20px; font-size: 16px; line-height: 1.55; color: #3f4e46; }
.lp-freetool__copy b { color: var(--pine); font-weight: 800; }
.lp-freetool__btn { width: auto; }

.lp-sheet-mini {
  width: 184px; background: #fff; border: 1.5px solid #E3EAE3; border-radius: 14px;
  padding: 16px 15px; box-shadow: 0 12px 26px rgba(51, 77, 66, .12);
  display: flex; flex-direction: column; gap: 10px;
}
.lp-sheet-mini__h { height: 12px; width: 60%; border-radius: 4px; background: var(--pine); margin-bottom: 2px; }
.lp-sheet-mini__row { display: flex; gap: 8px; align-items: center; }
.lp-sheet-mini__row span:first-child { flex: none; width: 26px; height: 8px; border-radius: 3px; background: var(--sage); }
.lp-sheet-mini__row span:last-child { flex: 1; height: 8px; border-radius: 3px; background: #DCE4DD; }

/* ---- 6 · Mission ---- */
.lp-mission__inner { max-width: 680px; margin: 0 auto; text-align: center; }
.lp-mission__lead { margin: 16px 0 16px; font-size: clamp(18px, 4.4vw, 22px); line-height: 1.45; font-weight: 800; color: var(--pine); text-wrap: pretty; }
.lp-mission__body { margin: 0; font-size: 16.5px; line-height: 1.65; color: #3f4e46; text-wrap: pretty; }
