/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white:        #FFFFFF;
  --warm-white:   #FAFAF7;
  --cream:        #F5F0E8;
  --cream-border: #EAE4D8;
  --sage:         #3E5E35;
  --sage-mid:     #567A4C;
  --sage-light:   #EAF0E6;
  --sage-pale:    #F2F7EF;
  --orange:       #F07A3C;
  --orange-light: #FEF0E8;
  --orange-dark:  #D4622A;
  --text-dark:    #1C1C1A;
  --text-mid:     #4A4A45;
  --text-muted:   #8A8A82;
  --border:       #E2DDD4;
  --border-focus: #3E5E35;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-pill:  999px;
  --shadow-sm:    0 1px 4px rgba(28,28,26,0.07);
  --shadow-md:    0 4px 24px rgba(28,28,26,0.10);
}

body {
  font-family: 'Manrope', -apple-system, sans-serif;
  background: var(--warm-white);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 2px;
  font-size: 1.2rem; font-weight: 800;
  color: var(--text-dark); text-decoration: none;
  letter-spacing: -0.04em;
}

.nav-dot {
  width: 7px; height: 7px;
  background: var(--orange); border-radius: 50%;
  display: inline-block; margin-left: 1px;
  transform: translateY(-6px);
}

.nav-links { display: flex; align-items: center; gap: 1.5rem; }

.nav-links a {
  font-size: 0.88rem; font-weight: 500; color: var(--text-mid);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-dark); }

.nav-cta {
  background: var(--sage) !important;
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--sage-mid) !important; }

/* ── HERO ── */
.hero {
  background: var(--cream);
  padding: 5rem 2rem 4rem;
  text-align: center;
  border-bottom: 1px solid var(--cream-border);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--sage-light); color: var(--sage);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 6px 14px; border-radius: var(--radius-pill);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.12;
  letter-spacing: -0.04em;
  max-width: 600px; margin: 0 auto 1.1rem;
}
.hero h1 em { color: var(--sage); font-style: normal; }

.hero > p {
  font-size: 1.02rem; color: var(--text-mid);
  font-weight: 400; max-width: 420px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

/* Hero 3-stat strip */
.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  box-shadow: var(--shadow-sm);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
}

.hs-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hs-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.hs-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── MAIN ── */
main {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* ── SECTIONS ── */
.section {
  padding: 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
}
.section:last-child { border-bottom: none; }
.section-cta { padding-top: 1.25rem; padding-bottom: 1.75rem; border-bottom: none; }

.section-tag {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 8px;
}

.optional-tag {
  font-size: 0.63rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-muted);
  background: var(--cream);
  border: 1px solid var(--cream-border);
  padding: 2px 8px; border-radius: var(--radius-pill);
}

/* ── FIELDS ── */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--text-dark); }

.input-unit { display: flex; gap: 8px; }
.input-unit input { flex: 1; min-width: 0; }
.input-unit select { width: auto; min-width: 72px; }

input[type="number"],
input[type="email"],
select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Manrope', sans-serif;
  font-size: 1rem; font-weight: 400; /* 16px min prevents iOS auto-zoom */
  color: var(--text-dark);
  background: var(--warm-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--border-focus);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(62,94,53,0.08);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A4A45' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px; cursor: pointer;
}

/* ── DIET MODEL ── */
.model-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.model-opt { position: relative; }
.model-opt input { position: absolute; opacity: 0; width: 0; height: 0; }

.model-opt label {
  display: block; padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--warm-white);
  transition: all 0.18s;
}
.model-opt label .m-title {
  font-size: 0.97rem; font-weight: 700;
  color: var(--text-dark); letter-spacing: -0.02em;
  display: block; margin-bottom: 4px;
}
.model-opt label .m-sub {
  font-size: 0.77rem; font-weight: 400;
  color: var(--text-muted); line-height: 1.4;
}
.model-opt input:checked + label {
  border-color: var(--sage);
  background: var(--sage-pale);
  box-shadow: 0 0 0 3px rgba(62,94,53,0.08);
}
.model-opt input:checked + label .m-title { color: var(--sage); }

/* ── CTA BUTTON ── */
.btn-primary {
  display: block; width: 100%;
  padding: 16px 24px;
  background: var(--orange);
  color: var(--white);
  border: none; border-radius: var(--radius-pill);
  font-family: 'Manrope', sans-serif;
  font-size: 1rem; font-weight: 700;
  cursor: pointer; letter-spacing: -0.01em;
  transition: background 0.18s, transform 0.1s;
  box-shadow: 0 4px 16px rgba(240,122,60,0.30);
}
.btn-primary:hover { background: var(--orange-dark); }
.btn-primary:active { transform: scale(0.99); }

/* ── RESULTS ── */
.hidden { display: none !important; }

.results-hero {
  background: var(--sage);
  padding: 2.25rem 2.5rem;
}
.results-eyebrow {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.50); margin-bottom: 6px;
}
.results-hero h2 {
  font-size: 2.2rem; font-weight: 700;
  letter-spacing: -0.04em; line-height: 1.1;
  color: var(--white);
}
.results-hero h2 span { color: rgba(255,255,255,0.45); font-weight: 400; }
.results-hero .r-sub {
  font-size: 0.84rem; margin-top: 8px;
  color: rgba(255,255,255,0.50); font-weight: 400;
}

.stat-row {
  padding: 1.75rem 2.5rem;
  background: var(--sage-pale);
  display: flex; align-items: flex-start;
  gap: 2rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.stat-block .sv {
  font-size: 2.5rem; font-weight: 700;
  color: var(--sage); line-height: 1;
  letter-spacing: -0.05em;
}
.stat-block .sl {
  font-size: 0.77rem; color: var(--sage-mid);
  font-weight: 600; margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  padding: 5px 13px; border-radius: var(--radius-pill);
  font-size: 0.74rem; font-weight: 700;
  background: var(--sage); color: var(--white);
}
.chip.s { background: var(--sage-light); color: var(--sage); }

/* ── INGREDIENT BREAKDOWN ── */
.breakdown-sec {
  padding: 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
}
.breakdown-sec h3 {
  font-size: 1rem; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 1.25rem;
}

.ingr-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--cream-border);
}
.ingr-row:last-child { border-bottom: none; }

.ingr-ico {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
}
.ingr-info strong { font-size: 0.88rem; font-weight: 700; display: block; color: var(--text-dark); }
.ingr-info small  { font-size: 0.75rem; color: var(--text-muted); }
.ingr-bar-w { height: 4px; background: var(--cream-border); border-radius: 2px; margin-top: 7px; }
.ingr-bar   { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.ingr-amt strong { font-size: 0.9rem; font-weight: 700; display: block; color: var(--text-dark); text-align: right; }
.ingr-amt small  { font-size: 0.73rem; color: var(--text-muted); display: block; text-align: right; }

/* ── COST ── */
.cost-sec { padding: 2rem 2.5rem; border-bottom: 1px solid var(--border); }
.cost-sec h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1.25rem; }
.cost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.cost-tile {
  background: var(--warm-white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px;
}
.cost-tile .cv { font-size: 1.55rem; font-weight: 700; color: var(--text-dark); letter-spacing: -0.04em; line-height: 1; }
.cost-tile .cl { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); margin-top: 5px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── SHOPPING ── */
.shop-sec { padding: 2rem 2.5rem; border-bottom: 1px solid var(--border); }
.shop-sec h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1.25rem; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 10px; }
.shop-tile {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 13px 15px;
  display: flex; align-items: center; gap: 11px;
  transition: border-color 0.18s;
}
.shop-tile:hover { border-color: var(--sage); }
.s-ico { font-size: 20px; flex-shrink: 0; }
.shop-tile strong { font-size: 0.84rem; font-weight: 700; display: block; color: var(--text-dark); }
.shop-tile span   { font-size: 0.74rem; color: var(--text-muted); }

/* ── EMAIL ── */
.email-sec {
  padding: 2.5rem;
  background: var(--cream);
  text-align: center;
  border-bottom: 1px solid var(--cream-border);
}
.email-sec h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.035em; margin-bottom: 0.4rem; }
.email-sec > p { font-size: 0.86rem; color: var(--text-mid); margin-bottom: 1.5rem; }
.email-name-row { display: flex; gap: 10px; max-width: 440px; margin: 0 auto 10px; }
.email-name-row input {
  flex: 1; padding: 12px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  background: var(--white); color: var(--text-dark);
}
.email-row { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.email-row input[type="email"] {
  flex: 1; padding: 12px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  background: var(--white); color: var(--text-dark);
}
.email-row button {
  padding: 12px 22px;
  background: var(--orange); color: var(--white);
  border: none; border-radius: var(--radius-pill);
  font-family: 'Manrope', sans-serif;
  font-size: 0.88rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: background 0.18s;
}
.email-row button:hover { background: var(--orange-dark); }
.email-note { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.75rem; }

/* ── SUPPLIERS ── */
.aff-sec { padding: 2.5rem; }
.aff-sec h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.aff-sec > p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.prod-card {
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; background: var(--warm-white);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.prod-card:hover { border-color: var(--sage); box-shadow: var(--shadow-sm); }
.prod-tag {
  display: inline-block;
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--sage-light); color: var(--sage); margin-bottom: 10px;
}
.prod-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 5px; letter-spacing: -0.01em; }
.prod-card p  { font-size: 0.78rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 14px; }
.prod-link {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  color: var(--orange); text-decoration: none;
  padding: 7px 16px; border: 1.5px solid var(--orange);
  border-radius: var(--radius-pill);
  transition: background 0.18s, color 0.18s;
}
.prod-link:hover { background: var(--orange); color: var(--white); }

.disclaimer {
  background: var(--orange-light);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px; margin-top: 1.5rem;
  font-size: 0.78rem; color: var(--text-mid); line-height: 1.55;
}

/* ── FOOTER ── */
footer {
  text-align: center; padding: 2rem;
  font-size: 0.78rem; color: var(--text-muted);
}
footer a { color: var(--sage); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {

  /* Nav */
  nav { padding: 0 1rem; height: 58px; }
  .nav-links { gap: 0.9rem; }
  .nav-links a { font-size: 0.82rem; }

  /* Hero */
  .hero { padding: 2.5rem 1.25rem 2rem; }
  .hero > p { font-size: 0.95rem; margin-bottom: 2rem; }
  .hero-stats {
    flex-direction: column; gap: 10px;
    padding: 14px 18px; border-radius: var(--radius-lg);
    width: 100%; max-width: 320px;
  }
  .hero-stat { flex-direction: row; justify-content: space-between; width: 100%; padding: 0; }
  .hs-value  { font-size: 0.95rem; }
  .hs-label  { font-size: 0.75rem; white-space: normal; text-align: right; }
  .hs-divider { width: 100%; height: 1px; }

  /* Main & card */
  main { padding: 1.25rem 0.75rem 3rem; }

  /* Sections */
  .section { padding: 1.25rem 1.25rem; }
  .section-cta { padding: 1rem 1.25rem 1.5rem; }
  .breakdown-sec, .cost-sec, .shop-sec, .aff-sec { padding: 1.25rem; }

  /* Inputs — already 1rem, ensure touch targets */
  input[type="number"],
  input[type="email"],
  select { padding: 12px 14px; }

  /* Diet model */
  .model-grid { grid-template-columns: 1fr; }

  /* Results hero */
  .results-hero { padding: 1.5rem 1.25rem; }
  .results-hero h2 { font-size: 1.7rem; }
  .results-hero .r-sub { font-size: 0.78rem; }

  /* Stat row */
  .stat-row {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .stat-row > div:last-child { grid-column: 1 / -1; }
  .stat-block .sv { font-size: 2rem; }

  /* Ingredient breakdown */
  .ingr-amt strong { font-size: 0.84rem; }

  /* Cost grid — 2×2 */
  .cost-grid { grid-template-columns: 1fr 1fr; }
  .cost-tile .cv { font-size: 1.3rem; }

  /* Shop grid — single column */
  .shop-grid { grid-template-columns: 1fr; }

  /* Suppliers section (on index) */
  .prod-grid { grid-template-columns: 1fr; }

  /* Email */
  .email-sec { padding: 1.5rem 1.25rem; }
  .email-sec h3 { font-size: 1.25rem; }
  .email-name-row { flex-direction: column; }
  .email-row { flex-direction: column; }
  .email-row button { width: 100%; text-align: center; padding: 13px; }

  /* Buttons — bigger touch target */
  .btn-primary { padding: 15px 24px; font-size: 0.97rem; }

  /* Footer */
  footer { padding: 1.5rem 1rem; }
}

/* Very small screens */
@media (max-width: 380px) {
  .nav-links a:not(:last-child) { display: none; }
  .hero h1 { font-size: 1.75rem; }
}

/* ── PDF Promo Tab (shared — index + guide) ── */
.pdf-promo-tab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 14px 16px;
  max-width: 360px;
  animation: slideInTab 0.4s ease 1.5s both;
}
@keyframes slideInTab {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pdf-promo-icon { font-size: 1.5rem; flex-shrink: 0; }
.pdf-promo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pdf-promo-text strong {
  font-size: 0.83rem;
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
}
.pdf-promo-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.pdf-promo-btn {
  display: inline-block;
  flex-shrink: 0;
  padding: 9px 16px;
  background: var(--orange);
  color: white;
  border-radius: var(--radius-pill);
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s;
}
.pdf-promo-btn:hover { background: var(--orange-dark); }
.pdf-promo-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--warm-white);
  color: var(--text-muted);
  font-size: 0.6rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: 'Manrope', sans-serif;
}
@media (max-width: 600px) {
  .pdf-promo-tab {
    bottom: 16px;
    right: 12px;
    left: 12px;
    max-width: unset;
    gap: 8px;
    padding: 12px 14px;
  }
  .pdf-promo-text span { display: none; }
}
