/* Commercial Lenders of America
   Layout idea: left-aligned editorial pages; engraved security-printing details
   (guilloche rosette, double-ruled certificate frames) used in only a few places,
   with quiet, roomy, plain-spoken content everywhere else. */

@font-face {
  font-family: "Libre Caslon Display";
  src: url("../fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/libre-caslon-text-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #12302a;
  --ink-deep: #0d241f;
  --treasury: #1e5a48;
  --tint: #e4ece5;
  --paper: #fafbf8;
  --white: #ffffff;
  --gold: #b08a3e;
  --gold-light: #cda85e;
  --slate: #4e6158;
  --rule: #cad6cd;
  --field: #8fa498;
  --danger: #a33b2b;
  --danger-tint: #fbeeea;
  --info-tint: #f5efe1;
  --on-dark: #f4f6f1;
  --on-dark-soft: #bfd0c6;

  --font-display: "Libre Caslon Display", "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --font-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --step-h1: clamp(2.45rem, 1.55rem + 3.7vw, 4.5rem);
  --step-h2: clamp(1.95rem, 1.45rem + 1.9vw, 3rem);
  --step-lead: clamp(1.13rem, 1.04rem + 0.38vw, 1.32rem);
  --gutter: clamp(20px, 4vw, 40px);
  --section-pad: clamp(64px, 8.5vw, 116px);
  --radius: 4px;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.6;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
canvas {
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-h1);
  line-height: 1.04;
}

h2 {
  font-size: var(--step-h2);
  line-height: 1.1;
}

h3 {
  font-family: var(--font-sans);
  font-size: 1.22rem;
  font-weight: 620;
  line-height: 1.3;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

p {
  max-width: 38rem;
}

a {
  color: var(--treasury);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--treasury);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--on-dark);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
  color: var(--on-dark);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.7em 1.35em;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 620;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--treasury);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-light {
  background: var(--on-dark);
  color: var(--ink);
}

.btn-light:hover {
  background: var(--white);
  color: var(--ink);
}

.btn-small {
  min-height: 42px;
  padding: 0.55em 1.05em;
  font-size: 0.95rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.brand img {
  display: block;
  height: 46px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  padding-block: 6px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 520;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover {
  border-bottom-color: var(--rule);
}

.nav-list a[aria-current="page"] {
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (max-width: 1020px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 16px var(--gutter) 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 30px -24px rgba(18, 48, 42, 0.45);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list a {
    display: block;
    padding: 13px 0;
    font-size: 1.08rem;
    border-bottom: 1px solid var(--rule);
  }

  .nav-list a[aria-current="page"] {
    border-bottom-color: var(--rule);
    box-shadow: inset 3px 0 0 var(--gold);
    padding-left: 14px;
  }

  .site-nav .btn {
    align-self: flex-start;
  }
}

@media (max-width: 420px) {
  .brand img {
    height: 40px;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section-pad);
}

.section-tint {
  background: var(--tint);
}

.section-head {
  display: grid;
  gap: 16px;
  max-width: 44rem;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head p {
  color: var(--slate);
  font-size: var(--step-lead);
  line-height: 1.5;
}

.text-link {
  display: inline-block;
  margin-top: clamp(28px, 4vw, 40px);
  font-weight: 620;
}

.lead {
  color: var(--slate);
  font-size: var(--step-lead);
  line-height: 1.5;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--tint);
  padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 112px);
}

.hero .rosette {
  position: absolute;
  top: 50%;
  right: -250px;
  width: 860px;
  height: 860px;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 24px;
  justify-items: start;
}

.hero-copy h1 {
  max-width: 12.5em;
}

.h1-line {
  display: block;
}

.hero-copy .lead {
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  padding: 0;
  margin-top: 4px;
  list-style: none;
  font-size: 0.98rem;
  font-weight: 540;
}

.assurances li,
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.check {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 0.12em;
  color: var(--treasury);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero .rosette {
    top: -120px;
    right: -260px;
    width: 640px;
    height: 640px;
    transform: none;
    opacity: 0.55;
  }
}

/* ---------- Certificate frame (runway card, estimate result) ---------- */

.certificate {
  position: relative;
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 7px;
  box-shadow: 0 26px 50px -30px rgba(18, 48, 42, 0.55);
}

.certificate-inner {
  border: 1px solid var(--gold);
  padding: clamp(22px, 3vw, 32px);
}

.certificate h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.card-intro {
  margin-top: 6px;
  color: var(--slate);
  font-size: 1rem;
}

/* ---------- Runway card ---------- */

.runway-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.runway-output {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.runway-figure {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.runway-count {
  font-family: var(--font-display);
  font-size: clamp(3rem, 2.4rem + 2vw, 3.75rem);
  line-height: 0.95;
  font-variant-numeric: lining-nums tabular-nums;
}

.runway-unit {
  color: var(--slate);
  font-size: 1.02rem;
  font-weight: 540;
}

.runway-scale {
  position: relative;
  margin-top: 30px;
  padding-bottom: 24px;
}

.runway-track {
  display: flex;
  height: 10px;
  border-radius: 2px;
  overflow: hidden;
}

.runway-track span {
  display: block;
  height: 100%;
}

.runway-track span:nth-child(1) {
  width: 50%;
  background: #d3dfd7;
}

.runway-track span:nth-child(2) {
  width: 25%;
  background: #a9c3b5;
  border-left: 2px solid var(--white);
}

.runway-track span:nth-child(3) {
  width: 12.5%;
  background: #6f9a86;
  border-left: 2px solid var(--white);
}

.runway-track span:nth-child(4) {
  width: 12.5%;
  background: var(--treasury);
  border-left: 2px solid var(--white);
}

.runway-marker {
  position: absolute;
  top: -12px;
  left: 0;
  width: 2px;
  height: 22px;
  margin-left: -1px;
  background: var(--ink);
  transition: left 0.35s ease;
}

.runway-marker::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 11px;
  height: 11px;
  background: var(--gold);
  border: 1.5px solid var(--ink);
  transform: translateX(-50%) rotate(45deg);
}

.runway-marker.is-past::before {
  background: var(--danger);
}

.runway-ticks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--slate);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.runway-ticks li {
  position: absolute;
  top: 0;
  white-space: nowrap;
  transform: translateX(-50%);
}

.runway-ticks .tick-24 { left: 0; }
.runway-ticks .tick-12 { left: 50%; }
.runway-ticks .tick-6 { left: 75%; }
.runway-ticks .tick-3 { left: 87.5%; }
.runway-ticks .tick-0 { left: 100%; }

.runway-ticks li:first-child {
  transform: none;
}

.runway-ticks li:last-child {
  transform: translateX(-100%);
}

.runway-status {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.runway-status h3 {
  font-size: 1.1rem;
}

.runway-status p {
  color: var(--slate);
  font-size: 0.98rem;
  line-height: 1.55;
}

.runway-cta {
  margin-top: 20px;
}

/* ---------- Forms ---------- */

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field label,
.field .label {
  font-size: 0.95rem;
  font-weight: 620;
}

.field .optional {
  color: var(--slate);
  font-weight: 450;
}

.field .hint {
  color: var(--slate);
  font-size: 0.88rem;
  line-height: 1.45;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.62em 0.8em;
  border: 1px solid var(--field);
  border-radius: var(--radius);
  background-color: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%2312302a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75em center;
  background-size: 16px 16px;
  cursor: pointer;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(30, 90, 72, 0.3);
  outline-offset: 0;
  border-color: var(--treasury);
}

[aria-invalid="true"] {
  border-color: var(--danger) !important;
}

.field-error {
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 560;
}

.field-error:empty {
  display: none;
}

.input-affix {
  position: relative;
  display: block;
}

.input-affix .affix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate);
  font-size: 1rem;
  pointer-events: none;
}

.input-affix .affix-start {
  left: 0.8em;
}

.input-affix .affix-end {
  right: 0.8em;
}

.input-affix input.has-start {
  padding-left: 1.7em;
}

.input-affix input.has-end {
  padding-right: 2em;
}

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--treasury);
  background: var(--tint);
  font-size: 0.98rem;
  font-weight: 540;
}

.form-status[hidden] {
  display: none;
}

.form-status.is-error {
  border-left-color: var(--danger);
  background: var(--danger-tint);
}

.form-status.is-info {
  border-left-color: var(--gold);
  background: var(--info-tint);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Home: why now ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.split-copy {
  display: grid;
  gap: 20px;
}

.split-copy p {
  font-size: 1.12rem;
}

.source-note {
  color: var(--slate);
  font-size: 0.86rem;
  line-height: 1.5;
}

.source-note a {
  color: var(--slate);
}

.point-list {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule);
}

.point-list li {
  display: grid;
  gap: 6px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.point-list p {
  color: var(--slate);
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Steps (a true sequence) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  font-family: var(--font-serif);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--gold);
}

.steps p {
  color: var(--slate);
  font-size: 1.02rem;
}

@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Program list ---------- */

.program-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 5vw, 72px);
  padding: 0;
  list-style: none;
}

.program-list li {
  display: grid;
  gap: 6px;
  padding: 22px 0 24px;
  border-top: 1px solid var(--rule);
}

.program-list p {
  color: var(--slate);
  font-size: 1.02rem;
}

@media (max-width: 760px) {
  .program-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Property types ---------- */

.type-list {
  columns: 3 14rem;
  column-gap: clamp(24px, 4vw, 56px);
  padding: 0;
  list-style: none;
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.35;
}

.type-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  break-inside: avoid;
}

.type-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: translateY(-0.18em) rotate(45deg);
}

/* ---------- Estimate teaser ---------- */

.teaser {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 32px;
  align-items: end;
}

.teaser .section-head {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .teaser {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

/* ---------- Call to action band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-dark);
  padding-block: clamp(64px, 8vw, 104px);
}

.cta-band .rosette {
  position: absolute;
  top: 50%;
  right: -180px;
  width: 640px;
  height: 640px;
  transform: translateY(-50%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  justify-items: start;
  max-width: 40rem;
}

.cta-band h2 {
  color: var(--on-dark);
}

.cta-band p {
  color: var(--on-dark-soft);
  font-size: var(--step-lead);
  line-height: 1.5;
}

.cta-band .btn {
  margin-top: 8px;
}

.cta-band :focus-visible {
  outline-color: var(--gold-light);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink-deep);
  color: var(--on-dark-soft);
  padding-block: 56px 32px;
  font-size: 0.97rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.footer-brand {
  display: grid;
  gap: 16px;
  align-content: start;
}

.footer-brand img {
  display: block;
  height: 46px;
  width: auto;
}

.footer-brand p {
  max-width: 24rem;
}

.footer-col h2 {
  margin-bottom: 12px;
  color: var(--on-dark);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 620;
  letter-spacing: 0;
}

.footer-col ul {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--on-dark-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--on-dark);
  text-decoration: underline;
}

.site-footer :focus-visible {
  outline-color: var(--gold-light);
}

.footer-bottom {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(244, 246, 241, 0.14);
  font-size: 0.88rem;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- Inner page hero ---------- */

.page-hero {
  background: var(--tint);
  padding-block: clamp(48px, 6.5vw, 88px) clamp(44px, 5.5vw, 72px);
  border-bottom: 1px solid var(--rule);
}

.page-hero .container {
  display: grid;
  gap: 18px;
}

.page-hero h1 {
  max-width: 15em;
}

.page-hero .lead {
  max-width: 40rem;
}

/* ---------- How it works: detailed process ---------- */

.process {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
  counter-reset: process;
  max-width: 54rem;
}

.process li {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 4px 20px;
  padding-bottom: 36px;
  counter-increment: process;
}

.process li::before {
  content: counter(process);
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink);
  position: relative;
  z-index: 1;
}

.process li::after {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 0;
  left: 24px;
  width: 1px;
  background: var(--rule);
}

.process li:last-child {
  padding-bottom: 0;
}

.process li:last-child::after {
  display: none;
}

.process h3 {
  padding-top: 10px;
}

.process p {
  grid-column: 2;
  color: var(--slate);
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 40px;
  padding: 0;
  list-style: none;
  max-width: 60rem;
}

@media (max-width: 700px) {
  .checklist {
    grid-template-columns: minmax(0, 1fr);
  }
}

.after-list {
  margin-top: 28px;
  color: var(--slate);
}

.terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.terms div {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.terms dt {
  font-weight: 620;
  font-size: 1.15rem;
}

.terms .abbr {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.05;
  color: var(--treasury);
}

.terms dd {
  color: var(--slate);
  font-size: 1.02rem;
}

.terms .formula {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-style: italic;
}

@media (max-width: 820px) {
  .terms {
    grid-template-columns: minmax(0, 1fr);
  }
}

.phases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  list-style: none;
}

.phases li {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px clamp(16px, 2vw, 24px) 4px 0;
  border-top: 4px solid #d3dfd7;
}

.phases li:nth-child(2) {
  border-top-color: #a9c3b5;
}

.phases li:nth-child(3) {
  border-top-color: #6f9a86;
}

.phases li:nth-child(4) {
  border-top-color: var(--treasury);
}

.phases .when {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--slate);
}

.phases p {
  color: var(--slate);
  font-size: 1rem;
}

@media (max-width: 860px) {
  .phases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }
}

@media (max-width: 520px) {
  .phases {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Loan programs ---------- */

.programs-detail {
  display: grid;
  gap: 0;
}

.program {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px clamp(28px, 5vw, 72px);
  padding-block: 32px;
  border-top: 1px solid var(--rule);
}

.program:last-child {
  border-bottom: 1px solid var(--rule);
}

.program h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.program .body {
  display: grid;
  gap: 12px;
}

.program .fit {
  color: var(--slate);
  font-size: 1rem;
}

.program .fit strong {
  color: var(--ink);
  font-weight: 620;
}

@media (max-width: 760px) {
  .program {
    grid-template-columns: minmax(0, 1fr);
  }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--white);
}

.compare {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.98rem;
  line-height: 1.45;
}

.compare caption {
  padding: 0;
}

.compare th,
.compare td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.compare thead th {
  background: var(--ink);
  color: var(--on-dark);
  font-weight: 620;
  font-size: 0.95rem;
  border-bottom: 0;
}

.compare tbody th {
  font-weight: 620;
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
  border-bottom: 0;
}

.compare tbody tr:nth-child(even) {
  background: #f4f7f3;
}

.table-note {
  margin-top: 14px;
  color: var(--slate);
  font-size: 0.9rem;
}

/* ---------- Estimate page ---------- */

.estimate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.panel {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
}

.panel h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.estimate-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  margin-top: 20px;
}

.estimate-fields .span-2 {
  grid-column: 1 / -1;
}

.result-message {
  color: var(--slate);
}

.estimate-result .result-label {
  color: var(--slate);
  font-size: 0.98rem;
  font-weight: 560;
}

.estimate-result .result-figure {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2rem + 2vw, 3.5rem);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.estimate-result .result-sub {
  margin-top: 8px;
  color: var(--slate);
  font-size: 0.98rem;
}

.bars {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}

.bar-head strong {
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.bar {
  position: relative;
  height: 12px;
  background: #edf2ee;
  border-radius: 2px;
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: #a9c3b5;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.bar-row.is-limit .bar-fill {
  background: var(--treasury);
}

.bar-row.is-payoff .bar-fill {
  background: var(--gold);
}

.gap-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--tint);
  border-left: 3px solid var(--treasury);
  font-weight: 600;
}

.gap-line.is-short {
  background: var(--danger-tint);
  border-left-color: var(--danger);
}

.gap-line strong {
  font-variant-numeric: tabular-nums;
}

.result-notes {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  color: var(--slate);
  font-size: 0.95rem;
}

.result-notes .payment {
  color: var(--ink);
}

.estimate-result .btn {
  margin-top: 22px;
}

.fine-print {
  margin-top: 28px;
  color: var(--slate);
  font-size: 0.88rem;
  max-width: 48rem;
}

@media (max-width: 900px) {
  .estimate-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .estimate-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- About ---------- */

.about-intro {
  display: grid;
  gap: 22px;
  max-width: 46rem;
}

.about-intro p:first-child {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  line-height: 1.5;
  max-width: 42rem;
}

.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 72px);
  padding: 0;
  list-style: none;
}

.principles li {
  display: grid;
  gap: 6px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}

.principles h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 400;
}

.principles p {
  color: var(--slate);
}

@media (max-width: 720px) {
  .principles {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 50rem;
  border-bottom: 1px solid var(--rule);
}

.faq details {
  border-top: 1px solid var(--rule);
}

.faq summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  font-size: 1.15rem;
  font-weight: 620;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--treasury);
  transition: transform 0.2s ease;
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: rotate(0deg);
}

.faq summary:hover {
  color: var(--treasury);
}

.faq .answer {
  display: grid;
  gap: 12px;
  padding: 0 0 24px;
  color: var(--slate);
}

.faq .answer ul {
  display: grid;
  gap: 6px;
  padding-left: 1.2em;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 18px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-group-label {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.form-group-label span {
  display: block;
  margin-top: 2px;
  color: var(--slate);
  font-family: var(--font-sans);
  font-size: 0.92rem;
}

.field-set {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-set legend {
  padding: 0;
  margin-bottom: 6px;
}

.date-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 10px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.form-actions .required-note {
  color: var(--slate);
  font-size: 0.9rem;
}

.contact-aside {
  display: grid;
  gap: 28px;
}

.contact-aside h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.next-steps {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  counter-reset: next;
}

.next-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  color: var(--slate);
  font-size: 1rem;
  counter-increment: next;
}

.next-steps li::before {
  content: counter(next);
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--gold);
}

.aside-assurances {
  display: grid;
  gap: 10px;
  padding: 20px 0 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.aside-assurances li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-weight: 540;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Simple message pages ---------- */

.message-page {
  padding-block: clamp(72px, 12vw, 160px);
}

.message-page .container {
  display: grid;
  gap: 20px;
  justify-items: start;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* ---------- Motion ---------- */

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