/* Nobi – responsive styles (mobile first) */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --text: #0f172a;
  --muted: #5f6b7d;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --brand: #047857;
  --brand-2: #4f46e5;
  --brand-ink: #ffffff;
  --brand-soft: #e8f7f0;
  --blue: #2563eb;
  --warn: #b54708;
  --warn-soft: #fef4e6;
  --info: #2563eb;
  --info-soft: #eef4ff;
  --ok: #047857;
  --ok-soft: #e8f7f0;
  --danger: #c4320a;
  --chart-grid: #eceff3;
  --chart-curve: #a6aebb;
  --chart-median: #667085;
  --chart-band: rgba(4, 120, 87, .16);
  --chart-wband: rgba(37, 99, 235, .14);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .14), 0 4px 8px -4px rgba(16, 24, 40, .06);
  --ring: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
  --topbar-bg: rgba(255, 255, 255, .78);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f14; --surface: #121821; --surface-2: #1a222d; --text: #e8edf3; --muted: #94a0b2;
    --border: #232d3a; --border-strong: #334155; --brand: #34d399; --brand-2: #818cf8; --brand-ink: #04261a; --brand-soft: #0f2b22;
    --blue: #7aa7ff; --warn: #f5a35c; --warn-soft: #33220f; --info: #7aa7ff; --info-soft: #14223a;
    --ok: #34d399; --ok-soft: #0f2b22; --danger: #f97066;
    --chart-grid: #222b36; --chart-curve: #566275; --chart-median: #8a96a8;
    --chart-band: rgba(52, 211, 153, .18); --chart-wband: rgba(122, 167, 255, .18);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .6);
    --topbar-bg: rgba(11, 15, 20, .72); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f14; --surface: #121821; --surface-2: #1a222d; --text: #e8edf3; --muted: #94a0b2;
  --border: #232d3a; --border-strong: #334155; --brand: #34d399; --brand-2: #818cf8; --brand-ink: #04261a; --brand-soft: #0f2b22;
  --blue: #7aa7ff; --warn: #f5a35c; --warn-soft: #33220f; --info: #7aa7ff; --info-soft: #14223a;
  --ok: #34d399; --ok-soft: #0f2b22; --danger: #f97066;
  --chart-grid: #222b36; --chart-curve: #566275; --chart-median: #8a96a8;
  --chart-band: rgba(52, 211, 153, .18); --chart-wband: rgba(122, 167, 255, .18);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .6);
  --topbar-bg: rgba(11, 15, 20, .72); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column;
  font: 15.5px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
main { flex: 1 0 auto; width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; margin-top: 1.25em; }
h4 { font-weight: 650; }
strong, b { font-weight: 650; }
p { margin: 0 0 .75em; }
em { font-style: normal; color: var(--muted); font-weight: 400; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { max-width: 1120px; margin: 0 auto; padding: 24px 16px 32px; }
@media (min-width: 720px) { .container { padding: 32px 24px 48px; } }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 0 16px; height: 64px; display: flex; align-items: center; gap: 16px; }
@media (min-width: 720px) { .topbar-inner { padding: 0 24px; } }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, #10b981, #047857 55%, #4338ca); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(4, 120, 87, .3); }
/* Logo (assets/logo.svg + logo-dark.svg). "crop" hides the tagline under the word "nobi". */
.brand-logo { display: block; line-height: 0; }
.brand-logo img { display: block; height: 72px; width: auto; }
.brand-logo .logo-dark { display: none; }
.brand-logo.crop { height: 36px; overflow: hidden; }
.brand-logo.crop img { height: calc(36px * 67 / 51); }
.brand-logo.crop.sm { height: 30px; }
.brand-logo.crop.sm img { height: calc(30px * 67 / 51); }
:root[data-theme="dark"] .brand-logo .logo-light { display: none; }
:root[data-theme="dark"] .brand-logo .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand-logo .logo-dark { display: block; }
}
.topnav { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topnav-links { display: flex; gap: 2px; }
.topnav-links a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .92rem; }
.topnav-links a:hover { color: var(--text); background: var(--surface-2); }
.topnav-links a.active { color: var(--text); background: var(--surface-2); font-weight: 600; }
/* "My children": the main place to go, so it always stands out. */
.topnav-links a.nav-main { background: var(--brand); color: var(--brand-ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--brand); transition: background .15s, color .15s; }
.topnav-links a.nav-main.active { background: color-mix(in srgb, var(--brand) 88%, #000); color: var(--brand-ink); }
/* Hover: turns light green so it's clearly a button you can click. */
.topnav-links a.nav-main:hover, .topnav-links a.nav-main:focus-visible { background: var(--brand-soft); color: var(--brand); }
.topnav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: none; }
}
.nav-toggle { display: none; margin-left: auto; }
@media (max-width: 899px) {
  .nav-toggle { display: inline-grid; }
  .topnav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 12px;
    padding: 12px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .topbar.open .topnav { display: flex; }
  .topnav-links { flex-direction: column; }
  .topnav-links a { padding: 10px 12px; font-size: 1rem; }
  .topnav-actions { border-top: 1px solid var(--border); padding-top: 12px; }
  .topnav-actions .btn { flex: 1; }
}

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .card { padding: 24px; } }
.narrow { max-width: 440px; margin: 24px auto; }
.narrow-lg { max-width: 680px; margin-left: auto; margin-right: auto; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; }
.page-head h1 { margin: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--text); }

.lead { font-size: 1.1rem; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: .72rem; display: grid; place-items: center; font-weight: 700; }

/* Steps */
.steps { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 20px; counter-reset: s; }
.steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .7rem; color: var(--muted); position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 12px; left: calc(50% + 14px); right: calc(-50% + 14px); height: 2px; background: var(--border); }
.steps .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); background: var(--surface); font-weight: 700; font-size: .8rem; }
.steps li.done .dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.steps li.done::after { background: var(--brand); }
.steps li.current .dot { border-color: var(--brand); color: var(--brand); }
.steps li.current { color: var(--text); font-weight: 700; }
@media (max-width: 380px) { .steps .lbl { display: none; } }

/* Forms */
.field { display: block; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; padding: 0; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], select {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); min-height: 44px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04); transition: border-color .15s, box-shadow .15s;
}
textarea { width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); resize: vertical; min-height: 120px; transition: border-color .15s, box-shadow .15s; }
textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
textarea::placeholder, input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.hint { display: block; color: var(--muted); font-size: .82rem; margin-top: 6px; }
.err { display: block; color: var(--danger); font-size: .85rem; margin-top: 6px; font-weight: 600; }
.grid-2 { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.phone-row { display: grid; grid-template-columns: minmax(0, 42%) 1fr; gap: 8px; }
.unit-row { display: flex; gap: 8px; align-items: center; }
.unit-row input { flex: 1; min-width: 0; }
.unit-row select { width: auto; flex: 0 0 auto; }
.suffix { color: var(--muted); font-weight: 600; }
.unit-inputs { flex: 1; display: flex; gap: 8px; align-items: center; min-width: 0; }
.unit-inputs input { flex: 1; min-width: 0; }
.conv-out { display: block; min-height: 1.2em; margin-top: 6px; font-size: .85rem; font-weight: 700; color: var(--brand); }
.combo { position: relative; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 24, 40, .14); max-height: 280px; overflow-y: auto; }
.combo-list li[role=option] { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.combo-list li[role=option]:hover, .combo-list li[aria-selected=true] { background: var(--brand-soft); }
.combo-list small { color: var(--muted); white-space: nowrap; }
.combo-msg { padding: 9px 10px; color: var(--muted); font-size: .9rem; }
.manual-alt summary { cursor: pointer; font-weight: 700; color: var(--brand); margin-bottom: 8px; font-size: .92rem; }
.alt { font-size: .72em; font-weight: 600; color: var(--muted); white-space: nowrap; }
.stat-value .alt, .mini-stats .alt { display: block; font-size: .8rem; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: .92rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--brand); }
.section-title { font-size: 1rem; margin: 24px 0 12px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Segmented radios */
.seg { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }
.seg label, .seg button { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span, .seg button { display: block; text-align: center; padding: 8px 8px; cursor: pointer; font-weight: 500; font-size: .9rem; border: 0; border-radius: 8px; background: none; color: var(--muted); font-family: inherit; transition: background .15s, color .15s; }
.seg label span:hover, .seg button:hover { color: var(--text); }
.seg input:checked + span, .seg button.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .1), 0 0 0 1px var(--border); }
.seg input:focus-visible + span { box-shadow: var(--ring); }
/* Separate buttons with a gap, instead of one joined control */
.seg.seg-split { gap: 12px; padding: 0; border: 0; background: none; }
.seg.seg-split label span { padding: 10px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.seg.seg-split input:checked + span { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.seg-wrap { flex-wrap: wrap; }
.seg-small button { padding: 6px 12px; font-size: .82rem; white-space: nowrap; }
.seg-small { flex: 0 0 auto; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: .86rem; font-weight: 500; cursor: pointer; background: var(--surface); transition: all .15s; }
.chip span:hover { border-color: var(--brand); }
.chip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.chip input:focus-visible + span { box-shadow: var(--ring); }

.measure-box { background: var(--surface-2); border-radius: 12px; padding: 16px; margin: 8px 0 16px; }
.measure-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.parent-box { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.parent-box legend { font-weight: 700; padding: 0 6px; }
.height-inputs { margin: 12px 0 4px; }
.unit-toggle { display: flex; gap: 16px; margin-bottom: 8px; font-size: .9rem; }
.unit-toggle input { accent-color: var(--brand); }

/* OTP */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 16px 0 20px; }
.otp input { text-align: center; font-size: 1.5rem; font-weight: 700; padding: 10px 0; min-height: 56px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: .94rem; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 44px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(16, 24, 40, .1), 0 0 0 1px color-mix(in srgb, var(--brand) 60%, #000) inset; }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; margin-top: 8px; }
.btn-small { padding: 6px 12px; min-height: 36px; font-size: .88rem; }
.btn-lg { padding: 12px 20px; min-height: 50px; font-size: 1rem; }
.btn-link { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 8px; }
.btn-link:disabled { color: var(--muted); cursor: default; }
.btn-link.danger { color: var(--danger); }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; border: 1px solid transparent; font-size: .94rem; }
.alert p:last-child { margin-bottom: 0; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert-error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert-info { background: var(--info-soft); color: var(--text); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert-warn { background: var(--warn-soft); color: var(--text); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

/* Dashboard */
.child-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .child-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .child-grid { grid-template-columns: repeat(3, 1fr); } }
.child-card { text-decoration: none; color: inherit; display: block; transition: border-color .15s; margin: 0; }
.child-card:hover { border-color: var(--brand); }
.child-card h2 { margin: 0; }
.child-card-link { display: block; text-decoration: none; color: inherit; }
.child-card-due { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.child-card-due .tag { margin: 0; }
.child-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.child-card-head p { margin: 0; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; flex: 0 0 auto; }
.avatar-boy { background: var(--info-soft); color: var(--info); }
.avatar-girl { background: color-mix(in srgb, #c2417a 14%, var(--surface)); color: #c2417a; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 10px; }
.mini-stats div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.mini-stats dt { font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mini-stats dd { margin: 0; font-weight: 700; }
.mini-stats dd.pct { font-weight: 600; font-size: .85rem; color: var(--muted); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; margin: 0; }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }

/* Results */
.stat-grid { display: grid; gap: 12px; margin: 12px 0; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--border); }
.stat.tone-ok { border-left-color: var(--ok); }
.stat.tone-info { border-left-color: var(--info); }
.stat.tone-warn { border-left-color: var(--warn); }
.stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-pct { font-weight: 700; }
.stat-desc { font-size: .92rem; }
.stat-meta { font-size: .8rem; color: var(--muted); }
.confidence { font-size: .82rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.conf-high { background: var(--ok-soft); color: var(--ok); }
.conf-medium { background: var(--info-soft); color: var(--info); }
.conf-low { background: var(--warn-soft); color: var(--warn); }
.notes { margin: 8px 0 12px; padding-left: 20px; font-size: .9rem; color: var(--muted); }
.notes li { margin-bottom: 4px; }
.note-inline { font-size: .82rem; color: var(--warn); }

.banner-baby { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.banner-baby h2 { color: var(--warn); }
.factor-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.factor-list li, .influences li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; font-size: .92rem; }
.factor-list li > span:last-child, .influences li > span:last-child { grid-column: 2; color: var(--muted); }
.inf-badge { grid-row: span 2; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 3px 7px; border-radius: 6px; white-space: nowrap; align-self: start; }
.inf-high .inf-badge { background: var(--warn); color: #fff; }
.inf-medium .inf-badge { background: var(--info-soft); color: var(--info); }
.inf-low .inf-badge { background: var(--surface-2); color: var(--muted); }
@media (max-width: 480px) {
  .factor-list li, .influences li { grid-template-columns: 1fr; }
  .inf-badge { grid-row: auto; justify-self: start; }
  .factor-list li > span:last-child, .influences li > span:last-child { grid-column: 1; }
}

.influences { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 10px; }
.influences summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-weight: 700; color: var(--brand); list-style: none; }
.influences summary::-webkit-details-marker { display: none; }
.influences summary::before { content: "▸"; margin-right: 6px; }
.influences[open] summary::before { content: "▾"; }
.influences summary span:first-child { flex: 1; }
.inf-count { color: var(--muted); font-weight: 600; font-size: .85rem; }
.influences ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }

.explain { background: var(--info-soft); border-radius: 12px; padding: 10px 14px; margin: 4px 0 12px; }
.explain summary { cursor: pointer; font-weight: 700; color: var(--info); }
.explain-body { margin-top: 10px; font-size: .93rem; }
.explain-body ul { padding-left: 20px; margin: 0 0 10px; }
.explain-body li { margin-bottom: 6px; }
.pct-scale { display: grid; grid-template-columns: 1fr 4fr 1fr; gap: 4px; margin: 10px 0 14px; text-align: center; font-size: .8rem; font-weight: 700; }
.pct-scale span { padding: 8px 4px; border-radius: 8px; line-height: 1.25; }
.pct-scale small { font-weight: 600; font-size: .72rem; }
.pct-scale .seg-low { background: var(--warn-soft); color: var(--warn); }
.pct-scale .seg-ok { background: var(--ok-soft); color: var(--ok); }

.stat-meta.peers { color: var(--text); font-weight: 700; }
.check-field { align-self: end; margin-bottom: 22px; }

/* Habits */
.habit-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.habit { display: grid; gap: 2px; padding: 10px 14px; border-radius: 10px; border-left: 3px solid var(--border); background: var(--surface-2); font-size: .92rem; }
.habit span:last-child { color: var(--muted); }
.habit-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.habit-high { border-color: var(--warn); } .habit-high .habit-tag { color: var(--warn); }
.habit-medium, .habit-low { border-color: var(--info); } .habit-medium .habit-tag, .habit-low .habit-tag { color: var(--info); }
.habit-good { border-color: var(--ok); } .habit-good .habit-tag { color: var(--ok); }

/* Knowledge base */
.kb-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.kb-toc a { padding: 5px 11px; border-radius: 999px; background: var(--surface-2); text-decoration: none; font-weight: 700; font-size: .85rem; }
.kb-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.kb-filters button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.kb-filters button.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.kb-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.kb-status-ok { background: var(--ok-soft); color: var(--ok); }
.kb-status-info { background: var(--info-soft); color: var(--info); }
.kb-status-muted { background: var(--surface-2); color: var(--muted); }
.kb-status-warn { background: var(--warn-soft); color: var(--warn); }
.kb-stars { color: var(--warn); letter-spacing: 1px; white-space: nowrap; }
.kb-formula { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; display: block; white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
.kb-group-title { margin-top: 22px; }
.kb-table td:nth-child(1) { min-width: 160px; }
.kb-code { font-family: ui-monospace, Consolas, monospace; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }

/* Percentile range bar inside stat cards */
.pct-bar { position: relative; padding-top: 26px; margin: 8px 0 6px; }
.pct-track { display: grid; gap: 3px; }
.pz { display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 6px 3px; border-radius: 6px; line-height: 1.15; min-width: 0; }
.pz b { font-size: .7rem; font-weight: 700; }
.pz small { font-size: .62rem; font-weight: 600; opacity: .9; }
.pz-ok { background: var(--ok-soft); color: var(--ok); }
.pz-warn { background: var(--warn-soft); color: var(--warn); }
.pz-info { background: var(--info-soft); color: var(--info); }
.pct-marker { position: absolute; top: 0; height: 26px; width: 0; pointer-events: none; }
.pct-marker span { position: absolute; top: 0; left: 0; transform: translateX(-50%); white-space: nowrap; background: var(--text); color: var(--surface);
  font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.pct-marker::after { content: ""; position: absolute; bottom: 0; left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--text); }
.pct-track .pz:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }

.flags h2 { margin-bottom: 12px; }
.flag { padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; border-left: 3px solid; }
.flag p { margin: 2px 0 0; font-size: .92rem; }
.flag-warn { background: var(--warn-soft); border-color: var(--warn); }
.flag-info { background: var(--info-soft); border-color: var(--info); }

.chart-box { position: relative; height: 320px; margin: 8px 0; }
@media (min-width: 768px) { .chart-box { height: 400px; } }
.legend-note { font-size: .8rem; color: var(--muted); }
.chart-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table td { font-variant-numeric: tabular-nums; }
.forecast-table td:nth-child(3) .muted { font-size: .82rem; }

.nutri-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
@media (min-width: 720px) { .nutri-grid { grid-template-columns: repeat(3, 1fr); } }
.nutri { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.nutri-big { background: var(--brand-soft); }
.n-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.n-val { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.n-unit { font-size: .8rem; color: var(--muted); }
.food-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .food-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.food { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.food h4 { margin: 0 0 6px; }
.food ul { margin: 0; padding-left: 18px; font-size: .9rem; }

/* Modal */
.modal { border: 0; border-radius: var(--radius); padding: 20px; max-width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
.modal::backdrop { background: rgba(0, 0, 0, .45); }
.modal h4 { margin: 14px 0 6px; }
.modal ol { padding-left: 20px; margin: 0 0 8px; font-size: .92rem; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); font-size: .88rem; color: var(--muted); margin-top: 24px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 32px 16px 16px; display: grid; gap: 24px; }
@media (min-width: 720px) { .footer-inner { padding: 40px 24px 16px; } }
@media (min-width: 960px) { .footer-inner { grid-template-columns: 1fr 1.3fr; gap: 48px; } }
.footer-brand p { margin: 12px 0 0; max-width: 46ch; line-height: 1.6; }
.footer-brand p strong { color: var(--text); }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (min-width: 560px) { .footer-links { grid-template-columns: repeat(3, 1fr); } }
.footer-links h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin: 0 0 10px; }
.footer-links a { display: block; color: var(--muted); text-decoration: none; padding: 3px 0; }
.footer-links a:hover { color: var(--text); }
.footer-base { max-width: 1120px; margin: 0 auto; padding: 16px; border-top: 1px solid var(--border); font-size: .8rem; }
@media (min-width: 720px) { .footer-base { padding: 16px 24px 24px; } }

/* Nutrition "valid until" note */
.valid-until { margin: 10px 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--ok-soft); border-left: 3px solid var(--ok); font-size: .95rem; line-height: 1.5; }
.valid-until.expired { background: var(--warn-soft); border-left-color: var(--warn); }
.valid-until .btn { margin-left: 6px; vertical-align: middle; }
/* ---- Fruit & vegetable guide */
.tag-info { background: var(--info-soft); color: var(--info); }
.pv-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.pv-controls .field { margin: 0; }
.pv-key { padding: 1px 6px; border-radius: 6px; font-size: .85em; }
.pv-key-high { background: var(--ok-soft); color: var(--ok); }
.pv-key-good { background: var(--info-soft); color: var(--info); }
.pv-top summary { cursor: pointer; }
.pv-top .table-wrap { margin-top: 12px; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.pv-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pv-card[hidden] { display: none; }
.pv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pv-head h2 { margin: 0; font-size: 1.15rem; }
.pv-head p { margin: 2px 0 0; }
.pv-head .tag { margin: 0; white-space: nowrap; }
.pv-energy { margin: 0; font-size: .92rem; }
.pv-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pv-bars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: .9rem; }
.pv-pct { font-weight: 700; }
.pv-high .pv-pct { color: var(--ok); }
.pv-good .pv-pct { color: var(--info); }
.pv-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.pv-bar span { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.pv-good .pv-bar span { background: var(--info); }
.pv-note { margin: 0; font-size: .85rem; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.pv-choke { background: var(--warn-soft); color: var(--text); }
.pv-all { margin-top: auto; font-size: .9rem; }
.pv-all summary { cursor: pointer; color: var(--brand); font-weight: 700; }
.pv-search { grid-column: 1 / -1; }
.pv-search > span { display: block; font-weight: 700; margin-bottom: 6px; }
.pv-search-row { display: flex; gap: 8px; }
.pv-search-row input { flex: 1; min-width: 0; }
.pv-count { margin: 0 0 12px; }
.pv-pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 16px; }
a.tag { text-decoration: none; }
a.tag:hover { text-decoration: underline; }
.pv-table td { padding: 4px 6px; }
.pv-table td:nth-child(2), .pv-table td:nth-child(3) { text-align: right; white-space: nowrap; }

/* ---- Exercises */
.card-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ex-disclaimer p { margin: 0 0 8px; }
.ex-disclaimer p:last-child { margin: 0; }
.ex-goal ul { margin: 0 0 8px; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.ex-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ex-visual { background: var(--brand-soft); border-radius: 10px; padding: 8px; display: flex; justify-content: center; }
.ex-fig { width: 100%; max-width: 220px; height: auto; color: var(--text); }
.ex-fig .ex-limb { fill: none; stroke: currentColor; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.ex-fig .ex-far { opacity: .45; }
.ex-fig .ex-head { fill: currentColor; }
.ex-fig .ex-prop { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; }
.ex-fig .ex-prop-soft { stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; }
.ex-fig .ex-ground { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; opacity: .6; }
.ex-fig .ex-water { stroke: var(--info); stroke-width: 2.5; stroke-linecap: round; }
.ex-fig .ex-ball { fill: var(--warn); }
.ex-fig .ex-wall { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; opacity: .8; }
.ex-dose { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.ex-dose-label { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); margin-right: 4px; }
.ex-impact { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ex-impact li { display: grid; gap: 1px; }
.ex-area { font-weight: 700; font-size: .9rem; }
.ex-dots { color: var(--brand); letter-spacing: 1px; font-size: .8rem; margin-left: 4px; }
.ex-dots-off { opacity: .25; }
.ex-height { margin: 0; font-size: .9rem; }
.ex-steps { margin: 8px 0; padding-left: 20px; }

/* ---- Page polish */
.page-head h1 { font-size: 1.75rem; }
@media (min-width: 720px) { .page-head h1, .container > h1 { font-size: 2rem; } }
.flash-wrap { padding-bottom: 0; }
.table th { font-weight: 600; }
details > summary { cursor: pointer; }

/* ---- Landing page */
.container-x { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container-x { padding: 0 24px; } }
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-bg { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 380px at 12% 0%, color-mix(in srgb, #10b981 16%, transparent), transparent 70%),
    radial-gradient(560px 420px at 92% 20%, color-mix(in srgb, #6366f1 14%, transparent), transparent 70%),
    linear-gradient(var(--bg), var(--bg)); }
.hero-bg::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%); }
.hero-inner { position: relative; max-width: 1120px; margin: 0 auto; padding: 48px 16px 56px; display: grid; gap: 48px; align-items: center; }
@media (min-width: 720px) { .hero-inner { padding: 72px 24px 80px; } }
@media (min-width: 1000px) { .hero-inner { grid-template-columns: 1.05fr 1fr; gap: 56px; padding: 88px 24px 96px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: .82rem; font-weight: 500; text-decoration: none; box-shadow: var(--shadow); margin-bottom: 20px; }
.eyebrow:hover { border-color: var(--border-strong); }
.eyebrow span[aria-hidden] { color: var(--muted); }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px color-mix(in srgb, #10b981 25%, transparent); }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 750; margin: 0 0 18px; }
.grad { background: linear-gradient(100deg, var(--brand) 10%, var(--brand-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(1.02rem, 2vw, 1.15rem); color: var(--muted); max-width: 54ch; line-height: 1.6; margin: 0 0 28px; }

.hero-cta { font-size: clamp(1.05rem, 2.2vw, 1.2rem); font-weight: 700; color: var(--text); margin: -12px 0 12px; max-width: 580px; }
.hero-form { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px; box-shadow: var(--shadow-lg); max-width: 580px; }
.hero-fields { display: grid; gap: 8px; }
@media (min-width: 560px) { .hero-fields { grid-template-columns: 1fr 1fr; } .hero-fields .btn { grid-column: 1 / -1; } }
.hero-fields .btn { width: 100%; }
.hf input { min-height: 50px; }
.hf-phone { display: flex; min-height: 50px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); transition: border-color .15s, box-shadow .15s; }
.hf-phone:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.hf-phone.is-invalid, .hf input[aria-invalid="true"] { border-color: var(--danger); }
.dial { position: relative; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 12px; border-right: 1px solid var(--border); color: var(--text); font-weight: 500; white-space: nowrap; cursor: pointer; flex: 0 0 auto; }
.dial svg { color: var(--muted); }
.dial select { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; width: 100%; border: 0; padding: 0; }
.dial-show { min-width: 2.6em; font-variant-numeric: tabular-nums; }
.dial:has(select:focus-visible) { background: var(--surface-2); border-radius: 9px 0 0 9px; }
.hf-num { flex: 1; min-width: 0; display: flex; }
.hf-num input { border: 0; box-shadow: none !important; background: transparent; min-height: 48px; }
.hero-form .err { padding: 6px 6px 0; margin: 0; }
.hero-legal { margin: 10px 6px 4px; font-size: .76rem; line-height: 1.5; color: var(--muted); }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 20px 0 0; font-size: .88rem; color: var(--muted); }
.hero-trust li { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { color: var(--brand); width: 16px; height: 16px; }
.hero-login { margin: 14px 0 0; font-size: .88rem; color: var(--muted); }
.hero-login a { font-weight: 600; }

/* Hero product mock */
.hero-visual { position: relative; padding: 16px 8px 24px; }
@media (max-width: 999px) { .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; } }
.mock { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg), 0 0 0 6px color-mix(in srgb, var(--surface) 55%, transparent); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.mock-bar em { margin-left: auto; font-size: .72rem; color: var(--muted); font-weight: 500; }
.mock-body { padding: 18px; display: grid; gap: 14px; }
.mock-head { display: flex; align-items: center; gap: 10px; }
.mock-head div { display: grid; line-height: 1.25; }
.mock-head small { color: var(--muted); font-size: .78rem; }
.mock-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: color-mix(in srgb, #c2417a 14%, var(--surface)); color: #c2417a; }
.mock-pill { margin-left: auto; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-stats div { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: grid; line-height: 1.3; min-width: 0; }
.mock-stats small { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.mock-stats b { font-size: clamp(.86rem, 2.4vw, 1rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mock-stats i { font-style: normal; font-size: .7rem; color: var(--muted); }
.mock-chart { border: 1px solid var(--border); border-radius: 10px; padding: 10px 10px 8px; }
.mock-chart svg { display: block; width: 100%; height: 120px; }
.mc-band { fill: var(--chart-band); }
.mc-p { fill: none; stroke: var(--chart-curve); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.mc-mid { stroke: var(--chart-median); stroke-dasharray: none; }
.mc-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mc-fc { fill: none; stroke: var(--brand-2); stroke-width: 2.5; stroke-dasharray: 5 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mc-dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.mock-legend { display: flex; gap: 14px; font-size: .7rem; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.mock-legend span::before { content: ""; display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.lg-a::before { background: var(--brand); } .lg-b::before { background: var(--brand-2); } .lg-c::before { background: var(--chart-band); height: 8px !important; }
.mock-nutri { display: flex; flex-wrap: wrap; gap: 6px; }
.mock-nutri span { font-size: .74rem; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.mock-nutri b { color: var(--text); font-weight: 600; }
.float-card { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .82rem; line-height: 1.3; }
.float-card div { display: grid; }
.float-card small { color: var(--muted); font-size: .74rem; }
.fc-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.fc-ic-b { background: color-mix(in srgb, var(--brand-2) 14%, var(--surface)); color: var(--brand-2); }
.fc-ic svg { width: 17px; height: 17px; }
.fc-1 { top: -6px; right: -4px; }
.fc-2 { bottom: -22px; left: -14px; }
@media (max-width: 560px) { .fc-1 { right: 0; top: -14px; } .fc-2 { left: 0; bottom: -36px; } .hero-visual { padding-bottom: 40px; } }

/* Sources strip */
.sources { padding: 28px 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.sources p { text-align: center; margin: 0 0 14px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.sources ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; }
.sources li { font-weight: 650; color: color-mix(in srgb, var(--text) 62%, transparent); letter-spacing: -.01em; font-size: .98rem; }

/* Sections */
.lp-section { padding: 72px 0; }
@media (min-width: 720px) { .lp-section { padding: 96px 0; } }
.lp-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.lp-head h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.03em; font-weight: 700; margin: 10px 0 12px; }
.lp-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.feature-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: border-color .2s, transform .2s, box-shadow .2s; }
.feature:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature h3 { margin: 16px 0 6px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.6; }
.feature-ic { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: var(--brand);
  background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--brand-2) 10%, var(--surface))); border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border)); flex: 0 0 auto; }
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: none; }
@media (min-width: 860px) { .how-steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.how-steps li { position: relative; padding: 24px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.how-steps h3 { margin: 14px 0 6px; font-size: 1.02rem; }
.how-steps p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.6; }
.how-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--text); color: var(--bg); font-weight: 700; font-size: .9rem; }
.tool-grid { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.tool { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.tool:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow-lg); }
.tool h3 { margin: 0 0 2px; font-size: 1rem; }
.tool p { margin: 0; color: var(--muted); font-size: .9rem; }
.tool > div { flex: 1; min-width: 0; }
.tool-go { color: var(--muted); font-size: 1.2rem; transition: transform .2s, color .2s; }
.tool:hover .tool-go { transform: translateX(3px); color: var(--brand); }
.lp-cta { padding: 0 0 80px; }
.cta-box { position: relative; overflow: hidden; text-align: center; border-radius: 24px; padding: 56px 24px; color: #fff;
  background: radial-gradient(500px 260px at 15% 0%, rgba(16, 185, 129, .55), transparent 70%), radial-gradient(500px 300px at 90% 100%, rgba(99, 102, 241, .6), transparent 70%), #0b1f1a; }
.cta-box h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); letter-spacing: -.03em; margin: 0 0 10px; color: #fff; }
.cta-box p { margin: 0 auto 24px; color: rgba(255, 255, 255, .75); max-width: 46ch; }
.cta-btn { background: #fff; color: #0b1f1a; border-color: #fff; }
.cta-btn:hover { background: #e9f5f0; }
body.bare .site-footer { margin-top: 0; }
.hero-legal a { color: inherit; }

/* ---- Documents (Privacy, Terms) */
.doc-hero { max-width: 760px; margin: 8px 0 32px; }
.doc-hero h1 { font-size: clamp(2rem, 5vw, 2.75rem); letter-spacing: -.035em; margin: 8px 0 12px; }
.doc-hero-center { margin-left: auto; margin-right: auto; text-align: center; }
.doc-intro { font-size: 1.08rem; color: var(--muted); line-height: 1.6; margin: 0 0 10px; }
.doc-meta { font-size: .85rem; color: var(--muted); margin: 0; }
.doc-summary { display: grid; gap: 12px; margin: 0 0 40px; }
@media (min-width: 720px) { .doc-summary { grid-template-columns: repeat(3, 1fr); } }
.doc-summary div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-top: 3px solid var(--brand); }
.doc-summary h2 { font-size: .98rem; margin: 0 0 4px; }
.doc-summary p { margin: 0; color: var(--muted); font-size: .9rem; }
.doc-layout { display: grid; gap: 32px; }
@media (min-width: 960px) { .doc-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; } }
.doc-toc { font-size: .88rem; }
.doc-toc p { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.doc-toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; border-left: 1px solid var(--border); }
.doc-toc a { display: block; padding: 5px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.doc-toc a:hover { color: var(--text); border-left-color: var(--border-strong); }
@media (min-width: 960px) { .doc-toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; } }
@media (max-width: 959px) { .doc-toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
  .doc-toc ol { columns: 2; column-gap: 16px; display: block; border: 0; } .doc-toc a { border: 0; padding: 4px 0; } }
.prose { max-width: 720px; line-height: 1.7; }
.prose section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.prose section:last-child { border-bottom: 0; }
.prose h2 { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; letter-spacing: -.02em; margin: 0 0 14px; }
.prose-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; color: var(--muted); flex: 0 0 auto; }
.prose h3 { font-size: 1rem; margin: 20px 0 6px; }
.prose ul { padding-left: 20px; margin: 0 0 12px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--brand); }
.prose .table { font-size: .88rem; margin: 4px 0 14px; }
.callout { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); margin: 12px 0; line-height: 1.6; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }

/* ---- Contact */
.contact-wrap { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .contact-wrap { grid-template-columns: 1fr 1.15fr; gap: 56px; padding-top: 16px; } }
.contact-info h1 { font-size: clamp(2rem, 5vw, 2.6rem); letter-spacing: -.035em; margin: 8px 0 12px; }
.contact-list { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-list div { display: grid; line-height: 1.4; }
.contact-list b { font-size: .92rem; }
.contact-list a { text-decoration: none; font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }
.contact-card { padding: 24px; margin: 0; box-shadow: var(--shadow-lg); }
@media (min-width: 720px) { .contact-card { padding: 32px; } }
.contact-card h2 { font-size: 1.25rem; margin-bottom: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { text-align: center; padding: 32px 8px; }
.contact-done h2 { margin: 16px 0 6px; }
.done-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }

/* ---- Account */
.account-grid { display: grid; gap: 16px; }
@media (min-width: 800px) { .account-grid { grid-template-columns: 1fr 1fr; } }
.account-grid .card { margin: 0; }
.kv { margin: 0 0 14px; display: grid; gap: 0; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: .92rem; }
.kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.danger-zone { margin-top: 16px; border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.danger-zone h2 { color: var(--danger); }
.danger-zone ul { padding-left: 20px; margin: 0 0 12px; }
.danger-zone li { margin-bottom: 4px; }
.danger-zone form { max-width: 440px; margin-top: 16px; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
:root[data-theme="dark"] .btn-danger { color: #2a0d07; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-danger { color: #2a0d07; } }

/* ---- FAQ */
.faq-search { position: relative; display: block; max-width: 480px; margin: 24px auto 0; }
.faq-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.faq-search input { padding-left: 42px; min-height: 50px; border-radius: 12px; box-shadow: var(--shadow); }
.faq-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 32px; }
.faq-cats a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 500; }
.faq-cats a:hover { border-color: var(--brand); color: var(--brand); }
.faq { max-width: 780px; margin: 0 auto; }
.faq-group { margin-bottom: 36px; }
.faq-group h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; transition: border-color .15s, box-shadow .15s; }
.faq-item:hover { border-color: var(--border-strong); }
.faq-item[open] { box-shadow: var(--shadow); border-color: var(--border-strong); }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; font-weight: 600; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); flex: 0 0 auto; transition: transform .2s, background .2s; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 6px; right: 6px; top: 10px; height: 2px; border-radius: 1px; background: var(--muted); }
.faq-icon::after { transform: rotate(90deg); transition: transform .2s; }
.faq-item[open] .faq-icon { background: var(--brand-soft); }
.faq-item[open] .faq-icon::after { transform: rotate(0); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: var(--brand); }
.faq-a { padding: 0 18px 16px; color: var(--muted); line-height: 1.65; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a em { color: var(--text); font-weight: 500; }
.faq-more { max-width: 780px; margin: 8px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.faq-more h2 { margin: 0 0 4px; }
.faq-more p { margin: 0; }
.faq-compact .faq-item { margin-bottom: 10px; }
.lp-faq .faq-item { background: var(--bg); }
.faq mark { background: color-mix(in srgb, var(--warn) 25%, transparent); color: inherit; border-radius: 3px; }

/* ---- Navigation: Resources menu */
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: .92rem; cursor: pointer; user-select: none; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:hover, .nav-menu[open] > summary, .nav-menu > summary.active { color: var(--text); background: var(--surface-2); }
.nav-menu[open] > summary svg { transform: rotate(180deg); }
.nav-menu-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: 320px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; }
.nav-menu-panel a { display: grid; gap: 1px; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--text); }
.nav-menu-panel a:hover, .nav-menu-panel a.active { background: var(--surface-2); }
.nav-menu-panel b { font-weight: 600; font-size: .92rem; }
.nav-menu-panel small { color: var(--muted); font-size: .8rem; }
@media (max-width: 899px) {
  .nav-menu > summary { padding: 10px 12px; font-size: 1rem; width: 100%; justify-content: space-between; }
  .nav-menu-panel { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 0 8px; background: transparent; }
  .topnav { max-height: calc(100vh - 64px); overflow-y: auto; }
}
.seg a { flex: 1; display: block; text-align: center; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.seg a:hover { color: var(--text); }
.seg a.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .1), 0 0 0 1px var(--border); }
.tag-muted { background: var(--surface-2); color: var(--muted); }
.kicker { margin: 0; }

/* ---- Monthly progress */
.progress-card { border-left: 3px solid var(--ok); }
.progress-card.tone-info { border-left-color: var(--info); }
.progress-card.tone-warn { border-left-color: var(--warn); }
.progress-card h2 { margin: 4px 0 0; font-size: 1.2rem; }
.progress-detail { color: var(--muted); margin: 0 0 14px; }
.progress-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 0 12px; }
@media (min-width: 720px) { .progress-stats { grid-template-columns: repeat(4, 1fr); } }
.progress-stats div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.progress-stats dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.progress-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.progress-stats dd.sub { font-weight: 500; font-size: .8rem; color: var(--muted); }
.progress-stats dd.pct-move { font-size: .98rem; }
.progress-tip { margin: 0; font-size: .92rem; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); }
.streak { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .82rem; font-weight: 600; }
.card-progress { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: .84rem; color: var(--muted); }
.card-progress .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; }
.card-progress.tone-info .dot { background: var(--info); }
.card-progress.tone-warn .dot { background: var(--warn); }

/* ---- Account: reminder switches */
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.switch-row:last-of-type { border-bottom: 0; margin-bottom: 12px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row > span:last-child { display: grid; }
.switch-row small { color: var(--muted); font-size: .84rem; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--border-strong); flex: 0 0 auto; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--brand); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { box-shadow: var(--ring); }
.reminders-card { margin-top: 16px; }

/* ---- Compare */
.compare-legend { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.cmp-kid { display: flex; gap: 10px; align-items: center; }
.cmp-kid div { display: grid; line-height: 1.3; }
.cmp-kid small { color: var(--muted); font-size: .82rem; }
.cmp-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex: 0 0 auto; }
.cmp-swatch.sm { width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.chart-box-sm { height: 260px; }

/* ---- Recipes */
.rc-filters .pv-controls { margin-bottom: 4px; }
.rc-free { margin: 12px 0; }
.rc-actions { display: flex; gap: 8px; }
.rc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 16px; }
.rc-card { margin: 0; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
.rc-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.rc-card h2 { font-size: 1.05rem; margin: 0; }
.rc-card p { margin: 0; }
.rc-meta { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.rc-n { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
.rc-n dt { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rc-n dd { margin: 0; font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; }
.recipe { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) { .recipe { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; } .recipe-n { position: sticky; top: 88px; } }
.recipe h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -.03em; margin: 4px 0 10px; }
.recipe-facts { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.recipe-facts li { display: grid; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-width: 110px; }
.recipe-facts small { color: var(--muted); font-size: .76rem; }
.recipe-cols { display: grid; gap: 24px; margin: 20px 0; }
@media (min-width: 720px) { .recipe-cols { grid-template-columns: 1fr 1.4fr; } }
.recipe-cols h2 { font-size: 1.1rem; }
.recipe-ing { padding-left: 18px; margin: 0; line-height: 1.8; }
.recipe-ing li::marker { color: var(--brand); }
.recipe-steps { padding: 0; margin: 0; list-style: none; counter-reset: st; display: grid; gap: 12px; }
.recipe-steps li { counter-increment: st; display: grid; grid-template-columns: 28px 1fr; gap: 10px; line-height: 1.6; }
.recipe-steps li::before { content: counter(st); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .85rem; }
.recipe-n { margin: 0; }
.recipe-n h2 { font-size: 1.05rem; margin-bottom: 4px; }

/* ---- Meal planner */
.mp-kids { margin: 0 0 16px; max-width: 520px; }
.mp-avg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .mp-avg { grid-template-columns: repeat(5, 1fr); } }
.mp-avg > div { display: grid; gap: 3px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.mp-avg small { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.mp-avg b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.mp-avg i { font-style: normal; font-size: .76rem; color: var(--muted); }
.mp-bar { display: block; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.mp-bar span { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.mp-mid span { background: var(--info); }
.mp-low span { background: var(--warn); }
.mp-week { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); margin-bottom: 16px; }
.mp-day { margin: 0; display: flex; flex-direction: column; }
.mp-day-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.mp-day-head h2 { margin: 0; font-size: 1.05rem; }
.mp-meals { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 2px; }
.mp-meals li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.mp-meals li:last-child { border-bottom: 0; }
.mp-slot { grid-column: 1 / -1; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.mp-meals a { color: var(--text); font-weight: 500; text-decoration: none; }
.mp-meals a:hover { color: var(--brand); text-decoration: underline; }
/* Cost labels: outlined, with a 3-dot scale, so they stand apart from the topic tags */
.tag-cost { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border: 1.5px solid currentColor; }
.cost-dots { letter-spacing: 1px; font-size: .9em; line-height: 1; }
.cost-1 { color: var(--ok); background: var(--ok-soft); }
.cost-2 { color: #a15c07; background: #fef7e0; }
.cost-3 { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
:root[data-theme="dark"] .cost-2 { color: #f5c04a; background: #2e2510; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cost-2 { color: #f5c04a; background: #2e2510; } }
.mp-meals .tag-cost { font-size: .68rem; padding: 1px 6px; vertical-align: 1px; margin-inline-start: 4px; }
.mp-portion { font-size: .78rem; color: var(--brand); font-weight: 600; white-space: nowrap; align-self: center; }
.mp-meals .mp-people { grid-column: 1 / -1; white-space: normal; margin-top: 2px; }
.mp-people span { white-space: nowrap; }.mp-snack span:not(.mp-slot):not(.tag) { color: var(--muted); }
.mp-lunchbox { background: var(--brand-soft, rgba(99,102,241,.08)); border-radius: 8px; padding-left: 8px !important; padding-right: 8px !important; border-bottom-color: transparent !important; }
.mp-lunchbox .mp-slot { color: var(--brand); }
.mp-atschool span:not(.mp-slot):not(.tag) { color: var(--muted); }
.mp-day-head .tag { font-size: .68rem; vertical-align: middle; margin-left: 4px; }
.mp-school { display: flex; align-items: flex-end; gap: 12px; padding: 14px 18px; }
.mp-school .field { margin: 0; flex: 1; max-width: 560px; }
.mp-day-n { margin: auto 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.mp-day-n dt { font-size: .72rem; color: var(--muted); }
.mp-day-n dd { margin: 0 0 3px; font-weight: 600; font-size: .9rem; }

/* ---- Puberty guide */
.pb-switch { max-width: 280px; margin: 0 0 16px; }
.pb-timeline { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 0; }
.pb-timeline li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.pb-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.pb-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.pb-timeline h3 { margin: 4px 0 2px; font-size: 1rem; }
.pb-timeline h3 small { font-weight: 500; color: var(--muted); font-size: .84rem; margin-left: 6px; }
.pb-timeline p { margin: 0; color: var(--muted); }
.pb-grid { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 860px) { .pb-grid { grid-template-columns: 1fr 1fr; } }
.pb-grid .card { margin: 0; }
.prose-list { padding-left: 18px; margin: 0 0 10px; line-height: 1.65; }
.prose-list li { margin-bottom: 6px; }
.prose-list li::marker { color: var(--brand); }

/* ---- Calculators */
.calc-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 20px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.calc-tabs a { white-space: nowrap; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 500; font-size: .9rem; }
.calc-tabs a:hover { border-color: var(--brand); }
.calc-tabs a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.calc-wrap { display: grid; gap: 16px; align-items: start; margin-bottom: 16px; }
@media (min-width: 900px) { .calc-wrap { grid-template-columns: 1fr 1fr; } }
.calc-wrap .card { margin: 0; }
.calc-form h2 { margin-bottom: 4px; }
.calc-result { min-height: 240px; }
.calc-empty { display: grid; place-items: center; gap: 10px; text-align: center; min-height: 200px; color: var(--muted); }
.calc-big { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 750; letter-spacing: -.03em; margin: 4px 0 8px; line-height: 1.1; }
.calc-big small { font-size: .95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.calc-facts { padding-left: 18px; margin: 12px 0; }
.calc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.calc-grid div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.calc-grid dt { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.calc-grid dd { margin: 0; font-weight: 700; }
.calc-cta { margin-top: 18px; padding: 16px; border-radius: 12px; background: var(--brand-soft); }
.calc-cta p { margin: 0 0 10px; font-size: .92rem; }

/* ---- Articles */
.ar-cats { justify-content: flex-start; }
.ar-cats a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.ar-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 24px; }
.ar-card { margin: 0; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
.ar-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.ar-card h2 { font-size: 1.08rem; margin: 0; line-height: 1.3; }
.ar-card p { margin: 0; font-size: .92rem; }
.ar-meta { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.ar-more { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: .88rem; color: var(--brand); }
.ar-feature { background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--brand-2) 10%, var(--surface))); }
.article { max-width: 720px; margin: 0 auto; }
.article h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); letter-spacing: -.035em; margin: 6px 0 12px; line-height: 1.12; }
.article-body { margin-top: 24px; font-size: 1.02rem; }
.article-body h2 { font-size: 1.3rem; margin: 28px 0 10px; }
.article-body ol { padding-left: 22px; }
.article-body li { margin-bottom: 6px; }
.ar-related { margin: 28px 0 16px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.ar-related h2 { font-size: 1rem; margin: 0 0 10px; }
.ar-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-sources { margin: 0 0 12px; font-size: .88rem; color: var(--muted); }
.ar-sources summary { font-weight: 600; color: var(--text); }
.article-more-h { max-width: none; }

/* ---- Print (meal planner, guides) */
@media print {
  .topbar, .site-footer, .no-print, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
  .container { padding: 0; max-width: none; }
}
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row.food-actions { margin-top: 20px; }

/* ---- Onboarding: short steps with optional extras */
.steps-count { margin: 0 0 8px; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.more-details { margin: 8px 0 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.more-details > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 14px 16px; cursor: pointer; }
.more-details > summary::-webkit-details-marker { display: none; }
.more-details > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-weight: 700; align-self: center; }
.more-details[open] > summary::before { content: "−"; background: var(--brand-soft); color: var(--brand); }
.more-details > summary b { font-weight: 600; }
.more-details > summary span { color: var(--muted); font-size: .88rem; }
.more-details[open] { padding-bottom: 4px; }
.more-details[open] > *:not(summary) { margin-left: 16px; margin-right: 16px; }
.more-details .section-title:first-of-type { margin-top: 4px; }
.more-opts { margin: 4px 0 8px; }
.more-opts > summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--brand); padding: 4px 0; }
.more-opts[open] > summary { margin-bottom: 10px; }
.parent-checks { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: -4px 0 6px; }
.parent-checks .check { margin: 0; }
.unknown-opt { margin: 2px 0 6px; font-size: .85rem; }
.unknown-opt summary { cursor: pointer; color: var(--muted); }
.unknown-opt .check { margin: 8px 0 4px; }

/* ---- Growth trend tracker (monthly steps) */
.trend { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: linear-gradient(135deg, var(--brand-soft), var(--surface) 70%); }
.trend-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.trend-title { margin: 0 0 2px; font-weight: 650; font-size: 1.05rem; }
.trend-head .muted { margin: 0; }
.trend-count { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.trend-count b { font-size: 1.6rem; color: var(--brand); font-weight: 750; }
.trend-steps { list-style: none; padding: 0; margin: 14px 0 12px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.trend-steps li { display: grid; justify-items: center; gap: 4px; position: relative; }
.trend-steps li span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); font-size: .8rem; font-weight: 700; color: var(--muted); position: relative; z-index: 1; }
.trend-steps li:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 2px; background: var(--border); }
.trend-steps li.done span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.trend-steps li.done:not(:last-child)::after { background: var(--brand); }
.trend-steps li.next span { border-color: var(--brand); color: var(--brand); box-shadow: var(--ring); }
.trend-steps small { font-size: .7rem; color: var(--muted); }
.trend-steps li.next small { color: var(--brand); font-weight: 600; }
.trend-sofar { margin: 0 0 10px; font-size: .92rem; }
.trend-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); font-size: .92rem; }
.role-seg { margin-bottom: 18px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form select { width: auto; min-height: 34px; padding: 4px 28px 4px 10px; font-size: .9rem; }

/* ---- CMS pages */
.cms-page { max-width: 760px; }
.nav-admin { color: var(--brand) !important; font-weight: 600; }

/* Meal-plan sign-up prompt on recipe pages (logged-out visitors) */
.meal-cta { margin: 28px 0; padding: 40px 24px; border-radius: 20px; }
.meal-cta h2 { font-size: clamp(1.35rem, 3.5vw, 1.9rem); }
.meal-cta p { margin-bottom: 20px; max-width: 54ch; }
.meal-cta p strong { color: #fff; }
.meal-cta-badge { display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #d1fae5; font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.meal-cta-note { display: block; margin-top: 12px; color: rgba(255, 255, 255, .65); font-size: .8rem; }
.rc-wide { grid-column: 1 / -1; min-width: 0; }
.rc-wide .meal-cta { margin: 4px 0; }
/* Calculators: overview cards and the explanation under each calculator */
.calc-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 8px 0 24px; }
.calc-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; min-width: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.calc-card:hover { border-color: var(--brand); box-shadow: 0 6px 20px rgba(16, 24, 40, .08); transform: translateY(-1px); }
.calc-card h2 { font-size: 1.1rem; margin: 6px 0 0; }
.calc-card p { margin: 0; font-size: .92rem; flex: 1; }
.calc-card-go { margin-top: 8px; color: var(--brand); font-weight: 600; font-size: .9rem; }
.calc-why h2 { margin-top: 0; }
.calc-why-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 14px; }
.calc-why-grid h3 { font-size: 1rem; margin: 0 0 6px; }
.calc-why-grid p { margin: 0; font-size: .92rem; }
.calc-explain { display: grid; gap: 16px; margin: 24px 0; }
.calc-explain section { min-width: 0; }
.calc-explain h2 { font-size: 1.15rem; margin: 0 0 10px; }
.calc-explain p, .calc-explain li { line-height: 1.6; }
.calc-explain ul { padding-left: 20px; margin: 8px 0; }
.calc-explain p:last-child, .calc-explain ul:last-child { margin-bottom: 0; }
@media (min-width: 900px) { .calc-explain { grid-template-columns: 1fr 1fr; } }
.calc-related { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.calc-related .btn { white-space: normal; text-align: center; }
/* Account: signed-in phones */
.device-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.device-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.device-list li > span { display: grid; min-width: 0; }
.device-list small { overflow-wrap: anywhere; }
/* Measuring streaks: a calm note at milestones */
.progress-celebrate { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--brand-soft, #e8f7f0); color: var(--brand); font-weight: 600; }
.measure-care { margin: 12px 0 16px; font-size: 14px; line-height: 1.5; }
.measure-care strong { display: block; margin-bottom: 4px; }

/* Tip of the week */
.tip-card { border-left: 4px solid var(--brand); }
.tip-card h2 { margin: 2px 0 6px; font-size: 1.1rem; }
.tip-card p:last-child { margin: 0; }

/* Share card */
.share-card .seg { margin: 8px 0 12px; }
.share-canvas { width: 100%; max-width: 420px; height: auto; border-radius: 16px; display: block; margin: 0 0 12px; }

/* Meal planner: preferences, won't eat, family portions, shopping list */
.mp-prefs { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.mp-prefs .switch-row { margin: 0; }
.mp-adults { margin: 0; min-width: 220px; }
.mp-budget { margin: 0 0 16px; }
.mp-nope { display: inline; margin-left: auto; }
.link-btn { background: none; border: 0; padding: 0 4px; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--brand); }
.mp-nope-list { list-style: none; padding: 0; margin: 0; }
.mp-nope-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); }
.mp-nope-list form { margin: 0; }
.mp-aisles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px 24px; }
.mp-aisles h3 { font-size: 15px; margin: 8px 0 6px; color: var(--brand); }
.mp-aisles ul { list-style: none; padding: 0; margin: 0; }
.mp-aisles li { padding: 3px 0; font-size: 14px; }
.mp-aisles input { margin-right: 6px; }
@media print { .mp-shopping { break-before: page; } }

/* ---------------------------------------------------------------- Urdu (right to left) */
.lang-switch { font-weight: 600; font-size: 14px; color: var(--brand); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.lang-switch:hover { background: var(--brand-soft, #e8f7f0); }
.lang-switch[lang="ur"] { font-family: 'Noto Nastaliq Urdu', serif; font-size: 15px; line-height: 1.2; }
html[dir="rtl"] body { font-family: 'Noto Nastaliq Urdu', Inter, system-ui, sans-serif; line-height: 2.1; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { line-height: 1.9; letter-spacing: 0; }
html[dir="rtl"] input, html[dir="rtl"] select, html[dir="rtl"] textarea, html[dir="rtl"] button, html[dir="rtl"] .btn { font-family: inherit; }
html[dir="rtl"] .lang-switch[lang="en"] { font-family: Inter, system-ui, sans-serif; }
/* Numbers, dates, charts and units read left to right inside Urdu text */
html[dir="rtl"] canvas, html[dir="rtl"] .gsvg, html[dir="rtl"] .chart-box, html[dir="rtl"] input[type="number"], html[dir="rtl"] input[type="date"], html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"] { direction: ltr; }
html[dir="rtl"] .mp-nope { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .tip-card { border-left: 0; border-right: 4px solid var(--brand); }
html[dir="rtl"] ul, html[dir="rtl"] ol { padding-right: 1.3em; padding-left: 0; }
html[dir="rtl"] .crumbs a { unicode-bidi: plaintext; }
