:root {
  color-scheme: light;
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #243648;
  background: #f3f8fc;
  --blue: #00458b;
  --blue-dark: #00366d;
  --blue-light: #f0f7ff;
  --red: #e31e27;
  --green: #18733e;
  --ink: #243648;
  --muted: #506477;
  --line: #dbe7f1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 20%, rgba(0, 69, 139, .09), transparent 28rem),
    radial-gradient(circle at 94% 82%, rgba(233, 75, 82, .07), transparent 24rem),
    #f5f9fc;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  content: "";
  border: 1px solid rgba(0, 69, 139, .08);
  transform: rotate(35deg);
}

body::before { top: -190px; right: 9%; }
body::after { bottom: -210px; left: 4%; }
button, input { font: inherit; }
a { color: inherit; }

.site-header {
  width: min(1160px, calc(100% - 48px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: grid;
  grid-template-columns: 48px auto;
  grid-template-rows: 27px 18px;
  column-gap: 12px;
  color: var(--blue);
  text-decoration: none;
}

.brand-logo {
  grid-row: 1 / 3;
  display: block;
  width: 46px;
  height: 47px;
  object-fit: contain;
}

.brand-name { font-size: 1.46rem; line-height: 1; font-weight: 800; letter-spacing: .08em; }
.brand-caption { align-self: end; font-size: .68rem; font-weight: 500; color: #65788b; white-space: nowrap; }

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #506477;
  font-size: .86rem;
  font-weight: 500;
}

.lock { position: relative; width: 18px; height: 15px; border-radius: 4px; background: rgba(0, 69, 139, .12); }
.lock::before { position: absolute; left: 4px; top: -8px; width: 8px; height: 9px; border: 2px solid var(--blue); border-bottom: 0; border-radius: 8px 8px 0 0; content: ""; }

.page-shell {
  width: min(1160px, calc(100% - 48px));
  min-height: calc(100vh - 168px);
  margin: 0 auto;
  padding: 54px 0 70px;
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(470px, 1fr);
  gap: clamp(48px, 8vw, 108px);
  align-items: start;
}

.eyebrow, .card-kicker { margin: 0 0 13px; color: #b61921; font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { max-width: 580px; margin: 0; color: var(--blue); font-size: clamp(2.25rem, 4.2vw, 4rem); line-height: 1.05; letter-spacing: -.035em; }
.lead { max-width: 580px; margin: 26px 0 0; color: #506477; font-size: 1.08rem; line-height: 1.75; }

.steps { position: relative; margin: 42px 0 0; padding: 0; list-style: none; }
.steps::before { position: absolute; left: 17px; top: 28px; bottom: 28px; width: 1px; background: var(--line); content: ""; }
.steps li { position: relative; display: flex; gap: 17px; align-items: center; min-height: 70px; color: #506477; }
.steps li > span { z-index: 1; display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: .8rem; font-weight: 700; transition: .25s ease; }
.steps strong, .steps small { display: block; }
.steps strong { margin-bottom: 2px; font-size: .96rem; color: #52687d; }
.steps small { font-size: .8rem; }
.steps li.active > span { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 6px rgba(0, 69, 139, .08); }
.steps li.active strong { color: var(--blue); }
.steps li.done > span { border-color: var(--green); background: var(--green); color: transparent; }
.steps li.done > span::after { position: absolute; color: #fff; content: "✓"; }
.steps li.done strong { color: var(--green); }

.trust-note { display: flex; gap: 13px; align-items: flex-start; margin-top: 34px; padding-top: 25px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.trust-note p { margin: 0; }
.trust-note strong { color: #405b72; }
.shield { display: grid; flex: 0 0 28px; width: 28px; height: 31px; place-items: center; color: var(--blue); background: rgba(0, 69, 139, .1); border-radius: 12px 12px 15px 15px; font-weight: 800; }

.upload-card { position: relative; padding: clamp(28px, 4vw, 44px); border: 1px solid rgba(0, 69, 139, .09); border-radius: 24px; background: rgba(255, 255, 255, .96); box-shadow: 0 28px 80px rgba(31, 69, 105, .14); }
.upload-card::before { position: absolute; top: 0; left: 42px; width: 72px; height: 4px; border-radius: 0 0 4px 4px; background: var(--red); content: ""; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.card-kicker { margin-bottom: 6px; font-size: .66rem; }
h2 { margin: 0; color: var(--blue); font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.2; }
.transfer-purpose { margin: 7px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.transfer-purpose:empty { display: none; }
.state-badge { flex: 0 0 auto; padding: 7px 11px; border-radius: 20px; color: var(--blue); background: var(--blue-light); font-size: .7rem; font-weight: 700; }

.dropzone { display: grid; min-height: 235px; padding: 30px; place-items: center; align-content: center; border: 2px dashed #b8cfe2; border-radius: 17px; background: #f9fcff; text-align: center; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.dropzone[hidden] { display: none; }
.dropzone:hover, .dropzone.dragging { border-color: var(--blue); background: var(--blue-light); transform: translateY(-2px); }
.dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.dropzone strong { margin-top: 16px; color: var(--blue); font-size: 1.04rem; }
.dropzone > span:not(.upload-icon) { margin-top: 5px; color: #506477; font-size: .88rem; }
.dropzone u { color: var(--red); text-underline-offset: 3px; }
.dropzone small { margin-top: 17px; color: #506477; font-size: .875rem; }

.upload-icon { position: relative; display: block; width: 58px; height: 58px; border-radius: 17px; background: #fff; box-shadow: 0 9px 25px rgba(0, 69, 139, .12); }
.upload-icon::before { position: absolute; left: 14px; right: 14px; bottom: 13px; height: 10px; border: 2px solid var(--blue); border-top: 0; border-radius: 0 0 4px 4px; content: ""; }
.upload-arrow::before, .upload-arrow::after { position: absolute; content: ""; }
.upload-arrow::before { left: 28px; top: 15px; width: 2px; height: 24px; background: var(--red); }
.upload-arrow::after { left: 23px; top: 15px; width: 9px; height: 9px; border-top: 2px solid var(--red); border-left: 2px solid var(--red); transform: rotate(45deg); }

.file-card { display: flex; gap: 14px; align-items: center; min-height: 76px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.file-card[hidden] { display: none; }
#details { white-space: pre-line; }
.file-icon { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 11px; background: var(--blue-light); color: var(--blue); font-size: .8rem; font-weight: 800; }
.file-info { min-width: 0; flex: 1; }
.file-info strong, .file-info span { display: block; }
.file-info strong { overflow: hidden; color: #344e65; text-overflow: ellipsis; white-space: nowrap; }
.file-info span { margin-top: 3px; color: #506477; font-size: .76rem; }
.clear-file { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #7c8d9e; background: transparent; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.clear-file:hover { color: var(--red); background: #fff2f3; }

.progress-block { margin-top: 24px; }
.progress-copy { display: flex; gap: 15px; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.progress-copy strong, .progress-copy span { display: block; }
.progress-copy > div { min-width: 0; overflow-wrap: anywhere; }
.progress-copy > div > strong { color: #3c566c; font-size: .88rem; }
.progress-copy span { min-height: 1.2em; margin-top: 3px; color: #506477; font-size: .875rem; }
#progressValue { color: var(--blue); font-size: 1rem; }
.meter { height: 8px; overflow: hidden; border-radius: 8px; background: #e7eef5; }
#bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #1576ba); transition: width .22s ease; }

.primary-button { width: 100%; min-height: 56px; margin-top: 27px; padding: 0 22px; display: flex; align-items: center; justify-content: center; gap: 13px; border: 0; border-radius: 11px; color: #fff; background: var(--red); box-shadow: 0 12px 25px rgba(233, 75, 82, .22); font-weight: 700; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s; }
.primary-button[hidden] { display: none; }
.primary-button:hover:not(:disabled) { background: #c71922; transform: translateY(-1px); box-shadow: 0 15px 30px rgba(233, 75, 82, .28); }
.primary-button:focus-visible, .dropzone:focus-within, .clear-file:focus-visible { outline: 3px solid rgba(0, 69, 139, .24); outline-offset: 3px; }
.primary-button:disabled { color: #95a3af; background: #e7edf2; box-shadow: none; cursor: not-allowed; }
.button-arrow { font-size: 1.25rem; }
.resume-note { margin: 16px 0 0; color: #506477; font-size: .875rem; text-align: center; }
.resume-note span { color: var(--blue); font-size: .9rem; }

body[data-phase="checksum"] .state-badge, body[data-phase="upload"] .state-badge { color: #8b6100; background: #fff6dc; }
body[data-phase="done"] .state-badge { color: var(--green); background: #ecf8f1; }
body[data-phase="error"] .state-badge { color: #bc3037; background: #fff0f1; }
body[data-phase="done"] #bar { background: var(--green); }
body[data-phase="error"] #bar { background: var(--red); }
body[data-phase="checksum"] .dropzone, body[data-phase="upload"] .dropzone, body[data-phase="done"] .dropzone { display: none; }

footer { width: min(1160px, calc(100% - 48px)); min-height: 76px; margin: 0 auto; display: flex; gap: 28px; align-items: center; border-top: 1px solid var(--line); color: #506477; font-size: .76rem; }
footer a { text-decoration: none; }
footer a:hover { color: var(--blue); }

@media (max-width: 900px) {
  .page-shell { grid-template-columns: 1fr; gap: 44px; padding-top: 32px; }
  .intro-panel { max-width: 700px; }
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .steps::before { left: 11%; right: 11%; top: 17px; bottom: auto; width: auto; height: 1px; }
  .steps li { display: block; min-width: 0; min-height: 0; text-align: center; }
  .steps li > span { margin: 0 auto 12px; }
  .steps small { display: none; }
  .trust-note { display: none; }
}

@media (max-width: 580px) {
  .site-header, .page-shell, footer { width: calc(100% - 28px); max-width: 1160px; }
  .site-header { min-height: 76px; }
  .secure-label { font-size: 0; }
  .page-shell { min-width: 0; padding: 27px 0 45px; }
  .intro-panel, .upload-card { width: 100%; max-width: 100%; }
  h1 { max-width: 100%; font-size: 2.15rem; overflow-wrap: break-word; }
  .lead { margin-top: 18px; font-size: .95rem; line-height: 1.65; }
  .steps { margin-top: 30px; }
  .steps li > div { min-width: 0; }
  .steps strong { font-size: .7rem; line-height: 1.25; overflow-wrap: anywhere; }
  .upload-card { min-width: 0; padding: 27px 20px; border-radius: 19px; }
  .card-heading { display: block; }
  .state-badge { display: inline-block; margin-top: 12px; }
  .dropzone { min-height: 210px; padding: 23px 16px; }
  footer { flex-wrap: wrap; gap: 8px 20px; padding: 18px 0; }
  footer span { width: 100%; }
}

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

/* Hidden controls must stay hidden even when their component uses flex/grid. */
.clear-file[hidden], .resume-note[hidden] { display: none; }
body[data-phase="unavailable"] .intro-panel,
body[data-phase="unavailable"] .card-heading,
body[data-phase="unavailable"] .dropzone,
body[data-phase="unavailable"] .file-card,
body[data-phase="unavailable"] #progressValue,
body[data-phase="unavailable"] .meter,
body[data-phase="unavailable"] .primary-button,
body[data-phase="unavailable"] .resume-note { display: none; }
body[data-phase="unavailable"] .page-shell { grid-template-columns: minmax(0, 600px); justify-content: center; }
body[data-phase="unavailable"] .progress-block { margin: 0; }
body[data-phase="unavailable"] .progress-copy { margin: 0; }
body[data-phase="unavailable"] #status { color: var(--blue); font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.25; }
body[data-phase="unavailable"] #details { margin-top: 16px; color: #506477; font-size: .95rem; line-height: 1.6; }
