/* ═══════════════════════════════════════════════════════
   NUTRIPLAN — Design System
   Dark elegant theme · Mobile-first · Professional
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  /* Background scale */
  --bg-deep:    #070a0f;
  --bg-base:    #0c1018;
  --bg-raised:  #111827;
  --bg-float:   #1a2235;
  --bg-overlay: #212d42;

  /* Border */
  --bdr:        rgba(255,255,255,.07);
  --bdr-2:      rgba(255,255,255,.12);
  --bdr-3:      rgba(255,255,255,.2);

  /* Brand — sage green (not neon) */
  --green:      #5fa86e;
  --green-lt:   #7cc48d;
  --green-dim:  rgba(95,168,110,.12);
  --green-dim2: rgba(95,168,110,.06);

  /* Accent palette */
  --blue:       #5b8de8;
  --blue-dim:   rgba(91,141,232,.12);
  --amber:      #d4963a;
  --amber-dim:  rgba(212,150,58,.12);
  --rose:       #e05c6b;
  --rose-dim:   rgba(224,92,107,.1);
  --violet:     #8b6fd4;
  --violet-dim: rgba(139,111,212,.12);
  --teal:       #3aacad;
  --teal-dim:   rgba(58,172,173,.1);

  /* Text */
  --tx-1: #f0f2f8;
  --tx-2: #8d97b0;
  --tx-3: #4d566e;
  --tx-4: #2c3347;

  /* Typography */
  --font:   'Manrope', sans-serif;
  --serif:  'Playfair Display', serif;

  /* Spacing */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  40px;
  --sp-2xl: 64px;

  /* Radius */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;

  /* Shadow */
  --shadow-sm: 0 2px 12px rgba(0,0,0,.3);
  --shadow-md: 0 4px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.5);

  /* Transition */
  --ease: cubic-bezier(.4,0,.2,1);
  --t1: .15s;
  --t2: .25s;
  --t3: .4s;
}

/* ── RESET ───────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent }
html { scroll-behavior:smooth; font-size:16px; height:100% }
body {
  background: var(--bg-base);
  color: var(--tx-1);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img,svg { display:block; max-width:100% }
a { color:inherit; text-decoration:none }
button { cursor:pointer; font-family:inherit; border:none; background:none }
input,textarea,select { font-family:inherit }
::placeholder { color:var(--tx-3) }

/* ── NAV ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-lg);
  background: rgba(7,10,15,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bdr);
}
.nav-logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.03em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-logo .dot { color:var(--green); font-size:22px; line-height:1 }
.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
}
.nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-2);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color var(--t1), background var(--t1);
  white-space: nowrap;
}
.nav-links a:hover { color:var(--tx-1); background:var(--bg-float) }
.nav-links a.active { color:var(--green) }
.nav-cta {
  background: var(--green);
  color: #fff !important;
  border-radius: var(--r-sm);
  font-weight: 700 !important;
}
.nav-cta:hover { background:var(--green-lt) !important }
#nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-float);
  border: 1px solid var(--bdr-2);
  border-radius: 100px;
  padding: 5px 14px 5px 8px;
  cursor: pointer;
  transition: .2s;
}
#nav-auth:hover { border-color:var(--bdr-3) }
#nav-auth span { font-size:12px; font-weight:700; color:var(--tx-2) }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--tx-2);
  border-radius: 2px;
  transition: .2s;
}

/* ── PAGE LAYOUT ─────────────────────────────────────── */
.page { max-width: 640px; margin: 0 auto; padding: 76px 16px 80px }
.page-wide { max-width: 900px; margin: 0 auto; padding: 76px 16px 80px }

/* ── SECTION LABEL ───────────────────────────────────── */
.sec-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tx-3);
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bdr);
}

/* ── CARDS ───────────────────────────────────────────── */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}
.card-float {
  background: var(--bg-float);
  border: 1px solid var(--bdr-2);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}
.card + .card { margin-top: 10px }

/* ── HERO CARD (colored top) ─────────────────────────── */
.hero-card {
  border-radius: var(--r-lg);
  padding: 26px 22px;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.hero-card::after {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 150px; height: 150px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.hero-card.green  { background: linear-gradient(135deg,#2d6b3a,#3d8a4a) }
.hero-card.blue   { background: linear-gradient(135deg,#2a4a8a,#3a5fb0) }
.hero-card.violet { background: linear-gradient(135deg,#4a3580,#6248aa) }
.hero-card.amber  { background: linear-gradient(135deg,#7a4e12,#a06825) }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: var(--r-md);
  transition: all var(--t1) var(--ease);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.btn:active { transform: scale(.97) }
.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover { background:var(--green-lt); transform:translateY(-1px) }
.btn-secondary {
  background: var(--bg-float);
  color: var(--tx-1);
  border: 1px solid var(--bdr-2);
}
.btn-secondary:hover { border-color:var(--bdr-3); background:var(--bg-overlay) }
.btn-ghost {
  background: transparent;
  color: var(--tx-2);
  border: 1px solid var(--bdr-2);
}
.btn-ghost:hover { color:var(--tx-1); border-color:var(--bdr-3) }
.btn-full { width:100% }
.btn-sm { font-size:13px; padding:10px 18px }
.btn-lg { font-size:16px; padding:18px 32px; border-radius:var(--r-lg) }
.btn:disabled { opacity:.4; cursor:not-allowed; transform:none !important }

/* ── INPUTS ──────────────────────────────────────────── */
.input {
  width: 100%;
  background: var(--bg-deep);
  border: 1.5px solid var(--bdr-2);
  border-radius: var(--r-md);
  color: var(--tx-1);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  padding: 14px 16px;
  outline: none;
  transition: border-color var(--t1);
  -moz-appearance: textfield;
  appearance: textfield;
}
.input::-webkit-outer-spin-button,
.input::-webkit-inner-spin-button { -webkit-appearance: none }
.input:focus { border-color: var(--green) }
.input.error { border-color: var(--rose) }
.input-wrap { position:relative }
.input-unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-3);
  pointer-events: none;
}
.input-xl {
  font-size: 32px;
  font-weight: 800;
  padding: 18px 70px 18px 20px;
  letter-spacing: -.03em;
}

/* ── OPTION CARDS ────────────────────────────────────── */
.opts { display:grid; gap:10px }
.opts-2 { grid-template-columns:1fr 1fr }
.opts-3 { grid-template-columns:1fr 1fr 1fr }
.opts-4 { grid-template-columns:repeat(4,1fr) }
.opt {
  background: var(--bg-float);
  border: 1.5px solid var(--bdr);
  border-radius: var(--r-md);
  padding: 16px 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color var(--t1), background var(--t1);
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  overflow: hidden;
}
.opt:hover { border-color:var(--bdr-2) }
.opt:active { transform: scale(.97) }
.opt.selected { border-color:var(--green); background:var(--green-dim) }
.opt-ico { font-size: 22px; line-height:1; flex-shrink:0; margin-top:2px }
.opt-label { font-size:14px; font-weight:700; color:var(--tx-1); margin-bottom:3px; line-height:1.3 }
.opt-desc { font-size:12px; color:var(--tx-3); line-height:1.45; font-weight:500 }
.opt-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: var(--green-dim);
  color: var(--green-lt);
  padding: 2px 8px;
  border-radius: 100px;
}
/* number grid opts */
.num-opt {
  background: var(--bg-float);
  border: 1.5px solid var(--bdr);
  border-radius: var(--r-md);
  padding: 18px 10px;
  cursor: pointer;
  text-align: center;
  transition: .15s;
  user-select: none;
}
.num-opt:hover { border-color:var(--bdr-2) }
.num-opt.selected { border-color:var(--green); background:var(--green-dim) }
.num-opt-n { font-size:28px; font-weight:800; letter-spacing:-.03em; color:var(--tx-1); line-height:1; margin-bottom:4px }
.num-opt-l { font-size:10px; font-weight:700; color:var(--tx-3); text-transform:uppercase; letter-spacing:.06em }

/* ── PROGRESS BAR ────────────────────────────────────── */
.progress-track {
  display: flex;
  gap: 5px;
  margin-bottom: 24px;
}
.progress-dot {
  flex: 1;
  height: 3px;
  background: var(--bg-float);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.progress-dot .fill {
  position: absolute;
  inset: 0;
  background: var(--green);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.progress-dot.done .fill { transform: scaleX(1) }
.progress-dot.active .fill { transform: scaleX(.5); animation: pulse-bar 1.6s ease infinite }
@keyframes pulse-bar { 0%,100%{transform:scaleX(.5)} 50%{transform:scaleX(.75)} }

/* ── COACH BUBBLE ────────────────────────────────────── */
.coach-bubble {
  background: var(--bg-float);
  border: 1px solid var(--bdr-2);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  animation: slide-up .35s var(--ease) both;
}
.coach-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green-dim);
  border: 1.5px solid rgba(95,168,110,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.coach-content {}
.coach-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-lt);
  margin-bottom: 5px;
}
.coach-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 5px;
  color: var(--tx-1);
}
.coach-text {
  font-size: 13.5px;
  color: var(--tx-2);
  line-height: 1.65;
  font-weight: 500;
}
.coach-text strong { color: var(--tx-1); font-weight: 700 }
.coach-stat {
  background: var(--bg-overlay);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.coach-stat-val { font-size: 22px; font-weight: 800; color: var(--green-lt); line-height:1; flex-shrink:0 }
.coach-stat-lbl { font-size: 12px; color: var(--tx-3); line-height: 1.4; font-weight:500 }

/* ── STEP CARD ───────────────────────────────────────── */
.step-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr-2);
  border-radius: var(--r-xl);
  padding: 26px 22px;
  animation: slide-up .35s var(--ease) both;
}
.step-card.out { animation: slide-out .22s var(--ease) forwards }
.step-q {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 5px;
  color: var(--tx-1);
}
.step-hint { font-size: 13px; color: var(--tx-3); margin-bottom: 22px; line-height:1.5; font-weight:500 }

/* ── INSIGHT CARD (between steps) ───────────────────── */
.insight-card {
  border-radius: var(--r-xl);
  padding: 26px 22px;
  animation: slide-up .35s var(--ease) both;
  position: relative;
  overflow: hidden;
}
.insight-card::after {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 140px; height: 140px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.insight-card.sage   { background: linear-gradient(140deg,#1f3a27,#2d5438) }
.insight-card.ocean  { background: linear-gradient(140deg,#1a2f4a,#213d62) }
.insight-card.dusk   { background: linear-gradient(140deg,#2a1f42,#3d2f60) }
.insight-card.ember  { background: linear-gradient(140deg,#3a2010,#543018) }
.ic-tag { font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:rgba(255,255,255,.45); margin-bottom:10px }
.ic-emoji { font-size:40px; display:block; margin-bottom:12px; line-height:1 }
.ic-title { font-family:var(--serif); font-size:24px; font-weight:700; line-height:1.2; margin-bottom:10px; color:rgba(255,255,255,.95) }
.ic-body { font-size:14px; line-height:1.65; color:rgba(255,255,255,.65); font-weight:500 }
.ic-body strong { color:rgba(255,255,255,.9); font-weight:700 }
.ic-stat {
  background: rgba(0,0,0,.2);
  border-radius: var(--r-sm);
  padding: 14px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ic-stat-val { font-size: 26px; font-weight: 800; color:rgba(255,255,255,.9); line-height:1; flex-shrink:0 }
.ic-stat-lbl { font-size: 13px; color:rgba(255,255,255,.5); line-height: 1.4; font-weight:500 }

/* ── LIVE FACT ───────────────────────────────────────── */
.live-fact {
  background: var(--bg-float);
  border: 1px solid var(--bdr-2);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--tx-2);
  line-height: 1.6;
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s, transform .3s;
}
.live-fact.visible { opacity:1; transform:translateY(0) }
.live-fact strong { color: var(--green-lt) }
.live-fact-icon { font-size:16px; margin-right:6px }

/* ── VALIDATION HINT ─────────────────────────────────── */
.val-hint { font-size:12.5px; min-height:18px; margin-top:5px; font-weight:600 }
.val-hint.ok  { color:var(--green-lt) }
.val-hint.err { color:var(--rose) }
.val-hint.neu { color:var(--tx-3) }

/* ── MACRO PILLS ─────────────────────────────────────── */
.macro-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px }
.macro-pill {
  background: var(--bg-float);
  border: 1px solid var(--bdr-2);
  border-radius: var(--r-md);
  padding: 16px 12px;
  text-align: center;
}
.mp-icon { font-size:18px; margin-bottom:6px; line-height:1 }
.mp-val  { font-size:26px; font-weight:800; line-height:1; letter-spacing:-.03em; margin-bottom:2px }
.mp-unit { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:var(--tx-3) }
.mp-lbl  { font-size:11px; color:var(--tx-3); margin-top:4px; font-weight:500 }
.c-green .mp-val  { color:var(--green-lt) }
.c-blue .mp-val   { color:var(--blue) }
.c-amber .mp-val  { color:var(--amber) }
.c-violet .mp-val { color:var(--violet) }

/* ── STAT ROW ────────────────────────────────────────── */
.stat-row { display:grid; gap:8px }
.stat-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px;
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-md);
}
.si-icon { font-size:18px; flex-shrink:0; width:26px; text-align:center; margin-top:2px }
.si-label { font-size:10px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--tx-3); margin-bottom:3px }
.si-text  { font-size:13px; color:var(--tx-2); line-height:1.6; font-weight:500 }
.si-text strong { color:var(--tx-1); font-weight:700 }

/* ── CTA GRID ────────────────────────────────────────── */
.cta-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px }
.cta-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-md);
  padding: 18px 16px;
  text-decoration: none;
  display: block;
  transition: border-color var(--t1), background var(--t1), transform var(--t1);
}
.cta-card:hover { border-color:var(--bdr-2); background:var(--bg-float); transform:translateY(-2px) }
.cta-card:active { transform:scale(.97) }
.cta-icon { font-size:26px; margin-bottom:10px; line-height:1 }
.cta-title { font-size:13.5px; font-weight:700; color:var(--tx-1); margin-bottom:3px }
.cta-sub   { font-size:11.5px; color:var(--tx-3); line-height:1.4; font-weight:500 }
.cta-card.featured { border-color:rgba(95,168,110,.25); background:var(--green-dim2) }
.cta-card.featured:hover { border-color:rgba(95,168,110,.4) }

/* ── DAY ACCORDION ───────────────────────────────────── */
.day-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 10px;
  transition: border-color var(--t1);
}
.day-card.open { border-color:var(--bdr-2) }
.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background var(--t1);
}
.day-head:active { background:var(--bg-float) }
.day-head-left { display:flex; align-items:center; gap:14px }
.day-number {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -.01em;
}
.day-name  { font-weight: 700; font-size: 15px; margin-bottom: 2px }
.day-focus { font-size: 12px; color: var(--tx-3); font-weight: 500 }
.day-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}
.day-arrow { font-size: 11px; color:var(--tx-3); transition: transform .28s var(--ease) }
.day-card.open .day-arrow { transform: rotate(180deg) }
.day-body {
  display: none;
  border-top: 1px solid var(--bdr);
}
.day-card.open .day-body { display: block }

/* ── EXERCISE ITEM ───────────────────────────────────── */
.ex-list { padding: 16px 20px 20px }
.warmup-note {
  display: flex;
  gap: 8px;
  background: rgba(212,150,58,.08);
  border: 1px solid rgba(212,150,58,.15);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--tx-2);
  line-height: 1.55;
  font-weight: 500;
}
.ex-group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tx-3);
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ex-group-title::after { content:''; flex:1; height:1px; background:var(--bdr) }
.ex {
  background: var(--bg-float);
  border: 1px solid var(--bdr);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ex-num {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}
.ex-name { font-weight: 700; font-size: 14px; margin-bottom: 3px; color:var(--tx-1) }
.ex-sets { font-size: 12px; font-weight: 700; margin-bottom: 3px }
.ex-tip  { font-size: 12px; color:var(--tx-3); line-height:1.5; font-weight:500 }
.ex-muscle {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
  margin-left: auto;
  flex-shrink: 0;
  align-self: flex-start;
}
.ex-session-sum {
  background: var(--bg-overlay);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 0;
  text-align: center;
}
.ess-item { border-right: 1px solid var(--bdr) }
.ess-item:last-child { border-right:none }
.ess-val { font-size: 18px; font-weight: 800; line-height: 1; margin-bottom: 3px }
.ess-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tx-3) }

/* ── PROGRESS TRACKER ────────────────────────────────── */
.log-input-card { /* uses .card-float */ }
.log-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--bdr);
}
.log-entry:last-child { border-bottom: none }
.le-date { font-size: 12px; font-weight: 600; color: var(--tx-3); width: 70px; flex-shrink: 0 }
.le-weight { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--tx-1) }
.le-weight span { font-size:12px; color:var(--tx-3); font-weight:600 }
.le-delta {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}
.delta-up   { background: rgba(224,92,107,.1); color: var(--rose) }
.delta-down { background: var(--green-dim);     color: var(--green-lt) }
.delta-eq   { background: var(--bg-float);      color: var(--tx-3) }
.le-note { font-size:12px; color:var(--tx-3); flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500 }
.le-del  { font-size:12px; color:var(--tx-3); cursor:pointer; padding:4px; border-radius:5px; transition:.15s }
.le-del:hover { color:var(--rose) }

/* ── MILESTONE ───────────────────────────────────────── */
.milestone {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 9px;
  transition: border-color var(--t1);
}
.milestone.achieved { border-color: rgba(95,168,110,.25); background: var(--green-dim2) }
.ms-icon { font-size: 24px; flex-shrink: 0; width: 34px; text-align: center }
.ms-title { font-weight: 700; font-size: 13.5px; margin-bottom: 2px }
.ms-desc  { font-size: 12px; color: var(--tx-3); font-weight: 500; line-height:1.4 }
.ms-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
}
.ms-badge.done    { background:var(--green-dim); color:var(--green-lt) }
.ms-badge.pending { background:var(--bg-float);  color:var(--tx-3) }

/* ── FOOD CARD ───────────────────────────────────────── */
.food-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--t1), transform var(--t1);
}
.food-card:hover { border-color:var(--bdr-2); transform:translateY(-1px) }
.food-card:active { transform:scale(.98) }
.food-card.open { border-color:var(--bdr-2) }
.fc-head { display:flex; align-items:center; gap:12px; padding:14px }
.fc-emoji { font-size:28px; width:46px; height:46px; background:var(--bg-float); border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0 }
.fc-info { flex:1 }
.fc-name { font-weight:700; font-size:14px; color:var(--tx-1); margin-bottom:3px }
.fc-meta { font-size:12px; color:var(--tx-3); font-weight:500 }
.fc-kcal-wrap { text-align:right; flex-shrink:0 }
.fc-kcal { font-size:20px; font-weight:800; color:var(--green-lt); line-height:1 }
.fc-kcal-l { font-size:10px; color:var(--tx-3); font-weight:600; margin-top:2px }
.fc-tags { display:flex; gap:6px; flex-wrap:wrap; padding:0 14px 12px }
.fc-tag { font-size:10px; font-weight:700; padding:2px 8px; border-radius:6px }
.fc-detail { display:none; padding:0 14px 14px; border-top:1px solid var(--bdr) }
.food-card.open .fc-detail { display:block }
.fc-tip { font-size:13px; color:var(--tx-2); line-height:1.6; font-weight:500; padding-top:12px }
.fc-tip::before { content:'→ '; color:var(--green-lt); font-weight:700 }

/* ── FEEDBACK CARD ───────────────────────────────────── */
.feedback-card {
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 12px;
}
.feedback-card.positive { background: linear-gradient(135deg,#1a2f1f,#243827) }
.feedback-card.neutral  { background: var(--bg-raised); border:1px solid var(--bdr-2) }
.feedback-card.warning  { background: linear-gradient(135deg,#2a1f10,#382b18) }
.fb-tag   { font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:rgba(255,255,255,.4); margin-bottom:8px }
.fb-title { font-family:var(--serif); font-size:20px; font-weight:700; line-height:1.2; margin-bottom:7px }
.fb-text  { font-size:13.5px; line-height:1.65; font-weight:500 }
.feedback-card.positive .fb-title,
.feedback-card.positive .fb-text { color:rgba(255,255,255,.8) }
.feedback-card.positive .fb-text { color:rgba(255,255,255,.6) }
.feedback-card.neutral .fb-tag { color:var(--tx-3) }
.feedback-card.neutral .fb-title { color:var(--tx-1) }
.feedback-card.neutral .fb-text  { color:var(--tx-2) }

/* ── LOADING SCREEN ──────────────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  padding: 20px;
  animation: fade-out 0s 2.5s var(--ease) both;
}
@keyframes fade-out { to { opacity:0; pointer-events:none } }
.loading-ring {
  width: 64px; height: 64px;
  border: 3px solid var(--bg-float);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .85s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg) } }
.loading-rows { display:flex; flex-direction:column; gap:8px; margin-top:4px }
.loading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-raised);
  border-radius: 10px;
  font-size:13px;
  color: var(--tx-3);
  font-weight: 500;
  opacity: 0;
  animation: slide-up .4s ease both;
}
.loading-row.done { color:var(--green-lt) }
.li-ico { font-size:14px; width:18px; text-align:center }

/* ── MODAL ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade-in .22s ease;
  padding: 0;
}
@media (min-width: 520px) {
  .modal-overlay { align-items: center; padding: 16px }
}
.modal-box {
  background: var(--bg-raised);
  border: 1px solid var(--bdr-2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 22px 44px;
  animation: slide-up .32s var(--ease);
  position: relative;
}
@media (min-width: 520px) {
  .modal-box { border-radius: var(--r-xl) }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg-float);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  color: var(--tx-2);
  transition: .15s;
}
.modal-close:hover { color:var(--tx-1) }

/* ── TOAST ───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-float);
  border: 1px solid var(--bdr-2);
  color: var(--tx-1);
  padding: 12px 22px;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  animation: toast-in .28s var(--ease);
}
@keyframes toast-in {
  from { opacity:0; transform:translateX(-50%) translateY(10px) }
  to   { opacity:1; transform:translateX(-50%) translateY(0) }
}

/* ── AD SLOT ─────────────────────────────────────────── */
.ad-slot {
  border: 1px dashed var(--bdr);
  border-radius: var(--r-md);
  padding: 18px;
  text-align: center;
  color: var(--tx-4);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
}

/* ── FOOTER ──────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 28px 16px;
  font-size: 11px;
  color: var(--tx-3);
  border-top: 1px solid var(--bdr);
  font-weight: 500;
  line-height: 1.7;
}

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes slide-up {
  from { opacity:0; transform:translateY(18px) scale(.98) }
  to   { opacity:1; transform:translateY(0) scale(1) }
}
@keyframes slide-out {
  from { opacity:1; transform:translateY(0) }
  to   { opacity:0; transform:translateY(-12px) }
}
@keyframes fade-in {
  from { opacity:0 }
  to   { opacity:1 }
}
@keyframes fade-up {
  from { opacity:0; transform:translateY(12px) }
  to   { opacity:1; transform:translateY(0) }
}
.anim-1 { animation: fade-up .4s var(--ease) both }
.anim-2 { animation: fade-up .4s .08s var(--ease) both }
.anim-3 { animation: fade-up .4s .16s var(--ease) both }
.anim-4 { animation: fade-up .4s .24s var(--ease) both }
.anim-5 { animation: fade-up .4s .32s var(--ease) both }

/* ── LANDING SPECIFIC ────────────────────────────────── */
.landing-hero {
  text-align: center;
  padding: 100px 20px 60px;
  max-width: 700px;
  margin: 0 auto;
}
.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green-dim);
  border: 1px solid rgba(95,168,110,.2);
  color: var(--green-lt);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 26px;
}
.landing-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-lt);
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }
.landing-h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}
.landing-h1 em { color:var(--green-lt); font-style:italic }
.landing-p {
  font-size: 17px;
  color: var(--tx-2);
  line-height: 1.7;
  margin-bottom: 36px;
  font-weight: 400;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.landing-ctas { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-bottom:48px }
.stats-row {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--bg-raised);
  border: 1px solid var(--bdr-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto 60px;
}
.stat-block {
  flex: 1;
  padding: 18px 12px;
  text-align: center;
  border-right: 1px solid var(--bdr);
}
.stat-block:last-child { border-right: none }
.sb-val { font-size: 26px; font-weight: 800; color: var(--green-lt); letter-spacing: -.03em; line-height:1 }
.sb-lbl { font-size: 11px; color: var(--tx-3); margin-top: 5px; font-weight: 600 }

/* feature section */
.features-grid { display:grid; gap:12px; margin-bottom:60px }
.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.feature-title { font-size: 16px; font-weight: 700; margin-bottom: 6px }
.feature-text  { font-size: 14px; color: var(--tx-2); line-height: 1.65; font-weight: 500 }

/* ── UTILITIES ───────────────────────────────────────── */
.flex { display:flex }
.flex-col { flex-direction:column }
.items-center { align-items:center }
.justify-between { justify-content:space-between }
.gap-sm { gap:var(--sp-sm) }
.gap-md { gap:var(--sp-md) }
.text-center { text-align:center }
.text-sm { font-size:13px }
.text-xs { font-size:11px }
.fw-700 { font-weight:700 }
.fw-800 { font-weight:800 }
.color-green  { color:var(--green-lt) }
.color-blue   { color:var(--blue) }
.color-amber  { color:var(--amber) }
.color-violet { color:var(--violet) }
.color-rose   { color:var(--rose) }
.color-muted  { color:var(--tx-2) }
.color-faint  { color:var(--tx-3) }
.mt-sm { margin-top:var(--sp-sm) }
.mt-md { margin-top:var(--sp-md) }
.mt-lg { margin-top:var(--sp-lg) }
.mb-sm { margin-bottom:var(--sp-sm) }
.mb-md { margin-bottom:var(--sp-md) }
.mb-lg { margin-bottom:var(--sp-lg) }
.hidden { display:none !important }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links   { display:none }
  .nav-hamburger { display:flex }
  .opts-2 { grid-template-columns:1fr }
  .opts-3 { grid-template-columns:1fr 1fr }
  .opts-4 { grid-template-columns:1fr 1fr }
  .cta-grid { grid-template-columns:1fr }
  .macro-grid { gap:8px }
  .landing-ctas { flex-direction:column; align-items:stretch; padding: 0 20px }
  .stats-row { max-width:100% }
  .features-grid { grid-template-columns:1fr }
}
@media (min-width: 641px) {
  .features-grid { grid-template-columns:1fr 1fr }
}
@media (min-width: 900px) {
  .features-grid { grid-template-columns:1fr 1fr }
}

/* Mobile nav drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  top: 60px;
  background: rgba(7,10,15,.96);
  backdrop-filter: blur(20px);
  z-index: 99;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(-100%);
  transition: transform .25s var(--ease);
}
.nav-drawer.open { transform: translateX(0) }
.nav-drawer a {
  font-size: 16px;
  font-weight: 700;
  color: var(--tx-2);
  padding: 14px 16px;
  border-radius: var(--r-md);
  transition: .15s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-drawer a:hover, .nav-drawer a.active { color:var(--tx-1); background:var(--bg-float) }
.nav-drawer a.nav-drawer-cta { background:var(--green); color:#fff; justify-content:center; margin-top:8px }
