:root {
  color-scheme: dark;
  --content-max: 1120px;
  --notice-max: 1040px;
  --bg: #030417;
  --panel: rgba(12, 18, 48, 0.82);
  --panel-strong: rgba(21, 28, 70, 0.92);
  --line: rgba(132, 228, 255, 0.28);
  --line-strong: rgba(132, 228, 255, 0.62);
  --text: #eff8ff;
  --text-soft: rgba(221, 238, 255, 0.78);
  --accent: #8cf3ff;
  --accent-warm: #ff7ad9;
  --danger: #ff7a9b;
  --success: #8cffc1;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 0 0 2rem;
  background:
    radial-gradient(circle at 18% 12%, rgba(140, 243, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 84% 16%, rgba(255, 122, 217, 0.14), transparent 30rem),
    linear-gradient(135deg, #020316, #071046 54%, #05051e);
  color: var(--text);
  font-family: ui-sans-serif, "Segoe UI", sans-serif;
}

a {
  color: var(--accent);
}

.flash {
  width: min(var(--notice-max), calc(100% - 2rem));
  margin: 1rem auto 0;
}

.flash,
.identity-status {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: rgba(12, 18, 48, 0.72);
  color: var(--text-soft);
}

.identity-shell {
  display: grid;
  gap: 1.25rem;
  width: min(var(--content-max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0 0;
}

.identity-hero {
  max-width: 760px;
  margin-bottom: 0;
}

.identity-kicker {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.identity-hero h1,
.identity-panel h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.identity-hero h1 {
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.92;
}

.identity-hero p,
.identity-panel p {
  color: var(--text-soft);
  line-height: 1.65;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.identity-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.4rem;
  background: var(--panel);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.26);
}

.identity-panel--accent {
  background:
    linear-gradient(135deg, rgba(255, 122, 217, 0.11), transparent 38%),
    var(--panel-strong);
}

.identity-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.identity-known-account {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  border: 1px solid rgba(132, 228, 255, 0.22);
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(1, 5, 22, 0.42);
}

.identity-known-account[hidden] {
  display: none;
}

.identity-known-account span {
  color: var(--text-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identity-known-account button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 0.9rem;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.identity-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.identity-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: rgba(1, 5, 22, 0.62);
  color: var(--text);
  outline: none;
}

.identity-form input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(132, 228, 255, 0.1);
}

.identity-form button {
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: #030417;
  cursor: pointer;
  font-weight: 900;
}

.identity-status {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.8rem;
}

.identity-shell > .identity-status,
.identity-shell > noscript > .identity-status {
  width: min(var(--notice-max), 100%);
  margin: 0;
}

.identity-status strong {
  flex: 0 1 15rem;
}

.identity-status span {
  flex: 1 1 24rem;
  min-width: 0;
}

.identity-status form {
  margin-left: auto;
}

.identity-status form button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 0.95rem;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.identity-status.is-error {
  border-color: rgba(255, 122, 155, 0.62);
  color: var(--danger);
}

.identity-status.is-error form button {
  border-color: rgba(255, 122, 155, 0.5);
  color: var(--danger);
}

.identity-status.is-success {
  border-color: rgba(140, 255, 193, 0.62);
  color: var(--success);
}

.identity-status.is-success form button {
  border-color: rgba(140, 255, 193, 0.48);
  color: var(--success);
}

.account-shell {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
}

.account-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.account-grid {
  align-items: stretch;
}

.account-panel {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.account-facts {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.account-facts div {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  border: 1px solid rgba(132, 228, 255, 0.18);
  border-radius: 14px;
  padding: 0.85rem;
  background: rgba(1, 5, 22, 0.36);
}

.account-facts dt,
.identifier-row p,
.identifier-muted,
.account-section-heading span {
  color: var(--text-soft);
}

.account-facts dt {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.account-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-section-heading span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-size: 0.84rem;
}

.identifier-list {
  display: grid;
  gap: 0.8rem;
}

.identifier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  border: 1px solid rgba(132, 228, 255, 0.2);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(1, 5, 22, 0.38);
}

.identifier-row > div {
  min-width: 0;
}

.identifier-row__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.identifier-row__title strong {
  overflow-wrap: anywhere;
}

.identifier-row p {
  margin: 0.35rem 0 0;
}

.identifier-badge,
.identity-secondary-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 800;
}

.identifier-badge {
  padding: 0.28rem 0.55rem;
  font-size: 0.74rem;
}

.identifier-badge.is-primary {
  border-color: rgba(140, 255, 193, 0.48);
  color: var(--success);
}

.identity-secondary-button {
  padding: 0.72rem 0.9rem;
  background: transparent;
  cursor: pointer;
}

.identifier-muted {
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .flash {
    width: calc(100% - 1rem);
  }

  .identity-shell {
    gap: 1rem;
    width: calc(100% - 1rem);
    padding: 2.25rem 0 0;
  }

  .identity-grid {
    grid-template-columns: 1fr;
  }

  .identity-panel {
    padding: 1.15rem;
    border-radius: 24px;
  }

  .identity-status {
    padding: 0.9rem 1rem;
  }

  .identity-status strong,
  .identity-status span,
  .identity-status form {
    flex: 1 1 100%;
    width: 100%;
  }

  .identity-status form {
    margin-left: 0;
  }

  .identity-status form button {
    width: 100%;
  }

  .account-section-heading,
  .identifier-row {
    align-items: stretch;
    flex-direction: column;
  }

  .identity-secondary-button {
    width: 100%;
  }
}
