:root {
  color-scheme: light;
  --navy: #0b1f3a;
  --blue: #1768ac;
  --blue-dark: #0f4f86;
  --gold: #d3a52f;
  --ink: #152235;
  --muted: #5a6878;
  --line: #d9e1ea;
  --soft: #f4f7fa;
  --success: #19734b;
  --danger: #b42318;
  --warning: #8a5a00;
  --white: #fff;
  --shadow: 0 18px 50px rgba(11, 31, 58, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(23, 104, 172, .10), transparent 32rem),
    linear-gradient(180deg, #f8fafc 0, #eef3f8 100%);
}

a { color: var(--blue-dark); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(11, 31, 58, .10);
  background: rgba(255, 255, 255, .94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
}

.brand img {
  display: block;
  width: 168px;
  height: auto;
  max-height: 49px;
  object-fit: contain;
}

.verified-badge {
  display: inline-flex;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  filter: drop-shadow(0 2px 3px rgba(23, 104, 172, .18));
}

.verified-badge svg {
  display: block;
  width: 100%;
  height: 100%;
}

.secure-label {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--muted);
  font-size: 1.04rem;
  font-weight: 700;
}

.secure-label::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 9px;
  color: var(--white);
  font-size: 1.06rem;
  border-radius: 50%;
  background: var(--success);
}

.app-shell {
  width: min(920px, calc(100% - 32px));
  margin: clamp(30px, 6vw, 68px) auto 42px;
}

.intro {
  max-width: 740px;
  margin: 0 auto 28px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.intro > p:last-child {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.65;
}

.progress { margin: 30px auto 18px; }

.progress ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #798697;
  font-size: .76rem;
}

.progress li::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 17px;
  right: 50%;
  width: 100%;
  height: 3px;
  background: var(--line);
}

.progress li:first-child::before { display: none; }

.progress span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  font-weight: 800;
}

.progress .active,
.progress .done { color: var(--navy); }

.progress .active span {
  color: var(--white);
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(23, 104, 172, .11);
}

.progress .done span {
  color: var(--white);
  border-color: var(--success);
  background: var(--success);
}

.progress .done::before,
.progress .active::before { background: var(--success); }

.panel {
  padding: clamp(22px, 5vw, 48px);
  border: 1px solid rgba(11, 31, 58, .10);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.view-heading {
  max-width: 650px;
  margin: 0 auto 26px;
  text-align: center;
}

.view-heading h2 {
  margin: 0 0 9px;
  color: var(--navy);
  font-size: clamp(1.5rem, 3.2vw, 2.05rem);
}

.view-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 142px;
  padding: 26px;
  color: var(--ink);
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}

.profile-card:not([aria-pressed="true"]):not(:disabled):hover {
  color: var(--white);
  border-color: #8cb5d8;
  background: var(--navy);
  box-shadow: 0 10px 25px rgba(11, 31, 58, .10);
  transform: translateY(-2px);
}

.profile-card:not([aria-pressed="true"]):not(:disabled):hover strong,
.profile-card:not([aria-pressed="true"]):not(:disabled):hover small {
  color: var(--white);
}

.profile-card[aria-pressed="true"] {
  border-color: var(--blue);
  background: #f4f9fd;
  box-shadow: 0 0 0 4px rgba(23, 104, 172, .10);
}

.profile-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 1.16rem;
}

.profile-card small {
  display: block;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }

label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: .91rem;
  font-weight: 750;
}

.optional {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
}

input, select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  font: inherit;
  border: 1.5px solid #b9c5d2;
  border-radius: 10px;
  background: var(--white);
}

input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(23, 104, 172, .28);
  outline-offset: 2px;
  border-color: var(--blue);
}

[aria-invalid="true"] { border-color: var(--danger); }

.field-error {
  min-height: 18px;
  margin: 5px 0 0;
  color: var(--danger);
  font-size: .8rem;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

button, .button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  color: var(--white);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  cursor: pointer;
}

button:hover, .button:hover {
  color: var(--white);
  background: var(--blue-dark);
}
button:disabled { opacity: .58; cursor: not-allowed; }

.button-secondary {
  color: var(--navy);
  border: 1.5px solid #aebdcc;
  background: var(--white);
}

.button-secondary:hover { background: var(--soft); }

.alert {
  margin: 0 0 20px;
  padding: 13px 15px;
  color: var(--danger);
  border: 1px solid #f2b8b5;
  border-radius: 10px;
  background: #fff5f4;
  line-height: 1.45;
}

.claim-context-summary,
.matching-entity {
  display: grid;
  gap: 5px;
  margin: 0 0 22px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.claim-context-summary span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.claim-context-summary strong { color: var(--navy); }
.claim-context-summary small { color: var(--muted); line-height: 1.45; }
.matching-entity p { margin: 0; }
.matching-entity button { justify-self: start; margin-top: 6px; }

.otp-box {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.masked-email {
  margin: 0 0 20px;
  color: var(--navy);
  font-weight: 800;
}

.otp-input {
  max-width: 300px;
  height: 64px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: .35em;
  font-variant-numeric: tabular-nums;
}

.timer {
  min-height: 24px;
  margin: 12px 0;
  color: var(--muted);
  font-size: .9rem;
}

.link-button {
  min-height: 44px;
  padding: 8px;
  color: var(--blue-dark);
  text-decoration: underline;
  border: 0;
  background: transparent;
  font-weight: 700;
}

.link-button:hover { background: transparent; }

.processing {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 34px 0;
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #dbe6ef;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.result {
  max-width: 590px;
  margin: 0 auto;
  text-align: center;
}

.result-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  color: var(--white);
  border-radius: 50%;
  background: var(--success);
  font-size: 2rem;
  font-weight: 900;
}

.result.manual .result-icon { background: var(--warning); }

.result h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: clamp(1.55rem, 4vw, 2.25rem);
}

.result > p {
  color: var(--muted);
  line-height: 1.6;
}

.receipt {
  display: grid;
  gap: 12px;
  margin: 24px 0;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.receipt-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
}

.receipt-row span:first-child { color: var(--muted); }
.receipt-row strong { color: var(--navy); overflow-wrap: anywhere; }

.turnstile-host {
  display: flex;
  justify-content: center;
  min-height: 1px;
  margin-top: 12px;
}

.handoff-error {
  padding: 20px;
  border: 1px solid #f0d28f;
  border-radius: 12px;
  background: #fff9eb;
  text-align: left;
}

footer {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto 34px;
  color: var(--muted);
  text-align: center;
  font-size: .83rem;
  line-height: 1.5;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 14px;
  color: var(--white);
  background: var(--danger);
}

@media (max-width: 680px) {
  .site-header { min-height: 68px; gap: 10px; padding: 11px 12px; }
  .brand { gap: 6px; min-width: 0; }
  .brand img { width: 105px; max-height: 32px; }
  .verified-badge { width: 22px; height: 22px; flex-basis: 22px; }
  .secure-label { font-size: .78rem; }
  .secure-label::before { width: 24px; height: 24px; margin-right: 5px; font-size: .84rem; }
  .app-shell { width: min(100% - 20px, 920px); margin-top: 24px; }
  .panel { padding: 22px 16px; border-radius: 18px; }
  .profile-grid, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .profile-card { min-height: 124px; padding: 22px; }
  .progress b { font-size: .68rem; }
  .actions { align-items: stretch; flex-direction: column-reverse; }
  .actions button, .actions .button { width: 100%; }
  .receipt-row { grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
