/* smidge.fit, in the Label design language: ink on paper, built from the
   parts of a nutrition label. Green is for actions, yellow marks the one
   answer on a page. Corners: 14px panels, 10px controls, 6px tags. */

:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #4d4d4d;
  --paper: #ffffff;
  --soft: #f2f2ef;
  --rule: #d4d4d0;
  --action: #1f7a5c;
  --action-press: #17694e;
  --link: #17694e;
  --answer: #ffe45c;
  --warn-bg: #fff4d6;
  --on-ink-muted: #b8b8b4;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --r-panel: 14px;
  --r-control: 10px;
  --r-tag: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  overflow-x: hidden;
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 900; letter-spacing: -0.03em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.eyebrow {
  font-size: 12px; line-height: 16px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.answer { background: var(--answer); border-radius: 4px; color: var(--ink); font-weight: 700; padding: 2px 4px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--ink); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: var(--r-control); z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
/* The logo goes home; the nav holds the four main links (Calculators, Foods, Games, Blog), then the
   Get the app button. A 2 px rule closes the header; thick bars belong to nutrition labels. On phones the links move to their own row under the logo and the button. */
.site-header .row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand span { font-size: 24px; line-height: 28px; font-weight: 900; letter-spacing: -0.02em; }
.site-nav { display: flex; align-items: center; gap: 8px 28px; margin-left: auto; font-size: 15px; line-height: 20px; font-weight: 600; }
.site-nav a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.header-cta { white-space: nowrap; }
.site-header .bar { height: 2px; }
@media (max-width: 640px) {
  .site-header .row { gap: 12px; padding: 14px 0 0; }
  .brand { gap: 8px; }
  .brand img { width: 28px; height: 28px; border-radius: 7px; }
  .brand span { font-size: 21px; }
  .header-cta { margin-left: auto; padding: 0 14px; }
  .site-nav { order: 3; flex-basis: 100%; margin-left: 0; gap: 24px; padding: 4px 0 12px; font-size: 16px; }
  .site-nav a { min-height: 32px; display: inline-flex; align-items: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--r-control);
  background: var(--action); color: var(--paper); font: 700 15px/1.2 var(--sans);
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--action-press); color: var(--paper); }
.btn-lg { min-height: 60px; padding: 0 30px; font-size: 18px; }
.btn-ink { background: var(--ink); }
.btn-ink:hover { background: #333333; }
/* Store buttons and the QR code for desktop visitors */
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.store-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-store { flex-direction: column; align-items: flex-start; gap: 0; min-width: 190px; padding: 8px 22px; font-size: 21px; line-height: 1.1; }
.btn-store small { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.02em; }
.btn-store + .btn-store { background: var(--ink); }
.btn-store + .btn-store:hover { background: #333333; }
.on-ink .btn-store + .btn-store { background: transparent; box-shadow: inset 0 0 0 2px var(--paper); }
.on-ink .btn-store + .btn-store:hover { background: #333333; }
.get-qr { display: flex; align-items: center; gap: 14px; }
.get-qr img { flex: none; width: 104px; height: 104px; border-radius: var(--r-tag); box-shadow: 0 0 0 2px var(--ink); }
.get-qr p { max-width: 190px; font-size: 14px; line-height: 20px; color: var(--muted); }
.on-ink .get-qr img { box-shadow: none; }
.on-ink .get-qr p { color: var(--on-ink-muted); }
/* Phones open the store directly, so they don't need the code. */
[data-device="ios"] .get-qr, [data-device="android"] .get-qr { display: none; }
@media (max-width: 720px), (pointer: coarse) { .get-qr { display: none; } }

/* Sections */
.section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.section-head { border-top: 2px solid var(--ink); padding: 14px 0 8px; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; }
.section-head a { font-size: 16px; font-weight: 600; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 32px; }
.item { display: flex; flex-direction: column; gap: 6px; border-top: 4px solid var(--ink); padding-top: 12px; color: var(--ink); text-decoration: none; }
.item b { font-size: 24px; line-height: 28px; font-weight: 900; letter-spacing: -0.02em; }
.item span { color: var(--muted); font-size: 16px; line-height: 24px; }
a.item:hover b { text-decoration: underline; text-decoration-thickness: 3px; }

/* The nutrition-label panel */
.label { border: 2px solid var(--ink); border-radius: var(--r-panel); padding: 18px 20px; display: flex; flex-direction: column; background: var(--paper); }
.label-title { font-size: 28px; line-height: 32px; font-weight: 900; letter-spacing: -0.02em; }
.label-sub { font-size: 14px; line-height: 20px; color: var(--muted); }
.label .bar { margin: 10px 0; }
.label-kicker { font-size: 13px; line-height: 18px; font-weight: 700; }
.label-big { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 4px 0 10px; }
.label-big .unit { font-size: 24px; line-height: 32px; font-weight: 900; letter-spacing: -0.02em; }
.label-big .value { font-size: clamp(56px, 9vw, 72px); line-height: 0.92; font-weight: 900; letter-spacing: -0.035em; background: var(--answer); border-radius: var(--r-tag); padding: 2px 10px 0; font-variant-numeric: tabular-nums; }
.label .rule4 { height: 4px; background: var(--ink); }
.label-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--ink); line-height: 22px; }
.label-row > :first-child { font-weight: 700; }
.label-row > :last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.label-row.last { border-bottom: 4px solid var(--ink); }
.label-row.sub > :first-child { font-weight: 400; padding-left: 18px; }
.label-foot { padding-top: 10px; font-size: 14px; line-height: 20px; color: var(--muted); }
.tag { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border: 1.5px solid var(--ink); border-radius: var(--r-tag); padding: 3px 7px; }

/* Dark call-to-action band */
.on-ink { background: var(--ink); color: var(--paper); }
.cta-band { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 20px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.cta-id { display: flex; align-items: center; gap: 20px; min-width: 0; }
.cta-id img { flex: none; width: 72px; height: 72px; border-radius: 17px; }
.cta-title { font-size: clamp(28px, 4.4vw, 52px); line-height: 1; font-weight: 900; letter-spacing: -0.035em; }
.cta-sub { font-size: 17px; line-height: 26px; color: var(--on-ink-muted); }

/* Footer */
.site-footer { padding: 48px 0 56px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 28px; font-size: 15px; line-height: 30px; }
.footer-cols div { display: flex; flex-direction: column; }
.footer-cols .eyebrow { padding-bottom: 6px; }
.footer-cols a { color: var(--ink); text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }
.footer-note { margin-top: 36px; border-top: 1px solid var(--rule); padding-top: 16px; font-size: 13px; line-height: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }

/* Calculator page */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; line-height: 20px; color: var(--muted); }
.page-head { display: flex; flex-direction: column; gap: 14px; padding: 20px 0 28px; max-width: 760px; }
.page-head h1 { font-size: clamp(42px, 6vw, 72px); line-height: 0.96; letter-spacing: -0.035em; }
.page-head .lede { font-size: 19px; line-height: 30px; }

.calc { display: grid; gap: 28px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .calc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
  .calc .result-col { position: sticky; top: 24px; }
}
.form { border: 2px solid var(--ink); border-radius: var(--r-panel); padding: 18px; display: flex; flex-direction: column; gap: 18px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > legend, .field > .field-label { padding: 0; margin-bottom: 6px; font-size: 14px; line-height: 20px; font-weight: 700; }
.field-hint { font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 400; }
.field-error { font-size: 14px; line-height: 20px; font-weight: 600; color: #8a1c0f; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice-strip { display: flex; border: 2px solid var(--ink); border-radius: var(--r-control); overflow: hidden; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.opt { position: relative; display: block; min-width: 0; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
  display: flex; flex-direction: column; justify-content: center; min-height: 48px; height: 100%;
  padding: 6px 12px; border: 2px solid var(--ink); border-radius: var(--r-control);
  background: var(--paper); color: var(--ink); font-size: 15px; line-height: 19px; font-weight: 700;
  text-align: center; cursor: pointer;
}
.opt span small { display: block; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--muted); }
.opt input:checked + span { background: var(--ink); color: var(--paper); }
.opt input:checked + span small { color: var(--on-ink-muted); }
.opt input:focus-visible + span { outline: 3px solid var(--action); outline-offset: 2px; }
.choice-strip .opt { flex: 1 1 0; }
.choice-strip .opt span { border: 0; border-radius: 0; font-size: 14px; line-height: 17px; padding: 6px; min-height: 52px; }
.choice-strip .opt + .opt span { border-left: 2px solid var(--ink); }
.choice-list .opt span { align-items: flex-start; text-align: left; padding: 8px 14px; }

.inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(96px, 100%), 1fr)); gap: 10px; }
.input-row { display: flex; gap: 8px; }
.text-in {
  width: 100%; min-width: 0; height: 52px; padding: 0 12px; border: 2px solid var(--ink); border-radius: var(--r-control);
  background: var(--paper); color: var(--ink); font: 800 20px/1 var(--sans); font-variant-numeric: tabular-nums;
}
/* Focus turns the field's own border green instead of drawing a second ring around it. */
.text-in:focus, .text-in:focus-visible { outline: 0; border-color: var(--action); }
.text-in[aria-invalid="true"] { border-color: #8a1c0f; box-shadow: inset 0 0 0 1px #8a1c0f; }
.unit-in { position: relative; flex: 1 1 0; min-width: 0; }
.unit-in .text-in { padding-right: 34px; }
.unit-in i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 14px; font-weight: 700; color: var(--muted); pointer-events: none; }
.form .btn { min-height: 56px; font-size: 17px; }

.notice { border-radius: var(--r-control); background: var(--warn-bg); padding: 12px 14px; font-size: 15px; line-height: 22px; }
.share { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--link); font: 700 15px/1.2 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.share:hover { color: var(--ink); }

.calc-cta { margin-top: 24px; border-radius: var(--r-panel); padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; }
.calc-cta .cta-id img { width: 56px; height: 56px; border-radius: 13px; }
.calc-cta .cta-title { font-size: clamp(24px, 3vw, 30px); line-height: 1.05; }
.calc-cta .store-buttons { align-self: stretch; }
.calc-cta .btn-store { flex: 1 1 190px; }

.math { background: var(--soft); border-radius: var(--r-control); padding: 14px 16px; font: 14px/24px var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Long-form pages: method, privacy, terms, support */
.prose { padding-bottom: 72px; max-width: 780px; }
.prose h1 { font-size: clamp(38px, 6vw, 58px); line-height: 1.02; letter-spacing: -0.035em; margin: 28px 0 14px; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; margin: 44px 0 12px; border-top: 4px solid var(--ink); padding-top: 12px; letter-spacing: -0.025em; }
.prose h3 { font-size: 20px; line-height: 1.3; margin: 26px 0 8px; letter-spacing: -0.015em; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose .lede { color: var(--muted); font-size: 20px; line-height: 31px; }
.prose .updated { color: var(--muted); font-size: 15px; margin-top: 16px; }
.prose .card { background: var(--soft); border-radius: var(--r-panel); margin: 28px 0; padding: 20px 22px; }
.prose .card h2, .prose .card h3 { margin-top: 0; border-top: 0; padding-top: 0; }
.prose .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.prose .grid a { border-top: 4px solid var(--ink); color: var(--ink); font-weight: 800; padding-top: 10px; text-decoration: none; }
.prose .grid a span { color: var(--muted); display: block; font-size: 15px; font-weight: 400; margin-top: 4px; }
.sources { list-style: none; padding: 0 !important; }
.sources li { border-bottom: 1px solid var(--rule); padding: 8px 0; margin: 0 !important; }
.sources li span { display: block; font-size: 14px; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Shared layout pieces (no inline styles: the CSP allows only this file) */
.intro { max-width: 720px; margin-bottom: 28px; color: var(--muted); }
.label-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.calc-list, .post-list { padding-bottom: 72px; }
.label.stale { opacity: 0.4; }
.label.stale .share { visibility: hidden; }

/* smidge.fit/get, the page the QR code opens */
.get-page { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 64px var(--gutter) 80px; text-align: center; }
.get-page-icon { border-radius: 22px; }
.get-page h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: -0.035em; }
.get-page .lede { font-size: 19px; line-height: 28px; color: var(--muted); }
.get-page .get, .get-page .store-buttons { justify-content: center; }

/* Blog article: post pages and author pages built by tools/build_blog.mjs */
.post { max-width: 780px; padding-bottom: 72px; }
.post h1 { font-size: clamp(32px, 5.2vw, 48px); line-height: 1.06; margin: 20px 0 14px; }
.post h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; margin: 44px 0 12px; border-top: 4px solid var(--ink); padding-top: 12px; letter-spacing: -0.025em; }
.post h3 { font-size: 20px; line-height: 1.3; margin: 26px 0 8px; letter-spacing: -0.015em; }
.post p, .post ul, .post ol { margin: 0 0 16px; }
.post ul, .post ol { padding-left: 24px; }
.post li + li { margin-top: 8px; }
.post p, .post li, .post dd { overflow-wrap: anywhere; }
.post .post-meta { color: var(--muted); font-size: 15px; line-height: 24px; margin: 0 0 24px; }
.post .answer-line { font-size: 20px; line-height: 32px; }
.post figure { margin: 0; }
.post figcaption, table.data caption { caption-side: bottom; text-align: left; color: var(--muted); font-size: 14px; line-height: 20px; padding-top: 8px; }

.table-wrap { overflow-x: auto; margin: 24px 0; max-width: 100%; }
table.data { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 22px; }
table.data th { border-top: 4px solid var(--ink); padding: 10px 12px 8px; text-align: left; vertical-align: bottom; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
table.data td { border-bottom: 1px solid var(--rule); padding: 9px 12px; vertical-align: top; }
table.data tbody th { border-top: 0; border-bottom: 1px solid var(--rule); padding: 9px 12px; font-size: 15px; line-height: 22px; letter-spacing: 0; text-transform: none; color: var(--ink); }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* A wide grid of numbers that must fit a phone without scrolling sideways. */
table.data.tight tbody th { vertical-align: top; }
@media (max-width: 640px) {
  table.data.tight th, table.data.tight td { padding-left: 5px; padding-right: 5px; }
  table.data.tight thead th { white-space: normal; text-transform: none; letter-spacing: 0; font-size: 13px; }
  table.data.tight td { font-size: 14px; }
}

.method-box { background: var(--soft); border-radius: var(--r-panel); margin: 28px 0; padding: 22px 24px; }
.method-box .eyebrow { margin-bottom: 12px; }
.method-box dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px 20px; margin: 0; }
.method-box dt { padding-top: 4px; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.method-box dd { margin: 0; min-width: 0; }
.post details { margin: 16px 0 0; }
.post details summary { cursor: pointer; font-weight: 700; }
.post pre, .post code { font-family: var(--mono); font-size: 14px; }
.post pre { margin: 12px 0 0; padding: 14px 16px; background: var(--paper); border-radius: var(--r-control); line-height: 22px; overflow-x: auto; white-space: pre; max-width: 100%; }
.post .related { margin-top: 36px; }
.post .related ul { list-style: none; padding: 0; }
.post .related li { border-bottom: 1px solid var(--rule); padding: 8px 0; margin: 0; }
.post .draft-banner { margin: 8px 0 16px; padding: 12px 14px; border-radius: var(--r-control); background: var(--warn-bg); font-size: 15px; line-height: 22px; font-weight: 700; }
@media (max-width: 640px) {
  .method-box dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .method-box dt { padding-top: 10px; }
  .method-box dt:first-child { padding-top: 0; }
  .method-box { padding: 18px; }
}

.profile { max-width: 780px; padding: 20px 0 28px; }
.profile h1 { font-size: clamp(36px, 5.5vw, 56px); line-height: 1; letter-spacing: -0.035em; margin: 20px 0 8px; }
.profile .role { font-size: 19px; line-height: 28px; font-weight: 700; margin-bottom: 14px; }
.profile .bio { font-size: 19px; line-height: 30px; color: var(--muted); max-width: 640px; overflow-wrap: anywhere; }
.profile .draft-banner { margin: 8px 0 16px; padding: 12px 14px; border-radius: var(--r-control); background: var(--warn-bg); font-size: 15px; line-height: 22px; font-weight: 700; }
.profile .profile-links { list-style: none; margin: 14px 0 0; padding: 0; overflow-wrap: anywhere; }
.profile h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; margin: 40px 0 0; letter-spacing: -0.025em; }
.prose code { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }

/* Home page (index.html). Every class starts with h- so nothing here reaches other pages.
   Order: hero with the food photo, the app and the typed note turned into a label; facts strip;
   three ways in; health score; free tools; sources; blog; closing band. Images in /assets/img/home/. */
.h-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.h-hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.h-hero h1 { font-size: clamp(44px, 6.2vw, 84px); line-height: 0.96; letter-spacing: -0.03em; }
.h-hero .lede { max-width: 34em; font-size: 20px; line-height: 31px; color: var(--muted); }
.h-stores .btn-store, .h-stores .btn-store + .btn-store { background: var(--ink); min-width: 180px; }
.h-stores .btn-store:hover, .h-stores .btn-store + .btn-store:hover { background: #333333; }
.h-qr img { width: 56px; height: 56px; }
.h-qr p { max-width: 260px; }

.h-stage { position: relative; aspect-ratio: 1 / 1.16; min-width: 0; max-width: 100%; border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; background: #c9915a; }
.h-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
/* The phone, the lifted row and the 440 card are all placed in % of the stage width/height, so the
   row stays over its own line in the phone at every size (stage height = 1.16 x width). */
.h-phone { position: absolute; left: 4%; top: 32%; width: 60%; padding: 1.8%; border-radius: 13% / 6.2%; background: var(--ink); box-shadow: 0 30px 60px -20px rgba(40, 24, 8, 0.55); }
.h-phone img { display: block; width: 100%; height: auto; border-radius: 10% / 4.8%; }
.h-lens, .h-result { position: absolute; }
.h-lens { left: 3%; top: 47%; width: 68%; }
.h-result { right: 3%; top: 70.5%; width: 46%; }
.h-lens img, .h-result img { display: block; width: 100%; height: auto; box-shadow: 0 18px 36px -12px rgba(40, 24, 8, 0.45), 0 0 0 1px rgba(17, 17, 17, 0.06); }
.h-lens img { border-radius: 14px; }
.h-result img { border-radius: 5.9% / 9.1%; }
.h-lens .h-tag, .h-result .h-tag { left: 12px; top: -11px; }

.h-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.h-facts li { min-width: 0; padding: 16px 18px; border-left: 1px solid var(--rule); }
.h-facts li:first-child { border-left: 0; padding-left: 0; }
.h-facts b { display: block; font-size: 17px; line-height: 22px; font-weight: 800; }
.h-facts span { font: 400 13px/19px var(--mono); color: var(--muted); }

.h-sec { padding: 88px 0; }
.h-sec h2, .h-close h2 { font-weight: 800; letter-spacing: -0.022em; text-wrap: balance; }
.h-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: 36px; }
.h-head h2 { max-width: 16em; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.02; }
.h-head p { max-width: 30em; font-size: 17px; line-height: 26px; color: var(--muted); }
.h-more { font-size: 15px; font-weight: 700; white-space: nowrap; }
.h-more::after, .h-go::after { content: " →"; }

.h-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.h-way { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.h-shot { position: relative; height: 380px; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--r-panel); background: var(--paper); }
.h-shot img { position: absolute; left: 50%; top: 26px; width: 76%; height: auto; transform: translateX(-50%); border-radius: 26px 26px 0 0; box-shadow: 0 0 0 8px var(--ink); }
.h-tag { position: absolute; left: 14px; top: 14px; z-index: 1; padding: 5px 8px; border-radius: var(--r-tag); background: var(--answer); font: 700 11px/14px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.h-way h3 { font-size: 24px; line-height: 28px; font-weight: 800; letter-spacing: -0.02em; }
.h-way p { font-size: 16px; line-height: 24px; color: var(--muted); }
.h-way q { font-family: var(--mono); font-size: 14px; color: var(--ink); }

.h-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.h-split-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.h-split-copy h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.02; }
.h-split-copy p { max-width: 30em; font-size: 18px; line-height: 29px; color: var(--muted); }
.h-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; max-width: 420px; margin-top: 6px; }
.h-scale i { height: 30px; border-radius: 5px; background: var(--rule); font: 700 12px/30px var(--mono); font-style: normal; text-align: center; color: var(--muted); }
.h-scale i.on { background: var(--answer); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.h-scale-cap { display: flex; justify-content: space-between; gap: 12px; max-width: 420px; font: 400 12px/16px var(--mono); color: var(--muted); }
.h-score-shot { position: relative; height: 520px; overflow: hidden; border: 2px solid var(--ink); border-radius: 22px; background: var(--soft); }
.h-score-shot img { position: absolute; left: 50%; top: 36px; width: 62%; height: auto; transform: translateX(-50%); border-radius: 30px; box-shadow: 0 0 0 9px var(--ink); }

.h-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.h-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 22px; border: 2px solid var(--ink); border-radius: var(--r-panel); background: var(--paper); color: var(--ink); text-decoration: none; }
a.h-tile:hover { background: #fbfbf7; color: var(--ink); }
a.h-tile:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.h-tile h3 { font-size: 22px; line-height: 26px; font-weight: 800; letter-spacing: -0.02em; }
.h-tile-text { font-size: 15px; line-height: 22px; color: var(--muted); }
.h-go { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 700; color: var(--link); }
.h-tile-tdee { grid-column: span 5; grid-row: span 2; }
.h-tile-food { grid-column: span 7; background: var(--ink); color: var(--paper); }
.h-tile-food .eyebrow, .h-tile-food .h-tile-text { color: var(--on-ink-muted); }
.h-smalls { grid-column: span 7; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.h-smalls .h-tile { padding: 18px; }
.h-smalls h3 { font-size: 18px; line-height: 22px; }
.h-plan { display: flex; flex-direction: column; margin-top: 10px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: var(--r-control); }
.h-plan-sub { padding-bottom: 6px; border-bottom: 6px solid var(--ink); font-size: 12px; line-height: 16px; color: var(--muted); }
.h-plan-k { margin-top: 6px; font-size: 11px; line-height: 14px; font-weight: 700; }
.h-plan-big { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 6px; border-bottom: 3px solid var(--ink); }
.h-plan-big span { font-size: 18px; font-weight: 900; }
.h-plan-big b { padding: 2px 8px 0; border-radius: var(--r-tag); background: var(--answer); font-size: 52px; line-height: 1; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.h-plan-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--ink); font-size: 14px; line-height: 30px; font-variant-numeric: tabular-nums; }
.h-plan-row:last-child { border-bottom: 0; }
.h-search { display: flex; gap: 8px; margin-top: 10px; }
.h-search input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border: 0; border-radius: var(--r-control); background: var(--paper); color: var(--ink); font: 400 16px/1 var(--sans); }
.h-search input::placeholder { color: var(--muted); }
.h-search input:focus-visible { outline: 3px solid var(--answer); outline-offset: 2px; }
.h-search .btn { min-height: 52px; }
.h-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h-eg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.h-eg a { padding: 5px 10px; border: 1px solid #555555; border-radius: 999px; color: var(--paper); font: 400 12px/16px var(--mono); text-decoration: none; }
.h-eg a:hover { border-color: var(--paper); color: var(--paper); }
.h-rowlabel { display: flex; align-items: center; gap: 12px; margin: 40px 0 14px; }
.h-rowlabel::after { content: ""; flex: 1; height: 2px; background: var(--ink); }
.h-games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.h-game { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; min-width: 0; padding: 12px; border: 2px solid var(--ink); border-radius: var(--r-panel); background: var(--paper); color: var(--ink); text-decoration: none; }
.h-game:hover { background: #fbfbf7; color: var(--ink); }
.h-game img { width: 96px; height: 88px; object-fit: cover; border-radius: 8px; }
.h-game b { display: block; font-size: 17px; line-height: 21px; font-weight: 800; }
.h-game span span { display: block; font-size: 14px; line-height: 20px; color: var(--muted); }

.h-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.h-sources > div { min-width: 0; padding: 20px 24px 4px 0; }
.h-sources > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.h-sources .eyebrow { margin-bottom: 8px; }
.h-sources b { display: block; margin-bottom: 6px; font-size: 20px; line-height: 26px; font-weight: 800; }
.h-sources p { font-size: 15px; line-height: 23px; color: var(--muted); }

.h-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.h-post { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-top: 14px; border-top: 2px solid var(--ink); color: var(--ink); text-decoration: none; }
.h-post b { font-size: 21px; line-height: 27px; font-weight: 800; letter-spacing: -0.01em; }
.h-post > span:last-child { font-size: 15px; line-height: 22px; color: var(--muted); }
.h-post:hover { color: var(--ink); }
.h-post:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.h-close { background: var(--ink); color: var(--paper); }
.h-close-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.h-close h2 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1; font-weight: 900; }
.h-close-copy > p { margin-top: 14px; font-size: 18px; line-height: 28px; color: var(--on-ink-muted); }
.h-close .h-stores { margin-top: 26px; }
.h-close .h-stores .btn-store, .h-close .h-stores .btn-store + .btn-store { background: var(--paper); color: var(--ink); box-shadow: none; }
.h-close .h-stores .btn-store:hover, .h-close .h-stores .btn-store + .btn-store:hover { background: #e9e9e4; color: var(--ink); }
.h-qr-card { justify-self: end; gap: 20px; max-width: 380px; padding: 20px 24px 20px 20px; border-radius: 18px; background: var(--paper); color: var(--ink); }
.h-qr-card img { width: 132px; height: 132px; box-shadow: none; }
.h-qr-card p { max-width: none; color: var(--muted); }
.h-qr-card b { display: block; margin-bottom: 6px; font-size: 20px; line-height: 24px; color: var(--ink); }

@media (max-width: 960px) {
  .h-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; padding-bottom: 40px; }
  .h-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-facts li:nth-child(3) { border-left: 0; padding-left: 0; }
  .h-facts li:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .h-ways { grid-template-columns: 1fr; gap: 36px; }
  .h-split { grid-template-columns: 1fr; gap: 32px; }
  .h-score-shot { order: 2; height: 420px; }
  .h-bento > * { grid-column: 1 / -1; }
  .h-tile-tdee { grid-row: auto; }
  .h-smalls, .h-games, .h-posts, .h-sources { grid-template-columns: 1fr; }
  .h-sources > div, .h-sources > div + div { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .h-close-row { grid-template-columns: 1fr; }
  .h-sec { padding: 60px 0; }
}
@media (max-width: 720px) {
  .h-hero .lede { font-size: 18px; line-height: 28px; }
  .h-stores .btn-store { flex: 1 1 150px; min-width: 0; }
  .h-facts span { font-size: 12px; line-height: 17px; }
  .h-ways { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: none; }
  .h-way { flex: 0 0 84%; scroll-snap-align: start; }
  .h-shot { height: 330px; }
  .h-score-shot { height: 340px; }
  .h-smalls { gap: 0; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--r-panel); }
  .h-smalls .h-tile { gap: 2px; padding: 14px 16px; border: 0; border-top: 1px solid var(--rule); border-radius: 0; }
  .h-smalls .h-tile:first-child { border-top: 0; }
  .h-smalls .eyebrow { display: none; }
  .h-sec { padding: 52px 0; }
  .h-lens .h-tag, .h-result .h-tag { top: -9px; padding: 3px 6px; font-size: 10px; }
}
