
/* Layout idea: one job per screen. Calculator screen = a single calm card. Results screen = one huge number, one goal, three macros; everything else folded away. Squint test: at a blur, each screen shows one dark mass and one blue action. */
:root {
  --paper: #f5f6f3;
  --card: #ffffff;
  --ink: #121413;
  --muted: #646a66;
  --line: #e1e4df;
  --accent: #1f4fd8;
  --accent-ink: #ffffff;
  --accent-soft: #eaf0fd;
  --protein: #1f4fd8;
  --carbs: #7a9cf0;
  --fat: #c4d2f7;
  --warn: #9a5b00;
  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1211; --card: #171b19; --ink: #eef0ec; --muted: #a2a8a4; --line: #2a302d;
    --accent: #7f9dff; --accent-ink: #0b1230; --accent-soft: #1b2442;
    --protein: #7f9dff; --carbs: #4f6bc0; --fat: #2f3f75; --warn: #f0b45c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1211; --card: #171b19; --ink: #eef0ec; --muted: #a2a8a4; --line: #2a302d;
  --accent: #7f9dff; --accent-ink: #0b1230; --accent-soft: #1b2442;
  --protein: #7f9dff; --carbs: #4f6bc0; --fat: #2f3f75; --warn: #f0b45c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-head .wrap-wide { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand {
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%;
  font-size: 20px; color: var(--ink); text-decoration: none;
}
.brand span { color: var(--accent); }

/* Calculator screen */
.hero { padding: 20px 0 22px; }
h1 {
  font-family: var(--font-display); font-weight: 900; font-stretch: 72%;
  font-size: clamp(42px, 11vw, 64px); line-height: 0.95; letter-spacing: -0.02em;
  margin: 0 0 10px; text-transform: uppercase; text-wrap: balance;
}
.lede { margin: 0; color: var(--muted); font-size: 17px; max-width: 46ch; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 7px; }
.label { font-size: 14px; font-weight: 600; }
.hint { font-weight: 400; color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.seg { display: flex; background: var(--paper); border-radius: 10px; padding: 4px; gap: 4px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  flex: 1; text-align: center; padding: 9px 8px; border-radius: 7px;
  font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; user-select: none;
}
.seg input:checked + label { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 1px; }

.input-unit { position: relative; }
.input-unit .unit {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 15px; pointer-events: none;
}
input[type="number"], select {
  width: 100%; font: inherit; font-size: 18px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 44px 12px 14px; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: none;
}
select {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[aria-invalid="true"] { border-color: var(--warn); }
.err { color: var(--warn); font-size: 14px; margin: 0; }

.more { border-top: 1px solid var(--line); padding-top: 16px; }
.more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+ "; color: var(--accent); }
.more[open] summary::before { content: "\2212 "; }
.more .field { margin-top: 12px; }

.btn {
  width: 100%; font: inherit; font-weight: 700; font-size: 18px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 10px; padding: 16px; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.trust { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }

/* Explainer (below the fold, for search) */
.explain { padding-top: 56px; padding-bottom: 40px; }
.explain h2 {
  font-family: var(--font-display); font-weight: 800; font-stretch: 78%;
  font-size: 28px; line-height: 1.1; margin: 0 0 12px;
}
.explain p { margin: 0 0 12px; color: var(--muted); }
.faq-title { margin-top: 40px !important; }
.split { display: grid; gap: 12px; margin: 20px 0 0; }
.split-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; }
.split-key { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.split-key div { display: grid; gap: 2px; }
.split-key b { font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 26px; line-height: 1; }
.split-key span { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: baseline; }
.split-key i { width: 9px; height: 9px; border-radius: 2px; flex: none; display: inline-block; }
.faq { margin-top: 8px; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 8px 0 0; }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Results screen */
.back {
  display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--muted);
  background: none; border: 0; padding: 6px 0; cursor: pointer;
}
.back:hover { color: var(--ink); }
.back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.headline { padding: 28px 0 32px; text-align: center; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.mega {
  font-family: var(--font-display); font-weight: 900; font-stretch: 72%;
  font-size: clamp(88px, 28vw, 140px); line-height: 0.88; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; margin: 0;
}
.mega-unit { font-size: 18px; font-weight: 600; margin: 8px 0 0; }
.range { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

.stack { display: grid; gap: 16px; padding-bottom: 32px; }
.goal-card { display: grid; gap: 16px; }
.goal-card h2, .macro-card h2 { font-size: 15px; font-weight: 600; color: var(--muted); margin: 0; }
.target-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.target-num {
  font-family: var(--font-display); font-weight: 800; font-stretch: 78%;
  font-size: 52px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums;
}
.target-unit { font-size: 16px; font-weight: 600; }
.target-note { margin: 0; color: var(--muted); font-size: 15px; }
.warn { color: var(--warn); font-size: 14px; margin: 0; }

.macro-card { display: grid; gap: 16px; }
.bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.bar span { display: block; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.macro { display: grid; gap: 2px; }
.macro .g {
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%;
  font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums;
}
.macro .g small { font-size: 16px; font-weight: 600; margin-left: 1px; }
.macro .n { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.macro .n i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.soon {
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
  background: var(--accent-soft); border-radius: 14px; padding: 18px 20px;
}
.soon b { display: block; font-size: 16px; }
.soon span { color: var(--muted); font-size: 14px; }
.pill { font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; }

.details { border-top: 1px solid var(--line); }
.details details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.details summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.details details[open] summary::after { content: "\2212"; }
.kv { display: grid; gap: 0; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; }
.kv div + div { border-top: 1px solid var(--line); }
.kv .cur { font-weight: 700; color: var(--accent); }
.fine { font-size: 13px; color: var(--muted); margin: 18px 0 0; }

.site-foot { border-top: 1px solid var(--line); padding: 20px 0 32px; font-size: 13px; color: var(--muted); }
.site-foot p { margin: 0 0 6px; }

@media (prefers-reduced-motion: no-preference) {
  .view-in { animation: fade 240ms ease-out; }
  @keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---- Results v2 + meal plan builder ---- */
.preview-bar { background: var(--accent-soft); color: var(--muted); font-size: 12px; text-align: center; padding: 6px 16px; }
.stats-line { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.linkish { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pace { display: flex; gap: 8px; flex-wrap: wrap; }
.pace input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.pace label, .chips label {
  font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); color: var(--muted); cursor: pointer; user-select: none;
}
.pace input:checked + label, .chips input:checked + label { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pace input:focus-visible + label, .chips input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.card-note { margin: 0; font-size: 13px; color: var(--muted); }

.offer { background: var(--accent); color: var(--accent-ink); border-radius: 14px; padding: 24px; display: grid; gap: 10px; }
.offer-kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.offer-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-stretch: 78%; font-size: 32px; line-height: 1.02; text-wrap: balance; }
.offer-text { margin: 0; font-size: 16px; opacity: 0.92; }
.offer-sub { margin: 0; font-size: 13px; opacity: 0.85; text-align: center; }
.btn-invert { background: var(--card); color: var(--accent); }
.btn-invert:focus-visible { outline-color: var(--card); }

.body-card { display: grid; gap: 14px; }
.body-card h2, .tools h2 { font-size: 15px; font-weight: 600; color: var(--muted); margin: 0; }
.bmi-row { display: flex; justify-content: space-between; align-items: center; }
.bmi-num { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.bmi-lab { font-size: 14px; font-weight: 600; margin-left: 6px; }
.pill-cat { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--paper); }
.gauge { position: relative; padding-bottom: 20px; }
.gauge-track { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; }
.gauge-track span { display: block; height: 100%; background: var(--line); }
.gauge-track .seg-u { flex: 14; } .gauge-track .seg-h { flex: 26; background: var(--fat); } .gauge-track .seg-o { flex: 20; } .gauge-track .seg-ob { flex: 40; }
.gauge-dot { position: absolute; top: -4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--ink); border: 3px solid var(--card); }
.gauge-ticks span { position: absolute; top: 14px; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kv.tight { margin-top: 0; }
.kv div span:last-child { white-space: nowrap; text-align: right; }
.fold-text { margin: 10px 0 0; font-size: 15px; color: var(--muted); }

.tools { display: grid; gap: 8px; }
.disclose { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.tool {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  text-decoration: none; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.tool b { font-size: 15px; }
.tool span { grid-column: 1; font-size: 13px; color: var(--muted); }
.tool em { grid-row: 1 / span 2; grid-column: 2; font-style: normal; font-size: 13px; font-weight: 700; color: var(--accent); }
.tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Builder */
.q-top { display: flex; justify-content: space-between; align-items: center; }
.q-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 6px 0 24px; }
.progress span { display: block; height: 100%; width: 14%; background: var(--accent); transition: width 240ms ease; }
.q-body { display: grid; gap: 16px; padding-bottom: 20px; }
.q-title { font-family: var(--font-display); font-weight: 800; font-stretch: 78%; font-size: 34px; line-height: 1.02; margin: 0; text-wrap: balance; }
.q-help { margin: -6px 0 0; color: var(--muted); font-size: 15px; }
.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt label {
  display: grid; gap: 2px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--card); cursor: pointer; user-select: none;
}
.opt label b { font-size: 16px; }
.opt label small { font-size: 13px; color: var(--muted); }
.opt input:checked + label { border-color: var(--accent); background: var(--accent-soft); }
.opt input:checked + label b { color: var(--accent); }
.opt input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.q-sub { font-size: 14px; font-weight: 600; margin: 4px 0 -6px; }
textarea.q-text {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 76px; resize: vertical;
}
textarea.q-text:focus-visible, input.q-email:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input.q-email {
  width: 100%; font: inherit; font-size: 18px; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 13px 14px;
}
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.summary b { display: block; font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.summary span { font-size: 12px; color: var(--muted); }
.summary .cal b { color: var(--accent); }

.plans { display: grid; gap: 12px; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan label { display: grid; gap: 6px; padding: 18px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; }
.plan input:checked + label { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan-name { font-size: 18px; font-weight: 700; }
.plan-price { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 30px; line-height: 1; }
.plan-price small { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--muted); }
.plan ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.plan .tag { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 2px 8px; border-radius: 4px; }
.days { display: flex; gap: 8px; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days label { flex: 1; text-align: center; font-weight: 700; padding: 9px; border-radius: 8px; border: 1.5px solid var(--line); cursor: pointer; }
.days input:checked + label { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.days input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.reassure { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.done-num { font-family: var(--font-display); font-weight: 900; font-stretch: 72%; font-size: 64px; line-height: 0.9; color: var(--accent); margin: 0; }
pre.payload { margin: 10px 0 0; font-size: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; white-space: pre-wrap; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.err-inline { color: var(--warn); font-size: 14px; margin: -6px 0 0; }

.plan-sub { font-size: 13px; color: var(--muted); margin-top: -2px; }
.oto { border: 2px dashed var(--accent); border-radius: 14px; padding: 18px; display: grid; gap: 8px; }
.oto-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.oto-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 26px; line-height: 1.05; }
.oto-text { margin: 0; font-size: 14px; color: var(--muted); }
.btn-ghost { background: var(--accent-soft); color: var(--accent); }
.btn-quiet { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
.mp-title { margin-top: 12px; }
#mp-sub { margin: 8px 0 0; }
.tabs { display: flex; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 18px 0 16px; position: sticky; top: 8px; z-index: 2; }
.tab { flex: 1; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); background: none; border: 0; border-radius: 8px; padding: 9px 4px; cursor: pointer; }
.tab.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mp-body { display: grid; gap: 12px; padding-bottom: 20px; }
.day-head { display: grid; gap: 10px; }
.day-head h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 26px; }
.summary.small b { font-size: 20px; }
.meal { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 6px; }
.meal-top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.meal-slot { color: var(--accent); }
.meal-name { margin: 0; font-size: 19px; line-height: 1.25; }
.meal-macros { margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.recipe summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); list-style: none; padding: 4px 0; }
.recipe summary::-webkit-details-marker { display: none; }
.recipe summary::after { content: " +"; }
.recipe[open] summary::after { content: " \2212"; }
ul.ing { list-style: none; margin: 6px 0 0; padding: 0; display: grid; }
ul.ing li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
ul.ing li > span:last-child { white-space: nowrap; color: var(--muted); }
ol.steps { margin: 10px 0 4px; padding-left: 20px; font-size: 14px; display: grid; gap: 6px; }
.swap { justify-self: start; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; margin-top: 4px; }
.swap:hover { border-color: var(--accent); color: var(--accent); }
.swap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.g-cat h3 { margin: 8px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.g-item { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.g-item input { width: 18px; height: 18px; accent-color: var(--accent); }
.g-item input:checked + span { text-decoration: line-through; color: var(--muted); }
.mp-offer { margin: 8px 0 32px; }

.mp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mp-actions .btn { font-size: 16px; padding: 13px; }
.mp-status { margin: 8px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

.offer-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 15px; }
.mp-tools { margin: 0 0 32px; }

.was { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.save-pill { justify-self: start; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }

.site-head { position: relative; z-index: 5; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.site-nav a:hover { color: var(--ink); background: var(--card); }
.site-nav a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.site-nav a:focus-visible, .menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu-btn { display: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.menu-btn { align-items: center; gap: 8px; }
.burger { position: relative; width: 18px; height: 14px; display: inline-block; }
.burger i { position: absolute; left: 0; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 180ms ease, opacity 180ms ease, top 180ms ease; }
.burger i:nth-child(1) { top: 0; } .burger i:nth-child(2) { top: 6px; } .burger i:nth-child(3) { top: 12px; }
.menu-btn[aria-expanded="true"] .burger i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .burger i:nth-child(3) { top: 6px; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .burger i { transition: none; } }
.hint-inline { margin: 0; font-size: 14px; color: var(--accent); font-weight: 600; }
@media (max-width: 640px) {
  .menu-btn { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 60px; flex-direction: column; gap: 0; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0,0,0,0.08); padding: 6px 12px 10px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a.on { box-shadow: inset 3px 0 0 var(--accent); padding-left: 14px; }
}

/* Guides */
.guide-list { display: grid; gap: 12px; }
.guide-card { display: grid; gap: 4px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.guide-card:hover { border-color: var(--accent); }
.guide-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-card b { font-size: 19px; line-height: 1.25; }
.guide-card span { color: var(--muted); font-size: 15px; }
.guide-card .guide-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); }
.guide-card em { font-style: normal; font-size: 13px; color: var(--muted); margin-top: 4px; }
.guide-soon-title { font-size: 15px; font-weight: 600; color: var(--muted); margin: 32px 0 6px; }
.guide-soon { list-style: none; margin: 0 0 48px; padding: 0; }
.guide-soon li { padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); }
.article { padding-bottom: 48px; }
.crumbs { margin: 20px 0 10px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--accent); text-decoration: none; font-weight: 600; }
.article-title { font-family: var(--font-display); font-weight: 900; font-stretch: 74%; font-size: clamp(34px, 9vw, 52px); line-height: 0.98; letter-spacing: -0.01em; margin: 0 0 12px; text-wrap: balance; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
mark.placeholder { background: #fff3c4; color: #6b5200; padding: 0 3px; border-radius: 3px; }
.answer { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 16px 18px; margin-bottom: 8px; }
.answer-kicker { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.answer p:last-child { margin: 0; font-size: 17px; line-height: 1.5; }
.article h2 { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 26px; line-height: 1.1; margin: 32px 0 10px; text-wrap: balance; }
.article p { font-size: 17px; line-height: 1.6; margin: 0 0 12px; max-width: 65ch; }
.fix-list { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 8px; }
.fix-list li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.5; }
.fix-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 800; }
.cta-box { background: var(--accent); color: var(--accent-ink); border-radius: 14px; padding: 22px; display: grid; gap: 8px; margin: 28px 0; }
.cta-box p { margin: 0; color: inherit; }
.cta-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.cta-title { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 26px !important; line-height: 1.05 !important; }
.cta-text { font-size: 15px !important; opacity: 0.92; }
.cta-box .btn { text-align: center; text-decoration: none; margin-top: 6px; }
.product-box { display: grid; gap: 8px; margin: 24px 0; }
.product-box .disclose { font-size: 12px !important; line-height: 1.4; margin: 0 0 2px !important; color: var(--muted); }
.ebook-slot { border-style: dashed; }
.ebook-slot em { color: var(--muted); }
.week-plan { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; line-height: 1.5; }
.author-box { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin: 28px 0 0; }
.author-box p { font-size: 14px !important; color: var(--muted); margin: 0 !important; }
.sources-title { font-size: 18px !important; }
.sources { padding-left: 20px; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.sources a { color: var(--muted); }
.related { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.related-title { font-weight: 700; margin: 0 !important; font-size: 15px !important; }
.related a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* =====================================================================
   LIQUID GLASS THEME
   Layout idea: translucent glass sheets float over a soft, slowly lit
   color field. One dark number and one blue action per screen.
   ===================================================================== */
:root {
  --paper: #eef1f7;               /* base canvas behind the light field */
  --card: rgba(255, 255, 255, 0.62);
  --card-solid: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.14);
  --fill: rgba(118, 118, 128, 0.12);   /* iOS tertiary fill for tracks/inputs */
  --accent: #007aff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 122, 255, 0.10);
  --protein: #0a84ff;
  --carbs: #30c759;
  --fat: #ff9f0a;
  --warn: #c93400;
  --glass-edge: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 1px 1px rgba(0, 0, 0, 0.02), 0 8px 30px rgba(31, 38, 64, 0.08);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(255, 255, 255, 0.25);
  --blob-1: rgba(0, 122, 255, 0.22);
  --blob-2: rgba(175, 82, 222, 0.16);
  --blob-3: rgba(48, 199, 89, 0.14);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b0c10; --card: rgba(44, 44, 50, 0.55); --card-solid: #1c1c1e; --ink: #f5f5f7; --muted: #a1a1a6;
    --line: rgba(255, 255, 255, 0.12); --fill: rgba(118, 118, 128, 0.24);
    --accent: #0a84ff; --accent-ink: #ffffff; --accent-soft: rgba(10, 132, 255, 0.18);
    --protein: #0a84ff; --carbs: #32d74b; --fat: #ff9f0a; --warn: #ff9f0a;
    --glass-edge: rgba(255, 255, 255, 0.14);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    --blob-1: rgba(10, 132, 255, 0.28); --blob-2: rgba(191, 90, 242, 0.20); --blob-3: rgba(50, 215, 75, 0.12);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b0c10; --card: rgba(44, 44, 50, 0.55); --card-solid: #1c1c1e; --ink: #f5f5f7; --muted: #a1a1a6;
  --line: rgba(255, 255, 255, 0.12); --fill: rgba(118, 118, 128, 0.24);
  --accent: #0a84ff; --accent-ink: #ffffff; --accent-soft: rgba(10, 132, 255, 0.18);
  --protein: #0a84ff; --carbs: #32d74b; --fat: #ff9f0a; --warn: #ff9f0a;
  --glass-edge: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  --blob-1: rgba(10, 132, 255, 0.28); --blob-2: rgba(191, 90, 242, 0.20); --blob-3: rgba(50, 215, 75, 0.12);
  color-scheme: dark;
}

/* ---------- canvas ---------- */
html { background: var(--paper); }
body { background: var(--paper); font-family: var(--font-body); letter-spacing: -0.01em; font-size: 17px; }
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient::before, .ambient::after, .ambient i {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px);
}
.ambient::before { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax; background: radial-gradient(circle, var(--blob-1), transparent 65%); }
.ambient::after { width: 60vmax; height: 60vmax; right: -25vmax; top: 10vmax; background: radial-gradient(circle, var(--blob-2), transparent 65%); }
.ambient i { width: 55vmax; height: 55vmax; left: 10vmax; bottom: -35vmax; background: radial-gradient(circle, var(--blob-3), transparent 65%); }
.site-head, main, .site-foot { position: relative; z-index: 1; }

/* ---------- the glass material ---------- */
.card, .tool, .meal, .guide-card, .opt label, .plan label, .summary, .site-head .wrap-wide,
.faq, .details, .tabs, .answer, .seg, .menu-btn, .btn-quiet, .swap, .day-head .summary {
  background: var(--card);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-hi), var(--glass-shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --card: var(--card-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  :root, :root:not([data-theme="light"]) { --card: var(--card-solid); }
  .ambient { display: none; }
}

/* ---------- type ---------- */
h1, .q-title, .article-title, .offer-title, .cta-title, .oto-title, .day-head h2, .article h2, .explain h2 {
  font-family: var(--font-display); font-stretch: normal; text-transform: none; letter-spacing: -0.025em;
}
h1 { font-size: clamp(40px, 10vw, 56px); font-weight: 700; line-height: 1.04; margin: 0 0 10px; }
.lede { font-size: 19px; line-height: 1.45; color: var(--muted); }
.q-title { font-size: 32px; font-weight: 700; line-height: 1.1; }
.article-title { font-size: clamp(32px, 8.5vw, 46px); font-weight: 700; line-height: 1.08; }
.explain h2, .article h2 { font-size: 24px; font-weight: 700; line-height: 1.2; }
.mega, .target-num, .macro .g, .summary b, .bmi-num, .plan-price, .done-num, .split-key b, .stat-num {
  font-family: var(--font-num); font-stretch: normal; letter-spacing: -0.03em;
}

/* ---------- header: floating glass bar ---------- */
.site-head { position: sticky; top: 0; padding: 10px 12px 0; z-index: 10; }
.site-head .wrap-wide { height: 56px; border-radius: 20px; padding: 0 10px 0 18px; max-width: 980px; }
.brand { font-family: var(--font-display); font-stretch: normal; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.site-nav a { border-radius: 999px; font-size: 15px; font-weight: 500; padding: 7px 14px; }
.site-nav a:hover { background: var(--fill); }
.site-nav a.on { box-shadow: none; background: var(--fill); color: var(--ink); border-radius: 999px; }
.menu-btn { border-radius: 999px; padding: 8px 14px; font-weight: 500; }
@media (max-width: 640px) {
  .site-nav { top: 72px; left: 12px; right: 12px; border-radius: 20px; padding: 6px;
    background: var(--card); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), 0 20px 50px rgba(0,0,0,0.15); }
  .site-nav a { border-radius: 14px; border-bottom: 0; padding: 13px 14px; font-size: 17px; }
  .site-nav a.on { box-shadow: none; padding-left: 14px; background: var(--accent-soft); color: var(--accent); }
}

/* ---------- calculator ---------- */
.hero { padding: 36px 0 24px; }
.card { border-radius: 28px; padding: 22px; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; text-transform: none; }
.seg { border-radius: 14px; padding: 3px; gap: 2px; background: var(--fill); box-shadow: none; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.seg label { border-radius: 11px; font-weight: 600; color: var(--ink); padding: 8px; transition: background 200ms ease, box-shadow 200ms ease; }
.seg input:checked + label { background: var(--card-solid); box-shadow: 0 3px 8px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.04); }
input[type="number"], select, textarea.q-text, input.q-email {
  background: var(--fill); border: 1px solid transparent; border-radius: 14px; font-size: 17px; color: var(--ink);
}
input:focus-visible, select:focus-visible, textarea.q-text:focus-visible, input.q-email:focus-visible {
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--card-solid);
}
.more { border-top: 1px solid var(--line); }
.more summary::before { color: var(--accent); }

/* buttons: capsules */
.btn {
  border-radius: 999px; padding: 15px 20px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  background: linear-gradient(180deg, #2b8fff 0%, var(--accent) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 6px 20px rgba(0, 122, 255, 0.28);
  transition: transform 120ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(0.98); }
.btn-invert { background: rgba(255,255,255,0.92); color: var(--accent); box-shadow: inset 0 1px 0 #fff, 0 6px 18px rgba(0,0,0,0.12); }
.btn-ghost { background: rgba(255,255,255,0.85); color: var(--accent); box-shadow: inset 0 1px 0 #fff; }
.btn-quiet { color: var(--ink); box-shadow: var(--glass-hi); }
.trust { font-size: 14px; }

/* explainer + FAQ as inset grouped lists */
.split-bar { height: 10px; border-radius: 999px; }
.split-key b { font-size: 24px; font-weight: 700; }
.faq { border-radius: 22px; padding: 4px 18px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary::after, .details summary::after { content: "›"; font-size: 22px; line-height: 1; color: var(--muted); transform: rotate(90deg); transition: transform 200ms ease; font-weight: 400; }
.faq details[open] summary::after, .details details[open] summary::after { content: "›"; transform: rotate(-90deg); }

/* ---------- results ---------- */
.preview-bar { background: transparent; color: var(--muted); font-size: 12px; padding: 10px 16px 0; }
.back { color: var(--accent); font-weight: 500; }
.back:hover { color: var(--accent); opacity: 0.8; }
.stats-line { font-size: 15px; }
.headline { padding: 30px 0 28px; }
.eyebrow { font-size: 17px; font-weight: 500; color: var(--muted); }
.mega { font-size: clamp(84px, 26vw, 128px); font-weight: 700; line-height: 0.95; }
.mega-unit { font-size: 17px; font-weight: 500; color: var(--muted); }
.range { font-size: 14px; }
.stack { gap: 14px; }
.goal-card h2, .macro-card h2, .body-card h2, .tools h2 { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.target-num { font-size: 52px; font-weight: 700; }
.pace label, .chips label { border: 0; background: var(--fill); color: var(--ink); font-weight: 500; padding: 8px 14px; }
.pace input:checked + label, .chips input:checked + label { background: var(--accent); color: #fff; }
.bar { height: 12px; border-radius: 999px; gap: 3px; }
.bar span { border-radius: 999px; }
.macro .g { font-size: 34px; font-weight: 700; }
.macro .n i, .split-key i { border-radius: 50%; }

.offer {
  border-radius: 28px; padding: 26px; color: #fff;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,0.28), transparent 50%),
    linear-gradient(140deg, #2f8cff 0%, #0a63e8 55%, #5e5ce6 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 18px 40px rgba(10, 99, 232, 0.30);
  border: 1px solid rgba(255,255,255,0.25);
}
.offer-kicker { font-size: 12px; letter-spacing: 0.04em; opacity: 0.9; }
.offer-title { font-size: 30px; font-weight: 700; line-height: 1.08; }
.bmi-num { font-size: 40px; font-weight: 700; }
.pill-cat { background: var(--fill); font-weight: 600; }
.gauge-track { height: 8px; border-radius: 999px; }
.gauge-track .seg-h { background: var(--carbs); }
.gauge-dot { background: var(--card-solid); border: 3px solid var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.details { border-radius: 22px; padding: 2px 18px; border-top: 1px solid var(--glass-edge); }
.details details { border-bottom: 1px solid var(--line); }
.details details:last-child { border-bottom: 0; }
.details summary { font-weight: 500; }
.kv div + div { border-top: 1px solid var(--line); }
.kv .cur { color: var(--accent); }
.tool { border-radius: 18px; padding: 14px 16px; }
.tool em { font-weight: 600; }
.tool:hover { transform: translateY(-1px); }
.fine { font-size: 12px; }

/* ---------- builder ---------- */
.progress { height: 5px; background: var(--fill); border-radius: 999px; }
.progress span { border-radius: 999px; background: linear-gradient(90deg, #5ac8fa, var(--accent)); }
.opt label { border-radius: 18px; padding: 15px 18px; }
.opt input:checked + label { background: var(--accent-soft); border-color: var(--accent); box-shadow: var(--glass-hi), 0 0 0 1px var(--accent); }
.summary { border-radius: 20px; }
.summary b { font-size: 24px; font-weight: 700; }
.plan label { border-radius: 22px; padding: 20px; }
.plan input:checked + label { border-color: var(--accent); box-shadow: var(--glass-hi), 0 0 0 2px var(--accent), var(--glass-shadow); }
.plan-price { font-size: 30px; font-weight: 700; }
.plan .tag { background: linear-gradient(180deg, #2b8fff, var(--accent)); border-radius: 999px; padding: 3px 10px; letter-spacing: 0.02em; }
.save-pill { background: rgba(48, 199, 89, 0.15); color: #1a8a3a; }
:root[data-theme="dark"] .save-pill { color: #32d74b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .save-pill { color: #32d74b; } }
.days label { border-radius: 999px; border: 0; background: var(--fill); }
.oto { border: 1.5px dashed var(--accent); border-radius: 24px; background: var(--card); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.oto-title { font-size: 24px; font-weight: 700; }
.done-num { font-weight: 700; }

/* ---------- plan viewer ---------- */
.tabs { border-radius: 999px; padding: 4px; top: 76px; }
.tab { border-radius: 999px; font-weight: 600; color: var(--muted); }
.tab.on { background: var(--card-solid); color: var(--ink); box-shadow: 0 3px 8px rgba(0,0,0,0.12); }
.day-head h2 { font-size: 28px; font-weight: 700; }
.meal { border-radius: 24px; padding: 18px; }
.meal-top { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
.meal-name { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.recipe summary { color: var(--accent); font-weight: 500; }
.g-cat h3 { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }

/* ---------- guides ---------- */
.guide-card { border-radius: 24px; padding: 20px; }
.guide-card b { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.guide-card .guide-tag { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
.guide-soon { background: var(--card); border: 1px solid var(--glass-edge); border-radius: 22px; padding: 0 18px;
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: var(--glass-hi), var(--glass-shadow); }
.guide-soon li:first-child { border-top: 0; }
.crumbs a { font-weight: 500; }
.answer { border-left: 0; border-radius: 22px; padding: 18px 20px; }
.answer-kicker { text-transform: none; letter-spacing: 0; font-size: 13px; }
.cta-box { border-radius: 28px; padding: 24px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,0.28), transparent 50%), linear-gradient(140deg, #2f8cff 0%, #0a63e8 55%, #5e5ce6 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 18px 40px rgba(10, 99, 232, 0.28); border: 1px solid rgba(255,255,255,0.25); }
.cta-title { font-size: 26px !important; font-weight: 700; }
.fix-list li::before { content: ""; width: 18px; height: 18px; top: 3px; border-radius: 50%; background: var(--accent-soft);
  -webkit-mask: none; box-shadow: inset 0 0 0 1.5px var(--accent); }
.fix-list li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 5px; height: 8px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
mark.placeholder { border-radius: 6px; }

/* ---------- footer ---------- */
.site-foot { border-top: 0; }
.site-foot p { font-size: 12px; }

/* motion */
@media (prefers-reduced-motion: no-preference) {
  .view-in { animation: glassIn 380ms cubic-bezier(.2,.8,.2,1); }
  @keyframes glassIn { from { opacity: 0; transform: translateY(10px) scale(0.995); } to { opacity: 1; transform: none; } }
}

.btn.btn-quiet { background: var(--card); color: var(--ink); box-shadow: var(--glass-hi), var(--glass-shadow); border: 1px solid var(--glass-edge); }
.btn.btn-invert { background: rgba(255,255,255,0.94); color: #0a63e8; box-shadow: inset 0 1px 0 #fff, 0 6px 18px rgba(0,0,0,0.12); }
.btn.btn-ghost { background: rgba(255,255,255,0.85); color: #0a63e8; box-shadow: inset 0 1px 0 #fff; }
.mega-unit { margin-top: 16px; }

/* Menu dropdown: near-solid sheet over a dimmed, blurred page (nested blur doesn't work on iOS) */
:root { --menu-bg: rgba(255, 255, 255, 0.96); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --menu-bg: rgba(36, 36, 40, 0.97); } }
:root[data-theme="dark"] { --menu-bg: rgba(36, 36, 40, 0.97); }
.scrim { position: fixed; inset: 0; z-index: 9; background: rgba(12, 14, 24, 0.28);
  -webkit-backdrop-filter: blur(12px) saturate(120%); backdrop-filter: blur(12px) saturate(120%); }
@media (prefers-reduced-motion: no-preference) {
  .scrim:not([hidden]) { animation: scrimIn 200ms ease-out; }
  .site-nav.open { animation: menuIn 220ms cubic-bezier(.2,.8,.2,1); transform-origin: top right; }
  @keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
}
@media (max-width: 640px) {
  .site-nav { background: var(--menu-bg); -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: 0 0 0 0.5px rgba(0,0,0,0.06), 0 24px 60px rgba(0,0,0,0.22); padding: 8px; gap: 2px; }
  .site-nav a { color: var(--ink); font-weight: 500; }
  .site-nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
}

.macro .pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.custom-split { display: grid; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--fill); }
.cs-row { display: grid; grid-template-columns: 64px 1fr 74px; align-items: center; gap: 12px; }
.cs-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.cs-name::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.cs-num { display: flex; align-items: center; gap: 2px; font-size: 15px; color: var(--muted); }
.cs-num input[type="number"] { width: 54px; padding: 8px 8px; font-size: 16px; text-align: right; background: var(--card-solid); border-radius: 10px; font-family: var(--font-num); }
.cs-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px;
  background: linear-gradient(to right, var(--c) 0 var(--fill, 50%), rgba(120,120,128,0.24) var(--fill, 50%) 100%); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(120,120,128,0.24); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--c); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%;
  background: #fff; border: 0.5px solid rgba(0,0,0,0.06); box-shadow: 0 3px 8px rgba(0,0,0,0.18), 0 1px 1px rgba(0,0,0,0.12); }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 0.5px solid rgba(0,0,0,0.06); box-shadow: 0 3px 8px rgba(0,0,0,0.18); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft), 0 3px 8px rgba(0,0,0,0.18); }

.pace-block { display: grid; gap: 8px; }
.pace-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.pace { display: grid; gap: 6px; }
.pace.n4 { grid-template-columns: repeat(4, 1fr); }
.pace.n2 { grid-template-columns: repeat(2, 1fr); }
.pace label { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 4px; text-align: center; white-space: nowrap; }
.pace input:checked + label .dot { box-shadow: 0 0 0 2px rgba(255,255,255,0.9); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.dot.r-gentle { background: var(--protein); } .dot.r-sweet { background: var(--carbs); }
.dot.r-push { background: var(--fat); } .dot.r-fast { background: #ff3b30; }
.pace-note { margin: 0; display: flex; gap: 8px; align-items: baseline; font-size: 14px; line-height: 1.45; color: var(--muted); }
.pace-note .dot { transform: translateY(-1px); }
.pace-note b { color: var(--ink); font-weight: 600; }
.pace-note.r-fast b { color: #d70015; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================= v2: multi-page site ================= */

/* Menu is a floating sheet at every width (more pages than fit in a bar) */
.menu-btn { display: inline-flex; }
.site-nav { display: none; position: absolute; top: 72px; left: 12px; right: 12px; z-index: 11;
  flex-direction: column; gap: 2px; padding: 8px; border-radius: 20px;
  background: var(--menu-bg); -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 1px solid var(--glass-edge); box-shadow: 0 0 0 0.5px rgba(0,0,0,0.06), 0 24px 60px rgba(0,0,0,0.22);
  max-height: calc(100vh - 96px); overflow-y: auto; }
.site-nav.open { display: flex; }
.site-nav a { border-radius: 14px; border-bottom: 0; padding: 11px 14px; font-size: 17px; color: var(--ink); font-weight: 500; }
.site-nav a:hover { background: var(--fill); }
.site-nav a.on { box-shadow: none; padding-left: 14px; background: var(--accent-soft); color: var(--accent); font-weight: 600; border-radius: 14px; }
.nav-group { margin: 10px 14px 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.nav-group:first-child { margin-top: 4px; }
@media (min-width: 641px) { .site-nav { left: auto; right: max(12px, calc((100vw - 980px) / 2 + 12px)); width: 320px; } }

/* Footer */
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; }
.foot-links a { color: var(--muted); font-weight: 500; text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.url-note { margin-top: 12px !important; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--muted); }

/* Content under each calculator */
.explain-article { padding-top: 48px; padding-bottom: 32px; }
.explain-article > h2:first-of-type { margin-top: 28px; }
.byline-lite { font-size: 13px !important; color: var(--muted); margin: 0 0 14px !important; }
.article .lede { margin: 0 0 8px; }
.article ol.steps { font-size: 17px; line-height: 1.55; gap: 10px; margin: 6px 0 14px; padding-left: 22px; max-width: 65ch; }
.article ul.formula { margin: 0 0 12px; padding-left: 20px; font-size: 16px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.article .fix-list { margin: 4px 0 14px; }
.article .faq { margin: 8px 0 8px; }
.article .faq p { font-size: 16px; }
.article .faq a, .article p a { font-weight: 600; }
.more-link { margin: 10px 0 0 !important; }
.more-link a { text-decoration: none; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 6px 0 14px; border-radius: 16px; border: 1px solid var(--glass-edge); background: var(--card); }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
.data-table caption { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 12px 14px 0; }
.data-table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 12px 14px 8px; white-space: nowrap; }
.data-table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.data-table.num td:not(:first-child), .data-table.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .dot { margin-right: 6px; transform: translateY(-1px); }
.table-note { font-size: 14px !important; color: var(--muted); margin-top: -6px !important; }

/* Links to the other calculators */
.tool-links { display: grid; gap: 10px; margin: 6px 0 12px; }
.tool-links a { display: grid; gap: 2px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--glass-edge);
  border-radius: 16px; padding: 14px 16px; box-shadow: var(--glass-hi, none); }
.tool-links a:hover { border-color: var(--accent); }
.tool-links b { font-size: 17px; }
.tool-links b::after { content: " →"; color: var(--accent); }
.tool-links span { font-size: 14px; color: var(--muted); }
@media (min-width: 560px) { .tool-links { grid-template-columns: 1fr 1fr; } }

.disclaimer-note { margin: 28px 0 0 !important; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--glass-edge);
  font-size: 14px !important; line-height: 1.5 !important; color: var(--muted); }
.disclaimer-note b { color: var(--ink); }

.soon-pill { justify-self: start; display: inline-block; margin-top: 2px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.18); color: inherit; font-weight: 600; font-size: 14px; letter-spacing: 0.01em; cursor: default; user-select: none; }

/* Content pages */
.page .article { padding-top: 12px; }
.page .article-title { margin-top: 12px; }
.draft-note { margin: 16px 0 0 !important; padding: 10px 14px; border-radius: 12px; background: #fff3c4; color: #6b5200; font-size: 14px !important; font-weight: 600; }
.page .hero { padding-top: 24px; }
