/* ==========================================================================
   X-LIFE — design system
   Paper, ink, vermilion. Serif display, sans text, mono labels.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4efe5;
  --paper-2: #ece4d5;
  --paper-3: #e3d9c6;
  --ink: #16150f;
  --ink-2: #3f3b31;
  --muted: #6d6556;
  --rule: #d7cdbc;
  --rule-dark: #b9ad98;
  --accent: #d2451e;
  --accent-dark: #a83514;
  --green: #2c5f54;
  --calc-bg: #181712;
  --calc-panel: #211f19;
  --cream: #f4efe5;
  --cream-muted: #a9a08c;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --page: 1180px;
  --wide: 1040px;
  --narrow: 760px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 14px;
}

/* --- reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.has-paper-texture {
  background-image:
    radial-gradient(rgba(22, 21, 15, 0.045) 0.6px, transparent 0.6px);
  background-size: 18px 18px;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
::selection { background: var(--accent); color: var(--cream); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

/* --- utilities ------------------------------------------------------------ */

.container { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { width: 100%; max-width: var(--narrow); margin-inline: auto; padding-inline: var(--gutter); }
.mono {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 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;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--cream); padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --- header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
}
.wordmark .x { color: var(--accent); }
.wordmark .dot {
  width: 6px; height: 6px; margin-left: 2px;
  background: var(--accent); border-radius: 50%;
  transform: translateY(-15px);
}
.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.nav a {
  position: relative;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  padding: 6px 0;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent);
}
.header-note {
  display: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
@media (min-width: 1080px) { .header-note { display: block; } }

/* --- hero ----------------------------------------------------------------- */

.hero { padding-block: clamp(54px, 9vw, 104px) clamp(44px, 7vw, 82px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: end;
}
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 30px; height: 1px; background: var(--accent); flex: none;
}
.hero h1 {
  font-size: clamp(52px, 8.2vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin-top: 22px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero__lede {
  max-width: 560px;
  margin-top: 28px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.button:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.button--ghost { background: transparent; color: var(--ink); }
.button--ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.button .arrow { font-family: var(--sans); font-size: 14px; }

.measure-card {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  padding: 22px 24px 24px;
  box-shadow: 7px 7px 0 var(--ink);
}
.measure-card__top {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.measure-card__tag { color: var(--accent); }
.measure-card__num {
  font-family: var(--serif);
  font-size: clamp(54px, 6vw, 76px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.measure-card__unit {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-top: 10px;
}
.measure-card p { margin-top: 14px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.measure-card a {
  display: inline-block; margin-top: 16px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.measure-card a:hover { color: var(--accent); }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .measure-card { max-width: 420px; box-shadow: 6px 6px 0 var(--ink); }
}

/* --- ticker --------------------------------------------------------------- */

.ticker { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.ticker__inner {
  display: flex; flex-wrap: wrap; gap: 10px 34px; align-items: center;
  padding-block: 13px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.ticker__inner span { display: inline-flex; align-items: center; gap: 9px; }
.ticker__inner span::before { content: "▪"; color: var(--accent); font-size: 8px; }

/* --- sections ------------------------------------------------------------- */

.section { padding-block: clamp(46px, 7vw, 80px); }
.section--tight { padding-block: clamp(32px, 5vw, 52px); }
.section--dark { background: var(--ink); color: var(--cream); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; margin-bottom: clamp(26px, 4vw, 40px);
  border-top: 1px solid var(--ink);
  padding-top: 14px;
}
.section--dark .section-head { border-top-color: var(--cream-muted); }
.section-head__left { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head .mono { color: var(--muted); }
.section--dark .section-head .mono { color: var(--cream-muted); }
.section-link {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
  border-bottom: 1px solid var(--accent); padding-bottom: 3px;
}
.section-link:hover { color: var(--accent); }

/* --- cards ---------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: transparent;
  text-decoration: none;
  min-height: 220px;
  transition: background 0.18s ease;
}
.card:hover { background: var(--paper-2); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card__index { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--muted); }
.card__tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid currentColor; padding: 3px 7px;
}
.card__tag--guide { color: var(--green); }
.card h3 { font-size: clamp(25px, 2.6vw, 33px); letter-spacing: -0.02em; }
.card p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; max-width: 44ch; }
.card__meta {
  margin-top: auto; padding-top: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.card__arrow { font-size: 18px; color: var(--accent); transition: transform 0.18s ease; }
.card:hover .card__arrow { transform: translateX(5px); }

.list { border-top: 1px solid var(--rule); }
.list-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: clamp(14px, 3vw, 32px);
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.list-item:hover { background: var(--paper-2); }
.list-item__date { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.list-item h3 { font-size: clamp(21px, 2.4vw, 28px); letter-spacing: -0.015em; }
.list-item p { margin-top: 6px; font-size: 14.5px; color: var(--muted); max-width: 62ch; }
.list-item__arrow { font-size: 18px; color: var(--accent); }
.list-item:hover .list-item__arrow { transform: translateX(4px); }
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .list-item { grid-template-columns: 1fr auto; }
  .list-item__date { display: none; }
}

/* --- principles / dark block --------------------------------------------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #3a372d;
}
.principle { padding: 28px 28px 8px 0; }
.principle + .principle { padding-left: 28px; border-left: 1px solid #3a372d; }
.principle .mono { color: var(--accent); }
.principle h3 { font-size: 24px; margin-top: 12px; color: var(--cream); }
.principle p { margin-top: 10px; color: #bdb4a0; font-size: 14.5px; line-height: 1.55; }
@media (max-width: 760px) {
  .principles { grid-template-columns: 1fr; }
  .principle { padding: 22px 0; }
  .principle + .principle { padding-left: 0; border-left: 0; border-top: 1px solid #3a372d; }
}

/* --- page head / article -------------------------------------------------- */

.page-head { padding-block: clamp(38px, 6vw, 68px) clamp(22px, 3vw, 34px); }
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 26px;
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--rule-dark); }
.page-head h1 {
  font-size: clamp(38px, 5.6vw, 70px);
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.page-head__lede {
  margin-top: 22px;
  max-width: 660px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
}
.page-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  margin-top: 26px; padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.page-meta span { display: inline-flex; align-items: center; gap: 7px; }
.page-meta span::before { content: "·"; color: var(--accent); }
.page-meta span:first-child::before { display: none; }

.prose { padding-block: 8px 20px; }
.prose > * + * { margin-top: 1.15em; }
.prose p, .prose li { font-size: 17.5px; line-height: 1.72; color: var(--ink-2); }
.prose > p:first-child {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
}
.prose h2 {
  font-size: clamp(29px, 3.4vw, 38px);
  margin-top: 2.1em;
  padding-top: 0.8em;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 90px;
}
.prose h3 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 1.9em;
  scroll-margin-top: 90px;
}
.prose h2 + *, .prose h3 + * { margin-top: 0.65em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.45em; }
.prose a { color: var(--ink); text-decoration-color: var(--accent); }
.prose a:hover { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.4;
  color: var(--ink);
}
.prose code {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--paper-2); border: 1px solid var(--rule);
  padding: 1px 5px;
}
.prose pre {
  overflow-x: auto; padding: 20px 22px;
  background: var(--ink); color: var(--cream);
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2em 0; }
.prose img { border: 1px solid var(--rule); }

.table-wrap { overflow-x: auto; margin: 1.8em 0; }
.prose table {
  width: 100%; border-collapse: collapse;
  font-size: 14.5px; line-height: 1.4;
  min-width: 520px;
}
.prose th {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--ink);
  vertical-align: bottom;
}
.prose td {
  padding: 11px 12px; border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.prose tbody tr:hover { background: var(--paper-2); }
.prose td:not(:first-child), .prose th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

.note {
  background: var(--paper-2);
  border-left: 3px solid var(--green);
  padding: 18px 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.note strong { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); margin-bottom: 6px; }
.note--accent { border-left-color: var(--accent); }
.note--accent strong { color: var(--accent); }

.formula {
  background: var(--ink); color: var(--cream);
  padding: 22px 24px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.8;
}
.formula .hl { color: #ef8a62; }

/* --- calculator ----------------------------------------------------------- */

.calc-wrap { padding-block: clamp(10px, 2vw, 22px) clamp(30px, 4vw, 44px); }
.calc {
  background: var(--calc-bg);
  color: var(--cream);
  border: 1px solid var(--ink);
  box-shadow: 10px 10px 0 var(--paper-3);
  padding: clamp(24px, 4vw, 44px);
}
.calc__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.calc__head .mono { color: var(--accent); }
.calc__head h2 { font-size: clamp(25px, 3vw, 34px); color: var(--cream); margin-top: 8px; }
.calc__head p { max-width: 52ch; color: var(--cream-muted); font-size: 14px; margin-top: 8px; }
.calc__reset {
  background: none; border: 1px solid #4a4638; color: var(--cream-muted);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 8px 12px;
}
.calc__reset:hover { border-color: var(--cream); color: var(--cream); }

.calc__body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(24px, 4vw, 48px);
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid #3a372d;
}
.calc__inputs { display: flex; flex-direction: column; gap: 20px; }
.calc__inputs--two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.is-hidden { display: none !important; }
@media (max-width: 560px) {
  .calc__inputs--two { grid-template-columns: 1fr; }
}
.field__label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #b9b09d;
}
.field__label em { font-style: normal; color: #77705f; letter-spacing: 0.04em; text-transform: none; font-size: 9.5px; }
.field__control { display: flex; align-items: stretch; border-bottom: 1px solid #4a4638; }
.field__control:focus-within { border-bottom-color: var(--accent); }
.field input[type="number"] {
  width: 100%; min-width: 0;
  background: transparent; border: 0; outline: 0;
  color: var(--cream);
  font-family: var(--sans); font-size: 22px; font-weight: 500;
  padding: 1px 0 8px;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__suffix { align-self: flex-end; padding-bottom: 9px; font-family: var(--mono); font-size: 10px; color: #77705f; letter-spacing: 0.06em; white-space: nowrap; }
.field__prefix { align-self: center; font-family: var(--sans); font-size: 18px; font-weight: 500; color: var(--cream-muted); padding-right: 2px; }
.field select {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid #4a4638;
  color: var(--cream); font-size: 15px; padding: 6px 22px 10px 0;
  outline: 0; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8d8472 50%), linear-gradient(135deg, #8d8472 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.field select option { background: var(--calc-bg); color: var(--cream); }
.field input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; background: transparent; margin-top: 2px;
}
.field input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: #4a4638; }
.field input[type="range"]::-moz-range-track { height: 2px; background: #4a4638; }
.field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px;
  background: var(--accent); border-radius: 50%; border: 2px solid var(--calc-bg);
  box-shadow: 0 0 0 1px var(--accent);
}
.field input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; background: var(--accent); border-radius: 50%; border: 2px solid var(--calc-bg);
}
.field__hint { font-size: 11.5px; color: #77705f; line-height: 1.4; }

.calc__results {
  background: var(--calc-panel);
  border: 1px solid #3a372d;
  padding: clamp(20px, 3vw, 30px);
  display: flex; flex-direction: column; gap: 20px;
}
.result-primary { border-bottom: 1px solid #3a372d; padding-bottom: 18px; }
.result-primary .label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #8d8472; }
.result-primary .value {
  font-family: var(--serif); font-size: clamp(46px, 5.4vw, 64px);
  line-height: 1.05; letter-spacing: -0.03em; color: var(--cream);
  margin-top: 4px; font-variant-numeric: tabular-nums;
}
.result-primary .value .unit { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--cream-muted); margin-left: 4px; }
.result-primary .sub { font-size: 12.5px; color: #8d8472; margin-top: 4px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.result { display: flex; flex-direction: column; gap: 2px; }
.result .label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: #8d8472; }
.result .value { font-size: 20px; font-weight: 500; color: var(--cream); font-variant-numeric: tabular-nums; }
.result .value .unit { font-size: 10.5px; color: var(--cream-muted); font-weight: 400; margin-left: 2px; }
.result-insight {
  border-top: 1px solid #3a372d; padding-top: 16px;
  font-size: 12.5px; line-height: 1.55; color: #b9b09d;
}
.result-insight strong { color: var(--cream); font-weight: 500; }
.calc__foot {
  margin-top: 22px; padding-top: 14px; border-top: 1px solid #3a372d;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em;
  text-transform: uppercase; color: #6f6858;
}
.calc__foot a { color: #b9b09d; text-decoration-color: #6f6858; }
.calc__foot a:hover { color: var(--accent); }
.calc noscript { display: block; padding: 16px; background: #2b2820; color: #d8cfbb; font-size: 13px; }

@media (max-width: 780px) {
  .calc__body { grid-template-columns: 1fr; }
  .calc { box-shadow: 6px 6px 0 var(--paper-3); }
}

/* --- FAQ / sources / related --------------------------------------------- */

.faq { margin-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--ink); }
.faq h2 { font-size: 32px; padding-top: 20px; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 18px 0;
  font-family: var(--sans); font-size: 17px; font-weight: 500; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--serif); font-size: 24px; color: var(--accent); line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-answer { padding: 0 0 20px; max-width: 68ch; }
.faq-answer p { font-size: 16px; line-height: 1.65; color: var(--ink-2); }

.sources { margin-top: clamp(36px, 5vw, 56px); padding-top: 20px; border-top: 1px solid var(--rule); }
.sources h2 { font-size: 24px; }
.sources ol { margin-top: 14px; padding-left: 0; list-style: none; counter-reset: src; }
.sources li {
  counter-increment: src;
  position: relative; padding: 10px 0 10px 34px;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px; line-height: 1.5; color: var(--muted);
}
.sources li::before {
  content: "[" counter(src) "]"; position: absolute; left: 0; top: 10px;
  font-family: var(--mono); font-size: 10px; color: var(--accent);
}
.sources li a { color: var(--ink-2); text-decoration-color: var(--rule-dark); overflow-wrap: anywhere; }
.sources li a:hover { color: var(--accent); }
.sources .note { margin-top: 16px; font-size: 13px; }

.related { padding-block: clamp(40px, 6vw, 64px); border-top: 1px solid var(--rule); margin-top: clamp(40px, 6vw, 64px); }
.related h2 { font-size: 30px; margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.related-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 22px; border: 1px solid var(--rule);
  text-decoration: none; background: transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.related-card:hover { border-color: var(--ink); background: var(--paper-2); }
.related-card .mono { color: var(--accent); }
.related-card h3 { font-size: 21px; }
.related-card p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } }

/* --- footer --------------------------------------------------------------- */

.site-footer { background: var(--ink); color: var(--cream); margin-top: clamp(30px, 5vw, 60px); }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px);
  padding: clamp(46px, 7vw, 76px) 0 clamp(36px, 5vw, 54px);
}
.footer-brand .wordmark { font-size: clamp(44px, 6vw, 76px); color: var(--cream); }
.footer-brand .wordmark .x { color: var(--accent); }
.footer-brand p { max-width: 40ch; margin-top: 16px; color: #a9a08c; font-size: 14.5px; line-height: 1.6; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.footer-col h4 { font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #77705f; }
.footer-col ul { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: #cfc6b2; font-size: 14px; text-decoration: none; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  padding: 18px 0 26px;
  border-top: 1px solid #3a372d;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #77705f;
}
.footer-bottom a { color: #a9a08c; text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }
@media (max-width: 720px) { .footer-top { grid-template-columns: 1fr; } }

/* --- misc pages ----------------------------------------------------------- */

.page-simple { padding-bottom: 60px; }
.page-simple .prose { max-width: 720px; }
.not-found {
  min-height: 56vh; display: flex; flex-direction: column; justify-content: center;
  padding-block: 80px;
}
.not-found h1 { font-size: clamp(64px, 14vw, 160px); color: var(--accent); line-height: 0.9; }
.not-found p { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 40ch; }
.not-found .button { margin-top: 28px; align-self: flex-start; }

/* --- print ---------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .hero__actions, .calc, .related, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .prose p, .prose li { color: #000; }
  a { text-decoration: none; color: #000; }
}
