/* Mortgage calculator page: the tool is the opener (inputs left, live result and line art right), then how lenders decide, then why talk to us first. */

/* ---------- opener ---------- */
.calc { position: relative; padding: clamp(20px, 3.4vh, 40px) 0 clamp(36px, 5vh, 56px); background: var(--paper); overflow: clip; }
.calc::before { content: ''; position: absolute; inset: 0; background: url('../img/map-grid.svg') 0 0 / 64px 64px; -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%); pointer-events: none; animation: calcGrid 14s linear infinite; }
@keyframes calcGrid { to { background-position: 64px 64px; } }
.calc__route { position: absolute; left: 0; top: 0; width: 100%; height: 260px; color: var(--sky); pointer-events: none; }
.calc .wrap { position: relative; }
.calc__head { display: grid; justify-items: center; gap: 6px; text-align: center; margin-bottom: clamp(14px, 2.2vh, 22px); }
.calc__title { font-size: clamp(2.3rem, 3.9vw, 3.6rem); line-height: 1.04; letter-spacing: -0.03em; display: flow-root; }
.calc__title .pin-o__mark { --pin-house: #fff; }
.calc__lede { margin: 0; font-size: 1.15rem; line-height: 1.5; color: var(--slate); text-wrap: balance; }

/* ---------- the tool ---------- */
.tool { position: relative; background: #fff; border-radius: var(--r); box-shadow: 0 2px 0 rgba(38,44,48,.04), 0 40px 90px -30px rgba(38,44,48,.28); overflow: clip; }
.tool__tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 2px solid var(--ink); }
.tool__ind { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; background: var(--ink); z-index: 0; pointer-events: none; overflow: hidden; }
.tool__ind::after { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: linear-gradient(100deg, rgba(135,192,215,0), rgba(135,192,215,.38) 50%, rgba(135,192,215,0)); animation: indSheen 4.2s cubic-bezier(.5, 0, .3, 1) 2.4s infinite; }
@keyframes indSheen { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(350%); } }
.reduced .tool__ind::after { display: none; }
.tool__tab { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 8px 18px; background: transparent; border: 0; border-radius: var(--r-btn); font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); cursor: pointer; transition: color .4s var(--ease), background .3s; }
.tool__tab svg { width: 28px; height: 28px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tool__tab[aria-selected="true"] { color: #fff; }
.tool__tab[aria-selected="false"]:hover { background: var(--mist); }
.tool__tab:focus-visible { outline-offset: -5px; outline-color: var(--sky); }
.no-js .tool__tabs { display: none; }
.no-js .tool__ind { display: none; }

.tool__panels { position: relative; }
.js .tool__panels { display: grid; }
.js .tool__panel { grid-area: 1 / 1; }
.js .tool__panel:not(.is-on) { visibility: hidden; }
.no-js .tool__panel + .tool__panel { border-top: 2px solid var(--ink); }

.tool__panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; grid-template-areas: "in res" "note res"; gap: 0 clamp(24px, 2.6vw, 40px); padding: clamp(14px, 2vh, 20px) clamp(14px, 1.4vw, 20px) clamp(14px, 2vh, 20px) clamp(20px, 2.4vw, 34px); }
.tool__h { grid-area: h; font-size: 1.6rem; margin-bottom: 14px; }
.js .tool__h { display: none; }
.no-js .tool__panel { grid-template-rows: auto auto 1fr; grid-template-areas: "h h" "in res" "note res"; }
.tool__inputs { grid-area: in; display: grid; gap: clamp(4px, 1vh, 10px); align-content: start; }

/* one field: label + typed box, slider under */
.fld { display: grid; grid-template-columns: minmax(0, 1fr) 168px; grid-template-areas: "label box" "range box"; column-gap: 20px; align-items: center; }
.fld__top { display: contents; }
.fld__label { grid-area: label; align-self: end; }
.fld__box { grid-area: box; }
.fld__range { grid-area: range; }
.fld__label { font-weight: 600; font-size: 1.02rem; line-height: 1.3; color: var(--ink); }
.fld__hint { display: block; font-weight: 400; font-size: .9rem; color: var(--slate); margin-top: 2px; }
.fld__box { position: relative; display: flex; align-items: center; flex: none; width: 168px; height: 46px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); transition: border-color .25s, box-shadow .25s, background .25s; }
.fld__box:focus-within { background: #fff; box-shadow: 0 0 0 4px rgba(135,192,215,.55); }
.fld__unit { padding-left: 14px; font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; color: var(--steel-deep); }
.fld__unit--after { padding: 0 14px 0 0; font-size: 1rem; }
.fld__num { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 12px 0 6px; font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; outline: none; }
.fld__unit--after + .fld__num, .fld__box .fld__num:first-child { padding-left: 14px; }
.fld__range { display: block; margin: 0; height: 36px; }
.fld.is-bumped .fld__box { border-color: var(--steel); }
/* a pulse on the first slider until the visitor touches a field: it invites the first move */
.fld__range.is-invite::-webkit-slider-thumb { animation: thumbPulse 1.9s ease-out infinite; }
.fld__range.is-invite::-moz-range-thumb { animation: thumbPulse 1.9s ease-out infinite; }
@keyframes thumbPulse { 0% { box-shadow: 0 0 0 0 rgba(58,115,149,.8); } 70%, 100% { box-shadow: 0 0 0 18px rgba(58,115,149,0); } }

/* repayment type */
.seg { border: 0; margin: 4px 0 0; padding: 0; min-width: 0; }
.seg__opts { display: grid; grid-template-columns: 1fr 1fr; }
.seg__legend { font-weight: 600; font-size: 1.02rem; margin-bottom: 6px; padding: 0; }
.seg__opt { position: relative; cursor: pointer; }
.seg__opt input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.seg__opt span { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 8px 14px; border: 2px solid var(--ink); font-family: var(--f-display); font-weight: 800; font-size: 1.05rem; background: #fff; transition: background .3s, color .3s; }
.seg__opt + .seg__opt span { border-left: 0; }
.seg__opt span::before { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; flex: none; transition: background .3s, box-shadow .3s; }
.seg__opt input:checked + span { background: var(--ink); color: #fff; }
.seg__opt input:checked + span::before { background: var(--sky); border-color: var(--sky); box-shadow: inset 0 0 0 3px var(--ink); }
.seg__opt input:focus-visible + span { outline: 3px solid var(--steel-deep); outline-offset: 3px; }
.seg__opt:hover input:not(:checked) + span { background: var(--mist); }

/* the note under the inputs */
.tool__note { grid-area: note; align-self: end; display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; background: var(--mist); border-radius: var(--r); border-left: 4px solid var(--sky); transition: background .4s, border-color .4s; }
.tool__note .pin-ico { color: var(--ink); --pin-house: #fff; width: 24px; height: 32px; margin-top: 2px; }
.tool__note p { margin: 0; font-size: .95rem; line-height: 1.42; color: var(--ink); }
.tool__note a { font-weight: 600; white-space: nowrap; }
.tool__note.is-hot { background: var(--sky); border-color: var(--ink); }

/* ---------- results ---------- */
.res { grid-area: res; position: relative; display: flex; flex-direction: column; background-color: var(--sky); border-radius: 0; padding: clamp(14px, 2vh, 20px) clamp(18px, 2vw, 28px) 0; overflow: clip; isolation: isolate; }
.res::before { content: ''; position: absolute; inset: 0; background: radial-gradient(520px circle at var(--lx, 78%) var(--ly, 18%), rgba(255,255,255,.42), rgba(255,255,255,0) 60%); z-index: -1; pointer-events: none; }
.res { background-image: linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px); background-size: 48px 48px; animation: resGrid 9s linear infinite; }
@keyframes resGrid { to { background-position: -48px 48px; } }
.reduced .res, .reduced .calc::before { animation: none; }
.res__k { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.res__big { margin: 2px 0 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.res__to { font-size: .5em; font-weight: 700; letter-spacing: 0; margin: 0 .2em; vertical-align: .18em; }
.res__basis { margin: 6px 0 0; font-size: .98rem; color: var(--ink); }

.res__split { flex: 1; display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); gap: 12px; align-items: end; margin-top: 8px; }
.res__stats { margin: 0; display: grid; gap: 10px; padding-bottom: 18px; }
.stat { background: rgba(255,255,255,.78); border-radius: var(--r); padding: 10px 14px; }
.stat dt { font-weight: 600; font-size: .95rem; color: var(--ink); }
.stat dd { margin: 0; }
.stat__v { display: block; font-family: var(--f-display); font-weight: 800; font-size: 1.55rem; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat__s { display: block; font-size: .875rem; line-height: 1.35; color: var(--slate); margin-top: 2px; }
.stat--ltv { display: grid; grid-template-columns: auto; position: relative; padding-right: 84px; min-height: 0; }
.ltv { position: absolute; right: 10px; top: 50%; width: 68px; height: 68px; margin-top: -34px; }
.ltv svg { width: 100%; height: 100%; }
.ltv__track { fill: none; stroke: rgba(83,143,176,.25); stroke-width: 10; }
.ltv__fill { fill: none; stroke: var(--ink); stroke-width: 10; stroke-dasharray: 100 100; transform: rotate(-90deg); transform-origin: 40px 40px; }

.art { align-self: stretch; display: flex; align-items: flex-end; min-height: 0; }
.art svg { width: 100%; height: auto; max-height: 300px; overflow: visible; }
.art__hill { fill: rgba(255,255,255,.34); }
.art__street { fill: rgba(255,255,255,.16); stroke: rgba(255,255,255,.8); stroke-width: 2; stroke-linejoin: round; }
.art__post { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.art__sign { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.art__price { font-family: var(--f-hand); font-weight: 700; font-size: 21px; fill: var(--ink); }
.art__cloud path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art__wall, .art__door { fill: #fff; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.art__roof { fill: #fff; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.art__chim { fill: #fff; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.art__win { fill: var(--mist); stroke: var(--ink); stroke-width: 3; transition: fill .5s ease; }
.art__win.is-lit { fill: var(--glow); }
.art__bars { fill: none; stroke: var(--ink); stroke-width: 2; opacity: .55; }
.art__smoke { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.art__pin { color: var(--ink); --pin-house: #fff; }
.art__pin-ring { fill: none; stroke: var(--ink); stroke-width: 2; }
.art__trunk { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.art__crown { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.art__ground { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.art__route-ghost { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 12; stroke-linecap: round; }
.art__route { fill: none; stroke: var(--ink); stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 2 9; }
.art__traveller { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.art__label { font-family: var(--f-hand); font-weight: 600; font-size: 26px; fill: var(--ink); }

/* repayments */
.res__trio { margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.trio { background: rgba(255,255,255,.72); border-radius: var(--r); padding: 10px 14px 12px; }
.trio dt { font-weight: 600; font-size: .92rem; color: var(--slate); }
.trio dd { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart { position: relative; flex: 1 1 210px; min-height: 210px; margin: 6px calc(clamp(18px, 2vw, 28px) * -1) 0; }
.chart__svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; touch-action: pan-y; cursor: crosshair; }
.chart__grid path { stroke: rgba(255,255,255,.75); stroke-width: 1.5; stroke-dasharray: 4 6; fill: none; }
.chart__area { fill: url(#chart-fade); }
.chart__line { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart__trace { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; opacity: 0; }
.chart__ticks path { stroke: var(--ink); stroke-width: 2; }
.chart__ticks text { font-family: var(--f-display); font-weight: 700; font-size: 14px; fill: var(--ink); }
.chart__start circle { fill: var(--ink); stroke: #fff; stroke-width: 3; }
.chart__hand { font-family: var(--f-hand); font-weight: 600; font-size: 25px; fill: var(--ink); }
.chart__leader { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-dasharray: 3 5; }
.chart__half circle { fill: var(--sky); stroke: var(--ink); stroke-width: 2.5; }
.chart__hand--sm { font-size: 22px; }
.chart__dot { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.chart__end { color: var(--ink); --pin-house: #fff; }
.chart__end ellipse { fill: none; stroke: var(--ink); stroke-width: 2; }
.chart__hover { opacity: 0; transition: opacity .2s; pointer-events: none; }
.chart__hover path { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 2 4; }
.chart__hover circle { fill: var(--sky); stroke: var(--ink); stroke-width: 3; }
.chart.is-hover .chart__hover { opacity: 1; }
.chart__tip { position: absolute; left: 0; top: 0; margin: 0; padding: 6px 10px; background: var(--ink); color: #fff; border-radius: var(--r); font-family: var(--f-display); font-weight: 700; font-size: .95rem; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, -100%); transition: opacity .2s; }
.chart.is-hover .chart__tip { opacity: 1; }

/* the foot of the tool: the warning, and the next step */
.tool__foot { display: flex; align-items: center; justify-content: space-between; gap: 18px 40px; padding: 10px clamp(14px, 1.4vw, 20px) 10px clamp(20px, 2.4vw, 34px); border-top: 2px solid var(--mist); background: #fff; }
.tool__legal p { margin: 0; font-size: .92rem; line-height: 1.45; color: var(--slate); }
.tool__legal .tool__warn { font-family: var(--f-display); font-weight: 800; font-size: 1rem; color: var(--ink); margin-bottom: 2px; }
.tool__cta { flex: none; min-height: 50px; padding-block: 12px; }

/* hidden start states (JS + motion only) */
.js:not(.reduced):not(.motion-fail) .tool { opacity: 0; animation: calcFailsafe 0s 3.2s forwards; }
@keyframes calcFailsafe { to { opacity: 1; } }

/* ---------- how lenders decide ---------- */
.lenders { position: relative; padding: clamp(56px, 8vh, 96px) 0; background: var(--mist); overflow: clip; }
.lenders::after { content: ''; position: absolute; inset: 0; background: url('../img/map-grid.svg') 0 0 / 64px 64px; opacity: .8; pointer-events: none; -webkit-mask-image: radial-gradient(ellipse at 20% 50%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 20% 50%, #000, transparent 70%); }
.lenders .wrap { position: relative; z-index: 1; }
.lenders__head { margin-bottom: clamp(24px, 3.4vh, 36px); }
.lenders__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.lenders__media-col { position: relative; padding-bottom: 44px; }
.lenders__media { width: min(100%, calc(min(52vh, 480px) * .86)); }
.lenders__media .frame__img { aspect-ratio: 6 / 7; }
.lenders__media .frame__img img { object-position: 40% 50%; }
.sum { position: absolute; right: 0; bottom: 0; z-index: 2; width: min(270px, 72%); padding: 16px 20px 14px; background: #fff; border-radius: var(--r); box-shadow: 0 24px 60px rgba(38,44,48,.18); border-top: 4px solid var(--ink); }
.sum p { margin: 0; }
.sum__k { font-weight: 600; font-size: .9rem; color: var(--slate); }
.sum__inc { font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; margin: 2px 0 8px !important; }
.sum__row { display: grid; grid-template-columns: 56px 20px 1fr; align-items: baseline; padding: 6px 0; border-top: 1.5px dashed var(--mist); font-variant-numeric: tabular-nums; }
.sum__x { font-family: var(--f-display); font-weight: 700; color: var(--steel-deep); font-size: 1.1rem; }
.sum__eq { color: var(--slate); }
.sum__row strong { font-family: var(--f-display); font-weight: 800; font-size: 1.45rem; text-align: right; letter-spacing: -0.02em; }

.checks { position: relative; }
.checks__line { position: absolute; left: 0; top: 24px; bottom: 24px; width: 48px; height: calc(100% - 48px); overflow: visible; }
.checks__ghost { fill: none; stroke: rgba(83,143,176,.35); stroke-width: 2; stroke-dasharray: 4 7; vector-effect: non-scaling-stroke; }
.checks__draw { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.checks__list { display: grid; gap: clamp(12px, 2vh, 20px); }
.check { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; align-items: start; }
.check__ico { position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; background: #fff; border: 2px solid var(--ink); border-radius: var(--r); transition: background .4s, color .4s; }
.check__ico svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.check.is-on .check__ico { background: var(--ink); color: var(--sky); }
.check h3 { font-size: 1.35rem; margin: 2px 0 4px; }
.check p { margin: 0; color: var(--slate); font-size: 1rem; line-height: 1.45; }
.check a { font-weight: 600; }
.lenders__guide { display: flex; gap: 14px; align-items: flex-start; margin: 22px 0 0; padding: 16px 20px; background: #fff; border-radius: var(--r); color: var(--ink); font-size: 1.05rem; line-height: 1.5; }
.lenders__guide .pin-ico { color: var(--ink); --pin-house: #fff; width: 26px; height: 35px; }

/* ---------- why talk to us first ---------- */
.first { position: relative; padding: clamp(56px, 8vh, 96px) 0; background: var(--sky); overflow: clip; }
.first::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 64px 64px; pointer-events: none; }
.first__route { position: absolute; left: 0; top: 0; width: 100%; height: 110px; color: #fff; pointer-events: none; }
.first > .wrap { position: relative; }
.first .sec-lede { color: var(--ink); }
.first__head { margin-bottom: clamp(24px, 3.4vh, 36px); }
.first__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.first__k { margin: 0 0 10px; font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; }
.first__list { border-top: 2px solid var(--ink); }
.first__item { border-bottom: 2px solid var(--ink); }
.first__item a { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; align-items: center; padding: 11px 10px 11px 6px; color: var(--ink); text-decoration: none; isolation: isolate; }
.first__item a::before { content: ''; position: absolute; inset: 0; background: #fff; z-index: -1; transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.first__item.is-on a::before, .first__item a:hover::before, .first__item a:focus-visible::before { transform: scaleX(1); }
.first__pin .pin-ico { width: 28px; height: 38px; color: var(--ink); --pin-house: var(--sky); transition: transform .45s var(--ease); }
.first__item.is-on .first__pin .pin-ico { transform: translateY(-4px); }
.first__txt { display: grid; gap: 2px; }
.first__name { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; padding-right: 40px; }
.first__line { font-size: 1rem; color: var(--ink); opacity: .85; }
.first__arrow { position: absolute; right: 14px; top: 20px; width: 22px; height: 14px; transition: transform .4s var(--ease); }
.first__item.is-on .first__arrow, .first__item a:hover .first__arrow { transform: translateX(6px); }
.first__media { width: min(100%, calc(min(48vh, 440px) * 1.49)); justify-self: end; }
.first__media::before { border-color: #fff; }
.first__stage { position: relative; aspect-ratio: 800 / 537; overflow: hidden; }
.first__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .1s; }
.first__slide.is-on { opacity: 1; z-index: 1; }
.first__slide img { transform: scale(1.1); }
.no-js .first__slide:not(:first-child), .reduced .first__slide:not(.is-on) { opacity: 0; }
.first__timer { position: absolute; left: 22px; right: 22px; top: 16px; z-index: 3; height: 3px; background: rgba(255,255,255,.45); overflow: hidden; }
.first__timer span { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.first__foot { display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; margin-top: clamp(28px, 4vh, 44px); padding-top: clamp(16px, 2.4vh, 24px); border-top: 2px solid rgba(255,255,255,.7); }
.first__quote { margin: 0; flex: 1 1 auto; }
.first__quote p { margin: 0 0 8px; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; line-height: 1.35; color: var(--ink); }
.first__quote cite { display: flex; align-items: center; gap: 12px; font-style: normal; color: var(--ink); font-weight: 600; }
.first__quote .stars path { fill: var(--ink); }
.first__actions { display: flex; flex-wrap: wrap; gap: 14px; flex: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .tool__panel { grid-template-columns: minmax(0, 1fr); grid-template-areas: "in" "res" "note"; gap: 0; }
  .res { margin-top: 18px; }
  .no-js .tool__panel { grid-template-rows: auto; grid-template-areas: "h" "in" "res" "note"; }
  .res__split { min-height: 280px; }
  .first__foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 900px) {
  .lenders__grid, .first__grid { grid-template-columns: minmax(0, 1fr); }
  .lenders__media-col { max-width: 560px; }
  .first__media { justify-self: start; }
  .tool__foot { flex-direction: column; align-items: stretch; }
  .tool__cta { width: 100%; }
}
@media (max-width: 700px) {
  .calc { padding-top: 16px; }
  .calc__title { font-size: clamp(2.1rem, 9.6vw, 2.6rem); }
  .calc__lede { font-size: 1.03rem; }
  .calc__route { height: 200px; }
  .tool__tab { flex-direction: column; gap: 4px; min-height: 66px; padding: 8px 10px; font-size: .98rem; line-height: 1.15; text-align: center; }
  .tool__tab svg { width: 22px; height: 22px; }
  .tool__panel { padding: 14px 14px 16px; }
  .tool__inputs { gap: 6px; }
  .fld { grid-template-columns: minmax(0, 1fr) 146px; grid-template-areas: "label box" "range range"; column-gap: 12px; }
  .fld__label { align-self: center; }
  .fld__label { font-size: .98rem; }
  .fld__hint { font-size: .875rem; }
  .fld__box { width: 146px; height: 48px; }
  .fld__range { height: 44px; }
  .tool__note a { display: inline-flex; align-items: center; min-height: 44px; }
  .calc__route { top: auto; bottom: 0; height: 160px; }
  .fld__num { font-size: 1.1rem; }
  .res { margin: 14px -14px 0; padding: 16px 16px 0; }
  .res__big { font-size: clamp(1.9rem, 9vw, 2.4rem); }
  .res__split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .res__stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: 0; gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat__v { font-size: 1.3rem; }
  .stat--ltv { padding-right: 12px; padding-bottom: 64px; min-height: 0; }
  .ltv { top: auto; bottom: 8px; right: auto; left: 12px; margin-top: 0; width: 50px; height: 50px; }
  .art svg { max-height: 240px; }
  .res__trio { gap: 6px; }
  .trio { padding: 8px 10px 10px; }
  .trio dt { font-size: .875rem; line-height: 1.25; }
  .trio dd { font-size: 1.12rem; }
  .chart { margin: 6px -16px 0; }
  .chart { flex-basis: 200px; min-height: 200px; }
  .tool__foot { padding: 14px; }
  .sum { right: -6px; width: min(250px, 72%); }
  .lenders__media .frame__tag { top: 18px; bottom: auto; left: 14px; }
  .first__name { font-size: 1.3rem; }
  .first__item a { padding: 12px 6px 12px 2px; gap: 12px; }
  .first__arrow { right: 8px; top: 18px; }
  .first__quote p { font-size: 1.1rem; }
  .first__actions { width: 100%; }
  .first__actions .btn { flex: 1 1 100%; }
}

/* ---------- short desktop screens (1280x720, 1366x768): the whole tool, foot included, above the fold ---------- */
@media (min-width: 901px) and (max-height: 820px) {
  .calc { padding: 12px 0 28px; }
  .calc__head { gap: 2px; margin-bottom: 12px; }
  .calc__title { font-size: clamp(2rem, 3vw, 2.6rem); }
  .calc__lede { font-size: 1rem; line-height: 1.4; }
  .tool__tab { min-height: 46px; padding: 6px 16px; font-size: 1.05rem; }
  .tool__tab svg { width: 24px; height: 24px; }
  .tool__panel { padding-top: 12px; padding-bottom: 12px; }
  .tool__inputs { gap: 2px; }
  .fld__label { font-size: .98rem; line-height: 1.25; }
  .fld__hint { font-size: .875rem; margin-top: 0; }
  .fld__box { height: 42px; }
  .fld__num { font-size: 1.1rem; }
  .fld__range { height: 30px; }
  .seg__legend { margin-bottom: 4px; }
  .seg__opt span { min-height: 42px; padding-block: 6px; }
  .tool__note { margin-top: 8px; padding: 8px 12px; }
  .tool__note p { font-size: .9rem; line-height: 1.38; }
  .tool__note .pin-ico { width: 20px; height: 27px; }
  .res { padding-top: 12px; }
  .res__k { font-size: 1rem; }
  .res__big { font-size: clamp(2rem, 3.2vw, 2.7rem); }
  .res__basis { margin-top: 2px; font-size: .92rem; }
  .res__split { margin-top: 4px; }
  .res__stats { gap: 8px; padding-bottom: 12px; }
  .stat { padding: 8px 12px; }
  .stat__v { font-size: 1.35rem; }
  .stat__s { font-size: .875rem; line-height: 1.3; }
  .art svg { max-height: 230px; }
  .res__trio { margin-top: 8px; }
  .trio { padding: 6px 12px 8px; }
  .trio dd { font-size: 1.3rem; }
  .chart { flex-basis: 170px; min-height: 170px; }
  .tool__foot { padding-top: 8px; padding-bottom: 8px; }
  .tool__legal p { font-size: .875rem; line-height: 1.35; }
  .tool__legal .tool__warn { font-size: .95rem; }
  .tool__cta { min-height: 46px; padding-block: 10px; }
}
