:root {
  --navy: #0a1f44;
  --blue: #1a56db;
  --blue-mid: #2563eb;
  --blue-lt: #dbeafe;
  --blue-xl: #eff6ff;
  --sky: #38bdf8;
  --white: #ffffff;
  --grey-50: #f8fafc;
  --grey-100: #f1f5f9;
  --grey-200: #e2e8f0;
  --grey-400: #94a3b8;
  --grey-600: #475569;
  --grey-800: #1e293b;
  --green: #16a34a;
  --green-lt: #dcfce7;
  --red: #dc2626;
  --red-lt: #fee2e2;
  --radius: 12px;
  --shadow-lg: 0 8px 40px rgba(10, 31, 68, .18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body.variant-smp {
  min-height: 100vh;
  color: var(--grey-800);
  background: linear-gradient(160deg, #0a1f44 0%, #1a3a6e 40%, #1a56db 100%);
  font-family: Inter, sans-serif;
}

.hidden { display: none !important; }
.urgency-banner {
  background: #1a56db;
  color: #ffffff;
  text-align: center;
  padding: 10px 20px;
  font-family: Sora, sans-serif;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.45;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(10, 31, 68, .88);
  backdrop-filter: blur(12px);
}
.logo { color: var(--white); font-family: Sora, sans-serif; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.logo span { color: var(--sky); }
.trust-badges { display: flex; align-items: center; gap: 14px; }
.badge { display: flex; align-items: center; gap: 5px; color: rgba(255,255,255,.8); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.badge svg { width: 13px; height: 13px; flex-shrink: 0; }
@media(max-width:480px){ .badge-txt { display:none; } }

.hero { padding: 34px 20px 20px; color: var(--white); text-align: center; }
.logo-hero { margin-bottom: 10px; color: var(--white); font-family: Sora, sans-serif; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.logo-hero span { color: var(--sky); }
.hero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 14px; }
.hero-trust span { color: rgba(255,255,255,.75); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.hero-eyebrow { margin-bottom: 10px; color: var(--sky); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { margin-bottom: 16px; font-family: Sora, sans-serif; font-size: clamp(1.7rem, 5vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hero h1 em { color: var(--sky); font-style: normal; }
.hero-stats { display: flex; align-items: center; justify-content: center; max-width: 600px; margin: 0 auto 14px; padding: 12px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.08); }
.hero-stat { flex: 1; text-align: center; }
.stat-num { display: block; color: var(--white); font-family: Sora, sans-serif; font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.stat-lbl { display: block; margin-top: 2px; color: rgba(255,255,255,.55); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }
.stat-divider { width: 1px; height: 32px; flex-shrink: 0; background: rgba(255,255,255,.15); }
.hero p { color: rgba(255,255,255,.7); font-size: .9rem; }
.hero-highlight { display: inline-block; margin-top: 6px; color: #ffffff; font-family: Sora, sans-serif; font-size: clamp(1.3rem, 4vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; }

.card-wrap { max-width: 600px; margin: 0 auto; padding: 0 14px 52px; }
.card { overflow: hidden; border-radius: 20px; background: var(--white); box-shadow: var(--shadow-lg); }
.progress-bar-wrap { padding: 14px 22px 12px; border-bottom: 1px solid var(--grey-200); background: var(--grey-50); }
.progress-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.progress-label span { color: var(--grey-600); font-size: .73rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.step-pct { color: var(--blue) !important; }
.progress-track { overflow: hidden; height: 5px; border-radius: 999px; background: var(--grey-200); }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--sky)); transition: width .4s cubic-bezier(.4,0,.2,1); }

.step { display: none; padding: 26px 26px 20px; }
.step:not(.hidden) { display: block; animation: fadeUp .28s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.step-title { margin-bottom: 6px; color: var(--navy); font-family: Sora, sans-serif; font-size: 1.18rem; font-weight: 700; line-height: 1.3; }
.step-sub { margin-bottom: 20px; color: var(--grey-600); font-size: .87rem; line-height: 1.55; }

.yn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.yn-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; border: 2px solid var(--grey-200); border-radius: var(--radius); background: var(--white); color: var(--navy); cursor: pointer; font-family: Sora, sans-serif; font-size: 1.1rem; font-weight: 700; text-align: center; transition: all .15s ease; }
.yn-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.yn-content { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.yn-icon { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 1.5rem; line-height: 1; }
.yn-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-xl); }
.yn-btn.yes:has(input:checked) { border-color: var(--green); background: var(--green-lt); color: var(--green); }
.yn-btn.no:has(input:checked) { border-color: var(--red); background: var(--red-lt); color: var(--red); }

.field-group { margin-bottom: 14px; }
.field-row { display: grid; gap: 10px; }
.field-row.cols-2 { grid-template-columns: 1fr 1fr; }
.field-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
label { display: block; margin-bottom: 5px; color: var(--grey-600); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
input[type=text], input[type=email], input[type=tel], select, textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--grey-200); border-radius: var(--radius); background: var(--white); color: var(--grey-800); font-family: Inter, sans-serif; font-size: .93rem; transition: border-color .14s, box-shadow .14s; appearance: none; }
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,219,.11); }
input.border-red-500, select.border-red-500, textarea.border-red-500 { border-color: var(--red) !important; }
.field-error { display: none; margin-top: 4px; color: var(--red); font-size: .77rem; }
.field-error:not(.hidden), .field-error.show { display: block; }
.select-wrap { position: relative; }
.select-wrap::after { content: '▾'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--grey-400); pointer-events: none; font-size: .82rem; }

.ssl-field { position: relative; }
.ssl-field input { padding-right: 96px; }
.ssl-badge { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 3px; padding: 2px 6px; border: 1px solid #bbf7d0; border-radius: 4px; background: var(--green-lt); color: var(--green); font-size: .66rem; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.ssl-status-icon { display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 12px; font-size: 10px; }
.ssl-status-icon svg { width: 12px; height: 12px; }
.postcode-row { display: flex; align-items: flex-end; gap: 9px; margin-bottom: 10px; }
.postcode-row .field-group { flex: 1; margin-bottom: 0; }
.btn-find { min-width: 64px; height: 44px; padding: 11px 16px; border: none; border-radius: var(--radius); background: var(--navy); color: var(--white); cursor: pointer; font-family: Sora, sans-serif; font-size: .86rem; font-weight: 700; white-space: nowrap; transition: background .14s; }
.btn-find:hover { background: var(--blue); }
#postcode-status { display: none; margin-bottom: 10px; color: var(--grey-600); font-size: .82rem; }
#postcode-status:not(.hidden) { display: block; }
.manual-address-panel { margin-top: 12px; padding: 14px; border: 1px solid var(--grey-200); border-radius: var(--radius); background: var(--grey-50); }
.manual-address-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sig-outer { position: relative; overflow: hidden; height: 160px; border: 2px dashed var(--grey-200); border-radius: var(--radius); background: var(--grey-50); }
#signature-canvas { position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.sig-hint { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--grey-400); font-size: .86rem; text-align: center; pointer-events: none; transition: opacity .2s; }
.sig-hint svg { width: 22px; height: 22px; opacity: .4; }
.btn-clear-sig, .btn-inline-back { display: inline-flex; align-items: center; gap: 4px; padding: 7px 0 3px; border: none; background: none; color: var(--grey-400); cursor: pointer; font-size: .81rem; font-weight: 600; transition: color .14s; }
.btn-clear-sig:hover, .btn-inline-back:hover { color: var(--blue); }
.details-box { margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--blue-lt); border-radius: var(--radius); background: var(--blue-xl); color: var(--navy); font-size: .87rem; line-height: 1.7; }
.details-box p { margin-bottom: 8px; }
.details-box strong { display: block; margin-top: 8px; margin-bottom: 2px; color: var(--grey-400); font-family: Sora, sans-serif; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.details-box strong:first-child { margin-top: 0; }
.consent-box { margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--grey-200); border-radius: var(--radius); background: var(--grey-50); color: var(--grey-600); font-size: .81rem; line-height: 1.65; }
.consent-box a { color: var(--blue); }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.checkbox-row input[type=checkbox] { width: 17px; min-width: 17px; height: 17px; margin-top: 2px; accent-color: var(--blue); }
.checkbox-row label { color: var(--grey-600); font-size: .82rem; font-weight: 500; letter-spacing: 0; line-height: 1.55; text-transform: none; }
.checkbox-row label a { color: var(--blue); font-weight: 600; text-decoration: underline; }
.required-mark { color: var(--red); }

.step-local-next, .btn-submit { width: 100%; margin-top: 12px; }
.btn-next, .btn-submit { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border: none; border-radius: var(--radius); background: linear-gradient(135deg, var(--blue-mid), var(--navy)); color: var(--white); cursor: pointer; font-family: Sora, sans-serif; font-size: .96rem; font-weight: 700; letter-spacing: -.01em; box-shadow: 0 4px 14px rgba(26,86,219,.32); transition: opacity .14s, transform .1s; }
.btn-next:hover, .btn-submit:hover { opacity: .91; transform: translateY(-1px); }
.btn-next:disabled, .btn-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.spinner { display: none; width: 17px; height: 17px; border: 2.5px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
.loading .spinner { display: block; }
.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

#screen-success { text-align: center; padding: 18px 0 8px; }
.success-icon { display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%; background: var(--green-lt); color: var(--green); font-size: 1.9rem; font-weight: 800; }
.success-title { margin-bottom: 8px; color: var(--navy); font-family: Sora, sans-serif; font-size: 1.45rem; font-weight: 800; }
.success-sub { margin-bottom: 24px; color: var(--grey-600); font-size: .9rem; line-height: 1.6; }
.next-steps { padding: 18px; border-radius: var(--radius); background: var(--blue-xl); text-align: left; }
.next-steps h3 { margin-bottom: 10px; color: var(--navy); font-family: Sora, sans-serif; font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.next-steps li { position: relative; margin-bottom: 7px; padding-left: 20px; color: var(--grey-600); font-size: .86rem; line-height: 1.55; list-style: none; }
.next-steps li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }

.form-footer { padding: 14px 22px; border-top: 1px solid var(--grey-200); background: var(--grey-50); text-align: center; }
.footer-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 9px; }
.f-badge { display: flex; align-items: center; gap: 5px; color: var(--grey-600); font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.form-footer p { max-width: 520px; margin: 0 auto; color: var(--grey-400); font-size: .7rem; line-height: 1.65; }
.form-footer a { color: var(--blue); text-decoration: underline; }

.testimonials-section { max-width: 600px; margin: 0 auto; padding: 20px 14px 8px; }
.testimonials-title { margin-bottom: 14px; color: var(--white); font-family: Sora, sans-serif; font-size: 1.1rem; font-weight: 800; text-align: center; }
.testimonials-track-wrap { overflow: hidden; border-radius: 14px; }
.testimonials-track { display: flex; transition: transform .45s cubic-bezier(.4,0,.2,1); }
.testimonial-card { min-width: 100%; padding: 22px 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.07); box-sizing: border-box; }
.testimonial-stars { margin-bottom: 10px; color: #facc15; font-size: 1rem; letter-spacing: 2px; }
.testimonial-text { margin-bottom: 14px; color: rgba(255,255,255,.85); font-size: .88rem; font-style: italic; line-height: 1.6; }
.testimonial-author { display: flex; align-items: center; justify-content: space-between; }
.testimonial-name { color: var(--white); font-family: Sora, sans-serif; font-size: .82rem; font-weight: 700; }
.testimonial-meta { color: rgba(255,255,255,.45); font-size: .72rem; }
.testimonial-dots { display: flex; justify-content: center; gap: 8px; padding: 14px 0 6px; }
.testimonial-dot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%; background: rgba(255,255,255,.2); cursor: pointer; transition: all .2s; }
.testimonial-dot.active { background: var(--white); transform: scale(1.2); }

.lender-strip { max-width: 600px; margin: 0 auto; padding: 0 14px 14px; }
.lender-strip p { margin-bottom: 9px; color: rgba(255,255,255,.45); font-size: .73rem; font-weight: 600; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.lender-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.lender-pill { padding: 3px 9px; border: 1px solid rgba(255,255,255,.11); border-radius: 6px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.55); font-size: .7rem; font-weight: 500; }
.faq-section { max-width: 600px; margin: 0 auto; padding: 0 16px 8px; }
.faq-title { margin-bottom: 16px; color: var(--white); font-family: Sora, sans-serif; font-size: 1.3rem; font-weight: 800; text-align: center; }
.faq-item { overflow: hidden; margin-bottom: 8px; border-radius: var(--radius); background: var(--white); box-shadow: 0 2px 8px rgba(10,31,68,.10); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 16px 18px; border: none; background: none; color: var(--navy); cursor: pointer; font-family: Sora, sans-serif; font-size: .92rem; font-weight: 700; text-align: left; transition: background .14s; }
.faq-q:hover, .faq-q.open { background: var(--grey-50); }
.faq-icon { flex-shrink: 0; color: var(--grey-400); font-size: 1.1rem; transition: transform .2s; }
.faq-q.open .faq-icon { color: var(--blue); transform: rotate(180deg); }
.faq-a { display: none; padding: 0 18px 16px; border-top: 1px solid var(--grey-100); color: var(--grey-600); font-size: .88rem; line-height: 1.7; }
.faq-a.open { display: block; animation: fadeUp .2s ease; }
.lender-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.lender-grid span { padding: 3px 9px; border-radius: 5px; background: var(--blue-xl); color: var(--blue); font-size: .76rem; font-weight: 600; }
.page-footer { max-width: 640px; margin: 0 auto; padding: 28px 20px 36px; }
.page-footer .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 14px; }
.page-footer .footer-links a { color: rgba(255,255,255,.6); font-size: .78rem; text-decoration: underline; }
.page-footer .footer-legal { color: rgba(255,255,255,.4); font-size: .72rem; line-height: 1.75; text-align: center; }
.page-footer .footer-legal a { color: rgba(255,255,255,.55); text-decoration: underline; }
.page-footer .footer-legal em { font-style: italic; }

@media(max-width:480px) {
  .step { padding: 20px 16px 16px; }
  .field-row.cols-3 { grid-template-columns: 1fr 1fr; }
  .field-row.cols-2 { grid-template-columns: 1fr; }
  .yn-row { grid-template-columns: 1fr; }
}
