/* Forkwell design system — warm editorial, clean and calm */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --paper: #FAF7F1;
  --paper-deep: #F3EEE3;
  --card: #FFFFFF;
  --ink: #1B1A16;
  --muted: #6F6A5C;
  --line: #E7DFCE;
  --green: #2E7D4F;
  --green-deep: #1E5B38;
  --green-soft: #E9F2EB;
  --gold: #D99A2B;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(27, 26, 22, 0.08);
  --shadow-sm: 0 4px 14px rgba(27, 26, 22, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 1rem; }
h3 { font-size: 1.35rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--green);
  margin-bottom: 0.9rem;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 241, 0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.5rem; text-decoration: none; }
.brand em { font-style: normal; color: var(--green); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.fw-btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1rem;
  padding: 14px 28px; border-radius: 999px;
  background: var(--green); color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 8px 20px rgba(46, 125, 79, 0.28);
}
.fw-btn:hover { background: var(--green-deep); transform: translateY(-2px); }
.fw-btn-ghost {
  background: transparent; color: var(--ink); box-shadow: none;
  border: 1.5px solid var(--line); padding: 9px 18px; font-size: 0.88rem;
}
.fw-btn-ghost:hover { border-color: var(--green); color: var(--green-deep); background: var(--green-soft); transform: none; box-shadow: none; }
.fw-btn-lg { padding: 17px 38px; font-size: 1.08rem; }

/* ---------- Hero ---------- */
.hero { padding: 110px 0 70px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-cta { display: flex; gap: 14px; margin: 28px 0 18px; flex-wrap: wrap; }
.hero-note { font-size: 0.9rem; color: var(--muted); }
.hero-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 28px; box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}
.hero-card h3 { font-size: 1.1rem; margin-bottom: 14px; }
.fw-sample-meal {
  display: flex; align-items: baseline; gap: 10px; padding: 10px 0;
  border-bottom: 1px dashed var(--line); font-size: 0.95rem;
}
.fw-sample-meal:last-of-type { border-bottom: none; }
.fw-sample-meal b { font-weight: 600; }
.fw-sample-meal span:last-child { margin-left: auto; color: var(--muted); white-space: nowrap; }
.fw-sample-total { margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 0.95rem; }
.fw-slot {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green-deep); background: var(--green-soft);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.hero-shuffle { margin-top: 16px; width: 100%; text-align: center; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow-sm);
}
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 1.2rem; margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* ---------- Diets ---------- */
.diet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.diet-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none; color: inherit; display: block; cursor: pointer;
}
.diet-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.diet-card h3 { font-size: 1.15rem; }
.diet-card p { color: var(--muted); font-size: 0.94rem; margin: 0 0 12px; }
.diet-cta { font-size: 0.88rem; font-weight: 700; color: var(--green-deep); }

/* ---------- Features ---------- */
.feature-band { background: var(--ink); color: #F5F1E8; border-radius: 28px; padding: 72px 64px; }
.feature-band .eyebrow { color: #9FD3B4; }
.feature-band h2 { color: #fff; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-top: 44px; }
.feature h3 { color: #fff; font-size: 1.2rem; margin-bottom: 6px; }
.feature p { color: #B9B2A2; margin: 0; font-size: 0.98rem; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; max-width: 860px; margin-left: auto; margin-right: auto; }
.price-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 40px 36px; box-shadow: var(--shadow-sm); position: relative;
}
.price-card.pro { border: 2px solid var(--green); box-shadow: var(--shadow); }
.price-flag {
  position: absolute; top: -14px; left: 36px;
  background: var(--green); color: #fff; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px;
}
.price { font-family: 'Fraunces', serif; font-size: 3rem; font-weight: 700; margin: 12px 0 4px; }
.price span { font-size: 1rem; font-family: 'Inter', sans-serif; font-weight: 400; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 24px 0; }
.price-card li { padding: 8px 0 8px 30px; position: relative; font-size: 0.97rem; }
.price-card li::before { content: '✓'; position: absolute; left: 4px; color: var(--green); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 48px auto 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 1.08rem; padding: 22px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.5rem; color: var(--green); font-weight: 400; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { color: var(--muted); padding-bottom: 22px; margin: 0; }

/* ---------- CTA + footer ---------- */
.cta-band {
  background: var(--green-soft); border: 1px solid var(--line);
  border-radius: 28px; padding: 72px 48px; text-align: center;
}
footer { border-top: 1px solid var(--line); padding: 48px 0; margin-top: 88px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.foot-links { display: flex; gap: 22px; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.foot-links a:hover { color: var(--ink); }

/* ================= APP ================= */
.app-layout { display: grid; grid-template-columns: 360px 1fr; gap: 32px; align-items: start; padding: 48px 0 88px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 30px; box-shadow: var(--shadow-sm); position: sticky; top: 100px;
}
.panel h2 { font-size: 1.5rem; margin-bottom: 20px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 8px; }
.field input[type="number"], .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: 'Inter', sans-serif; font-size: 1rem; background: var(--paper);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--green); }
.excl-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.excl {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 14px;
  font-size: 0.88rem; cursor: pointer; user-select: none; background: var(--paper);
}
.excl input { display: none; }
.excl:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg { display: flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg label { flex: 1; text-align: center; padding: 11px 0; font-size: 0.92rem; font-weight: 600; cursor: pointer; background: var(--paper); }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--green); color: #fff; }
.panel .fw-btn { width: 100%; margin-top: 8px; }
.fw-muted { color: var(--muted); font-size: 0.9rem; }

.fw-days { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.fw-day {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 8px 18px; font-weight: 600; font-size: 0.9rem; cursor: pointer; font-family: 'Inter', sans-serif;
}
.fw-day.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.fw-totals {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px;
  background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px;
}
.fw-totals div { text-align: center; }
.fw-totals b { display: block; font-family: 'Fraunces', serif; font-size: 1.7rem; }
.fw-totals span { font-size: 0.8rem; color: #B9B2A2; text-transform: uppercase; letter-spacing: 0.08em; }
.fw-meals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.fw-meal {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.fw-meal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fw-time { font-size: 0.82rem; color: var(--muted); }
.fw-serv { color: var(--muted); font-size: 0.92rem; }
.fw-macros { display: flex; gap: 16px; margin: 12px 0; font-size: 0.88rem; color: var(--muted); flex-wrap: wrap; }
.fw-macros b { color: var(--ink); }
.fw-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.fw-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.fw-meal-actions { display: flex; gap: 10px; }
.fw-recipe { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 16px; }
.fw-recipe h4 { font-family: 'Inter', sans-serif; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 14px 0 8px; }
.fw-recipe ul, .fw-recipe ol { margin: 0; padding-left: 20px; font-size: 0.93rem; }
.fw-recipe li { margin-bottom: 6px; }

.grocery {
  margin-top: 32px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.fw-groc { list-style: none; padding: 0; margin: 16px 0 0; columns: 2; column-gap: 32px; }
.fw-groc li {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 0;
  border-bottom: 1px dashed var(--line); break-inside: avoid; font-size: 0.93rem;
}
.fw-groc b { white-space: nowrap; }

.empty-state { text-align: center; padding: 80px 24px; color: var(--muted); }
.empty-state .display { font-size: 2rem; color: var(--ink); margin-bottom: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .steps, .diet-grid, .price-grid, .feature-grid { grid-template-columns: 1fr; }
  .app-layout { grid-template-columns: 1fr; }
  .panel { position: static; }
  .fw-meals { grid-template-columns: 1fr; }
  .fw-groc { columns: 1; }
  .feature-band { padding: 48px 32px; }
  .nav-links a:not(.fw-btn) { display: none; }
  section { padding: 64px 0; }
}

/* ================= FluentFuel v2 ================= */
.ff-details { border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 16px; background: var(--paper); }
.ff-details summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; padding: 13px 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ff-details summary::-webkit-details-marker { display: none; }
.ff-details summary::after { content: '+'; color: var(--green); font-size: 1.3rem; font-weight: 400; }
.ff-details[open] summary::after { content: '–'; }
.ff-details-body { padding: 4px 16px 16px; }
.ff-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ff-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.ff-tdee-out { margin-top: 12px; font-size: 0.95rem; }
.ff-warn { color: #A33B2E; }
.ff-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.ff-check input { width: 20px; height: 20px; accent-color: var(--green); margin-top: 2px; flex-shrink: 0; }

.ff-art {
  height: 118px; border-radius: var(--radius) var(--radius) 0 0; margin: -24px -24px 0;
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
  position: relative; overflow: hidden;
}
.ff-art::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.35), transparent 55%);
}
.ff-art-icon { font-size: 3.4rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.18)); position: relative; z-index: 1; }
.ff-art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.ff-art .fw-slot { background: rgba(255,255,255,.92); color: #1B1A16; position: relative; z-index: 1; }
.ff-meal-body { padding-top: 18px; }
.ff-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ff-badges .fw-time { margin-left: auto; }
.ff-badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--gold); color: #fff; padding: 4px 12px; border-radius: 999px;
}
.ff-badge-dark { background: #1B1A16; }
.ff-badge-green { background: var(--green); }
.ff-ate { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500; color: var(--muted); margin: 12px 0; cursor: pointer; }
.ff-ate input { width: 18px; height: 18px; accent-color: var(--green); }
.fw-meal.ff-done { opacity: 0.72; }
.fw-meal.ff-done h3 { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--green); }

.ff-strip {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 22px; margin-bottom: 20px; box-shadow: var(--shadow-sm); font-size: 0.95rem;
}
.ff-streak { font-weight: 700; }
.ff-weekscore { font-weight: 600; color: var(--green-deep); }

.ff-plan-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.ff-saved-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.ff-saved-row:last-child { border-bottom: none; }

/* ---------- Print ---------- */
@media print {
  .nav, .panel, .ff-plan-actions, .fw-meal-actions, .ff-ate, .fw-days,
  #ff-empty, footer, .ff-strip { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .app-layout { display: block; padding: 0; }
  #ff-results { display: block !important; }
  .wrap { max-width: 100%; padding: 0 12px; }
  section { padding: 0; }
  .fw-meals { grid-template-columns: 1fr 1fr; gap: 12px; }
  .fw-meal { break-inside: avoid; box-shadow: none; padding: 14px; }
  .ff-art { height: 64px; margin: -14px -14px 0; }
  .ff-art-icon { font-size: 2rem; }
  .fw-totals { break-inside: avoid; padding: 14px; }
  .grocery { break-inside: avoid; box-shadow: none; }
  .fw-groc { columns: 2; }
}

/* ---- new feature styles ---- */
.ff-fine { font-size: .78rem; opacity: .75; }
.ff-coach-banner {
  background: #fff8e1; border: 1px solid #e6d98a; color: #5c4a00;
  padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600;
}
.ff-prep-head { margin-bottom: 8px; }
.ff-prep-session {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin: 22px 0;
}
.ff-prep-session h4 { margin: 16px 0 6px; }
.ff-prep-session ol { margin: 6px 0 12px; padding-left: 22px; }
.ff-prep-session li { margin-bottom: 6px; }
body.coach .panel { display: none !important; }
@media print {
  .ff-coach-banner, .fw-meal-actions, .ff-ate, .ff-plan-actions { display: none !important; }
}

/* swap picker */
.ff-swap-pick {
  margin-top: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); padding: 12px;
}
.ff-swap-pick-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 0.95rem;
}
.ff-swap-opt {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  padding: 10px 12px; margin-bottom: 8px; font: inherit; color: inherit;
}
.ff-swap-opt:hover { border-color: var(--green); box-shadow: var(--shadow); }
.ff-swap-opt-name { font-weight: 600; }
.ff-swap-opt-meta { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

/* ---------- ACCOUNT MODAL ---------- */
.ff-modal { display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(30, 40, 32, 0.5); align-items: center; justify-content: center;
  padding: 20px; }
.ff-modal.show { display: flex; }
.ff-modal-card { position: relative; background: var(--paper); border-radius: 24px;
  max-width: 440px; width: 100%; padding: 36px 32px; box-shadow: var(--shadow);
  max-height: 90vh; overflow-y: auto; }
.ff-modal-x { position: absolute; top: 14px; right: 16px; background: none; border: none;
  font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1; }
.ff-kicker { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green); font-weight: 700; margin-bottom: 10px; }
.ff-modal-card h2 { font-size: 1.7rem; line-height: 1.15; margin-bottom: 10px; }
.ff-muted { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.ff-label { display: block; font-size: 0.72rem; letter-spacing: 0.12em; font-weight: 700;
  margin: 14px 0 6px; color: var(--ink); }
.ff-input { width: 100%; padding: 13px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff; font-size: 1rem;
  font-family: 'Inter', sans-serif; box-sizing: border-box; }
.ff-input:focus { outline: none; border-color: var(--green); }
.ff-err { min-height: 22px; color: #B3402E; font-size: 0.88rem; margin: 10px 0; }
.ff-wide { width: 100%; box-sizing: border-box; }
.ff-link { display: block; margin: 14px auto 0; background: none; border: none;
  color: var(--green-deep); text-decoration: underline; cursor: pointer; font-size: 0.88rem; }
#ffAccountBtn { margin-left: 6px; }
