/* ============================================
   MAISON LÉA — Premium Nutrition Coaching
   ============================================ */

:root {
  /* Light theme */
  --bg: #F8F4ED;
  --bg-2: #EFE7D6;
  --bg-3: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #FBF7EF;
  --ink: #0F0E0B;
  --ink-2: #2A2823;
  --muted: #6B6457;
  --muted-2: #A39B8B;
  --line: rgba(15, 14, 11, 0.08);
  --line-2: rgba(15, 14, 11, 0.12);
  --gold: #B8924D;
  --gold-soft: #D4B377;
  --green: #3D5A3D;
  --green-soft: #6B8E5A;
  --green-mist: #E6EDDF;
  --shadow-sm: 0 1px 2px rgba(15,14,11,0.04), 0 1px 1px rgba(15,14,11,0.03);
  --shadow-md: 0 4px 12px rgba(15,14,11,0.06), 0 2px 4px rgba(15,14,11,0.04);
  --shadow-lg: 0 24px 60px -20px rgba(15,14,11,0.18), 0 8px 20px -10px rgba(15,14,11,0.08);
  --shadow-xl: 0 40px 100px -30px rgba(15,14,11,0.25);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --radius-pill: 999px;

  --font-serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Manrope", system-ui, -apple-system, sans-serif;

  --container: 1400px;
}

[data-theme="dark"] {
  --bg: #0E0D0A;
  --bg-2: #16140F;
  --bg-3: #0A0907;
  --surface: #17150F;
  --surface-2: #1E1B14;
  --ink: #F4EFE3;
  --ink-2: #E3DCC9;
  --muted: #9A9180;
  --muted-2: #6B6457;
  --line: rgba(244,239,227,0.08);
  --line-2: rgba(244,239,227,0.14);
  --gold: #D4B377;
  --gold-soft: #B8924D;
  --green: #8FAE7A;
  --green-soft: #6B8E5A;
  --green-mist: #1A2218;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,0.6);
  --shadow-xl: 0 40px 100px -30px rgba(0,0,0,0.7);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Utility ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--gold);
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { width: 24px; }
.h-display {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
  color: var(--ink);
  text-wrap: balance;
}
h1.h-display { font-size: clamp(48px, 7.5vw, 112px); }
h2.h-display { font-size: clamp(38px, 5.6vw, 76px); }
h3.h-display { font-size: clamp(28px, 3vw, 44px); }
.lede {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--muted);
  line-height: 1.6;
  max-width: 56ch;
  text-wrap: pretty;
}
.italic-accent { font-style: italic; color: var(--green); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink); color: var(--bg);
  box-shadow: 0 10px 26px -10px rgba(15,14,11,0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(15,14,11,0.6); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(184,146,77,0.55);
}
.btn-gold:hover { transform: translateY(-2px); }
.btn-arrow::after {
  content: "→"; font-size: 16px; transition: transform 0.3s ease;
}
.btn:hover .btn-arrow::after, .btn-arrow:hover::after { transform: translateX(4px); }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  transition: padding 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease;
}
.nav.scrolled {
  padding: 11px 0;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.nav-inner > .brand { justify-self: start; }
.nav-inner > .nav-links { justify-self: center; }
.nav-inner > .nav-actions { justify-self: end; }
.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--font-serif); font-size: 26px; letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink);
  display: grid; place-items: center;
  color: var(--bg); font-family: var(--font-serif); font-size: 20px; font-style: italic;
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid var(--gold);
}
.nav-links {
  display: flex; align-items: center; gap: 3px;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.nav-links a {
  padding: 9px 16px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-links a:hover { background: var(--bg-2); color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 11px; }
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center;
  transition: background 0.2s, transform 0.3s;
}
.theme-toggle:hover { transform: rotate(20deg); }
.theme-toggle svg { width: 17px; height: 17px; stroke: var(--ink); }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav-cta { padding: 12px 20px; font-size: 14px; white-space: nowrap; }
.lang-toggle {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
}
.lang-toggle button {
  padding: 7px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--muted); background: transparent;
  transition: background 0.2s, color 0.2s;
}
.lang-toggle button.on { background: var(--ink); color: var(--bg); }
/* ============================================================
   NAV — RESPONSIVE (mobile-first additions, layered breakpoints)
   ============================================================ */

/* Hamburger button hidden on desktop */
.menu-toggle { display: none; }
.nav-cta-icon { display: none; }

/* Allow the nav-links pill to shrink instead of overflow */
.nav-inner > .nav-links { min-width: 0; }

/* ── LAPTOP (901-1199px): tighten spacing but keep all links ── */
@media (max-width: 1199px) {
  .nav-inner { gap: 14px; }
  .nav-links { padding: 4px; gap: 2px; }
  .nav-links a { padding: 8px 12px; font-size: clamp(12px, 1.1vw, 13.5px); }
  .nav-cta { padding: 10px 16px; font-size: 13px; }
  .container { padding: 0 22px; }
}

/* ── TABLET (641-900px): collapse links → hamburger; keep lang/theme/CTA ── */
@media (max-width: 900px) {
  .nav-inner {
    grid-template-columns: auto 1fr auto; /* brand | (empty) | actions */
    gap: 10px;
  }
  .nav-links { display: none; }
  .menu-toggle {
    display: grid; place-items: center;
    width: 42px; height: 42px; min-width: 42px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--surface);
    position: relative; cursor: pointer;
    transition: background .15s;
  }
  .menu-toggle:hover { background: var(--bg-2); }
  .menu-toggle span {
    display: block; width: 18px; height: 1.5px; background: var(--ink);
    margin: 3px 0; border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
    transform-origin: center;
  }
  /* Animate to X when open */
  .menu-toggle.is-open span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
  .menu-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .menu-toggle.is-open span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

  .nav-cta { padding: 10px 14px; font-size: 12.5px; }
  .lang-toggle { display: inline-flex; } /* keep visible on tablet */
  .lang-toggle button { padding: 6px 9px; font-size: 11px; }
  .theme-toggle { width: 38px; height: 38px; }
  .theme-toggle svg { width: 15px; height: 15px; }
}

/* ── MOBILE (≤640px): keep CTA, slimmer everything ── */
@media (max-width: 640px) {
  .nav { padding: 10px 0; }
  .nav.scrolled { padding: 8px 0; }
  .container { padding: 0 16px; }
  .nav-actions { gap: 7px; }
  .brand { font-size: 20px; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; font-size: 16px; }
  .nav-cta { padding: 8px 12px; font-size: 12px; min-height: 38px; }
}

/* ── MOBILE S (≤480px): hide wordmark, CTA → icon only ── */
@media (max-width: 480px) {
  .brand-wordmark { display: none; }
  .nav-cta .nav-cta-text { display: none; }
  .nav-cta .nav-cta-icon {
    display: block; width: 16px; height: 16px;
  }
  .nav-cta {
    width: 42px; height: 42px; padding: 0;
    display: grid; place-items: center; border-radius: 50%;
  }
}

/* ── MOBILE XS (≤375px): move lang + theme INSIDE drawer ── */
@media (max-width: 375px) {
  .nav-actions > .theme-toggle,
  .nav-actions > .lang-toggle { display: none; }
}

/* ============================================================
   MOBILE MENU DRAWER
   ============================================================ */
.mobile-menu {
  position: fixed; inset: 0; z-index: 200;
  /* Solid opaque fallback first, so the drawer never goes transparent on
     browsers that don't support color-mix / oklab / backdrop-filter. */
  background: #F8F4ED;
  background: var(--bg, #F8F4ED);
  display: flex; flex-direction: column;
  padding: 22px 26px max(28px, env(safe-area-inset-bottom));
  padding-top: max(22px, env(safe-area-inset-top));
  /* Initial state: slid up off-screen + transparent */
  transform: translateY(-100%);
  opacity: 0;
  transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .2s ease;
  overflow-y: auto;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu[hidden] { display: none; }

.mobile-menu-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 30px;
}
.mobile-menu-close {
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center;
  color: var(--ink); cursor: pointer;
  transition: background .15s;
}
.mobile-menu-close:hover { background: var(--bg-2); }
.mobile-menu-close svg { width: 18px; height: 18px; }

.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a {
  font-family: var(--font-serif);
  font-size: clamp(26px, 6vw, 36px);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: color .15s, padding-left .15s;
}
.mobile-menu nav a:hover { color: var(--green); padding-left: 6px; }
.mobile-menu nav a.active { color: var(--green); font-style: italic; }
.mobile-menu-cta {
  margin-top: 18px;
  padding: 14px 18px !important;
  background: var(--ink); color: var(--bg) !important;
  border-radius: 999px !important;
  border-bottom: none !important;
  text-align: center;
  font-family: var(--font-sans) !important;
  font-size: 15px !important;
  font-weight: 600;
}

/* Bottom-of-drawer: lang/theme appear ONLY on ≤375px (relocated from nav-actions) */
.mobile-menu-bottom { margin-top: auto; padding-top: 24px; }
.mobile-menu-controls { display: none; gap: 12px; }
@media (max-width: 375px) {
  .mobile-menu-controls { display: flex; }
  .mobile-menu .lang-toggle, .mobile-menu .theme-toggle { display: inline-flex; }
}

/* Body scroll lock when drawer open */
body.menu-open { overflow: hidden; }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 60px; align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2); font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.hero-tag-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-mist); color: var(--green);
  display: grid; place-items: center; font-size: 12px;
}
.hero h1 { margin: 24px 0 28px; }
.hero h1 .accent {
  font-style: italic; color: var(--green); position: relative;
  display: inline-block;
}
.hero h1 .accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.05em;
  height: 0.08em; background: var(--gold); opacity: 0.6;
}
.hero-lede { margin-bottom: 36px; max-width: 48ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-meta {
  display: flex; align-items: center; gap: 28px;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.hero-meta-item {
  display: flex; flex-direction: column;
}
.hero-meta-num {
  font-family: var(--font-serif); font-size: 32px; color: var(--ink); line-height: 1;
}
.hero-meta-label { font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: 0.04em; }
.hero-meta-sep { width: 1px; height: 36px; background: var(--line-2); }

/* Hero visual */
.hero-visual { position: relative; }
.hero-photo {
  width: 100%; aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-xl);
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 8s ease;
}
.hero-photo:hover img { transform: scale(1.05); }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,14,11,0.25), transparent 40%);
  pointer-events: none;
}

/* Floating cards over hero */
.float-card {
  position: absolute;
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  z-index: 2;
  animation: floatIn 1.2s cubic-bezier(.2,.8,.2,1) backwards;
}
[data-theme="dark"] .float-card { border-color: rgba(244,239,227,0.1); }
.float-card.fc-meal {
  top: 6%; left: -10%;
  display: flex; align-items: center; gap: 12px;
  animation-delay: 0.4s;
}
.float-card.fc-meal img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.float-card.fc-meal .fc-title { font-size: 13px; font-weight: 600; }
.float-card.fc-meal .fc-sub { font-size: 11.5px; color: var(--muted); }
.float-card.fc-stat {
  bottom: 12%; left: -8%;
  animation-delay: 0.6s;
}
.float-card.fc-stat .fc-num { font-family: var(--font-serif); font-size: 28px; line-height: 1; color: var(--green); }
.float-card.fc-stat .fc-label { font-size: 11.5px; color: var(--muted); margin-top: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.float-card.fc-macro {
  top: 12%; right: -10%;
  animation-delay: 0.5s;
  min-width: 180px;
}
.float-card.fc-macro .fc-title { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.macro-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.macro-dot { width: 6px; height: 6px; border-radius: 50%; }
.macro-dot.p { background: var(--green); }
.macro-dot.c { background: var(--gold); }
.macro-dot.f { background: #C4654F; }
.macro-row .label { font-size: 12px; flex: 1; }
.macro-row .val { font-size: 12px; font-weight: 600; }

@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 920px) {
  .hero { padding: 110px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; max-width: 360px; margin: 0 auto; }
  .float-card.fc-meal { left: -4%; top: 4%; }
  .float-card.fc-macro { right: -4%; top: 10%; }
  .float-card.fc-stat { left: -4%; bottom: 8%; }
}

/* ============================================
   MARQUEE STRIP
   ============================================ */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 22px 0;
  overflow: hidden;
  margin-top: 40px;
}
.marquee-track {
  display: flex; gap: 64px;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
}
.marquee-track span {
  font-family: var(--font-serif); font-size: 22px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 64px;
}
.marquee-track span::after {
  content: "✦"; color: var(--gold); font-size: 14px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   SECTION SHELL
   ============================================ */
section { padding: 110px 0; position: relative; }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 60px; max-width: 720px; }
.section-head.center { text-align: center; align-items: center; margin-left: auto; margin-right: auto; }
.section-head .lede { margin-top: 4px; }

@media (max-width: 720px) {
  section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
}

/* ============================================
   ABOUT
   ============================================ */
.about { background: var(--bg-3); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
[data-theme="dark"] .about { background: var(--bg-2); }
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: center; }
.about-photo {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-badge {
  position: absolute; bottom: 20px; left: 20px; right: 20px;
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  backdrop-filter: blur(14px);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 14px;
  border: 1px solid rgba(255,255,255,0.4);
}
[data-theme="dark"] .about-badge { border-color: rgba(244,239,227,0.1); }
.about-badge-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--green-mist); display: grid; place-items: center;
}
.about-badge-icon svg { width: 22px; height: 22px; stroke: var(--green); }
.about-badge-text .t { font-size: 13px; font-weight: 600; }
.about-badge-text .s { font-size: 11.5px; color: var(--muted); }

.about-body h2 { margin: 18px 0 24px; }
.about-body p { color: var(--muted); margin-bottom: 18px; max-width: 56ch; }
.about-body .signature {
  margin-top: 32px;
  font-family: var(--font-serif); font-style: italic; font-size: 32px; color: var(--green);
}
.about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-top: 44px; border-top: 1px solid var(--line); padding-top: 32px;
}
.about-stat { padding-right: 20px; border-right: 1px solid var(--line); }
.about-stat:last-child { border-right: 0; padding-right: 0; padding-left: 20px; }
.about-stat:nth-child(2) { padding-left: 20px; }
.about-stat .num { font-family: var(--font-serif); font-size: 44px; line-height: 1; color: var(--ink); }
.about-stat .num sup { font-size: 24px; color: var(--gold); }
.about-stat .lbl { font-size: 12px; color: var(--muted); margin-top: 8px; letter-spacing: 0.04em; }

@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { max-width: 420px; margin: 0 auto; }
}

/* ============================================
   SERVICES
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.svc-card {
  grid-column: span 2;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s ease, border-color 0.4s ease;
  display: flex; flex-direction: column;
  min-height: 280px;
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-2);
}
.svc-card.featured { grid-column: span 3; background: var(--ink); color: var(--bg); border-color: transparent; }
.svc-card.featured .svc-num, .svc-card.featured .svc-meta { color: var(--muted-2); }
.svc-card.featured .svc-icon { background: rgba(255,255,255,0.08); }
.svc-card.featured .svc-icon svg { stroke: var(--gold-soft); }
.svc-card.tall { grid-column: span 3; }

.svc-num {
  font-family: var(--font-serif); font-size: 14px; font-style: italic;
  color: var(--muted); position: absolute; top: 24px; right: 28px;
}
.svc-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--bg-2); display: grid; place-items: center;
  margin-bottom: 24px;
}
.svc-icon svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.4; }
.svc-title { font-family: var(--font-serif); font-size: 28px; line-height: 1.05; margin-bottom: 12px; letter-spacing: -0.01em; }
.svc-desc { font-size: 14.5px; color: var(--muted); line-height: 1.55; max-width: 38ch; }
.svc-card.featured .svc-desc { color: var(--muted-2); }
.svc-meta { margin-top: auto; padding-top: 18px; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.svc-meta::before { content: "→ "; }

@media (max-width: 920px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-card, .svc-card.featured, .svc-card.tall { grid-column: span 1; }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ============================================
   TRANSFORMATION
   ============================================ */
.transform { background: var(--bg-2); }
[data-theme="dark"] .transform { background: var(--bg-3); }
.transform-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.compare {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  user-select: none;
  box-shadow: var(--shadow-xl);
  cursor: ew-resize;
}
.compare-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare-img img { width: 100%; height: 100%; object-fit: cover; }
.compare-before { clip-path: inset(0 50% 0 0); transition: clip-path 0.05s linear; }
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; background: var(--bg); transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}
.compare-handle-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.compare-handle-knob::before { content: "‹›"; font-size: 18px; letter-spacing: -2px; color: var(--ink); }
.compare-label {
  position: absolute; top: 20px;
  padding: 6px 14px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  background: color-mix(in oklab, #0F0E0B 70%, transparent); color: #fff;
  backdrop-filter: blur(8px);
}
.compare-label.before { left: 20px; }
.compare-label.after { right: 20px; }

.transform-body h2 { margin: 18px 0 22px; }
.transform-body p { color: var(--muted); margin-bottom: 30px; }
.transform-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 32px; }
.tstat {
  background: var(--surface); border: 1px solid var(--line);
  padding: 18px 20px; border-radius: var(--radius-md);
}
.tstat .v { font-family: var(--font-serif); font-size: 32px; color: var(--green); line-height: 1; }
.tstat .v.gold { color: var(--gold); }
.tstat .l { font-size: 12px; color: var(--muted); margin-top: 8px; }
.transform-quote {
  font-family: var(--font-serif); font-style: italic; font-size: 22px;
  color: var(--ink-2); line-height: 1.35; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.transform-author { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.transform-author img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }

@media (max-width: 920px) {
  .transform-grid { grid-template-columns: 1fr; gap: 40px; }
  .compare { max-width: 420px; margin: 0 auto; }
}

/* ============================================
   MEAL PLAN
   ============================================ */
.meals-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
.meal-week {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-md);
}
.meal-week-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; }
.meal-week-head h3 { font-family: var(--font-serif); font-size: 28px; line-height: 1; }
.meal-week-head .pill {
  font-size: 11px; padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--green-mist); color: var(--green); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.day-tabs { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.day-tab {
  padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  background: var(--bg); color: var(--muted);
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.day-tab.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.day-tab:hover:not(.active) { color: var(--ink); }
.day-meals { display: flex; flex-direction: column; gap: 12px; }
.meal-row {
  display: grid; grid-template-columns: 60px 1fr auto; gap: 16px; align-items: center;
  padding: 14px; border-radius: var(--radius-md);
  background: var(--bg); border: 1px solid var(--line);
  transition: transform 0.25s ease;
}
.meal-row:hover { transform: translateX(4px); }
.meal-row img { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; }
.meal-row .meal-name { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.meal-row .meal-info { font-size: 12px; color: var(--muted); }
.meal-row .meal-cal { font-family: var(--font-serif); font-size: 22px; color: var(--ink); }
.meal-row .meal-cal small { font-size: 11px; color: var(--muted); display: block; text-align: right; letter-spacing: 0.04em; }

.meal-side {
  display: flex; flex-direction: column; gap: 20px;
}
.totals-card {
  background: var(--ink); color: var(--bg);
  border-radius: var(--radius-lg); padding: 32px;
}
.totals-card .label { font-size: 11px; color: var(--muted-2); letter-spacing: 0.12em; text-transform: uppercase; }
.totals-card .big { font-family: var(--font-serif); font-size: 72px; line-height: 1; margin: 12px 0 6px; }
.totals-card .sub { font-size: 13px; color: var(--muted-2); margin-bottom: 28px; }
.macros-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.macros-bar div.p { background: var(--green-soft); }
.macros-bar div.c { background: var(--gold-soft); }
.macros-bar div.f { background: #C4654F; }
.macros-key { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.macros-key .k { font-size: 11px; color: var(--muted-2); letter-spacing: 0.04em; text-transform: uppercase; }
.macros-key .v { font-family: var(--font-serif); font-size: 22px; color: var(--bg); margin-top: 4px; }
.macros-key .v small { font-size: 11px; color: var(--muted-2); }

.recipe-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.recipe-card .img { aspect-ratio: 16/10; overflow: hidden; }
.recipe-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.recipe-card:hover .img img { transform: scale(1.04); }
.recipe-card .body { padding: 22px; }
.recipe-card .tag { font-size: 11px; color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.recipe-card .name { font-family: var(--font-serif); font-size: 24px; margin: 8px 0 8px; line-height: 1.1; }
.recipe-card .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; }
.recipe-card .meta span { display: inline-flex; align-items: center; gap: 5px; }

@media (max-width: 920px) {
  .meals-grid { grid-template-columns: 1fr; }
}

/* ============================================
   MACROS / CALCULATOR
   ============================================ */
.calc { background: var(--bg-3); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
[data-theme="dark"] .calc { background: var(--bg-2); }
.calc-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.calc-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow-md);
}
.calc-tabs {
  display: flex; gap: 4px;
  background: var(--bg); padding: 4px; border-radius: var(--radius-pill);
  margin-bottom: 28px;
}
.calc-tab {
  flex: 1; padding: 10px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.calc-tab.active { background: var(--ink); color: var(--bg); }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: span 2; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.field input, .field select {
  padding: 13px 16px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 14.5px;
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--green); background: var(--surface); }
.seg { display: flex; gap: 4px; background: var(--bg); padding: 3px; border-radius: 14px; border: 1px solid var(--line); }
.seg button { flex: 1; padding: 10px; border-radius: 11px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: all 0.2s; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.calc-btn { margin-top: 8px; }

.calc-result {
  display: flex; flex-direction: column; gap: 16px;
}
.result-big {
  background: linear-gradient(135deg, #1a1814 0%, #2a2620 100%);
  color: var(--bg); padding: 36px; border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.result-big::before {
  content: ""; position: absolute; top: -50%; right: -20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(212,179,119,0.15), transparent 70%);
}
.result-big .label { font-size: 11px; color: var(--muted-2); letter-spacing: 0.12em; text-transform: uppercase; }
.result-big .num { font-family: var(--font-serif); font-size: 86px; line-height: 1; margin-top: 8px; }
.result-big .num small { color: var(--gold-soft); font-size: 24px; }
.result-big .desc { font-size: 13px; color: var(--muted-2); margin-top: 8px; }
.result-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mac-cell {
  background: var(--surface); border: 1px solid var(--line);
  padding: 18px; border-radius: var(--radius-md);
}
.mac-cell .lbl { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.mac-cell .lbl::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.mac-cell.protein .lbl::before { background: var(--green); }
.mac-cell.carbs .lbl::before { background: var(--gold); }
.mac-cell.fat .lbl::before { background: #C4654F; }
.mac-cell .num { font-family: var(--font-serif); font-size: 36px; color: var(--ink); margin-top: 8px; line-height: 1; }
.mac-cell .num small { font-size: 14px; color: var(--muted); }
.mac-cell .pct { font-size: 12px; color: var(--muted); margin-top: 4px; }

.bmi-out {
  background: var(--surface); border: 1px solid var(--line);
  padding: 22px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: space-between;
}
.bmi-out .v { font-family: var(--font-serif); font-size: 36px; line-height: 1; }
.bmi-out .cat { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.bmi-out .cat .lbl { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.bmi-out .cat .pill { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--green-mist); color: var(--green); }
.bmi-track {
  height: 8px; border-radius: 999px; margin-top: 14px; position: relative;
  background: linear-gradient(to right, #6B8E5A 0% 25%, #C4A040 25% 50%, #E08A4F 50% 75%, #C4654F 75% 100%);
}
.bmi-marker { position: absolute; top: -4px; width: 4px; height: 16px; background: var(--ink); border-radius: 2px; transition: left 0.4s cubic-bezier(.2,.8,.2,1); }

@media (max-width: 920px) {
  .calc-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .calc-form { grid-template-columns: 1fr; }
  .field.full { grid-column: span 1; }
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testi-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.tcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px;
  display: flex; flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tcard .stars { color: var(--gold); font-size: 14px; letter-spacing: 2px; margin-bottom: 18px; }
.tcard .quote { font-family: var(--font-serif); font-size: 22px; line-height: 1.35; color: var(--ink); margin-bottom: 28px; flex: 1; }
.tcard .who { display: flex; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.tcard .who img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.tcard .who .n { font-size: 13.5px; font-weight: 600; }
.tcard .who .r { font-size: 12px; color: var(--muted); }
.tcard.featured { grid-row: span 2; background: var(--green-mist); border-color: transparent; }
[data-theme="dark"] .tcard.featured { background: #1F2A1B; }
.tcard.featured .quote { font-size: 28px; color: var(--green); }

@media (max-width: 920px) {
  .testi-grid { grid-template-columns: 1fr 1fr; }
  .tcard.featured { grid-row: span 1; grid-column: span 2; }
}
@media (max-width: 600px) {
  .testi-grid { grid-template-columns: 1fr; }
  .tcard.featured { grid-column: span 1; }
}

/* ============================================
   PRICING
   ============================================ */
.pricing { background: var(--bg-2); }
[data-theme="dark"] .pricing { background: var(--bg-3); }
.price-toggle {
  display: inline-flex; padding: 4px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  margin: 12px auto 60px; align-self: center;
}
.price-toggle button { padding: 9px 22px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.price-toggle button.active { background: var(--ink); color: var(--bg); }
.price-toggle .save { font-size: 10px; color: var(--gold); margin-left: 6px; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.price-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 36px;
  display: flex; flex-direction: column;
  position: relative;
}
.price-card.featured {
  background: var(--ink); color: var(--bg); border-color: transparent;
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}
.price-card.featured .price-meta, .price-card.featured ul li { color: var(--muted-2); }
.price-card.featured .check { color: var(--gold-soft); }
.price-card.featured .price-name { color: var(--gold-soft); }
.price-card .ribbon {
  position: absolute; top: -12px; right: 24px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--gold); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.price-name { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.price-title { font-family: var(--font-serif); font-size: 32px; margin: 10px 0 16px; line-height: 1.1; }
.price-amount { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.price-amount .cur { font-size: 18px; color: var(--muted); }
.price-amount .num { font-family: var(--font-serif); font-size: 62px; line-height: 1; }
.price-amount .per { font-size: 13px; color: var(--muted); }
.price-meta { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 0 0 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.price-card.featured ul { border-top-color: rgba(244,239,227,0.12); }
.price-card ul li { font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.check {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green-mist); color: var(--green);
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  margin-top: 2px;
}
.price-card .btn { margin-top: auto; width: 100%; }

@media (max-width: 920px) {
  .price-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .price-card.featured { transform: scale(1); }
}

/* ============================================
   FAQ
   ============================================ */
.faq-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: flex-start; }
.faq-side h2 { margin: 18px 0 20px; }
.faq-side p { color: var(--muted); margin-bottom: 24px; }
.faq-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left;
  padding: 26px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-family: var(--font-serif); font-size: 22px; line-height: 1.25;
  color: var(--ink);
}
.faq-q-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-2); display: grid; place-items: center;
  flex-shrink: 0; transition: background 0.2s, transform 0.4s;
  font-size: 18px;
}
.faq-item.open .faq-q-toggle { background: var(--green); color: var(--bg); transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-a-inner { padding-bottom: 26px; color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 65ch; }

@media (max-width: 920px) {
  .faq-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ============================================
   BOOKING
   ============================================ */
.booking { background: var(--ink); color: var(--bg); }
.booking .container { position: relative; }
.book-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: center; }
.booking .eyebrow { color: var(--muted-2); }
.booking .eyebrow::before { background: var(--gold-soft); }
.booking h2 { color: var(--bg); }
.booking .lede { color: var(--muted-2); }
.book-perks { display: flex; flex-direction: column; gap: 14px; margin: 30px 0; }
.book-perk { display: flex; gap: 14px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.book-perk .ic { width: 28px; height: 28px; border-radius: 50%; background: rgba(212,179,119,0.15); display: grid; place-items: center; color: var(--gold-soft); flex-shrink: 0; font-size: 14px; }
.booking .book-perk { color: var(--muted-2); }
.booking .book-perk strong { color: var(--bg); font-weight: 600; }

.book-form-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.book-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.book-form .field { color: var(--bg); }
.book-form label { color: var(--muted-2); }
.book-form input, .book-form select, .book-form textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--bg);
}
.book-form input::placeholder, .book-form textarea::placeholder { color: var(--muted-2); }
.book-form input:focus, .book-form select:focus, .book-form textarea:focus { border-color: var(--gold-soft); background: rgba(255,255,255,0.06); }
.book-form textarea { min-height: 100px; resize: vertical; padding: 13px 16px; border-radius: 14px; }
.book-form .full { grid-column: span 2; }
.book-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
.book-slot {
  padding: 10px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  font-size: 12px; font-weight: 600; color: var(--bg);
  transition: all 0.2s;
}
.book-slot.active { background: var(--gold-soft); color: var(--ink); border-color: transparent; }
.book-slot:hover:not(.active) { background: rgba(255,255,255,0.08); }
.book-slot.taken { opacity: 0.35; cursor: not-allowed; }
.book-form .btn-gold { width: 100%; padding: 17px; }
.book-success {
  text-align: center; padding: 40px 20px;
  display: none;
}
.book-success.show { display: block; }
.book-success .check-big { width: 64px; height: 64px; border-radius: 50%; background: var(--green-mist); color: var(--green); display: grid; place-items: center; margin: 0 auto 18px; font-size: 28px; }
.book-success h3 { font-family: var(--font-serif); font-size: 28px; margin-bottom: 8px; }
.book-success p { color: var(--muted-2); }

@media (max-width: 920px) {
  .book-grid { grid-template-columns: 1fr; gap: 40px; }
  .book-form { grid-template-columns: 1fr; }
  .book-form .full { grid-column: span 1; }
  .book-slots { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   SOCIAL
   ============================================ */
.social-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; flex-wrap: wrap; gap: 20px; }
.social-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.social-grid a {
  position: relative; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-md);
  transition: transform 0.4s ease;
}
.social-grid a:hover { transform: scale(0.97); }
.social-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.social-grid a:hover img { transform: scale(1.1); }
.social-grid a::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(15,14,11,0.4));
  opacity: 0; transition: opacity 0.3s ease;
}
.social-grid a:hover::after { opacity: 1; }
.social-grid a .plat {
  position: absolute; bottom: 10px; left: 10px;
  font-size: 11px; color: #fff; opacity: 0;
  transition: opacity 0.3s ease; z-index: 2;
  font-weight: 600;
}
.social-grid a:hover .plat { opacity: 1; }
.social-grid a.big { grid-column: span 2; grid-row: span 2; }

@media (max-width: 920px) {
  .social-grid { grid-template-columns: repeat(3, 1fr); }
  .social-grid a.big { grid-column: span 2; grid-row: span 2; }
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--bg);
  padding: 100px 0 40px;
  border-top: 1px solid var(--line);
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; margin-bottom: 80px; }
.foot-brand p { font-size: 14.5px; color: var(--muted); margin-top: 18px; max-width: 36ch; }
.foot-col h4 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; font-weight: 600; }
.foot-col a { display: block; padding: 5px 0; font-size: 14px; color: var(--ink); transition: color 0.2s; }
.foot-col a:hover { color: var(--green); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 30px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
  flex-wrap: wrap; gap: 16px;
}
.foot-bottom .social-mini { display: flex; gap: 8px; }
.foot-bottom .social-mini a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 13px;
  transition: background 0.2s, color 0.2s;
}
.foot-bottom .social-mini a:hover { background: var(--ink); color: var(--bg); }
.foot-legal-links { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.foot-legal-links a { color: var(--muted); transition: color 0.15s; }
.foot-legal-links a:hover { color: var(--ink); }
.foot-mega {
  font-family: var(--font-serif);
  font-size: clamp(80px, 18vw, 280px);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  text-align: center;
  letter-spacing: -0.04em;
  margin-bottom: 40px;
  user-select: none;
}

@media (max-width: 920px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ============================================
   FADE-IN ANIMATIONS
   ============================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* selection */
::selection { background: var(--gold); color: #fff; }

/* ============================================
   ACTIVE NAV STATE + PAGE LOADING
   ============================================ */
.nav-links a.active { background: var(--ink); color: var(--bg); }
.nav-links a.active:hover { background: var(--ink); color: var(--bg); }

body { opacity: 0; transition: opacity 0.6s ease; }
body.page-loaded { opacity: 1; }

/* ============================================
   PAGE HERO (compact, for inner pages)
   ============================================ */
.page-hero { padding: 160px 0 80px; position: relative; overflow: hidden; }
.page-hero-inner { max-width: 880px; }
.page-hero h1 { margin: 18px 0 24px; }
.page-hero .lede { font-size: clamp(17px, 1.4vw, 21px); }
.page-hero-meta {
  display: flex; flex-wrap: wrap; gap: 36px;
  margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line);
}
.page-hero-meta div { display: flex; flex-direction: column; }
.page-hero-meta .num { font-family: var(--font-serif); font-size: 32px; color: var(--ink); line-height: 1; }
.page-hero-meta .lbl { font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: 0.04em; }

@media (max-width: 720px) {
  .page-hero { padding: 120px 0 60px; }
}

/* ============================================
   RECIPES PAGE
   ============================================ */
.recipe-search {
  position: relative;
  max-width: 720px; margin: 0 auto 32px;
}
.recipe-search input {
  width: 100%; padding: 20px 24px 20px 60px;
  border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 16px; box-shadow: var(--shadow-md);
}
.recipe-search input:focus { outline: none; border-color: var(--green); }
.recipe-search::before {
  content: ""; position: absolute; top: 50%; left: 22px;
  width: 20px; height: 20px;
  transform: translateY(-50%);
  background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6457' stroke-width='1.8' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>");
}
.recipe-filters {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 50px;
}
.r-filter {
  padding: 10px 18px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--muted);
  transition: all 0.2s;
}
.r-filter.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.r-filter:hover:not(.active) { color: var(--ink); }

.recipes-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.r-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s;
}
.r-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.r-card .img { aspect-ratio: 5/4; overflow: hidden; position: relative; }
.r-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.r-card:hover .img img { transform: scale(1.06); }
.r-card .img .badge {
  position: absolute; top: 14px; left: 14px;
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px);
  padding: 5px 11px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink);
}
.r-card .body { padding: 22px 24px 24px; }
.r-card .tag { font-size: 11px; color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.r-card .name { font-family: var(--font-serif); font-size: 24px; margin: 8px 0 12px; line-height: 1.15; }
.r-card .desc { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.r-card .meta {
  display: flex; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.r-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.r-card .meta b { color: var(--ink); font-weight: 600; }

.r-empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); }

@media (max-width: 920px) { .recipes-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .recipes-grid { grid-template-columns: 1fr; } }

/* ============================================
   BLOG / JOURNAL
   ============================================ */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card {
  display: flex; flex-direction: column;
  transition: transform 0.4s;
}
.blog-card:hover { transform: translateY(-4px); }
.blog-card .img {
  aspect-ratio: 5/4; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 20px;
}
.blog-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.blog-card:hover .img img { transform: scale(1.05); }
.blog-card .cat { font-size: 11px; color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.blog-card h3 { font-family: var(--font-serif); font-size: 26px; line-height: 1.15; margin: 10px 0 12px; }
.blog-card p { font-size: 14px; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.blog-card .meta { font-size: 12px; color: var(--muted); display: flex; gap: 14px; }

.blog-featured {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px;
  align-items: center; margin-bottom: 80px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.blog-featured .img { aspect-ratio: 4/3; }
.blog-featured .img img { width: 100%; height: 100%; object-fit: cover; }
.blog-featured .body { padding: 40px 50px; }
.blog-featured h2 { font-family: var(--font-serif); font-size: clamp(32px, 3vw, 48px); line-height: 1.1; letter-spacing: -0.01em; margin: 14px 0 20px; }
.blog-featured p { color: var(--muted); margin-bottom: 24px; max-width: 50ch; }

@media (max-width: 920px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured .body { padding: 30px; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ============================================
   PROGRAMS DETAIL
   ============================================ */
.program-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  align-items: center;
  padding: 60px 0; border-bottom: 1px solid var(--line);
}
.program-row:nth-child(even) .program-img { order: 2; }
.program-img { aspect-ratio: 5/4; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.program-img img { width: 100%; height: 100%; object-fit: cover; }
.program-body .num { font-family: var(--font-serif); font-style: italic; font-size: 18px; color: var(--gold); }
.program-body h3 { font-family: var(--font-serif); font-size: clamp(32px, 3vw, 48px); margin: 8px 0 18px; line-height: 1.05; }
.program-body p { color: var(--muted); margin-bottom: 22px; max-width: 50ch; }
.program-features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-bottom: 28px; }
.program-features div { font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.program-features div::before {
  content: "✓"; color: var(--green); font-weight: 700; font-size: 12px;
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--green-mist);
  display: grid; place-items: center; margin-top: 2px;
}

@media (max-width: 920px) {
  .program-row { grid-template-columns: 1fr; gap: 30px; padding: 40px 0; }
  .program-row:nth-child(even) .program-img { order: -1; }
}

/* ============================================
   PRICING COMPARE TABLE
   ============================================ */
.compare-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.compare-table th, .compare-table td {
  padding: 18px 22px; text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.compare-table thead th {
  background: var(--bg-2); font-family: var(--font-serif); font-weight: 400;
  font-size: 22px; padding-top: 24px; padding-bottom: 24px;
  vertical-align: top;
}
.compare-table thead th .price { display: block; font-family: var(--font-sans); font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 500; }
.compare-table thead th.featured { background: var(--ink); color: var(--bg); position: relative; }
.compare-table thead th.featured .price { color: var(--gold-soft); }
.compare-table tbody tr:hover { background: var(--bg-2); }
.compare-table td.center { text-align: center; }
.compare-table td .yes { color: var(--green); font-size: 16px; }
.compare-table td .no { color: var(--muted-2); font-size: 14px; }
.compare-table td:first-child { color: var(--muted); }

@media (max-width: 720px) {
  .compare-table { font-size: 12px; }
  .compare-table th, .compare-table td { padding: 12px 10px; }
  .compare-table thead th { font-size: 16px; }
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: flex-start; }
.contact-info-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px;
  margin-bottom: 16px;
}
.contact-info-card .ic {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--green-mist); color: var(--green);
  display: grid; place-items: center; font-size: 18px;
  margin-bottom: 16px;
}
.contact-info-card h4 { font-family: var(--font-serif); font-size: 22px; margin-bottom: 6px; }
.contact-info-card p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.contact-info-card a { color: var(--ink); font-weight: 500; }
.contact-form-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 40px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 920px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================
   CLIENT PORTAL — auth pages
   ============================================ */
.auth-shell {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
.auth-side {
  background: var(--ink); color: var(--bg);
  padding: 60px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-side::before {
  content: ""; position: absolute; inset: 0;
  background: url("https://images.unsplash.com/photo-1490645935967-10de6ba17061?w=1200&q=80") center/cover;
  opacity: 0.25;
}
.auth-side > * { position: relative; z-index: 1; }
.auth-side .brand { color: var(--bg); }
.auth-side .brand-mark { background: var(--bg); color: var(--ink); }
.auth-side h1 { font-family: var(--font-serif); font-size: clamp(48px, 5vw, 72px); line-height: 1; margin-bottom: 24px; letter-spacing: -0.01em; }
.auth-side p { color: var(--muted-2); max-width: 36ch; font-size: 16px; line-height: 1.6; }
.auth-quote { padding: 26px 0 0; border-top: 1px solid rgba(244,239,227,0.15); font-family: var(--font-serif); font-style: italic; font-size: 22px; }
.auth-quote .name { font-family: var(--font-sans); font-style: normal; font-size: 13px; color: var(--muted-2); margin-top: 8px; }

.auth-form-wrap {
  padding: 60px; display: flex; flex-direction: column; justify-content: center;
  max-width: 520px; width: 100%; margin: 0 auto;
}
.auth-tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: var(--radius-pill); margin-bottom: 36px; }
.auth-tabs button { flex: 1; padding: 12px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600; color: var(--muted); transition: all 0.2s; }
.auth-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .field input { padding: 15px 18px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.auth-row a { color: var(--green); font-weight: 600; }
.auth-form .btn { padding: 17px; margin-top: 8px; }
.auth-divider {
  display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px;
  margin: 8px 0;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-social { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-social button {
  padding: 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s;
}
.auth-social button:hover { background: var(--bg-2); }

@media (max-width: 920px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { padding: 40px 30px; min-height: 280px; }
  .auth-form-wrap { padding: 40px 30px; }
}

/* ============================================
   CLIENT PORTAL — dashboard
   ============================================ */
.portal {
  display: grid; grid-template-columns: 260px 1fr;
  min-height: 100vh; background: var(--bg);
}
.portal-side {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 28px 20px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.portal-side .brand { padding: 0 8px 30px; }
.portal-nav { display: flex; flex-direction: column; gap: 2px; }
.portal-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: all 0.2s;
}
.portal-nav a:hover { background: var(--bg-2); color: var(--ink); }
.portal-nav a.active { background: var(--ink); color: var(--bg); }
.portal-nav a svg { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.6; }
.portal-nav h5 { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); padding: 14px 12px 6px; }
.portal-user {
  margin-top: auto; padding: 14px; border-radius: 14px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2);
}
.portal-user img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.portal-user .n { font-size: 13px; font-weight: 600; }
.portal-user .e { font-size: 11px; color: var(--muted); }

.portal-main { padding: 36px 44px; }
.portal-top {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.portal-top h1 { font-family: var(--font-serif); font-size: 40px; line-height: 1; letter-spacing: -0.01em; }
.portal-top .greeting { font-size: 13px; color: var(--muted); margin-top: 6px; }
.portal-top .actions { display: flex; gap: 10px; }

.portal-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 20px;
  margin-bottom: 20px;
}
.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px;
}
.tile h3 { font-family: var(--font-serif); font-size: 22px; margin-bottom: 4px; }
.tile .tile-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.tile-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.tile-head .pill { font-size: 11px; padding: 5px 10px; border-radius: 999px; background: var(--green-mist); color: var(--green); font-weight: 600; letter-spacing: 0.04em; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.metric {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 20px;
  position: relative; overflow: hidden;
}
.metric .lbl { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.metric .v { font-family: var(--font-serif); font-size: 38px; line-height: 1; margin-top: 8px; }
.metric .v small { font-size: 14px; color: var(--muted); }
.metric .delta { font-size: 12px; margin-top: 8px; display: inline-flex; gap: 4px; align-items: center; padding: 3px 8px; border-radius: 999px; }
.metric .delta.up { background: var(--green-mist); color: var(--green); }
.metric .delta.down { background: rgba(196,101,79,0.15); color: #C4654F; }

/* Macros ring */
.ring-row { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.ring { position: relative; width: 130px; height: 130px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--bg-2); }
.ring .fill { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.ring-center {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.ring-center .v { font-family: var(--font-serif); font-size: 28px; line-height: 1; }
.ring-center .l { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }

.macro-list { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.macro-line { display: flex; flex-direction: column; gap: 6px; }
.macro-line .top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.macro-line .top .l { color: var(--muted); }
.macro-line .top .v { font-family: var(--font-serif); font-size: 18px; }
.macro-line .top .v small { color: var(--muted); font-size: 11px; }
.macro-line .bar { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.macro-line .bar div { height: 100%; border-radius: 999px; }
.macro-line .bar.p div { background: var(--green); }
.macro-line .bar.c div { background: var(--gold); }
.macro-line .bar.f div { background: #C4654F; }

/* Weight chart */
.chart { width: 100%; height: 180px; margin-top: 6px; }
.chart-path { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; }
.chart-fill { fill: var(--green-mist); opacity: 0.6; }
[data-theme="dark"] .chart-fill { opacity: 0.4; }
.chart-dot { fill: var(--green); }
.chart-axis { font-family: var(--font-sans); font-size: 10px; fill: var(--muted); }

/* Meal day strip */
.meal-strip { display: flex; flex-direction: column; gap: 10px; }
.meal-strip .row {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center;
  padding: 10px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line);
}
.meal-strip .row img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.meal-strip .row .n { font-size: 13px; font-weight: 600; }
.meal-strip .row .s { font-size: 11px; color: var(--muted); }
.meal-strip .row .c { font-family: var(--font-serif); font-size: 18px; }
.meal-strip .row.done { opacity: 0.5; }
.meal-strip .row.done .n { text-decoration: line-through; }

/* Check-in card */
.checkin .q { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.checkin .mood-row { display: flex; gap: 8px; }
.checkin .mood {
  flex: 1; aspect-ratio: 1; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 22px; display: grid; place-items: center;
  transition: all 0.2s;
}
.checkin .mood:hover { background: var(--bg-2); }
.checkin .mood.active { background: var(--green); border-color: var(--green); }

@media (max-width: 920px) {
  /* Portal collapses to single column on mobile.
     Sidebar is fully hidden — bottom-nav handles primary navigation.
     Using !important + visibility + width:0 + 4 properties to bullet-proof
     against any later cascading rule trying to bring the sidebar back. */
  .portal { grid-template-columns: 1fr !important; }
  .portal-side {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
  }
  .nav-toggle-input:checked ~ .portal .portal-side { display: none !important; }
  .portal-main { padding: 24px 20px; }
  .portal-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================
   PORTAL SHARED: dialogs, toast, page layout
   ============================================ */
.dlg-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; }
.dlg-back.open { display: flex; }
.dlg { width: 100%; max-width: 480px; background: var(--bg); border-radius: 18px; padding: 28px 30px 26px; box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: dlgIn .2s ease; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: none; } }
.dlg h3 { font-family: var(--font-serif); font-size: 26px; margin: 0 0 4px; }
.dlg .sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.dlg .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.dlg .field label { font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }
.dlg .field input, .dlg .field select { padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; background: var(--surface); }
.dlg .field input:focus, .dlg .field select:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.dlg .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dlg .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.dlg-actions .btn-cancel { background: transparent; border: 1px solid var(--line); padding: 11px 18px; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer; }
.dlg-actions .btn-save { background: var(--ink); color: var(--bg); border: none; padding: 11px 22px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.dlg-actions .btn-save:hover { opacity: 0.9; }
.dlg-actions .btn-danger { background: #c93f3f; color: #fff; border: none; padding: 11px 22px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 999px; font-size: 13px; opacity: 0; transition: opacity .2s, transform .2s; z-index: 400; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 24px; }
.page-head h1 { font-family: var(--font-serif); font-size: clamp(36px, 5vw, 52px); line-height: 1.05; margin: 6px 0 0; font-weight: 400; }
.page-head .crumb { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

.meal-strip .row { cursor: pointer; transition: background .15s; position: relative; }
.meal-strip .row:hover { background: var(--bg-2); }
.meal-strip .row .del { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: none; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s; font-size: 14px; }
.meal-strip .row:hover .del { opacity: 1; }
.meal-strip .row .del:hover { background: rgba(0,0,0,.08); color: var(--ink); }
.meal-empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13px; }

.history-table { width: 100%; border-collapse: collapse; }
.history-table th, .history-table td { padding: 12px 14px; text-align: left; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.history-table th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.history-table tr:last-child td { border-bottom: none; }
.history-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.history-table tr.today td { background: var(--bg-2); font-weight: 600; }

/* ============================================================
   === Dashboard responsive (≤1200 / ≤900 / ≤640 / ≤480) ===
   Appended last so it overrides earlier rules.
   ============================================================ */

/* ---- Base classes for inline-style replacements ---- */
.greeting-name { font-style: italic; color: var(--green); }
.portal-action { padding: 10px 18px; font-size: 13px; }

.portal-grid--12-10 { grid-template-columns: 1.2fr 1fr; }
.portal-grid--10-12 { grid-template-columns: 1fr 1.2fr; }
.portal-grid--mt { margin-top: 20px; }

.tile--coach { background: var(--ink); color: var(--bg); border-color: transparent; }
.tile--coach .coach-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.tile--coach .coach-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.tile--coach .coach-name { font-size: 13.5px; font-weight: 600; }
.tile--coach .coach-meta { font-size: 11.5px; color: var(--muted-2); }
.tile--coach .coach-quote { font-family: var(--font-serif); font-size: 22px; line-height: 1.3; }
.tile--coach .coach-reply { margin-top: 18px; padding: 11px 18px; font-size: 13px; }

.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 6px; }
.week-events { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.week-event {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 10px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); gap: 8px;
}
.week-event-time--gold  { color: var(--gold); }
.week-event-time--green { color: var(--green); }

/* ---- Safe-area padding for the main pane (iPhone notch / home bar) ---- */
.portal-main {
  padding-left:  max(28px, env(safe-area-inset-left));
  padding-right: max(28px, env(safe-area-inset-right));
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

/* ---- Hamburger button + drawer mechanics (hidden by default on desktop) ---- */
.nav-toggle-input { position: absolute; left: -9999px; }
.nav-toggle-btn {
  display: none;
  position: relative;
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 50%; border: none; background: transparent;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s var(--motion-standard, ease);
}
.nav-toggle-btn::before {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; background: transparent;
  transition: background 0.18s var(--motion-standard, ease);
}
.nav-toggle-btn:hover { background: color-mix(in oklab, var(--ink) 6%, transparent); }
.nav-toggle-btn:active { background: color-mix(in oklab, var(--ink) 12%, transparent); }
.nav-toggle-btn span {
  display: block; width: 20px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.25s var(--motion-emphasized, cubic-bezier(0.2, 0, 0, 1)),
              opacity 0.18s var(--motion-standard, ease);
  transform-origin: center;
}
/* Hamburger → X animation when drawer is open (button is nested in .portal-top, input is at body level — uses :has) */
body:has(.nav-toggle-input:checked) .nav-toggle-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body:has(.nav-toggle-input:checked) .nav-toggle-btn span:nth-child(2) { opacity: 0; }
body:has(.nav-toggle-input:checked) .nav-toggle-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-toggle-backdrop {
  display: none; position: fixed; inset: 0; z-index: 90;
  background: rgba(15,14,11,.42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s var(--motion-standard, ease);
}
.nav-toggle-input:checked ~ .nav-toggle-backdrop { opacity: 1; }

/* ============================================================
   ≤ 1200px — small laptop: tighten columns
   ============================================================ */
@media (max-width: 1200px) {
  .portal { grid-template-columns: 220px 1fr; }
  .portal-main { padding-top: 26px; }
  .metric .v { font-size: 30px; }
  .ring svg { width: 150px; height: 150px; }
}

/* ============================================================
   ≤ 900px — tablet: sidebar becomes a drawer, grids collapse
   ============================================================ */
@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; }

  /* Sidebar → slide-in drawer */
  .portal-side {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; max-width: 86vw;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 30px 80px rgba(15,14,11,.18);
    padding-top: max(24px, env(safe-area-inset-top));
    overflow-y: auto;
  }
  .nav-toggle-input:checked ~ .portal .portal-side { transform: translateX(0); }
  .nav-toggle-input:checked ~ .nav-toggle-backdrop { display: block; }
  .nav-toggle-btn { display: inline-flex; }

  .portal-main {
    padding-top: max(20px, env(safe-area-inset-top));
    padding-left:  max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  /* Both portal-grid rows collapse to single column */
  .portal-grid,
  .portal-grid--12-10,
  .portal-grid--10-12 { grid-template-columns: 1fr !important; }

  .portal-top { align-items: center; gap: 16px; }
  .portal-top h1 { font-size: clamp(28px, 5vw, 40px); }

  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { padding: 16px 18px; }
  .metric .v { font-size: 28px; }

  /* Chart tile keeps reasonable min-height */
  .tile--chart .chart { min-height: 180px; }
}

/* ============================================================
   ≤ 640px — large phones: stack the portal-top
   ============================================================ */
@media (max-width: 640px) {
  .portal-main { padding-top: 18px; padding-left: 16px; padding-right: 16px; }

  /* Top: hamburger | greeting on first row, actions full-width on second */
  .portal-top {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-areas:
      "burger text"
      "actions actions";
    gap: 12px;
    align-items: center;
  }
  .nav-toggle-btn   { grid-area: burger; }
  .portal-top-text  { grid-area: text; }
  .portal-top .actions { grid-area: actions; display: flex; gap: 10px; }
  .portal-top .actions .portal-action {
    flex: 1; padding: 12px 14px; font-size: 13px; min-height: 44px;
  }
  .portal-top h1 { font-size: clamp(26px, 7vw, 34px); }
  .portal-top .greeting { font-size: 11px; }

  .tile { padding: 20px 18px; }
  .tile-head h3 { font-size: 18px; }

  .metric { padding: 14px 16px; }
  .metric .lbl { font-size: 10px; }
  .metric .v { font-size: 24px; }
  .metric .v small { font-size: 12px; }
  .metric .delta { font-size: 11px; }

  /* Macros tile — keep ring + list side-by-side but tighten */
  .ring-row { gap: 16px; }
  .ring svg { width: 140px; height: 140px; }
  .ring-center .v { font-size: 22px; }

  /* Coach tile */
  .tile--coach .coach-quote { font-size: 18px; }
  .tile--coach .coach-head img { width: 40px; height: 40px; }

  /* Today's meals — tighter rows */
  .meal-strip .row img { width: 40px; height: 40px; }
  .meal-strip .row .n {
    font-size: 13px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 60vw;
  }
  .meal-strip .row .s { font-size: 11px; }
  .meal-strip .row .c { font-size: 13px; }
  .meal-strip .row .del {
    opacity: 1;
    width: 32px; height: 32px;
    background: rgba(0,0,0,.04);
  }

  /* Week ahead — tighten cells */
  .week-grid { gap: 4px; }
  .week-grid > div { font-size: 12px !important; }

  /* Mood buttons (energy + hunger): wrap, keep 40px minimum */
  .mood-row { flex-wrap: wrap; gap: 8px; }
  .mood { min-width: 44px; min-height: 44px; }

  /* Buttons stay tappable */
  .btn { min-height: 44px; }
}

/* ============================================================
   ≤ 520px — macros ring stacks above macro list
   ============================================================ */
@media (max-width: 520px) {
  .ring-row { flex-direction: column; align-items: center; gap: 18px; }
  .ring { width: 140px; height: 140px; align-self: center; }
  .macro-list { width: 100%; }
}

/* ============================================================
   ≤ 480px — small phones: tightest layout
   ============================================================ */
@media (max-width: 480px) {
  .portal-main { padding-left: 14px; padding-right: 14px; }

  .portal-top h1 { font-size: clamp(22px, 8vw, 30px); }

  .metric-grid { gap: 10px; }
  .metric { padding: 12px 14px; border-radius: 14px; }
  .metric .v { font-size: 22px; }

  .tile { padding: 18px 16px; border-radius: 16px; }
  .tile-head { flex-wrap: wrap; gap: 8px; }
  .tile-head h3 { font-size: 17px; }
  .tile-head .pill { font-size: 10px; padding: 4px 8px; }

  /* Today's macros — tighten further */
  .ring svg { width: 130px; height: 130px; }
  .ring-center .v { font-size: 20px; }
  .macro-line .top { font-size: 11.5px; }

  /* Week event rows stack: label on top, time below */
  .week-event {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 12px;
  }
  .week-event-time--gold,
  .week-event-time--green { font-size: 12px; font-weight: 600; }

  /* Coach tile */
  .tile--coach .coach-quote { font-size: 17px; line-height: 1.35; }
  .tile--coach .coach-reply { width: 100%; padding: 12px 18px; }
}

/* ============================================================
   Modals — full-screen sheet on mobile, slides up from bottom
   ============================================================ */
@media (max-width: 640px) {
  .dlg-back { padding: 0; align-items: flex-end; }
  .dlg {
    width: 100%; max-width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 24px 20px max(24px, env(safe-area-inset-bottom));
    max-height: 92vh; overflow-y: auto;
    animation: dlgSlideUp .25s cubic-bezier(.2,.8,.2,1);
  }
  @keyframes dlgSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .dlg h3 { font-size: 24px; }
  .dlg .row2 { grid-template-columns: 1fr; gap: 0; }
  .dlg .row3 { grid-template-columns: 1fr; gap: 0; }
  .dlg .field input,
  .dlg .field select {
    min-height: 44px;
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  .dlg-actions { flex-direction: column-reverse; gap: 10px; }
  .dlg-actions .btn-cancel,
  .dlg-actions .btn-save {
    width: 100%; min-height: 44px; padding: 13px 22px;
  }
}

/* Body scroll lock when modal/drawer is open */
body:has(.dlg-back.open) { overflow: hidden; }
body:has(.nav-toggle-input:checked) { overflow: hidden; }

/* ============================================================
   Accessibility nicety: reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .portal-side, .dlg, .nav-toggle-btn { transition: none !important; animation: none !important; }
}

/* === End dashboard responsive === */

/* ============================================================
   === Gender radio group on signup form ===
   ============================================================ */
.gender-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gender-opt {
  flex: 1; min-width: 90px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); cursor: pointer; transition: all 0.15s;
  font-size: 13.5px; user-select: none;
}
.gender-opt:hover { background: var(--bg-2); }
.gender-opt input[type="radio"] { accent-color: var(--green); }
.gender-opt:has(input[type="radio"]:checked) {
  background: var(--green-mist);
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}

@media (max-width: 480px) {
  .gender-row { flex-direction: column; }
  .gender-opt { width: 100%; }
}

/* ============================================================
   === Subscription gate (locked tiles + paywall modal) ===
   ============================================================ */

/* The wrapped tile/section becomes blurred + non-interactive */
.gated { position: relative; isolation: isolate; }
.gated > *:not(.gate-overlay) {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

/* Crisp overlay on top */
.gate-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 70%, transparent), color-mix(in oklab, var(--bg) 90%, transparent));
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  padding: 24px; z-index: 2;
}
.gate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 26px 24px;
  text-align: center;
  max-width: 280px;
  box-shadow: var(--shadow-md);
}
.gate-lock {
  width: 44px; height: 44px; margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--ink); color: var(--gold-soft);
  display: grid; place-items: center;
}
.gate-title {
  font-family: var(--font-serif);
  font-size: 22px; line-height: 1.1;
  color: var(--ink);
  margin-bottom: 6px;
}
.gate-sub {
  font-size: 13px; color: var(--muted);
  margin-bottom: 16px; line-height: 1.45;
}
.gate-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #fff; border: none; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px -8px rgba(184, 146, 77, 0.55);
  transition: transform 0.2s;
}
.gate-cta:hover { transform: translateY(-2px); }

/* ============================================================
   === Paywall modal (#dlgPaywall) ===
   ============================================================ */
.dlg-paywall {
  max-width: 540px;
  text-align: center;
  padding: 36px 36px 28px;
}
.dlg-paywall .pw-lock {
  width: 56px; height: 56px; margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--ink); color: var(--gold-soft);
  display: grid; place-items: center;
}
.dlg-paywall h3 {
  font-family: var(--font-serif);
  font-size: 36px; line-height: 1.05;
  margin-bottom: 8px;
}
.dlg-paywall .sub {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 22px;
}
.pw-perks {
  list-style: none; padding: 0; margin: 0 0 26px;
  text-align: left;
  display: inline-flex; flex-direction: column;
  gap: 8px;
}
.pw-perks li {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--ink-2);
}
.pw-perks li span {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-mist); color: var(--green);
  font-size: 12px; font-weight: 700; flex: 0 0 22px;
}
.pw-plans {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.pw-plan {
  position: relative;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 22px 18px 18px;
  font: inherit; color: inherit; cursor: pointer; text-align: center;
  transition: all 0.2s;
}
.pw-plan:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(184, 146, 77, 0.35);
}
.pw-plan--featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.pw-ribbon {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #fff;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.pw-plan-name {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.pw-plan-price {
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
  margin-bottom: 6px;
}
.pw-plan-price .cur { font-family: var(--font-serif); font-size: 20px; color: var(--muted); }
.pw-plan-price .num { font-family: var(--font-serif); font-size: 44px; line-height: 1; color: var(--ink); }
.pw-plan-price .per { font-size: 12px; color: var(--muted); margin-left: 4px; }
.pw-plan-foot {
  font-size: 11.5px; color: var(--muted);
}
.pw-sim {
  display: block; width: 100%;
  padding: 11px;
  background: transparent;
  border: 1px dashed var(--gold);
  border-radius: 10px;
  color: var(--gold);
  font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
}
.pw-sim:hover { background: var(--bg-2); }
.pw-later {
  background: transparent; border: none;
  color: var(--muted); font: inherit; font-size: 13px;
  cursor: pointer; padding: 8px;
}
.pw-later:hover { color: var(--ink); }

@media (max-width: 520px) {
  .dlg-paywall { padding: 28px 22px 22px; }
  .dlg-paywall h3 { font-size: 28px; }
  .pw-plans { grid-template-columns: 1fr; }
  .pw-plan { padding: 18px; }
}

/* === End subscription gate === */

/* ═══════════════════════════════════════════════════════
   RESPONSIVE: Global — Vital Plus
   ═══════════════════════════════════════════════════════ */

/* Skip-to-content link (added by partials.js on every page) */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 0 0 10px 0;
  font-size: 14px; font-weight: 600; z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Cap container at desktop XL */
@media (min-width: 1601px) {
  :root { --container: 1400px; }
}

/* Tablet+ */
@media (min-width: 901px) {
  body { font-size: 16px; }
}
/* Mobile body */
@media (max-width: 900px) {
  body { font-size: 15px; }
}

/* Inputs: prevent iOS zoom on focus */
@media (max-width: 900px) {
  input, select, textarea { font-size: 16px !important; }
}

/* Tap targets */
@media (max-width: 900px) {
  .btn, button.btn, a.btn, .nav-cta { min-height: 44px; }
}

/* Hover only on devices that support it (prevents stuck hover on touch) */
@media (hover: none) {
  .btn:hover, .rx-card:hover, .pr-tier:hover { transform: none !important; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE: Public — Landing / About / Pricing / Auth
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta { padding: 10px 16px; font-size: 13px; }
  section, .container { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS — scroll reveal (additive — uses .in-view class)
   ═══════════════════════════════════════════════════════ */
.fade-up { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.fade-up.in-view { opacity: 1; transform: none; }
.fade-up.delay-1 { transition-delay: 0.06s; }
.fade-up.delay-2 { transition-delay: 0.12s; }
.fade-up.delay-3 { transition-delay: 0.18s; }
.fade-up.delay-4 { transition-delay: 0.24s; }

/* ═══════════════════════════════════════════════════════
   A11Y — focus rings, reduced motion
   ═══════════════════════════════════════════════════════ */

/* Focus-visible rings (replace any outline:none we may have set elsewhere) */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Reduced motion — global opt-out */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ════════════════════════════════════════════════════════════
   MOBILE: Global (typography, spacing, tap targets, perf)
   ════════════════════════════════════════════════════════════ */

/* Lock background colors to prevent iOS bounce-scroll showing white */
html, body { background: var(--bg); overscroll-behavior-y: none; }

/* Smooth-scroll honor reduced motion */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Skip-margin for fixed nav so anchor jumps don't hide under it */
:target { scroll-margin-top: 96px; }

@media (max-width: 900px) {
  /* Prevent iOS auto-zoom on input focus */
  input, textarea, select { font-size: 16px !important; }

  /* Tap targets */
  .btn, button.btn, a.btn, .nav-cta, .theme-toggle, .lang-toggle button,
  .mood, .gender-opt { min-height: 44px; min-width: 44px; }

  /* Eliminate iOS tap-highlight grey flash; add proper :active feedback */
  button, a, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  button:active, a:active, .btn:active { transform: scale(0.97); transition: transform 0.1s ease; }

  /* Long unbreakable text */
  p, h1, h2, h3, h4, h5, li, td, th, a, button { overflow-wrap: anywhere; }

  /* No horizontal overflow ever */
  html, body { overflow-x: hidden; }
  img, video, iframe { max-width: 100%; height: auto; }

  /* Safe-area padding on the fixed nav */
  .nav { padding-top: calc(10px + env(safe-area-inset-top)); }

  /* Cheaper visual effects on mobile (CPU/GPU friendly) */
  .nav, .nav.scrolled { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  /* Mobile drawer: stay fully opaque — backdrop-filter unsupported on many
     mobile browsers and isn't needed once the background is solid. */
  .mobile-menu { background: var(--bg, #F8F4ED); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .rx-lock { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

  /* Smaller shadows on mobile (heavy shadows tank scroll perf on mid Android) */
  .tile, .rx-card, .pr-tier, .saved-card, .dlg, .rx-app, .gate-card {
    box-shadow: 0 4px 12px rgba(15,14,11,0.06), 0 2px 4px rgba(15,14,11,0.04) !important;
  }

  /* Side padding on all container variants */
  .container { padding-left: max(16px, env(safe-area-inset-left));
               padding-right: max(16px, env(safe-area-inset-right)); }
}

/* ════════════════════════════════════════════════════════════
   MOBILE: Public pages — hero, sections, footer
   ════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  /* Use svh for hero so mobile browser chrome doesn't crop it */
  .hero { min-height: 100svh; min-height: 100vh; padding-top: 90px; padding-bottom: 40px; }
  .hero .container { display: flex; flex-direction: column; gap: 28px; }

  /* Section vertical padding compressed but breathable */
  section { padding-top: 64px; padding-bottom: 64px; }

  /* Footer collapses */
  .foot-grid { grid-template-columns: 1fr 1fr !important; gap: 36px; }
  .foot-mega { font-size: clamp(40px, 12vw, 80px); }
  .foot-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 640px) {
  /* Hero CTAs full width */
  .hero .row .btn, .pg-mast .row .btn { width: 100%; }
  .hero .row, .pg-mast .row { flex-direction: column; gap: 10px; }

  /* Footer single column */
  .foot-grid { grid-template-columns: 1fr !important; gap: 28px; text-align: left; }

  /* Hero typography */
  .hero h1, .h-display { font-size: clamp(36px, 9vw, 56px) !important; line-height: 1.05; }
  .lede { font-size: 15.5px; line-height: 1.55; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE: Pricing — stack plan cards, keep "popular" distinct
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .pr-stage .container { grid-template-columns: 1fr !important; }
  .pr-tier.hero { transform: none !important; order: -1; } /* featured plan first */
  .pr-tier.side.left, .pr-tier.side.right { border-radius: var(--radius-lg) !important; border: 1px solid var(--line) !important; padding: 36px 28px; }
  .pr-tier.hero { padding: 44px 28px; }
  .pr-tier.hero h3 { font-size: 40px; }
  .pr-tier.hero .pr-price .num { font-size: 80px; }
  .pr-guarantees .row { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 520px) {
  .pr-guarantees .row { grid-template-columns: 1fr !important; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE: Recipes — bigger image cards, scrollable filter chips
   ════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .rx-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .rx-card .img { aspect-ratio: 16/10; }     /* wider hero-y crop on mobile */
  .rx-card h4 { font-size: 19px; }

  /* Filter chips horizontal scroll */
  .rx-side .chips { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
                    -webkit-overflow-scrolling: touch; }
  .rx-side .chips::-webkit-scrollbar { display: none; }
  .rx-side .chips { scrollbar-width: none; -ms-overflow-style: none; }
  .rx-side .chip { flex: 0 0 auto; scroll-snap-align: start; }

  /* Hide the desktop sidebar columns into a single-col stack — already in earlier responsive blocks */
  .rx-body { grid-template-columns: 1fr !important; min-height: 0 !important; }
  .rx-side { border-right: none; border-bottom: 1px solid var(--line); }
}

/* Recipe modal full-screen bottom-sheet on mobile */
@media (max-width: 640px) {
  .rx-modal { padding: 0; align-items: flex-end; }
  .rd-card { max-width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; overflow-y: auto;
             padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .rd-hero { aspect-ratio: 16/9; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE: Modals as bottom sheets (universal — applies to all .dlg)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .dlg-back { padding: 0; align-items: flex-end; }
  .dlg {
    width: 100%; max-width: 100%;
    max-height: 92vh; overflow-y: auto;
    border-radius: 22px 22px 0 0;
    padding: 18px 22px max(22px, env(safe-area-inset-bottom));
    animation: dlgSheetUp 0.28s cubic-bezier(.2,.8,.2,1);
    -webkit-overflow-scrolling: touch;
  }
  @keyframes dlgSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

  /* Drag-handle pill at top of sheet */
  .dlg::before {
    content: ""; display: block; width: 38px; height: 4px;
    background: var(--line-2); border-radius: 999px;
    margin: 0 auto 14px; cursor: grab;
  }

  /* Stack the dialog grids */
  .dlg .row2, .dlg .row3 { grid-template-columns: 1fr !important; }
  /* Form fields */
  .dlg .field input, .dlg .field select, .dlg .field textarea { min-height: 48px; }
  /* Actions become a sticky footer */
  .dlg-actions { position: sticky; bottom: 0; background: var(--bg);
                 padding: 14px 0 0; margin-top: 18px;
                 flex-direction: column-reverse; gap: 10px; }
  .dlg-actions > * { width: 100%; min-height: 48px; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE: Touch interactions polish
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Hover only on hover-capable devices */
  @media (hover: hover) {
    .rx-card:hover, .pr-tier:hover, .tile:hover { transform: none; }
  }
}
@media (hover: none) {
  /* Strip stuck-hover transforms on touch */
  *:hover { transform: none !important; }
  .rx-card:hover, .pr-tier:hover, .tile:hover, .saved-card:hover { transform: none !important; }
}

/* === End mobile polish block === */

/* ════════════════════════════════════════════════════════════
   MOBILE: Bottom navigation (member app, ≤900px)
   Google-app pattern: fixed bottom bar, 5 icons, scroll-hide.
   ════════════════════════════════════════════════════════════ */
.bottom-nav { display: none; }

@media (max-width: 900px) {
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0;
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 6px 4px max(6px, env(safe-area-inset-bottom));
    z-index: 90;
    transform: translateY(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .bottom-nav.hidden-on-scroll { transform: translateY(100%); }

  .bottom-nav .bn-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 8px 4px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 14px;
    min-height: 56px;
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
  }
  .bottom-nav .bn-item svg {
    width: 22px; height: 22px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .bottom-nav .bn-label {
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em;
    text-transform: uppercase;
  }
  .bottom-nav .bn-item.active {
    color: var(--green);
  }
  .bottom-nav .bn-item.active svg {
    transform: translateY(-2px) scale(1.08);
  }
  /* Material indicator pill behind the active icon */
  .bottom-nav .bn-item.active::before {
    content: "";
    position: absolute; top: 4px;
    width: 48px; height: 28px;
    background: color-mix(in oklab, var(--green) 16%, transparent);
    border-radius: 999px;
    z-index: -1;
  }
  .bottom-nav .bn-item:active { transform: scale(0.94); transition: transform 0.1s; }

  /* Push page content above the bottom nav */
  .portal-main { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
}

/* ════════════════════════════════════════════════════════════
   MOBILE: Material motion easing tokens (use everywhere)
   ════════════════════════════════════════════════════════════ */
:root {
  --motion-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --motion-decel:    cubic-bezier(0, 0, 0.2, 1);
  --motion-accel:    cubic-bezier(0.4, 0, 1, 1);
  --motion-sharp:    cubic-bezier(0.4, 0, 0.6, 1);
}

/* Upgrade existing transitions on key elements to Material standard */
@media (max-width: 900px) {
  .mobile-menu { transition: transform 0.25s var(--motion-standard), opacity 0.2s var(--motion-decel); }
  .dlg-back .dlg { transition: transform 0.25s var(--motion-decel); }
  .menu-toggle, .menu-toggle span { transition-timing-function: var(--motion-standard); }

  /* Ripple-like active state on Material-style targets */
  .bn-item, .nav-cta, .btn-primary, .pr-cta {
    transition: background 0.15s var(--motion-standard),
                transform 0.1s var(--motion-standard),
                box-shadow 0.2s var(--motion-standard);
  }
}

/* ════════════════════════════════════════════════════════════
   MOBILE: Top app bar elevation on scroll
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav {
    height: 56px; padding: 0 !important;
    transition: box-shadow 0.2s var(--motion-standard), background 0.2s var(--motion-standard);
  }
  .nav .nav-inner { height: 100%; padding-top: 0; padding-bottom: 0; align-items: center; }
  .nav.scrolled {
    box-shadow: 0 2px 8px rgba(15,14,11,0.08), 0 1px 2px rgba(15,14,11,0.04);
    background: var(--bg);
  }
  /* Add safe-area-top below the nav so content doesn't hide */
  .nav { top: env(safe-area-inset-top); }
  body { padding-top: env(safe-area-inset-top); }
}

/* === End Google-grade mobile pass === */

/* ════════════════════════════════════════════════════════════
   CLIENT MOBILE: Login screen — Material text fields, polish
   ════════════════════════════════════════════════════════════ */

/* Floating-label text field (Material text field pattern) */
.mui-field {
  position: relative;
}
.mui-field input,
.mui-field select,
.mui-field textarea {
  width: 100%;
  min-height: 56px;
  padding: 22px 14px 8px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px; /* prevent iOS zoom */
  color: var(--ink);
  transition: border-color 0.15s var(--motion-standard);
}
.mui-field input:focus,
.mui-field select:focus,
.mui-field textarea:focus {
  outline: none;
  border-color: var(--green);
}
.mui-field label {
  position: absolute;
  left: 14px;
  top: 18px;
  font-size: 16px;
  color: var(--muted);
  pointer-events: none;
  background: transparent;
  padding: 0 4px;
  transition: transform 0.15s var(--motion-standard), font-size 0.15s var(--motion-standard), color 0.15s var(--motion-standard);
  transform-origin: left top;
}
.mui-field input:focus + label,
.mui-field input:not(:placeholder-shown) + label,
.mui-field select:focus + label,
.mui-field textarea:focus + label,
.mui-field textarea:not(:placeholder-shown) + label {
  transform: translateY(-12px) scale(0.78);
  color: var(--green);
  background: var(--bg);
}

/* Password show/hide button */
.mui-field--pw input { padding-right: 50px; }
.pw-toggle {
  position: absolute;
  right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent; border: none;
  color: var(--muted); cursor: pointer;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.pw-toggle:hover { color: var(--ink); background: var(--bg-2); }
.pw-toggle.on { color: var(--green); }
.pw-toggle svg { width: 20px; height: 20px; }

/* Auth submit — full-width, prominent, loading-friendly */
.auth-submit {
  width: 100% !important;
  min-height: 48px;
  font-weight: 600;
  margin-top: 4px;
  position: relative;
}
.auth-submit.loading { color: transparent; pointer-events: none; }
.auth-submit.loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px;
  border: 2px solid color-mix(in oklab, var(--bg) 50%, transparent);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: mui-spin 0.6s linear infinite;
}
@keyframes mui-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .auth-shell { grid-template-columns: 1fr !important; }
  .auth-side  { display: none; }
  .auth-form-wrap { padding: 28px 20px max(28px, env(safe-area-inset-bottom)); }
  .auth-tabs button { font-size: 14px; }
  .auth-social { grid-template-columns: 1fr !important; gap: 10px; }
  .auth-social button { min-height: 48px; }
}

/* ════════════════════════════════════════════════════════════
   CLIENT MOBILE: Toast notifications (toast.js renders these)
   ════════════════════════════════════════════════════════════ */
#toast-host {
  position: fixed; top: 14px; left: 0; right: 0;
  display: flex; flex-direction: column-reverse; align-items: center; gap: 8px;
  z-index: 9999; pointer-events: none;
  padding-top: env(safe-area-inset-top);
}
.toast-mui {
  pointer-events: auto;
  display: flex; align-items: center; gap: 8px;
  min-width: 260px; max-width: calc(100vw - 32px);
  padding: 12px 14px 12px 18px;
  background: var(--ink); color: var(--bg);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.12);
  font-size: 14px; line-height: 1.4;
  transform: translateY(-20px); opacity: 0;
  transition: transform 0.25s var(--motion-decel), opacity 0.2s var(--motion-decel);
}
.toast-mui.show { transform: translateY(0); opacity: 1; }
.toast-mui.dismissing { transform: translateY(-20px); opacity: 0; }
.toast-mui--success { border-left: 4px solid var(--green); }
.toast-mui--error   { border-left: 4px solid #c05553; }
.toast-msg { flex: 1; }
.toast-action {
  background: transparent; border: none; color: var(--gold-soft);
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 6px 10px; border-radius: 8px;
}
.toast-action:hover { background: rgba(255,255,255,0.08); }
.toast-close {
  background: transparent; border: none; color: var(--bg);
  font-size: 20px; line-height: 1; cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%;
  opacity: 0.6;
}
.toast-close:hover { opacity: 1; background: rgba(255,255,255,0.08); }

/* ════════════════════════════════════════════════════════════
   CLIENT MOBILE: Multi-step wizard sheet (multi-step-sheet.js)
   ════════════════════════════════════════════════════════════ */
.wizard-back { padding: 0; align-items: flex-end; }
.wizard-dlg {
  width: 100%; max-width: 540px; margin: 0 auto;
  max-height: 92vh; display: flex; flex-direction: column;
  border-radius: 18px 18px 0 0;
  padding: 14px 22px max(20px, env(safe-area-inset-bottom));
  background: var(--bg);
  animation: dlgSheetUp 0.28s var(--motion-decel);
}
.wizard-head {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 18px;
}
.wizard-back-btn, .wizard-close {
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  display: grid; place-items: center; font-size: 20px; color: var(--ink);
}
.wizard-back-btn:hover, .wizard-close:hover { background: var(--bg-2); }
.wizard-progress {
  flex: 1;
  display: flex; justify-content: center; gap: 6px;
}
.wp-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-2);
  transition: all 0.25s var(--motion-standard);
}
.wp-dot.active { background: var(--green); width: 22px; border-radius: 4px; }
.wizard-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.wizard-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 6vw, 32px); line-height: 1.1;
  font-weight: 400; margin-bottom: 18px;
}
.wizard-step { padding-bottom: 14px; }
.wizard-error {
  color: #c05553; font-size: 13px; margin-top: 10px;
  padding: 8px 12px; background: #fce9e9; border-radius: 8px;
}
.wizard-foot {
  display: flex; gap: 10px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.wizard-skip {
  flex: 0 0 auto; padding: 12px 18px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 14px; cursor: pointer;
}
.wizard-next {
  flex: 1; padding: 14px;
  background: var(--ink); color: var(--bg);
  border: none; border-radius: 999px;
  font: inherit; font-size: 15px; font-weight: 600;
  min-height: 48px; cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.wizard-next:hover { background: #000; }
.wizard-next:active { transform: scale(0.97); }
@keyframes wizard-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}

/* ════════════════════════════════════════════════════════════
   CLIENT MOBILE: Skeleton loaders (use during data fetches)
   ════════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 0%, color-mix(in oklab, var(--bg-2) 50%, var(--surface)) 50%, var(--bg-2) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s linear infinite;
  border-radius: 8px;
  color: transparent;
  pointer-events: none;
}
@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.skeleton-line   { height: 14px; margin-bottom: 8px; }
.skeleton-circle { border-radius: 50%; }
.skeleton-card   { height: 120px; }

/* ════════════════════════════════════════════════════════════
   CLIENT MOBILE: Material settings list (profile.html pattern)
   ════════════════════════════════════════════════════════════ */
.settings-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.settings-list-section {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 14px 16px 8px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.settings-list-section:first-child { border-top: none; }
.settings-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  min-height: 56px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s var(--motion-standard);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.settings-row:first-child { border-top: none; }
.settings-row:active { background: var(--bg-2); }
.settings-row .sr-icon {
  width: 32px; height: 32px; display: grid; place-items: center;
  color: var(--muted); flex-shrink: 0;
}
.settings-row .sr-body {
  flex: 1; min-width: 0;
}
.settings-row .sr-label {
  font-size: 15px; color: var(--ink); font-weight: 500;
  line-height: 1.3;
}
.settings-row .sr-sub {
  font-size: 12.5px; color: var(--muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.settings-row .sr-value {
  font-size: 13.5px; color: var(--muted);
  margin-right: 4px;
  max-width: 40%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.settings-row .sr-chevron {
  color: var(--muted); flex-shrink: 0;
}
.settings-row .sr-chevron::before { content: "›"; font-size: 24px; line-height: 1; }

/* iOS-style toggle switch */
.toggle {
  position: relative; display: inline-block;
  width: 50px; height: 30px; flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--line-2); border-radius: 999px;
  transition: 0.25s var(--motion-standard);
}
.toggle .slider::before {
  position: absolute; content: ""; height: 26px; width: 26px;
  left: 2px; top: 2px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: 0.25s var(--motion-standard);
}
.toggle input:checked + .slider { background: var(--green); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

/* ════════════════════════════════════════════════════════════
   CLIENT MOBILE: Empty states (friendly illustrations)
   ════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 60px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.empty-state .empty-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg-2); color: var(--muted);
  display: grid; place-items: center;
  font-size: 28px;
}
.empty-state h3 {
  font-family: var(--font-serif); font-size: 22px;
  font-weight: 400; color: var(--ink);
  margin: 0;
}
.empty-state p {
  color: var(--muted); font-size: 14px; line-height: 1.5;
  max-width: 320px; margin: 0;
}
.empty-state .btn { margin-top: 8px; }

/* === End client mobile pass === */

/* ════════════════════════════════════════════════════════════
   CLIENT MOBILE — Dashboard polish (≤900px)
   Material top app bar + FAB + compact tiles + proper spacing
   ════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  /* --- Material top app bar (replaces the old portal-top layout) --- */
  .portal-main {
    padding: 0 !important;
    padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important;
    background: var(--bg-2);
  }

  .portal-top {
    position: sticky; top: 0; z-index: 50;
    display: flex !important;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 16px max(10px, env(safe-area-inset-top));
    padding-top: calc(10px + env(safe-area-inset-top));
    margin: 0 !important;
    background: color-mix(in oklab, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--motion-standard),
                box-shadow 0.2s var(--motion-standard);
  }
  .portal-top.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 2px 8px rgba(15,14,11,0.04);
  }
  .portal-top > div:first-child {
    flex: 1; min-width: 0;
  }
  .portal-top .greeting {
    font-size: 10.5px !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
  }
  .portal-top h1 {
    font-family: var(--font-serif);
    font-size: clamp(22px, 6vw, 28px) !important;
    line-height: 1.1 !important;
    font-weight: 400;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Hide the original buttons from top — replaced by FAB */
  .portal-top .actions {
    display: none !important;
  }

  /* --- Body of the page (under top app bar) --- */
  .metric-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding: 16px 16px 0 !important;
  }
  .metric {
    padding: 14px 14px !important;
    border-radius: 14px !important;
    background: var(--surface);
    border: 1px solid var(--line);
  }
  .metric .lbl {
    font-size: 10.5px !important;
    letter-spacing: 0.08em;
    color: var(--muted);
  }
  .metric .v {
    font-size: 26px !important;
    margin-top: 4px;
  }
  .metric .v small {
    font-size: 13px;
    color: var(--muted);
  }
  .metric .delta {
    margin-top: 4px;
    font-size: 11px !important;
  }

  /* Portal grid rows */
  .portal-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 12px 16px 0 !important;
    margin: 0 !important;
  }
  .portal-grid--mt { margin-top: 0 !important; }

  /* Tiles */
  .tile {
    padding: 18px 18px !important;
    border-radius: 16px !important;
    margin: 0 !important;
  }
  .tile-head h3 {
    font-size: 17px !important;
    line-height: 1.2;
  }
  .tile-head .tile-sub {
    font-size: 11.5px !important;
  }
  .tile-head .pill {
    font-size: 10px !important;
    padding: 4px 10px !important;
  }

  /* Macro ring tile — ring centered, list below */
  .ring-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 18px !important;
  }
  .ring {
    width: 150px !important; height: 150px !important;
    margin: 0 auto !important;
  }
  .ring-center .v { font-size: 26px !important; }
  .ring-center .l { font-size: 10px !important; }

  /* Chart tile — bigger min height to avoid squish */
  .tile--chart .chart, .tile .chart {
    width: 100%; height: auto; min-height: 200px;
  }

  /* Meal strip — tap-friendly rows */
  .meal-strip .row {
    gap: 12px !important;
    padding: 12px !important;
    border-radius: 12px !important;
  }
  .meal-strip .row img {
    width: 48px !important; height: 48px !important;
    border-radius: 10px !important;
    flex-shrink: 0;
  }
  .meal-strip .row .n {
    font-size: 14px !important;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 56vw;
  }
  .meal-strip .row .s {
    font-size: 11.5px !important;
    color: var(--muted);
  }
  .meal-strip .row .c {
    font-size: 14px !important;
    font-weight: 500;
  }

  /* Coach tile — quote scales down */
  .tile--coach .coach-quote {
    font-size: 17px !important;
    line-height: 1.4 !important;
  }
  .tile--coach .coach-reply {
    width: 100% !important;
    margin-top: 14px !important;
  }

  /* Quick check-in mood rows — bigger tap targets */
  .checkin .mood-row {
    gap: 8px !important;
    justify-content: space-between;
  }
  .checkin .mood {
    min-width: 48px !important;
    min-height: 48px !important;
    font-size: 22px !important;
  }
  .checkin .q {
    font-size: 14px !important;
    margin-bottom: 8px !important;
  }

  /* Week ahead — keep 7 days but tighter */
  .week-grid {
    gap: 4px !important;
  }
  .week-grid > div {
    font-size: 11px !important;
  }
  .week-event {
    padding: 12px 14px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 480px) {
  .meal-strip .row .n { max-width: 50vw; }
  .ring { width: 140px !important; height: 140px !important; }
  .week-event {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
}

/* ════════════════════════════════════════════════════════════
   FAB — Floating Action Button (Material primary action)
   Replaces top "+ Log meal" / "Weekly check-in" buttons on mobile
   ════════════════════════════════════════════════════════════ */

.fab-stack {
  display: none;
}

@media (max-width: 900px) {
  .fab-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: fixed;
    right: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    z-index: 80;
    align-items: flex-end;
  }
  .fab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    height: 56px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(15,14,11,0.18), 0 2px 4px rgba(15,14,11,0.10);
    transition: transform 0.15s var(--motion-standard), box-shadow 0.15s var(--motion-standard);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .fab svg { width: 22px; height: 22px; flex-shrink: 0; }
  .fab:active { transform: scale(0.94); }
  .fab--secondary {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    height: 48px;
    padding: 0 16px;
    font-size: 14px;
  }
  .fab--gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
    color: #fff;
  }

  /* Hide FAB when scrolling down (Material pattern, same as bottom-nav) */
  .fab-stack.hidden-on-scroll {
    transform: translateY(calc(110px + env(safe-area-inset-bottom)));
    transition: transform 0.25s var(--motion-standard);
  }
}

/* === End mobile dashboard polish === */

/* ============================================================
   === Upgrade banner (free tier, shown once at top of dashboard)
   ============================================================ */
.upgrade-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin: 0 0 18px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--gold) 14%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in oklab, var(--gold) 30%, var(--line));
  border-radius: 14px;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.04));
}
.upgrade-banner .ub-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--ink); color: var(--gold-soft);
  display: grid; place-items: center;
}
.upgrade-banner .ub-text { flex: 1 1 auto; min-width: 0; }
.upgrade-banner .ub-title {
  font-family: var(--font-serif);
  font-size: 17px; line-height: 1.2;
  color: var(--ink);
}
.upgrade-banner .ub-sub {
  font-size: 13px; color: var(--muted);
  line-height: 1.4; margin-top: 2px;
}
.upgrade-banner .ub-cta {
  flex: 0 0 auto;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #fff; border: none; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 18px -8px rgba(184, 146, 77, 0.55);
  transition: transform 0.18s var(--motion-standard, ease);
}
.upgrade-banner .ub-cta:hover { transform: translateY(-1px); }

@media (max-width: 600px) {
  .upgrade-banner {
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 14px 16px;
  }
  .upgrade-banner .ub-icon { width: 36px; height: 36px; }
  .upgrade-banner .ub-title { font-size: 16px; }
  .upgrade-banner .ub-sub { font-size: 12.5px; }
  .upgrade-banner .ub-cta {
    flex: 1 1 100%;
    padding: 12px 18px;
    font-size: 14px;
  }
}

/* ============================================================
   === Portal mobile drawer — Material 3 navigation drawer
   ============================================================ */
/* Hide drawer-only elements on desktop */
.drawer-user, .drawer-secondary { display: none; }

@media (max-width: 900px) {
  /* Make the drawer feel like a proper M3 navigation drawer */
  .portal-side {
    background: var(--surface) !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column;
  }
  /* Brand row inside drawer */
  .portal-side .brand {
    display: flex !important;
    align-items: center; gap: 10px;
    padding: 16px 20px !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--line);
  }
  /* Drawer user header — directly under brand */
  .drawer-user {
    display: flex !important;
    align-items: center; gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
  }
  .drawer-user-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
    color: #fff;
    display: grid; place-items: center;
    font-family: var(--font-serif);
    font-size: 20px; font-weight: 500;
    flex: 0 0 44px;
  }
  .drawer-user-info { min-width: 0; flex: 1 1 auto; }
  .drawer-user-name {
    font-size: 15px; font-weight: 500;
    color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .drawer-user-tier {
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 2px;
  }

  /* Hide redundant primary nav (bottom-nav already has it) */
  .portal-side .portal-nav { display: none !important; }

  /* Hide the old desktop user card at bottom */
  .portal-side .portal-user { display: none !important; }

  /* Secondary actions section */
  .drawer-secondary {
    display: block !important;
    padding: 16px 12px;
    flex: 1 1 auto;
  }
  .drawer-lang-label {
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 12px 8px;
  }
  .drawer-lang {
    display: flex; gap: 6px;
    padding: 0 8px 14px;
  }
  .drawer-lang button {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: 999px;
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.18s var(--motion-standard, ease),
                border-color 0.18s var(--motion-standard, ease);
  }
  .drawer-lang button.on {
    background: var(--ink); color: var(--bg);
    border-color: var(--ink);
  }
  .drawer-link {
    display: flex; align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
    font-size: 14px; font-weight: 500;
    border: none; background: transparent; width: 100%; text-align: left;
    cursor: pointer; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s var(--motion-standard, ease);
  }
  .drawer-link:hover, .drawer-link:active {
    background: color-mix(in oklab, var(--ink) 6%, transparent);
  }
  .drawer-link svg {
    width: 20px; height: 20px;
    color: var(--muted);
    flex: 0 0 20px;
  }
  .drawer-link--danger { color: #b3261e; margin-top: 6px; }
  .drawer-link--danger svg { color: #b3261e; }

  /* Position the hamburger inside the top app bar (override absolute positioning) */
  .portal-top .nav-toggle-btn {
    display: inline-flex !important;
    flex: 0 0 40px;
    margin-right: 4px;
  }
}

/* ============================================================
   LEGAL PAGES — Terms / Privacy / Refund
   Reading-optimised long-form layout with sticky table of contents
   on desktop, single-column on mobile.
   ============================================================ */
.legal-page {
  padding: 140px 0 80px;
}
.legal-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}
.legal-toc {
  position: sticky;
  top: 100px;
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.legal-toc h5 {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.legal-toc ol {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column;
  counter-reset: toc;
}
.legal-toc ol li {
  counter-increment: toc;
  margin-bottom: 4px;
}
.legal-toc ol li a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  line-height: 1.4;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, padding-left 0.15s;
}
.legal-toc ol li a::before {
  content: counter(toc, decimal-leading-zero) " · ";
  color: var(--line-2);
  font-variant-numeric: tabular-nums;
}
.legal-toc ol li a:hover {
  color: var(--ink);
  padding-left: 4px;
}
.legal-toc ol li a.active {
  color: var(--green);
  font-weight: 600;
}

.legal-body {
  max-width: 70ch;
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15.5px;
}
.legal-body > p:first-of-type {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.legal-body h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 56px 0 16px;
  scroll-margin-top: 100px;
}
.legal-body h2 .num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--green);
  font-family: var(--font-sans);
  font-style: normal;
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.legal-body h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 32px 0 10px;
}
.legal-body p { margin: 0 0 16px; }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body a {
  color: var(--green);
  border-bottom: 1px solid currentColor;
}
.legal-body a:hover { color: var(--ink); }
.legal-body ul, .legal-body ol {
  margin: 0 0 18px 0;
  padding-left: 0;
  list-style: none;
}
.legal-body ul li, .legal-body ol li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}
.legal-body ul li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--green);
}
.legal-body ol {
  counter-reset: lol;
}
.legal-body ol li {
  counter-increment: lol;
}
.legal-body ol li::before {
  content: counter(lol) ".";
  position: absolute; left: 0;
  color: var(--green);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.legal-meta {
  display: inline-flex;
  align-items: center; gap: 10px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 20px;
}
.legal-meta .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.legal-highlight {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}
.legal-highlight h4 {
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.legal-highlight p { margin: 0; font-size: 14px; color: var(--muted); }

.legal-footer {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.legal-footer-links {
  display: flex; gap: 20px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.legal-footer-links a {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.legal-footer-links a:hover { color: var(--ink); border-color: var(--ink); }

@media (max-width: 900px) {
  .legal-page { padding: 100px 0 60px; }
  .legal-grid { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc {
    position: static;
    border-left: none;
    padding-left: 0;
    padding: 18px 20px;
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--line);
  }
  .legal-body { font-size: 15px; }
  .legal-body > p:first-of-type { font-size: 18px; }
  .legal-body h2 { font-size: 26px; margin-top: 44px; }
}
