/* Fitz Fitness — Nutrition Made Simple. Layout: dark brand header + page hero, then a single readable column (max ~1100px) of sections. */
:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --ink: #101713;
  --muted: #56675e;
  --line: #dbe4df;
  --brand: #0c110e;
  --on-brand: #eef7f2;
  --on-brand-muted: #a9bbb1;
  --mint: #7fdcae;
  --accent: #127a4b;
  --accent-soft: #e2f3ea;
  --good: #127a4b;   --good-soft: #e2f3ea;
  --ok: #8a5a00;     --ok-soft: #fbf0d9;
  --occ: #a1361f;    --occ-soft: #fbe5df;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d120f; --surface: #151c18; --ink: #e8f0ec; --muted: #9aaba2; --line: #26312b;
    --brand: #070a08; --accent: #7fdcae; --accent-soft: #183326;
    --good: #7fdcae; --good-soft: #183326; --ok: #f0c46a; --ok-soft: #352a12; --occ: #f19a85; --occ-soft: #3a1d16;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d120f; --surface: #151c18; --ink: #e8f0ec; --muted: #9aaba2; --line: #26312b;
  --brand: #070a08; --accent: #7fdcae; --accent-soft: #183326;
  --good: #7fdcae; --good-soft: #183326; --ok: #f0c46a; --ok-soft: #352a12; --occ: #f19a85; --occ-soft: #3a1d16;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); }
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; line-height: 1.05; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding-inline: 16px; }
.narrow { max-width: 760px; }

/* Site bar */
.sitebar { background: var(--brand); color: var(--on-brand); border-bottom: 1px solid #1d2822; }
.sitebar .wrap { display: flex; align-items: center; gap: 16px; padding-block: 10px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--on-brand); text-decoration: none; font: 800 15px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.logo img { width: 36px; height: 36px; border-radius: 7px; object-fit: cover; }
.logo span em { font-style: normal; color: var(--mint); }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-left: auto; }
.nav a { color: var(--on-brand-muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--on-brand); background: #18211c; }
.nav a[aria-current="page"] { color: var(--brand); background: var(--mint); }
@media (max-width: 860px) {
  .nav { margin-left: 0; width: 100%; gap: 4px; }
  .nav a { background: #141b17; padding: 6px 10px; font-size: 13.5px; }
}

/* Page hero */
.ph { background: var(--brand); color: var(--on-brand); }
.ph .wrap { padding-block: 36px 44px; display: grid; gap: 14px; }
.eyebrow { font: 700 13px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--mint); }
.ph h1 { overflow-wrap: break-word; font-size: clamp(34px, 9vw, 78px); font-weight: 900; font-stretch: 118%; text-transform: uppercase; line-height: .92; }
.ph h1 em { font-style: normal; color: var(--mint); }
.ph .lede { font-size: 19px; color: #cfdcd5; max-width: 60ch; }

/* Sections */
main { padding-block: 8px 64px; }
.sec { padding-top: 44px; display: grid; gap: 16px; }
.sec > h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 900; font-stretch: 112%; text-transform: uppercase; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.sec > p, .prose p { max-width: 68ch; }
.prose { display: grid; gap: 12px; }
.big-quote { font: 800 clamp(24px, 3.4vw, 34px)/1.15 var(--display); font-stretch: 105%; max-width: 26ch; }
.big-quote em { font-style: normal; color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card h3 { font-size: 20px; font-weight: 800; font-stretch: 105%; text-transform: uppercase; }
.card ul, .card ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.num { font: 900 15px/1 var(--display); color: var(--accent); letter-spacing: .08em; }

.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 6px; }
.callout b.t { font: 800 13px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.callout.warn { background: var(--ok-soft); }
.callout.warn b.t { color: var(--ok); }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; }
.ticks li::before { content: ""; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 5px var(--accent); }

ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; }
ol.steps > li { counter-increment: s; display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 12px; }
ol.steps > li::before { content: counter(s); font: 800 15px/32px var(--display); width: 32px; height: 32px; text-align: center; border-radius: 50%; background: var(--ink); color: var(--bg); }
ol.steps b { display: block; }

/* Tables */
.tblw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 700 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
tr:last-child td { border-bottom: 0; }

/* Rating pills */
.pill { display: inline-block; font: 700 11px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.occ { background: var(--occ-soft); color: var(--occ); }

/* Food option lists (eating out) */
.opts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.opt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.opt > header { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.opt.good > header { background: var(--good-soft); } .opt.ok > header { background: var(--ok-soft); } .opt.occ > header { background: var(--occ-soft); }
.opt > header h3 { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.opt.good h3 { color: var(--good); } .opt.ok h3 { color: var(--ok); } .opt.occ h3 { color: var(--occ); }
.opt ul { list-style: none; margin: 0; padding: 4px 16px 10px; }
.opt li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.opt li:last-child { border-bottom: 0; }
.opt li span:last-child { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 15px; font: 600 14px var(--body); color: var(--ink); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.panel { display: grid; gap: 16px; }

/* Accordions */
details.qa { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.qa summary { cursor: pointer; padding: 15px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; font: 800 20px/1 var(--display); color: var(--accent); }
details.qa[open] summary::after { content: "–"; }
details.qa .a { padding: 0 18px 16px; display: grid; gap: 10px; max-width: 72ch; }
details.qa ul { margin: 0; padding-left: 20px; }

/* Calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calc form { padding: 20px; display: grid; gap: 14px; align-content: start; border-right: 1px solid var(--line); }
.calc label, .calc legend { font-weight: 700; font-size: 14px; display: block; margin-bottom: 6px; }
.calc fieldset { border: 0; padding: 0; margin: 0; }
.seg { display: flex; gap: 6px; }
.seg label { margin: 0; flex: 1; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 9px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; cursor: pointer; }
.seg input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid var(--mint); }
.calc input[type="number"], .calc select { width: 100%; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.calc .out { padding: 20px; display: grid; gap: 12px; align-content: start; background: var(--bg); }
.res { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.res div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; }
.res div.hero { grid-column: 1 / -1; background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.res b { font: 900 28px/1.05 var(--display); font-variant-numeric: tabular-nums; }
.res div.hero b { font-size: 44px; color: var(--mint); }
.res small { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.res div.hero small { color: var(--on-brand-muted); }
@media (max-width: 760px) { .calc { grid-template-columns: minmax(0,1fr); } .calc form { border-right: 0; border-bottom: 1px solid var(--line); } }

/* Energy bar */
.ebar { display: flex; height: 54px; border-radius: 10px; overflow: hidden; font: 800 14px/1 var(--display); }
.ebar div { display: flex; align-items: center; padding-left: 10px; min-width: 0; white-space: nowrap; overflow: hidden; }
.ebar .bmr { flex: 70; background: #2c3a33; color: #eef7f2; }
.ebar .neat { flex: 15; background: var(--mint); color: #0c110e; }
.ebar .tef { flex: 10; background: #b9cfc3; color: #0c110e; }
.ebar .ex { flex: 5; background: #f0c46a; color: #0c110e; padding-left: 4px; }
.ekey { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; font-size: 15px; }
.ekey div { display: grid; grid-template-columns: 14px minmax(0,1fr); gap: 10px; }
.ekey i { width: 14px; height: 14px; border-radius: 4px; margin-top: 5px; }

/* Habits */
.habit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 16px; }
.habit .n { font: 900 40px/1 var(--display); color: var(--line); font-variant-numeric: tabular-nums; }
.habit h3 { font-size: 22px; font-weight: 800; text-transform: uppercase; font-stretch: 105%; }
.habit .body { display: grid; gap: 10px; min-width: 0; }
.habit .do { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.habit .do b { font: 800 12px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 2px; }
.habit .done { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; width: fit-content; }
.habit .done input { width: 20px; height: 20px; accent-color: var(--accent); }
.habit.current { border: 2px solid var(--accent); }
.habit.current .n { color: var(--accent); }
.habit.is-done .n { color: var(--accent); }
.habit .now { display: none; }
.habit.current .now { display: inline-block; }
.progress { display: grid; gap: 8px; }
.progress .track { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress .fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .3s; }

/* Hand portions */
.hands { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.hand { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 8px; align-content: start; }
.hand img.hp { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; background: var(--line); }
.hand h3 { font-size: 22px; font-weight: 900; text-transform: uppercase; }
.hand .what { font: 700 13px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.plate { display: grid; grid-template-columns: minmax(0, 300px) minmax(0,1fr); gap: 24px; align-items: center; }
.plate img.hp { width: 100%; border-radius: var(--radius); display: block; }
@media (max-width: 640px) { .plate { grid-template-columns: minmax(0,1fr); } }

/* Home tiles */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tile { display: grid; gap: 8px; align-content: start; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(0 0 0 / .08); }
.tile h3 { font-size: 22px; font-weight: 900; text-transform: uppercase; font-stretch: 108%; }
.tile p { color: var(--muted); font-size: 15px; }
.tile .go { font-weight: 700; color: var(--accent); font-size: 14px; margin-top: auto; }
.tile.photo { padding: 0; overflow: hidden; }
.tile.photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.tile.photo > div { padding: 16px 20px 20px; display: grid; gap: 8px; }
.path { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: p; }
.path a { counter-increment: p; display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 14px; align-items: start; text-decoration: none; color: var(--on-brand); background: #141b17; border: 1px solid #24302a; border-radius: var(--radius); padding: 18px; }
.path a::before { content: counter(p); font: 900 44px/1 var(--display); color: var(--mint); }
.path a b { font: 800 19px/1.15 var(--display); text-transform: uppercase; display: block; margin-bottom: 4px; }
.path a span { color: #b9c9c0; font-size: 15px; }
.path a:hover { border-color: var(--mint); }

.foot { background: var(--brand); color: var(--on-brand-muted); }
.foot .wrap { padding-block: 28px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 14px; }
.foot b { color: var(--on-brand); }
.next { display: flex; justify-content: flex-end; }
.next a { font-weight: 700; text-decoration: none; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) { .tile, .progress .fill { transition: none; } .tile:hover { transform: none; } }

[hidden] { display: none !important; }

/* Coaching levels */
.levels { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.lvl { display: grid; gap: 8px; align-content: start; text-decoration: none; color: var(--on-brand); background: var(--brand); border-radius: var(--radius); padding: 20px; border: 2px solid var(--brand); }
.lvl:hover { border-color: var(--mint); }
.lvl h3 { font-size: 26px; font-weight: 900; text-transform: uppercase; font-stretch: 110%; }
.lvl p { color: #b9c9c0; font-size: 15px; }
.lvl .go { color: var(--mint); font-weight: 700; font-size: 14px; }

/* Speedy meals gallery */
.subhead { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }
.speedy-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.speedy { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.speedy img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.speedy figcaption { padding: 10px 12px; font-size: 14px; }

/* Pyramid */
.pyramid { display: grid; gap: 6px; justify-items: center; }
.pyramid div { padding: 12px 10px; text-align: center; border-radius: 6px; font: 800 14px/1.2 var(--display); text-transform: uppercase; letter-spacing: .06em; max-width: 100%; }
.pyramid div small { display: block; font: 500 13px/1.3 var(--body); text-transform: none; letter-spacing: 0; margin-top: 3px; }
.pyramid .l5 { width: 40%; background: var(--line); color: var(--ink); }
.pyramid .l4 { width: 55%; background: var(--accent-soft); color: var(--ink); }
.pyramid .l3 { width: 70%; background: #b9cfc3; color: #0c110e; }
.pyramid .l2 { width: 85%; background: var(--mint); color: #0c110e; }
.pyramid .l1 { width: 100%; background: #2c3a33; color: #eef7f2; }
@media (max-width: 520px) { .pyramid .l5, .pyramid .l4 { width: 80%; } .pyramid .l3 { width: 90%; } }

/* Snack tiles */
.snack-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.snack { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.snack img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; display: block; padding: 6px; }
.snack figcaption { padding: 8px 10px 10px; display: grid; gap: 2px; font-size: 13px; line-height: 1.3; }
.snack figcaption b { font: 800 15px var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.snack figcaption em { font-style: normal; justify-self: start; font: 700 10px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; background: var(--good-soft); color: var(--good); padding: 4px 7px; border-radius: 999px; margin-top: 2px; }
.snack.pro { border-color: var(--accent); }

/* Review fixes */
@media (max-width: 520px) {
  .pyramid .l5 { width: 46%; } .pyramid .l4 { width: 60%; } .pyramid .l3 { width: 74%; } .pyramid .l2 { width: 88%; } .pyramid .l1 { width: 100%; }
  .pyramid div { font-size: 12px; padding: 9px 6px; }
  .pyramid div small { font-size: 11.5px; }
  .speedy-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .speedy figcaption { font-size: 12.5px; padding: 8px; }
  .snack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .snack figcaption { font-size: 11.5px; padding: 6px 7px 8px; }
  .snack figcaption b { font-size: 13px; }
  .ebar .neat span, .ebar .tef, .ebar .ex { font-size: 0; }
}
.template { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; }
