:root {
  --ground: #0b0d12;
  --panel: #10131a;
  --raised: #161a23;
  --border: #232836;
  --border-strong: #3a4154;
  --text: #e6e9ef;
  --text-soft: #c9cfda;
  --text-muted: #9aa3b2;
  --accent: #5aa9ff;
  --danger: #ff9b9e;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.brand {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

.brand.small {
  font-size: 18px;
  text-align: left;
}

.braces {
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
}

.tagline {
  margin: 4px 0 28px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

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

form[hidden] {
  display: none;
}

h2 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
}

label {
  margin: 0 0 6px;
  color: var(--text-soft);
  font-size: 13px;
}

input {
  min-height: 46px;
  margin: 0 0 16px;
  padding: 0 12px;
  background: var(--ground);
  color: var(--text);
  font: inherit;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}

input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  min-height: 46px;
  padding: 0 18px;
  font: inherit;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

button:disabled,
input:disabled {
  opacity: 0.6;
  cursor: default;
}

.primary {
  background: var(--accent);
  color: var(--ground);
  font-weight: 700;
  border: 1px solid var(--accent);
}

.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.link {
  min-height: 44px;
  padding: 0 8px;
  background: transparent;
  color: var(--accent);
  font-weight: 500;
  border: none;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 8px;
}

.hint {
  margin: 0 0 20px;
  color: var(--text-soft);
  font-size: 14px;
}

.error {
  margin: 0 0 16px;
  color: var(--danger);
  font-size: 14px;
}

.otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  border: none;
}

.digit {
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 24px;
  font-weight: 500;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--text-soft);
  font-size: 14px;
}

.welcome {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px;
}

.welcome h1 {
  margin: 0 0 12px;
  font-size: 26px;
  letter-spacing: -0.01em;
}

.welcome p {
  margin: 0 0 12px;
  color: var(--text-soft);
}
