/* ================================================================
   Mortgage Overpayment Calculator — shared stylesheet
   ================================================================ */

:root {
  --ink: #1a1f1a;
  --ink-soft: #3a4238;
  --ink-mute: #6b7268;
  --paper: #f5f1e8;
  --paper-warm: #ede7d6;
  --card: #ffffff;
  --accent: #2d5a3d;
  --accent-deep: #1f4029;
  --accent-soft: #e8f0ea;
  --gold: #b8893f;
  --danger: #b84d3f;
  --line: #d9d2bf;
  --line-soft: #ebe5d3;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(184, 137, 63, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(45, 90, 61, 0.04) 0%, transparent 50%);
  z-index: 1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAV ===== */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 232, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 600;
  font-variation-settings: 'opsz' 48;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--paper);
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 0;
  font-size: 13.5px;
  color: var(--ink-mute);
  position: relative;
  z-index: 2;
}

.breadcrumbs a { color: var(--ink-mute); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 10px; color: var(--line); }
.breadcrumbs .current { color: var(--ink); font-weight: 500; }

/* ===== HERO ===== */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 40px;
  position: relative;
  z-index: 2;
}

.hero.small { padding: 48px 32px 24px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  border: 1px solid rgba(45, 90, 61, 0.15);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

h1 {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144;
  font-size: clamp(36px, 5.5vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--ink);
  max-width: 920px;
  margin-bottom: 22px;
}

h1.smaller {
  font-size: clamp(32px, 4.5vw, 52px);
}

h1 .italic {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.hero-sub {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 680px;
  margin-bottom: 32px;
  line-height: 1.5;
}

.hero-sub.smaller { font-size: 17px; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 4px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-mute);
  font-weight: 500;
}

.trust-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ===== SECTIONS ===== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 32px;
  position: relative;
  z-index: 2;
}

.section.tight { padding: 48px 32px; }

.section-eyebrow {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.section-eyebrow.centre { text-align: center; }

.section-title {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--ink);
  max-width: 760px;
  margin-bottom: 18px;
}

.section-title.centre { text-align: center; margin-left: auto; margin-right: auto; }
.section-title .italic { font-style: italic; color: var(--accent); font-weight: 400; }

.section-sub {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 40px;
}

.section-sub.centre { text-align: center; margin-left: auto; margin-right: auto; }

/* ===== CALCULATOR ===== */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
  background: var(--card);
  border-radius: 24px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(26, 31, 26, 0.04),
    0 8px 32px rgba(26, 31, 26, 0.06);
}

.calc-inputs {
  padding: 40px 40px;
  border-right: 1px solid var(--line-soft);
  background: var(--card);
}

.calc-heading {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 48;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.calc-subheading {
  font-size: 14px;
  color: var(--ink-mute);
  margin-bottom: 28px;
}

.input-group { margin-bottom: 22px; }

.input-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.input-label label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.input-label .help {
  font-size: 12px;
  color: var(--ink-mute);
}

.input-wrap { position: relative; }

.input-prefix, .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
  font-size: 15px;
  font-weight: 500;
  pointer-events: none;
}

.input-prefix { left: 16px; }
.input-suffix { right: 16px; }

input[type="number"], input[type="text"], select {
  width: 100%;
  padding: 13px 16px 13px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: all 0.15s;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input.no-prefix { padding-left: 16px; }
input.suffix-pad { padding-right: 40px; }

select {
  padding-left: 16px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath d='M1 1l5 5 5-5' stroke='%236b7268' stroke-width='1.5' fill='none' stroke-linecap='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.12);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 100px;
  outline: none;
  padding: 0;
  border: none;
  margin-top: 10px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--card);
  box-shadow: 0 2px 8px rgba(45, 90, 61, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--card);
  box-shadow: 0 2px 8px rgba(45, 90, 61, 0.3);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 3px;
}

.segmented.three { grid-template-columns: 1fr 1fr 1fr; }

.seg-btn {
  padding: 10px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-mute);
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}

.seg-btn.active {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.advanced-toggle {
  margin-top: 6px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.advanced-toggle svg { transition: transform 0.2s; }
.advanced-toggle.open svg { transform: rotate(180deg); }

.advanced-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.advanced-content.open { max-height: 800px; margin-top: 22px; }

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.advanced-grid .input-group { margin-bottom: 14px; }
.advanced-grid .input-group.full { grid-column: 1 / -1; }

/* ===== RESULTS ===== */
.calc-results {
  background: linear-gradient(180deg, var(--accent-deep) 0%, #173321 100%);
  color: var(--paper);
  padding: 40px 40px;
  position: relative;
  overflow: hidden;
}

.calc-results::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(184, 137, 63, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.results-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(245, 241, 232, 0.6);
  font-weight: 500;
  margin-bottom: 12px;
}

.hero-saving {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144;
  font-size: clamp(44px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 500;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
}

.hero-saving .pound {
  font-size: 0.55em;
  font-weight: 400;
  color: var(--gold);
  margin-right: 4px;
}

.hero-saving-sub {
  font-size: 14.5px;
  color: rgba(245, 241, 232, 0.75);
  margin-bottom: 28px;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: rgba(245, 241, 232, 0.06);
  border: 1px solid rgba(245, 241, 232, 0.1);
  border-radius: 12px;
  padding: 16px 18px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(245, 241, 232, 0.55);
  font-weight: 500;
  margin-bottom: 6px;
}

.stat-value {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 48;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-value .unit {
  font-size: 13px;
  font-weight: 400;
  color: rgba(245, 241, 232, 0.55);
  font-family: 'DM Sans', sans-serif;
  margin-left: 3px;
}

.stat-value .pound-small {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: rgba(245,241,232,0.55);
  font-weight: 400;
}

.chart-wrap {
  background: rgba(245, 241, 232, 0.04);
  border: 1px solid rgba(245, 241, 232, 0.1);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--paper);
}

.chart-legend {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  color: rgba(245, 241, 232, 0.65);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.chart-svg {
  width: 100%;
  height: 130px;
  display: block;
}

.erc-warning {
  background: rgba(184, 77, 63, 0.15);
  border: 1px solid rgba(184, 77, 63, 0.35);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  display: none;
  align-items: flex-start;
  gap: 12px;
}

.erc-warning.show { display: flex; }

.erc-warning-icon {
  flex-shrink: 0;
  color: #e88b7e;
  margin-top: 1px;
}

.erc-warning-text {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(245, 241, 232, 0.95);
}

.erc-warning-text strong {
  display: block;
  margin-bottom: 2px;
  color: #ffb3a8;
  font-weight: 600;
}

.results-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-ghost {
  background: rgba(245, 241, 232, 0.08);
  border: 1px solid rgba(245, 241, 232, 0.2);
  color: var(--paper);
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.btn-ghost:hover {
  background: rgba(245, 241, 232, 0.14);
  border-color: rgba(245, 241, 232, 0.3);
}

/* ===== FEATURE GRID ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-grid.two { grid-template-columns: repeat(2, 1fr); }

.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(26, 31, 26, 0.08);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.feature-title {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 48;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.feature-desc a { font-weight: 500; border-bottom: 1px solid rgba(45,90,61,0.25); text-decoration: none; }
.feature-desc a:hover { border-bottom-color: var(--accent); }

/* ===== COMPARISON TABLE ===== */
.comparison {
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 72px 32px;
  position: relative;
  z-index: 2;
}

.comp-inner { max-width: 1200px; margin: 0 auto; }

.comp-table {
  margin-top: 40px;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.comp-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr 1fr;
  border-bottom: 1px solid var(--line-soft);
}

.comp-row:last-child { border-bottom: none; }

.comp-row.header {
  background: var(--paper);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 600;
}

.comp-cell {
  padding: 16px 20px;
  border-right: 1px solid var(--line-soft);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comp-cell:first-child {
  justify-content: flex-start;
  font-weight: 500;
  color: var(--ink);
}

.comp-cell:last-child { border-right: none; }
.comp-row.us .comp-cell { background: var(--accent-soft); }
.comp-row.us .comp-cell:first-child { font-weight: 700; color: var(--accent-deep); }

.check { color: var(--accent); font-weight: 700; font-size: 18px; }
.cross { color: var(--line); font-weight: 700; font-size: 18px; }

/* ===== TOOL LINKS ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 40px;
}

.tool-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s;
}

.tool-link:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  text-decoration: none;
}

.tool-number {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 48;
  font-size: 26px;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  flex-shrink: 0;
  width: 34px;
}

.tool-content { flex: 1; }

.tool-name {
  font-size: 15.5px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--ink);
}

.tool-desc {
  font-size: 13px;
  color: var(--ink-mute);
}

.tool-arrow {
  color: var(--ink-mute);
  transition: transform 0.15s, color 0.15s;
}

.tool-link:hover .tool-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ===== CONTENT (guide / lender pages) ===== */
.content-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 32px 80px;
  position: relative;
  z-index: 2;
}

.content-wrap.wide { max-width: 900px; }

.content-wrap h2 {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 96;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--ink);
  margin: 48px 0 18px;
}

.content-wrap h2:first-child { margin-top: 0; }

.content-wrap h3 {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 48;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ink);
  margin: 32px 0 14px;
}

.content-wrap p {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 16px;
}

.content-wrap p.lead {
  font-size: 19px;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 24px;
}

.content-wrap ul, .content-wrap ol {
  margin: 0 0 20px 20px;
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.content-wrap ul li, .content-wrap ol li { margin-bottom: 8px; }

.content-wrap a {
  color: var(--accent);
  border-bottom: 1px solid rgba(45, 90, 61, 0.3);
  text-decoration: none;
  font-weight: 500;
}

.content-wrap a:hover { border-bottom-color: var(--accent); text-decoration: none; }

.content-wrap strong { color: var(--ink); font-weight: 600; }

.content-wrap blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 17px;
}

.callout {
  background: var(--accent-soft);
  border: 1px solid rgba(45, 90, 61, 0.2);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 24px 0;
}

.callout-title {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 48;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-deep);
  margin-bottom: 6px;
}

.callout p { font-size: 15.5px; color: var(--ink-soft); margin-bottom: 0; }

.callout.warn {
  background: #fdf0ec;
  border-color: rgba(184, 77, 63, 0.25);
}
.callout.warn .callout-title { color: var(--danger); }

.fact-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 24px 0;
}

.fact-box h4 {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}

.fact-row:last-child { border-bottom: none; }
.fact-row .label { color: var(--ink-soft); }
.fact-row .value { color: var(--ink); font-weight: 600; }

.toc {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 24px 0 32px;
}

.toc-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 12px;
}

.toc ul { margin: 0; list-style: none; }
.toc li { margin-bottom: 6px; font-size: 15px; }
.toc a { color: var(--ink-soft); border-bottom: none; font-weight: 500; }
.toc a:hover { color: var(--accent); }

/* ===== RELATED SECTION ===== */
.related {
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
  padding: 56px 32px;
  position: relative;
  z-index: 2;
}
.related-inner { max-width: 1200px; margin: 0 auto; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 32px;
}

.related-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s;
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(26, 31, 26, 0.06);
  text-decoration: none;
}

.related-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.related-title {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 48;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 6px;
  color: var(--ink);
}

.related-desc {
  font-size: 13.5px;
  color: var(--ink-mute);
  line-height: 1.45;
}

/* ===== LENDER TABLE ===== */
.lender-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.lender-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}

.lender-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.lender-name {
  font-size: 15px;
  font-weight: 600;
}

.lender-arrow { color: var(--ink-mute); }
.lender-card:hover .lender-arrow { color: var(--accent); }

/* ===== FOOTER ===== */
footer {
  background: var(--ink);
  color: rgba(245, 241, 232, 0.7);
  padding: 48px 32px 28px;
  margin-top: 72px;
  position: relative;
  z-index: 2;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 48;
  font-size: 18px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-text {
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 320px;
}

.footer-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--paper);
  font-weight: 600;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  color: rgba(245, 241, 232, 0.65);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--paper); text-decoration: none; }

.footer-legal {
  padding-top: 24px;
  border-top: 1px solid rgba(245, 241, 232, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: rgba(245, 241, 232, 0.5);
}

.footer-legal-links { display: flex; gap: 20px; }
.footer-legal a { color: rgba(245, 241, 232, 0.5); text-decoration: none; }
.footer-legal a:hover { color: var(--paper); text-decoration: none; }

/* ===== SITEMAP PAGE ===== */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 32px;
}

.sitemap-col h3 {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--ink);
}

.sitemap-col ul { list-style: none; margin: 0; }
.sitemap-col li { margin-bottom: 8px; font-size: 14.5px; }
.sitemap-col a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}

.sitemap-col a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-inputs { border-right: none; border-bottom: 1px solid var(--line-soft); padding: 32px 24px; }
  .calc-results { padding: 32px 24px; }
  .feature-grid, .feature-grid.two { grid-template-columns: 1fr; }
  .tools-grid, .lender-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .sitemap-grid { grid-template-columns: 1fr; }
  .comp-row { font-size: 12.5px; }
  .comp-cell { padding: 14px 10px; font-size: 12.5px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-legal { flex-direction: column; gap: 14px; text-align: center; }
}

@media (max-width: 640px) {
  .hero, .section { padding: 48px 20px 32px; }
  .section { padding: 48px 20px; }
  .nav-inner { padding: 14px 20px; }
  .breadcrumbs { padding: 20px 20px 0; }
  .content-wrap { padding: 32px 20px 60px; }
  .comparison { padding: 48px 20px; }
  .related { padding: 40px 20px; }
  .nav-links { gap: 18px; font-size: 13px; }
  .nav-links li:nth-child(n+3) { display: none; }
  .stat-row { grid-template-columns: 1fr; }
  .advanced-grid { grid-template-columns: 1fr; }
  .comp-row { grid-template-columns: 1.8fr 1fr 1fr; }
  .comp-cell:nth-child(4), .comp-cell:nth-child(5) { display: none; }
  footer { padding: 40px 20px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
