:root {
    --ink: #151a35;
    --ink-soft: #5d647c;
    --emerald: #595bdb;
    --emerald-dark: #3f43b9;
    --emerald-soft: #eef0ff;
    --mint: #dfe4ff;
    --surface: #ffffff;
    --surface-soft: #f6f7fb;
    --surface-tint: #f1f2ff;
    --line: #e2e5ef;
    --shadow-sm: 0 8px 30px rgba(31, 37, 84, .08);
    --shadow-lg: 0 28px 70px rgba(31, 37, 84, .16);
    --radius: 22px;
    --display: "Manrope", sans-serif;
    --body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--surface); font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
svg { display: block; width: 1.25rem; height: 1.25rem; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { max-width: 800px; }
.skip-link { position: fixed; z-index: 999; top: 8px; left: 8px; padding: 10px 14px; color: white; background: var(--emerald-dark); border-radius: 10px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 50; top: 0; background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(223,233,229,.85); backdrop-filter: blur(18px); }
.nav-shell { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.6px; }
.brand-wordmark > span { color: var(--emerald); }
.brand-symbol { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; border-radius: 13px; background: linear-gradient(145deg, #7476ff, #4054d8); box-shadow: 0 10px 22px rgba(71, 78, 210, .28); }
.brand-symbol svg { width: 25px; height: 25px; overflow: visible; }
.brand-symbol path { stroke: currentColor; stroke-width: 2.35; stroke-linecap: round; stroke-linejoin: round; }
.brand-symbol circle { fill: #7de8f2; }
.primary-nav { display: flex; align-items: center; gap: 27px; color: #41534c; font-size: 15px; font-weight: 600; }
.primary-nav > a:not(.button) { position: relative; padding: 27px 0 24px; }
.primary-nav > a:not(.button)::after { position: absolute; right: 0; bottom: 17px; left: 0; height: 2px; content: ""; background: var(--emerald); border-radius: 2px; transform: scaleX(0); transition: transform .18s ease; }
.primary-nav > a:not(.button):hover, .primary-nav > a.active { color: var(--emerald-dark); }
.primary-nav > a.active::after, .primary-nav > a:not(.button):hover::after { transform: scaleX(1); }
.menu-toggle { width: 44px; height: 44px; display: none; place-items: center; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.menu-close-icon { display: none; }
.menu-toggle[aria-expanded="true"] .menu-open-icon { display: none; }
.menu-toggle[aria-expanded="true"] .menu-close-icon { display: block; }

.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 21px; color: #fff; border: 1px solid var(--emerald); border-radius: 13px; background: var(--emerald); box-shadow: 0 12px 24px rgba(14,159,110,.19); font-weight: 700; transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.button:hover { background: var(--emerald-dark); border-color: var(--emerald-dark); transform: translateY(-2px); box-shadow: 0 15px 30px rgba(14,159,110,.24); }
.button svg { width: 18px; height: 18px; transition: transform .18s ease; }
.button:hover svg { transform: translateX(3px); }
.button-small { min-height: 44px; padding-inline: 17px; border-radius: 12px; font-size: 14px; }
.button-secondary { color: var(--ink); border-color: var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.button-secondary:hover { color: var(--emerald-dark); border-color: #a8dec9; background: var(--emerald-soft); }

.hero { min-height: 680px; position: relative; overflow: hidden; display: flex; align-items: center; background: linear-gradient(125deg, #fff 0%, #fff 46%, #f0faf6 100%); }
.hero-pattern { position: absolute; inset: 0; opacity: .42; background-image: radial-gradient(#afd9c8 1px, transparent 1px); background-size: 25px 25px; mask-image: linear-gradient(90deg, transparent 5%, transparent 35%, #000 100%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 76px; padding-block: 82px 88px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; color: var(--emerald-dark); border: 1px solid #c8ebdd; border-radius: 999px; background: rgba(233,250,243,.85); font-size: 13px; font-weight: 700; }
.eyebrow > span { width: 27px; height: 27px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--emerald); }
.eyebrow svg { width: 15px; height: 15px; }
.hero h1 { max-width: 690px; margin: 24px 0 20px; font-family: var(--display); font-size: clamp(48px, 5.7vw, 74px); line-height: 1.06; letter-spacing: -3.4px; }
.hero h1 span { color: var(--emerald); }
.hero-copy > p { max-width: 620px; margin: 0; color: var(--ink-soft); font-size: 19px; line-height: 1.7; }
.hero-actions { margin-top: 31px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-notes { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 20px; color: #60716a; font-size: 14px; font-weight: 500; }
.hero-notes span { display: inline-flex; align-items: center; gap: 7px; }
.hero-notes svg { width: 17px; height: 17px; color: var(--emerald); stroke-width: 2.5; }

.hero-visual { min-height: 510px; position: relative; display: grid; place-items: center; }
.hero-visual::before { width: 410px; height: 410px; position: absolute; content: ""; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #e0faef, #b7ecd7 66%, #a4e1ca); box-shadow: inset 0 0 0 1px rgba(14,159,110,.08); }
.visual-orbit { position: absolute; border: 1px solid rgba(14,159,110,.18); border-radius: 50%; }
.orbit-one { width: 485px; height: 485px; }
.orbit-two { width: 550px; height: 550px; border-style: dashed; }
.metric-panel { width: min(420px, 90%); position: relative; z-index: 2; padding: 22px; border: 1px solid rgba(255,255,255,.9); border-radius: 26px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-lg); backdrop-filter: blur(15px); transform: rotate(-1.5deg); }
.metric-panel-head { display: flex; align-items: center; justify-content: space-between; }
.metric-panel-head > div { display: grid; }
.metric-panel-head span { color: #819089; font-size: 12px; }
.metric-panel-head strong { margin-top: 2px; font-family: var(--display); font-size: 17px; }
.panel-icon { width: 41px; height: 41px; display: grid; place-items: center; color: var(--emerald); border-radius: 12px; background: var(--emerald-soft); }
.energy-card { margin-top: 18px; display: grid; grid-template-columns: 128px 1fr; align-items: center; gap: 18px; padding: 17px; border-radius: 19px; background: #f5faf8; }
.energy-ring { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--emerald) 0 76%, #d7ebe3 76% 100%); }
.energy-ring::before { width: 88px; height: 88px; position: absolute; content: ""; border-radius: 50%; background: #fff; }
.energy-ring > div { position: relative; z-index: 1; display: grid; text-align: center; }
.energy-ring strong { font-family: var(--display); font-size: 20px; letter-spacing: -.5px; }
.energy-ring span { color: #7a8983; font-size: 10px; }
.energy-copy { display: grid; }
.energy-copy > span { color: #87958f; font-size: 11px; }
.energy-copy strong { margin: 3px 0 9px; font-size: 15px; }
.energy-copy small { width: max-content; padding: 4px 8px; color: var(--emerald-dark); border-radius: 7px; background: var(--emerald-soft); font-weight: 700; }
.mini-metrics { margin-top: 13px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.mini-metrics > div { min-width: 0; padding: 12px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 8px; border: 1px solid #e8efec; border-radius: 14px; }
.mini-icon { width: 31px; height: 31px; grid-row: 1 / 3; display: grid; place-items: center; border-radius: 9px; }
.mini-icon svg { width: 16px; height: 16px; }
.mini-icon.blue { color: #2772d7; background: #e9f2ff; }
.mini-icon.amber { color: #e38513; background: #fff4dc; }
.mini-icon.violet { color: #7651ce; background: #f1edff; }
.mini-metrics small { color: #87958f; font-size: 10px; }
.mini-metrics strong { font-size: 13px; white-space: nowrap; }
.floating-chip { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid #e1ece7; border-radius: 14px; background: rgba(255,255,255,.95); box-shadow: var(--shadow-sm); font-size: 11px; }
.floating-chip > svg { width: 29px; height: 29px; padding: 6px; color: #fff; border-radius: 9px; background: var(--emerald); }
.floating-chip span { display: grid; color: #86938e; }
.floating-chip strong { color: var(--ink); font-size: 12px; }
.chip-top { top: 78px; right: -8px; }
.chip-bottom { bottom: 75px; left: -13px; }

.section { padding: 100px 0; }
.popular-section { background: var(--surface-soft); }
.section-intro { margin-bottom: 40px; }
.split-intro { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.section-kicker { color: var(--emerald-dark); font-size: 13px; font-weight: 800; letter-spacing: 1.15px; text-transform: uppercase; }
.section-intro h2 { margin: 7px 0 0; font-family: var(--display); font-size: clamp(34px, 4vw, 48px); line-height: 1.15; letter-spacing: -1.8px; }
.section-intro p { max-width: 480px; margin: 0; color: var(--ink-soft); font-size: 16px; }
.calculator-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.four-calculator-grid { grid-template-columns: repeat(4, 1fr); }
.calculator-card { min-height: 266px; padding: 27px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 20px rgba(22,58,46,.035); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.calculator-card:hover { border-color: #b9dfd0; box-shadow: var(--shadow-sm); transform: translateY(-4px); }
.card-icon { width: 49px; height: 49px; display: grid; place-items: center; color: var(--emerald-dark); border-radius: 15px; background: var(--emerald-soft); }
.card-icon svg { width: 24px; height: 24px; }
.calculator-card h3 { margin: 20px 0 8px; font-family: var(--display); font-size: 19px; letter-spacing: -.4px; }
.calculator-card p { margin: 0 0 22px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.calculator-card > a { margin-top: auto; display: inline-flex; align-items: center; gap: 7px; color: var(--emerald-dark); font-size: 14px; font-weight: 800; }
.calculator-card > a svg { width: 16px; height: 16px; transition: transform .18s ease; }
.calculator-card > a:hover svg { transform: translateX(4px); }
.calculator-library-hero { padding: 86px 0 82px; color: #fff; background: radial-gradient(circle at 82% 18%, rgba(102,224,176,.18), transparent 30%), #0e3126; text-align: center; }
.calculator-library-hero h1 { margin: 10px 0 14px; font-family: var(--display); font-size: clamp(42px, 5vw, 62px); line-height: 1.1; letter-spacing: -2.5px; }
.calculator-library-hero p { max-width: 680px; margin: 0 auto; color: #b6cac2; font-size: 17px; }
.calculator-library-hero .section-kicker { color: #6ee1b4; }
.calculator-library-section { background: var(--surface-soft); }
.library-card h2 { margin: 20px 0 8px; font-family: var(--display); font-size: 19px; letter-spacing: -.4px; }
.library-note { max-width: 760px; margin: 32px auto 0; padding: 18px 20px; display: flex; align-items: flex-start; gap: 12px; color: var(--ink-soft); border: 1px solid #cbded7; border-radius: 14px; background: #fff; font-size: 13px; }
.library-note svg { flex: 0 0 auto; margin-top: 2px; color: var(--emerald-dark); }
.library-note p { margin: 0; }

.more-tools-section { background: var(--surface); }
.center-intro { max-width: 680px; margin-right: auto; margin-left: auto; text-align: center; }
.center-intro p { margin: 13px auto 0; color: var(--ink-soft); }
.tool-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 13px; }
.tool-card { min-height: 174px; padding: 20px 18px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.tool-card:hover { border-color: #a8ddc8; background: var(--surface-tint); transform: translateY(-3px); }
.tool-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--emerald-dark); border-radius: 12px; background: var(--emerald-soft); }
.tool-icon svg { width: 20px; height: 20px; }
.tool-card strong { margin-top: 16px; font-family: var(--display); font-size: 15px; line-height: 1.4; }
.tool-arrow { margin-top: auto; align-self: flex-end; color: #7d8d87; }
.tool-arrow svg { width: 17px; height: 17px; transition: transform .18s ease; }
.tool-card:hover .tool-arrow { color: var(--emerald-dark); }
.tool-card:hover .tool-arrow svg { transform: translateX(4px); }

.trust-section { position: relative; overflow: hidden; color: #fff; background: #0e3126; }
.trust-section::before { width: 520px; height: 520px; position: absolute; top: -350px; left: -150px; content: ""; border: 1px solid rgba(90,224,170,.13); border-radius: 50%; box-shadow: 0 0 0 80px rgba(90,224,170,.035), 0 0 0 160px rgba(90,224,170,.025); }
.trust-section .container { position: relative; }
.light-intro .section-kicker { color: #6ee1b4; }
.light-intro p { color: #a9c0b7; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust-card { padding: 31px; border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); background: rgba(255,255,255,.055); }
.trust-icon { width: 51px; height: 51px; display: grid; place-items: center; color: #69dfb0; border: 1px solid rgba(105,223,176,.25); border-radius: 15px; background: rgba(105,223,176,.1); }
.trust-icon svg { width: 24px; height: 24px; }
.trust-card h3 { margin: 22px 0 7px; font-family: var(--display); font-size: 21px; }
.trust-card p { margin: 0; color: #a9c0b7; }

.steps-section { background: #fff; }
.steps-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; }
.steps-grid::before { position: absolute; top: 57px; right: 17%; left: 17%; height: 1px; content: ""; border-top: 1px dashed #bcdccc; }
.step-card { position: relative; z-index: 1; padding: 0 22px; text-align: center; }
.step-number { position: absolute; top: 0; right: 14%; color: #a8b7b1; font-family: var(--display); font-size: 12px; font-weight: 800; letter-spacing: .8px; }
.step-icon { width: 74px; height: 74px; margin: 20px auto 22px; display: grid; place-items: center; color: var(--emerald-dark); border: 9px solid #fff; border-radius: 50%; background: var(--emerald-soft); box-shadow: 0 0 0 1px #d3e9df; }
.step-icon svg { width: 27px; height: 27px; }
.step-card h3 { margin: 0 0 8px; font-family: var(--display); font-size: 19px; }
.step-card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.articles-section { background: var(--surface-soft); }
.articles-intro { align-items: center; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--emerald-dark); font-size: 15px; font-weight: 800; white-space: nowrap; }
.text-link svg { width: 17px; height: 17px; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; }
.article-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 6px 20px rgba(22,58,46,.035); transition: transform .18s ease, box-shadow .18s ease; }
.article-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-4px); }
.article-visual { height: 132px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--emerald-dark); background: #ddf6eb; }
.article-visual::before, .article-visual::after { position: absolute; content: ""; border: 1px solid currentColor; border-radius: 50%; opacity: .14; }
.article-visual::before { width: 180px; height: 180px; top: -82px; right: -30px; }
.article-visual::after { width: 110px; height: 110px; bottom: -70px; left: -5px; }
.article-visual.blue { color: #246cc6; background: #e4f0ff; }
.article-visual.amber { color: #ba690c; background: #fff0d8; }
.article-visual.violet { color: #6841bd; background: #eee8ff; }
.article-visual.rose { color: #b94663; background: #ffe8ed; }
.article-visual.teal { color: #087d7a; background: #dcf5f3; }
.article-symbol { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; background: rgba(255,255,255,.72); box-shadow: 0 8px 20px rgba(22,58,46,.08); }
.article-symbol svg { width: 25px; height: 25px; }
.article-visual > span { position: absolute; right: 17px; bottom: 10px; font-family: var(--display); font-size: 40px; font-weight: 800; opacity: .1; }
.article-content { padding: 22px; }
.article-meta { display: flex; justify-content: space-between; gap: 12px; color: #819089; font-size: 12px; }
.article-meta span:first-child { color: var(--emerald-dark); font-weight: 800; text-transform: uppercase; }
.article-content h3 { min-height: 52px; margin: 11px 0 9px; font-family: var(--display); font-size: 18px; line-height: 1.45; letter-spacing: -.3px; }
.article-content p { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.article-content > a { display: inline-flex; align-items: center; gap: 7px; color: var(--emerald-dark); font-size: 14px; font-weight: 800; }
.article-content > a svg { width: 15px; height: 15px; }

.disclaimer-section { padding: 34px 0 82px; background: var(--surface-soft); }
.disclaimer-card { padding: 25px 27px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 19px; border: 1px solid #cbded7; border-radius: 18px; background: #fff; }
.disclaimer-icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--emerald-dark); border-radius: 14px; background: var(--emerald-soft); }
.disclaimer-card h2 { margin: 0 0 3px; font-family: var(--display); font-size: 16px; }
.disclaimer-card p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.disclaimer-card > a { display: inline-flex; align-items: center; gap: 7px; color: var(--emerald-dark); font-size: 13px; font-weight: 800; white-space: nowrap; }
.disclaimer-card > a svg { width: 15px; height: 15px; }

.page-hero { min-height: 590px; display: flex; align-items: center; padding: 92px 0 110px; background: radial-gradient(circle at 80% 20%, #def8ed, transparent 34%), linear-gradient(135deg, #fff, #f5faf8); }
.page-hero h1 { margin: 12px 0 16px; font-family: var(--display); font-size: clamp(44px, 6vw, 68px); line-height: 1.08; letter-spacing: -2.7px; }
.page-hero > .container > p { max-width: 670px; margin: 0; color: var(--ink-soft); font-size: 19px; }
.status-note { max-width: 650px; margin: 29px 0 25px; padding: 16px 18px; display: flex; align-items: flex-start; gap: 12px; color: #52655d; border: 1px solid #cce8dc; border-radius: 14px; background: var(--emerald-soft); font-size: 14px; }
.status-note svg { flex: 0 0 auto; margin-top: 2px; color: var(--emerald-dark); }

.tdee-page, .bmi-page, .body-fat-page, .meal-calorie-page { background: var(--surface-soft); }
.calculator-page-hero { padding: 56px 0 160px; color: #fff; background: radial-gradient(circle at 82% 18%, rgba(102,224,176,.18), transparent 28%), #0e3126; }
.calculator-heading { text-align: center; }
.breadcrumbs { margin-bottom: 33px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; color: #9cb7ad; font-size: 13px; }
.breadcrumbs a:hover { color: #fff; }
.calculator-page-hero .section-kicker { color: #6ee1b4; }
.calculator-page-hero h1 { margin: 9px 0 12px; font-family: var(--display); font-size: clamp(42px, 5vw, 62px); line-height: 1.1; letter-spacing: -2.5px; }
.calculator-page-hero p { max-width: 750px; margin: 0 auto; color: #b6cac2; font-size: 18px; line-height: 1.7; }
.calculator-workspace { margin-top: -104px; padding-bottom: 90px; position: relative; }
.calculator-layout { max-width: 900px; }
.tdee-form-card, .tdee-result-card { border: 1px solid var(--line); border-radius: 25px; background: #fff; box-shadow: var(--shadow-lg); }
.tdee-form-card { padding: 34px; }
.calculator-card-heading { margin-bottom: 30px; padding-bottom: 25px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.calculator-card-heading .card-icon { flex: 0 0 auto; }
.calculator-card-heading h2 { margin: 0 0 3px; font-family: var(--display); font-size: 23px; letter-spacing: -.7px; }
.calculator-card-heading p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
.form-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-group-full { grid-column: 1 / -1; }
.field-label-row { min-height: 31px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.field-label { display: block; margin: 0 0 8px; color: var(--ink); font-size: 14px; font-weight: 800; }
legend.field-label { padding: 0; }
.field-label-row .field-label { margin: 0; }
.gender-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice-card { position: relative; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card span { min-height: 52px; display: flex; align-items: center; justify-content: center; color: #52635c; border: 1px solid var(--line); border-radius: 13px; background: #fff; font-weight: 700; transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease; }
.choice-card input:checked + span { color: var(--emerald-dark); border-color: #8bd3b7; background: var(--emerald-soft); box-shadow: inset 0 0 0 1px #8bd3b7; }
.choice-card input:focus-visible + span { outline: 3px solid rgba(14,159,110,.2); outline-offset: 2px; }
.unit-switch { padding: 3px; display: inline-grid; grid-auto-flow: column; gap: 2px; border-radius: 9px; background: #edf3f0; }
.unit-switch button { min-width: 42px; height: 27px; padding: 0 8px; color: #697a73; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; }
.unit-switch button.active { color: var(--emerald-dark); background: #fff; box-shadow: 0 2px 7px rgba(22,58,46,.1); }
.input-shell, .select-shell { min-height: 52px; display: flex; align-items: center; border: 1px solid #cedbd6; border-radius: 13px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.input-shell:focus-within, .select-shell:focus-within { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(14,159,110,.12); }
.input-shell input, .select-shell select { width: 100%; min-width: 0; height: 50px; padding: 0 14px; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 16px; }
.input-shell input::placeholder { color: #9ba8a3; }
.input-suffix { padding: 0 14px; color: #73827c; border-left: 1px solid var(--line); font-size: 13px; font-weight: 700; white-space: nowrap; }
.select-shell { position: relative; }
.select-shell::after { position: absolute; right: 15px; content: "⌄"; color: var(--emerald-dark); font-size: 18px; pointer-events: none; }
.select-shell select { padding-right: 42px; appearance: none; cursor: pointer; }
.height-imperial { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
[hidden] { display: none !important; }
.field-hint, .field-error { display: block; margin-top: 6px; font-size: 12px; line-height: 1.45; }
.field-hint { color: #819089; }
.field-error { display: none; color: #b42318; font-weight: 600; }
.form-group.has-error .field-error { display: block; }
.form-group.has-error .field-hint { display: none; }
.form-group.has-error .input-shell, .form-group.has-error .select-shell, .form-group.has-error .choice-card span { border-color: #e59a93; }
.calculate-button { width: 100%; margin-top: 30px; min-height: 56px; border-radius: 14px; font-size: 16px; }
.tdee-result-card { margin-top: 22px; overflow: hidden; outline: 0; }
.tdee-result-card:focus-visible { box-shadow: var(--shadow-lg), 0 0 0 3px rgba(14,159,110,.18); }
.result-main { padding: 36px 30px; color: #fff; background: linear-gradient(135deg, #0e8f65, #087654); text-align: center; }
.result-icon { width: 48px; height: 48px; margin: 0 auto 13px; display: grid; place-items: center; color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 14px; background: rgba(255,255,255,.12); }
.result-main > p { margin: 0 0 4px; color: #c8f3e2; font-size: 14px; font-weight: 700; }
.result-main > strong { display: block; font-family: var(--display); font-size: clamp(36px, 6vw, 53px); line-height: 1.15; letter-spacing: -2px; }
.result-main > strong small { font-family: var(--body); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.bmr-result { max-width: 390px; margin: 21px auto 0; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,.2); color: #c8f3e2; font-size: 13px; }
.bmr-result strong { color: #fff; font-size: 14px; }
.goal-section { padding: 30px; }
.goal-section h2 { margin: 0 0 17px; font-family: var(--display); font-size: 21px; text-align: center; }
.goal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.goal-card { padding: 17px 13px; display: grid; text-align: center; border: 1px solid var(--line); border-radius: 14px; background: #f8faf9; }
.goal-card span { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.goal-card strong { margin: 4px 0 0; font-family: var(--display); font-size: 24px; }
.goal-card small { color: #83918c; font-size: 10px; }
.goal-card.loss strong { color: #2772d7; }
.goal-card.maintain { border-color: #9bd9c1; background: var(--emerald-soft); }
.goal-card.maintain strong { color: var(--emerald-dark); }
.goal-card.gain strong { color: #a8660d; }
.result-note { margin: 18px 0 0; display: flex; align-items: flex-start; justify-content: center; gap: 7px; color: #73827c; font-size: 12px; text-align: center; }
.result-note svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; color: var(--emerald-dark); }

.bmi-category-label { width: max-content; margin: 15px auto 0; padding: 6px 11px; display: block; color: #087654; border-radius: 9px; background: #d5f7e9; font-size: 13px; font-weight: 800; }
.bmi-result-details { padding: 30px; }
.bmi-result-details h2 { margin: 0 0 17px; font-family: var(--display); font-size: 21px; text-align: center; }
.bmi-category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.bmi-category-grid article { min-width: 0; padding: 15px 10px; display: grid; gap: 3px; color: #6f7e78; border: 1px solid var(--line); border-radius: 13px; background: #f8faf9; text-align: center; }
.bmi-category-grid span { font-size: 12px; font-weight: 800; }
.bmi-category-grid strong { font-size: 11px; font-weight: 600; }
.bmi-category-grid article.is-current { color: var(--emerald-dark); border-color: #7dceb0; background: var(--emerald-soft); box-shadow: inset 0 0 0 1px #7dceb0; }
.bmi-category-grid article.is-current::before { content: "Your category"; color: var(--emerald-dark); font-size: 9px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.healthy-range { margin-top: 17px; padding: 13px 15px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #52655d; border: 1px solid #c4e6d8; border-radius: 12px; background: #f2fbf7; font-size: 13px; }
.healthy-range svg { width: 17px; height: 17px; color: var(--emerald-dark); stroke-width: 2.5; }
.measurement-unit-row { padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.measurement-unit-row .field-label { margin: 0; }
.body-fat-unit-switch button { min-width: 64px; }
.calculator-form-error { margin: 18px 0 -14px; color: #b42318; font-size: 13px; font-weight: 700; text-align: center; }
.calculator-form-error:empty { display: none; }
.body-fat-result-details { padding: 30px; }
.body-fat-result-details h2 { margin: 0 0 17px; font-family: var(--display); font-size: 21px; text-align: center; }
.body-fat-range-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.body-fat-range-grid article { min-width: 0; padding: 14px 8px; display: grid; gap: 3px; color: #6f7e78; border: 1px solid var(--line); border-radius: 12px; background: #f8faf9; text-align: center; }
.body-fat-range-grid span { font-size: 11px; font-weight: 800; }
.body-fat-range-grid strong { font-size: 11px; }
.body-fat-range-grid article.is-current { color: var(--emerald-dark); border-color: #7dceb0; background: var(--emerald-soft); box-shadow: inset 0 0 0 1px #7dceb0; }
.body-fat-range-grid article.is-current::before { content: "Your category"; color: var(--emerald-dark); font-size: 8px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.meal-layout { max-width: 1120px; }
.meal-calculator-card { padding: 34px; border: 1px solid var(--line); border-radius: 25px; background: #fff; box-shadow: var(--shadow-lg); }
.meal-table-header, .food-row { display: grid; grid-template-columns: minmax(150px, 1.35fr) .65fr .72fr .72fr .72fr .72fr 38px; gap: 9px; }
.meal-table-header { padding: 0 1px 8px; color: #71817b; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.food-items { display: grid; gap: 10px; }
.food-row { position: relative; padding: 12px; align-items: start; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.food-field { display: block; }
.food-field > span { display: none; }
.food-field input { width: 100%; height: 44px; min-width: 0; padding: 0 10px; color: var(--ink); border: 1px solid #cedbd6; border-radius: 10px; outline: 0; background: #fff; font-size: 14px; }
.food-field input:focus { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(14,159,110,.1); }
.food-field input[aria-invalid="true"] { border-color: #d86c62; }
.remove-food { width: 38px; height: 44px; display: grid; place-items: center; color: #8b9893; border: 1px solid #d8e2de; border-radius: 10px; background: #fff; cursor: pointer; }
.remove-food:hover { color: #b42318; border-color: #e7b0aa; background: #fff7f6; }
.remove-food svg { width: 17px; height: 17px; }
.food-row-error { grid-column: 1 / -1; margin: -1px 0 0; color: #b42318; font-size: 11px; font-weight: 700; }
.food-row-error:empty { display: none; }
.meal-actions { margin: 18px 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meal-action-button { min-height: 44px; padding: 0 16px; box-shadow: none; }
.meal-action-button svg { width: 17px; height: 17px; }
.reset-meal-button { padding: 8px 4px; color: #65756f; border: 0; background: transparent; cursor: pointer; font-size: 13px; font-weight: 800; }
.reset-meal-button:hover { color: #b42318; }
.meal-total-card { padding: 25px; color: #fff; border-radius: 19px; background: #0e3126; }
.meal-total-heading { margin-bottom: 19px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.meal-total-heading .section-kicker { color: #70dfb3; }
.meal-total-heading h2 { margin: 2px 0 0; font-family: var(--display); font-size: 22px; }
.meal-total-icon { width: 43px; height: 43px; display: grid; place-items: center; color: #74e3b7; border: 1px solid rgba(116,227,183,.2); border-radius: 13px; background: rgba(116,227,183,.09); }
.meal-total-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.meal-total-grid article { padding: 15px; display: grid; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.055); }
.meal-total-grid article.calories-total { background: rgba(105,223,176,.12); border-color: rgba(105,223,176,.22); }
.meal-total-grid span { color: #abc1b8; font-size: 11px; }
.meal-total-grid strong { margin-top: 5px; font-family: var(--display); font-size: 25px; }
.meal-total-grid small { color: #8fa99f; font-size: 10px; }
.meal-content-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.meal-content-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.meal-content-grid h3 { margin: 16px 0 7px; font-family: var(--display); font-size: 18px; }
.meal-content-grid p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.use-icon.fat-icon { color: #7651ce; background: #f1edff; }
.bmi-formula-callout > strong { white-space: normal; text-align: center; }
.bmi-table-wrap { max-width: 720px; }
.bmi-table tbody td:last-child { color: var(--ink-soft); }
.bmi-meaning-grid { margin-top: 29px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.bmi-meaning-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.bmi-meaning-grid article > span { color: var(--emerald-dark); font-size: 12px; font-weight: 800; }
.bmi-meaning-grid h3 { margin: 12px 0 7px; font-family: var(--display); font-size: 18px; }
.bmi-meaning-grid p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.limitations-card { margin-top: 25px; padding: 27px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface-soft); }
.limitations-card ul { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 26px; list-style: none; }
.limitations-card li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-soft); font-size: 14px; }
.limitations-card li > svg { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 2px; padding: 3px; color: #fff; border-radius: 50%; background: var(--emerald); stroke-width: 2.5; }
.limitations-card li span { display: grid; }
.limitations-card li strong { margin-bottom: 2px; color: var(--ink); }
.limitations-card > p { margin: 25px 0 0; padding: 16px 18px; color: #52655d; border-left: 3px solid var(--emerald); border-radius: 0 10px 10px 0; background: #fff; font-size: 14px; }

.tdee-content { color: var(--ink); background: #fff; }
.content-narrow { max-width: 920px; }
.tdee-content-section { padding: 88px 0; }
.tdee-content-section.tinted-content { background: var(--surface-soft); }
.tdee-content-section .section-kicker { display: block; margin-bottom: 8px; }
.tdee-content-section h2 { margin: 0 0 20px; font-family: var(--display); font-size: clamp(31px, 4vw, 43px); line-height: 1.2; letter-spacing: -1.5px; }
.tdee-content-section > .container > p { color: var(--ink-soft); font-size: 17px; line-height: 1.8; }
.tdee-content-section > .container > p + p { margin-top: 17px; }
.explanation-grid { margin-top: 31px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.explanation-grid article { padding: 23px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.explanation-grid article > span { color: var(--emerald); font-family: var(--display); font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.explanation-grid h3 { margin: 14px 0 7px; font-family: var(--display); font-size: 17px; }
.explanation-grid p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
.formula-callout { margin-top: 18px; padding: 22px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; border: 1px solid #b7e4d2; border-radius: 18px; background: var(--emerald-soft); }
.formula-icon { width: 46px; height: 46px; display: grid; place-items: center; color: #fff; border-radius: 14px; background: var(--emerald); }
.formula-callout h3 { margin: 0 0 4px; font-family: var(--display); font-size: 16px; }
.formula-callout p { margin: 0; color: #52665e; font-size: 13px; line-height: 1.6; }
.formula-callout > strong { padding: 8px 11px; color: var(--emerald-dark); border-radius: 9px; background: #fff; font-size: 13px; white-space: nowrap; }
.comparison-grid { margin: 30px 0 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.comparison-grid article { padding: 27px; border: 1px solid var(--line); border-radius: 19px; background: #fff; }
.comparison-grid article.highlighted-comparison { border-color: #9bd9c1; background: var(--emerald-soft); }
.comparison-label { display: inline-block; padding: 4px 8px; color: var(--emerald-dark); border-radius: 7px; background: var(--emerald-soft); font-size: 11px; font-weight: 800; letter-spacing: .8px; }
.highlighted-comparison .comparison-label { color: #fff; background: var(--emerald); }
.comparison-grid h3 { margin: 16px 0 7px; font-family: var(--display); font-size: 21px; }
.comparison-grid p { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
.comparison-grid a, .related-copy a, .use-grid a { color: var(--emerald-dark); font-weight: 800; }
.comparison-grid article > a { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.comparison-grid a svg { width: 15px; height: 15px; }
.related-copy { margin-top: 22px !important; padding-left: 15px; border-left: 3px solid var(--emerald); font-size: 15px !important; }
.use-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.use-grid article { padding: 25px; border: 1px solid var(--line); border-radius: 19px; background: #fff; }
.use-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; }
.use-icon svg { width: 21px; height: 21px; }
.use-icon.maintain { color: var(--emerald-dark); background: var(--emerald-soft); }
.use-icon.loss { color: #2772d7; background: #e8f2ff; }
.use-icon.gain { color: #a8660d; background: #fff2d8; }
.use-grid h3 { margin: 18px 0 8px; font-family: var(--display); font-size: 17px; }
.use-grid p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.activity-table-wrap { margin-top: 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
.activity-table { width: 100%; border-collapse: collapse; background: #fff; text-align: left; }
.activity-table th, .activity-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.activity-table thead th { color: #fff; background: #0e3126; font-size: 13px; }
.activity-table tbody th { color: var(--ink); font-size: 14px; }
.activity-table tbody td { color: var(--ink-soft); font-size: 14px; }
.activity-table tbody td:last-child { color: var(--emerald-dark); font-weight: 800; }
.activity-table tbody tr:last-child th, .activity-table tbody tr:last-child td { border-bottom: 0; }
.faq-content { background: var(--surface-soft); }
.tdee-faq-list { margin-top: 27px; border-top: 1px solid var(--line); }
.tdee-faq-list details { border-bottom: 1px solid var(--line); }
.tdee-faq-list summary { padding: 21px 2px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; font-family: var(--display); font-size: 17px; font-weight: 700; }
.tdee-faq-list summary::-webkit-details-marker { display: none; }
.tdee-faq-list summary span { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; color: var(--emerald-dark); border-radius: 50%; background: var(--emerald-soft); font-family: var(--body); font-size: 19px; font-weight: 500; transition: transform .18s ease; }
.tdee-faq-list details[open] summary span { transform: rotate(45deg); }
.tdee-faq-list details p { max-width: 760px; margin: -4px 45px 20px 2px; color: var(--ink-soft); font-size: 15px; line-height: 1.75; }
.tdee-disclaimer { padding: 34px 0 82px; background: var(--surface-soft); }
.tdee-disclaimer-card { padding: 20px 22px; display: flex; align-items: flex-start; gap: 13px; color: #52655d; border: 1px solid #cbded7; border-radius: 15px; background: #fff; }
.tdee-disclaimer-card > span { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; color: var(--emerald-dark); border-radius: 10px; background: var(--emerald-soft); }
.tdee-disclaimer-card > span svg { width: 18px; height: 18px; }
.tdee-disclaimer-card p { margin: 3px 0 0; font-size: 13px; line-height: 1.65; }

.site-footer { padding: 74px 0 0; color: #c9d8d2; background: #0e2a21; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 64px; padding-bottom: 58px; }
.brand-light { color: #fff; }
.footer-about p { max-width: 350px; margin: 20px 0 0; color: #aebfb8; }
.footer-grid h2 { margin: 5px 0 20px; color: #fff; font-family: var(--display); font-size: 15px; }
.footer-grid > div:not(.footer-about) { display: flex; flex-direction: column; gap: 11px; }
.footer-grid > div:not(.footer-about) a { width: max-content; color: #aebfb8; font-size: 14px; }
.footer-grid > div:not(.footer-about) a:hover { color: #fff; }
.footer-disclaimer { padding: 17px 0; display: flex; align-items: center; gap: 10px; color: #b9c1dc; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.footer-disclaimer svg { width: 17px; height: 17px; flex: 0 0 auto; color: #7de8f2; }
.footer-disclaimer p { margin: 0; }
.footer-bottom { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,.1); color: #8fa39b; font-size: 13px; }

/* volcaprint brand system: precision indigo with a fresh cyan signal */
.site-header { border-bottom-color: rgba(226,229,239,.9); }
.primary-nav { color: #4f566f; }
.button { box-shadow: 0 12px 24px rgba(75,78,205,.22); }
.button:hover { box-shadow: 0 15px 30px rgba(75,78,205,.28); }
.button-secondary:hover { border-color: #c5c9fa; }

.hero { background: linear-gradient(125deg, #fff 0%, #fff 44%, #f1f3ff 100%); }
.hero-pattern { background-image: radial-gradient(#c9cefa 1px, transparent 1px); }
.eyebrow { border-color: #d8dbfc; background: rgba(238,240,255,.9); }
.hero-visual::before { background: radial-gradient(circle at 40% 35%, #f2f3ff, #dfe3ff 66%, #ccd4ff); box-shadow: inset 0 0 0 1px rgba(89,91,219,.1); }
.visual-orbit { border-color: rgba(89,91,219,.2); }
.energy-card { background: #f6f7fd; }
.energy-ring { background: conic-gradient(var(--emerald) 0 76%, #dfe2f2 76% 100%); }
.floating-chip { border-color: #e3e5f0; }

.calculator-card:hover, .tool-card:hover { border-color: #cbd0fb; }
.calculator-library-hero,
.calculator-page-hero { background: radial-gradient(circle at 82% 18%, rgba(125,232,242,.17), transparent 30%), #151c3f; }
.trust-section { background: #151c3f; }
.trust-section::before { border-color: rgba(125,232,242,.14); box-shadow: 0 0 0 80px rgba(125,232,242,.035), 0 0 0 160px rgba(125,232,242,.025); }
.calculator-library-hero .section-kicker,
.calculator-page-hero .section-kicker,
.light-intro .section-kicker,
.meal-total-heading .section-kicker { color: #7de8f2; }
.calculator-library-hero p,
.calculator-page-hero p,
.light-intro p,
.trust-card p { color: #bdc4dc; }
.breadcrumbs { color: #a9b1d0; }
.trust-icon { color: #7de8f2; border-color: rgba(125,232,242,.25); background: rgba(125,232,242,.1); }
.steps-grid::before { border-color: #c9cdf0; }
.step-icon { box-shadow: 0 0 0 1px #d9dcf5; }
.article-visual { color: var(--emerald-dark); background: #e9ebff; }
.article-symbol { box-shadow: 0 8px 20px rgba(31,37,84,.09); }
.library-note,
.disclaimer-card { border-color: #d8dbea; }
.page-hero { background: radial-gradient(circle at 80% 20%, #e7eaff, transparent 34%), linear-gradient(135deg, #fff, #f7f8fc); }
.status-note { color: #575e78; border-color: #d6daf9; }

.choice-card span { color: #545b73; }
.choice-card input:checked + span { border-color: #aeb4f4; box-shadow: inset 0 0 0 1px #aeb4f4; }
.unit-switch { background: #eef0f6; }
.unit-switch button { color: #656c83; }
.unit-switch button.active { box-shadow: 0 2px 7px rgba(31,37,84,.1); }
.input-shell,
.select-shell,
.food-field input { border-color: #d3d7e3; }
.result-main { background: linear-gradient(135deg, #6869e8, #4351c9); }
.result-main > p,
.bmr-result { color: #e0e3ff; }
.goal-card.maintain,
.bmi-category-grid article.is-current,
.body-fat-range-grid article.is-current { border-color: #aeb4f4; box-shadow: inset 0 0 0 1px #aeb4f4; }
.bmi-category-label { color: var(--emerald-dark); background: #e2e5ff; }
.healthy-range { color: #575e78; border-color: #d3d7fa; background: #f5f6ff; }
.meal-total-card,
.activity-table thead th { background: #151c3f; }
.meal-total-icon { color: #7de8f2; border-color: rgba(125,232,242,.22); background: rgba(125,232,242,.09); }
.meal-total-grid span { color: #bec5de; }
.meal-total-grid small { color: #9fa8ca; }
.formula-callout { border-color: #cdd2fa; }

.site-footer { color: #cbd1e7; background: #111735; }
.footer-about p,
.footer-grid > div:not(.footer-about) a { color: #adb5d1; }
.footer-bottom { color: #949dbe; }

@media (max-width: 1050px) {
    .primary-nav { gap: 19px; }
    .hero-grid { gap: 28px; }
    .hero h1 { font-size: clamp(48px, 6vw, 64px); }
    .hero-visual { transform: scale(.9); }
    .tool-row { grid-template-columns: repeat(3, 1fr); }
    .meal-table-header { display: none; }
    .food-row { grid-template-columns: repeat(2, 1fr); padding: 18px; }
    .food-name-field { grid-column: 1 / -1; padding-right: 44px; }
    .food-field > span { min-height: 31px; display: block; margin-bottom: 5px; color: #65756f; font-size: 11px; font-weight: 800; line-height: 1.3; }
    .food-name-field > span { min-height: auto; }
    .remove-food { position: absolute; top: 18px; right: 18px; }
    .footer-grid { grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 36px; }
}

@media (max-width: 900px) {
    .nav-shell { min-height: 70px; }
    .menu-toggle { display: grid; }
    .primary-nav { position: absolute; top: calc(100% + 1px); right: 20px; left: 20px; padding: 13px; display: none; flex-direction: column; align-items: stretch; gap: 3px; border: 1px solid var(--line); border-radius: 0 0 18px 18px; background: rgba(255,255,255,.98); box-shadow: var(--shadow-lg); }
    .primary-nav.is-open { display: flex; }
    .primary-nav > a:not(.button) { padding: 11px 12px; border-radius: 9px; }
    .primary-nav > a:not(.button)::after { display: none; }
    .primary-nav > a.active, .primary-nav > a:not(.button):hover { background: var(--surface-tint); }
    .nav-cta { margin-top: 6px; }
    .hero-grid { grid-template-columns: 1fr; padding-top: 70px; text-align: center; }
    .hero-copy { display: flex; flex-direction: column; align-items: center; }
    .hero-visual { width: min(620px, 100%); margin: -10px auto 0; transform: none; }
    .calculator-grid { grid-template-columns: repeat(2, 1fr); }
    .four-calculator-grid { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .explanation-grid, .use-grid { grid-template-columns: 1fr; }
    .formula-callout { grid-template-columns: auto 1fr; }
    .formula-callout > strong { grid-column: 2; width: max-content; }
    .steps-grid { gap: 20px; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    .footer-grid > div:last-child { grid-column: 2; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 28px, 1180px); }
    .brand { font-size: 18px; }
    .brand-symbol { width: 36px; height: 36px; border-radius: 12px; }
    .brand-symbol svg { width: 23px; height: 23px; }
    .hero-grid { padding: 54px 0 62px; }
    .hero h1 { margin-top: 20px; font-size: clamp(42px, 12vw, 57px); letter-spacing: -2.6px; }
    .hero-copy > p { font-size: 17px; }
    .hero-actions { width: 100%; }
    .hero-actions .button { width: 100%; }
    .hero-notes { justify-content: center; }
    .hero-visual { min-height: 430px; margin-top: 10px; }
    .hero-visual::before { width: 330px; height: 330px; }
    .orbit-one { width: 360px; height: 360px; }
    .orbit-two { width: 415px; height: 415px; }
    .metric-panel { padding: 16px; transform: none; }
    .energy-card { grid-template-columns: 98px 1fr; padding: 13px; text-align: left; }
    .energy-ring { width: 90px; height: 90px; }
    .energy-ring::before { width: 70px; height: 70px; }
    .energy-ring strong { font-size: 16px; }
    .mini-metrics > div { padding: 9px 7px; grid-template-columns: 1fr; text-align: center; }
    .mini-icon { margin: 0 auto 4px; grid-row: auto; }
    .chip-top { top: 8px; right: 0; }
    .chip-bottom { bottom: 5px; left: 0; }
    .section { padding: 76px 0; }
    .split-intro { align-items: start; flex-direction: column; gap: 15px; }
    .calculator-grid { grid-template-columns: 1fr; }
    .four-calculator-grid { grid-template-columns: 1fr; }
    .calculator-card { min-height: 238px; }
    .calculator-page-hero { padding: 43px 0 145px; }
    .breadcrumbs { margin-bottom: 25px; }
    .calculator-page-hero p { font-size: 16px; }
    .calculator-workspace { margin-top: -96px; padding-bottom: 70px; }
    .tdee-form-card { padding: 22px 17px; border-radius: 20px; }
    .calculator-card-heading { align-items: flex-start; }
    .form-grid { grid-template-columns: 1fr; gap: 21px; }
    .form-group-full { grid-column: auto; }
    .goal-section { padding: 24px 17px; }
    .goal-grid { grid-template-columns: 1fr; }
    .goal-card { grid-template-columns: 1fr auto; align-items: center; text-align: left; }
    .goal-card small { grid-column: 1 / -1; }
    .bmr-result { align-items: flex-start; flex-direction: column; gap: 4px; }
    .bmi-result-details { padding: 24px 17px; }
    .bmi-category-grid { grid-template-columns: repeat(2, 1fr); }
    .measurement-unit-row { align-items: flex-start; flex-direction: column; }
    .body-fat-unit-switch { width: 100%; grid-template-columns: repeat(2, 1fr); }
    .body-fat-unit-switch button { width: 100%; }
    .body-fat-result-details { padding: 24px 17px; }
    .body-fat-range-grid { grid-template-columns: repeat(2, 1fr); }
    .meal-calculator-card { padding: 22px 17px; border-radius: 20px; }
    .food-row { grid-template-columns: 1fr; }
    .food-name-field { grid-column: auto; }
    .meal-actions { align-items: stretch; flex-direction: column; }
    .meal-action-button { width: 100%; }
    .meal-total-card { padding: 20px 16px; }
    .meal-total-grid { grid-template-columns: repeat(2, 1fr); }
    .meal-content-grid { grid-template-columns: 1fr; }
    .bmi-meaning-grid, .limitations-card ul { grid-template-columns: 1fr; }
    .tdee-content-section { padding: 68px 0; }
    .comparison-grid { grid-template-columns: 1fr; }
    .formula-callout { grid-template-columns: 1fr; }
    .formula-callout > strong { grid-column: auto; width: 100%; text-align: center; white-space: normal; }
    .activity-table { min-width: 590px; }
    .tdee-disclaimer { padding-bottom: 65px; }
    .tool-row { grid-template-columns: 1fr; }
    .tool-card { min-height: auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; }
    .tool-card strong { margin: 0; }
    .tool-arrow { margin: 0; align-self: center; }
    .trust-grid, .steps-grid, .article-grid { grid-template-columns: 1fr; }
    .steps-grid { gap: 32px; }
    .steps-grid::before { top: 12%; bottom: 12%; left: 50%; width: 1px; height: auto; border-top: 0; border-left: 1px dashed #bcdccc; }
    .step-card { padding: 0 14px; background: #fff; }
    .disclaimer-card { grid-template-columns: auto 1fr; align-items: start; }
    .disclaimer-card > a { grid-column: 2; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 42px 28px; }
    .footer-about { grid-column: 1 / -1; }
    .footer-grid > div:last-child { grid-column: auto; }
    .footer-bottom { padding: 21px 0; align-items: flex-start; flex-direction: column; justify-content: center; }
    .footer-bottom p { margin: 0; }
}

@media (max-width: 390px) {
    .hero-visual { min-height: 405px; }
    .floating-chip { padding: 9px 10px; }
    .floating-chip > svg { width: 26px; height: 26px; }
    .mini-metrics strong { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
