@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --bg: #F7F9F8;
  --surface: #FFFFFF;
  --dark: #0D1117;
  --green: #16A34A;
  --green-hover: #15803D;
  --green-subtle: #F0FDF4;
  --green-border: #BBF7D0;
  --orange: #EA580C;
  --orange-subtle: #FFF7ED;
  --orange-border: #FED7AA;
  --blue: #2563EB;
  --blue-subtle: #EFF6FF;
  --muted: #6B7280;
  --border: #E5E7EB;
  --ink: #1A1F2E;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --radius: 14px;
}

/* ─── DARK MODE ─── */
.dark-mode {
  --bg:            #0D1117;
  --surface:       #161B22;
  --dark:          #F0F6FC;
  --ink:           #C9D1D9;
  --muted:         #8B949E;
  --border:        #30363D;
  --green-subtle:  #0D2818;
  --green-border:  #1A4731;
  --orange-subtle: #2D1600;
  --orange-border: #5C2E00;
  --blue-subtle:   #0C1929;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.5);
  --shadow:        0 4px 20px rgba(0,0,0,0.6);
}

/* Waitlist section uses --dark as background; re-pin in dark mode */
.dark-mode .waitlist-section { background: #010409; }

/* Smooth theme transitions on key surfaces */
body,
.nav, .site-footer,
.pricing-card, .feature-card, .mode-card,
.dash-card, .macro-pill, .day-tab, .check-item,
.msg-row .msg-bubble, .coach-msg, .coach-sidebar, .coach-header,
.chat-app, .chat-header, .chat-input-area,
.upsell-modal, .legal-gate, .email-capture-step,
.upload-step, .week-day-card, .stat-card, .workout-day {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* ─── THEME TOGGLE ─── */
.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
  flex-shrink: 0;
  padding: 0;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); background: var(--bg); }

/* ─── NAV ACTIONS ─── */
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.45rem;
  color: var(--dark);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.logo em { font-style: italic; color: var(--green); }

.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-link { font-size: 0.85rem; color: var(--muted); text-decoration: none; padding: 0.4rem 0.75rem; border-radius: 8px; transition: color 0.15s, background 0.15s; }
.nav-link:hover { color: var(--ink); background: var(--bg); }

/* ─── HERO ─── */
.hero {
  max-width: 640px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-subtle);
  color: var(--green);
  border: 1px solid var(--green-border);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  color: var(--dark);
  line-height: 1.12;
  margin-bottom: 1.25rem;
  font-weight: 400;
}
.hero h1 em { font-style: italic; color: var(--green); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
}

.hero-note {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-note span { margin: 0 0.4rem; opacity: 0.4; }

/* ─── MODE CARDS ─── */
.mode-section {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mode-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: block;
}
.mode-card:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: var(--shadow); }
.mode-card.featured { border-color: var(--orange-border); background: var(--orange-subtle); }
.mode-card.featured:hover { border-color: var(--orange); }

.mode-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.mode-title { font-family: 'DM Serif Display', serif; font-size: 1.15rem; color: var(--dark); margin-bottom: 0.35rem; font-weight: 400; }
.mode-desc { font-size: 0.82rem; color: var(--muted); }
.mode-price { font-size: 0.78rem; font-weight: 600; color: var(--green); margin-top: 0.5rem; }
.mode-price.orange { color: var(--orange); }

/* ─── FEATURES ─── */
.features {
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 1rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--green-subtle);
  border: 1px solid var(--green-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-card h3 { font-family: 'DM Serif Display', serif; font-size: 1.1rem; color: var(--dark); margin-bottom: 0.5rem; font-weight: 400; }
.feature-card p { font-size: 0.87rem; color: var(--muted); line-height: 1.65; }

/* ─── PRICING ─── */
.pricing-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.pricing-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.pricing-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--dark);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.pricing-header p { font-size: 1rem; color: var(--muted); }

.pricing-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 3rem;
}

.pricing-group { margin-bottom: 3rem; }

.pricing-group-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 1rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card.popular {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.08);
}

.popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.7rem;
  border-radius: 10px;
  white-space: nowrap;
}

.p-tier {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.p-price {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--dark);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.p-price span { font-family: 'DM Sans', sans-serif; font-size: 0.9rem; color: var(--muted); }

.p-desc { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.25rem; }

.p-features { list-style: none; margin-bottom: 1.5rem; flex: 1; }
.p-features li {
  font-size: 0.84rem;
  color: var(--ink);
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--bg);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.p-features li .check { color: var(--green); font-size: 0.85rem; flex-shrink: 0; margin-top: 1px; }
.p-features li .cross { color: var(--border); font-size: 0.85rem; flex-shrink: 0; margin-top: 1px; }
.p-features li.locked { color: var(--muted); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-lg { padding: 0.9rem 2rem; font-size: 0.95rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,163,74,0.3); }

.btn-orange { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-orange:hover { background: #c2410c; transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--ink); }

.btn-ghost { background: transparent; color: var(--muted); border: none; padding-left: 0.5rem; padding-right: 0.5rem; }

.btn:disabled, .btn.disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ─── SITE FOOTER ─── */
.site-footer {
  padding: 2rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-align: center;
}

.site-footer .footer-brand {
  margin-bottom: 1rem;
}

.legal-disclaimer {
  font-size: 0.68rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto;
  opacity: 0.75;
}

/* ─── LEGAL GATE ─── */
.legal-gate {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem auto;
  max-width: 560px;
  animation: msgIn 0.25s ease;
}

.legal-gate-intro {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.legal-gate-label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--dark);
  cursor: pointer;
  margin-bottom: 1.25rem;
}

.legal-gate-label input[type=checkbox] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
}

.legal-gate-label input[type=checkbox]:not(:checked) ~ span {
  opacity: 0.7;
}

/* ─── CHAT APP ─── */
.chat-app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chat-header {
  display: flex;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 1rem;
}

.chat-logo { font-family: 'DM Serif Display', serif; font-size: 1.2rem; color: var(--dark); flex-shrink: 0; }
.chat-logo em { font-style: italic; color: var(--green); }

.mode-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.mode-pill.solo { background: var(--green-subtle); color: var(--green); border: 1px solid var(--green-border); }
.mode-pill.couple { background: var(--orange-subtle); color: var(--orange); border: 1px solid var(--orange-border); }

.progress-wrap { flex: 1; }

.progress-bar-bg { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.5s cubic-bezier(0.4,0,0.2,1); width: 0%; }
.progress-label { font-size: 0.7rem; color: var(--muted); margin-top: 0.25rem; text-align: right; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.msg-row { display: flex; gap: 0.6rem; max-width: 88%; animation: msgIn 0.22s ease; }
.msg-row.agent { align-self: flex-start; }
.msg-row.user  { align-self: flex-end; flex-direction: row-reverse; }

@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--green-subtle); border: 1px solid var(--green-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0; margin-top: 2px;
}

.msg-bubble { padding: 0.7rem 0.95rem; border-radius: 16px; font-size: 0.91rem; line-height: 1.6; }
.msg-row.agent .msg-bubble { background: var(--bg); color: var(--ink); border-radius: 4px 16px 16px 16px; border: 1px solid var(--border); }
.msg-row.user  .msg-bubble { background: var(--green); color: #fff; border-radius: 16px 4px 16px 16px; }
.edit-answer-btn { background: none; border: none; cursor: pointer; opacity: 1; padding: 0 0.2rem; line-height: 1; font-size: 0.8rem; color: var(--muted); flex-shrink: 0; align-self: center; }
.answer-edit-form { display: flex; gap: 0.4rem; align-items: center; width: 100%; }
.answer-edit-input { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.4); border-radius: 8px; color: #fff; padding: 0.25rem 0.5rem; font-size: 0.91rem; flex: 1; min-width: 0; outline: none; }
.answer-edit-input::placeholder { color: rgba(255,255,255,0.5); }
.answer-edit-confirm, .answer-edit-cancel { background: none; border: none; cursor: pointer; color: #fff; font-size: 0.85rem; padding: 0.1rem 0.3rem; border-radius: 4px; flex-shrink: 0; }
.answer-edit-confirm:hover { background: rgba(255,255,255,0.2); }
.answer-edit-cancel:hover { background: rgba(255,255,255,0.15); }

.typing { display: flex; gap: 4px; padding: 0.7rem 0.95rem; background: var(--bg); border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; width: fit-content; align-items: center; }
.typing-dot { width: 5px; height: 5px; background: var(--muted); border-radius: 50%; animation: blink 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,100% { opacity:0.25; transform:scale(0.85); } 50% { opacity:1; transform:scale(1); } }

.quick-replies { display: flex; flex-wrap: wrap; gap: 0.45rem; padding-left: 2.65rem; animation: msgIn 0.25s ease 0.1s both; }
.qr-btn { padding: 0.4rem 0.85rem; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); font-size: 0.83rem; color: var(--ink); cursor: pointer; transition: all 0.15s; font-family: 'DM Sans', sans-serif; font-weight: 400; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.qr-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-subtle); }
.qr-btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.qr-btn-hint { display: block; font-size: 0.7rem; color: var(--muted); font-weight: 400; margin-top: 0.15rem; }

.chat-input-area { padding: 0.85rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: 0.6rem; align-items: center; flex-shrink: 0; background: var(--surface); }
.chat-input { flex: 1; padding: 0.65rem 1rem; border: 1px solid var(--border); border-radius: 24px; font-family: 'DM Sans', sans-serif; font-size: 0.91rem; color: var(--ink); background: var(--bg); outline: none; transition: border-color 0.2s, background 0.2s; }
.chat-input:focus { border-color: var(--green); background: var(--surface); }
.chat-input::placeholder { color: var(--muted); opacity: 0.7; }
.chat-input:disabled { opacity: 0.5; cursor: not-allowed; }

.send-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.18s; flex-shrink: 0; }
.send-btn:hover { background: var(--green-hover); transform: scale(1.05); }
.send-btn:disabled { background: var(--border); cursor: not-allowed; transform: none; }

/* ─── PLAN VIEW ─── */
.plan-wrap { padding: 1.5rem 1.25rem 3rem; overflow-y: auto; flex: 1; }

.plan-hero { text-align: center; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.plan-hero h2 { font-family: 'DM Serif Display', serif; font-size: 1.65rem; color: var(--dark); font-weight: 400; margin-bottom: 0.4rem; }
.plan-meta { font-size: 0.8rem; color: var(--muted); }
.plan-notes { font-size: 0.82rem; color: var(--muted); background: var(--green-subtle); border: 1px solid var(--green-border); border-radius: 10px; padding: 0.6rem 0.85rem; margin-top: 0.75rem; }
.plan-warning { font-size: 0.82rem; color: #92400E; background: var(--orange-subtle); border: 1px solid var(--orange-border); border-radius: 10px; padding: 0.6rem 0.85rem; margin-top: 0.5rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 0.6rem; margin-bottom: 1.75rem; }
.stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 0.85rem 0.75rem; text-align: center; }
.stat-val { font-family: 'DM Serif Display', serif; font-size: 1.3rem; color: var(--dark); line-height: 1; margin-bottom: 0.25rem; }
.stat-val.green { color: var(--green); }
.stat-lbl { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }

.plan-section { margin-bottom: 2rem; }
.plan-section-title { font-family: 'DM Serif Display', serif; font-size: 1.2rem; color: var(--dark); margin-bottom: 1rem; font-weight: 400; display: flex; align-items: center; gap: 0.5rem; }
.plan-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.macro-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; font-size: 0.87rem; }
.macro-name { width: 70px; font-weight: 500; color: var(--ink); }
.macro-track { flex: 1; height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; }
.macro-fill { height: 100%; border-radius: 4px; }
.fill-protein { background: #3B82F6; }
.fill-carbs   { background: #F59E0B; }
.fill-fat     { background: #EF4444; }
.macro-num { font-size: 0.8rem; color: var(--muted); width: 55px; text-align: right; }

/* ─── WEEKLY PLAN ─── */
.week-grid { display: grid; gap: 0.6rem; }

.week-day-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.week-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.week-day-name { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--green); }
.week-day-kcal { font-size: 0.75rem; color: var(--muted); }

.week-day-meals { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }

.meal-slot {
  background: var(--surface);
  padding: 0.65rem 0.85rem;
}

.meal-slot-type { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; margin-bottom: 0.2rem; }
.meal-slot-name { font-size: 0.81rem; color: var(--ink); line-height: 1.4; }
.meal-slot-cal  { font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }

/* ─── SHOPPING LIST ─── */
.shopping-list { display: grid; gap: 1rem; }

.shopping-cat-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.shopping-items { list-style: none; }
.shopping-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--bg);
  font-size: 0.86rem;
  color: var(--ink);
  cursor: pointer;
}
.shopping-item:last-child { border-bottom: none; }
.shopping-item input[type=checkbox] { accent-color: var(--green); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.shopping-item.checked { color: var(--muted); text-decoration: line-through; }

/* ─── WORKOUT PLAN ─── */
.workout-list { display: grid; gap: 0.6rem; }
.workout-day { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1rem; }
.workout-day.rest { opacity: 0.55; }
.wday-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green); font-weight: 600; margin-bottom: 0.15rem; }
.wday-label.rest-lbl { color: var(--muted); }
.wday-focus { font-family: 'DM Serif Display', serif; font-size: 1rem; color: var(--dark); margin-bottom: 0.35rem; font-weight: 400; }
.wday-exercises { font-size: 0.81rem; color: var(--muted); line-height: 1.7; }

/* ─── DOWNLOAD BAR ─── */
.download-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; padding: 1.25rem 0 0; border-top: 1px solid var(--border); margin-top: 0.5rem; align-items: center; }

.upgrade-prompt {
  background: var(--orange-subtle);
  border: 1px solid var(--orange-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.84rem;
  color: #92400E;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  width: 100%;
}

.upgrade-prompt strong { font-weight: 600; }

/* ─── EMAIL FORM (couple) ─── */
.email-form { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-top: 1.5rem; }
.email-form h4 { font-family: 'DM Serif Display', serif; font-size: 1.05rem; color: var(--dark); margin-bottom: 1rem; font-weight: 400; }
.email-field { margin-bottom: 0.75rem; }
.email-field label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.3rem; font-weight: 600; }
.email-field input { width: 100%; padding: 0.6rem 0.9rem; border: 1px solid var(--border); border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; color: var(--ink); background: var(--surface); outline: none; transition: border-color 0.2s; }
.email-field input:focus { border-color: var(--green); }
.email-status { font-size: 0.83rem; color: var(--green); margin-top: 0.75rem; display: none; }

/* ─── PRINT ─── */
@media print {
  .chat-header, .chat-input-area, .download-bar, .nav, .email-form { display: none !important; }
  .chat-app { box-shadow: none; height: auto; }
  .plan-wrap { overflow: visible; padding: 1rem; }
  body { background: white; }
  .week-day-card, .workout-day, .stat-card { break-inside: avoid; }
  .plan-section { break-inside: avoid; }
  @page { margin: 1.5cm; }
}

/* ─── WAITLIST ─── */
.waitlist-section {
  background: var(--dark);
  padding: 3.5rem 1.5rem;
}

.waitlist-inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.waitlist-inner h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: #fff;
  font-weight: 400;
  margin-bottom: 0.6rem;
}

.waitlist-inner p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.waitlist-form {
  display: flex;
  gap: 0.6rem;
  max-width: 420px;
  margin: 0 auto;
}

.waitlist-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 30px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.waitlist-input::placeholder { color: rgba(255,255,255,0.35); }
.waitlist-input:focus { border-color: var(--green); }

.waitlist-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  margin-top: 0.85rem;
}

.waitlist-success {
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 1rem;
}

/* ─── UPLOAD STEP ─── */
.upload-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-left: 2.5rem;
  animation: msgIn 0.25s ease;
}

.upload-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.upload-step-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--green); background: var(--green-subtle); }
.upload-zone.uploaded { border-color: var(--green); border-style: solid; background: var(--green-subtle); }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.upload-zone-icon  { font-size: 1.35rem; margin-bottom: 0.3rem; pointer-events: none; }
.upload-zone-title { font-size: 0.8rem; font-weight: 600; color: var(--dark); margin-bottom: 0.15rem; pointer-events: none; }
.upload-zone-types { font-size: 0.7rem; color: var(--muted); margin-bottom: 0.3rem; pointer-events: none; }
.upload-zone-status { font-size: 0.7rem; color: var(--muted); pointer-events: none; }
.upload-zone.uploaded .upload-zone-status { color: var(--green); font-weight: 500; }

.upload-actions { display: flex; gap: 0.6rem; justify-content: flex-end; }

.upload-partner-section { margin-bottom: 1rem; }
.upload-partner-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.upload-partner-section .upload-grid { margin-bottom: 0; }

.paywall-gate {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-left: 2.5rem;
  animation: msgIn 0.25s ease;
  text-align: center;
}
.paywall-gate h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.paywall-gate p  { color: var(--muted); font-size: 0.875rem; margin: 0 0 1rem; }

/* ─── DASHBOARD ─── */
.dash-wrap { max-width: 960px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

.dash-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.5rem; }
.dash-greeting { font-size: 1.05rem; font-weight: 700; color: var(--dark); }
.dash-user { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }

.macro-bar { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.macro-pill { flex: 1; min-width: 72px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.5rem; text-align: center; }
.macro-pill .mp-val { font-size: 1.15rem; font-weight: 700; color: var(--dark); }
.macro-pill .mp-lbl { font-size: 0.67rem; color: var(--muted); margin-top: 0.1rem; text-transform: uppercase; letter-spacing: 0.04em; }
.macro-pill.accent .mp-val { color: var(--green); }

.partner-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.partner-tab { padding: 0.45rem 1.1rem; border-radius: 20px; border: 1px solid var(--orange-border); background: var(--surface); font-size: 0.82rem; cursor: pointer; color: var(--muted); transition: all 0.15s; font-weight: 500; }
.partner-tab:hover { border-color: var(--orange); color: var(--dark); }
.partner-tab.active { background: var(--orange); color: #fff; border-color: var(--orange); font-weight: 600; }
.day-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.day-tab { padding: 0.38rem 0.85rem; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); font-size: 0.78rem; cursor: pointer; color: var(--muted); transition: all 0.15s; white-space: nowrap; }
.day-tab:hover { border-color: var(--green); color: var(--dark); }
.day-tab.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 620px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.dash-card-title { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.85rem; }

.check-list { display: flex; flex-direction: column; gap: 0.25rem; }
.check-item { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.45rem 0.5rem; border-radius: 7px; cursor: pointer; transition: background 0.12s; }
.check-item:hover { background: var(--green-subtle); }
.check-item input[type=checkbox] { margin-top: 0.18rem; flex-shrink: 0; width: 15px; height: 15px; accent-color: var(--green); cursor: pointer; }
.check-item.done .ci-label { text-decoration: line-through; opacity: 0.45; }
.ci-label { font-size: 0.84rem; line-height: 1.4; color: var(--dark); }
.ci-sub { font-size: 0.7rem; color: var(--muted); margin-top: 0.1rem; }

.workout-focus { font-size: 0.75rem; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.workout-rest { text-align: center; padding: 1.5rem 1rem; color: var(--muted); font-size: 0.85rem; }

.grocery-section { margin-top: 0.25rem; }
.grocery-cat-title { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin: 1rem 0 0.4rem; }

.dash-loading-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 5rem 1rem; color: var(--muted); font-size: 0.9rem; }
.dash-empty-wrap { text-align: center; padding: 5rem 1rem; }
.dash-empty-wrap h2 { font-size: 1.1rem; margin-bottom: 0.6rem; color: var(--dark); }
.dash-empty-wrap p { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.25rem; }

/* ─── EMAIL CAPTURE STEP ─── */
.email-capture-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-left: 2.5rem;
  animation: msgIn 0.25s ease;
}

.email-capture-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 0.6rem;
}

.email-capture-row .chat-input {
  flex: 1;
  disabled: false;
}

.email-capture-note {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}

.email-capture-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 1rem 0 0.75rem;
}
.email-capture-divider::before,
.email-capture-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── LOADING OVERLAY ─── */
.plan-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.plan-loading-progress { width: 200px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.plan-loading-bar { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.6s ease; }
#planLoadingMsg { transition: opacity 0.3s ease; }

.plan-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── REASONING PANEL ─── */
.reasoning-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 8px 0;
  overflow: hidden;
  font-size: 0.78rem;
}
.reasoning-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--muted);
  user-select: none;
}
.reasoning-header::before { content: '▶'; font-size: 0.6rem; transition: transform 0.2s; }
.reasoning-panel.open .reasoning-header::before { transform: rotate(90deg); }
.reasoning-body {
  display: none;
  padding: 8px 12px;
  max-height: 220px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.reasoning-panel.open .reasoning-body { display: block; }
.reasoning-content {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  color: #8892b0;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

/* ─── BILLING TOGGLE ─── */
.billing-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.billing-toggle-track {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.billing-toggle-track.annual { background: var(--green); }
.billing-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: var(--shadow-sm);
}
.billing-toggle-track.annual .billing-toggle-knob { transform: translateX(22px); }
.billing-toggle-lbl { font-size: 0.85rem; color: var(--muted); cursor: pointer; transition: color 0.15s; }
.billing-toggle-lbl.active { color: var(--ink); font-weight: 600; }
.annual-badge {
  background: var(--green-subtle);
  color: var(--green);
  border: 1px solid var(--green-border);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.monthly-only { display: block; }
.annual-only  { display: none; }
.pricing-section.annual .monthly-only { display: none; }
.pricing-section.annual .annual-only  { display: block; }

.pricing-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .pricing-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .pricing-grid-4 { grid-template-columns: 1fr; }
}

/* ─── UPSELL MODAL ─── */
.upsell-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.upsell-modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.upsell-ready-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-subtle);
  color: var(--green);
  border: 1px solid var(--green-border);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.upsell-modal h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.55rem;
  color: var(--dark);
  font-weight: 400;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.upsell-modal > p {
  font-size: 0.87rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.upsell-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.upsell-col {
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid var(--border);
}
.upsell-col.free { background: var(--bg); }
.upsell-col.paid { background: var(--green-subtle); border-color: var(--green-border); }
.upsell-col-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.6rem;
  color: var(--muted);
}
.upsell-col.paid .upsell-col-title { color: var(--green); }
.upsell-col ul { list-style: none; }
.upsell-col li {
  font-size: 0.81rem;
  padding: 0.2rem 0;
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  line-height: 1.4;
}
.upsell-col.free li { color: var(--muted); }
.upsell-col.paid li { color: var(--ink); }
.upsell-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.upsell-price { font-size: 0.74rem; color: var(--muted); text-align: center; margin-top: 0.5rem; }

/* ─── PAYWALL ─── */
.paywall-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.paywall-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--orange-subtle);
  color: var(--orange);
  border: 1px solid var(--orange-border);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.paywall-hero { text-align: center; max-width: 400px; }
.paywall-hero h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.65rem;
  color: var(--dark);
  font-weight: 400;
  margin: 0.75rem 0 0.5rem;
  line-height: 1.2;
}
.paywall-hero p { font-size: 0.87rem; color: var(--muted); line-height: 1.65; }
.paywall-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 580px;
}
.paywall-tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.18s;
  position: relative;
}
.paywall-tier-card:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px); }
.paywall-tier-card.highlighted { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,0.08); }
.ptc-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.6rem;
  border-radius: 9px;
  white-space: nowrap;
}
.ptc-name { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.ptc-price { font-family: 'DM Serif Display', serif; font-size: 1.65rem; color: var(--dark); font-weight: 400; line-height: 1; }
.ptc-price span { font-family: 'DM Sans', sans-serif; font-size: 0.82rem; color: var(--muted); }
.ptc-desc { font-size: 0.74rem; color: var(--muted); line-height: 1.5; margin-top: 0.15rem; }
.paywall-footer { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
@media (max-width: 520px) { .paywall-tiers { grid-template-columns: 1fr; } }

/* ─── AI COACH SIDEBAR ─── */
.coach-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 20px rgba(22,163,74,0.38);
  z-index: 150;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.coach-fab:hover { transform: scale(1.07); box-shadow: 0 6px 24px rgba(22,163,74,0.5); }
.coach-fab.open { background: var(--muted); box-shadow: var(--shadow); }

.coach-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.28);
  z-index: 135;
  display: none;
}
.coach-overlay.visible { display: block; }

.coach-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 140;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.1);
}
.coach-sidebar.open { transform: translateX(0); }

.coach-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.coach-title { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: 0.93rem; color: var(--dark); }
.coach-title-badge {
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--green-subtle);
  color: var(--green);
  border: 1px solid var(--green-border);
  padding: 0.12rem 0.42rem;
  border-radius: 7px;
  letter-spacing: 0.05em;
}
.coach-close {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; color: var(--muted);
  transition: all 0.15s;
}
.coach-close:hover { background: var(--bg); color: var(--ink); }

.coach-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  scroll-behavior: smooth;
}

.coach-msg {
  max-width: 90%;
  padding: 0.58rem 0.85rem;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.55;
  animation: msgIn 0.2s ease;
}
.coach-msg.agent {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px 14px 14px 14px;
  align-self: flex-start;
  color: var(--ink);
}
.coach-msg.user {
  background: var(--green);
  color: #fff;
  border-radius: 14px 4px 14px 14px;
  align-self: flex-end;
}
.coach-typing {
  display: flex;
  gap: 4px;
  padding: 0.58rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px 14px 14px 14px;
  width: fit-content;
  align-self: flex-start;
  align-items: center;
}
.coach-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  padding: 0.1rem 0 0.25rem;
  align-self: flex-start;
}
.coach-suggestion {
  padding: 0.32rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  font-size: 0.78rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.14s;
  font-family: 'DM Sans', sans-serif;
}
.coach-suggestion:hover { border-color: var(--green); color: var(--green); background: var(--green-subtle); }
.coach-swap-actions { display: flex; gap: 0.4rem; align-self: flex-start; margin-top: 0.15rem; }
.coach-swap-btn { padding: 0.3rem 0.72rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 0.76rem; color: var(--ink); cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.14s; }
.coach-swap-btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.coach-swap-btn:hover:not(:disabled) { opacity: 0.85; }
.coach-swap-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.coach-input-area {
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
  background: var(--surface);
}
.coach-input {
  flex: 1;
  padding: 0.58rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.87rem;
  color: var(--ink);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.coach-input:focus { border-color: var(--green); background: var(--surface); }
.coach-input::placeholder { color: var(--muted); opacity: 0.7; }
.coach-input:disabled { opacity: 0.5; cursor: not-allowed; }
.coach-send {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s;
}
.coach-send:hover { background: var(--green-hover); transform: scale(1.05); }
.coach-send:disabled { background: var(--border); cursor: not-allowed; transform: none; }

/* ─── AUTH MODAL ─── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.auth-modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  animation: slideUp 0.25s ease;
  position: relative;
}
.auth-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none; border: none;
  font-size: 1.1rem; color: var(--muted);
  cursor: pointer; line-height: 1;
}
.auth-close:hover { color: var(--ink); }
.auth-title { font-size: 1.25rem; font-weight: 600; color: var(--ink); margin-bottom: 0.25rem; }
.auth-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.auth-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.auth-tab.active { color: var(--green); border-bottom-color: var(--green); }
.auth-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.auth-field label { font-size: 0.8rem; font-weight: 500; color: var(--ink); }
.auth-field input {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.auth-field input:focus { border-color: var(--green); }
.auth-error { font-size: 0.82rem; color: #dc2626; margin-bottom: 0.75rem; display: none; }
.auth-error.visible { display: block; }
.auth-footer { margin-top: 1rem; text-align: center; font-size: 0.8rem; color: var(--muted); }
.auth-footer a { color: var(--green); text-decoration: none; cursor: pointer; }
.btn-signin {
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-signin:hover { border-color: var(--ink); background: var(--bg); }

.profile-dropdown { position: relative; }
.profile-dropdown-menu { position: absolute; right: 0; top: calc(100% + 0.4rem); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; min-width: 160px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); z-index: 200; overflow: hidden; }
.profile-dropdown-item { display: block; width: 100%; text-align: left; padding: 0.6rem 1rem; font-size: 0.85rem; color: var(--ink); text-decoration: none; background: none; border: none; cursor: pointer; transition: background 0.12s; white-space: nowrap; }
.profile-dropdown-item:hover { background: var(--bg); }
.profile-dropdown-logout { color: var(--red, #e74c3c); border-top: 1px solid var(--border); }

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .nav { padding: 0.9rem 1rem; }
  .hero { padding: 3rem 1rem 2rem; }
  .features { padding: 1rem 1rem 2rem; grid-template-columns: repeat(2, 1fr); }
  .mode-section { grid-template-columns: 1fr 1fr; }
  .chat-app { max-width: 100%; }
  .week-day-meals { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ─── LANDING MOBILE ─── */
@media (max-width: 600px) {
  /* Hide Pricing nav link — pricing section is reachable by scrolling */
  .nav-links { display: none; }

  /* Pricing section: trim excessive bottom padding */
  .pricing-section { padding: 2rem 1rem 3rem; }

  /* Billing toggle: tighter gap so "Annual Save up to 33%" doesn't overflow */
  .billing-toggle { gap: 0.45rem; }

  /* Waitlist: stack input and button on narrow screens */
  .waitlist-form { flex-direction: column; align-items: stretch; }

  /* Waitlist input: prevent iOS zoom */
  .waitlist-input { font-size: 1rem; }

  /* Auth modal inputs: prevent iOS zoom */
  .auth-field input { font-size: 1rem; }

  /* Auth close button: 44px touch target */
  .auth-close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; top: 0.5rem; right: 0.5rem; font-size: 1rem; }
}


/* ─── DASHBOARD MOBILE ─── */
@media (max-width: 600px) {
  /* Day tabs: horizontal scroll instead of wrapping to multiple rows */
  .day-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
    margin-bottom: 0.85rem;
  }
  .day-tabs::-webkit-scrollbar { display: none; }
  .day-tab { flex-shrink: 0; }

  /* Check items: minimum touch target height */
  .check-item { min-height: 44px; align-items: center; }

  /* Download buttons: full-width stacked for easier tapping */
  .download-bar { flex-direction: column; }
  .download-bar .btn { width: 100%; justify-content: center; }

  /* Coach FAB: respect iPhone home indicator */
  .coach-fab { bottom: max(1.5rem, calc(env(safe-area-inset-bottom) + 0.5rem)); }

  /* Coach sidebar: full-width on mobile */
  .coach-sidebar { width: 100vw; }

  /* Coach send button: minimum touch target */
  .coach-send { width: 44px; height: 44px; }

  /* Coach close button: minimum touch target */
  .coach-close { width: 44px; height: 44px; }

  /* Coach input: prevent iOS zoom */
  .coach-input { font-size: 1rem; }

  /* Coach input area: safe area for iPhone home bar */
  .coach-input-area { padding-bottom: max(0.7rem, env(safe-area-inset-bottom)); }

  /* Dashboard page padding: tighter on small screens */
  .dash-wrap { padding: 1rem 0.85rem 4rem; }
}

/* ─── CHAT MOBILE ─── */
@media (max-width: 600px) {
  /* Prevent iOS Safari auto-zoom on input focus (requires font-size >= 16px) */
  .chat-input,
  .answer-edit-input { font-size: 1rem; }

  /* Touch targets: minimum 44px */
  .send-btn { width: 44px; height: 44px; }
  .qr-btn   { min-height: 44px; padding: 0.6rem 0.85rem; }

  /* Reduce avatar-indent on inline cards so they stay readable on narrow screens */
  .upload-step,
  .paywall-gate,
  .email-capture-step { margin-left: 0.5rem; }

  /* Upload zones: 1 column on mobile (2 columns is too cramped at 375px) */
  .upload-grid { grid-template-columns: 1fr; }

  /* Email capture: stack input + button vertically */
  .email-capture-row { flex-direction: column; }

  /* Safe area for iPhone home indicator — prevents input bar being hidden */
  .chat-input-area { padding-bottom: max(0.85rem, env(safe-area-inset-bottom)); }

  /* Extra bottom padding so last message isn't hidden behind the input bar */
  .chat-messages { padding-bottom: 1.5rem; }

  /* Plan output: tighter side padding, extra bottom so content clears input */
  .plan-wrap { padding: 1rem 0.85rem 5rem; }
}