:root {
  color-scheme: light;
  --auth-ink: #202638;
  --auth-muted: #536179;
  --auth-link: #2742a3;
  --auth-border: #cbd4e4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--auth-ink);
  background: #f3f6fa;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 480px);
  border: 1px solid #e0e5ee;
  border-radius: 18px;
  background: #fff;
  padding: 32px;
  box-shadow: 0 14px 44px #29364c12;
}

.brand {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--auth-link);
}

h1 { margin: 0; font-size: clamp(24px, 6vw, 30px); line-height: 1.25; }
.intro, .footnote { color: var(--auth-muted); line-height: 1.6; }
.intro { margin: 12px 0 24px; }
.footnote { margin: 18px 0 0; font-size: 14px; }

fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

label { font-size: 15px; font-weight: 600; }

input, button {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--auth-border);
  border-radius: 9px;
  font: inherit;
}

input { margin-bottom: 8px; color: var(--auth-ink); background: #fff; }
button { margin-top: 4px; color: #fff; background: #2d4cc3; border-color: #2d4cc3; font-weight: 650; cursor: pointer; }
button:hover:enabled { background: #233c9f; }
button:disabled { color: #495a76; background: #e2e8f2; border-color: #e2e8f2; cursor: not-allowed; }
input:disabled { color: var(--auth-muted); background: #f3f6fa; }
button.secondary:enabled { color: var(--auth-link); background: #fff; border-color: var(--auth-border); }
button.secondary:hover:enabled { background: #edf2fb; }

.checkbox-label { display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.checkbox-label input { width: 16px; min-height: 16px; margin: 3px 0 0; flex: 0 0 auto; }

:focus-visible { outline: 2px solid #284bc8; outline-offset: 3px; }
.field-hint { margin: -8px 0 8px; font-size: 13px; color: var(--auth-muted); line-height: 1.55; }

.identity {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #edf2fb;
}

.identity p { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.identity strong { margin-left: 8px; }
.request-summary, #activation-status-form, #activation-complete-form { margin: 18px 0 0; }
.restart { margin-top: 8px; }
.credential-state { color: var(--auth-muted); font-size: 14px; }
.status { min-height: 24px; margin: 12px 0; color: var(--auth-muted); line-height: 1.5; }
.status[data-tone="error"] { color: #9d281c; }
.status[data-tone="success"] { color: #176249; }
.auth-links { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
a { color: var(--auth-link); line-height: 1.55; text-underline-offset: 0.18em; }

@media (max-width: 480px) {
  body { padding: 16px; }
  .auth-card { padding: 24px; }
}
