/* APEX — premium carnivore identity.
   Display: Fraunces (high-contrast serif). Body: system sans. Warm charcoal + ember. */

@font-face {
  font-family: "Fraunces";
  src: url("./fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink:      #0e0b09;
  --ink-2:    #141010;
  --panel:    #1b1512;
  --panel-2:  #221913;
  --panel-3:  #2a1f17;
  --line:     #37291f;
  --line-2:   #4a382b;
  --ember:    #db7a2c;
  --ember-2:  #f0a24a;
  --wine:     #7c2323;
  --bone:     #f3eadc;
  --bone-dim: #c1b09a;
  --muted:    #8e7c6b;
  --gold:     #d8a24a;
  --ok:       #7cbf6a;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0,0,0,.5);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100%; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(72px + var(--safe-b));
  /* film grain */
  background-image:
    radial-gradient(1200px 620px at 50% -8%, #2a140b 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed;
}

.display { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.05; text-wrap: balance; }
h1, h2, h3 { margin: 0 0 .4em; }
b { color: var(--bone); }
em { color: var(--ember-2); font-style: normal; }

.eyebrow { color: var(--ember-2); text-transform: uppercase; letter-spacing: .22em; font-size: 11px; font-weight: 700; margin: 0 0 12px; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  background: linear-gradient(180deg, var(--ember-2), var(--ember));
  color: #1a0f06; padding: 13px 24px; border-radius: 999px;
  box-shadow: 0 8px 22px rgba(219,122,44,.28);
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; color: var(--bone); border: 1px solid var(--line-2); box-shadow: none; }
.btn--sm { padding: 8px 15px; font-size: 13px; }
.link { background: none; border: 0; color: var(--ember-2); font: inherit; font-weight: 700; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; max-width: var(--maxw); margin: 0 auto;
  background: linear-gradient(180deg, rgba(14,11,9,.92), rgba(14,11,9,.62) 70%, transparent);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--bone); }
.brand__mark { width: 40px; height: 40px; filter: drop-shadow(0 2px 8px rgba(219,122,44,.3)); transition: filter .3s ease; }
.brand:hover .brand__mark { filter: drop-shadow(0 2px 14px rgba(240,162,74,.55)); }
.brand__stack { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.brand__word {
  /* exactly the site's display treatment: Fraunces, tight tracking, bone→ember gradient */
  font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: -.01em;
  background: linear-gradient(115deg, var(--bone) 30%, #e8cfa4 55%, var(--ember-2) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand__sub {
  /* mirrors the site's eyebrow style */
  font-size: 10px; font-weight: 700; letter-spacing: .22em; color: var(--ember-2); text-transform: uppercase; padding-left: 1px;
}
.topnav { display: flex; gap: 4px; }
.topnav button { background: none; border: 0; color: var(--bone-dim); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s; }
.topnav button:hover { color: var(--bone); background: var(--panel); }
@media (max-width: 640px) { .topnav { display: none; } }

/* ---------- Views ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 6px 22px 48px; }
.view { display: none; animation: fade .4s ease; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view__head { margin: 20px 0 20px; }
.view__head .display { font-size: clamp(30px, 6vw, 46px); }
.view__sub { color: var(--muted); margin: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 26px;
  margin-top: 8px; min-height: 74vh; display: flex; align-items: flex-end;
  border: 1px solid var(--line);
}
.hero__media { position: absolute; inset: 0; background:
    radial-gradient(120% 90% at 78% 12%, rgba(219,122,44,.42), transparent 55%),
    linear-gradient(160deg, #2c1710 0%, #1a0f0b 45%, #0e0b09 100%);
  background-size: cover; background-position: center;
  opacity: 1; transition: opacity 2.2s ease; }
.hero__media.has-img { background-size: cover; background-position: center; }
.hero__media--b { opacity: 0; }
.hero__media--b.is-front { opacity: 1; }
.hero__embers { position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14,11,9,.95) 4%, rgba(14,11,9,.55) 40%, transparent 78%); }
.hero__inner { position: relative; z-index: 2; padding: 40px 34px 44px; max-width: 760px; }
.hero h1 { font-size: clamp(38px, 8.5vw, 78px); margin: 0 0 18px; }
.hero h1 span { color: var(--ember-2); }
.lede { color: var(--bone-dim); max-width: 54ch; font-size: clamp(15px, 2.4vw, 18px); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; }
.hero__stats { display: flex; gap: 30px; flex-wrap: wrap; }
.hero__stats b { display: block; font-family: var(--serif); font-size: 30px; color: var(--bone); }
.hero__stats span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }

/* ---------- Featured strip (horizontal rail) ---------- */
.strip { margin: 40px 0 8px; }
.strip__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.strip__head .display { font-size: 24px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.rail > * { scroll-snap-align: start; }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0; }
.pillar { text-align: left; cursor: pointer; color: var(--bone); font: inherit;
  background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px; transition: transform .12s ease, border-color .15s ease; }
.pillar:hover { transform: translateY(-4px); border-color: var(--line-2); }
.pillar--feature { background: linear-gradient(180deg, #251710, var(--panel-2)); border-color: #5a3a1e; }
.pillar__kicker { display: block; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.pillar .display { font-size: 28px; margin-bottom: 8px; }
.pillar p { color: var(--bone-dim); font-size: 14.5px; margin: 0; }

.why { margin: 12px 0 4px; border-radius: 24px; padding: 3px;
  background: linear-gradient(120deg, var(--wine), var(--ember)); }
.why__inner { background: var(--ink-2); border-radius: 21px; padding: 40px 34px; }
.why__inner .display { font-size: clamp(24px, 5vw, 38px); max-width: 20ch; }
.why__inner p:last-child { color: var(--bone-dim); max-width: 60ch; margin: 0; }

/* ---------- Search + chips ---------- */
.searchbar { margin-bottom: 14px; }
.searchbar input {
  width: 100%; font: inherit; font-size: 16px; color: var(--bone);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; }
.searchbar input::placeholder { color: var(--muted); }
.searchbar input:focus { border-color: var(--ember); outline: none; }
/* diet segmented tabs (strict / relaxed) */
.diet-tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 16px; width: fit-content; max-width: 100%; overflow-x: auto; }
.diet-tab { flex: 0 0 auto; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--bone-dim); background: transparent; border: 0; border-radius: 999px; padding: 9px 16px; white-space: nowrap; transition: color .15s, background .15s; }
.diet-tab:hover { color: var(--bone); }
.diet-tab.is-active { background: linear-gradient(180deg, var(--ember-2), var(--ember)); color: #1a0f06; }
.diet-tab__n { font-size: 11px; opacity: .7; margin-left: 3px; font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  background: var(--panel); color: var(--bone-dim); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 15px; transition: all .12s ease; }
.chip:hover { border-color: var(--line-2); color: var(--bone); }
.chip.is-active { background: linear-gradient(180deg, var(--ember-2), var(--ember)); color: #1a0f06; border-color: transparent; }

/* nutrient ranking */
.nutrient-sort { margin: -6px 0 22px; }
.nutrient-sort__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; }
.pill--nutrient { color: var(--gold); border-color: #6a4f1e; background: rgba(216,162,74,.14); font-variant-numeric: tabular-nums; }

/* ---------- Cards (image-forward) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { cursor: pointer; text-align: left; color: var(--bone); font: inherit;
  background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .12s ease, border-color .15s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.card:hover .card__media::after { opacity: 1; }
.card__media { position: relative; aspect-ratio: 4 / 3; background-size: cover; background-position: center;
  display: flex; align-items: flex-end; padding: 12px; overflow: hidden; }
.card__media::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(90% 70% at 50% 30%, rgba(255,255,255,.06), transparent 60%),
              radial-gradient(120% 90% at 50% 125%, rgba(219,122,44,.4), transparent 62%);
  opacity: .9; transition: opacity .2s; }
.card__emoji { position: absolute; inset: 0; display: grid; place-items: center; z-index: 0;
  font-size: 62px; line-height: 1; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); transition: transform .25s ease; }
.card:hover .card__emoji { transform: scale(1.09) rotate(-3deg); }
.card__media.has-img .card__emoji { display: none; }
.card__cat { position: relative; z-index: 1; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(14,11,9,.62); backdrop-filter: blur(4px); color: var(--bone); padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08); }
.card__play { position: absolute; z-index: 1; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(14,11,9,.55); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.14); display: grid; place-items: center; color: var(--bone); font-size: 12px; }
.card__body { padding: 15px 17px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.15; }
.card__blurb { color: var(--muted); font-size: 13px; margin: 0; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; align-items: center; }
.pill { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 4px 9px; border-radius: 999px; background: var(--panel-3); color: var(--bone-dim); border: 1px solid var(--line); }
.pill--macro { color: var(--ember-2); border-color: #5a3a1e; background: rgba(219,122,44,.1); font-variant-numeric: tabular-nums; }
.pill--strict { color: var(--ok); border-color: #2f4a28; background: rgba(124,191,106,.1); }
.empty { color: var(--muted); text-align: center; padding: 50px; }
.more { display: block; margin: 26px auto 0; }

/* ---------- Weekly planner ---------- */
.weekplan { background: linear-gradient(150deg, var(--panel-2), var(--ink-2)); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; margin-bottom: 22px; }
.weekplan__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.weekplan__head h3 { font-family: var(--serif); font-size: 20px; margin: 0; }
.weekplan__hint { font-size: 12px; color: var(--muted); }
.weekplan__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.wday { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px; min-height: 78px; display: flex; flex-direction: column; gap: 6px; }
.wday.is-set { border-color: var(--line-2); }
.wday__name { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; }
.wday__rest { font-size: 10.5px; color: #5c4c3f; text-align: center; margin-top: 6px; }
.wday__item { position: relative; cursor: pointer; background: linear-gradient(180deg, #291a10, var(--panel-2)); border: 1px solid #5a3a1e; border-radius: 8px; padding: 6px 5px; text-align: center; }
.wday__item b { display: block; font-size: 10.5px; color: var(--ember-2); line-height: 1.1; }
.wday__item span { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wday__del { position: absolute; top: -6px; right: -5px; width: 17px; height: 17px; border-radius: 50%; background: var(--wine); color: #fff; font-size: 9px; display: grid; place-items: center; font-style: normal; }
@media (max-width: 560px) {
  .weekplan__grid { grid-template-columns: 1fr; }
  .wday { flex-direction: row; align-items: center; min-height: 0; flex-wrap: wrap; }
  .wday__name { text-align: left; width: 46px; }
}

/* guided session + timer */
.guide__prog { font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--ember-2); text-transform: none; letter-spacing: 0; margin-left: 8px; }
.guide__hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.guide { display: grid; gap: 8px; }
.gmove { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; text-align: left; font: inherit; color: var(--bone-dim);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: all .12s ease; }
.gmove:hover { border-color: var(--line-2); }
.gmove.is-done { background: rgba(124,191,106,.08); border-color: #2f4a28; color: var(--muted); }
.gmove.is-done .gmove__text { text-decoration: line-through; }
.gmove__check { flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 12px; color: transparent; margin-top: 1px; }
.gmove.is-done .gmove__check { background: var(--ok); border-color: var(--ok); color: #0e1a0b; }
.gmove__text { font-size: 14.5px; line-height: 1.4; }
.timer { margin-top: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.timer__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.timer__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timer__disp { margin-left: auto; font-family: var(--serif); font-size: 26px; color: var(--bone); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.timer__disp.done { color: var(--ok); font-size: 18px; }
.weekpick { margin: 4px 0 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.weekpick__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.weekpick__days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.weekpick__time { font-size: 13px; color: var(--bone-dim); display: flex; align-items: center; gap: 8px; }
.weekpick__time input { font: inherit; background: var(--ink); border: 1px solid var(--line); color: var(--bone); border-radius: 8px; padding: 6px 8px; }

/* ---------- Modal + video player ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.modal__panel { position: relative; z-index: 1; width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--panel-2), var(--ink-2)); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 24px 24px 0 0; box-shadow: var(--shadow); animation: slideUp .3s ease; }
@keyframes slideUp { from { transform: translateY(36px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (min-width: 660px) { .modal { align-items: center; } .modal__panel { border-radius: 24px; border-bottom: 1px solid var(--line); } }
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 3; background: rgba(14,11,9,.6); border: 1px solid var(--line-2); color: var(--bone); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 15px; }

.player { position: relative; aspect-ratio: 16 / 9; background-size: cover; background-position: center;
  display: grid; place-items: center; border-radius: 24px 24px 0 0; overflow: hidden; }
.player__emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 96px; opacity: .5; filter: drop-shadow(0 12px 24px rgba(0,0,0,.55)); }
/* recipe photo header (no video on recipes) */
.rphoto { position: relative; aspect-ratio: 16 / 9; background-size: cover; background-position: center; border-radius: 24px 24px 0 0; overflow: hidden; }
.rphoto__emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 84px; filter: drop-shadow(0 12px 24px rgba(0,0,0,.5)); }
@media (min-width: 660px) { .rphoto { border-radius: 24px 24px 0 0; } }
.player__scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14,11,9,.85), rgba(14,11,9,.15)); }
.player__btn { position: relative; z-index: 1; width: 68px; height: 68px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(180deg, var(--ember-2), var(--ember)); color: #1a0f06; font-size: 24px; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(219,122,44,.4); transition: transform .1s; }
.player__btn:hover { transform: scale(1.06); }
.player__note { position: absolute; z-index: 1; bottom: 14px; left: 16px; font-size: 12px; color: var(--bone-dim); letter-spacing: .04em; }
.player video { width: 100%; height: 100%; object-fit: cover; }
.player iframe { width: 100%; height: 100%; border: 0; }
.player__soon { position: absolute; bottom: 14px; left: 16px; z-index: 1; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: var(--bone-dim); background: rgba(14,11,9,.65); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.1);
  padding: 6px 12px; border-radius: 999px; }

/* AI meal snap */
.snap { margin-bottom: 14px; }
.snap__busy { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--bone-dim); font-size: 14px; animation: cardIn .3s ease; }
.snap__card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--ember); border-radius: 16px; padding: 14px 16px; animation: cardIn .35s ease; }
.snap__thumb { width: 74px; height: 74px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.snap__info { flex: 1; min-width: 180px; display: grid; gap: 3px; }
.snap__info b { font-size: 15px; }
.snap__info span { font-size: 13px; color: var(--bone-dim); }
.snap__conf { font-size: 11.5px !important; color: var(--muted) !important; }
.snap__actions { display: flex; gap: 8px; }

/* editorial mosaic: first card of each grid page runs large on desktop */
@media (min-width: 900px) {
  .grid .card:first-child { grid-column: span 2; }
  .grid .card:first-child .card__media { aspect-ratio: 16 / 8.4; }
  .grid .card:first-child .card__title { font-size: 24px; }
}

/* success stories */
.stories { display: grid; gap: 14px; }
.stories__note { color: var(--muted); font-size: 12.5px; margin: 0 0 2px; }
.story { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-left: 4px solid var(--ember); border-radius: var(--radius); padding: 20px 22px; animation: cardIn .4s ease both; }
.story .display { font-size: 20px; margin-bottom: 8px; }
.story__body { color: var(--bone-dim); font-size: 14.5px; line-height: 1.65; margin: 0 0 10px; white-space: pre-line; }
.story footer { color: var(--ember-2); font-size: 13px; font-weight: 700; }
.story__photos { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.story__photos img { width: 150px; max-width: 44%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.story-form input[type=file] { font-size: 13px; color: var(--muted); }
.story-form { display: grid; gap: 14px; position: relative; }
.story-form label { display: grid; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.story-form input[type=text], .story-form textarea { font: inherit; font-size: 15px; color: var(--bone); background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical; }
.story-form input:focus, .story-form textarea:focus { border-color: var(--ember); outline: none; }
.story-form .btn { justify-self: start; }
.story-form__note { color: var(--muted); font-size: 13px; margin: 0; }

.modal__content { padding: 24px 24px calc(30px + var(--safe-b)); }
.modal__content .display { font-size: 27px; margin: 4px 0 6px; }
.m-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 6px; }
.m-blurb { color: var(--bone-dim); }
.modal h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--ember-2); margin: 24px 0 10px; }
.modal ul, .modal ol { margin: 0; padding-left: 20px; color: var(--bone-dim); }
.modal li { margin-bottom: 8px; }
.modal ol li::marker { color: var(--ember); font-weight: 700; }
.tip { margin-top: 20px; background: rgba(219,122,44,.08); border: 1px solid #5a3a1e; border-radius: 14px; padding: 13px 15px; font-size: 14px; color: #f0d9b4; }

/* cook mode: tick-off ingredients + steps */
.cook__n { font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--ember-2); text-transform: none; letter-spacing: 0; margin-left: 8px; }
.cook { display: grid; gap: 7px; }
.citem, .cstep { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; text-align: left; font: inherit; width: 100%;
  color: var(--bone-dim); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; transition: all .12s ease; }
.citem:hover, .cstep:hover { border-color: var(--line-2); }
.citem.is-done, .cstep.is-done { background: rgba(124,191,106,.07); border-color: #2f4a28; color: var(--muted); }
.citem.is-done .citem__t, .cstep.is-done .cstep__t { text-decoration: line-through; }
.citem__box { flex-shrink: 0; width: 21px; height: 21px; border-radius: 6px; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 11px; color: transparent; margin-top: 1px; }
.citem.is-done .citem__box { background: var(--ok); border-color: var(--ok); color: #0e1a0b; }
.citem__t { font-size: 14.5px; line-height: 1.4; }
.cstep__num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ember-2); margin-top: 1px; }
.cstep.is-done .cstep__num { background: var(--ok); border-color: var(--ok); color: #0e1a0b; }
.cstep__t { font-size: 14.5px; line-height: 1.5; }

/* recipe fact */
.fact { margin-top: 18px; border-radius: 14px; padding: 14px 16px; font-size: 14px; line-height: 1.55;
  color: #2a1c06; background: linear-gradient(120deg, var(--ember-2), var(--gold)); }
.fact__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; margin-bottom: 5px; opacity: .8; }

/* advice callout */
.advice { margin-top: 20px; background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px; font-size: 14.5px; color: var(--bone-dim); line-height: 1.6; }
.advice__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--ember-2); font-weight: 800; margin-bottom: 6px; }
/* serving suggestion */
.serving { margin-top: 18px; background: rgba(216,162,74,.08); border: 1px solid #6a4f1e; border-radius: 14px; padding: 13px 15px; font-size: 14.5px; color: #f0e0be; line-height: 1.55; }
.serving__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 800; margin-bottom: 6px; }
.dot--s { background: #b57a86; }

/* nutrition panel */
.nutri-serv { font-family: var(--sans); font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 600; margin-left: 8px; }
.nutri-macros { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.nutri-cal { display: flex; flex-direction: column; align-items: flex-start; }
.nutri-cal b { font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--bone); font-variant-numeric: tabular-nums; }
.nutri-cal span { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.nutri-split { flex: 1; min-width: 160px; height: 12px; border-radius: 999px; overflow: hidden; display: flex; background: var(--ink); border: 1px solid var(--line); }
.nutri-split .seg { height: 100%; }
.seg--p { background: var(--ember-2); } .seg--f { background: var(--gold); } .seg--c { background: var(--wine); }
.nutri-keys { display: flex; gap: 16px; flex-wrap: wrap; width: 100%; font-size: 13px; color: var(--bone-dim); }
.nutri-keys b { font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot--p { background: var(--ember-2); } .dot--f { background: var(--gold); } .dot--c { background: var(--wine); }

.nutri-peritem { margin-top: 12px; background: rgba(219,122,44,.08); border: 1px solid #5a3a1e; border-radius: 14px; padding: 12px 15px; }
.nutri-peritem__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ember-2); font-weight: 800; margin-bottom: 8px; }
.nutri-peritem__vals { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13.5px; color: var(--bone-dim); }
.nutri-peritem__vals b { font-family: var(--serif); font-size: 17px; color: var(--bone); font-variant-numeric: tabular-nums; }

.nutri-stand { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 16px 0 4px; }
.nutri-stand__label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-right: 4px; }
.nutri-micros { margin-top: 14px; display: grid; gap: 9px; }
.nutri-row { display: grid; grid-template-columns: 1.5fr 2fr auto; align-items: center; gap: 12px; font-size: 13px; }
.nutri-row__name { color: var(--bone-dim); }
.nutri-row__bar { height: 8px; border-radius: 999px; background: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.nutri-row__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--ember-2)); }
.nutri-row__dv { color: var(--ember-2); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; min-width: 46px; }
.nutri-note { font-size: 11.5px; color: var(--muted); margin: 14px 0 0; }

/* Learn */
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.learn-card { display: flex; gap: 16px; text-align: left; cursor: pointer; font: inherit; color: var(--bone);
  background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; transition: transform .12s ease, border-color .15s ease; }
.learn-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.learn-card__num { font-family: var(--serif); font-size: 30px; color: var(--ember); line-height: 1; opacity: .8; }
.learn-card__kicker { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 6px; }
.learn-card .display { font-size: 20px; margin-bottom: 8px; }
.learn-card p { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.article .article__p { color: var(--bone-dim); margin: 0 0 14px; line-height: 1.68; }
.article__points { margin: 0; padding-left: 20px; }
.article__points li { margin-bottom: 9px; color: var(--bone-dim); }
.article__points li::marker { color: var(--ember); }

/* ---------- Tracker ---------- */
.score-card { display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  background: linear-gradient(150deg, var(--panel-2), var(--ink-2)); border: 1px solid var(--line);
  border-radius: 22px; padding: 26px; margin-bottom: 18px; }
.ring { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring__bg { fill: none; stroke: var(--line); stroke-width: 9; }
.ring__fg { fill: none; stroke: url(#ringGrad); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .7s cubic-bezier(.22,1,.36,1); }
.ring__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring__label b { font-family: var(--serif); font-size: 44px; color: var(--bone); }
.ring__label span { font-size: 12px; color: var(--muted); }
.score-title { font-size: 24px; margin: 0 0 3px; }
.score-sub { color: var(--muted); margin: 0 0 14px; font-size: 14.5px; }
.streak { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--bone-dim); }

.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.group { display: flex; align-items: center; gap: 13px; cursor: pointer; text-align: left; font: inherit; color: var(--bone);
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 15px 16px; transition: all .12s ease; }
.group:hover { border-color: var(--line-2); }
.group.is-on { background: linear-gradient(180deg, #291a10, var(--panel-2)); border-color: var(--ember); }
.group__emoji { font-size: 26px; }
.group__text b { display: block; font-size: 15px; }
.group__text span { font-size: 12px; color: var(--muted); }
.group__check { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 13px; color: transparent; flex-shrink: 0; }
.group.is-on .group__check { background: linear-gradient(180deg, var(--ember-2), var(--ember)); border-color: transparent; color: #1a0f06; }

.tracker__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.gap-hint { color: var(--ember-2); font-size: 14px; margin: 0; }
.history { margin-top: 30px; }
.history h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.history__bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 10px; }
.hbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.hbar__fill { width: 100%; max-width: 48px; background: linear-gradient(180deg, var(--ember-2), var(--wine)); border-radius: 8px 8px 3px 3px; min-height: 4px; transition: height .6s cubic-bezier(.22,1,.36,1); }
.hbar__day { font-size: 11px; color: var(--muted); }
.hbar__val { font-size: 11px; color: var(--bone-dim); font-variant-numeric: tabular-nums; }

/* Today's Plate */
.plate { background: linear-gradient(150deg, var(--panel-2), var(--ink-2)); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; margin-bottom: 18px; }
.plate__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.plate__head h3 { font-family: var(--serif); font-size: 22px; margin: 0; }
.targets { margin-bottom: 14px; }
.targets__form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.targets__form label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.tf-row { display: flex; align-items: center; gap: 8px; color: var(--bone-dim); font-weight: 600; text-transform: none; letter-spacing: 0; }
.targets__form input, .targets__form select { font: inherit; font-size: 15px; color: var(--bone); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 90px; }
.targets__form select { width: auto; }
.targets__bars { display: grid; gap: 12px; }
.tbar__top { display: flex; justify-content: space-between; font-size: 13px; color: var(--bone-dim); margin-bottom: 5px; }
.tbar__top b { font-variant-numeric: tabular-nums; color: var(--bone); }
.tbar__top b span { color: var(--muted); font-weight: 400; }
.tbar__track { height: 9px; border-radius: 999px; background: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.tbar__track i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--ember-2)); transition: width .5s ease; }
.tbar__track i.is-over { background: linear-gradient(90deg, var(--wine), var(--red)); }
.plate__empty { color: var(--muted); font-size: 14.5px; padding: 6px 0; }
.plate__items { display: grid; gap: 8px; }
.plate__item { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.plate__emoji { font-size: 24px; }
.plate__name { flex: 1; font-size: 14.5px; font-weight: 600; display: flex; flex-direction: column; }
.plate__name span { font-size: 12px; color: var(--muted); font-weight: 400; }
.plate__rm { background: none; border: 1px solid var(--line-2); color: var(--muted); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.plate__rm:hover { color: var(--bone); border-color: var(--red); }
.plate__total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.plate__total b { font-family: var(--serif); font-size: 16px; color: var(--ember-2); text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.plate__shop { margin-top: 14px; width: 100%; }
.group__auto { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ember-2); background: rgba(219,122,44,.12); border: 1px solid #5a3a1e; padding: 2px 7px; border-radius: 999px; margin-left: auto; }

/* Daily energy */
.energy { background: linear-gradient(150deg, var(--panel-2), var(--ink-2)); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; margin-bottom: 18px; }
.energy__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.energy__head h3 { font-family: var(--serif); font-size: 22px; margin: 0; }
.energy__hint { font-size: 12px; color: var(--muted); }
.energy__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.energy__stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 12px; text-align: center; }
.energy__stat span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.energy__stat b { display: block; font-family: var(--serif); font-size: 30px; color: var(--bone); font-variant-numeric: tabular-nums; line-height: 1.1; margin: 2px 0; }
.energy__stat i { font-size: 11px; color: var(--muted); font-style: normal; }
.energy__net.is-surplus b { color: var(--gold); }
.energy__net.is-deficit b { color: var(--ember-2); }
.energy__muscle { display: flex; align-items: center; gap: 12px; margin-top: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; }
.energy__muscle.is-good { background: rgba(124,191,106,.08); border-color: #2f4a28; }
.energy__memoji { font-size: 26px; }
.energy__mtext b { display: block; font-size: 15px; }
.energy__mtext span { font-size: 12.5px; color: var(--muted); }

.energy__bars { display: flex; align-items: stretch; gap: 10px; height: 130px; }
.ebar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.ebar__val { font-size: 10.5px; color: var(--bone-dim); font-variant-numeric: tabular-nums; }
.ebar__track { flex: 1; width: 100%; max-width: 46px; display: flex; align-items: center; }
.ebar__fill { width: 100%; border-radius: 6px; min-height: 3px; }
.ebar.up .ebar__fill { background: linear-gradient(180deg, var(--gold), #7a5a1e); align-self: flex-start; }
.ebar.down .ebar__fill { background: linear-gradient(180deg, var(--ember-2), var(--wine)); }
.ebar__day { font-size: 11px; color: var(--muted); }

/* Weekly nutrient report */
.report { background: linear-gradient(150deg, var(--panel-2), var(--ink-2)); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; margin-top: 26px; }
.report__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.report__head h3 { font-family: var(--serif); font-size: 21px; margin: 0; }
.report__hint { font-size: 12px; color: var(--muted); }
.report__empty { color: var(--muted); font-size: 14px; margin: 0; }
.report__rows { display: grid; gap: 9px; }
.report__row { display: grid; grid-template-columns: 1.3fr 2fr auto; align-items: center; gap: 12px; font-size: 13px; }
.report__name { color: var(--bone-dim); }
.report__bar { height: 8px; border-radius: 999px; background: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.report__bar i { display: block; height: 100%; border-radius: 999px; }
.report__row.is-great .report__bar i { background: linear-gradient(90deg, #4e7a3e, var(--ok)); }
.report__row.is-ok .report__bar i { background: linear-gradient(90deg, var(--ember), var(--ember-2)); }
.report__row.is-low .report__bar i { background: linear-gradient(90deg, var(--wine), var(--red)); }
.report__val { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 42px; text-align: right; }
.report__row.is-great .report__val { color: var(--ok); }
.report__row.is-ok .report__val { color: var(--ember-2); }
.report__row.is-low .report__val { color: var(--red); }
.report__gaps { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.report__gaps-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.report__sugg { display: grid; gap: 8px; }
.sugg { cursor: pointer; text-align: left; font: inherit; font-size: 13.5px; color: var(--bone); background: var(--panel); border: 1px solid #5a3a1e; border-radius: 12px; padding: 11px 13px; transition: all .12s; }
.sugg:hover { border-color: var(--ember); transform: translateX(2px); }
.report__win { color: var(--ok); font-size: 14px; margin: 14px 0 0; }
.m-actions { margin: 16px 0 4px; }
.btn.is-added { background: var(--panel-3); color: var(--ok); box-shadow: none; }

.badge { font-size: 10px; vertical-align: middle; background: var(--gold); color: #2a1c06; font-weight: 800; padding: 3px 9px; border-radius: 999px; letter-spacing: .06em; text-transform: uppercase; margin-left: 6px; }

/* accounts */
.acct-btn { cursor: pointer; font: inherit; font-weight: 700; font-size: 13px; color: var(--bone);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; white-space: nowrap;
  transition: border-color .2s; margin-right: 8px; }
.acct-btn:hover { border-color: var(--ember); }
.acct-panel { }
.acct-card { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; animation: cardIn .4s ease; }
.acct-card > b { font-family: var(--serif); font-size: 20px; display: block; margin-bottom: 8px; }
.acct-card p { color: var(--bone-dim); font-size: 14.5px; margin: 0 0 14px; }
.acct-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.acct-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-size: 24px; color: #1a0f06;
  background: linear-gradient(180deg, var(--ember-2), var(--ember)); box-shadow: 0 6px 18px rgba(219,122,44,.35); }
.acct-row b { font-size: 16px; display: block; }
.acct-status { display: block; font-size: 13px; color: var(--gold); margin-top: 3px; }
.acct-note { font-size: 12.5px !important; color: var(--muted) !important; margin-top: 12px !important; }
@media (max-width: 640px) { .acct-btn { font-size: 12px; padding: 7px 11px; } .acct-btn #acctLabel { display: none; } }

/* freemium locks + banner + invite codes */
.lock-badge { position: absolute; top: 12px; right: 12px; z-index: 1; font-size: 11px; font-weight: 800; letter-spacing: .05em;
  color: #2a1c06; background: linear-gradient(180deg, var(--gold), #b6832f); padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.card--locked .card__media { filter: saturate(.55) brightness(.75); }
.card--locked:hover .card__media { filter: saturate(.8) brightness(.9); }
.free-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(216,162,74,.12), rgba(219,122,44,.06)); border: 1px solid #6a4f1e;
  border-radius: 14px; padding: 13px 16px; margin-bottom: 16px; font-size: 14px; color: var(--bone-dim); animation: cardIn .4s ease; }
.free-banner b { color: var(--gold); }
.redeem { margin: 6px 0 24px; text-align: center; }
.redeem__label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.redeem__row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.redeem__row input { font: inherit; font-size: 15px; color: var(--bone); background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 18px; width: 220px; text-align: center; letter-spacing: .06em; }
.redeem__row input:focus { border-color: var(--gold); outline: none; }
.redeem__msg { display: block; margin-top: 8px; font-size: 13px; color: var(--bone-dim); min-height: 16px; }

/* ---------- Pro button + pricing ---------- */
.pro-btn { cursor: pointer; font: inherit; font-weight: 800; font-size: 13px; letter-spacing: .02em;
  background: linear-gradient(180deg, var(--gold), #b6832f); color: #2a1c06; border: 0; border-radius: 999px;
  padding: 8px 15px; box-shadow: 0 6px 16px rgba(216,162,74,.28); white-space: nowrap; }
.pro-btn:hover { filter: brightness(1.06); }
body.is-pro .pro-btn { background: var(--panel-3); color: var(--gold); border: 1px solid #6a4f1e; box-shadow: none; }

.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
.plan { position: relative; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 20px; padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; }
.plan--hot { border-color: var(--gold); background: linear-gradient(180deg, #241a10, var(--panel-2)); }
.plan--active { grid-column: 1 / -1; align-items: flex-start; }
.plan__ribbon { position: absolute; top: -11px; left: 22px; background: linear-gradient(180deg, var(--gold), #b6832f); color: #2a1c06; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 4px 12px; border-radius: 999px; }
.plan .display { font-size: 22px; margin: 6px 0 0; }
.plan__price { display: flex; align-items: baseline; gap: 6px; }
.plan__price b { font-family: var(--serif); font-size: 40px; color: var(--bone); }
.plan__price span { font-size: 13px; color: var(--muted); }
.plan__note { color: var(--muted); font-size: 13.5px; margin: 0 0 6px; }
.plan__cta { width: 100%; }
.plan .btn--ghost { width: 100%; }
.pro-compare { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; }
.pro-compare h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--ember-2); margin: 0 0 14px; }
.pro-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pro-list li { position: relative; padding-left: 28px; color: var(--bone-dim); font-size: 14.5px; }
.pro-list li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 19px; height: 19px; border-radius: 50%; background: rgba(124,191,106,.15); color: var(--ok); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.pro-note { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }
.tip code { background: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 12px; color: var(--ember-2); }
.m-blurb code { background: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; color: var(--ember-2); }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }

/* ---------- Why page (editorial showpiece) ---------- */
.why-hero { position: relative; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); min-height: 380px;
  display: flex; align-items: flex-end; margin-top: 8px;
  background: radial-gradient(120% 90% at 78% 8%, rgba(219,122,44,.4), transparent 55%), linear-gradient(160deg, #2c1710, #0e0b09);
  background-size: cover; background-position: center; }
.why-hero__scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14,11,9,.94) 8%, rgba(14,11,9,.45) 55%, transparent); }
.why-hero__inner { position: relative; z-index: 1; padding: 40px 34px; max-width: 720px; }
.why-hero .display { font-size: clamp(30px, 5.5vw, 52px); }
.why-hero .display span { color: var(--ember-2); }
.why-hero__lede { color: var(--bone-dim); max-width: 56ch; font-size: 16px; }

.wstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 8px; }
.wstat { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 16px; padding: 20px 14px; text-align: center; }
.wstat b { display: block; font-family: var(--serif); font-size: clamp(28px, 4vw, 44px); color: var(--ember-2); font-variant-numeric: tabular-nums; line-height: 1; }
.wstat span { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.4; }
@media (max-width: 720px) { .wstats { grid-template-columns: repeat(2, 1fr); } }

.why-sect { font-size: clamp(24px, 4vw, 34px); margin: 44px 0 18px; }
.benefit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.benefit { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; transition: transform .15s ease, border-color .2s ease; }
.benefit:hover { transform: translateY(-4px); border-color: var(--ember); }
.benefit__icon { font-size: 28px; display: block; margin-bottom: 10px; }
.benefit b { display: block; font-family: var(--serif); font-size: 18px; margin-bottom: 6px; }
.benefit p { color: var(--muted); font-size: 13.5px; margin: 0; line-height: 1.55; }
.why-note { color: var(--muted); font-size: 13px; margin: 14px 2px 0; }

.timeline { position: relative; margin: 6px 0 0 6px; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--ember-2), var(--wine)); border-radius: 2px; opacity: .6; }
.tl-item { position: relative; padding: 0 0 34px; }
.tl-item:last-child { padding-bottom: 6px; }
.tl-dot { position: absolute; left: -30px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(180deg, var(--ember-2), var(--ember)); box-shadow: 0 0 0 4px rgba(219,122,44,.18), 0 0 14px rgba(240,162,74,.5); }
.tl-date { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ember-2);
  background: rgba(219,122,44,.1); border: 1px solid #5a3a1e; border-radius: 999px; padding: 4px 12px; margin-bottom: 10px; }
.tl-item b { display: block; font-family: var(--serif); font-size: 21px; margin-bottom: 6px; }
.tl-item p { color: var(--bone-dim); font-size: 14.5px; line-height: 1.65; margin: 0; max-width: 68ch; }

.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.fact-card { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--ember); border-radius: 14px; padding: 16px 16px; transition: transform .15s ease, border-color .2s; }
.fact-card:hover { transform: translateY(-3px); }
.fact-card span { color: var(--gold); font-size: 15px; margin-top: 1px; }
.fact-card p { color: var(--bone-dim); font-size: 14px; margin: 0; line-height: 1.55; }

.why-cta { text-align: center; margin: 48px 0 10px; background: linear-gradient(160deg, var(--panel-2), var(--ink-2));
  border: 1px solid var(--line); border-radius: 24px; padding: 40px 24px; position: relative; overflow: hidden; }
.why-cta::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(closest-side, rgba(219,122,44,.14), transparent); }
.why-cta > * { position: relative; }
.why-cta .display { font-size: clamp(24px, 4vw, 34px); }
.why-cta p { color: var(--muted); margin: 6px 0 20px; }

/* ---------- About page ---------- */
.about-intro { font-family: var(--serif); font-size: clamp(20px, 3.4vw, 28px); line-height: 1.45; color: var(--bone);
  max-width: 30ch; margin: 6px 0 8px; letter-spacing: -.01em; }
.about-intro em { color: var(--ember-2); font-style: normal; }
.install-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.install-card { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .15s, border-color .2s; }
.install-card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.install-card__icon { font-size: 30px; display: block; margin-bottom: 10px; }
.install-card b { display: block; font-family: var(--serif); font-size: 18px; margin-bottom: 10px; }
.install-card ol { margin: 0; padding-left: 20px; color: var(--bone-dim); font-size: 14px; }
.install-card li { margin-bottom: 7px; }
.install-card li::marker { color: var(--ember); font-weight: 700; }
.kbd { display: inline-block; background: var(--ink); border: 1px solid var(--line-2); border-radius: 6px; padding: 0 6px; font-size: 12px; }
.faq { display: grid; gap: 10px; }
.faq details { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; transition: border-color .2s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--serif); font-size: 17px; padding: 16px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; color: var(--ember-2); font-size: 18px; transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--bone-dim); font-size: 14.5px; line-height: 1.6; margin: 0 0 16px; }

/* ---------- Prose ---------- */
.prose { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.prose h3 { color: var(--ember-2); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; margin-top: 24px; }
.prose h3:first-child { margin-top: 0; }
.prose ul { color: var(--bone-dim); padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose p { color: var(--bone-dim); }

/* ---------- Install bar ---------- */
.install-bar { position: sticky; top: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(90deg, var(--wine), #5c1a1a); padding: 10px 16px; font-size: 14px; }
.install-bar__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- Bottom tabbar ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; display: flex; justify-content: space-around;
  background: rgba(14,11,9,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 8px 4px calc(8px + var(--safe-b)); }
.tab { flex: 1; background: none; border: 0; cursor: pointer; font: inherit; color: var(--muted); font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; transition: color .15s; }
.tab span { font-size: 19px; }
.tab.is-active { color: var(--ember-2); }

@media (max-width: 680px) {
  .pillars { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; }
  .hero__inner { padding: 30px 22px 34px; }
  .why__inner { padding: 30px 24px; }
}
/* ---------- Million-pound polish ---------- */
/* gradient display headings on section heads */
.view__head .display {
  background: linear-gradient(115deg, var(--bone) 30%, #e8cfa4 55%, var(--ember-2) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* primary button sheen sweep */
.btn { position: relative; overflow: hidden; }
.btn:not(.btn--ghost)::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .5s ease; pointer-events: none;
}
.btn:not(.btn--ghost):hover::after { left: 130%; }
/* card photo zoom on hover */
.card__media { transition: transform .6s cubic-bezier(.22,1,.36,1); }
.card:hover .card__media { transform: scale(1.06); }
.card { will-change: transform; }
/* glass topbar once scrolling */
.topbar { transition: background .3s ease, box-shadow .3s ease; }
.topbar.is-scrolled { background: rgba(14,11,9,.85); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0,0,0,.35); border-bottom: 1px solid var(--line); }
/* score ring glow */
.ring svg { filter: drop-shadow(0 0 10px rgba(240,162,74,.35)); }
/* bottom tab active glow */
.tab { position: relative; }
.tab.is-active::before { content: ""; position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 30px; border-radius: 999px; background: radial-gradient(closest-side, rgba(219,122,44,.28), transparent); }
/* scroll reveals */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }
/* hero headline slow shimmer */
@keyframes heroGlow { 0%,100% { text-shadow: 0 0 0 rgba(240,162,74,0); } 50% { text-shadow: 0 0 34px rgba(240,162,74,.25); } }
.hero h1 span { animation: heroGlow 6s ease-in-out infinite; }
/* modal panel entrance refinement */
.modal__panel { animation: slideUp .34s cubic-bezier(.22,1,.36,1); }

/* ---------- Animations ---------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes popIn { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes heroPan { from { transform: scale(1.02); } to { transform: scale(1.1); } }

.hero__media { animation: heroPan 22s ease-in-out infinite alternate; }
.hero .eyebrow { animation: riseIn .6s ease both; }
.hero h1 { animation: riseIn .6s .08s ease both; }
.hero .lede { animation: riseIn .6s .16s ease both; }
.hero__cta { animation: riseIn .6s .24s ease both; }
.hero__stats { animation: riseIn .6s .32s ease both; }

.grid .card, .rail .card { animation: cardIn .45s ease both; }
.grid .card:nth-child(1) { animation-delay: .02s; } .grid .card:nth-child(2) { animation-delay: .05s; }
.grid .card:nth-child(3) { animation-delay: .08s; } .grid .card:nth-child(4) { animation-delay: .11s; }
.grid .card:nth-child(5) { animation-delay: .14s; } .grid .card:nth-child(6) { animation-delay: .17s; }
.grid .card:nth-child(7) { animation-delay: .20s; } .grid .card:nth-child(8) { animation-delay: .23s; }
.grid .card:nth-child(9) { animation-delay: .26s; } .grid .card:nth-child(10) { animation-delay: .29s; }
.pillar { animation: cardIn .5s ease both; }
.learn-card { animation: cardIn .45s ease both; }

.group.is-on .group__check, .gmove.is-done .gmove__check { animation: popIn .3s ease; }
.chip.is-active, .diet-tab.is-active { animation: popIn .25s ease; }
.plate__item, .sugg { animation: cardIn .3s ease both; }
.plate, .energy, .report, .weekplan, .score-card { animation: cardIn .5s ease both; }
.plan { animation: cardIn .5s ease both; }
.plan:nth-child(2) { animation-delay: .08s; }
.report__row i, .energy__stat b { will-change: width; }
.nutri-row__bar i, .tbar__track i, .ring__fg, .hbar__fill { will-change: width; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
