:root {
  color-scheme: dark;
  --brand: #e1192d;
  --surface: #161619;
  --line: #55555c;
  --text: #f2f2f3;
  --muted: #b4b4ba;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: #000;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
  padding: 32px 24px;
  text-align: center;
}

.home { align-self: center; }
h1 { margin: 12px 0 0; font-size: 28px; line-height: 1.2; }
p { margin: 8px 0; color: var(--muted); }
strong { color: var(--text); }

form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; text-align: left; }
label { margin-top: 8px; font-size: 14px; }
small { color: var(--muted); }

input:not([type="checkbox"]) {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
input[aria-invalid="true"] { border-color: #ff6b78; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

button {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button:disabled { opacity: 0.55; cursor: default; }
button.secondary { border: 1px solid var(--line); background: transparent; }
:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.message { padding: 12px; border-radius: 8px; background: #26262b; color: var(--text); text-align: center; }

/* O título recebe o foco só para o leitor de tela anunciar a troca. */
h1:focus { outline: none; }

.code {
  padding: 20px 12px;
  border: 2px dashed var(--brand);
  border-radius: 12px;
  color: var(--text);
  font: 700 32px/1.2 ui-monospace, Consolas, monospace;
  letter-spacing: 2px;
  overflow-wrap: anywhere;
  user-select: all;
}

ol { margin: 8px 0; padding-left: 20px; color: var(--muted); text-align: left; }
