:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f3f6fb;
}

* { box-sizing: border-box; }
html { min-width: 0; overflow-x: hidden; }
body { margin: 0; min-width: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
button, input, textarea { max-width: 100%; font: inherit; }
main { width: min(100%, 48rem); min-width: 0; margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
.card, section, form, fieldset { min-width: 0; }
.card { background: #fff; border-radius: 1.25rem; padding: clamp(1.25rem, 5vw, 2.5rem); box-shadow: 0 1rem 3rem #17203312; }
.eyebrow { margin: 0 0 .35rem; color: #667085; font-size: .9rem; }
h1 { margin: 0; font-size: clamp(1.9rem, 8vw, 3rem); line-height: 1.05; }
h2 { margin: 0 0 .75rem; font-size: clamp(1.35rem, 6vw, 1.8rem); }
p { line-height: 1.55; }
.notice { border-left: .3rem solid #2f6fed; padding-left: 1rem; color: #41506c; }
.notice.error { border-left-color: #b42318; color: #7a271a; }
.test-warning { margin: 1.5rem 0; padding: 1rem; border: 1px solid #f5c451; border-radius: .8rem; background: #fffaeb; color: #7a4d00; line-height: 1.45; }
.test-warning strong { display: block; margin-bottom: .2rem; }
.progress-header { display: flex; justify-content: space-between; color: #667085; font-size: .9rem; }
.progress-track { height: .45rem; margin-top: .45rem; overflow: hidden; border-radius: 1rem; background: #e9edf5; }
.progress-track span { display: block; width: 14%; height: 100%; border-radius: inherit; background: #2f6fed; transition: width .25s ease; }
.step { padding-top: 1.75rem; }
.step-description { margin-bottom: 1.25rem; color: #475467; }
.upload-warning { margin: 0 0 1.25rem; padding: .85rem 1rem; border: 1px solid #f5c451; border-radius: .7rem; background: #fffaeb; color: #7a4d00; font-weight: 750; }
.field { display: grid; gap: .5rem; margin: 1rem 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: .75rem; }
.field label, .field-label { font-weight: 650; }
.optional-label { color: #667085; font-weight: 400; }
.lookup-mode { margin: 0 0 1rem; padding: 0; border: 0; }
.lookup-mode legend { margin-bottom: .5rem; font-weight: 650; }
.lookup-mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.lookup-mode-options label { display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.9rem; padding: .65rem; border: 1px solid #cbd3e1; border-radius: .7rem; color: #41506c; cursor: pointer; }
.lookup-mode-options label:has(input:checked) { border-color: #2f6fed; background: #eaf0ff; color: #1d4fb7; font-weight: 650; }
.lookup-mode-options input { margin: 0; accent-color: #2f6fed; }
input[type="email"], input[type="file"], input[type="text"], textarea { width: 100%; min-height: 3rem; border: 1px solid #cbd3e1; border-radius: .7rem; padding: .85rem; background: #fff; font-size: 1rem; }
textarea { min-height: 18rem; resize: vertical; line-height: 1.45; }
input[type="file"] { padding: .5rem; overflow: hidden; }
input[type="file"]::file-selector-button { min-height: 2.5rem; margin-right: .65rem; border: 0; border-radius: .55rem; padding: .55rem .75rem; background: #eaf0ff; color: #1d4fb7; font-weight: 650; cursor: pointer; }
input:focus-visible, textarea:focus-visible, button:focus-visible { outline: .2rem solid #9bbcff; outline-offset: .15rem; }
.checkbox { display: grid; grid-template-columns: 1.35rem 1fr; gap: .7rem; align-items: start; margin: 1.25rem 0; }
.checkbox input { width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; }
.primary { width: 100%; min-height: 3rem; border: 0; border-radius: .75rem; padding: .9rem 1.1rem; background: #2f6fed; color: #fff; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.primary:disabled { cursor: wait; opacity: .6; }
.step-navigation { margin-top: 1rem; }
.secondary { width: 100%; min-height: 3rem; border: 1px solid #9aa7bd; border-radius: .75rem; padding: .85rem 1.1rem; background: #fff; color: #344054; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.secondary:hover { border-color: #2f6fed; color: #1d4fb7; background: #f7f9ff; }
.hint { color: #667085; font-size: .9rem; }
.form-error { padding: .8rem; border-radius: .65rem; background: #fef3f2; color: #b42318; }
.completed-list { padding: 0; list-style: none; }
.completed-list li { margin: .6rem 0; padding: .75rem; border-radius: .65rem; background: #f4f7fc; }
.success-mark { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1rem; border-radius: 50%; background: #dcfae6; color: #067647; font-size: 1.6rem; font-weight: 800; }
.processing-mark { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1rem; border-radius: 50%; background: #eaf0ff; color: #2f6fed; font-size: 1.6rem; font-weight: 800; }
.failure-mark { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1rem; border-radius: 50%; background: #fef3f2; color: #b42318; font-size: 1.6rem; font-weight: 800; }
.recognition-grid { display: grid; gap: .25rem; margin-bottom: 1.5rem; }
.recognition-field { padding-bottom: .75rem; border-bottom: 1px solid #edf0f5; }
.recognition-field-missing { margin: 0 -.6rem; padding: .65rem .6rem .85rem; border: 1px solid #f5c451; border-radius: .65rem; background: #fffaeb; }
.recognition-field-missing input { border-color: #dc9b04; background: #fffdf5; }
.recognition-missing-hint { color: #9a6700; font-size: .85rem; font-weight: 600; line-height: 1.45; }
.recognition-guidance { color: #344054; font-size: .85rem; line-height: 1.45; }
.confidence { color: #667085; font-size: .8rem; }
.review-list { display: grid; gap: .65rem; padding: 0; list-style: none; }
.review-list li { display: grid; gap: .2rem; padding: .75rem; border-radius: .65rem; background: #f4f7fc; }
.review-list span { overflow-wrap: anywhere; color: #475467; }
.eyebrow, h1, h2, p, label, legend, .notice, .hint, .form-error { overflow-wrap: anywhere; }
[hidden] { display: none !important; }

@media (max-width: 35rem) {
  main { padding: max(.65rem, env(safe-area-inset-top)) max(.65rem, env(safe-area-inset-right)) max(.65rem, env(safe-area-inset-bottom)) max(.65rem, env(safe-area-inset-left)); }
  .card { border-radius: 1rem; padding: 1.1rem; box-shadow: 0 .5rem 1.5rem #1720330d; }
  h1 { font-size: clamp(1.85rem, 9vw, 2.5rem); }
  h2 { font-size: clamp(1.3rem, 7vw, 1.65rem); }
  .notice { padding-left: .75rem; }
  .test-warning { margin: 1.1rem 0; padding: .85rem; }
  .step { padding-top: 1.35rem; }
  .step-description { margin-bottom: 1rem; }
  .field-row, .lookup-mode-options { grid-template-columns: minmax(0, 1fr); }
  .lookup-mode-options label { justify-content: flex-start; min-height: 3rem; padding-inline: .85rem; }
  .progress-header { flex-wrap: wrap; gap: .35rem 1rem; }
  input[type="file"]::file-selector-button { display: block; width: 100%; margin: 0 0 .5rem; }
}

@media (pointer: coarse) {
  .lookup-mode-options label, .primary, .secondary, input[type="email"], input[type="text"] { min-height: 3.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-track span { transition: none; }
}

@media (min-width: 48rem) {
  main { padding: 2.5rem 1rem; }
}
