:root {
  --navy: #102f5e;
  --navy-dark: #082447;
  --red: #d52b35;
  --ink: #17202a;
  --muted: #5b6675;
  --line: #d8dee8;
  --surface: #ffffff;
  --canvas: #fff8ee;
  --success: #17663b;
  --danger: #a61b26;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
}

a {
  color: inherit;
}

.site-header {
  border-bottom: 4px solid var(--red);
  background: #fff;
  color: var(--navy);
}

.site-header__inner,
.page-shell,
.site-footer {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header__inner {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: auto;
  height: 72px;
  max-width: 190px;
  object-fit: contain;
}

.session-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.session-tools form {
  margin: 0;
}

.page-shell {
  flex: 1;
  padding: 56px 0 72px;
}

.site-footer {
  min-height: 72px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.auth-layout {
  min-height: 580px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: 72px;
}

.auth-intro h1,
.content-column h1,
.legal-copy h1 {
  margin: 8px 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
}

.auth-intro p:not(.eyebrow),
.page-heading p,
.content-column > p,
.legal-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.eyebrow {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.form-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  background: var(--surface);
  box-shadow: 0 18px 40px rgb(16 47 94 / 10%);
}

.login-field {
  display: block;
}

.login-field label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.form-panel label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 700;
}

.form-panel input,
.form-panel select,
.form-panel textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #aeb8c6;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.form-panel input:focus,
.form-panel select:focus,
.form-panel textarea:focus {
  outline: 3px solid rgb(16 47 94 / 18%);
  border-color: var(--navy);
}

.button {
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  margin-top: 22px;
  background: var(--red);
  color: #fff;
}

.button--primary:hover {
  background: #b9212b;
}

.button--quiet {
  border-color: rgb(16 47 94 / 48%);
  background: #fff;
  color: var(--navy);
}

.button--secondary {
  border-color: #9eabbc;
  background: #fff;
  color: var(--navy);
}

.button--compact {
  min-height: 38px;
  margin: 0;
  padding: 8px 14px;
}

.text-link {
  margin-top: 18px;
  display: inline-block;
  color: var(--navy);
  font-weight: 700;
}

.form-help {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.alert {
  padding: 12px 14px;
  border-left: 4px solid currentColor;
  background: #f7f8fa;
  line-height: 1.45;
}

.alert--error {
  color: var(--danger);
}

.alert--success {
  color: var(--success);
}

.content-column,
.legal-copy {
  max-width: 1040px;
  margin: 0 auto;
}

.content-column--narrow,
.legal-copy {
  max-width: 720px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
}

.page-heading .button {
  margin: 0;
  flex: 0 0 auto;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.status-band,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: var(--surface);
}

.status-band > div,
.metrics-grid article {
  min-height: 104px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.status-band > div:last-child,
.metrics-grid article:last-child {
  border-right: 0;
}

.status-band span,
.metrics-grid span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.status-band strong,
.metrics-grid strong {
  margin-top: 8px;
  display: block;
  font-size: 25px;
}

.metrics-grid {
  grid-template-columns: repeat(4, 1fr);
}

.progress-value {
  font-size: 34px;
  color: var(--navy);
}

.step-nav {
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.step-nav a {
  height: 40px;
  border: 1px solid #aeb8c6;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.step-nav a[aria-current="step"] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.data-form h2 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 20px;
}

.form-grid label {
  min-width: 0;
}

.span-2 {
  grid-column: span 2;
}

.check-field {
  min-height: 48px;
  display: flex !important;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}

.check-field input {
  width: 19px;
  min-height: 19px;
  flex: 0 0 auto;
}

.form-actions {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-actions .button {
  margin: 0;
}

.document-list {
  border-top: 1px solid var(--line);
}

.document-row {
  min-height: 112px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.document-row p {
  margin: 8px 0 0;
  color: var(--muted);
}

.document-title,
.upload-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag {
  padding: 3px 7px;
  border: 1px solid #aeb8c6;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
}

.tag--required {
  border-color: #e2a2a7;
  color: var(--danger);
}

.review-note {
  color: var(--danger) !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.summary-sections {
  display: grid;
  gap: 18px;
}

.summary-sections > section,
.declaration-panel,
.confirmation-panel,
.credential-panel {
  padding: 26px;
  border: 1px solid var(--line);
  background: #fff;
}

.summary-sections h2 {
  margin-top: 0;
}

.summary-grid {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

.summary-grid div {
  min-width: 0;
}

.summary-grid dt {
  color: var(--muted);
  font-size: 13px;
}

.summary-grid dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.plain-list {
  margin: 0;
  padding-left: 20px;
}

.declaration-panel {
  margin-top: 24px;
}

.credential-panel code {
  margin: 20px 0;
  padding: 14px;
  display: block;
  overflow-wrap: anywhere;
  background: #eef2f7;
  color: var(--navy-dark);
  font-size: 17px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 24px;
}

.review-layout aside {
  position: sticky;
  top: 20px;
}

.review-layout aside h2 {
  margin-top: 0;
}

.sensitive-section {
  border-left: 4px solid var(--red) !important;
}

.review-documents form {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 170px minmax(210px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.review-documents select,
.review-documents input {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #aeb8c6;
  font: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #e9eff7;
  color: var(--navy-dark);
  font-size: 13px;
}

.task-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.task-list a {
  min-height: 66px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  font-weight: 700;
}

.task-list a:hover {
  background: #e9eff7;
}

.task-list span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
}

.section-heading {
  margin-top: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading .text-link {
  margin: 0;
}

.empty-state {
  padding: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}

.empty-state p,
.permission-note {
  color: var(--muted);
}

.legal-copy h2 {
  margin-top: 36px;
}

@media (max-width: 760px) {
  .site-header__inner,
  .page-shell,
  .site-footer {
    width: min(100% - 28px, 1160px);
  }

  .site-header__inner {
    min-height: 76px;
  }

  .brand img {
    height: 56px;
    max-width: 132px;
  }

  .brand span,
  .session-tools > span {
    display: none;
  }

  .page-shell {
    padding: 34px 0 50px;
  }

  .auth-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .auth-intro h1,
  .content-column h1,
  .legal-copy h1 {
    font-size: 36px;
  }

  .form-panel {
    padding: 22px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .status-band,
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .status-band > div,
  .metrics-grid article {
    border-bottom: 1px solid var(--line);
  }

  .site-footer {
    flex-direction: column;
  }

  .form-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .document-row {
    grid-template-columns: 1fr;
  }

  .upload-control {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-control label,
  .upload-control .button {
    width: 100%;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .review-layout {
    grid-template-columns: 1fr;
  }

  .review-layout aside {
    position: static;
  }

  .review-documents form {
    grid-template-columns: 1fr;
  }
}
