:root {
  color: #10172a;
  background: #eef3fb;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgb(38 105 210 / 13%),
      transparent 25rem
    ),
    #eef3fb;
}

button,
input {
  font: inherit;
}

button,
input,
summary {
  min-height: 2.75rem;
}

button {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #1558bd;
  border-radius: 0.75rem;
  color: #fff;
  background: #1769d2;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}

button:hover {
  background: #0e57b5;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex='-1']:focus-visible {
  outline: 0.2rem solid #e19b00;
  outline-offset: 0.18rem;
}

.skip-link {
  position: fixed;
  z-index: 2;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  color: #10172a;
  background: #ffd166;
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.identity-shell {
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

.identity-header,
.identity-card,
.status-message {
  padding: clamp(1.1rem, 5vw, 1.65rem);
  border: 1px solid #c5cfdf;
  border-radius: 1rem;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 0.9rem 2.4rem rgb(26 48 82 / 9%);
}

.identity-header h1 {
  margin: 0;
  color: #0f1c36;
  font-size: clamp(2rem, 10vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.identity-header p:last-child,
.identity-card > p,
.details-body > p,
.identity-footer p {
  color: #4b5a72;
  line-height: 1.55;
}

.eyebrow,
.step-label {
  margin: 0 0 0.65rem;
  color: #245da9;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-message,
.identity-card {
  margin: 0.9rem 0 0;
}

.status-message {
  border-left: 0.3rem solid #1769d2;
  color: #183861;
  box-shadow: none;
  font-weight: 750;
  line-height: 1.45;
}

.status-message[data-kind='error'] {
  border-color: #bb3131;
  color: #6d1616;
  background: #fff4f4;
}

.status-message[data-kind='success'] {
  border-color: #16804d;
  color: #0d5935;
  background: #f1fff8;
}

.test-reference {
  margin: 0.65rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px solid #9eb1cf;
  border-radius: 0.75rem;
  color: #233c63;
  background: #f8fbff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.identity-card h2 {
  margin: 0;
  color: #14213d;
  font-size: 1.45rem;
}

.identity-card button + button {
  margin-top: 0.75rem;
}

.enrollment-card {
  padding: 0;
}

.enrollment-card summary {
  display: flex;
  align-items: center;
  padding: 1.1rem;
  color: #173764;
  font-size: 1.05rem;
  font-weight: 850;
  cursor: pointer;
}

.enrollment-card[open] summary {
  border-bottom: 1px solid #d8dfeb;
}

.details-body {
  padding: 0 1.1rem 1.2rem;
}

form,
#registration-controls {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

form + form,
form + #registration-controls {
  padding-top: 1rem;
  border-top: 1px solid #d8dfeb;
}

label {
  color: #182842;
  font-weight: 800;
}

input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #7c8da8;
  border-radius: 0.65rem;
  color: #10172a;
  background: #fff;
  font-size: 1rem;
}

#otp-code {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2em;
}

[hidden] {
  display: none !important;
}

.identity-footer {
  padding: 1.1rem 0 0;
  font-size: 0.86rem;
  text-align: center;
}

.noscript-message {
  margin: 1rem;
  padding: 1rem;
  border: 1px solid #bb3131;
  border-radius: 0.75rem;
  color: #6d1616;
  background: #fff4f4;
}

@media (max-width: 430px) {
  .identity-shell {
    padding-right: max(0.8rem, env(safe-area-inset-right));
    padding-left: max(0.8rem, env(safe-area-inset-left));
  }

  .identity-header,
  .identity-card,
  .status-message {
    border-radius: 0.85rem;
  }
}

@media (max-width: 390px) {
  .identity-shell {
    padding-right: max(0.65rem, env(safe-area-inset-right));
    padding-left: max(0.65rem, env(safe-area-inset-left));
  }

  .identity-header,
  .identity-card,
  .status-message {
    padding: 1rem;
  }

  .enrollment-card {
    padding: 0;
  }
}

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