@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  --navy: #0b1f33;
  --navy-deep: #0b1f33;
  --blue: #1677ff;
  --blue-dark: #0759c7;
  --blue-soft: #eef6fb;
  --cyan: #55d6c2;
  --mint: #137a5c;
  --ink: #132238;
  --muted: #5f6f80;
  --line: #d7e2eb;
  --paper: #ffffff;
  --wash: #eef6fb;
  --error: #b42318;
  --error-soft: #fff1f0;
  --shadow: 0 22px 60px rgba(11, 31, 51, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  border-bottom: 1px solid rgba(215, 226, 235, .8);
  background: rgba(255,255,255,.95);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--navy);
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  letter-spacing: -.025em;
  text-decoration: none;
}

.brand small {
  display: block;
  margin: -4px 0 0;
  color: var(--muted);
  font: 600 9px/1 'DM Sans', sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-block;
  flex: 0 0 auto;
  border: 7px solid var(--navy);
  border-right-color: var(--cyan);
  border-radius: 50%;
}
.brand-mark::after { content: none; }

.prototype-badge {
  padding: 6px 10px;
  border: 1px solid #c7dbef;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.header-tools { display: flex; align-items: center; gap: 12px; }
.admin-link { color: var(--navy); font-size: 11px; font-weight: 750; text-decoration: none; }
.admin-link:hover { color: var(--blue); text-decoration: underline; }
.sample-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--blue); font-size: 11px; font-weight: 750; }
.sample-button:hover { border-color: var(--blue); background: var(--blue-soft); }

.page-grid {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
  gap: 54px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 80px;
}

.application-intro { position: sticky; top: 30px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 24px; height: 2px; background: currentColor; }

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: 'Manrope', sans-serif; line-height: 1.12; letter-spacing: -.035em; }

h1 {
  margin-bottom: 17px;
  color: var(--navy-deep);
  font-size: clamp(31px, 4vw, 45px);
  line-height: 1.06;
  letter-spacing: -.045em;
}

.application-intro > p:not(.eyebrow) { color: var(--muted); }

.privacy-card {
  margin: 27px 0;
  padding: 17px;
  border: 1px solid rgba(85,214,194,.65);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.privacy-card strong { color: var(--navy); font-size: 13px; }
.privacy-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.step-list { margin: 0; padding: 0; list-style: none; }
.step-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: #7b8996;
  font-size: 13px;
  transition: color .2s ease;
}
.step-list li span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 10px;
  font-weight: 800;
}
.step-list li.is-current { color: var(--navy); font-weight: 700; }
.step-list li.is-current span { border-color: var(--blue); background: var(--blue); color: white; }
.step-list li.is-complete { color: var(--blue); }
.step-list li.is-complete span { border-color: var(--mint); background: var(--mint); color: white; font-size: 0; }
.step-list li.is-complete span::after { content: "✓"; font-size: 12px; }

.application-card {
  min-height: 740px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.progress-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.progress-label { margin: 0 0 2px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.progress-head h2 { margin: 0; color: var(--navy); font-size: 18px; }
.progress-head > strong { color: var(--blue); font-size: 13px; }
.progress-track { height: 4px; margin: 17px 0 34px; overflow: hidden; border-radius: 999px; background: #e9eef2; }
.progress-track span { width: 20%; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .25s ease; }
.draft-note { margin: -22px 0 28px; color: var(--muted); font-size: 11px; text-align: right; }

.form-error {
  margin: -12px 0 24px;
  padding: 12px 14px;
  border: 1px solid #f0b5af;
  border-radius: 10px;
  background: var(--error-soft);
  color: var(--error);
  font-size: 13px;
}
.website-check { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.form-step { animation: reveal .22s ease-out; }
.form-step[hidden] { display: none; }
@keyframes reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.step-copy { margin-bottom: 28px; }
.step-copy h3 { margin-bottom: 7px; color: var(--navy-deep); font-size: clamp(23px, 3vw, 31px); line-height: 1.15; letter-spacing: -.025em; }
.step-copy > p:last-child { max-width: 650px; margin-bottom: 0; color: var(--muted); }

.contact-panel { margin-bottom: 28px; padding: 20px; border: 1px solid rgba(85,214,194,.65); border-radius: 12px; background: linear-gradient(135deg,#f7fcfb,#f5f9fd); }
.contact-panel .field-grid { grid-template-columns: 1fr; gap: 15px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 21px; }
.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > label, .field > .field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy-deep);
  font-size: 13px;
  font-weight: 700;
}
.field label span { color: var(--blue); }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.time-trading-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.time-trading-field .time-trading-grid { max-width: 390px; }
.time-trading-grid label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

input, select, textarea {
  width: 100%;
  min-height: 47px;
  padding: 11px 12px;
  border: 1px solid #bdc9d3;
  border-radius: 10px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,119,255,.14); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--error); background: #fffafa; }

.money-field {
  min-height: 47px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid #bdc9d3;
  border-radius: 10px;
  background: white;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.money-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,119,255,.14); }
.money-field > span { padding-left: 12px; color: var(--blue); font-weight: 750; }
.money-field input { min-height: 45px; border: 0; box-shadow: none; }
.money-field input:focus { box-shadow: none; }

.amount-suggest { position: relative; }
.amount-suggestions { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: #fff; border: 1px solid #bdc9d3; border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.1); }
.amount-suggestions[hidden] { display: none; }
.amount-suggestions button { width: auto; min-height: 36px; padding: 7px 12px; border-radius: 8px; border: 1px solid #bdc9d3; background: #f5f7f9; color: var(--ink); font-weight: 650; cursor: pointer; }
.amount-suggestions button:hover, .amount-suggestions button:focus { border-color: var(--blue); background: #eef5ff; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { width: 1px; height: 1px; position: absolute; opacity: 0; }
.choice > span {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f1f6f8;
  cursor: pointer;
  transition: .15s ease;
}
.choice:hover > span { border-color: #9fb8c6; background: #eaf2f5; }
.choice > span strong { font-size: 13px; }
.choice > span small { margin: 2px 0 0; color: var(--muted); }
.choice input:checked + span { border-color: #2caa98; background: #e7f8f5; box-shadow: inset 0 0 0 1px rgba(85,214,194,.5); }
.choice input:checked + span strong { color: var(--navy); }
.choice input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.role-choice-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.role-choice-field legend { margin-bottom: 7px; padding: 0; color: var(--navy-deep); font-size: 13px; font-weight: 700; }
.role-choice-field legend span { color: var(--blue); }
.profit-band-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.profit-band-grid .choice > span { min-height: 52px; padding-right: 8px; padding-left: 8px; text-align: center; }
.fleet-size-grid { grid-template-columns: repeat(3,minmax(0,1fr)); max-width: 590px; }
.fleet-size-grid .choice > span { min-height: 52px; text-align: center; }
.finance-purpose-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.finance-purpose-grid .choice > span { min-height: 82px; text-align: center; }
.funding-timeframe-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
.funding-timeframe-grid .choice > span { min-height: 54px; padding-right: 8px; padding-left: 8px; text-align: center; }
.revenue-band-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.revenue-band-grid .choice > span { min-height: 54px; text-align: center; }

.company-lookup {
  padding: 20px;
  border: 1px solid #bdd6e6;
  border-radius: 12px;
  background: linear-gradient(145deg, #f5faff, #f7fcfb);
}
.company-lookup-copy > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.company-lookup-copy h4 { margin: 4px 0 4px; color: var(--navy); font-size: 18px; letter-spacing: -.02em; }
.company-lookup-copy p { margin: 0 0 15px; color: var(--muted); font-size: 12px; }
.company-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.company-search-input { position: relative; }
.company-search-input input { padding-right: 42px; }
.company-search-spinner {
  width: 17px;
  height: 17px;
  position: absolute;
  top: 15px;
  right: 14px;
  display: none;
  border: 2px solid #c8d8e3;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: company-spin .75s linear infinite;
}
.company-lookup.is-searching .company-search-spinner { display: block; }
@keyframes company-spin { to { transform: rotate(360deg); } }
.company-search-button {
  min-height: 47px;
  padding: 10px 17px;
  border: 1px solid var(--blue);
  border-radius: 10px;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 750;
}
.company-search-button:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.company-search-button:disabled { opacity: .6; cursor: wait; }
.company-search-status { min-height: 18px; margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.company-search-status.is-error { color: var(--error); }
.company-search-results {
  max-height: 310px;
  margin-top: 8px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: 0 16px 36px rgba(11, 31, 51, .12);
}
.company-result {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid #e7edf1;
  background: white;
  color: var(--ink);
  text-align: left;
}
.company-result:last-child { border-bottom: 0; }
.company-result:hover, .company-result:focus-visible { background: var(--blue-soft); outline: 0; }
.company-result strong { color: var(--navy); font-size: 13px; }
.company-result > span { color: var(--blue); font-size: 11px; font-weight: 750; }
.company-result small { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.selected-company {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #8fd4c5;
  border-radius: 10px;
  background: #eaf8f5;
}
.selected-company[hidden], .registered-address-check[hidden] { display: none; }
.selected-company span { display: block; color: var(--mint); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.selected-company strong { display: block; margin-top: 2px; color: var(--navy); font-size: 14px; }
.selected-company p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.selected-company button { padding: 2px 0; border: 0; background: none; color: var(--blue); font-size: 11px; font-weight: 750; }
.registered-address-check { margin: 12px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.registered-address-check legend { padding: 0 5px; color: var(--navy); font-size: 12px; font-weight: 750; }
.registered-address-check > p { margin: 1px 0 12px; color: var(--muted); font-size: 11px; white-space: pre-line; }
.address-choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.address-choice-row label { position: relative; }
.address-choice-row input { width: 1px; height: 1px; position: absolute; opacity: 0; }
.address-choice-row span { display: block; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #f4f7f9; color: var(--ink); font-size: 11px; font-weight: 700; cursor: pointer; }
.address-choice-row input:checked + span { border-color: #2caa98; background: #e7f8f5; color: var(--navy); }
.address-choice-row input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.person-card { margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.person-card:first-of-type { margin-top: 0; }
.person-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 20px; }
.person-head h4 { margin: 0; color: var(--navy); font-size: 16px; }
.person-head > span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.add-toggle { display: flex; align-items: center; gap: 9px; margin-top: 18px; color: var(--blue); font-size: 13px; font-weight: 750; cursor: pointer; }
.add-toggle input, .declaration input { width: 17px; height: 17px; min-height: auto; margin: 0; accent-color: var(--blue); }
.text-button { padding: 0; border: 0; background: none; color: var(--error); font-size: 12px; }
.conditional-card[hidden], #guarantorDetails[hidden], #newStartFields[hidden], #establishedMessage[hidden] { display: none; }

.skip-card { padding: 22px; border: 1px solid #b8d8e1; border-radius: 9px; background: var(--blue-soft); }
.skip-card strong { color: var(--navy); }
.skip-card p { margin: 5px 0 0; color: var(--muted); }
.reused-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 21px; padding: 15px; border: 1px solid #c9dce2; border-radius: 8px; background: var(--blue-soft); }
.reused-answers p { margin: 0; }
.reused-answers span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.reused-answers strong { display: block; margin-top: 3px; color: var(--navy); font-size: 13px; }
.reused-answers small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }

.review-summary { display: grid; gap: 13px; }
.review-section { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.review-section-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 13px 15px 13px 12px; border-left: 3px solid var(--cyan); background: linear-gradient(90deg, rgba(85,214,194,.1), #f6f8fa 45%); }
.review-section-head h4 { margin: 0; color: var(--navy); font-size: 14px; }
.review-edit { padding: 0; border: 0; background: none; color: var(--blue); font-size: 12px; font-weight: 750; }
.review-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding: 7px 15px; }
.review-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #edf1f4; font-size: 12px; }
.review-row span { color: var(--muted); }
.review-row strong { max-width: 58%; color: var(--ink); font-weight: 650; text-align: right; white-space: pre-line; }

.declaration { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 22px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.declaration input { margin-top: 2px; }

.export-panel { display: flex; justify-content: space-between; gap: 22px; align-items: center; padding: 20px; border-radius: 10px; background: var(--navy-deep); color: white; }
.export-panel strong { font-size: 14px; }
.export-panel p { margin: 3px 0 0; color: #b8c8d4; font-size: 11px; }
.export-status { margin: 12px 0 0; color: var(--blue); font-size: 12px; }
.export-status.is-error { color: var(--error); }
.submission-success { margin-top: 16px; padding: 18px; display: grid; grid-template-columns: auto 1fr; gap: 13px; border: 1px solid #99d5c7; border-radius: 9px; background: #edf9f6; }
.submission-success[hidden] { display: none; }
.submission-success > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: white; font-weight: 800; }
.submission-success strong { color: var(--navy); }
.submission-success p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.declaration a { color: var(--blue); font-weight: 750; }

.application-footer { padding: 25px 0 34px; border-top: 1px solid var(--line); background: white; color: var(--muted); font-size: 11px; }
.application-footer .shell { display: flex; justify-content: space-between; gap: 28px; }
.application-footer p { max-width: 760px; margin: 0; }
.application-footer a { color: var(--blue); }

.privacy-page { width: min(820px, calc(100% - 40px)); padding-top: 58px; padding-bottom: 80px; }
.privacy-page h1 { max-width: 680px; }
.privacy-lede { max-width: 700px; margin-bottom: 34px; color: var(--muted); font-size: 17px; }
.privacy-date { margin: -23px 0 34px; color: var(--muted); font-size: 11px; }
.privacy-page section { margin-top: 28px; padding-top: 23px; border-top: 1px solid var(--line); }
.privacy-page section h2 { margin-bottom: 8px; color: var(--navy); font-size: 19px; }
.privacy-page section p { margin-bottom: 0; color: var(--muted); }
.privacy-return { margin-top: 30px; text-decoration: none; }

.form-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-actions[hidden] { display: none; }
.primary-button, .secondary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 11px 19px;
  border-radius: 10px;
  font-weight: 750;
  font-size: 13px;
}
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: white; box-shadow: 0 10px 26px rgba(22,119,255,.26); }
.primary-button:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.primary-button:disabled { opacity: .55; cursor: wait; }
.primary-button.is-success, .primary-button.is-success:hover {
  border-color: #21866f;
  background: #21866f;
  box-shadow: none;
  opacity: 1;
  cursor: default;
}
.secondary-button { border: 1px solid var(--line); background: white; color: var(--navy); }
.secondary-button:hover { border-color: var(--blue); color: var(--blue); }

@media (max-width: 880px) {
  .page-grid { grid-template-columns: 1fr; gap: 26px; padding-top: 32px; }
  .application-intro { position: static; }
  .application-intro > p:not(.eyebrow), .privacy-card { max-width: 680px; }
  .step-list { display: none; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 62px; }
  .sample-button { display: none; }
  .admin-link { display: none; }
  .page-grid { padding-bottom: 40px; }
  .application-card { min-height: 0; padding: 21px 16px; border-radius: 10px; }
  .field-grid, .choice-grid, .review-rows { grid-template-columns: 1fr; }
  .profit-band-grid, .fleet-size-grid { grid-template-columns: 1fr 1fr; }
  .finance-purpose-grid { grid-template-columns: 1fr 1fr; }
  .funding-timeframe-grid { grid-template-columns: 1fr 1fr; }
  .revenue-band-grid { grid-template-columns: 1fr 1fr; }
  .company-lookup { padding: 16px 13px; }
  .company-search-row { grid-template-columns: 1fr; }
  .company-search-button { width: 100%; }
  .selected-company { flex-direction: column; }
  .contact-panel { padding: 17px 13px; }
  .reused-answers { grid-template-columns: 1fr; }
  .reused-answers small { grid-column: auto; }
  .field-wide { grid-column: auto; }
  .person-card { padding: 17px 13px; }
  .form-actions, .export-panel { align-items: stretch; flex-direction: column-reverse; }
  .form-actions button, .export-panel button { width: 100%; }
  .progress-track { margin-bottom: 27px; }
  .application-footer .shell { flex-direction: column; gap: 9px; }
}

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