/*
 * Fitrang public content pages: shared design system (blog, /food/*, /exercise/*).
 * No build step, no JS required. Light + dark follow prefers-color-scheme.
 *
 * ---- CONTRACT (other pages rely on these class names; keep them) ---------------
 *  <head>: load Archivo from Google Fonts before this file:
 *    <link rel="preconnect" href="https://fonts.googleapis.com">
 *    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 *    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,100..900&display=swap">
 *    <link rel="stylesheet" href="/site.css">
 *
 *  header.site-header   logo (<img src="/logo-mark.png" width=32 height=32>) + wordmark "fitrang"
 *    nav.site-nav         links: Blog /blog · Foods /food · Exercises /exercise · Tools /tools · Get the app /install
 *                         (last link may carry class "btn" to render as the yellow CTA)
 *  main.wrap            readable column (max 720px), 16px side gutter on phones
 *    nav.crumbs > ol     breadcrumb: <li><a>Home</a></li> ... <li aria-current="page">Here</li>
 *    p.meta               byline / "Last updated" line under the h1
 *    .lede                answer-first box; start with <b>Short answer:</b>
 *    .facts               grid of stat tiles: <div><b>value</b><span>label</span></div>
 *    .table-wrap > table.table   data table, scrolls horizontally on narrow screens
 *    .faq                 each Q: <details><summary>Q</summary><p>A</p></details>
 *    .figure              interactive figure: optional .fig-controls, an <svg> or .fig-body,
 *                         and <figcaption>. .fig-controls is hidden until <html class="js">
 *                         (add the class with a one-line inline script) so no-JS visitors see
 *                         the static defaults only, never dead controls.
 *    .cta                 get-the-app box with <a class="btn" href="/install">
 *    .sources             reference list (ol or ul)
 *    .disclaimer          health disclaimer line
 *    .card-grid > a.card  index / listing cards (.card > .card-tag, h2/h3, p, .card-meta)
 *  footer.fr-foot       the shared site footer: not written by hand. It comes from scripts/site_footer.py
 *                       (footer_html()) and brings its own stylesheet, /footer.css.
 *
 *  Helpers: .num (scoreboard numbers, 87.5% width, tabular), .seg (segmented toggle of
 *  <button aria-pressed>), .range (labelled <input type=range>), .field (label + input),
 *  .pill, .muted, .visually-hidden, .grid-2.
 *
 *  Tokens mirror the app (src/index.css, theme N5 "Acid Iron" / L3 light):
 *  --bg --fg --card --muted --muted-fg --accent --border --primary --primary-fg
 *  --cta --cta-fg --link --success --gold --ember --water --protein --carbs --fat
 * -------------------------------------------------------------------------------
 */

:root {
  color-scheme: light;
  --bg: #fdfdf7;
  --fg: #17132b;
  --card: #ffffff;
  --muted: #f3f2ea;
  --muted-fg: #5f5b78;
  --accent: #ebe9f5;
  --border: #dedbeb;
  --primary: #6d3bff;
  --primary-fg: #ffffff;
  --cta: #eaff2f;
  --cta-fg: #141400;
  --link: #6d3bff;
  --ring: #6d3bff;
  --success: #00875f;
  --gold: #f59e0b;
  --ember: #d2520c;
  --water: #0b7fa6;
  --protein: #c42a6d;
  --carbs: #b06400;
  --fat: #6d3bff;
  --danger: #d6264b;
  --shadow: 0 20px 50px -30px rgb(23 19 43 / .35);
  --radius: 16px;
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b0a12;
    --fg: #f2f0f8;
    --card: #161320;
    --muted: #110e19;
    --muted-fg: #aaa4c0;
    --accent: #201c30;
    --border: #2f2944;
    --primary: #eaff2f;
    --primary-fg: #141400;
    --cta: #eaff2f;
    --cta-fg: #141400;
    --link: #eaff2f;
    --ring: #eaff2f;
    --success: #3ee68c;
    --gold: #ffb020;
    --ember: #ff6a2b;
    --water: #4cc9ff;
    --protein: #ff6b9d;
    --carbs: #ffa21f;
    --fat: #a07aff;
    --danger: #ff4d6d;
    --shadow: 0 20px 50px -30px rgb(0 0 0 / .8);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
h1, h2, h3, h4 { font-stretch: 90%; letter-spacing: 0; line-height: 1.06; font-weight: 700; margin: 0; text-wrap: balance; }
h1, h2 { font-weight: 800; }
h1 { font-size: clamp(2rem, 6.5vw, 2.9rem); margin: .4rem 0 .6rem; }
h2 { font-size: clamp(1.45rem, 4.2vw, 1.8rem); margin: 2.4rem 0 .7rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin: .3rem 0; }
li::marker { color: var(--muted-fg); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
strong, b { font-weight: 700; }
small, .muted { color: var(--muted-fg); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
img, svg { max-width: 100%; height: auto; }
code, kbd { font: .9em ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--accent); padding: .1em .35em; border-radius: 6px; }
.num { font-stretch: 87.5%; font-weight: 700; font-variant-numeric: tabular-nums; }
:where(a[href], button, summary, input, select, [tabindex]:not([tabindex="-1"])):focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--primary); color: var(--primary-fg); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.site-header .bar { max-width: 1120px; margin-inline: auto; padding-inline: 16px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-header .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); min-height: 44px; }
.site-header .brand img { width: 32px; height: 32px; border-radius: 9px; display: block; }
.site-header .brand span { font-stretch: 90%; font-weight: 800; font-size: 1.3rem; line-height: 1; letter-spacing: 0; }
.site-nav { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 999px; color: var(--muted-fg); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.site-nav a.btn { color: var(--cta-fg); margin-left: 4px; min-height: 40px; padding: 0 14px; }
@media (max-width: 560px) {
  /* brand on row one, links (and the CTA) on row two, so nothing overflows at 360px */
  .site-header .bar { flex-wrap: wrap; row-gap: 0; padding-bottom: 6px; }
  .site-header nav { flex: 1 1 100%; margin-top: -8px; }
  .site-nav { justify-content: space-between; }
  .site-nav a { padding: 0 6px; font-size: .9rem; }
  .site-nav a.btn { padding: 0 12px; margin-left: 0; }
}
@media (max-width: 380px) {
  /* five links (Blog, Foods, Exercises, Tools, Get the app) still fit one row at 320-360px */
  .site-nav a { padding: 0 4px; font-size: .85rem; }
  .site-nav a.btn { padding: 0 10px; }
}

/* ---------- main column ---------- */
main.wrap { width: 100%; max-width: calc(720px + 32px); margin-inline: auto; padding: 1.25rem 16px 3.5rem; flex: 1; }
main.wrap.wide { max-width: calc(1120px + 32px); }
.crumbs { font-size: .88rem; color: var(--muted-fg); margin: 0 0 1rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .4rem; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--border); }
.crumbs a { color: inherit; }
.crumbs [aria-current="page"] { color: var(--fg); font-weight: 600; }
.meta { color: var(--muted-fg); font-size: .92rem; margin: 0 0 1.4rem; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ember); margin: 0 0 .5rem; }

/* answer-first box */
.lede {
  margin: 0 0 1.5rem; padding: 1rem 1.15rem;
  border-radius: var(--radius); border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  background: var(--card); box-shadow: var(--shadow);
  font-size: 1.08rem; line-height: 1.55;
}
.lede p:last-child { margin-bottom: 0; }

/* stat tiles */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 1.25rem 0 1.75rem; padding: 0; list-style: none; }
.facts > * { margin: 0; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--card); }
.facts b { display: block; font-stretch: 87.5%; font-weight: 800; font-size: 1.55rem; line-height: 1.1; color: var(--primary); font-variant-numeric: tabular-nums; }
.facts span { display: block; font-size: .85rem; color: var(--muted-fg); margin-top: 4px; line-height: 1.3; }
.facts cite { display: block; font-style: normal; font-size: .72rem; color: var(--muted-fg); opacity: .85; margin-top: 4px; }
.facts-title { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-fg); margin: 1.25rem 0 -.75rem; }

/* step-by-step (HowTo) list */
.howto-steps { padding-left: 1.4rem; }
.howto-steps li { margin-bottom: .55rem; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.25rem -16px; padding: 0 16px; }
.table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: .95rem; background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.table th, .table td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { background: var(--muted); font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
.table tr:last-child td { border-bottom: 0; }
.table td.n, .table th.n { text-align: right; font-variant-numeric: tabular-nums; }
.table caption { text-align: left; caption-side: bottom; font-size: .85rem; color: var(--muted-fg); padding: .5rem 0; }

/* FAQ */
.faq { margin: 1rem 0 1.5rem; display: grid; gap: 8px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 0 1rem; }
.faq summary { cursor: pointer; list-style: none; padding: .85rem 0; font-weight: 700; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: var(--fg); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 .9rem; color: var(--fg); }

/* figures */
.figure { margin: 1.6rem 0 2rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.figure svg { display: block; width: 100%; height: auto; overflow: visible; }
.figure svg text { font-family: var(--font); fill: var(--fg); font-variant-numeric: tabular-nums; }
.figure svg .ax { stroke: var(--border); stroke-width: 1; }
.figure svg .mut { fill: var(--muted-fg); }
.figure figcaption { margin-top: .75rem; font-size: .88rem; color: var(--muted-fg); line-height: 1.45; }
.figure .fig-title { font-weight: 800; font-stretch: 90%; font-size: 1.1rem; margin: 0 0 .5rem; }
.fig-controls { display: none; gap: .75rem 1rem; flex-wrap: wrap; margin: 0 0 .9rem; align-items: end; }
html.js .fig-controls { display: flex; }
html.js .nojs-note { display: none; }
.nojs-note { font-size: .85rem; color: var(--muted-fg); margin: 0 0 .75rem; }
.fig-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: .75rem 0; }
.fig-out > div { border-radius: 12px; background: var(--muted); padding: 10px 12px; }
.fig-out b { display: block; font-stretch: 87.5%; font-weight: 800; font-size: clamp(1.15rem, 5.2vw, 1.5rem); line-height: 1.1; color: var(--primary); white-space: nowrap; }
.fig-out span { display: block; font-size: .82rem; color: var(--muted-fg); margin-top: 2px; }
.fig-out .warn b { color: var(--ember); }
.fig-out .good b { color: var(--success); }

/* form controls (figures + calculators) */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 140px; }
.field > span, .range > span { font-size: .82rem; font-weight: 600; color: var(--muted-fg); }
.field input, .field select {
  font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; min-height: 44px; padding: 0 12px; width: 100%;
}
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--ring); outline-offset: 0; border-color: var(--ring); }
.range { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; }
.range output { font-stretch: 87.5%; font-weight: 800; color: var(--primary); }
input[type="range"] { width: 100%; accent-color: var(--primary); height: 44px; margin: 0; cursor: pointer; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--muted); border: 1px solid var(--border); }
.seg button { font: inherit; font-weight: 700; font-size: .9rem; color: var(--muted-fg); background: transparent; border: 0; border-radius: 999px; min-height: 36px; padding: 0 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--cta); color: var(--cta-fg); }
.seg button:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; border: 1px solid var(--border); color: var(--muted-fg); }
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* callout / note */
.note { margin: 1.25rem 0; padding: .9rem 1rem; border-radius: 14px; background: var(--muted); border: 1px solid var(--border); font-size: .97rem; }
.note.warn { border-color: color-mix(in oklab, var(--ember) 45%, var(--border)); background: color-mix(in oklab, var(--ember) 10%, var(--card)); }

/* buttons + CTA */
.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 46px; padding: 0 1.25rem; border-radius: 999px;
  background: var(--cta); color: var(--cta-fg); text-decoration: none; font-weight: 700;
  box-shadow: 0 10px 30px -12px color-mix(in oklab, var(--cta) 75%, transparent);
  transition: transform .18s ease, box-shadow .18s ease; border: 0; font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px color-mix(in oklab, var(--cta) 85%, transparent); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--border); box-shadow: none; }
.cta { margin: 2.5rem 0 1.5rem; padding: 1.4rem 1.3rem; border-radius: 20px; border: 1px solid var(--border); background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 14%, var(--card)), var(--card) 70%); box-shadow: var(--shadow); }
.cta h2, .cta b.title { font-stretch: 90%; font-weight: 800; font-size: 1.35rem; line-height: 1.1; margin: 0 0 .4rem; display: block; }
.cta p { margin: 0 0 .9rem; color: var(--muted-fg); }
.cta .btn + .btn { margin-left: .5rem; }

/* sources + disclaimer */
.sources { font-size: .88rem; color: var(--muted-fg); padding-left: 1.3rem; }
.sources li { margin: .35rem 0; overflow-wrap: anywhere; }
.sources a { color: var(--link); }
.disclaimer { font-size: .85rem; color: var(--muted-fg); border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1.5rem; }

/* listing cards */
.card-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 1.5rem 0; padding: 0; list-style: none; }
.card {
  display: flex; flex-direction: column; gap: .4rem; min-height: 100%;
  padding: 1.1rem 1.15rem 1rem; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--card); color: inherit; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--primary) 50%, var(--border)); }
.card h2, .card h3 { font-size: 1.2rem; margin: 0; line-height: 1.12; }
.card p { margin: 0; color: var(--muted-fg); font-size: .95rem; flex: 1; }
.card-tag { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ember); }
.card-meta { font-size: .82rem; color: var(--muted-fg); margin-top: .35rem; }
.card .thumb { margin: -.3rem 0 .4rem; }
.card .thumb svg { width: 100%; height: auto; display: block; }

/* related posts (inside articles) */
.related { margin: 2rem 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.related li { margin: 0; }
.related a { display: block; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--card); text-decoration: none; color: var(--fg); font-weight: 600; }
.related a:hover { border-color: var(--primary); }
.related small { display: block; color: var(--muted-fg); font-weight: 400; }

/* footer */
/* footer: public/footer.css (linked by the footer itself, see scripts/site_footer.py) */

/* motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .fr-foot, .cta, .fig-controls { display: none !important; }
  body { font-size: 12pt; }
}

/* Blog illustrations (scripts/blog/gen_images.py): full-width, rounded, captioned; the hero sits under the title */
.photo { margin: 1.4rem 0 1.8rem; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--muted); }
.photo figcaption { margin-top: .55rem; font-size: .88rem; color: var(--muted-fg); line-height: 1.45; }
.photo.hero { margin-top: .6rem; }

/* ---------- blog article structure (scripts/blog/build.py, 18 Nov 2026) ----------
   Key takeaways is the one loud element: an ink scoreboard with acid-lime numbers, the app's own night look.
   Everything else (definition, contents, callouts, bottom line) stays quiet and card-coloured. */
.takeaways {
  margin: 1.25rem 0 1.5rem; padding: 1.1rem 1.1rem 1.15rem; border-radius: 20px;
  background: #17132b; color: #fdfdf7; box-shadow: var(--shadow);
  border: 1px solid #17132b;
}
.takeaways .kt-label { margin: 0 0 .75rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #eaff2f; display: flex; align-items: center; gap: .5rem; }
.takeaways .kt-label::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: #eaff2f; }
.takeaways .facts { margin: 0; gap: 8px; }
.takeaways .facts > * { background: rgb(253 253 247 / .06); border-color: rgb(253 253 247 / .12); }
.takeaways .facts b { color: #eaff2f; font-stretch: 75%; font-size: clamp(1.6rem, 6vw, 2rem); letter-spacing: -.01em; }
.takeaways .facts span { color: rgb(253 253 247 / .82); }
.takeaways .facts cite { color: rgb(253 253 247 / .58); opacity: 1; }
@media (prefers-color-scheme: dark) {
  .takeaways { background: #161320; border-color: color-mix(in oklab, #eaff2f 28%, #2f2944); }
}

.define { margin: 0 0 1.25rem; padding: .85rem 1rem; border-radius: 14px; background: var(--muted); border: 1px solid var(--border); font-size: 1rem; line-height: 1.55; }
.define-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-fg); margin-bottom: .2rem; }
.define dfn { font-style: normal; font-weight: 800; }

.onpage { margin: 0 0 1.75rem; padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--border); background: var(--card); }
.onpage-label { margin: 0 0 .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-fg); }
.onpage ol { margin: 0; padding-left: 1.25rem; columns: 2 16rem; column-gap: 1.75rem; font-size: .93rem; }
.onpage li { margin: 0 0 .3rem; break-inside: avoid; }
.onpage li::marker { font-weight: 700; font-variant-numeric: tabular-nums; }
.onpage a { color: var(--fg); text-decoration-color: var(--border); }
.onpage a:hover { text-decoration-color: var(--primary); }

/* sections: a hairline above each top-level H2 so the article reads in clear blocks */
.post > h2 { padding-top: 1.5rem; border-top: 1px solid var(--border); }
.post > h3 { color: var(--fg); }

.callout { --c: var(--primary); margin: 1.5rem 0; padding: .9rem 1rem .95rem 1.1rem; border-radius: 14px; border: 1px solid var(--border); border-left: 4px solid var(--c); background: color-mix(in oklab, var(--c) 6%, var(--card)); }
.callout > :last-child { margin-bottom: 0; }
.callout ul { margin-bottom: 0; }
.callout-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c); margin-bottom: .3rem; }
.callout.warn { --c: var(--ember); }
.callout.key { --c: var(--success); }

.bottom-line { margin: 2.5rem 0 1rem; padding: 1.1rem 1.15rem; border-radius: 18px; border: 2px solid var(--fg); background: var(--card); }
.bottom-line h2 { margin: 0 0 .5rem; font-size: 1.25rem; display: inline; background: linear-gradient(transparent 58%, color-mix(in oklab, #eaff2f 85%, transparent) 58%); }
@media (prefers-color-scheme: dark) { .bottom-line h2 { background: none; color: #eaff2f; } }
.bottom-line p { margin: .6rem 0 0; font-size: 1.04rem; }

/* comparison tables: first column reads as the row label */
.table.compare td:first-child { font-weight: 700; }
.table tbody tr:nth-child(even) td { background: color-mix(in oklab, var(--muted) 55%, var(--card)); }
/* a number split into spans inside a result tile stays on one line */
.fig-out b span { display: inline; font-size: inherit; color: inherit; margin: 0; }

/* HowTo steps: a real sequence, so numbered step cards */
.howto-steps { list-style: none; counter-reset: step; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: 8px; }
.howto-steps li { counter-increment: step; position: relative; margin: 0; padding: .75rem .95rem .75rem 3.2rem; border: 1px solid var(--border); border-radius: 14px; background: var(--card); scroll-margin-top: 5rem; }
.howto-steps li::before { content: counter(step); position: absolute; left: .85rem; top: .72rem; width: 1.75rem; height: 1.75rem; border-radius: 999px; display: grid; place-items: center; background: var(--fg); color: var(--bg); font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; }

/* Key takeaways: an odd last tile spans the row instead of sitting alone */
@media (min-width: 640px) { .takeaways .facts > :last-child:nth-child(4n+1) { grid-column: 1 / -1; } }

/* Keep reading: picture cards */
.related { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.related a { height: 100%; padding: 0; overflow: hidden; border-radius: 16px; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease; }
.related a:hover { transform: translateY(-2px); }
.related a > span { display: block; padding: .7rem .9rem .85rem; }
.related a b { display: block; font-stretch: 90%; font-weight: 800; line-height: 1.15; }
.related a img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--muted); }
