/* ============================================================
   Simpli Raw — styles
   Phone-first, installable web app. Calm, natural, editorial.
   ============================================================ */

:root {
  --bg: #faf7f1;
  --surface: #ffffff;
  --surface-2: #f3efe6;
  --ink: #2e3a2f;
  --ink-soft: #5c6b5a;
  --line: #e4ddcf;
  --green: #4a7c59;
  --green-deep: #3a6347;
  --sage: #8fb996;
  --citrus: #e0a13c;
  --berry: #b15c6c;
  --shadow: 0 6px 24px rgba(46, 58, 47, 0.08);
  --radius: 18px;
  --maxw: 560px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 84px; /* room for bottom nav */
}

h1, h2, h3, .serif {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.app { max-width: var(--maxw); margin: 0 auto; min-height: 100vh; }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 247, 241, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 10px;
}
.appbar .logo {
  font-family: Georgia, serif; font-weight: 600; font-size: 19px;
  color: var(--green-deep); letter-spacing: 0.02em;
}
.appbar .logo span { color: var(--citrus); }
.appbar .spacer { flex: 1; }
.appbar .leaf { width: 22px; height: 22px; }

/* ---------- View container ---------- */
.view { padding: 22px 20px 28px; animation: fade 0.35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view[hidden] { display: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card.flat { box-shadow: none; }
.card.tint { background: var(--surface-2); border-color: transparent; box-shadow: none; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px;
  font-weight: 700; color: var(--green); margin-bottom: 8px;
}
.lead { font-size: 17px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
h1 { font-size: 30px; margin-bottom: 10px; }
h2 { font-size: 23px; margin-bottom: 12px; }
h3 { font-size: 18px; margin-bottom: 8px; }
p + p { margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: #fff; border: none;
  font: inherit; font-weight: 600; font-size: 16px;
  padding: 14px 22px; border-radius: 999px; cursor: pointer;
  width: 100%; transition: transform 0.06s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.985); }
.btn:hover { background: var(--green-deep); }
.btn.secondary { background: transparent; color: var(--green-deep); border: 1.5px solid var(--line); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--green-deep); width: auto; padding: 8px 4px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }

/* ---------- Hero (welcome) ---------- */
.hero {
  background: linear-gradient(160deg, #527e5c 0%, #3a6347 100%);
  color: #fff; border-radius: 24px; padding: 34px 26px;
  text-align: center; box-shadow: var(--shadow); margin-bottom: 20px;
}
.hero h1 { color: #fff; font-size: 32px; }
.hero .tag { color: #e9f1e6; font-size: 16px; margin-top: 6px; }
.hero .mark {
  width: 56px; height: 56px; margin: 0 auto 14px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.14); border-radius: 50%;
}

/* ---------- Level chooser ---------- */
.choice {
  display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px;
  cursor: pointer; font: inherit; color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice:hover { border-color: var(--sage); }
.choice.selected { border-color: var(--green); background: #f1f6f0; }
.choice .name { font-family: Georgia, serif; font-size: 18px; font-weight: 600; color: var(--green-deep); }
.choice .desc { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.choice .dot {
  float: right; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); margin-top: 2px;
}
.choice.selected .dot { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 4px #fff; }

/* ---------- Progress dots / journey ---------- */
.progress-wrap { margin: 4px 0 20px; }
.progress-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-bar > i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width 0.4s ease; }
.progress-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

.day-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.day-cell {
  aspect-ratio: 1; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--surface); cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-soft); transition: all 0.15s ease;
}
.day-cell .num { font-family: Georgia, serif; font-size: 22px; font-weight: 600; color: var(--ink); }
.day-cell .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.day-cell.done { background: #eef5ee; border-color: var(--sage); }
.day-cell.done .num { color: var(--green-deep); }
.day-cell.today { border-color: var(--green); box-shadow: 0 0 0 3px rgba(74,124,89,0.12); }
.day-cell .check { color: var(--green); font-size: 13px; }

/* ---------- Day detail ---------- */
.day-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.day-head .big { font-family: Georgia, serif; font-size: 44px; color: var(--green); line-height: 1; }
.meal {
  display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line);
}
.meal:first-child { border-top: none; }
.meal .m-name { flex: 0 0 84px; font-weight: 700; color: var(--green-deep); font-size: 14px; }
.meal .m-detail { font-size: 15px; color: var(--ink); }

.checklist { list-style: none; }
.checklist li { display: flex; gap: 10px; padding: 9px 0; align-items: flex-start; }
.checklist li::before {
  content: ""; flex: 0 0 18px; height: 18px; margin-top: 3px;
  border: 2px solid var(--sage); border-radius: 6px;
}

blockquote.prompt {
  background: var(--surface-2); border-left: 4px solid var(--citrus);
  padding: 14px 16px; border-radius: 0 12px 12px 0; font-style: italic;
  color: var(--ink); margin: 4px 0 14px;
}

textarea {
  width: 100%; min-height: 120px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
}
textarea:focus { outline: none; border-color: var(--sage); }
.save-note { font-size: 12px; color: var(--green); margin-top: 6px; height: 16px; }
.entry-text { white-space: pre-wrap; font-size: 15px; color: var(--ink); }

.encourage {
  background: linear-gradient(160deg, #f4f8f2, #eef5ee);
  border-radius: 14px; padding: 16px; font-family: Georgia, serif;
  font-size: 16px; color: var(--green-deep); font-style: italic;
}

/* ---------- Library / FAQ ---------- */
.list-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; margin-bottom: 10px; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.list-item:hover { border-color: var(--sage); }
.list-item .ico { flex: 0 0 38px; height: 38px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; }
.list-item .t { font-family: Georgia, serif; font-weight: 600; font-size: 16px; }
.list-item .b { font-size: 13px; color: var(--ink-soft); }
.list-item .chev { margin-left: auto; color: var(--sage); }

.prose p { margin-bottom: 14px; font-size: 16px; }
.prose h3 { margin-top: 18px; color: var(--green-deep); }
.prose .items { font-size: 15px; color: var(--ink); }

details.faq { border-bottom: 1px solid var(--line); padding: 14px 2px; }
details.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--green); font-size: 20px; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin-top: 10px; color: var(--ink-soft); font-size: 15px; }

/* ---------- Disclaimer ---------- */
.disclaimer {
  font-size: 12.5px; color: var(--ink-soft); background: var(--surface-2);
  border-radius: 12px; padding: 14px 16px; margin-top: 8px;
}
.disclaimer strong { color: var(--ink); }

/* ---------- Bottom nav ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw); z-index: 30;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(6, 1fr);
  padding: 8px 2px calc(8px + env(safe-area-inset-bottom));
}
.tabbar button {
  background: none; border: none; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-soft); font-size: 9.5px; padding: 6px 0;
}
.tabbar button svg { width: 21px; height: 21px; }
.tabbar button.active { color: var(--green); }

/* ---------- Misc ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--green-deep); background: none; border: none; font: inherit; cursor: pointer; padding: 4px 0; margin-bottom: 12px; font-weight: 600; }
.pill { display: inline-block; background: var(--surface-2); color: var(--green-deep); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stack > * + * { margin-top: 16px; }
hr.soft { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.upsell { background: linear-gradient(160deg, #fff, #f7f3ea); border: 1px dashed var(--citrus); }

/* Landing page */
.hero-logo { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 14px; display: block; box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
.points { display: grid; gap: 10px; }
.point { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.point .pt-t { font-family: Georgia, serif; font-weight: 600; color: var(--green-deep); }
.point .pt-d { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.card.product { border: 1.5px solid var(--sage); }
.price { font-family: Georgia, serif; font-size: 28px; font-weight: 600; color: var(--green-deep); }
.price-row { display: flex; align-items: baseline; gap: 10px; margin: 14px 0; }

/* Consent */
.consent-box {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 16px; max-height: 300px; overflow-y: auto; font-size: 14px; color: var(--ink);
}
.consent-box p { margin-bottom: 12px; }
.ack { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.ack input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--green); flex: 0 0 18px; }

/* Photo banners */
.photo-banner { width: 100%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Community feed */
.preview-banner {
  background: #fff7e8; border: 1px solid #f0d9a8; color: #8a6d2f;
  border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.5;
}
.preview-banner strong { color: #6f5520; }
.card.pinned { border: 1px solid var(--sage); background: #f1f6f0; box-shadow: none; }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avatar {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); color: var(--green-deep);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.avatar.team { background: var(--green); color: #fff; }
.post-name { font-weight: 700; font-size: 15px; }
.badge {
  font-size: 10px; background: var(--citrus); color: #fff;
  padding: 2px 6px; border-radius: 6px; vertical-align: middle; letter-spacing: 0.04em;
}
.post-time { font-size: 12px; color: var(--ink-soft); }
.post-text { font-size: 15px; color: var(--ink); white-space: pre-wrap; }
.like {
  margin-top: 12px; background: none; border: 1px solid var(--line);
  color: var(--ink-soft); border-radius: 999px; padding: 6px 14px;
  font: inherit; font-size: 13px; cursor: pointer;
}
.like.on { color: var(--berry); border-color: var(--berry); }
.composer .cinput {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font: inherit; font-size: 15px; margin-bottom: 10px;
}
.composer .cinput:focus, .composer textarea:focus { outline: none; border-color: var(--sage); }
.composer textarea { min-height: 90px; margin-bottom: 10px; }

/* Food chips (Weekend Prep on Days 1-3) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--surface-2); color: var(--green-deep);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 12px; font-size: 13px; font-weight: 500;
}
.chip.avoid { background: #faf0ef; color: #9a4a42; border-color: #eddad7; }

/* Shopping guide table (Welcome & Prep) */
.guide-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.guide-table th {
  text-align: left; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 600; padding: 6px 4px; border-bottom: 1.5px solid var(--line);
}
.guide-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: top; }
.guide-table tr:last-child td { border-bottom: none; }
.guide-table .gt-check { text-align: center; width: 62px; color: var(--green); font-weight: 700; }
.gt-note { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }

/* Welcome & Prep row on the Journey screen */
.prep-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; text-align: left;
}
.prep-row .prep-ico { font-size: 22px; }
.prep-row .prep-t { font-family: Georgia, serif; font-weight: 600; color: var(--green-deep); }
.prep-row .prep-s { font-size: 12px; color: var(--ink-soft); }
.prep-row.done { background: #eef5ee; border-color: var(--sage); }
.prep-row.today { border-color: var(--green); box-shadow: 0 0 0 3px rgba(74,124,89,0.12); }

/* Mission label sits on the dark hero */
.hero .eyebrow { color: #cfe3cf; }

/* Video player + "coming soon" placeholder */
.video-card { padding: 0; overflow: hidden; background: #000; }
.video { width: 100%; display: block; background: #000; }
.video-frame { position: relative; padding-top: 56.25%; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder {
  display: flex; align-items: center; gap: 14px; border: none;
  background: linear-gradient(160deg, #527e5c, #3a6347); color: #fff;
}
.video-placeholder .play { flex: 0 0 46px; }
.video-placeholder .play svg { width: 46px; height: 46px; }
.video-placeholder .vp-title { font-family: Georgia, serif; font-weight: 600; font-size: 17px; }
.video-placeholder .vp-sub { font-size: 13px; color: #dce8d9; margin-top: 2px; }

/* Completion celebration */
.hero.celebrate { position: relative; overflow: hidden; }
.hero.celebrate .confetti { font-size: 30px; margin-bottom: 4px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 8px; text-align: center; box-shadow: var(--shadow);
}
.stat .n { font-family: Georgia, serif; font-size: 26px; font-weight: 600; color: var(--green-deep); line-height: 1; }
.stat .l { font-size: 11px; color: var(--ink-soft); margin-top: 5px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Recipe ingredient & info lists */
.ingredients { list-style: none; }
.ingredients li { position: relative; padding: 5px 0 5px 18px; font-size: 15px; color: var(--ink); }
.ingredients li::before {
  content: ""; position: absolute; left: 2px; top: 13px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--sage);
}
