/* ============================================================================
   NetPay Pro — design system v2
   1. Tokens   2. Base   3. Header   4. Layout   5. Type   6. Controls
   7. Hero     8. Cards  9. Calculator  10. Content  11. Ads  12. Footer
   13. Utilities / print / motion
   ========================================================================== */

/* ---------- 1. tokens ---------------------------------------------------- */

:root {
  /* ink */
  --ink: #0d1a16;
  --ink-2: #24332d;
  --muted: #56685f;
  --faint: #86968f;

  /* surfaces */
  --bg: #fbfcfa;
  --surface: #ffffff;
  --surface-2: #f3f6f2;
  --surface-3: #eaf1ec;

  /* lines */
  --line: #e3e8e3;
  --line-2: #d2dad4;

  /* brand */
  --accent: #0b6b52;
  --accent-700: #084c3a;
  --accent-soft: #e4f3ec;
  --accent-wash: #f0f9f4;
  --ring: rgba(11, 107, 82, 0.28);

  /* data viz */
  --data-net: #0b6b52;
  --data-fed: #1f5fa8;
  --data-fica: #6a5cd0;
  --data-state: #c9821a;
  --data-k401: #97a29b;

  /* states */
  --warn-bg: #fdf4e3;
  --warn-ink: #6f4708;
  --danger: #a83f33;

  /* geometry */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  /* shadows */
  --sh-xs: 0 1px 2px rgba(13, 26, 22, 0.06);
  --sh-sm: 0 1px 2px rgba(13, 26, 22, 0.04), 0 4px 12px -6px rgba(13, 26, 22, 0.14);
  --sh-md: 0 2px 4px rgba(13, 26, 22, 0.04), 0 18px 34px -20px rgba(13, 26, 22, 0.24);
  --sh-lg: 0 4px 10px rgba(13, 26, 22, 0.05), 0 32px 56px -28px rgba(13, 26, 22, 0.32);

  /* layout */
  --max: 1180px;
  --gutter: 22px;
  --header-h: 66px;

  /* type */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino,
    "Book Antiqua", Georgia, ui-serif, serif;

  color-scheme: light;
}

/* ---------- 2. base ----------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 12% -140px, rgba(11, 107, 82, 0.075), transparent 68%),
    radial-gradient(720px 360px at 80% -80px, rgba(31, 95, 168, 0.05), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: scroll;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }

::selection { background: #cdeadd; color: var(--accent-700); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus { top: 12px; }

/* ---------- 3. header --------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 252, 250, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(13, 26, 22, 0.02), 0 8px 24px -20px rgba(13, 26, 22, 0.4);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(150deg, #0e7a5d, #084c3a);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), var(--sh-xs);
  flex: none;
  margin-right: 9px;
}

.brand__mark svg { width: 16px; height: 16px; display: block; }
.brand em { font-style: normal; color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 11px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav a:hover { color: var(--ink); background: var(--surface-2); }

.nav a[aria-current="page"] { color: var(--accent-700); background: var(--accent-soft); font-weight: 600; }

.nav .nav__cta {
  margin-left: 6px;
  color: #fff;
  background: linear-gradient(180deg, #0e7a5d, #096049);
  box-shadow: var(--sh-xs);
  padding: 8px 14px;
  border-radius: 999px;
}

.nav .nav__cta:hover { color: #fff; background: linear-gradient(180deg, #0f8264, #084c3a); }

/* ---------- 4. layout --------------------------------------------------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main { display: block; }

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  padding: 34px 0 72px;
  align-items: start;
}

.col { min-width: 0; }
.col--solo { max-width: 780px; }

.page-solo {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 0 76px;
}

@media (min-width: 1080px) {
  .page-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
    padding-top: 44px;
  }
  .col { max-width: 780px; }
}

.rail { display: none; }

@media (min-width: 1080px) {
  .rail { display: block; }
  .rail__sticky {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    display: grid;
    gap: 22px;
  }
}

.rail-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--sh-xs);
}

.rail-card h2,
.rail-card h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

.rail-card ul { list-style: none; margin: 0; padding: 0; }

.rail-card li + li { border-top: 1px solid var(--line); }

.rail-card li a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.4;
}

.rail-card li a:hover { color: var(--accent); }
.rail-card li a span { color: var(--faint); font-size: 12px; white-space: nowrap; }

.rail-fact { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0; }
.rail-fact strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- 5. typography ----------------------------------------------- */

h1, h2, h3, h4 {
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(31px, 4.6vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0 0 14px;
}

h2 {
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 650;
  margin: 46px 0 14px;
  padding-top: 4px;
}

h3 {
  font-size: 17.5px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: -0.008em;
  margin: 30px 0 8px;
}

h2 + h3 { margin-top: 20px; }

p { margin: 0 0 18px; }

p:last-child:not(.lede) { margin-bottom: 0; }

.lede {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 26px;
  max-width: 64ch;
}

a { color: var(--accent); text-underline-offset: 2.5px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-700); }

strong { font-weight: 640; color: var(--ink); }

ul, ol { margin: 0 0 20px; padding-left: 22px; }
li { margin-bottom: 9px; }
li::marker { color: var(--faint); }

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 44px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 107, 82, 0.14);
}

.num, .tabular { font-variant-numeric: tabular-nums; }

/* ---------- 6. controls ------------------------------------------------- */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 19px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); color: var(--btn-fg); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--primary {
  --btn-fg: #fff;
  --btn-bg: linear-gradient(180deg, #0e7a5d, #0a5e47);
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(8, 76, 58, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn--primary:hover {
  --btn-bg: linear-gradient(180deg, #0f8667, #084c3a);
  box-shadow: 0 6px 18px -8px rgba(8, 76, 58, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn--ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); box-shadow: none; }

.btn--sm { padding: 8px 13px; font-size: 13px; }
.btn--icon { padding: 9px; border-radius: 10px; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* fields */

.field { margin-bottom: 18px; }

.field > label,
.field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.field .hint {
  display: block;
  font-size: 12.5px;
  color: var(--faint);
  font-weight: 400;
  line-height: 1.45;
  margin-top: 6px;
}

.field__value {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(168, 63, 51, 0.12);
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell__prefix {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: var(--faint);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.input-shell__suffix {
  position: absolute;
  right: 14px;
  font-size: 14px;
  color: var(--faint);
  pointer-events: none;
}

input[type="number"],
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-variant-numeric: tabular-nums;
}

input:hover, select:hover, textarea:hover { border-color: #bcc7c0; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
  background: #fff;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

input[type="number"] { -moz-appearance: textfield; }

.input-shell input { padding-left: 30px; font-weight: 600; font-size: 17px; }

/* A field the calculator owns — showing a derived rate rather than accepting one. */
.input-shell:has(input[readonly]) {
  background: var(--surface-2);
  box-shadow: none;
  border-color: var(--line);
}
.input-shell input[readonly] {
  color: var(--ink-2);
  cursor: default;
  background: transparent;
}
.input-shell--suffix input { padding-right: 34px; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2356685f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 38px;
  cursor: pointer;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 560px) {
  .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* range slider */

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  margin: 10px 0 2px;
  cursor: pointer;
  display: block;
}

.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 40%), var(--surface-3) var(--fill, 40%));
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(13, 26, 22, 0.2), 0 0 0 0 var(--ring);
  transition: box-shadow 0.18s ease, transform 0.12s ease;
}

.range:hover::-webkit-slider-thumb { box-shadow: 0 1px 4px rgba(13, 26, 22, 0.22), 0 0 0 6px rgba(11, 107, 82, 0.12); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 7px var(--ring); }
.range:active::-webkit-slider-thumb { transform: scale(1.06); }

.range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
}

.range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(13, 26, 22, 0.2);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}

/* presets */

.presets { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 4px; }

.preset {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.preset:hover { color: var(--accent-700); background: var(--accent-soft); }

.preset[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* segmented control */

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.segmented input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }

.segmented label {
  flex: 1 1 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 4px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.25;
}

.segmented label:hover { color: var(--ink); }

.segmented input:checked + label {
  background: var(--surface);
  color: var(--accent-700);
  box-shadow: var(--sh-xs);
}

.segmented input:focus-visible + label { box-shadow: 0 0 0 3px var(--ring); }

/* ---------- 7. hero ----------------------------------------------------- */

.hero {
  position: relative;
  padding: 30px 0 34px;
  isolation: isolate;
}

.hero h1 { max-width: 20ch; }
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.09em;
  background: linear-gradient(90deg, rgba(11, 107, 82, 0.34), rgba(11, 107, 82, 0));
  border-radius: 999px;
}

.hero .btn-row { margin-top: 26px; }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.trust li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.trust svg { width: 15px; height: 15px; color: var(--accent); flex: none; }

/* ---------- 8. cards ---------------------------------------------------- */

.card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--sh-xs);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 22px 0 8px;
  padding: 0;
  list-style: none;
}

@media (min-width: 620px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

.tool-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 17px 18px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, box-shadow 0.2s ease, transform 0.16s ease,
    background 0.16s ease;
}

.tool-card:hover {
  border-color: rgba(11, 107, 82, 0.42);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  color: inherit;
}

.tool-card__icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  transition: background 0.16s ease, color 0.16s ease;
}

.tool-card__icon svg { width: 18px; height: 18px; }

.tool-card:hover .tool-card__icon { background: var(--accent); color: #fff; }

.tool-card__body { min-width: 0; }

.tool-card strong {
  display: block;
  font-size: 15.5px;
  font-weight: 640;
  letter-spacing: -0.008em;
  margin-bottom: 3px;
}

.tool-card span:not(.tool-card__icon):not(.tag) {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.tool-card--muted {
  background: linear-gradient(180deg, #fcfdfc, #f8faf8);
  border-style: dashed;
  cursor: default;
}

.tool-card--muted .tool-card__icon { background: var(--surface-2); color: var(--faint); }
.tool-card--muted strong { color: var(--ink-2); }

.tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--faint);
  vertical-align: middle;
  margin-left: 6px;
}

.tag--live { background: var(--accent-soft); color: var(--accent-700); }

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(11, 107, 82, 0.22);
  background: linear-gradient(135deg, var(--accent-wash), #ffffff 62%);
  margin: 26px 0;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.16s ease;
}

.cta-card:hover {
  border-color: rgba(11, 107, 82, 0.45);
  box-shadow: var(--sh-md);
  transform: translateY(-1px);
  color: inherit;
}

.cta-card strong { display: block; font-size: 17px; margin-bottom: 3px; letter-spacing: -0.01em; }
.cta-card span { font-size: 13.5px; color: var(--muted); }
.cta-card__go { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 650; color: var(--accent); white-space: nowrap; }
.cta-card:hover .cta-card__go svg { transform: translateX(3px); }
.cta-card__go svg { width: 16px; height: 16px; transition: transform 0.18s ease; }

/* ---------- 9. calculator ----------------------------------------------- */

.calc {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  margin: 26px 0 6px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

@media (min-width: 940px) {
  .calc { grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr); }
}

.calc__form { padding: 26px 24px 22px; }

@media (min-width: 560px) { .calc__form { padding: 30px 30px 26px; } }

.calc__form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.calc__form-head p {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.calc__result {
  position: relative;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(11, 107, 82, 0.09), transparent 70%),
    linear-gradient(180deg, #f4f9f5, #ecf4ee);
  border-top: 1px solid var(--line);
  padding: 28px 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 560px) { .calc__result { padding: 32px 30px 28px; } }

@media (min-width: 940px) {
  .calc__result { border-top: 0; border-left: 1px solid var(--line); }
}

.calc__result-label {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.amount {
  font-family: var(--font);
  font-size: clamp(36px, 7.2vw, 46px);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--accent-700);
  font-variant-numeric: tabular-nums;
  margin: 0 0 6px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.amount__period {
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: 0;
  color: var(--muted);
  white-space: nowrap;
}

.amount.is-flash { animation: flash 0.34s ease-out; }

@keyframes flash {
  0% { opacity: 0.45; }
  100% { opacity: 1; }
}

.calc__result-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 20px;
}

.calc__result-sub strong { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 640; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.stat {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(210, 218, 212, 0.9);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  backdrop-filter: blur(4px);
}

.stat span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 2px;
}

.stat strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  font-weight: 650;
}

.bar {
  display: flex;
  gap: 2px;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 0;
}

.bar i:first-child { border-radius: 5px 0 0 5px; }
.bar i:last-child { border-radius: 0 5px 5px 0; }

.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}

.legend em {
  font-style: normal;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  font-weight: 550;
}

.calc__result-foot {
  margin: 18px 0 0;
  padding-top: 13px;
  border-top: 1px solid rgba(203, 214, 206, 0.75);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.calc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.calc__actions .btn { flex: 0 1 auto; }

.calc__note {
  font-size: 12px;
  color: var(--faint);
  margin: 14px 0 0;
  line-height: 1.5;
}

/* period breakdown */

.periods {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 26px 0 8px;
  background: var(--surface);
}

.periods__head {
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.periods ul { list-style: none; margin: 0; padding: 0; }

.periods li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 16px;
  margin: 0;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.14s ease;
}

.periods li:hover { background: var(--surface-2); }

.periods li + li { border-top: 1px solid var(--line); }

.periods li strong {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
}

.periods li.is-active {
  background: var(--accent-wash);
  box-shadow: inset 2px 0 0 var(--accent);
}

.periods li.is-active strong { color: var(--accent-700); }

.periods li small {
  font-size: 11.5px;
  color: var(--faint);
  margin-left: 6px;
}

/* ---------- 10. content ------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 20px 0 26px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

.table-wrap > table { min-width: 460px; }

th, td {
  text-align: left;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  position: sticky;
  top: 0;
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfa; }

tfoot td { font-weight: 650; border-top: 1px solid var(--line-2); background: var(--surface-2); }

td.num, th.num { text-align: right; white-space: nowrap; }

.note {
  border-left: 2px solid var(--line-2);
  padding: 2px 0 2px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 22px 0;
}

.warn {
  display: flex;
  gap: 11px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid #f2e0bd;
  border-radius: var(--r-sm);
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.55;
  margin: 22px 0;
}

.warn svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.warn p { margin: 0; }

.source-list { font-size: 13px; color: var(--muted); padding-left: 20px; }
.source-list li { margin-bottom: 6px; }

.checklist { list-style: none; padding: 0; }
.checklist li { display: flex; gap: 9px; align-items: flex-start; }
.checklist svg { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 4px; }

/* how-to steps */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 24px 0 4px;
  display: grid;
  gap: 16px;
}

.steps li {
  position: relative;
  padding-inline-start: 42px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 66ch;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: -3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-700);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}

.steps strong {
  display: block;
  margin-bottom: 3px;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.steps b { font-weight: 650; color: var(--ink-2); }

/* two-column counted / not counted */

.split {
  display: grid;
  gap: 1px;
  margin: 22px 0 28px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.panel { background: var(--surface); padding: 20px 20px 15px; }
.panel--muted { background: var(--surface-2); }

.panel h3 {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-700);
}
.panel--muted h3 { color: var(--muted); }

.panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.panel li {
  position: relative;
  padding-inline-start: 17px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

.panel li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.panel--muted li { color: var(--muted); }
.panel--muted li::before { background: var(--line-2); }

@media (min-width: 760px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* guide rows: three guides read as a list, not as a card grid with a
   half-empty last row */

.guide-list { display: grid; margin: 18px 0 12px; border-top: 1px solid var(--line); }

.guide-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.guide-list__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-700);
  transition: background 0.18s ease, color 0.18s ease;
}
.guide-list__icon svg { width: 17px; height: 17px; }

.guide-list__body { display: grid; gap: 4px; min-width: 0; }
.guide-list__body strong {
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.guide-list__body span { font-size: 13.5px; line-height: 1.5; color: var(--muted); }

.guide-list__go { display: grid; place-items: center; margin-inline-start: auto; flex: none; color: var(--faint); }
.guide-list__go svg { width: 16px; height: 16px; transition: transform 0.18s ease, color 0.18s ease; }

.guide-list a:hover .guide-list__icon { background: var(--accent); color: #fff; }
.guide-list a:hover .guide-list__body strong { color: var(--accent); }
.guide-list a:hover .guide-list__go svg { transform: translateX(3px); color: var(--accent); }

/* FAQ */

.faq { border-top: 1px solid var(--line); margin: 22px 0 30px; }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 2px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.008em;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }

.faq summary::after {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
  opacity: 0.55;
}

.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

.faq details > p,
.faq details > ul { padding: 0 2px; margin-top: 0; margin-bottom: 18px; color: var(--muted); font-size: 15px; }

/* callout strip */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 24px 0;
}

.facts div {
  background: var(--surface);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.facts span {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.35;
}
.facts strong {
  font-size: 19px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: auto;
  line-height: 1.25;
}

/* ---------- 11. ads ----------------------------------------------------- */

.ad {
  margin: 30px 0;
  text-align: center;
  /* container reserves space so content below never jumps (CLS) */
}

.ad__label {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a9b5ae;
  margin-bottom: 5px;
}

.ad__slot {
  display: block;
  width: 100%;
  min-height: var(--ad-h, 100px);
  background: #f7f9f7;
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.ad--inline { --ad-h: 110px; }
.ad--article { --ad-h: 250px; }
.ad--box { --ad-h: 250px; }
.ad--rail { --ad-h: 250px; margin: 0; }
.ad--rail-tall { --ad-h: 600px; margin: 0; }

@media (min-width: 768px) {
  .ad--inline { --ad-h: 90px; }
}

/* no ad served / no client configured → collapse entirely, leave nothing behind */
.ad[hidden] { display: none !important; }
.ad.is-empty .ad__slot { display: none; }
.ad.is-empty .ad__label { display: none; }

/* preview / placeholder state used by ad-placements.html and ?ads=preview */
.ad__ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: var(--ad-h, 100px);
  border: 1px dashed #c6d0c9;
  border-radius: var(--r-sm);
  background:
    repeating-linear-gradient(45deg, #f7f9f7 0 8px, #f1f5f2 8px 16px);
  color: #8a9992;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 8px;
  line-height: 1.4;
}

.ad__ph small {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #a3b0a9;
  text-transform: none;
}

.ad__ph.is-live {
  border-style: solid;
  border-color: rgba(11, 107, 82, 0.35);
  background: var(--accent-wash);
  color: var(--accent-700);
}

/* ---------- 12. footer -------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f7f9f7, #f2f5f2);
  padding: 44px 0 40px;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 26px;
}

@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
}

.footer-brand p { margin: 10px 0 0; max-width: 34ch; line-height: 1.6; font-size: 13px; }

.footer-col h2 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 10px;
  font-weight: 650;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 7px; }

.footer-col a { color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; }

.footer-legal {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  font-size: 12.5px;
  color: var(--faint);
}

.footer-legal p { margin: 0; }

/* ---------- 13. utilities ----------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 140%);
  z-index: 90;
  background: #10231c;
  color: #f2f7f4;
  font-size: 13.5px;
  font-weight: 550;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

.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;
}

.toc { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0; font-size: 13.5px; color: var(--muted); text-decoration: none; border-left: 2px solid var(--line); padding-left: 12px; }
.toc a:hover { color: var(--accent); border-left-color: var(--accent); }

/* print
   export.js builds #print-sheet from whatever the calculator has rendered, so
   paper gets a clean statement instead of the whole page with its navigation,
   ads and prose. When the sheet exists the rest of the body is hidden; when it
   does not (JS blocked), the fallback below still hides the furniture. */
#print-sheet { display: none; }

@media print {
  @page { margin: 12mm 13mm; }

  html, body { background: #fff !important; }
  body.has-report > *:not(#print-sheet) { display: none !important; }
  body.has-report #print-sheet { display: block !important; }

  #print-sheet {
    font-family: var(--font);
    font-size: 10pt;
    line-height: 1.5;
    color: #14181b;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #print-sheet .ps-head { padding-bottom: 3mm; border-bottom: 0.6pt solid #b9c0bd; }
  #print-sheet .ps-brand {
    margin: 0;
    font-size: 7.5pt;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5f6b66;
  }
  #print-sheet .ps-brand span { margin-inline-start: 2.4mm; color: #9aa4a0; }
  #print-sheet .ps-brand span::before { content: "\00b7"; margin-inline-end: 2.4mm; color: #c3cac7; }
  #print-sheet .ps-title {
    margin: 2.5mm 0 1mm;
    font-family: var(--font-display);
    font-size: 18pt;
    font-weight: 600;
    line-height: 1.2;
    color: #0e1512;
  }
  #print-sheet .ps-kicker { margin: 0; font-size: 9.5pt; color: #4a544f; }

  #print-sheet .ps-hero { padding: 5mm 0 4mm; border-bottom: 0.6pt solid #dfe3e1; }
  #print-sheet .ps-label {
    margin: 0 0 1.4mm;
    font-size: 7.5pt;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7570;
  }
  #print-sheet .ps-amount {
    margin: 0;
    font-family: var(--font-display);
    font-size: 26pt;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: #0e1512;
  }
  #print-sheet .ps-period {
    margin-inline-start: 3mm;
    font-family: var(--font);
    font-size: 9.5pt;
    font-weight: 400;
    letter-spacing: 0;
    color: #4a544f;
  }
  #print-sheet .ps-sub { margin: 1.5mm 0 0; font-size: 9.5pt; color: #4a544f; }

  #print-sheet .ps-facts { margin: 0; padding: 3.5mm 0 0; }
  #print-sheet .ps-facts > div { display: flex; gap: 4mm; padding: 0.8mm 0; break-inside: avoid; }
  #print-sheet .ps-facts dt { flex: 0 0 40mm; margin: 0; font-size: 9pt; color: #5f6b66; }
  #print-sheet .ps-facts dd { margin: 0; font-size: 9.5pt; font-weight: 500; }

  #print-sheet .ps-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 4mm;
    margin: 0;
    padding: 4mm 0;
    border-block: 0.6pt solid #dfe3e1;
    list-style: none;
  }
  #print-sheet .ps-stats li { margin: 0; }
  #print-sheet .ps-stats span { display: block; font-size: 8pt; color: #5f6b66; }
  #print-sheet .ps-stats strong {
    display: block;
    font-size: 11.5pt;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: #0e1512;
  }

  #print-sheet .ps-section { padding: 4.5mm 0 0; }
  #print-sheet .ps-bar { display: flex; height: 3.2mm; margin: 1.6mm 0 2.4mm; overflow: hidden; }
  #print-sheet .ps-bar i { flex: 0 0 auto; display: block; height: 100%; }
  #print-sheet .ps-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1mm 6mm;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  #print-sheet .ps-legend li {
    display: flex;
    align-items: center;
    gap: 1.6mm;
    font-size: 8.5pt;
    color: #4a544f;
  }
  #print-sheet .ps-legend i { flex: 0 0 auto; width: 2.6mm; height: 2.6mm; }
  #print-sheet .ps-legend b {
    font-weight: 500;
    color: #14181b;
    font-variant-numeric: tabular-nums;
  }

  #print-sheet .ps-table {
    width: 100%;
    margin: 4.5mm 0 0;
    border-top: 0.6pt solid #dfe3e1;
    border-collapse: collapse;
    font-size: 9.5pt;
  }
  #print-sheet .ps-table td { padding: 1.1mm 0; border-bottom: 0.4pt solid #e4e8e6; }
  #print-sheet .ps-table tr { break-inside: avoid; }
  #print-sheet .ps-table tr:last-child td { border-bottom: 0; }
  #print-sheet .ps-table .num {
    text-align: right;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  #print-sheet .ps-foot { margin: 5mm 0 0; font-size: 7.5pt; line-height: 1.65; color: #6b7570; }
  #print-sheet .ps-meta { margin: 1.5mm 0 0; font-size: 7.5pt; color: #8d9691; }

  /* Fallback for a page printed without the export module. */
  body:not(.has-report) .site-header,
  body:not(.has-report) .site-footer,
  body:not(.has-report) .ad,
  body:not(.has-report) .calc__actions,
  body:not(.has-report) .rail,
  body:not(.has-report) .toast,
  body:not(.has-report) .btn { display: none !important; }
  body:not(.has-report) { font-size: 11pt; background: #fff; }
  body:not(.has-report) .calc { box-shadow: none; border-color: #bbb; }
  body:not(.has-report) a { color: #000; }
}

/* motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 640px) {
  .nav .nav__cta { display: none; }
  /* the About page stays reachable from the footer on every screen */
  .nav a[href$="about.html"] { display: none; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 8px; font-size: 13.5px; }
}

@media (max-width: 520px) {
  :root { --gutter: 16px; --r-xl: 20px; }
  .presets { gap: 6px; }
  .preset { padding: 5px 9px; font-size: 12px; }
  .hero .btn-row { flex-direction: column; align-items: stretch; }
  .hero .btn { width: 100%; }
  body { font-size: 16px; }
  .calc__form { padding: 22px 17px 18px; }
  .calc__result { padding: 24px 17px 22px; }
  .page-grid { padding: 22px 0 56px; }
  h2 { margin-top: 38px; }
  .nav a { padding: 7px 8px; font-size: 13px; }
  .brand { font-size: 15.5px; }
  .stat-grid { gap: 6px; }
  .stat strong { font-size: 15px; }
  th, td { padding: 10px 12px; }
}

/* ---------- 14. small-screen header (declared last so it wins) ---------- */

@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .nav { gap: 0; }
  .nav a { padding: 8px 6px; font-size: 13px; }
  .brand { font-size: 15px; }
  .brand__mark { width: 26px; height: 26px; border-radius: 8px; }
  .brand__mark svg { width: 15px; height: 15px; }
  .brand__mark { margin-right: 7px; }
}
