:root {
  --canvas: #ffffff;
  --ink: #0a0a0a;
  --muted: #6f6f6f;
  --faint: #a0a0a0;
  --line: #e6e6e6;
  --line-strong: #0a0a0a;
  --field: #fafafa;
  --danger: #0a0a0a;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic", "Segoe UI",
    "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0a0a0a;
    --ink: #f4f4f4;
    --muted: #9a9a9a;
    --faint: #6a6a6a;
    --line: #242424;
    --line-strong: #f4f4f4;
    --field: #141414;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------ auth shell */

.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 28px clamp(20px, 6vw, 56px);
}

.mark {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.02em;
  font-weight: 400;
}
.mark span { color: var(--faint); }

.center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.card {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 22px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.lede {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 34px;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 34px 0;
}

/* ------------------------------------------------------------ controls */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 15px 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--canvas);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.btn:hover { opacity: 0.82; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }

.btn-ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.btn .g { width: 17px; height: 17px; flex: none; }

.code-input {
  width: 100%;
  padding: 18px 16px;
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-align: center;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.18s ease;
}
.code-input:focus { border-color: var(--line-strong); }

.note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 18px 0 0;
}

.msg {
  min-height: 20px;
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--ink);
}
.msg:not(:empty) {
  border-inline-start: 2px solid var(--ink);
  padding-inline-start: 12px;
  text-align: start;
}

.foot {
  font-size: 12px;
  color: var(--faint);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------ 2FA setup */

.qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 0 auto 22px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.secret {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  word-break: break-all;
  color: var(--muted);
  background: var(--field);
  border: 1px dashed var(--line);
  border-radius: 2px;
  padding: 12px;
  margin: 0 0 26px;
  cursor: pointer;
}

.steps {
  text-align: start;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  counter-reset: s;
}
.steps li {
  counter-increment: s;
  position: relative;
  padding-inline-start: 34px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}
.steps li::before {
  content: counter(s);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
