/* ==========================================================================
   Life Calculator — design system
   One stylesheet, no webfonts, no third-party requests.
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #0e1729;
  --ink-2: #44526b;
  --ink-3: #6b7893;
  --line: #dfe4ee;
  --line-2: #c6cede;

  --primary: #4338ca;
  --primary-ink: #ffffff;
  --primary-soft: #eceafb;
  --accent: #b45309;
  --accent-soft: #fdf2e2;
  --good: #047857;
  --good-soft: #e4f3ee;
  --warn: #b91c1c;
  --warn-soft: #fdecec;
  --focus: #2563eb;

  --sh-1: 0 1px 2px rgba(14, 23, 41, .06);
  --sh-2: 0 1px 3px rgba(14, 23, 41, .07), 0 10px 26px rgba(14, 23, 41, .07);
  --r: 10px;
  --r-lg: 16px;
  --wrap: 1200px;
  --measure: 70ch;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a1020;
  --surface: #121b2e;
  --surface-2: #1a2438;
  --ink: #e6ecf7;
  --ink-2: #a9b6cd;
  --ink-3: #7d8aa4;
  --line: #26314a;
  --line-2: #35425e;
  --primary: #a5b4fc;
  --primary-ink: #0a1020;
  --primary-soft: #1c2245;
  --accent: #fbbf24;
  --accent-soft: #2a2113;
  --good: #34d399;
  --good-soft: #10281f;
  --warn: #f87171;
  --warn-soft: #2b1717;
  --focus: #8ab4ff;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-2: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1020; --surface: #121b2e; --surface-2: #1a2438;
    --ink: #e6ecf7; --ink-2: #a9b6cd; --ink-3: #7d8aa4;
    --line: #26314a; --line-2: #35425e;
    --primary: #a5b4fc; --primary-ink: #0a1020; --primary-soft: #1c2245;
    --accent: #fbbf24; --accent-soft: #2a2113;
    --good: #34d399; --good-soft: #10281f;
    --warn: #f87171; --warn-soft: #2b1717;
    --focus: #8ab4ff;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
    --sh-2: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: .16em; }
a:hover { color: var(--accent); }
:where(a, button, summary, input, select, [tabindex]):focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 2.25rem 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.15rem; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--primary); color: var(--primary-ink); padding: .7rem 1.15rem; }
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------- header --- */
.hdr {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.hdr__in { display: flex; align-items: center; gap: .8rem; min-height: 3.65rem; }
.logo {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 750; font-size: 1.06rem; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.logo__m {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  background: var(--primary); color: var(--primary-ink);
  display: grid; place-items: center; font-size: .95rem; font-weight: 800;
}
.logo:hover { color: var(--primary); }

.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .45rem .65rem; border-radius: 8px;
  font-size: .915rem; font-weight: 550; color: var(--ink-2); text-decoration: none;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }

.iconbtn {
  flex: none; width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink-2); cursor: pointer; padding: 0;
}
.iconbtn:hover { border-color: var(--line-2); color: var(--ink); }
.iconbtn svg { width: 17px; height: 17px; }
#theme-toggle .i-moon { display: none; }
[data-theme="dark"] #theme-toggle .i-moon { display: block; }
[data-theme="dark"] #theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme-toggle .i-moon { display: block; }
  :root:not([data-theme="light"]) #theme-toggle .i-sun { display: none; }
}
.navbtn { display: none; }
@media (max-width: 900px) {
  .navbtn { display: grid; margin-left: auto; }
  .hdr__in { flex-wrap: wrap; }
  .nav { margin-left: 0; order: 10; flex-basis: 100%; display: none; padding-bottom: .6rem; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { padding: .65rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
}

/* --------------------------------------------------------- typography --- */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.022em; margin: 0 0 .55em; font-weight: 720; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 1.14rem + .75vw, 1.6rem); margin-top: 2.3em; }
h3 { font-size: clamp(1.08rem, 1.02rem + .3vw, 1.2rem); margin-top: 1.9em; }
p { margin: 0 0 1.1em; }
strong { font-weight: 650; }
.lead { font-size: clamp(1.04rem, 1rem + .3vw, 1.18rem); color: var(--ink-2); line-height: 1.6; }
.mono { font-family: var(--mono); font-size: .93em; }

.crumbs { font-size: .84rem; color: var(--ink-3); margin: 1.15rem 0 .9rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.crumbs li::after { content: "/"; margin-left: .35rem; color: var(--line-2); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }

.page { padding-bottom: 3.5rem; }

.tag {
  display: inline-block; font-size: .7rem; font-weight: 750; letter-spacing: .07em;
  text-transform: uppercase; color: var(--primary); background: var(--primary-soft);
  padding: .26rem .6rem; border-radius: 6px; text-decoration: none;
}
.meta { display: flex; flex-wrap: wrap; gap: .3rem .75rem; font-size: .84rem; color: var(--ink-3); margin-top: .9rem; }
.meta .sep { color: var(--line-2); }

/* ========================================================== CALCULATOR === */
.calc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-2);
  overflow: hidden; margin: 1.6rem 0 2.4rem;
}
.calc__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .calc__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }

.calc__in { padding: 1.4rem 1.5rem; }
.calc__out {
  padding: 1.4rem 1.5rem; background: var(--surface-2);
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .calc__out { border-top: 0; border-left: 1px solid var(--line); } }

.calc__legendtitle {
  font-size: .7rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 1rem;
}

.f { margin-bottom: 1.05rem; }
.f:last-child { margin-bottom: 0; }
.f__top { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .35rem; }
.f__lab { font-size: .875rem; font-weight: 600; color: var(--ink); }
.f__hint { font-size: .76rem; color: var(--ink-3); }
.f__wrap { position: relative; display: flex; align-items: center; }
.f__pre, .f__suf {
  position: absolute; font-size: .9rem; color: var(--ink-3); pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.f__pre { left: .7rem; }
.f__suf { right: .75rem; }
.f input[type="number"], .f input[type="text"], .f input[type="date"], .f input[type="time"], .f select {
  font: inherit; font-size: .97rem; width: 100%;
  padding: .55rem .7rem; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.f.has-pre input { padding-left: 1.65rem; }
.f.has-suf input { padding-right: 2.6rem; }
.f input:focus { border-color: var(--primary); }
.f select { cursor: pointer; }

.f input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px;
  background: transparent; margin: .35rem 0 0; cursor: pointer;
}
.f input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: var(--line-2); }
.f input[type="range"]::-moz-range-track { height: 5px; border-radius: 999px; background: var(--line-2); }
.f input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--surface); margin-top: -6px;
  box-shadow: 0 0 0 1px var(--line-2);
}
.f input[type="range"]::-moz-range-thumb {
  width: 17px; height: 17px; border-radius: 50%; background: var(--primary);
  border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2);
}
.f__pair { display: grid; grid-template-columns: 1fr; gap: .45rem; }
.f__radio { display: flex; flex-wrap: wrap; gap: .4rem; }
.f__radio label {
  font-size: .86rem; padding: .4rem .75rem; border: 1px solid var(--line-2);
  border-radius: 999px; cursor: pointer; color: var(--ink-2); background: var(--surface);
}
.f__radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.f__radio input:checked + span { color: var(--primary-ink); }
.f__radio label:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.f__radio label:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

.calc__two { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 1rem; }

.res__hero { margin-bottom: 1.1rem; }
.res__label { font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.res__big {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.5rem); font-weight: 780; letter-spacing: -.03em;
  color: var(--primary); font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: .1rem;
}
.res__sub { font-size: .86rem; color: var(--ink-3); margin-top: .2rem; }

.res__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.res__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: .9rem;
  padding: .48rem 0; border-bottom: 1px solid var(--line); font-size: .92rem;
}
.res__row:last-child { border-bottom: 0; }
.res__row dt { color: var(--ink-2); }
.res__row dd { margin: 0; font-weight: 680; font-variant-numeric: tabular-nums; text-align: right; }
.res__row.em dd { color: var(--good); }
.res__row.neg dd { color: var(--warn); }

.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 1rem 0 .55rem; }
.bar span { display: block; height: 100%; }
.key { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .79rem; color: var(--ink-2); }
.key i { display: inline-block; width: .62rem; height: .62rem; border-radius: 3px; margin-right: .32rem; vertical-align: -1px; }

.note {
  margin-top: 1.05rem; padding: .7rem .85rem; border-radius: 8px;
  background: var(--primary-soft); color: var(--ink-2);
  font-size: .855rem; line-height: 1.5;
}
.note.is-warn { background: var(--warn-soft); }
.note.is-good { background: var(--good-soft); }

.calc__foot {
  padding: .85rem 1.5rem; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--ink-3); background: var(--surface);
  display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between;
}
.btn-reset {
  font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line-2);
  padding: .32rem .75rem; border-radius: 7px; cursor: pointer;
}
.btn-reset:hover { color: var(--ink); border-color: var(--ink-3); }

/* --------------------------------------------------------------- prose -- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.75rem; align-items: start; }
@media (min-width: 1080px) { .layout { grid-template-columns: minmax(0, 1fr) 15.5rem; } }

.prose { max-width: var(--measure); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--ink-3); }
.prose h2, .prose h3 { position: relative; scroll-margin-top: 5rem; }
.anch { position: absolute; left: -1em; width: 1em; opacity: 0; text-decoration: none; color: var(--ink-3); font-weight: 400; }
.prose h2:hover .anch, .prose h3:hover .anch, .anch:focus-visible { opacity: 1; }
@media (max-width: 820px) { .anch { display: none; } }

.prose blockquote {
  margin: 1.6em 0; padding: .95rem 1.15rem; border-left: 3px solid var(--line-2);
  background: var(--surface); border-radius: 0 var(--r) var(--r) 0; color: var(--ink-2); font-size: .96rem;
}
.prose blockquote > :last-child { margin-bottom: 0; }
.prose blockquote strong { color: var(--ink); }
.prose blockquote.is-note { border-left-color: var(--primary); background: var(--primary-soft); }
.prose blockquote.is-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.prose blockquote.is-formula { border-left-color: var(--accent); background: var(--accent-soft); font-family: var(--mono); font-size: .9rem; }
.prose blockquote.is-example { border-left-color: var(--good); background: var(--good-soft); }

.tw { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .91rem; }
thead th {
  background: var(--surface-2); color: var(--ink); text-align: left; white-space: nowrap;
  font-size: .74rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase;
  padding: .65rem .85rem; border-bottom: 1px solid var(--line-2);
}
tbody td, tbody th { padding: .62rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; font-variant-numeric: tabular-nums; }
tbody th { font-weight: 620; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }

.keypoints {
  margin: 0 0 2rem; padding: 1.15rem 1.3rem; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: var(--r);
}
.keypoints h2 { margin: 0 0 .7rem; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 750; }
.keypoints ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.keypoints li { position: relative; padding-left: 1.4rem; font-size: .95rem; }
.keypoints li::before { content: ""; position: absolute; left: 0; top: .55em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--primary); }

.toc { position: sticky; top: 4.8rem; display: none; }
@media (min-width: 1080px) { .toc { display: block; } }
.toc p { font-size: .7rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .6rem; }
.toc ul { list-style: none; margin: 0; padding-left: .8rem; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .28rem 0; font-size: .85rem; line-height: 1.4; color: var(--ink-3); text-decoration: none; }
.toc a:hover { color: var(--primary); }
.toc a.on { color: var(--primary); font-weight: 620; }
.toc .l3 a { padding-left: .8rem; font-size: .81rem; }

.tocm { margin: 1.5rem 0; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
@media (min-width: 1080px) { .tocm { display: none; } }
.tocm summary { cursor: pointer; font-weight: 650; font-size: .93rem; list-style: none; }
.tocm summary::-webkit-details-marker { display: none; }
.tocm summary::after { content: " \25BE"; color: var(--ink-3); }
.tocm[open] summary::after { content: " \25B4"; }
.tocm ol { margin: .85rem 0 0; padding-left: 1.15rem; font-size: .9rem; }
.tocm li { margin-bottom: .35rem; }

/* ---------------------------------------------------------------- FAQ --- */
.faq { margin-top: 2.75rem; }
.faq__i { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: .55rem; }
.faq__i summary { cursor: pointer; list-style: none; padding: .85rem 2.4rem .85rem 1.05rem; font-weight: 640; font-size: .96rem; position: relative; }
.faq__i summary::-webkit-details-marker { display: none; }
.faq__i summary::after { content: "+"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.2rem; font-weight: 400; color: var(--ink-3); line-height: 1; }
.faq__i[open] summary::after { content: "\2013"; }
.faq__i summary:hover { background: var(--surface-2); }
.faq__b { padding: 0 1.05rem 1.05rem; color: var(--ink-2); font-size: .94rem; }
.faq__b > :last-child { margin-bottom: 0; }

/* -------------------------------------------------------------- panels -- */
.panel { margin: 2.3rem 0; padding: 1.25rem 1.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel h2, .panel h3 { margin-top: 0; }
.panel--soft { background: var(--surface-2); }
.sources { font-size: .91rem; }
.sources ol { padding-left: 1.15rem; margin: 0; }
.sources li { margin-bottom: .45rem; color: var(--ink-2); }

.byline-box { display: flex; gap: 1rem; align-items: flex-start; margin: 2.3rem 0; padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.byline-box__m { flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 800; }
.byline-box p { margin: 0; font-size: .9rem; color: var(--ink-2); line-height: 1.55; }
.byline-box p + p { margin-top: .45rem; }
.byline-box strong { display: block; color: var(--ink); font-size: .96rem; margin-bottom: .15rem; }

/* --------------------------------------------------------------- cards -- */
.cards { display: grid; gap: .95rem; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); margin: 0; padding: 0; list-style: none; }
.card {
  position: relative; display: flex; flex-direction: column; gap: .4rem;
  padding: 1.05rem 1.15rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.card__ic { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: .95rem; margin-bottom: .15rem; }
.card__cat { font-size: .68rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.card__t { font-size: 1.02rem; font-weight: 680; margin: 0; line-height: 1.3; letter-spacing: -.015em; }
.card__t a { color: var(--ink); text-decoration: none; }
.card__t a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card__t a { color: var(--primary); }
.card__d { margin: 0; font-size: .875rem; color: var(--ink-2); line-height: 1.5; }

.sec { margin: 3rem 0; }
.sec__h { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.15rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.sec__h h2 { margin: 0; font-size: clamp(1.2rem, 1.1rem + .5vw, 1.45rem); }
.sec__h a { font-size: .875rem; font-weight: 620; text-decoration: none; }
.sec__h a:hover { text-decoration: underline; }

.hero { padding: 3rem 0 .5rem; }
.hero__in { max-width: 44rem; }
.hero h1 { margin-bottom: .45rem; }
.pills { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 1.4rem 0 0; padding: 0; }
.pill { display: inline-block; padding: .34rem .78rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: .84rem; color: var(--ink-2); text-decoration: none; }
.pill:hover { border-color: var(--primary); color: var(--primary); }

.stats { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); margin: 2.2rem 0 0; padding: 1.3rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.stats .n { font-size: 1.75rem; font-weight: 780; color: var(--primary); letter-spacing: -.03em; line-height: 1.1; }
.stats .l { font-size: .85rem; color: var(--ink-2); margin-top: .1rem; }

/* -------------------------------------------------------------- footer -- */
.ftr { margin-top: 3.5rem; padding: 2.75rem 0 2.25rem; background: var(--surface); border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.ftr__g { display: grid; gap: 1.8rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.ftr__g h3 { font-size: .7rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .7rem; }
.ftr__g ul { list-style: none; margin: 0; padding: 0; }
.ftr__g li { margin-bottom: .4rem; }
.ftr__g a { color: var(--ink-2); text-decoration: none; }
.ftr__g a:hover { color: var(--primary); text-decoration: underline; }
.ftr__b { margin-top: 2.25rem; padding-top: 1.35rem; border-top: 1px solid var(--line); font-size: .83rem; color: var(--ink-3); }
.ftr__b p { margin: 0 0 .5rem; max-width: 64ch; }

.muted { color: var(--ink-3); }
.small { font-size: .88rem; }
.mt0 { margin-top: 0; }

@media print {
  .hdr, .ftr, .toc, .crumbs, .calc__foot { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .calc { break-inside: avoid; box-shadow: none; }
  .prose { max-width: none; }
}
