/* ============================================================
   TDEE Calculator — styles
   Light, warm-neutral surface with a deep emerald accent.
   No frameworks, no build step.
   ============================================================ */

:root {
  /* surfaces */
  --bg: #f6f5f1;
  --bg-tint: #efeee8;
  --surface: #ffffff;
  --track: #ecebe5;

  /* ink */
  --ink: #16201e;
  --ink-2: #3f4d4a;
  --muted: #6c7a76;
  --faint: #98a29f;

  /* accent */
  --accent: #0f7a5f;
  --accent-dark: #0a5c47;
  --accent-soft: #e8f3ef;
  --accent-line: #cfe6de;

  /* macros */
  --protein: #0f7a5f;
  --fat: #c98a3c;
  --carb: #5b7fbd;

  /* structure */
  --line: #e2e1da;
  --line-soft: #eeece6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 30, .04), 0 8px 24px -12px rgba(22, 32, 30, .10);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
}

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

/* Keep the attribute authoritative over layout classes. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { left: 24px; }

/* ============================ header ============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 245, 241, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand__mark { display: block; width: 32px; height: 32px; }
.brand__text { font-size: 16px; color: var(--ink); }
.brand__text span { color: var(--muted); font-weight: 500; margin-left: 5px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.site-nav a:hover { color: var(--accent); border-color: var(--accent-line); }

/* ============================ hero ============================ */

.hero { padding: 64px 0 40px; }

/* The hero uses the same .wrap grid as the calculator, so its left edge
   lines up with the cards below. */

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.06;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.hero__lede {
  margin-top: 20px;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 60ch;
  line-height: 1.65;
}

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--muted);
}
.hero__points li { position: relative; padding-left: 16px; }
.hero__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.hero__points strong { color: var(--ink); font-weight: 600; }

/* ============================ calculator layout ============================ */

.calc-section { padding: 8px 0 72px; }

.calc-grid {
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card__title { font-size: 16px; font-weight: 600; }
.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card__hint { font-size: 12.5px; color: var(--faint); }

/* ---- form ---- */

.form-card {
  position: sticky;
  top: 88px;
  padding: 26px 24px 22px;
}

.form-card > .card__title { margin-bottom: 20px; }

.field { margin-bottom: 18px; }
.field:last-of-type { margin-bottom: 22px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field__label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.field__hint {
  font-weight: 500;
  color: var(--faint);
  text-transform: lowercase;
}

.field__note {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--faint);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: #fbfbf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 46px 11px 13px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  appearance: textfield;
  -moz-appearance: textfield;
}
.input::-webkit-outer-spin-button,
.input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.input::placeholder { color: var(--faint); font-weight: 400; }

.input:hover { border-color: #d3d2c9; }

.input:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 122, 95, .12);
}

.input__suffix {
  position: absolute;
  right: 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--faint);
  pointer-events: none;
}

/* segmented control */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  background: var(--bg-tint);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px; height: 1px;
}
.segmented label {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 6px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
  user-select: none;
  white-space: nowrap;
}
.segmented label:hover { color: var(--ink); }
.segmented input:checked + label {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(22, 32, 30, .08);
}
.segmented input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.segmented--sm label { font-size: 12.5px; padding: 7px 4px; }

/* activity radio list */
.activity-list { display: grid; gap: 6px; }
.activity-list input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px; height: 1px;
}
.activity-list label {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 8px;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #fbfbf9;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.activity-list label::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid #cfcec5;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.activity-list label:hover { border-color: #d3d2c9; }
.activity-list input:checked + label {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.activity-list input:checked + label::before {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent);
}
.activity-list input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.act__name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.act__desc { grid-column: 1; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.act__mult {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.activity-list input:checked + label .act__mult { color: var(--accent); }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.btn--sm { font-size: 13px; padding: 8px 16px; }

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding-top: 4px;
}

/* ============================ results ============================ */

.results { display: grid; gap: 16px; min-width: 0; }

.result-hero { padding: 28px 26px 24px; }

.result-hero__label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.result-hero__value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
  font-size: clamp(44px, 7vw, 62px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.result-hero__unit {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.result-hero__sub {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.stat { display: grid; gap: 2px; }
.stat__k {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--faint);
}
.stat__v {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat__n { font-size: 12px; color: var(--muted); }

/* activity bars */
.bars { display: grid; gap: 10px; }
.bar {
  display: grid;
  grid-template-columns: 132px 1fr 62px;
  grid-template-areas: "label track value";
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.bar__label { grid-area: label; color: var(--ink-2); text-align: left; }
.bar__track {
  grid-area: track;
  height: 9px;
  background: #f0efe9;
  border-radius: 999px;
  overflow: hidden;
}
.bar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #a6c3b8;
  width: 0;
  transition: width .45s cubic-bezier(.2, .8, .3, 1);
}
.bar--active .bar__label { color: var(--ink); font-weight: 600; }
.bar--active .bar__fill { background: var(--accent); }
.bar__value {
  grid-area: value;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.bar--active .bar__value { color: var(--accent); }

/* goal list */
.goals { display: grid; gap: 6px; }
.goal {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  font-family: inherit;
  text-align: left;
  background: #fbfbf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.goal:hover { border-color: #d3d2c9; }
.goal[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.goal__name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.goal__delta { font-size: 11.5px; color: var(--muted); }
.goal__kcal {
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: right;
}
.goal__kcal small { font-size: 11px; font-weight: 500; color: var(--faint); margin-left: 3px; }
.goal__rate {
  min-width: 74px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.goal[aria-pressed="true"] .goal__kcal,
.goal[aria-pressed="true"] .goal__rate { color: var(--accent); }

/* macros */
#macros .segmented { margin-bottom: 20px; }

.macro-body {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
}

.donut { position: relative; width: 160px; height: 160px; }
.donut svg { width: 100%; height: 100%; }
/* No transition on first paint — the ring should appear complete, not grow. */
.donut circle { transition: none; }
.donut.is-live circle { transition: stroke-dasharray .4s ease, stroke-dashoffset .4s ease; }
.donut__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.donut__center span {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.donut__center small {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}

.macro-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.macro-legend__item {
  display: grid;
  grid-template-columns: 10px 1fr auto 62px;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.macro-legend__item:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 3px; }
.dot--protein { background: var(--protein); }
.dot--fat { background: var(--fat); }
.dot--carb { background: var(--carb); }
.macro-legend__name { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.macro-legend__pct {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.macro-legend__g {
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.macro-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* chart */
.chart {
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart text {
  font-family: var(--font);
  font-size: 10.5px;
  fill: var(--faint);
  font-variant-numeric: tabular-nums;
}
.chart .chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart .chart-area { fill: url(#gradArea); }
.chart .chart-grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .chart-dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.chart .chart-endlabel {
  fill: var(--accent);
  font-weight: 600;
  font-size: 11.5px;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3.5;
  stroke-linejoin: round;
}
.chart-caption {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
}
.copy-note { font-size: 12.5px; color: var(--accent); font-weight: 500; }

.disclaimer-inline {
  font-size: 12px;
  line-height: 1.6;
  color: var(--faint);
  padding: 0 4px 8px;
}

/* ============================ content ============================ */

.content {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 72px 0;
}

.content__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: start;
}

.prose { max-width: 68ch; }
.prose h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 44px 0 14px;
  letter-spacing: -0.025em;
}
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-2); margin-bottom: 14px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }

.bullets {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--ink-2);
  display: grid;
  gap: 8px;
}
.bullets li::marker { color: var(--accent); }

.formula {
  margin: 20px 0 18px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 6px 18px;
}
.formula__row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--accent-line);
}
.formula__row:last-child { border-bottom: 0; }
.formula__row span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
}
.formula__row code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.formula__row--alt span { color: var(--muted); }

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 18px;
  font-size: 13.5px;
}
.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 12px 8px 0;
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  vertical-align: top;
}
.table td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.table td:nth-child(2) { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* side card */
.side-card {
  position: sticky;
  top: 88px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.side-card h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.facts { margin: 0; display: grid; gap: 0; }
.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.side-card__note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ============================ FAQ ============================ */

.faq { padding: 72px 0; }

.section-title {
  font-size: clamp(24px, 3.4vw, 32px);
  margin-bottom: 28px;
  letter-spacing: -0.03em;
}

.faq__list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  max-width: 820px;
}

.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 40px 20px 0;
  position: relative;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color .15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px; height: 9px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.faq details p {
  padding: 0 60px 22px 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 66ch;
}

/* ============================ closing + footer ============================ */

.closing {
  background: var(--accent);
  color: #fff;
  padding: 64px 0;
}
.closing__inner { max-width: 620px; text-align: center; }
.closing h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.01em;
}
.closing p {
  margin: 12px 0 26px;
  color: rgba(255, 255, 255, .82);
  font-size: 15.5px;
}
.closing .btn--primary {
  background: #fff;
  color: var(--accent-dark);
}
.closing .btn--primary:hover { background: #eef6f3; }

.site-footer { padding: 36px 0 48px; background: var(--bg); }
.site-footer__inner { display: grid; gap: 14px; }
.site-footer__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.site-footer__brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-footer__copy {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.site-footer__legal {
  font-size: 12px;
  line-height: 1.65;
  color: var(--faint);
  max-width: 78ch;
}

/* ============================ responsive ============================ */

@media (max-width: 1000px) {
  .calc-grid { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .content__grid { grid-template-columns: 1fr; gap: 40px; }
  .side-card { position: static; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .site-nav { display: none; }
  .hero { padding: 40px 0 28px; }
  .hero__lede { font-size: 15.5px; }
  .hero__points { gap: 8px 20px; font-size: 13px; }
  .calc-section { padding-bottom: 52px; }
  .card { padding: 20px 18px; border-radius: 14px; }
  .result-hero { padding: 22px 18px 20px; }
  .stat-row { gap: 8px; }
  .stat__v { font-size: 18px; }
  .bar {
    grid-template-columns: 1fr auto;
    grid-template-areas: "label value" "track track";
    gap: 6px 10px;
  }
  .goal { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .goal__rate { grid-column: 1; grid-row: 2; text-align: left; min-width: 0; }
  .macro-body { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
  .macro-legend { width: 100%; }
  .content { padding: 48px 0; }
  .faq { padding: 48px 0; }
  .faq details p { padding-right: 8px; }
  .formula__row { grid-template-columns: 1fr; gap: 4px; }
  .closing { padding: 48px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
