:root {
  --navy: #071b4a;
  --cyan: #2ed9ff;
  --yellow: #f5df17;
  --white: #ffffff;
  --mist: #f2f7fb;
  --line: #dce8f1;
  --ink: #0e2042;
  --muted: #53647c;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 15%, rgba(46, 217, 255, 0.18), transparent 24rem),
    linear-gradient(135deg, var(--white), var(--mist));
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

body > header {
  min-height: 5rem;
  display: flex;
  align-items: center;
  padding-inline: max(1.5rem, calc((100vw - 76rem) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

body > header a {
  color: var(--navy);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-decoration: none;
}

body > header span {
  color: #087e9c;
}

main {
  min-height: calc(100vh - 5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(3rem, 8vw, 8rem);
  flex-wrap: wrap;
  padding: clamp(3rem, 8vw, 7rem) max(1.5rem, calc((100vw - 76rem) / 2));
}

.intro {
  max-width: 35rem;
  flex: 1 1 28rem;
}

small {
  display: block;
  margin-bottom: 1rem;
  color: #116c83;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.5rem;
  color: var(--navy);
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.intro p {
  max-width: 31rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.account-card {
  width: min(100%, 31rem);
  flex: 0 1 31rem;
  padding: clamp(1.75rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--white);
  box-shadow: 0 1.5rem 5rem rgba(7, 27, 74, 0.12);
}

.account-card h2 {
  margin-bottom: 1.75rem;
  color: var(--navy);
  font-size: 2rem;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.account-card header p {
  margin: -0.75rem 0 1.75rem;
  color: var(--muted);
}

form {
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 0.4rem;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 800;
}

input {
  min-height: 3.25rem;
  margin-bottom: 1rem;
  padding-inline: 0.875rem;
  border: 1px solid #8fa7ba;
  border-radius: 0.375rem;
  color: var(--ink);
  font: inherit;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 0.2rem solid var(--cyan);
  outline-offset: 0.2rem;
}

.field-help {
  margin: -0.5rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

button {
  min-height: 3.25rem;
  padding-inline: 1.25rem;
  border: 0;
  border-radius: 0.375rem;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

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

.form-message {
  min-height: 1.5rem;
  margin-bottom: 0.75rem;
  color: #b42318;
  font-size: 0.875rem;
}

.form-message[data-status="success"] {
  color: #087443;
}

.switch-view {
  margin: 1.5rem 0 0;
  color: var(--muted);
  text-align: center;
}

.switch-view button {
  min-height: auto;
  padding: 0;
  border-bottom: 0.125rem solid var(--yellow);
  border-radius: 0;
  background: transparent;
  color: var(--navy);
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.secondary-button {
  min-height: 2.75rem;
  border: 1px solid var(--navy);
  background: var(--white);
  color: var(--navy);
}

.full-width-button {
  width: 100%;
}

#passkey-login-button {
  margin-top: 0.75rem;
}

.account-details {
  margin: 0;
}

.account-details > div {
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}

.account-details dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-details dd {
  margin: 0.25rem 0 0;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.credentials {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 0.5rem;
  background: var(--navy);
  color: var(--white);
}

.credentials small {
  color: var(--cyan);
}

.credentials h3 {
  margin-bottom: 0.5rem;
}

.credentials p {
  margin: 0;
  color: #cbd9ed;
}

@media (max-width: 48rem) {
  main {
    align-items: flex-start;
  }

  .intro {
    flex-basis: 100%;
  }

  h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
}
