:root {
  --cream: #f4efe6;
  --paper: #fffaf1;
  --ink: #171713;
  --coral: #ff5a3c;
  --lime: #d6ff59;
  --line: rgba(23, 23, 19, 0.22);
  --font-display: Impact, "Arial Black", sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
}
button, input, select { font: inherit; }
a { color: inherit; }
.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.5vw;
  border-bottom: 1px solid var(--ink);
  position: relative;
  z-index: 2;
}
.brand {
  font-family: var(--font-display), sans-serif;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: -0.04em;
}
.brand span { color: var(--coral); }
nav { display: flex; gap: 2rem; }
nav a { font-size: .84rem; font-weight: 700; text-decoration: none; }
nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.header-cta, .primary-button {
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.header-cta { padding: .8rem 1rem; font-size: .76rem; }
.hero {
  min-height: 700px;
  padding: 90px 7vw 70px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 48%;
  background: var(--coral);
  clip-path: polygon(38% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow, .section-number {
  font-size: .76rem;
  letter-spacing: .12em;
  font-weight: 800;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: .6rem; }
.eyebrow span { width: 34px; height: 6px; background: var(--coral); display: inline-block; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  font-family: var(--font-display), sans-serif;
  text-transform: uppercase;
  font-size: clamp(4.4rem, 10vw, 9.2rem);
  line-height: .82;
  letter-spacing: -.075em;
  margin: 55px 0 35px;
  max-width: 1000px;
}
h1 em {
  font-style: normal;
  color: var(--cream);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 5px 5px 0 var(--ink);
}
.hero-copy { max-width: 550px; font-size: 1.15rem; line-height: 1.55; font-weight: 600; }
.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem 1.4rem;
  box-shadow: 6px 6px 0 var(--lime);
}
.microcopy { font-size: .72rem; margin: 16px 0 0 5px; font-weight: 700; }
.hero-stamp {
  position: absolute;
  right: 7vw;
  bottom: 75px;
  transform: rotate(-7deg);
  border: 5px solid var(--ink);
  border-radius: 50%;
  width: 155px;
  height: 155px;
  display: grid;
  place-content: center;
  text-align: center;
}
.hero-stamp strong { font: 4rem/.8 var(--font-display); }
.hero-stamp span { font-weight: 900; font-size: .8rem; letter-spacing: .15em; }
.calculator-section { padding: 90px 6vw 110px; }
.section-intro { display: grid; grid-template-columns: 170px minmax(300px, 1fr) minmax(240px, 420px); gap: 2rem; align-items: end; margin-bottom: 55px; }
.section-intro h2, .adjustments h2 {
  font: 3.5rem/.95 var(--font-display);
  letter-spacing: -.055em;
  text-transform: uppercase;
  margin: 0;
}
.section-intro > p:last-child { line-height: 1.55; margin: 0; }
.section-number { color: var(--coral); }
.calculator-shell {
  display: grid;
  grid-template-columns: minmax(330px, .88fr) minmax(440px, 1.12fr);
  max-width: 1180px;
  margin: auto;
  border: 2px solid var(--ink);
  box-shadow: 12px 12px 0 var(--ink);
}
.input-panel { background: var(--paper); padding: 28px; }
.panel-heading, .results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}
.unit-switch, .segmented { display: flex; }
.unit-switch { border: 1px solid var(--ink); }
.unit-switch button, .segmented button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}
.unit-switch button { font-size: .62rem; padding: .45rem .55rem; }
.unit-switch button.active, .segmented button.active { background: var(--ink); color: white; }
.field { display: block; border: 0; padding: 22px 0; margin: 0; border-bottom: 1px solid var(--line); }
.field > span, .field legend, .label-line, .field-heading { font-size: .78rem; font-weight: 800; margin-bottom: 10px; width: 100%; }
.field-heading { display: flex; justify-content: space-between; align-items: center; }
.field small, .override small { display: block; color: #69685f; font-size: .68rem; line-height: 1.4; margin-top: 8px; }
.number-input { display: flex; border: 1px solid var(--ink); background: white; align-items: center; flex: 1; }
.number-input input { width: 100%; border: 0; padding: .8rem; font-size: 1.15rem; font-weight: 800; background: transparent; }
.number-input b { padding: 0 .8rem; font-size: .68rem; }
.height-row { display: flex; gap: .7rem; }
.segmented { border: 1px solid var(--ink); }
.segmented button { flex: 1; padding: .75rem; }
.choice-stack { display: grid; gap: .55rem; }
.choice-stack label {
  display: flex; gap: .8rem; align-items: center; border: 1px solid var(--line); padding: .8rem; cursor: pointer;
}
.choice-stack label.selected { border-color: var(--ink); background: var(--lime); }
.choice-stack label span { display: flex; flex-direction: column; }
.choice-stack label small { margin: 2px 0 0; }
.label-line { display: flex; justify-content: space-between; }
.label-line b { color: var(--coral); }
.preference input[type="range"] { width: 100%; accent-color: var(--coral); }
.range-labels { display: flex; justify-content: space-between; font-size: .57rem; font-weight: 800; }
.results-panel { background: var(--ink); color: white; padding: 30px; }
.results-heading { border-color: #44443e; }
.results-heading b { background: var(--lime); color: var(--ink); padding: .4rem .6rem; }
.calorie-result { padding: 35px 0; position: relative; }
.calorie-result p, .macro-grid p, .bmi-card p, .weekly-target p { font-size: .65rem; letter-spacing: .12em; font-weight: 900; margin-bottom: 5px; }
.calorie-result strong { display: block; color: var(--lime); font: clamp(5rem, 10vw, 8rem)/.9 var(--font-display); letter-spacing: -.06em; }
.calorie-result > span { font-size: .7rem; font-weight: 800; }
.calorie-result small { position: absolute; right: 0; bottom: 40px; color: #aaa99f; }
.macro-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #55554e; }
.macro-grid article { padding: 22px 18px; border-right: 1px solid #55554e; }
.macro-grid article:last-child { border: 0; }
.macro-grid strong { font: 2.6rem/1 var(--font-display); }
.macro-grid strong span { color: var(--coral); font-size: 1.2rem; }
#protein-result, #fat-result, #carbs-result { color: white; font-size: inherit; }
.macro-grid small { display: block; color: #aaa99f; font-size: .64rem; margin-top: 7px; }
.warning { background: var(--coral); color: var(--ink); padding: .8rem; font-size: .75rem; font-weight: 700; margin: 15px 0 0; }
.bmi-card { display: grid; grid-template-columns: 120px 1fr; gap: 22px; padding: 25px 0; border-bottom: 1px solid #44443e; }
.bmi-card strong { font: 3.2rem var(--font-display); color: var(--coral); }
.bmi-card > div:last-child { border-left: 1px solid #55554e; padding-left: 22px; }
.bmi-card b { font-size: .9rem; }
.bmi-card div p:last-child { color: #aaa99f; font-size: .7rem; line-height: 1.5; margin-top: 7px; letter-spacing: 0; font-weight: 500; }
.override { display: block; padding: 22px 0; margin: 0; border: 0; border-bottom: 1px solid #44443e; font-size: .75rem; font-weight: 800; }
.override legend { padding: 0; }
.override small { color: #aaa99f; font-weight: 500; }
.protein-rule-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.protein-rule-options label { position: relative; display: block; min-width: 0; padding: 12px; border: 1px solid #55554e; background: #2b2b27; cursor: pointer; }
.protein-rule-options label:has(input:checked) { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.protein-rule-options label:has(input:focus-visible) { outline: 2px solid var(--coral); outline-offset: 2px; }
.protein-rule-options input { position: absolute; opacity: 0; pointer-events: none; }
.protein-rule-options span { display: block; }
.protein-rule-options b { display: block; font-size: .72rem; }
.protein-rule-options small { margin-top: 4px; font-size: .6rem; }
.protein-rule-options label:has(input:checked) small { color: #48483f; }
.weekly-target { background: var(--coral); color: var(--ink); padding: 22px; margin-top: 25px; }
.weekly-target strong { font: 2rem var(--font-display); display: block; }
.weekly-target span { font-size: .68rem; font-weight: 700; }
.formula-strip { background: var(--lime); border-block: 2px solid var(--ink); display: flex; justify-content: center; gap: 3vw; padding: 22px; font-weight: 900; letter-spacing: .08em; font-size: .85rem; }
.formula-strip i { font-style: normal; }
.playbook { background: var(--ink); color: white; padding: 100px 6vw; }
.section-intro.light h2 { color: var(--lime); }
.section-intro.light > p:last-child { color: #aaa99f; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #4c4c46; border-left: 1px solid #4c4c46; }
.principles article { min-height: 250px; padding: 28px; border-right: 1px solid #4c4c46; border-bottom: 1px solid #4c4c46; }
.principles span { color: var(--coral); font-weight: 900; font-size: .7rem; }
.principles h3 { font: 1.55rem/1.05 var(--font-display); text-transform: uppercase; margin: 45px 0 15px; }
.principles p { color: #aaa99f; font-size: .85rem; line-height: 1.55; }
.adjustments { padding: 100px 7vw; display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; }
.adjustment-steps article { display: grid; grid-template-columns: 55px 1fr; gap: 20px; padding: 25px 0; border-bottom: 1px solid var(--ink); }
.adjustment-steps article > b { font: 2.5rem var(--font-display); color: var(--coral); }
.adjustment-steps h3 { font-size: 1.05rem; margin-bottom: 8px; }
.adjustment-steps p { font-size: .85rem; line-height: 1.55; color: #5f5e57; }
.faq { padding: 100px 7vw; background: var(--paper); border-top: 2px solid var(--ink); }
.faq-list { max-width: 1000px; margin-left: auto; }
.faq-list details { border-top: 1px solid var(--ink); }
.faq-list details:last-child { border-bottom: 1px solid var(--ink); }
.faq-list summary { list-style: none; padding: 22px 0; display: flex; justify-content: space-between; font-weight: 800; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { color: var(--coral); font-size: 1.4rem; }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list details p { max-width: 720px; line-height: 1.6; color: #5f5e57; padding-bottom: 20px; }
.source-note { padding: 50px 7vw; display: grid; grid-template-columns: 1fr 1fr; gap: 5vw; font-size: .73rem; line-height: 1.6; border-top: 1px solid var(--ink); }
.source-note a { font-weight: 800; text-underline-offset: 3px; }
footer { background: var(--coral); padding: 38px 5vw; display: flex; justify-content: space-between; align-items: center; font-size: .78rem; font-weight: 800; }

@media (max-width: 900px) {
  nav { display: none; }
  .hero { min-height: 620px; padding-top: 70px; }
  .hero::before { inset: 52% 0 0 0; clip-path: polygon(0 25%, 100% 0, 100% 100%, 0 100%); }
  h1 { font-size: clamp(4rem, 17vw, 7rem); }
  .hero-stamp { width: 110px; height: 110px; bottom: 40px; }
  .hero-stamp strong { font-size: 2.8rem; }
  .section-intro { grid-template-columns: 1fr; }
  .section-intro h2 { font-size: 2.8rem; }
  .calculator-shell { grid-template-columns: 1fr; }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .adjustments { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .site-header { padding: 0 20px; height: 66px; }
  .header-cta { font-size: .6rem; padding: .65rem; }
  .hero { padding: 60px 20px 50px; min-height: 650px; }
  h1 { margin-top: 45px; }
  h1 em { text-shadow: 3px 3px 0 var(--ink); -webkit-text-stroke-width: 1px; }
  .hero-copy { font-size: .95rem; }
  .hero-stamp { right: 25px; }
  .calculator-section, .playbook, .faq { padding: 70px 18px; }
  .calculator-shell { box-shadow: 7px 7px 0 var(--ink); }
  .input-panel, .results-panel { padding: 20px; }
  .calorie-result strong { font-size: 5rem; }
  .macro-grid strong { font-size: 1.75rem; }
  .macro-grid article { padding: 16px 10px; }
  .bmi-card { grid-template-columns: 90px 1fr; }
  .protein-rule-options { grid-template-columns: 1fr; }
  .formula-strip { overflow: hidden; justify-content: flex-start; white-space: nowrap; font-size: .65rem; }
  .principles { grid-template-columns: 1fr; }
  .adjustments { padding: 70px 20px; }
  .source-note { grid-template-columns: 1fr; padding: 35px 20px; }
  footer { flex-direction: column; gap: 14px; text-align: center; }
}
