/* METABOLIQ stylesheet. Mobile-first. One accent (pine green), two typefaces. */

/* Fonts are served from this site (Latin subsets, SIL Open Font License), so no request goes to a font host. */
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap;
  src: url(../fonts/bricolage-grotesque-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Sans 3'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/source-sans-3-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Sans 3'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/source-sans-3-italic-latin.woff2) format('woff2');
}

:root {
  --paper: #f4f6f3;
  --surface: #ffffff;
  --sunken: #ebefea;
  --ink: #17211d;
  --ink-soft: #37433e;
  --muted: #56625c;
  --line: #d6ddd7;
  --line-strong: #aab5ae;
  --accent: #0a6b50;
  --accent-strong: #08543f;
  --accent-tint: #e2f0ea;
  --on-accent: #ffffff;
  --result-bg: #0d3b2e;
  --result-ink: #f2f7f4;
  --result-muted: #b4cdc2;
  --result-line: rgba(255, 255, 255, 0.16);
  --warn-bg: #fdf3dc;
  --warn-ink: #6b4300;
  --warn-line: #e6c987;
  --focus: #0a6b50;

  --font-display: 'Bricolage Grotesque', 'Source Sans 3', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --radius: 10px;
  --radius-lg: 16px;
  --wrap: 1120px;
  --measure: 68ch;
}

[data-theme="dark"] {
  --paper: #0f1513;
  --surface: #171f1c;
  --sunken: #1d2723;
  --ink: #e9eeeb;
  --ink-soft: #cdd6d1;
  --muted: #9eaba4;
  --line: #2a3632;
  --line-strong: #46564f;
  --accent: #5fd0a6;
  --accent-strong: #84dfbc;
  --accent-tint: #173329;
  --on-accent: #06241a;
  --result-bg: #12382c;
  --result-ink: #f2f7f4;
  --result-muted: #a9c6b9;
  --warn-bg: #33280f;
  --warn-ink: #f3d489;
  --warn-line: #6b5520;
  --focus: #84dfbc;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; }
img, svg, canvas { max-width: 100%; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 720px) { .wrap { padding: 0 var(--s6); } }

.skip-link {
  position: absolute; left: var(--s4); top: -100px;
  background: var(--ink); color: var(--paper); padding: var(--s3) var(--s4); border-radius: var(--radius); z-index: 10;
}
.skip-link:focus { top: var(--s3); color: var(--paper); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand toggle" "nav nav";
  align-items: center; column-gap: var(--s4);
}
.wordmark {
  grid-area: brand; justify-self: start;
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.01em;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 56px;
}
.wordmark:hover { color: var(--accent); }

.site-nav { grid-area: nav; min-width: 0; margin: 0 calc(var(--s4) * -1); border-top: 1px solid var(--line); }
.site-nav ul { list-style: none; display: flex; overflow-x: auto; scrollbar-width: none; padding: 0 var(--s2); }
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 var(--s2); margin: 0 2px;
  color: var(--ink-soft); text-decoration: none; font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

.theme-toggle {
  grid-area: toggle; width: 44px; height: 44px; display: inline-grid; place-items: center;
  background: transparent; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (min-width: 860px) {
  .header-inner { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav toggle"; column-gap: var(--s6); }
  .wordmark { min-height: 72px; font-size: 1.35rem; }
  .site-nav { margin: 0; border-top: 0; }
  .site-nav ul { overflow: visible; padding: 0; gap: var(--s2); }
  .site-nav a { min-height: 72px; padding: 0 var(--s3); margin: 0; }
}
.site-footer .wordmark { min-height: 44px; }

/* ---------- Page intro ---------- */

.intro { padding: var(--s6) 0 var(--s5); }
@media (min-width: 720px) { .intro { padding: var(--s7) 0 var(--s6); } }

h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 6.2vw, 3.25rem); line-height: 1.08; letter-spacing: -0.03em;
  max-width: 18ch; text-wrap: balance;
}
.intro .answer { margin-top: var(--s4); max-width: 62ch; font-size: 1.125rem; color: var(--ink-soft); }
.updated { margin-top: var(--s3); font-size: 0.9375rem; color: var(--muted); }

/* ---------- Calculator layout ---------- */

.calc { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: start; }
@media (min-width: 940px) {
  .calc { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s6); }
  .calc .result { position: sticky; top: var(--s5); }
}

.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--s5) var(--s4);
}
@media (min-width: 520px) { .form { padding: var(--s6); } }

.form h2 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: var(--s5); }

.field { margin-bottom: var(--s5); border: 0; padding: 0; min-width: 0; }
.field:last-of-type { margin-bottom: var(--s5); }
.field > label, .field > legend, .field-label {
  display: block; font-weight: 600; font-size: 1rem; margin-bottom: var(--s2); color: var(--ink); padding: 0;
}
.optional { font-weight: 400; color: var(--muted); }
.hint { font-size: 0.9375rem; color: var(--muted); margin-top: var(--s2); }
.error { font-size: 0.9375rem; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: var(--s2) var(--s3); margin-top: var(--s2); }
.error[hidden] { display: none; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.grid-2 .field { margin-bottom: var(--s5); }

.control { position: relative; display: flex; }
.control input, .control select, .input {
  width: 100%; min-width: 0; height: 50px; padding: 0 var(--s4);
  font: inherit; font-size: 1.0625rem; color: var(--ink); font-variant-numeric: tabular-nums;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  appearance: none; -webkit-appearance: none;
}
.control input[type="number"] { -moz-appearance: textfield; }
.control input::-webkit-outer-spin-button, .control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.control input:hover, .control select:hover { border-color: var(--ink-soft); }
.control input:focus-visible, .control select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
.control input[aria-invalid="true"] { border-color: var(--warn-ink); }
.control .unit {
  position: absolute; right: var(--s4); top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 0.9375rem; pointer-events: none;
}
.control.has-unit input { padding-right: 3.2rem; }
.control select {
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%2356625c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
[data-theme="dark"] .control select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%239eaba4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Segmented radio group */
.segmented { display: flex; background: var(--sunken); border-radius: var(--radius); padding: 4px; gap: 4px; }
.segmented label { flex: 1; position: relative; margin: 0; }
.segmented input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.segmented span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 0 var(--s2);
  border-radius: 7px; font-weight: 500; color: var(--ink-soft); line-height: 1.2;
}
.segmented input:hover + span { color: var(--ink); }
.segmented input:checked + span { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(23, 33, 29, 0.14), 0 0 0 1px var(--line); }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 52px; padding: 0 var(--s5); width: 100%;
  font: inherit; font-weight: 600; font-size: 1.0625rem; text-decoration: none; cursor: pointer;
  color: var(--on-accent); background: var(--accent); border: 0; border-radius: var(--radius);
}
.btn:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn:active { transform: translateY(1px); }
.btn-quiet {
  width: auto; min-height: 44px; padding: 0 var(--s4); font-size: 1rem;
  color: var(--ink); background: transparent; border: 1.5px solid var(--line-strong);
}
.btn-quiet:hover { background: var(--sunken); color: var(--ink); border-color: var(--ink-soft); }

/* ---------- Result panel ---------- */

.result {
  background: var(--result-bg); color: var(--result-ink); border-radius: var(--radius-lg);
  padding: var(--s5) var(--s4) var(--s4); overflow: hidden; position: relative;
}
@media (min-width: 520px) { .result { padding: var(--s6) var(--s6) var(--s5); } }

/* Tape-measure ticks along the top edge: the one decorative motif on the site. */
.result::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; opacity: 0.55;
  background:
    repeating-linear-gradient(90deg, var(--result-muted) 0 1px, transparent 1px 40px) 0 0 / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, var(--result-muted) 0 1px, transparent 1px 8px) 0 0 / 100% 7px no-repeat;
}

.result h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--result-muted); margin-top: var(--s3); }
.result .big {
  font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: clamp(3.2rem, 15vw, 5.25rem); line-height: 1; letter-spacing: -0.025em; margin-top: var(--s2); color: #ffffff;
}
.result .big.is-text { font-size: clamp(2.2rem, 9.5vw, 3.4rem); letter-spacing: -0.03em; line-height: 1.05; }
.result .big-unit { font-size: 1.0625rem; color: var(--result-muted); margin-top: var(--s2); }
.result .note { margin-top: var(--s4); font-size: 1rem; color: var(--result-ink); }
.result .note strong { color: #ffffff; }
.result a { color: #ffffff; }

.rows { margin-top: var(--s5); border-top: 1px solid var(--result-line); }
.rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--result-line); }
.rows dt { color: var(--result-muted); font-size: 1rem; flex: 0 1 46%; }
.rows dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; flex: 1; }
.rows dd small { display: block; font-weight: 400; font-size: 0.9375rem; color: var(--result-muted); }

.result .fine { margin-top: var(--s4); font-size: 0.9375rem; color: var(--result-muted); }
.result.is-empty .big { color: var(--result-muted); }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-top: var(--s4); }
.trio div { border-top: 1px solid var(--result-line); padding-top: var(--s3); }
.trio .big { font-size: clamp(2rem, 9vw, 3.25rem); margin-top: 0; }
.trio .lbl { color: var(--result-muted); font-size: 1rem; font-weight: 600; }
.trio .sub { color: var(--result-muted); font-size: 0.9375rem; margin-top: var(--s1); }

/* ---------- Content ---------- */

.section { padding: var(--s7) 0 0; }
.section-tight { padding: var(--s6) 0 0; }

.prose { max-width: var(--measure); }
.prose h2, .panel h2 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 4.4vw, 1.9rem);
  line-height: 1.15; letter-spacing: -0.02em; margin-top: var(--s7); text-wrap: balance;
}
.prose > h2:first-child, .panel > h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--font-body); font-size: 1.1875rem; font-weight: 700; line-height: 1.3; margin-top: var(--s5); }
.prose p, .prose ul, .prose ol { margin-top: var(--s4); color: var(--ink-soft); }
.prose h2 + p, .prose h3 + p { margin-top: var(--s3); }
.prose h3 + p { margin-top: var(--s2); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-top: var(--s2); }
.prose strong { color: var(--ink); }
.prose code, .formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9375rem;
}
.formula {
  margin-top: var(--s4); padding: var(--s4); background: var(--sunken); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink); overflow-wrap: anywhere; line-height: 1.7;
}

.callout { margin-top: var(--s5); padding: var(--s4); border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius); }
.callout strong { color: inherit; }
.callout a { color: inherit; }

.disclosure { margin-top: var(--s3); font-size: 0.9375rem; color: var(--muted); }

.table-scroll { margin-top: var(--s4); overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-scroll:focus-visible { outline-offset: 2px; }
/* Captions wrap inside the visible width even when the table itself is wider and scrolls. */
.table-scroll { container-type: inline-size; }
caption { white-space: normal; }
/* The caption text sits in a span that is as wide as the visible box, not as wide as the (possibly wider) table. */
@supports (width: 100cqw) { .table-scroll caption span { display: block; position: sticky; left: var(--s4); max-width: calc(100cqw - 2 * var(--s4)); } }
.scroll-hint { margin: var(--s4) 0 calc(-1 * var(--s2)); color: var(--muted); font-size: 0.875rem; }
.scroll-hint::after { content: " \2192"; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: var(--s3) var(--s4); font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
th, td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-weight: 600; color: var(--muted); font-size: 0.9375rem; white-space: nowrap; background: var(--sunken); }
tbody th { font-weight: 600; color: var(--ink); min-width: 8.5rem; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
@media (max-width: 519px) { th, td, caption { padding: 10px 12px; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s5) var(--s4); }
@media (min-width: 520px) { .panel { padding: var(--s6); } }
.panel h2 { margin-top: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s4); }
.panel-head p { color: var(--muted); margin-top: var(--s2); max-width: 60ch; }

.chart-box { margin-top: var(--s5); max-width: 760px; }
.chart-status { color: var(--muted); padding: var(--s6) 0; text-align: center; }

.related { list-style: none; margin-top: var(--s4); padding: 0; border-top: 1px solid var(--line); max-width: var(--measure); }
.related li { border-bottom: 1px solid var(--line); margin: 0; }
.related a { display: block; padding: var(--s4) 0; text-decoration: none; color: var(--ink); }
.related a strong { display: block; font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; }
.related a span { display: block; color: var(--muted); margin-top: 2px; }
.related a:hover strong { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.sources { font-size: 0.9375rem; }
.sources li { margin-top: var(--s3); }

details.more { margin-top: var(--s5); border-top: 1px solid var(--line); }
details.more summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; color: var(--accent); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; display: inline-block; width: 1.25rem; font-weight: 700; }
details.more[open] summary::before { content: "\2212"; }
details.more .table-scroll { margin-top: 0; }

.article-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
.toc { display: none; }
@media (min-width: 1000px) {
  .article-grid { grid-template-columns: minmax(0, 68ch) minmax(200px, 260px); justify-content: space-between; }
  .toc { display: block; position: sticky; top: var(--s5); align-self: start; border-left: 1px solid var(--line); padding-left: var(--s5); }
  .toc h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin-bottom: var(--s2); }
  .toc ul { list-style: none; }
  .toc a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; line-height: 1.35; font-size: 1rem; }
  .toc a:hover { color: var(--accent); text-decoration: underline; }
}

/* Ad slots: height is reserved so the page does not jump when an ad loads. */
.ad-slot { margin: var(--s7) 0 0; }
.ad-slot .ad-label { font-size: 0.8125rem; color: var(--muted); margin-bottom: var(--s1); }
.ad-slot .ad-box { min-height: 250px; background: var(--sunken); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .ad-slot .ad-box { min-height: 120px; } }

/* ---------- Footer ---------- */

.site-footer { margin-top: var(--s8); border-top: 1px solid var(--line); background: var(--surface); padding: var(--s7) 0 var(--s6); font-size: 1rem; }
.footer-grid { display: grid; gap: var(--s6); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.5fr 1.1fr 1.1fr 1fr 1fr; } }
.site-footer h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin-bottom: var(--s2); }
.site-footer ul { list-style: none; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); text-decoration: none; }
.site-footer li a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .about { color: var(--muted); max-width: 36ch; margin-top: var(--s2); }
.legal { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; }

/* ---------- Simple text pages ---------- */

.page { padding-top: var(--s6); }
@media (min-width: 720px) { .page { padding-top: var(--s7); } }
.page .prose > h1 + p { margin-top: var(--s4); font-size: 1.125rem; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .control input, .control select, .segmented span, .theme-toggle, a { transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
}

/* ---------- Result tools: copy link, print, clear ---------- */

.tools { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--result-line); }
.btn-tool {
  min-height: 44px; padding: 0 var(--s4); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  color: var(--result-ink); background: transparent; border: 1.5px solid var(--result-line); border-radius: var(--radius);
}
.btn-tool:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--result-muted); }
.btn-tool:focus-visible { outline: 3px solid #ffffff; outline-offset: 2px; }
.share-field {
  width: 100%; margin-top: var(--s3); min-height: 44px; padding: 0 var(--s3); font: inherit; font-size: 1rem;
  color: var(--result-ink); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--result-line); border-radius: var(--radius);
}
.tools-status { color: var(--result-muted); font-size: 0.9375rem; margin-top: var(--s2); min-height: 1.4em; }
.tools-status:empty { display: none; }

/* ---------- Trust strip under each calculator ---------- */

.trust { list-style: none; display: grid; gap: var(--s2) var(--s5); margin: var(--s5) 0 0; padding: var(--s4) 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; }
.trust li { margin: 0; }
.trust span { color: var(--ink-soft); font-weight: 600; }
@media (min-width: 720px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Position on a scale ---------- */

.scale { margin-top: var(--s5); }
.scale-bar { position: relative; display: flex; height: 34px; border-radius: 8px; }
.scale-seg {
  display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap;
  font-size: 0.8125rem; font-weight: 600; color: var(--result-ink); border-right: 2px solid var(--result-bg);
}
.scale-seg:first-child { border-radius: 8px 0 0 8px; }
.scale-seg:nth-last-child(2) { border-radius: 0 8px 8px 0; border-right: 0; }
/* Tints of one hue: position is shown by the marker and stated in words, never by red or green. */
.scale-seg-0 { background: rgba(255, 255, 255, 0.10); }
.scale-seg-1 { background: rgba(255, 255, 255, 0.26); }
.scale-seg-2 { background: rgba(255, 255, 255, 0.17); }
.scale-seg-3 { background: rgba(255, 255, 255, 0.10); }
.scale-marker {
  position: absolute; top: -7px; bottom: -7px; width: 4px; margin-left: -2px; border-radius: 2px;
  background: #ffffff; box-shadow: 0 0 0 2px var(--result-bg);
}
.scale-caption { color: var(--result-muted); font-size: 0.9375rem; margin-top: var(--s3); }

/* ---------- SVG chart ---------- */

.chart-svg { display: block; width: 100%; height: auto; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-tick { fill: var(--muted); font-size: 13px; font-family: var(--font-body); }
.chart-band { fill: var(--accent); opacity: 0.16; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--accent); }
.chart-target { stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 3 5; }
.chart-label { fill: var(--muted); font-size: 13px; font-family: var(--font-body); }
.chart-label-strong { fill: var(--ink); font-weight: 700; font-size: 14px; }
.chart-caption { color: var(--muted); font-size: 0.9375rem; margin-top: var(--s3); max-width: var(--measure); }

tr.is-current th, tr.is-current td { background: var(--accent-tint); }
.table-note { color: var(--muted); font-size: 0.9375rem; margin-top: var(--s3); max-width: var(--measure); }
.crumbs { padding-top: var(--s5); color: var(--muted); font-size: 0.9375rem; }
.crumbs a { color: var(--muted); }
.crumbs + .intro { padding-top: var(--s4); }
.report { display: none; }

/* ---------- Print: a report built by core.js, not the web page ---------- */

@page {
  size: letter;
  margin: 0.7in 0.7in 0.85in;
  @bottom-left { content: "biometrics-pro.vercel.app  ·  Estimates for healthy adults. Not medical advice."; font: 8pt 'Source Sans 3', Arial, sans-serif; color: #444; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 8pt 'Source Sans 3', Arial, sans-serif; color: #444; }
}

@media print {
  :root, [data-theme="dark"] { --ink: #000; --muted: #333; --line: #bbb; --accent: #0a6b50; --paper: #fff; --surface: #fff; }
  html { font-size: 10.5pt; }
  body { background: #fff !important; color: #000; font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif; line-height: 1.4; }
  body > :not(main), main > .wrap.has-report > :not(.report), .toc, .crumbs, .skip-link, .scroll-hint { display: none !important; }
  .prose { max-width: none; } .prose table { font-size: 9pt; } .prose tr { break-inside: avoid; } .prose h2 { break-after: avoid; }
  .table-scroll { overflow: visible; border: 0; }
  .wrap { max-width: none; padding: 0; margin: 0; }
  .report { display: block; color: #000; }
  .report a { color: #000; text-decoration: none; }

  .report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24pt; border-bottom: 1.5pt solid #0a6b50; padding-bottom: 8pt; margin-bottom: 16pt; }
  .report-brand { font-family: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif; font-weight: 800; font-size: 15pt; letter-spacing: 0.02em; }
  .report-title { text-align: right; }
  .report-title strong { display: block; font-family: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif; font-size: 13pt; font-weight: 700; }
  .report-title span { display: block; font-size: 9pt; color: #333; margin-top: 2pt; }

  .report-section { margin: 0 0 14pt; }
  .report-section h2 { font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif; font-size: 9pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #333; margin: 0 0 5pt; break-after: avoid; }
  .report-figure { font-family: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif; font-size: 26pt; font-weight: 700; line-height: 1.1; color: #0a6b50; font-variant-numeric: tabular-nums; margin: 0; }
  .report-unit { font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif; font-size: 11pt; font-weight: 400; color: #000; }
  .report-label { font-size: 9.5pt; color: #333; margin: 2pt 0 0; }
  .report-note { margin: 6pt 0 0; max-width: 6.2in; }
  .report-small { font-size: 8.5pt; color: #333; margin: 4pt 0 0; }

  .report table { width: 100%; border-collapse: collapse; margin: 0; font-size: 9.5pt; background: none; border: 0; }
  .report caption { text-align: left; font-size: 8.5pt; color: #333; padding: 0 0 3pt; }
  .report thead { display: table-header-group; }
  .report table { break-inside: avoid; }
  .report table.report-long { break-inside: auto; } /* long tables may continue on the next page; rows never split and the header repeats */
  .report tr { break-inside: avoid; }
  .report th, .report td { padding: 3.5pt 6pt 3.5pt 0; border: 0; border-bottom: 0.5pt solid #bbb; text-align: left; vertical-align: top; background: none !important; color: #000; font-weight: 400; }
  .report thead th { font-weight: 700; border-bottom: 0.75pt solid #000; }
  .report tbody th { font-weight: 600; }
  .report td.num, .report th.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; padding-left: 6pt; white-space: nowrap; }
  .report tr.is-current th, .report tr.is-current td { font-weight: 700; }
  .report-details th { width: 20%; font-weight: 400; color: #333; }
  .report-details td { width: 30%; font-weight: 600; }
  .report .optional { color: #333; font-weight: 400; }

  .report-chart { margin: 0 0 6pt; break-inside: avoid; }
  .report-chart svg { display: block; width: 100%; max-width: 5.6in; height: auto; }
  .report-chart figcaption { font-size: 8.5pt; color: #333; margin-top: 3pt; }
  .chart-line { stroke: #0a6b50; } .chart-dot { fill: #0a6b50; } .chart-band { fill: #000; opacity: 0.1; }
  .chart-grid { stroke: #ccc; } .chart-tick, .chart-label { fill: #333; } .chart-label-strong { fill: #000; } .chart-target { stroke: #000; }

  .report-method { break-inside: avoid; }
  .report-method p { margin: 0 0 3pt; font-size: 9.5pt; max-width: 6.4in; }
  .report-end { margin-top: 14pt; padding-top: 6pt; border-top: 0.5pt solid #bbb; font-size: 8.5pt; color: #333; }
}
