.referral-page {
  --ref-pad: clamp(2.5rem, 5vw, 5rem);
  --ref-focus: var(--accent-text);
  background: var(--surface);
  color: var(--text);
}

[data-theme="dark"] .referral-page { --ref-focus: #ffa16d; }

.ref-wrap {
  width: min(100% - 2 * clamp(24px, 5vw, 80px), 81rem);
  margin-inline: auto;
}

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

.ref-kicker {
  margin: 0;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 550;
  line-height: 1.4;
}

.ref-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  width: min(100% - 2.5rem, 76rem);
  gap: clamp(2.5rem, 6vw, 6rem);
  padding-block: clamp(2.8rem, 7vw, 6.8rem);
}

.referral-page main :is(h1, h2, h3) {
  font-stretch: normal;
  font-variation-settings: "wdth" 100;
  font-weight: 520;
  letter-spacing: -.03em;
  text-transform: none;
  text-wrap: balance;
}

.ref-hero-copy h1 {
  margin: .55rem 0 0;
  font-size: clamp(2.5rem, 4.3vw, 3.875rem);
  line-height: 1.08;
}
.ref-hero-copy h1 span { color: var(--text-muted); }
.ref-hero-copy > p:not(.ref-kicker) { max-width: 45ch; margin-block: 1.5rem; }
.ref-hero-copy > p:not(.ref-kicker),
.ref-section-heading > p,
.ref-apply-copy > p:not(.ref-kicker) {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.6;
}

.ref-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.2rem; }
.ref-actions .button,
.ref-intake .button { gap: .85rem; justify-content: space-between; }
.ref-actions .ref-arrow-link { margin-top: 0; }
.ref-icon-arrow {
  display: inline-block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  vertical-align: -.16em;
  background: currentColor;
  mask: url("/assets/icons/arrow-right.svg") center / contain no-repeat;
}
.ref-icon-down { rotate: 90deg; }
.ref-actions .button span,
.ref-arrow-link span { transition: transform .2s ease; }
.ref-actions .button:hover span,
.ref-arrow-link:hover span { transform: translateX(3px); }

.ref-hero-figure {
  min-width: 0;
  margin: 0;
  padding: clamp(1rem, 2.7vw, 2.1rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-alt);
}

.ref-figure-header {
  font-size: clamp(1.2rem, 2.15vw, 1.7rem);
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.ref-journey-flow {
  position: relative;
  margin-block: 1.3rem 1rem;
}
.ref-journey-flow ol {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.ref-journey-flow strong {
  display: block;
  margin: .45rem .2rem 0;
  font-size: clamp(.72rem, 1.4vw, .88rem);
  font-weight: 600;
  line-height: 1.3;
}
.ref-journey-rail {
  position: absolute;
  inset: 20px calc(100% / 6) auto;
  height: 2px;
  background: var(--line);
}
.ref-journey-rail > i { position: absolute; z-index: 1; }
.ref-journey-rail [data-ref-trace] {
  inset: 0;
  background: var(--orange);
  transform-origin: left;
}
.ref-journey-rail [data-ref-signal] {
  z-index: 2;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  opacity: 0;
  border: 2px solid var(--surface-raised);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 22%, transparent);
  transform: translate(-50%, -50%);
}
.ref-journey-rail [data-ref-signal]::before {
  position: absolute;
  top: 50%;
  right: 70%;
  width: 1.7rem;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--orange));
  transform: translateY(-50%);
  content: "";
}
.ref-journey-node {
  position: relative;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  margin-inline: auto;
  place-items: center;
  border: 1px solid var(--control-line);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--accent-text);
}
.ref-journey-node::after {
  position: absolute;
  inset: -4px;
  opacity: 0;
  border: 1px solid var(--orange);
  border-radius: 50%;
  content: "";
}
.ref-node-intro {
  position: relative;
  width: 15px;
  height: 7px;
  margin-top: 8px;
  border: 1.5px solid currentColor;
  border-radius: 7px 7px 2px 2px;
}
.ref-node-intro::before {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transform: translateX(-50%);
  content: "";
}
.ref-node-payment {
  width: 18px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background:
    linear-gradient(currentColor, currentColor) 0 2px / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 7px / 5px 1.5px no-repeat;
}
.ref-node-commission {
  width: 17px;
  height: 15px;
  border-bottom: 1.5px solid currentColor;
  background:
    linear-gradient(currentColor, currentColor) 1px bottom / 3px 5px no-repeat,
    linear-gradient(currentColor, currentColor) center bottom / 3px 9px no-repeat,
    linear-gradient(currentColor, currentColor) 13px bottom / 3px 13px no-repeat;
}
[data-ref-phase="intro"] li:nth-child(1) .ref-journey-node,
[data-ref-phase="payment"] li:nth-child(2) .ref-journey-node,
[data-ref-phase="commission"] li:nth-child(3) .ref-journey-node {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--ink);
}

.ref-figure-body {
  padding: clamp(.85rem, 2.2vw, 1.45rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}
.ref-figure-total { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: .4rem .65rem; }
.ref-figure-total > div { display: grid; gap: .25rem; }
.ref-figure-total strong {
  font-size: clamp(2.2rem, 4.25vw, 3.875rem);
  font-weight: 520;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.ref-figure-total span { color: var(--text-muted); font-size: .82rem; }
.ref-figure-total .ref-figure-progress { padding: .17rem .4rem; border-inline-start: 2px solid var(--orange); background: var(--surface-alt); font-size: .73rem; font-variant-numeric: tabular-nums; }
.ref-figure-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: clamp(3px, .6vw, 8px);
  height: clamp(4.6rem, 8vw, 7rem);
  margin-top: .85rem;
  padding-inline: .2rem;
  background: repeating-linear-gradient(to top, var(--line) 0 1px, transparent 1px 25%);
}
.ref-figure-chart i {
  position: relative;
  height: calc(var(--earned) * 100% / 1605);
  background: color-mix(in srgb, var(--accent-text) 13%, var(--surface-raised));
}
.ref-figure-chart b {
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent-text);
  border-bottom: 0;
  background: color-mix(in srgb, var(--accent-text) 25%, var(--surface-raised));
  transform-origin: bottom;
}
.ref-figure-chart .is-current b,
.ref-figure-chart i:last-child b { background: var(--orange); }
.ref-figure-axis { display: flex; justify-content: space-between; margin-top: .35rem; color: var(--text-muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.ref-figure-note { margin: .8rem 0 0; color: var(--text-muted); font-size: .8rem; }
.ref-figure-note strong { color: var(--text); font-weight: 600; }
.referral-page main [hidden] { display: none; }

.ref-jump { border-block: 1px solid var(--line); }
.ref-jump > div { display: flex; flex-wrap: wrap; gap: 0 clamp(.9rem, 2.4vw, 2rem); }
.ref-jump a { display: flex; min-height: 54px; align-items: center; padding-block: .5rem; color: var(--text-muted); font-size: .88rem; text-decoration: none; }
.ref-jump a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: .4em; }

.ref-section-heading { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: clamp(1rem, 4vw, 3rem); margin-bottom: 1.8rem; }
.ref-section h2 { margin: .4rem 0 0; font-size: clamp(1.875rem, 3.2vw, 2.75rem); line-height: 1.12; }
.ref-section-heading > p { margin: 0; max-width: 48ch; }

.ref-estimator { display: grid; grid-template-columns: minmax(17rem, .46fr) minmax(0, 1fr); align-items: start; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); }
.ref-estimator:not(:has(.ref-controls:not([hidden]))) { grid-template-columns: 1fr; }
.ref-controls { min-width: 0; margin: 0; border: 0; padding: 0 clamp(1rem, 3vw, 2rem) 1.6rem; }
.ref-controls legend { float: left; width: 100%; padding: 1.5rem 0 .4rem; font-size: 1.1rem; font-weight: 750; }
.ref-service-list { clear: both; }
.ref-service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(4.65rem, 5.8rem) auto;
  align-items: center;
  gap: .35rem .5rem;
  padding-block: .55rem;
  border-bottom: 1px solid var(--line);
}
.ref-service-name strong { display: block; font-size: .84rem; line-height: 1.35; }
.ref-controls .ref-service-name label { margin: .12rem 0 0; color: var(--text-muted); font-size: .73rem; font-weight: 500; }
.ref-service-picker { display: flex; flex-wrap: wrap; gap: .4rem; }
.ref-service-picker select { flex: 1 1 8rem; min-width: 0; }
.ref-add-service,
.ref-remove-service {
  min-height: 44px;
  font-size: .76rem;
  font-weight: 650;
  cursor: pointer;
}
.ref-add-service { padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-alt); }
.ref-add-service:disabled { color: var(--text-muted); cursor: default; }
.ref-remove-service { padding: .15rem; border: 0; background: transparent; text-decoration: underline; }
.ref-controls label { display: flex; justify-content: space-between; gap: .5rem; margin: 1rem 0 .4rem; font-size: .83rem; font-weight: 700; }
.ref-controls label span { color: var(--ref-focus); font-variant-numeric: tabular-nums; }
.ref-controls select,
.ref-money { width: 100%; min-height: 2.8rem; border: 1px solid var(--control-line); border-radius: 4px; background: var(--surface); color: var(--text); font-size: .92rem; }
.ref-controls select { padding-inline: .62rem; }
.ref-money { display: flex; align-items: center; }
.ref-money > span { padding-left: .65rem; color: var(--text-muted); }
.ref-money input { align-self: stretch; width: 100%; min-width: 0; padding: 0 .65rem 0 .4rem; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; }
.ref-money:has(input:focus-visible) { outline: 2px solid var(--ref-focus); outline-offset: 3px; }
.ref-money input:focus-visible { outline: none; }
.ref-money:has(input[aria-invalid="true"]) { border-color: var(--ref-focus); }
.ref-controls input[type="range"] { display: block; width: 100%; min-height: 2rem; margin: 0; accent-color: var(--accent-text); cursor: pointer; }
.ref-range-ends { display: flex; justify-content: space-between; color: var(--text-muted); font-size: .73rem; }
.ref-month-shortcuts,
.ref-chart-toggle { display: flex; flex-wrap: wrap; gap: .35rem; }
.ref-month-shortcuts button,
.ref-chart-toggle button {
  min-height: 2.35rem;
  padding: .24rem .53rem;
  border: 1px solid var(--control-line);
  border-radius: 4px;
  background: transparent;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
}
.ref-month-shortcuts button { border-width: 2px; }
.ref-month-shortcuts button:hover { background: var(--surface-alt); }
.ref-month-shortcuts button[aria-pressed="true"] { color: var(--ref-focus); border-color: var(--ref-focus); }
.ref-control-note { margin: 1rem 0 0; color: var(--text-muted); font-size: .77rem; }

.ref-projection { min-width: 0; height: 100%; padding: clamp(1rem, 3.5vw, 2.2rem); border-inline-start: 1px solid var(--line); border-radius: 0 11px 11px 0; background: var(--surface-alt); }
.ref-estimator:not(:has(.ref-controls:not([hidden]))) .ref-projection { border: 0; border-radius: 11px; }
.ref-projection-top { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 1rem; }
.ref-total {
  display: block;
  margin: .36rem 0 .75rem;
  font-size: clamp(2.4rem, 4.3vw, 3.875rem);
  font-weight: 520;
  letter-spacing: -.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.ref-year-summary { margin-block: .5rem 1rem; }
.ref-year-summary table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.ref-year-summary caption { padding-bottom: .4rem; text-align: start; font-size: .9rem; font-weight: 650; }
.ref-year-summary :is(th, td) { padding: .5rem .25rem; border-bottom: 1px solid var(--line); text-align: end; overflow-wrap: anywhere; }
.ref-year-summary tr > :first-child { width: 32%; padding-inline-start: 0; text-align: start; }
.ref-year-summary thead th { color: var(--text-muted); font-size: .76rem; font-weight: 550; }
.ref-year-summary tbody th { font-size: .84rem; }
.ref-year-summary tbody small { display: block; color: var(--text-muted); font-size: .72rem; font-weight: 500; }
.ref-year-summary td { font-size: clamp(.87rem, 2vw, 1.2rem); font-weight: 650; }
.ref-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: .7rem; border-block: 1px solid var(--line); }
.ref-metrics div { display: grid; align-content: start; padding-right: .5rem; }
.ref-metrics div + div { padding-left: .9rem; border-left: 1px solid var(--line); }
.ref-metrics span { color: var(--text-muted); font-size: .76rem; }
.ref-metrics strong { font-size: clamp(1.03rem, 2vw, 1.38rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ref-breakdown { margin-top: 1rem; }
.ref-breakdown h3 { margin: 0 0 .25rem; font-size: .9rem; }
.ref-breakdown dl { margin: 0; }
.ref-breakdown dl > div { display: flex; justify-content: space-between; gap: .55rem; padding-block: .4rem; border-bottom: 1px solid var(--line); font-size: .82rem; }
.ref-breakdown small { display: block; color: var(--text-muted); font-size: .72rem; }
.ref-breakdown dd { margin: 0; font-variant-numeric: tabular-nums; text-align: end; overflow-wrap: anywhere; }

.ref-chart { margin: 1rem 0 0; }
.ref-chart-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.ref-chart-header figcaption { font-size: .9rem; font-weight: 700; }
.ref-chart-toggle button { color: var(--text); }
.ref-chart-toggle button:hover { background: var(--surface-raised); }
.ref-chart-toggle button[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--surface); }
.ref-chart-visual { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .6rem; }
.ref-chart-axis { display: flex; flex-direction: column; justify-content: space-between; text-align: right; }
.ref-chart-ticks { grid-column: 2; display: flex; justify-content: space-between; margin-top: .24rem; }
.ref-chart-axis,
.ref-chart-ticks { color: var(--text-muted); font-size: .72rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ref-chart-plot {
  --bar-gap: clamp(3px, .55vw, 7px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--columns, 12), minmax(0, 1fr));
  align-items: end;
  gap: var(--bar-gap);
  height: clamp(7rem, 11vw, 10rem);
  border-block: 1px solid var(--line);
  background: linear-gradient(to top, transparent calc(50% - .5px), var(--line) 0 calc(50% + .5px), transparent 0);
}
.ref-chart-plot[data-later-rate]::after {
  position: absolute;
  inset-block: 0;
  inset-inline-start: calc((100% + var(--bar-gap)) * 12 / var(--columns) - var(--bar-gap) / 2);
  border-inline-start: 1px dashed var(--text-muted);
  transform: translateX(-50%);
  content: "";
}
.ref-chart-plot[data-dense] { --bar-gap: clamp(1px, .32vw, 3px); }
.ref-plot-bar {
  height: 100%;
  border-top: 2px solid var(--accent-text);
  background: var(--orange);
  transform: scaleY(var(--bar-height, 0));
  transform-origin: bottom;
  transition: transform .42s cubic-bezier(.2, .65, .22, 1);
}
.ref-chart-plot.is-reflowing .ref-plot-bar { transition: none; }
.ref-plot-bar.is-later { border-color: var(--text-muted); background: var(--control-line); }
.ref-chart-boundary { margin: .65rem 0 0; color: var(--text-muted); font-size: .77rem; }
.ref-chart-boundary::before { display: inline-block; width: .8rem; margin-inline-end: .4rem; border-top: 1px dashed currentColor; vertical-align: .22em; content: ""; }
.ref-chart-details { margin-top: .85rem; font-size: .78rem; }
.ref-chart-details summary { width: fit-content; min-height: 1.75rem; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.ref-chart-details table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.ref-chart-details :is(th, td) { padding: .42rem .2rem; text-align: right; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.ref-chart-details tr > :first-child { width: 16%; text-align: left; }
.ref-chart-details tr.ref-rate-start > * { border-top: 1px dashed var(--control-line); }
.ref-chart-note { margin: .7rem 0 0; color: var(--text-muted); font-size: .76rem; }
.ref-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ref-rate-section { border-block: 1px solid var(--line); }
.ref-faq-section { background: var(--surface-alt); border-block: 1px solid var(--line); }
.ref-rate-rows { border-top: 1px solid var(--line); }
.ref-rate-rows article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr) minmax(0, 1.45fr) auto; align-items: center; gap: .65rem clamp(1rem, 2.5vw, 2rem); padding-block: 1.3rem; border-bottom: 1px solid var(--line); }
.ref-rate-rows h3 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.15; }
.ref-rate-rows p { margin: 0; color: var(--text-muted); font-size: .85rem; }
.ref-rate-value strong,
.ref-rate-value > span { display: block; }
.ref-rate-value strong { color: var(--text); font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.1; font-weight: 520; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ref-rate-value small { color: var(--text-muted); font-size: .5em; letter-spacing: 0; }
.ref-rate-value > span { margin-top: .18rem; font-size: .72rem; }
.ref-rate-rows a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-size: .84rem; }
.ref-rate-foot { margin: .8rem 0 0; color: var(--text-muted); font-size: .84rem; }

.ref-steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 4vw, 3rem); margin: 0; padding: 0; list-style: none; }
.ref-steps::before { position: absolute; top: 1.27rem; left: 0; right: 0; height: 1px; background: var(--line); content: ""; }
.ref-steps::after { position: absolute; z-index: 0; top: 1.27rem; left: 0; width: 67%; height: 2px; background: var(--orange); transform-origin: left; content: ""; }
.ref-steps li { position: relative; z-index: 1; }
.ref-step-node { display: grid; width: 2.6rem; height: 2.6rem; margin-bottom: .8rem; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--accent-text); font-size: .8rem; font-variant-numeric: tabular-nums; }
.ref-steps h3,
.ref-proof h3 { margin: 0 0 .4rem; font-size: clamp(1.2rem, 2.3vw, 1.75rem); line-height: 1.1; letter-spacing: -.036em; }
.ref-steps p,
.ref-proof > div > p:not(.ref-kicker) { margin: 0; color: var(--text-muted); }

.ref-proof { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 1rem; margin-top: clamp(2.5rem, 6vw, 5rem); padding-top: 1.4rem; border-top: 1px solid var(--line); }
.ref-proof > div { padding: .5rem .6rem .5rem 0; }
.ref-proof h3 { margin-top: .45rem; }
.ref-arrow-link { display: inline-flex; align-items: center; min-height: 44px; gap: .55rem; margin-top: .5rem; font-size: .9rem; text-underline-offset: .3em; }
.ref-arrow-link:hover { color: var(--ref-focus); }
.ref-case { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); text-decoration: none; }
.ref-case-photo { display: block; min-height: 5rem; height: clamp(5rem, 8vw, 8rem); background-color: #fff; background-repeat: no-repeat; background-position: center; background-size: contain; transition: scale .3s ease; }
.ref-case-ducts { background-image: url("/assets/clients/dirty-ducts-squad.webp"); }
.ref-case-holseth { background-image: url("/assets/clients/holseth-financial.jpg"); }
.ref-case:hover .ref-case-photo { scale: 1.06; }
.ref-case-copy { display: grid; gap: .25rem; flex: 1; padding: .7rem .85rem; border-top: 1px solid var(--line); }
.ref-case-copy small { color: var(--text-muted); }
.ref-case-copy strong { font-size: 1.02rem; line-height: 1.2; }
.ref-case-copy > span { align-self: end; padding-top: .22rem; font-size: .82rem; text-decoration: underline; }

.ref-faq { display: grid; grid-template-columns: .85fr 1fr; gap: clamp(1.4rem, 5vw, 5rem); }
.ref-questions { border-top: 1px solid var(--line); }
.ref-questions details { border-bottom: 1px solid var(--line); }
.ref-questions summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem .25rem; font-weight: 750; list-style: none; cursor: pointer; }
.ref-questions summary::-webkit-details-marker { display: none; }
.ref-questions summary::after { color: var(--accent-text); font-size: 1.26rem; line-height: 1; content: "+"; }
.ref-questions details[open] summary::after { content: "−"; }
.ref-questions p { margin: 0; padding: 0 1rem .85rem .25rem; color: var(--text-muted); }

.ref-application { display: grid; grid-template-columns: .72fr 1fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: center; }
.ref-apply-copy h2 { margin-bottom: .9rem; }
.ref-apply-copy > p:not(.ref-kicker) { max-width: 30rem; margin-bottom: .2rem; }
.ref-intake { background: var(--surface-raised); color: var(--text); border: 1px solid var(--line); border-radius: 12px; }
.ref-intake-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); border-radius: 11px 11px 0 0; background: var(--surface-alt); }
.ref-intake-header h3,
.ref-intake-header p { margin: 0; }
.ref-intake-header p { font-size: .78rem; }
.ref-intake .intake-field { padding: .85rem 1rem; }
.ref-intake .intake-field label { margin-bottom: .35rem; }
.ref-intake .intake-field :is(input, textarea) { background: var(--surface); color: var(--text); border-color: var(--control-line); }
.ref-intake .intake-field input { min-height: 2.8rem; padding: .55rem .65rem; }
.ref-intake .intake-field textarea { min-height: 6rem; padding: .55rem .65rem; }
.ref-intake .intake-field p { margin: .35rem 0 0; font-size: .77rem; color: var(--text-muted); }
.ref-intake .intake-submit-row { flex-wrap: wrap; gap: .65rem; padding: .85rem 1rem; }
.ref-intake .intake-status { margin: 0; color: var(--text-muted); font-size: .82rem; font-weight: 550; }

@media (prefers-reduced-motion: no-preference) {
  .ref-journey-node { transition: background-color .18s ease, color .18s ease, border-color .18s ease; }
  [data-ref-phase="intro"] li:nth-child(1) .ref-journey-node::after,
  [data-ref-phase="payment"] li:nth-child(2) .ref-journey-node::after,
  [data-ref-phase="commission"] li:nth-child(3) .ref-journey-node::after { animation: ref-arrival .62s ease-out both; }
  .ref-steps.is-visible::after { animation: ref-trace .95s ease-out both; }
}

@keyframes ref-arrival { from { opacity: .8; scale: .86; } to { opacity: 0; scale: 1.45; } }
@keyframes ref-trace { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 859px) {
  .ref-hero { grid-template-columns: 1fr; }
  .ref-hero-figure { width: min(100%, 36rem); }
}

@media (max-width: 760px) {
  .ref-jump a { min-height: 44px; }
  .ref-section-heading { grid-template-columns: 1fr; gap: .8rem; }
  .ref-faq,
  .ref-application { grid-template-columns: 1fr; }
  .ref-rate-rows article { grid-template-columns: 1fr auto; gap: .6rem 1rem; }
  .ref-rate-value { text-align: end; }
  .ref-rate-rows article > p:not(.ref-rate-value) { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .ref-jump > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-estimator,
  .ref-steps { grid-template-columns: 1fr; }
  .ref-projection { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 11px 11px; }
  .ref-steps { gap: 1.25rem; }
  .ref-steps::before,
  .ref-steps::after { display: none; }
  .ref-steps li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); align-items: start; gap: .2rem .7rem; }
  .ref-step-node { grid-row: span 2; margin: 0; }
  .ref-steps h3 { margin: .05rem 0 0; }
  .ref-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .ref-proof > div { grid-column: 1 / -1; }
  .ref-case-copy { padding-inline: .6rem; }
}

@media (max-width: 390px) {
  .ref-month-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-month-shortcuts button { min-height: 44px; }
  .ref-hero-copy h1 { font-size: 2.375rem; }
  .ref-projection-top { gap: .4rem; }
  .ref-chart-visual { column-gap: .28rem; }
  .ref-chart-axis,
  .ref-chart-ticks { font-size: .59rem; }
}

@media (prefers-reduced-motion: reduce) {
  .referral-page :is(.ref-plot-bar, .ref-case-photo, .ref-actions .button span, .ref-arrow-link span) { transition: none; }
}
