:root {
  color-scheme: light dark;
  --accent: #023668;
  --ink: #202124;
  --muted: #64656b;
  --surface: #fff;
  --ground: #f5f5f7;
  --line: #d9dade;
  --error: #ac292a;
  --focus: #1664ab;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font:
    15px/1.55 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    sans-serif;
}
header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
}
header img {
  width: 140px;
  height: auto;
  display: block;
}
header span {
  color: var(--muted);
}
main {
  min-height: calc(100svh - 160px);
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.auth {
  width: min(420px, 100%);
  padding: 32px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 12px 40px #0000000b;
}
h1 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -0.025em;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  margin-top: 32px;
}
.muted {
  color: var(--muted);
  margin: 0 0 24px;
}
.identity-icon {
  width: 42px;
  height: 42px;
  stroke: var(--accent);
  stroke-width: 2.2;
  margin-bottom: 20px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 550;
  margin: 16px 0 6px;
}
input:not([type="checkbox"]) {
  font: inherit;
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
  caret-color: var(--focus);
}
button {
  min-height: 44px;
  font: inherit;
  font-weight: 550;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  width: 100%;
  margin-top: 24px;
}
.text-button {
  display: block;
  margin: 12px auto 0;
  background: transparent;
  border: 0;
  color: var(--focus);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:not(:disabled):hover {
  filter: brightness(0.96);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
::selection {
  background: #c5def5;
  color: #102840;
}
#error {
  color: var(--error);
  margin: 16px 0 0;
}
.hint {
  font-size: 12px;
  color: var(--muted);
}
.notice {
  color: var(--muted);
  font-size: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
footer {
  text-align: center;
  color: var(--muted);
  padding: 20px;
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
#dashboard {
  width: min(720px, 100%);
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.identity-details {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  margin: 24px 0;
}
.identity-details dt {
  color: var(--muted);
}
dd {
  margin: 0;
}
#audit-list {
  list-style: none;
  padding: 0;
}
#audit-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
}
time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
output {
  display: block;
  padding: 18px 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, monospace;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
#finish-recovery {
  width: 100%;
  margin-top: 12px;
}
body[data-busy="true"] form {
  opacity: 0.7;
}
body[data-success="true"] .identity-icon {
  stroke-dasharray: 160;
  animation: accepted 0.5s ease-out;
}
@keyframes accepted {
  from {
    stroke-dashoffset: 160;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #175586;
    --ink: #f2f2f4;
    --muted: #b1b2ba;
    --surface: #26272b;
    --ground: #1c1d20;
    --line: #45464c;
    --error: #ff9d9f;
    --focus: #8cb8e4;
  }
  header img {
    filter: brightness(0) invert(1);
  }
  .auth {
    box-shadow: 0 12px 40px #0003;
  }
  .identity-icon {
    stroke: var(--focus);
  }
}
@media (max-width: 480px) {
  header {
    padding: 20px;
  }
  main {
    padding: 24px 16px;
  }
  .auth {
    padding: 26px 22px;
  }
  .page-heading {
    gap: 12px;
  }
  #audit-list li {
    flex-direction: column;
    gap: 4px;
  }
  .identity-details {
    grid-template-columns: 120px 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
.security-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 550;
}
#account-error {
  color: var(--error);
}
