@font-face { font-family: 'YS Display Cond'; font-weight: 800; src: url(https://yastatic.net/s3/home/fonts/ys/4/display-cond-heavy.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Inter; font-weight: 400; src: url(https://yastatic.net/s3/distribution/lpc/fonts/Inter/Inter-Regular.woff) format('woff2'); font-display: swap; }
@font-face { font-family: Inter; font-weight: 500; src: url(https://yastatic.net/s3/distribution/lpc/fonts/Inter/Inter-Medium.woff) format('woff2'); font-display: swap; }

:root {
  --blue: #3d6dda;
  --blue-strong: #2855b5;
  --blue-soft: #edf3fc;
  --ink: #152031;
  --muted: #536078;
  --line: #dce1eb;
  --page: #f5f5f7;
  --paper: #fff;
  --subtle: #f6f7fa;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  padding: clamp(16px, 6vh, 64px) clamp(12px, 4vw, 32px) 40px;
  background: var(--page);
  color: var(--ink);
  font: 400 15px/1.5 Inter, Arial, sans-serif;
}
main {
  max-width: 820px;
  margin: auto;
  padding: clamp(22px, 5vw, 48px);
  border: 1px solid #e8e9ed;
  border-radius: clamp(24px, 4vw, 36px);
  background: var(--paper);
  box-shadow: 0 2px 6px #15203105, 0 18px 45px #15203109;
}
.skip-link { position: absolute; top: 8px; left: 12px; z-index: 1; padding: 10px 14px; background: var(--paper); color: var(--blue-strong); }
.skip-link:not(:focus) { clip-path: inset(50%); }
.form-brand { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.form-brand img { display: block; height: auto; }
.brand-go { width: clamp(92px, 24vw, 134px); }
.brand-charge { width: clamp(78px, 21vw, 112px); }
.text-link { color: var(--blue-strong); text-underline-offset: 3px; }
.text-link:hover { text-decoration-thickness: 2px; }
.skip-link:focus-visible, .text-link:focus-visible, .offer-action:focus-visible, .commercial-terms summary:focus-visible { outline: 2px solid var(--blue-strong); outline-offset: 4px; }
.surface { padding-top: clamp(24px, 4vw, 36px); }
.offer-overview { text-align: center; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: 'YS Display Cond', Inter, Arial, sans-serif; font-weight: 800; }
h1 { font-size: clamp(36px, 6vw, 52px); line-height: 1.06; letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: clamp(28px, 5vw, 36px); line-height: 1.1; }
h3 { font-size: 15px; line-height: 1.35; font-weight: 700; }
.offer-intro { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.offer-intro a { overflow-wrap: anywhere; }
.commercial-terms { margin-top: 16px; border-radius: 14px; background: var(--subtle); }
.commercial-terms summary {
  display: block;
  position: relative;
  min-height: 48px;
  padding: 12px 40px;
  border-radius: inherit;
  color: var(--ink);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.commercial-terms summary::-webkit-details-marker { display: none; }
.commercial-terms summary::after {
  content: '';
  position: absolute;
  inset-inline-end: 19px;
  top: 50%;
  width: 8px;
  height: 8px;
  border: solid var(--blue-strong);
  border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg);
}
.commercial-terms[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.commercial-terms summary:hover { background: var(--blue-soft); }
.commercial-content { margin: 0 16px; padding: 14px 0 16px; border-top: 1px solid var(--line); color: var(--muted); text-align: start; }
.commercial-content img { display: block; max-width: 100%; height: auto; margin: 12px 0 8px; }
.commercial-content a { display: block; width: fit-content; max-width: 100%; }
.choice { margin-top: 28px; }
.choice h2 { font: 700 19px/1.3 Inter, Arial, sans-serif; letter-spacing: -.015em; }
.file-box { display: grid; gap: 7px; padding: 18px; margin: 22px 0 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--blue-soft); }
.file-box > span { font-weight: 600; }
.file-box small { color: var(--muted); }
input, button { font: inherit; }
button, a, summary { touch-action: manipulation; }
input[type=file] { min-width: 0; width: 100%; color: var(--muted); font-size: 13px; }
input::file-selector-button { font: 600 13px Inter, Arial, sans-serif; color: var(--blue-strong); background: white; border: 1px solid #d5dfef; border-radius: 999px; padding: 9px 13px; margin-right: 10px; cursor: pointer; }
button { min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 999px; color: white; background: var(--blue); font-weight: 700; cursor: pointer; }
button:hover:enabled { background: var(--blue-strong); }
button:disabled { background: #e8ebf2; color: #647084; cursor: default; }
button.secondary { color: var(--ink); background: #f4f6fa; border-color: #e6eaf1; }
button.secondary:hover:enabled { background: var(--blue-soft); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--blue-strong); outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.modes { display: grid; gap: 12px; margin-top: 12px; }
button.mode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 88px;
  padding: 16px 18px;
  border-color: var(--line);
  border-radius: 16px;
  text-align: left;
  color: var(--ink);
  background: var(--subtle);
}
.mode-card > span:first-child { min-width: 0; }
.mode-card strong { display: block; font-size: 18px; line-height: 1.25; letter-spacing: -.015em; }
.mode-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; font-weight: 400; }
.mode-arrow {
  display: grid;
  flex: none;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue-strong);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}
button.mode-card:hover:enabled { background: var(--blue-soft); border-color: var(--blue); }
button.mode-card-primary { background: var(--blue); border-color: var(--blue); color: white; }
.mode-card-primary small { color: white; }
.mode-card-primary .mode-arrow { border-color: transparent; background: var(--blue-soft); }
button.mode-card-primary:hover:enabled { background: var(--blue-strong); border-color: var(--blue-strong); }
button.flow-back, button.flow-link { color: var(--blue-strong); background: transparent; padding: 8px 0; font-weight: 600; }
button.flow-back { margin: -8px 0 12px; }
button.flow-back span { margin-right: 6px; }
button.flow-back:hover:enabled, button.flow-link:hover:enabled { background: transparent; text-decoration: underline; }
#lookup-title, #card-title { margin-bottom: 18px; }
.lookup { display: grid; gap: 7px; }
.lookup label, #match-title { font-weight: 600; }
.lookup-row { display: flex; gap: 8px; }
.lookup-row input { min-width: 0; flex: 1; background: #f6f8fc; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--ink); }
.lookup-extras { margin-top: 8px; }
.lookup-extras button { min-height: 44px; font-size: 14px; }
.lookup-setup { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.lookup-setup a { color: var(--blue-strong); }
.live-status:not(:empty) { margin-top: 13px; color: var(--muted); }
#matches { margin-top: 12px; }
#match-list { display: grid; gap: 6px; margin-top: 6px; }
button.company-option { text-align: left; width: 100%; background: #fff; color: var(--ink); border-color: var(--line); border-radius: 15px; padding: 10px 14px; }
button.company-option:hover:enabled { background: var(--blue-soft); }
.company-option small { display: block; color: var(--muted); font-weight: 400; }
#result { margin-top: 28px; border-top: 1px solid var(--line); }
.review-head { display: grid; gap: 6px; }
.review-head p { color: var(--muted); }
.entity-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; min-width: 0; border: 0; }
.entity-options legend { margin-bottom: 6px; padding: 0; font-size: 13px; font-weight: 600; }
.entity-options label { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--subtle); cursor: pointer; }
.entity-options label:has(:checked) { border-color: var(--blue); background: var(--blue-soft); }
.entity-options input { margin: 0; accent-color: var(--blue-strong); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.field-grid .application-field { display: grid; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; }
.field-grid .wide { grid-column: 1 / -1; }
.field-grid input, .field-grid select { width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 14px; background: #f6f8fc; color: var(--ink); font: 400 14px Inter, Arial, sans-serif; }
.field-grid input::placeholder { color: #68748a; }
.review-group { margin: 20px 0 0; padding: 0; min-width: 0; border: 0; }
.review-group legend { padding: 0; font-size: 15px; font-weight: 700; }
.review-group .field-grid { margin-top: 8px; }
.review-address { margin-top: 6px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.manager-option { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 16px; font-weight: 600; cursor: pointer; }
.manager-option input { accent-color: var(--blue-strong); }
.review-footer { margin-top: 20px; }
.offer-action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.note { font-size: 12px; color: var(--muted); }
[hidden] { display: none !important; }
@media (min-width: 720px) {
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  button.mode-card { min-height: 100px; }
}
@media (max-width: 520px) {
  body { padding-block-start: 20px; }
  .form-brand { padding-bottom: 16px; }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .actions button { width: 100%; }
  .offer-action { width: 100%; }
  .lookup-row { flex-direction: column; }
  .modes { margin-top: 14px; }
  button.mode-card { min-height: 80px; padding: 14px; gap: 10px; }
  .mode-card strong { font-size: 17px; }
  .mode-card small { font-size: 13px; }
  .mode-arrow { inline-size: 32px; block-size: 32px; font-size: 20px; }
  .lookup-extras button { width: auto; }
}
