/* ==========================================================
   drgily.com — 2026 redesign
   Palette: warm botanical green + cream + terracotta accent
   ========================================================== */

:root {
  --green-950: #16301f;
  --green-900: #1e3d2f;
  --green-700: #2d5a43;
  --green-600: #3b7a5b;
  --green-100: #e4efe6;
  --cream: #faf6ef;
  --cream-dark: #f1eadb;
  --terra: #c96a3b;
  --terra-dark: #b05a2f;
  --amber: #e8a24b;
  --ink: #26302b;
  --muted: #5f6b64;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(30, 61, 47, .10);
  --shadow-lg: 0 12px 40px rgba(30, 61, 47, .16);
  --font-head: "Lora", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* The [hidden] attribute must beat any display rule we set on a component.
   Without this, `.field { display: flex }` overrides the browser default of
   display:none and hidden fields stay visible. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--green-900); line-height: 1.25; }

a { color: var(--green-700); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.section { padding: 72px 0; }
.section.alt { background: var(--white); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.06rem; }

.kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  font-family: var(--font-body);
}
.btn-primary { background: var(--terra); color: #fff; }
.btn-primary:hover { background: var(--terra-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--green-700); color: #fff; }
.btn-secondary:hover { background: var(--green-900); }
.btn-outline { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn-outline:hover { background: var(--green-700); color: #fff; }
.btn-light { background: #fff; color: var(--green-900); }
.btn-light:hover { background: var(--cream-dark); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dark);
}
/* NOTE: do not add backdrop-filter here. A filtered ancestor becomes the
   containing block for position:fixed descendants, which breaks the
   full-screen mobile menu (it would be trapped inside the 72px header). */
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand-name { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--green-900); }
.brand-name small { display: block; font-family: var(--font-body); font-size: .68rem; font-weight: 500; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 4px; list-style: none; }
.main-nav > li { position: relative; }
.main-nav > li > a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: .97rem;
  border-radius: 8px;
}
.main-nav > li > a:hover, .main-nav > li > a.active { color: var(--green-700); background: var(--green-100); }

.has-sub > a::after { content: " ▾"; font-size: .7em; color: var(--muted); }
.sub-nav {
  position: absolute;
  top: 100%; left: 0;
  min-width: 240px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all .18s ease;
}
.has-sub:hover .sub-nav, .has-sub:focus-within .sub-nav { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-nav a {
  display: block;
  padding: 9px 14px;
  text-decoration: none;
  color: var(--ink);
  font-size: .93rem;
  border-radius: 8px;
}
.sub-nav a:hover { background: var(--green-100); color: var(--green-900); }

.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--green-900); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ---------- Hero carousel ---------- */
.hero { background: linear-gradient(160deg, var(--green-950) 0%, var(--green-900) 55%, var(--green-700) 100%); color: #fff; overflow: hidden; }
.carousel { position: relative; }
.carousel-track { display: flex; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
.slide { min-width: 100%; padding: 64px 0 84px; }
.slide-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.slide h1, .slide .slide-title {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 3rem);
  color: #fff;
  line-height: 1.18;
  margin-bottom: 18px;
}
.slide .eyebrow {
  display: inline-block;
  background: rgba(232, 162, 75, .18);
  color: var(--amber);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.slide p.lead { font-size: 1.12rem; color: rgba(255, 255, 255, .85); margin-bottom: 26px; max-width: 540px; }
.slide .price-tag { font-weight: 700; color: var(--amber); }
.slide-visual { text-align: center; }
.slide-visual .visual-card {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 20px;
  padding: 36px 28px;
  backdrop-filter: blur(4px);
}
.slide-visual .visual-emoji { font-size: 4.2rem; line-height: 1; margin-bottom: 14px; }
.slide-visual h3 { color: #fff; font-size: 1.25rem; margin-bottom: 8px; }
.slide-visual p { color: rgba(255, 255, 255, .75); font-size: .95rem; }

.hero-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 480px; }
.hero-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 13px 18px;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-family: var(--font-body);
}
.hero-form input[type="email"]:focus { outline: 3px solid var(--amber); }
.form-note { font-size: .82rem; color: rgba(255, 255, 255, .6); margin-top: 10px; }
.form-msg { font-size: .95rem; font-weight: 600; margin-top: 10px; color: var(--amber); }

.carousel-nav {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}
.carousel-dot {
  width: 34px; height: 5px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, .3);
  cursor: pointer;
  transition: background .2s;
}
.carousel-dot.active { background: var(--amber); }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 5;
  transition: background .2s;
}
.carousel-arrow:hover { background: rgba(255, 255, 255, .25); }
.carousel-arrow.prev { left: 18px; }
.carousel-arrow.next { right: 18px; }

/* ---------- App icons & store badges ---------- */
.app-icon {
  width: 76px; height: 76px;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  flex-shrink: 0;
}
.app-icon.sm { width: 58px; height: 58px; border-radius: 14px; }
.app-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.app-head .app-name { font-family: var(--font-head); font-size: 1.6rem; color: #fff; line-height: 1.2; }
.app-head .app-tagline { font-size: .92rem; color: rgba(255, 255, 255, .7); }

.store-badges { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .25);
  transition: transform .18s ease, opacity .18s ease;
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge .glyph { font-size: 1.5rem; line-height: 1; }
.store-badge .txt { line-height: 1.15; }
.store-badge .txt small { display: block; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.store-badge .txt strong { font-size: .97rem; font-weight: 600; }
.store-badge.soon { opacity: .55; cursor: default; pointer-events: none; }
.store-badge.soon .txt strong::after { content: " — soon"; font-weight: 400; font-size: .8em; }
.store-note { font-size: .82rem; color: rgba(255, 255, 255, .6); margin-top: 12px; }
.plan-note {
  display: inline-block;
  font-size: .82rem;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .88);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* ---------- Phone demo video ---------- */
.phone-demo {
  width: 232px;
  margin: 0 auto;
  border-radius: 30px;
  padding: 9px;
  background: #10171c;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: var(--shadow-lg);
}
.phone-demo { position: relative; }
.phone-demo video { width: 100%; border-radius: 22px; display: block; background: #000; }
.demo-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, transform .18s ease;
}
.sound-toggle:hover { background: rgba(0, 0, 0, .55); transform: translateY(-2px); }
.sound-toggle .icon { font-size: .95rem; }
.demo-caption { font-size: .85rem; color: rgba(255, 255, 255, .65); text-align: center; }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--green-100); padding: 18px 0; }
.trust-items { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.trust-items span { font-size: .93rem; color: var(--green-900); font-weight: 600; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 28px; }
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.section.alt .card { background: var(--cream); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .card-icon { font-size: 2.2rem; margin-bottom: 14px; }
.card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .97rem; flex: 1; }
.card .card-link { margin-top: 18px; font-weight: 600; text-decoration: none; color: var(--terra); font-size: .95rem; }
.card .card-link:hover { color: var(--terra-dark); }

/* ---------- Program cards (products) ---------- */
.program-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.program-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.program-band { padding: 26px 32px; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.program-band.t2d { background: linear-gradient(120deg, var(--green-900), var(--green-700)); }
.program-band.biblical { background: linear-gradient(120deg, #6b4a2b, #97683a); }
.program-band h3 { color: #fff; font-size: 1.35rem; }
.program-band .price { font-size: 1.5rem; font-weight: 700; font-family: var(--font-head); }
.program-band .price small { font-size: .75rem; font-weight: 500; display: block; opacity: .8; }
.program-body { padding: 28px 32px 32px; display: flex; flex-direction: column; flex: 1; }
.program-body ul { list-style: none; margin: 0 0 22px; }
.program-body li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--ink); font-size: .97rem; }
.program-body li::before { content: "✓"; position: absolute; left: 0; color: var(--green-700); font-weight: 700; }
.availability { font-size: .85rem; font-weight: 600; color: var(--terra); margin-bottom: 16px; }
.notify-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.notify-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--cream-dark);
  background: var(--cream);
  font-size: .97rem;
  font-family: var(--font-body);
}
.notify-form input[type="email"]:focus { outline: 2px solid var(--green-700); border-color: var(--green-700); }
.notify-form .form-msg { color: var(--green-700); width: 100%; }

/* honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Apps section ---------- */
.app-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.app-card {
  border-radius: 20px;
  padding: 40px 36px;
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.app-card.nutrirank { background: linear-gradient(135deg, var(--green-700), var(--green-950)); }
.app-card.vitalfill { background: linear-gradient(135deg, #2e5e6e, #16333d); }
.app-card h3 { color: #fff; font-size: 1.5rem; margin-bottom: 12px; }
.app-card p { color: rgba(255, 255, 255, .82); flex: 1; margin-bottom: 24px; }
.app-badge { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: rgba(255, 255, 255, .15); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.about-photo img { border-radius: 20px; box-shadow: var(--shadow-lg); }
.about-text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
.credentials { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 24px; }
.credential { background: var(--white); border-radius: 12px; padding: 14px 20px; box-shadow: var(--shadow); font-size: .9rem; font-weight: 600; color: var(--green-900); }

/* ---------- Newsletter ---------- */
.newsletter {
  background: linear-gradient(160deg, var(--green-900), var(--green-700));
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  color: #fff;
}
.newsletter h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.newsletter p { color: rgba(255, 255, 255, .8); max-width: 520px; margin: 0 auto 28px; }
.newsletter .hero-form { margin: 0 auto; justify-content: center; }

/* ==========================================================
   Health eTools — shared calculator components
   Used by every converted tool page. Keep changes here, not per page.
   ========================================================== */

.page-hero {
  background: linear-gradient(160deg, var(--green-950), var(--green-700));
  color: #fff;
  padding: 56px 0 48px;
}
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 14px; }
.page-hero p { color: rgba(255, 255, 255, .85); max-width: 680px; font-size: 1.06rem; }
.page-hero .kicker { color: var(--amber); }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }

.tool-card {
  background: var(--white);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}
.tool-card h2 { font-size: 1.4rem; margin-bottom: 6px; }
.tool-card .tool-sub { color: var(--muted); font-size: .95rem; margin-bottom: 24px; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 600; font-size: .92rem; color: var(--green-900); }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.field input, .field select {
  padding: 12px 14px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 10px;
  background: var(--cream);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px var(--green-100); }
.field-pair { display: flex; gap: 10px; }
.field-pair input { flex: 1; }

.unit-toggle { display: inline-flex; background: var(--cream-dark); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.unit-toggle button {
  border: none; background: transparent; cursor: pointer;
  padding: 8px 20px; border-radius: 999px;
  font-family: var(--font-body); font-size: .9rem; font-weight: 600; color: var(--muted);
  transition: all .18s ease;
}
.unit-toggle button.active { background: var(--white); color: var(--green-900); box-shadow: 0 2px 8px rgba(30, 61, 47, .12); }

.tool-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.result-panel {
  margin-top: 28px;
  padding: 28px;
  border-radius: 16px;
  background: var(--green-100);
  border-left: 5px solid var(--green-700);
  display: none;
}
.result-panel.show { display: block; animation: resultIn .3s ease; }
@keyframes resultIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-panel h3 { font-size: 1.1rem; margin-bottom: 16px; }
.result-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; margin-bottom: 18px; }
.result-figure .num { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--green-900); line-height: 1.1; }
.result-figure .lbl { font-size: .84rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.result-message { font-size: 1.02rem; color: var(--ink); }
.result-panel .disclaimer { font-size: .85rem; color: var(--muted); margin-top: 16px; }

.bmi-scale { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin: 18px 0 8px; }
.bmi-scale span { flex: 1; }
.bmi-scale .under { background: #7ba7c4; }
.bmi-scale .normal { background: var(--green-600); }
.bmi-scale .over { background: var(--amber); }
.bmi-scale .obese { background: var(--terra); }
.bmi-legend { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); }
.bmi-badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  font-size: .85rem; font-weight: 700; color: #fff; margin-left: 8px;
}
.bmi-badge.under { background: #7ba7c4; }
.bmi-badge.normal { background: var(--green-600); }
.bmi-badge.over { background: var(--amber); }
.bmi-badge.obese { background: var(--terra); }

/* ---------- Food search / calorie counter ---------- */
.food-search { position: relative; }
.search-results {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  max-height: 320px; overflow-y: auto; display: none; padding: 6px;
}
.search-results.show { display: block; }
.search-results button {
  display: block; width: 100%; text-align: left; border: none; background: none;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  font-family: var(--font-body); font-size: .93rem; color: var(--ink); line-height: 1.4;
}
.search-results button:hover, .search-results button.active { background: var(--green-100); }
.search-results .empty { padding: 14px; color: var(--muted); font-size: .92rem; }

.picked-food {
  margin-top: 20px; padding: 20px; border-radius: 14px;
  background: var(--green-100); display: none;
}
.picked-food.show { display: block; }
.picked-food .picked-name { font-weight: 600; color: var(--green-900); margin-bottom: 14px; }

.meal-block { margin-bottom: 32px; }
.meal-block h3 {
  font-size: 1.15rem; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.meal-block h3 .meal-total { font-family: var(--font-body); font-size: .95rem; color: var(--terra); font-weight: 700; }

.food-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.food-table th {
  text-align: right; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--cream-dark); font-weight: 700;
}
.food-table th:first-child { text-align: left; }
.food-table td { padding: 10px; border-bottom: 1px solid var(--cream-dark); text-align: right; }
.food-table td:first-child { text-align: left; }
.food-table .row-del {
  border: none; background: none; cursor: pointer; color: var(--muted);
  font-size: 1.1rem; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.food-table .row-del:hover { background: #f6dfd5; color: var(--terra-dark); }
.food-table .empty-row td { color: var(--muted); text-align: center; font-style: italic; padding: 18px; }

.day-total {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #fff; border-radius: 16px; padding: 26px 30px; margin-top: 8px;
}
.day-total .dt-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.day-total h3 { color: #fff; font-size: 1.15rem; }
.day-total .dt-cals { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; }
.day-total .dt-macros { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 16px; }
.day-total .dt-macro .v { font-size: 1.15rem; font-weight: 700; }
.day-total .dt-macro .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }

@media (max-width: 640px) {
  .food-table thead { display: none; }
  .food-table, .food-table tbody, .food-table tr, .food-table td { display: block; width: 100%; }
  .food-table tr { border-bottom: 1px solid var(--cream-dark); padding: 10px 0; position: relative; }
  .food-table td { border: none; text-align: left; padding: 3px 0; }
  .food-table td[data-l]::before {
    content: attr(data-l) ": "; font-size: .78rem; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em; font-weight: 700;
  }
  .food-table td:first-child { font-weight: 600; padding-right: 34px; }
  .food-table .cell-del { position: absolute; top: 8px; right: 0; padding: 0; }
}

/* ---------- VitalFill web preview (silhouette tracker) ---------- */
.vf-hero { background: linear-gradient(150deg, #16333d 0%, #2e5e6e 70%, #3d7d92 100%); }
.vf-hero .kicker { color: #7fd4f0; }

.vf-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 36px; align-items: start; }

.vf-silhouette-card {
  background: var(--white); border-radius: 20px; padding: 28px 24px 24px;
  box-shadow: var(--shadow); text-align: center; position: sticky; top: 96px;
}
.vf-silhouette-frame {
  width: 160px; height: 320px; margin: 0 auto;
  filter: drop-shadow(0 10px 14px rgba(15, 23, 42, .16));
}
.vf-silhouette-frame svg { width: 100%; height: 100%; display: block; }
.vf-figure-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-top: 10px;
}
.vf-pct { font-family: var(--font-head); font-size: 2.2rem; font-weight: 700; color: var(--green-900); margin-top: 14px; line-height: 1; }
.vf-pct small { font-size: .95rem; font-family: var(--font-body); font-weight: 500; color: var(--muted); display: block; margin-top: 6px; }
.vf-metric-note { font-size: .85rem; color: var(--muted); margin-top: 8px; }

.vf-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.vf-chip {
  border: 1.5px solid var(--cream-dark); background: var(--cream);
  border-radius: 999px; padding: 6px 13px; cursor: pointer;
  font-family: var(--font-body); font-size: .82rem; font-weight: 600; color: var(--ink);
  transition: all .15s ease;
}
.vf-chip:hover { border-color: #2e5e6e; }
.vf-chip.active { background: #2e5e6e; border-color: #2e5e6e; color: #fff; }

.vf-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 22px; }
.vf-bar { cursor: pointer; padding: 8px 10px; border-radius: 10px; transition: background .15s; }
.vf-bar:hover { background: var(--cream); }
.vf-bar.active { background: var(--green-100); }
.vf-bar .vfb-head { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 5px; gap: 8px; }
.vf-bar .vfb-name { font-weight: 600; color: var(--green-900); }
.vf-bar .vfb-val { color: var(--muted); white-space: nowrap; }
.vf-bar .vfb-track { height: 8px; border-radius: 999px; background: var(--cream-dark); overflow: hidden; }
.vf-bar .vfb-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2e5e6e, #56aecb); transition: width .6s ease; }
.vf-bar.limit .vfb-fill { background: linear-gradient(90deg, var(--green-600), #9ec78a); }
.vf-bar.limit .vfb-fill.over { background: linear-gradient(90deg, var(--amber), var(--terra)); }
.vf-bar .vfb-sub { font-size: .74rem; color: var(--muted); margin-top: 3px; }

.vf-locked {
  margin-top: 26px; border-top: 1.5px dashed var(--cream-dark); padding-top: 20px;
}
.vf-locked-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-lock-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cream); border: 1px dashed #b9c4be; border-radius: 999px;
  padding: 5px 12px; font-size: .8rem; color: var(--muted);
}
.vf-cta {
  margin-top: 22px; background: linear-gradient(135deg, #2e5e6e, #16333d);
  border-radius: 16px; padding: 26px 28px; color: #fff;
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
}
.vf-cta img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.vf-cta h3 { color: #fff; font-size: 1.2rem; margin-bottom: 6px; }
.vf-cta p { color: rgba(255,255,255,.8); font-size: .92rem; margin: 0; }
.vf-cta .grow { flex: 1; min-width: 220px; }

.vf-profile-summary {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--green-100); border-radius: 12px; padding: 12px 16px; margin-bottom: 20px;
  font-size: .9rem; color: var(--green-900);
}
.vf-profile-summary strong { font-weight: 700; }
.vf-profile-summary button {
  margin-left: auto; border: none; background: none; cursor: pointer;
  color: var(--terra); font-weight: 600; font-size: .88rem; font-family: var(--font-body);
}

.vf-log-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--cream-dark); font-size: .92rem;
}
.vf-log-item .n { flex: 1; }
.vf-log-item .n small { display: block; color: var(--muted); }
.vf-log-item .c { font-weight: 700; color: var(--green-900); white-space: nowrap; }

.badge-fulldata {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  background: var(--green-100); color: var(--green-700);
  border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: middle;
}

@media (max-width: 900px) {
  .vf-layout { grid-template-columns: 1fr; }
  .vf-silhouette-card { position: static; }
  .vf-silhouette-frame { width: 120px; height: 240px; }
}

/* Long-form article body under a tool */
.article-body { max-width: 760px; }
.article-body h2 { font-size: 1.5rem; margin: 36px 0 12px; }
.article-body h3 { font-size: 1.18rem; margin: 28px 0 10px; }
.article-body p { margin-bottom: 16px; color: var(--ink); }
.article-body ul, .article-body ol { margin: 0 0 16px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body figure { margin: 28px 0; }
.article-body figure img { border-radius: 12px; box-shadow: var(--shadow); }
.article-body figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; text-align: center; }
.article-body a { color: var(--terra); }

/* ---------- Glossary & inline term hints ---------- */
/* Inline technical term: real tooltip on hover/focus, jumps to the glossary
   entry on click. Rendered as a button so it is keyboard-reachable. */
button.term {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  border-bottom: 1px dotted var(--muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
button.term:hover, button.term:focus-visible { color: var(--terra); border-bottom-color: var(--terra); }
button.term:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; border-radius: 2px; }

#termTip {
  position: absolute;
  z-index: 3000;
  max-width: 290px;
  background: var(--green-950);
  color: #fff;
  font-family: var(--font-body);
  font-size: .85rem;
  line-height: 1.5;
  padding: 12px 15px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  pointer-events: none;
}
#termTip.show { opacity: 1; visibility: visible; transform: translateY(0); }
#termTip strong { display: block; color: var(--amber); margin-bottom: 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
#termTip .tip-more { display: block; margin-top: 7px; color: rgba(255, 255, 255, .6); font-size: .78rem; font-style: italic; }
#termTip::after {
  content: "";
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--green-950);
}
#termTip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--green-950); }

/* Briefly highlight the glossary entry a term links to */
@keyframes glossFlash {
  0%, 100% { background: transparent; }
  25%, 60% { background: #fbe6d6; }
}
.gloss-target { animation: glossFlash 1.8s ease; border-radius: 6px; }

.glossary { margin-top: 40px; }
.glossary > summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-900);
  padding: 14px 18px;
  background: var(--green-100);
  border-radius: 12px;
  list-style: none;
}
.glossary > summary::-webkit-details-marker { display: none; }
.glossary > summary::before { content: "▸ "; color: var(--terra); font-size: .9em; }
.glossary[open] > summary::before { content: "▾ "; }
.glossary > summary:hover { background: #d9e9dd; }
.glossary-body { padding: 22px 18px 4px; }
.glossary dl { margin: 0; }
.glossary dt {
  font-weight: 700; color: var(--green-900); font-size: .95rem;
  margin-top: 18px;
}
.glossary dt:first-child { margin-top: 0; }
.glossary dd { margin: 5px 0 0; color: var(--ink); font-size: .92rem; line-height: 1.6; }
.glossary dd .eg { display: block; margin-top: 4px; color: var(--muted); font-size: .87rem; font-style: italic; }

/* ---------- References ---------- */
.references { margin-top: 44px; padding-top: 28px; border-top: 2px solid var(--cream-dark); }
.references h2 { font-size: 1.3rem; margin-bottom: 8px; }
.references > p.ref-intro { color: var(--muted); font-size: .93rem; margin-bottom: 22px; }
.references ol { list-style: none; counter-reset: ref; margin: 0; }
.references li {
  counter-increment: ref;
  position: relative;
  padding-left: 38px;
  margin-bottom: 16px;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--ink);
}
.references li::before {
  content: counter(ref) ".";
  position: absolute; left: 0; top: 0;
  font-weight: 700; color: var(--terra); font-size: .88rem;
}
.references li a { color: var(--green-700); word-break: break-word; }
.references li a:hover { color: var(--terra); }
.references li .ref-use {
  display: block; margin-top: 4px;
  font-size: .84rem; color: var(--muted); font-style: italic;
}
.ref-updated { font-size: .84rem; color: var(--muted); margin-top: 24px; }

/* Sidebar */
.tool-sidebar { position: sticky; top: 96px; }
.sidebar-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.sidebar-card h4 { font-size: 1.02rem; margin-bottom: 14px; }
.sidebar-card ul { list-style: none; }
.sidebar-card li { margin-bottom: 10px; }
.sidebar-card a { color: var(--green-700); text-decoration: none; font-size: .93rem; font-weight: 500; }
.sidebar-card a:hover { color: var(--terra); }
.sidebar-card.promo { background: linear-gradient(150deg, var(--green-900), var(--green-700)); color: #fff; }
.sidebar-card.promo h4 { color: #fff; }
.sidebar-card.promo p { color: rgba(255, 255, 255, .82); font-size: .92rem; margin-bottom: 18px; }

@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; gap: 32px; }
  .tool-sidebar { position: static; }
  .tool-card { padding: 24px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--green-950); color: rgba(255, 255, 255, .75); padding: 56px 0 28px; margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; font-family: var(--font-body); font-weight: 700; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: rgba(255, 255, 255, .7); text-decoration: none; font-size: .92rem; }
.footer-grid a:hover { color: var(--amber); }
.footer-about p { font-size: .92rem; margin-top: 12px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .84rem; }
.footer-bottom a { color: rgba(255, 255, 255, .6); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .slide-inner, .program-grid, .app-row { grid-template-columns: 1fr; }
  .slide-visual { display: none; }
  .app-head .app-name { font-size: 1.35rem; }
  .app-icon { width: 62px; height: 62px; border-radius: 15px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 320px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    z-index: 1200;
    background: var(--cream);
    box-shadow: 0 12px 40px rgba(30, 61, 47, .18);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 20px 24px 60px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform .28s ease;
    visibility: hidden;
  }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  body.nav-open { overflow: hidden; }
  .main-nav > li > a { padding: 14px 10px; font-size: 1.05rem; border-bottom: 1px solid var(--cream-dark); border-radius: 0; }
  .sub-nav {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    display: none;
    padding-left: 16px;
  }
  .has-sub.open .sub-nav { display: block; }
  .nav-cta { margin: 18px 0 0; text-align: center; }
  .section { padding: 52px 0; }
  .slide { padding: 48px 0 76px; }
  .carousel-arrow { display: none; }
  .newsletter { padding: 40px 24px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .trust-items { gap: 16px; }
  .program-band { padding: 22px 24px; }
  .program-body { padding: 24px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel-track { transition: none; }
}
