/* NutriCoach design system: warm ivory, sage and muted teal, charcoal headings.
   All colours are tokens below. Fonts are system fonts, so the app loads nothing from outside the machine. */
:root {
  --bg: #faf7f2;            /* warm ivory page */
  --surface: #ffffff;
  --text: #2f3430;         /* charcoal body text */
  --heading: #22262a;      /* darker charcoal headings */
  --muted: #666d68;        /* secondary text, still AA on ivory */
  --brand: #4f7a64;        /* sage primary (white text passes AA) */
  --brand-hover: #426a56;
  --brand-ink: #ffffff;
  --teal: #4f8f8c;         /* muted teal accent */
  --accent: #e9f0ea;       /* pale sage surface */
  --warn: #f5efe4;         /* soft sand strip, not a warning colour */
  --warn-ink: #5f5139;
  --danger: #fbe9e6;
  --danger-ink: #8a3b30;
  --border: #e8e2d6;
  --sample: #ecebf6;
  --sample-ink: #4d4a86;
  --live: #e4f2ea;
  --live-ink: #2e6b4a;
  --shadow: 0 1px 2px rgba(47, 52, 48, 0.04), 0 8px 24px rgba(47, 52, 48, 0.06);
  --shadow-lg: 0 2px 6px rgba(47, 52, 48, 0.05), 0 18px 44px rgba(47, 52, 48, 0.10);
  --radius: 16px;
  --focus: 0 0 0 3px rgba(79, 122, 100, 0.35);
}
/* The warm ivory theme is the default for every visitor, whatever their operating-system setting.
   Dark theme is available only when explicitly selected with data-theme="dark". */
:root[data-theme="dark"] {
  --bg: #161b19; --surface: #1e2522; --text: #e4e9e6; --heading: #f2f4f1; --muted: #a3ada7;
  --brand: #7fb598; --brand-hover: #94c4a8; --brand-ink: #0f1613; --teal: #7fbfbb;
  --accent: #26312b; --warn: #2b2a22; --warn-ink: #e6d9b4; --danger: #3a1f1c; --danger-ink: #f2b8ae;
  --border: #2d3833; --sample: #272a40; --sample-ink: #c2c6ff; --live: #1d3a2a; --live-ink: #a6e3c0;
  --shadow: none; --shadow-lg: none;
}
* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* full-width bands use 100vw, which includes the scrollbar; this stops a sideways scrollbar */
}
a { color: var(--brand); transition: color 0.2s ease; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

/* ---------- Navigation ---------- */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--border); position: sticky; top: 0; z-index: 10;
}
:root[data-theme="dark"] .topbar { background: rgba(30, 37, 34, 0.92); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; color: var(--heading); text-decoration: none; font-size: 19px; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.tag { font-size: 11px; font-weight: 600; background: var(--sample); color: var(--sample-ink); padding: 3px 8px; border-radius: 999px; vertical-align: middle; letter-spacing: 0.02em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nav a, .nav button { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 999px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 15px; transition: background 0.2s ease, color 0.2s ease; }
.nav a:hover, .nav button:hover { background: var(--accent); color: var(--brand); }
.nav a.active { background: var(--accent); color: var(--brand); font-weight: 600; }
.nav .btn { margin-left: 6px; padding: 9px 18px; font-size: 15px; }
.demo-banner { background: var(--accent); color: var(--muted); text-align: center; font-size: 13px; padding: 7px 16px; letter-spacing: 0.005em; border-bottom: 1px solid var(--border); }

/* ---------- Layout and type ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 24px; }
h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -0.02em; color: var(--heading); font-weight: 650; margin: 12px 0 10px; }
h2 { font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; color: var(--heading); font-weight: 620; margin: 22px 0 10px; }
h3 { font-size: 18px; line-height: 1.3; color: var(--heading); font-weight: 600; margin: 12px 0 6px; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.6; }
.muted { color: var(--muted); font-size: 14px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
/* Five life-stage cards on one row where space allows. */
.stage-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.hidden { display: none !important; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin: 14px 0; }
/* Dashboard tiles are links: keep them looking like cards, not underlined text. */
a.card { text-decoration: none; color: var(--text); display: block; transition: transform 0.2s ease, box-shadow 0.2s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
a.card h3 { color: var(--heading); }
.hero { padding: 32px 0 12px; }

/* ---------- Buttons and forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: var(--brand-ink); border: 0; padding: 12px 22px; border-radius: 999px;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2;
  box-shadow: 0 1px 2px rgba(47, 52, 48, 0.12); transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover { background: var(--brand-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79, 122, 100, 0.22); color: var(--brand-ink); }
.btn:active { transform: translateY(0); }
.btn.secondary { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); box-shadow: none; }
.btn.secondary:hover { background: var(--accent); color: var(--brand); box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
input, select, textarea { font: inherit; width: 100%; padding: 11px 14px; border: 1px solid #d8d1c3; border-radius: 12px; background: var(--surface); color: var(--text); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
textarea { min-height: 96px; resize: vertical; }
label { display: block; margin: 12px 0 6px; font-weight: 600; color: var(--heading); font-size: 15px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 8px 0; }
.check input { width: auto; margin-top: 5px; accent-color: var(--brand); }
.option { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 6px 0; }
.option input { width: auto; accent-color: var(--brand); }
.stage-card { cursor: pointer; border: 2px solid var(--border); }
.stage-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.stage-card.selected { border-color: var(--brand); background: var(--accent); }
.stage-card h3 { margin-top: 0; }

/* ---------- Status, alerts, progress ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin: 0 6px 4px 0; letter-spacing: 0.01em; }
.badge.sample { background: var(--sample); color: var(--sample-ink); }
.badge.live { background: var(--live); color: var(--live-ink); }
.badge.warn { background: var(--warn); color: var(--warn-ink); }
.badge.danger { background: var(--danger); color: var(--danger-ink); }
.badge.ok { background: var(--live); color: var(--live-ink); }
.alert { padding: 14px 16px; border-radius: 14px; margin: 12px 0; font-size: 15px; }
.alert.warn { background: var(--warn); color: var(--warn-ink); }
.alert.danger { background: var(--danger); color: var(--danger-ink); }
.alert.info { background: var(--accent); color: var(--text); }
.error { color: var(--danger-ink); background: var(--danger); padding: 10px 14px; border-radius: 12px; margin: 10px 0; }
.bar { height: 10px; background: var(--accent); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width 0.4s ease; }

/* ---------- Coach chat ---------- */
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 14px 16px; border-radius: 18px; max-width: 90%; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--accent); border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.msg.structured h4 { margin: 12px 0 2px; font-size: 14px; color: var(--heading); }
.msg.structured p { margin: 4px 0; }
.msg.structured ul { margin: 4px 0; padding-left: 20px; }

/* ---------- Curriculum and tables ---------- */
.week { border-top: 1px solid var(--border); padding: 12px 0; }
.lesson { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.lesson.done .title { text-decoration: line-through; color: var(--muted); }
.lesson input { width: auto; margin-top: 6px; accent-color: var(--brand); }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.footer { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 0; }

/* ---------- Landing page ---------- */
.landing { padding-top: 8px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 40px 0 48px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); background: var(--accent); padding: 7px 14px; border-radius: 999px; }
.hero-copy h1 { margin: 18px 0 16px; }
.hero-copy .lead { max-width: 54ch; margin: 0 0 6px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-trust { display: flex; gap: 10px; align-items: flex-start; margin-top: 26px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; font-size: 14px; color: var(--muted); max-width: 54ch; }
.hero-trust strong { color: var(--heading); font-weight: 600; }
.hero-trust svg { flex: none; margin-top: 2px; color: var(--brand); }
.hero-art { position: relative; margin: 0; }
.hero-art img { display: block; width: 100%; height: auto; border-radius: 28px; box-shadow: var(--shadow-lg); }
.hero-art::after { content: ""; position: absolute; right: -18px; bottom: -18px; width: 120px; height: 120px; border-radius: 50%; background: var(--accent); z-index: -1; }
.film-section { padding-top: 42px; }
.film-player { position: relative; min-height: clamp(390px, 51vw, 580px); overflow: hidden; isolation: isolate; border-radius: 28px; background: #29352f; color: #fff; box-shadow: var(--shadow-lg); }
.film-video, .film-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.film-video { z-index: -2; object-fit: cover; object-position: center 38%; background: #29352f; }
.film-shade { z-index: -1; background: linear-gradient(90deg, rgba(21,33,27,.83) 0%, rgba(21,33,27,.62) 48%, rgba(21,33,27,.12) 100%), linear-gradient(0deg, rgba(14,22,18,.8), transparent 34%); }
.film-content { position: absolute; top: 14%; left: clamp(24px, 7vw, 84px); max-width: min(600px, 78%); animation: film-copy-in .55s ease both; }
.film-kicker { display: inline-block; padding: 7px 12px; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; background: rgba(255,255,255,.13); color: #fff; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(8px); }
.film-content h3 { margin: 20px 0 12px; color: #fff; font-size: clamp(32px, 4.3vw, 56px); line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.film-content p { max-width: 52ch; margin: 0; color: rgba(255,255,255,.9); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; }
.film-content .film-narration { margin-top: 14px; padding: 10px 14px; border-left: 3px solid #d9e9cd; background: rgba(17,27,21,.42); font-size: 14px; }
.film-bottom { position: absolute; right: clamp(18px, 4vw, 44px); bottom: 24px; left: clamp(18px, 4vw, 44px); }
.film-progress { height: 4px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.4); }
.film-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: #e4efce; transition: width .35s linear; }
.film-controls, .film-control-group { display: flex; align-items: center; gap: 12px; }
.film-controls { justify-content: space-between; padding-top: 14px; }
.film-control-group { flex-wrap: wrap; }
.film-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 15px; border: 1px solid rgba(255,255,255,.36); border-radius: 999px; background: rgba(22,34,27,.38); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px); }
.film-button:hover { background: rgba(255,255,255,.2); }
.film-button:focus-visible { outline: 3px solid #f2e7b8; outline-offset: 3px; }
.film-play { border-color: transparent; background: #e1ecd3; color: #26382d; }
.film-play:hover { background: #f1f5e8; }
.film-time { color: rgba(255,255,255,.9); font-size: 13px; font-variant-numeric: tabular-nums; }
.film-note { margin: 12px 4px 0; color: var(--muted); font-size: 13px; text-align: center; }
@keyframes film-copy-in { from { opacity: .3; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.landing section { scroll-margin-top: 90px; }
.section { padding: 56px 0; }
/* Alternate sections are full-width bands, drawn behind the content, not a box inside the container. */
.section-alt { position: relative; isolation: isolate; }
.section-alt::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 36px; }
.section-head h2 { font-size: 30px; margin: 10px 0 10px; }
.section-head .lead { font-size: 17px; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }

/* Life-stage cards: five columns on large screens, three on tablets, two on mobile. */
.stage-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.stage-tile { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.stage-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #d6e3d9; }
.stage-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.stage-tile .stage-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 18px; flex: 1; min-height: 168px; }
.stage-tile h3 { margin: 0; font-size: 17px; }
.stage-tile .stage-age { font-size: 12px; font-weight: 600; color: var(--teal); letter-spacing: 0.02em; }
.stage-tile p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* Product capabilities */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { border-radius: 20px; padding: 26px; border: 1px solid rgba(47, 52, 48, 0.04); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature h3 { margin: 16px 0 8px; font-size: 19px; }
.feature p { margin: 0; color: var(--text); font-size: 15px; line-height: 1.6; }
.feature.sage { background: #e7efe8; }
.feature.teal { background: #e1efee; }
.feature.sand { background: #f6efe3; }
.feature.blush { background: #f7e8e2; }
.feature.lavender { background: #ecEAf5; }
.feature.mist { background: #e8eef4; }
.feature-icon { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, 0.85); display: grid; place-items: center; color: var(--brand); }
.preview { margin-top: 18px; background: var(--surface); border-radius: 14px; padding: 12px 14px; font-size: 13px; color: var(--text); box-shadow: 0 1px 2px rgba(47, 52, 48, 0.06); }
.preview .p-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; }
.preview .p-label { color: var(--muted); }
.preview .p-bubble { background: var(--accent); border-radius: 12px; padding: 8px 10px; margin: 4px 0; }
.preview .p-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; margin: 2px 4px 2px 0; }
.preview .p-chip.hfcs { background: #f5e8dc; color: #7a4f2a; }
.preview .p-chip.dye { background: #ecebf6; color: #4d4a86; }
.preview .p-bar { height: 8px; background: var(--accent); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.preview .p-bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; position: relative; }
.step { text-align: left; padding: 6px 4px; }
.step-num { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 17px; box-shadow: 0 6px 16px rgba(79, 122, 100, 0.25); }
.step h3 { margin: 16px 0 8px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* Plans call-to-action band */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; background: var(--accent); border-radius: 24px; padding: 32px 36px; }
.cta-band h2 { margin: 0 0 6px; font-size: 24px; }
.cta-band p { margin: 0; color: var(--text); max-width: 60ch; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 44px 24px 28px; margin-top: 56px; }
.footer-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.footer-grid h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--heading); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 6px 0; }
.footer-grid a { color: var(--muted); text-decoration: none; font-size: 15px; }
.footer-grid a:hover { color: var(--brand); text-decoration: underline; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 42ch; margin: 10px 0 0; }
.footer-legal { max-width: 1120px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- Diet assessment: questionnaire and results ---------- */
.assess-wrap { max-width: 760px; margin: 0 auto; }
.assess-note { font-size: 14px; margin-top: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Progress */
.q-progress { margin: 8px 0 18px; }
.q-progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; font-weight: 600; color: var(--heading); margin-bottom: 10px; }
.seg-bar { height: 8px; background: var(--accent); border-radius: 999px; overflow: hidden; }
.seg-bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width 0.4s ease; }

/* Question card */
.q-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 32px; }
.q-title { font-size: clamp(22px, 2.6vw, 26px); line-height: 1.3; margin: 10px 0 8px; color: var(--heading); }
.q-help { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.answers { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
.answer { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); cursor: pointer; font-size: 16px; transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.answer:hover { border-color: #c9d6cc; background: #fbfdfb; }
.answer input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.answer:focus-within { box-shadow: var(--focus); }
.answer-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c9d2cb; flex: none; display: grid; place-items: center; transition: border-color 0.2s ease; }
.answer-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform 0.2s ease; }
.answer.selected { border-color: var(--brand); background: var(--accent); box-shadow: 0 0 0 3px rgba(79, 122, 100, 0.12); }
.answer.selected .answer-dot { border-color: var(--brand); background: var(--brand); }
.answer.selected .answer-dot::after { transform: scale(1); }
.answer.selected .answer-text { color: var(--heading); font-weight: 600; }
.q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.q-nav .btn { min-width: 128px; }

/* Results: hero summary */
.result-hero { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 32px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 30px; margin-bottom: 28px; }
.score-ring { position: relative; width: 150px; height: 150px; }
.score-ring svg { display: block; }
.score-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-value strong { font-size: 30px; font-weight: 650; color: var(--heading); letter-spacing: -0.02em; }
.score-value span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.result-title { font-size: 28px; margin: 8px 0 8px; color: var(--heading); }
.result-summary { color: var(--text); font-size: 16px; margin: 0; max-width: 56ch; }
.section-label { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin: 30px 0 14px; }

/* Category insight cards, compact and pastel */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cat-card { border-radius: 18px; padding: 16px 16px 18px; border: 1px solid rgba(47, 52, 48, 0.04); box-shadow: var(--shadow); transition: transform 0.2s ease; }
.cat-card:hover { transform: translateY(-2px); }
.cat-name { font-size: 14px; font-weight: 600; color: var(--heading); min-height: 2.6em; line-height: 1.3; }
.cat-pct { font-size: 26px; font-weight: 650; color: var(--heading); letter-spacing: -0.02em; margin-top: 6px; }
.cat-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mini-bar { height: 6px; background: rgba(255, 255, 255, 0.75); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.mini-bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.cat-0 { background: #e7efe8; }
.cat-1 { background: #e1efee; }
.cat-2 { background: #f6efe3; }
.cat-3 { background: #f7e8e2; }
.cat-4 { background: #ecEAf5; }
.cat-5 { background: #e8eef4; }
.cat-6 { background: #f5f1dc; }
.cat-7 { background: #f4e6ec; }

/* Focus areas */
.focus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.focus-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--teal); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); }
.focus-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chip { display: inline-block; font-size: 14px; font-weight: 600; color: var(--heading); background: var(--accent); padding: 6px 12px; border-radius: 999px; }
.focus-pct { font-size: 22px; font-weight: 650; color: var(--heading); letter-spacing: -0.02em; }
.focus-answer, .focus-why, .focus-next { font-size: 14px; color: var(--text); margin: 12px 0 0; line-height: 1.55; }
.focus-why { color: var(--muted); }
.focus-next a { font-weight: 600; }

/* Disclaimer */
.info-note { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; margin-top: 28px; color: var(--muted); font-size: 14px; }
.info-note svg { flex: none; color: var(--teal); margin-top: 2px; }
.info-note strong { color: var(--heading); font-weight: 600; }
.info-note p { margin: 6px 0 0; }

/* Responsive */
@media (max-width: 1000px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-hero { grid-template-columns: 1fr; justify-items: start; }
}
@media (max-width: 640px) {
  .q-card { padding: 22px; border-radius: 20px; }
  .answer { padding: 14px 14px; }
  .q-nav .btn { flex: 1 1 auto; min-width: 0; }
  .focus-grid { grid-template-columns: 1fr; }
  .result-hero { padding: 22px; gap: 22px; }
  .score-ring { width: 130px; height: 130px; }
  .score-ring svg { width: 130px; height: 130px; }
  .cat-grid { gap: 10px; }
  .cat-pct { font-size: 22px; }
}

/* Responsive */
@media (max-width: 1000px) {
  .stage-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { gap: 36px; }
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; padding: 24px 0 32px; }
  /* Keep the message and primary action ahead of the image on narrow screens. */
  .hero-art { order: 1; }
  .hero-art::after { display: none; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .container { padding: 16px; }
  h1 { font-size: 28px; }
  .msg { max-width: 100%; }
  .btn-row .btn, .hero-actions .btn { flex: 1 1 auto; }
  .stage-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stage-tile .stage-body { min-height: 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 24px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
  .hero-actions .btn { width: 100%; }
  .hero-art img { max-height: 270px; border-radius: 20px; object-fit: cover; object-position: center 40%; }
  .topbar { padding: 12px 16px; }
  .nav a, .nav button { padding: 7px 10px; font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .film-progress span { transition: none; }
  .film-content { animation: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Premium product surfaces ---------- */
:root { --bg: #f8f7f3; --surface: #fffefa; --brand: #496f5a; --brand-hover: #385b47; --teal: #5e8580; --accent: #eaf0e8; --border: #e6e8df; --shadow: 0 5px 18px rgba(44, 58, 47, .045), 0 1px 3px rgba(44, 58, 47, .04); --shadow-lg: 0 18px 48px rgba(44, 58, 47, .09); }
body { background-image: radial-gradient(ellipse at 8% 0%, rgba(226, 237, 224, .34), transparent 34rem); }
.topbar { padding: 12px clamp(16px, 4vw, 56px); border-bottom: 1px solid rgba(230, 232, 223, .8); }
.brand { letter-spacing: -.035em; }
.brand-mark { filter: drop-shadow(0 3px 5px rgba(52, 85, 62, .1)); }
.demo-banner { background: #eef2e9; color: #596b5c; border: 0; font-size: 12px; letter-spacing: .015em; }
.container { max-width: 1200px; padding-top: clamp(28px, 4vw, 52px); padding-bottom: 48px; }
.container > h1 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.045em; }
.container > h2 { margin-top: 34px; }
.card { border-color: rgba(224, 227, 218, .9); border-radius: 20px; padding: 24px; }
a.card:hover { border-color: #cbd9cd; }
.btn { border-radius: 12px; padding: 13px 20px; }
.btn.secondary { border-width: 1px; }
.alert { border: 1px solid rgba(69, 94, 72, .08); }
.site-footer { margin-top: 24px; background: #f2f2ec; border-color: #e4e6dc; }

.auth-shell { min-height: 550px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .8fr); gap: clamp(36px, 8vw, 100px); align-items: center; max-width: 1000px; margin: 0 auto; padding: 22px 0; }
.auth-intro h1 { font-size: clamp(38px, 5vw, 58px); letter-spacing: -.055em; line-height: 1.04; max-width: 11ch; margin: 22px 0 18px; }
.auth-intro .lead { max-width: 48ch; font-size: 17px; }
.auth-promise { display: grid; gap: 5px; max-width: 390px; margin-top: 36px; padding: 18px 20px; border-left: 3px solid var(--teal); background: rgba(255,255,255,.64); color: var(--muted); border-radius: 0 14px 14px 0; font-size: 14px; }
.auth-promise strong { color: var(--heading); }
.auth-card { padding: clamp(24px, 4vw, 36px); border-radius: 24px; box-shadow: var(--shadow-lg); }
.auth-card h2 { margin: 0 0 18px; font-size: 25px; letter-spacing: -.03em; }
.auth-card .btn-row .btn { width: 100%; }
.auth-card form + p { margin-top: 22px; }

.dashboard-shell { max-width: 1100px; margin: 0 auto; }
.dashboard-welcome { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 220px; padding: clamp(28px, 5vw, 52px); border: 1px solid #e4e8de; border-radius: 28px; background: linear-gradient(115deg, #eef3eb 0%, #f6f3ec 62%, #f5e9e2 100%); overflow: hidden; position: relative; }
.dashboard-welcome h1 { font-size: clamp(34px, 4.2vw, 48px); letter-spacing: -.05em; margin: 10px 0 8px; }
.dashboard-welcome .lead { margin: 0; max-width: 54ch; font-size: 16px; }
.welcome-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 18px; }
.welcome-meta a { font-size: 13px; margin-left: 6px; }
.welcome-mark { display: grid; place-items: center; flex: 0 0 128px; width: 128px; height: 128px; border-radius: 50%; color: #5e8168; font-size: 72px; background: rgba(255,255,255,.53); box-shadow: 0 0 0 18px rgba(255,255,255,.19), 0 0 0 38px rgba(255,255,255,.12); transform: rotate(-12deg); }
.dashboard-section-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 38px 0 16px; }
.dashboard-section-title h2 { font-size: 26px; letter-spacing: -.035em; margin: 4px 0 0; }
.kicker { color: #627d68; }
.dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dashboard-grid .card { min-height: 152px; margin: 0; position: relative; overflow: hidden; padding: 22px; }
.dashboard-grid .card::after { content: "↗"; position: absolute; top: 17px; right: 19px; color: #819582; font-size: 18px; }
.dashboard-grid .card h3 { font-size: 17px; margin: 0 0 12px; padding-right: 26px; }
.dashboard-grid .card .bar { margin: 12px 0 8px; }
.dashboard-grid .card:nth-child(1) { background: linear-gradient(145deg, #fffefa, #f1f5ed); }
.dashboard-grid .card:nth-child(2) { background: linear-gradient(145deg, #fffefa, #f3f1e9); }
.dashboard-grid .card:nth-child(3) { background: linear-gradient(145deg, #fffefa, #edf4f2); }
.dashboard-grid .card:nth-child(4) { background: linear-gradient(145deg, #fffefa, #f6efec); }
.dashboard-grid .card:nth-child(5) { background: linear-gradient(145deg, #fffefa, #eef2f5); }
.dashboard-grid .card:nth-child(6) { background: linear-gradient(145deg, #fffefa, #f5f0e8); }
.recommendations-grid .card { margin: 0; }
.recommendation-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: var(--brand); }

/* Consistent, calm layout for the functional feature routes. */
.container > .card, .container > .grid > .card { box-shadow: var(--shadow); }
.container > .alert:first-of-type { border-radius: 14px; }
.container > .card > h3:first-child { margin-top: 0; }
.container > .grid { gap: 16px; }
.container pre { padding: 15px 17px; border-radius: 13px; background: #f5f5ef; color: #48534a; font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; overflow: auto; }
.chat { padding: 8px; max-height: 660px; overflow-y: auto; scroll-behavior: smooth; }
.msg.user { background: #e8f0e9; }
.msg.bot { max-width: 94%; padding: 20px 22px; }
.msg.structured h4 { margin-top: 16px; }
.lesson { padding: 13px 10px; border-bottom: 1px solid var(--border); }
.lesson:last-child { border-bottom: 0; }
.lesson input { width: 18px; height: 18px; accent-color: var(--brand); }
.site-footer .brand { font-size: 18px; }
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; gap: 20px; min-height: auto; padding: 6px 0; }
  .auth-intro h1 { max-width: 14ch; font-size: 38px; margin: 14px 0 10px; }
  .auth-promise { display: none; }
  .auth-card { margin-top: 0; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-welcome { min-height: 180px; }
  .welcome-mark { flex-basis: 76px; width: 76px; height: 76px; font-size: 42px; }
}
@media (max-width: 540px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid .card { min-height: 120px; }
  .dashboard-welcome { align-items: flex-start; padding: 24px; }
  .welcome-mark { position: absolute; right: 22px; top: 22px; opacity: .55; }
  .dashboard-welcome h1 { max-width: 10ch; font-size: 36px; }
  .dashboard-section-title { align-items: flex-start; flex-direction: column; margin-top: 30px; }
  .nav { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .topbar { align-items: flex-start; }
}

/* Photo-led stage cards: natural color grading and a subtle, accessible hover reveal. */
.stage-tile { border-radius: 20px; }
.stage-tile img { object-position: center 42%; filter: saturate(.92) contrast(1.02); transition: transform .45s ease; }
.stage-tile:hover img { transform: scale(1.035); }
.stage-tile .stage-body { background: linear-gradient(180deg, #fffefa 0%, #faf9f4 100%); }

/* Feature page details */
.nav { min-width: 0; }
.nav a, .nav button { flex: 0 0 auto; white-space: nowrap; }
.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.data-point { min-width: 0; padding: 14px 15px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(145deg, var(--surface), var(--bg)); }
.data-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; text-transform: capitalize; }
.data-value { display: block; color: var(--heading); font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.exposure-card > .badge { margin-bottom: 3px; }
.curriculum-overview { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 25px 28px; margin: 18px 0; border-radius: 22px; background: linear-gradient(115deg, #edf3eb, #f4f1e9 75%, #f5e9e2); border: 1px solid var(--border); }
.curriculum-overview h2 { margin: 6px 0 2px; font-size: 22px; }
.curriculum-overview p { margin: 0; }
.progress-wrap { width: min(260px, 38%); text-align: right; }
.progress-wrap > strong { display: block; margin-bottom: 7px; color: var(--brand); font-size: 21px; }
.progress-wrap .bar { height: 9px; border-radius: 99px; background: rgba(73,111,90,.16); overflow: hidden; }
.progress-wrap .bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--teal)); transition: width .3s ease; }
.curriculum-week { padding: 20px 24px; }
.week-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.week-heading h3 { margin: 2px 0 0; }
.week-number { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 15px; color: var(--brand); background: var(--accent); font-size: 19px; font-weight: 700; }
.recipe-grid { grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); }
.recipe-card { padding: 0; overflow: hidden; margin: 0; }
.recipe-art { display: grid; place-items: center; height: 118px; background: radial-gradient(circle at 72% 34%, rgba(255,255,255,.7) 0 9%, transparent 10%), linear-gradient(125deg, #dce9d9, #f5e9dc); }
.recipe-art span { display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: rgba(255,255,255,.64); color: #577961; font-size: 34px; box-shadow: 0 8px 24px rgba(52,76,55,.1); }
.recipe-art-1 { background: radial-gradient(circle at 72% 34%, rgba(255,255,255,.7) 0 9%, transparent 10%), linear-gradient(125deg, #e8dfc8, #f4e5dd); }
.recipe-art-2 { background: radial-gradient(circle at 72% 34%, rgba(255,255,255,.7) 0 9%, transparent 10%), linear-gradient(125deg, #dcebe7, #e6e6d5); }
.recipe-art-3 { background: radial-gradient(circle at 72% 34%, rgba(255,255,255,.7) 0 9%, transparent 10%), linear-gradient(125deg, #efe0dc, #f2eddc); }
.recipe-art-4 { background: radial-gradient(circle at 72% 34%, rgba(255,255,255,.7) 0 9%, transparent 10%), linear-gradient(125deg, #e3e7d5, #e9dfe8); }
.recipe-content { padding: 19px 21px 22px; }
.recipe-content h3 { margin: 5px 0 8px; font-size: 19px; }
.recipe-content p { color: var(--muted); margin: 0 0 16px; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.recipe-tags .badge { background: var(--accent); color: var(--brand); }
.plan-card { position: relative; display: flex; flex-direction: column; margin: 0; min-height: 330px; }
.plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 920px; margin: 20px auto 0; align-items: stretch; }
.plan-card { min-width: 0; overflow-wrap: anywhere; }
.plan-card h2 { margin: 7px 0 4px; }
.plan-price { padding: 8px 0 3px; color: var(--brand); font-size: 24px; }
.plan-card ul { flex: 1; padding-left: 21px; }
.plan-card li { padding: 3px 0; }
.plan-card .btn { align-self: flex-start; }
.plan-featured { border-color: #abc3ad; background: linear-gradient(155deg, #fffefa, #edf4eb); box-shadow: var(--shadow-lg); }
.plan-badge { align-self: flex-start; margin-bottom: 13px; }
.contact-card > .kicker { display: inline-block; margin-bottom: 7px; }
.contact-privacy { margin: 16px 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.contact-success { max-width: 760px; margin: clamp(32px, 7vw, 76px) auto; padding: clamp(30px, 7vw, 64px); border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(135deg, #edf4eb, #fffefa 65%, #f6ebe5); text-align: center; box-shadow: var(--shadow-lg); }
.contact-success h1 { margin: 12px 0; }
.contact-success .lead { max-width: 48ch; margin: 0 auto 18px; }
.success-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 27px; box-shadow: 0 7px 18px rgba(73,111,90,.22); }
input[type="file"] { padding: 8px; background: var(--bg); }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 9px 14px; border: 0; border-radius: 9px; background: var(--accent); color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
#result { margin-top: 14px; }
#result > pre { padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); overflow-wrap: anywhere; }
.chat { border-radius: 16px; background: linear-gradient(180deg, var(--bg), var(--surface)); }
#coachForm { margin-top: 16px; }

@media (max-width: 540px) {
  .topbar { gap: 9px; }
  .nav { width: 100%; padding: 2px 0; overflow: visible; flex-wrap: wrap; row-gap: 3px; }
  .nav a, .nav button { padding: 7px 10px; font-size: 13px; }
  .dashboard-welcome { padding: 23px 20px; }
  .dashboard-welcome > div:first-child { position: relative; z-index: 1; }
  .dashboard-welcome h1 { max-width: none; font-size: clamp(28px, 8vw, 36px); padding-right: 18px; }
  .welcome-mark { right: 16px; top: 18px; opacity: .28; }
  .curriculum-overview { align-items: flex-start; flex-direction: column; gap: 15px; padding: 21px; }
  .progress-wrap { width: 100%; text-align: left; }
  .recipe-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; max-width: 560px; }
  .plan-card { min-height: 0; }
}
