:root {
  color-scheme: light dark;
  --background: #ffffff;
  --card: #ffffff;
  --text: #1a1a1a;
  --strong: #0d0d0d;
  --muted: #6b6b6b;
  --fill: rgba(0, 0, 0, 0.045);
  --selected: rgba(0, 0, 0, 0.058);
  --danger: #c10007;
  --ok-dot: #00bc7d;
  --danger-dot: #fb2c36;
  --field-border: rgb(0 0 0 / 0.117);
  --placeholder: #c7c7c8;
  --accent: var(--strong);
  --on-accent: var(--background);
  --motion-fast: 150ms;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #181818;
  --card: #1f1f1f;
  --text: #ececec;
  --strong: #ffffff;
  --muted: #a1a1a1;
  --fill: rgba(255, 255, 255, 0.065);
  --selected: rgba(255, 255, 255, 0.085);
  --danger: #ff6467;
  --ok-dot: #00bc7d;
  --danger-dot: #fb2c36;
  --field-border: rgb(255 255 255 / 0.156);
  --placeholder: rgb(236 236 236 / 0.3);
  }
}
@media (prefers-reduced-motion: reduce) {
  :root { --motion-fast: 0ms; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--text); }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
h1 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; color: var(--strong); text-wrap: balance; }
.logo svg { display: block; }
.lead { margin-top: 8px; color: var(--muted); }
.footer { margin-top: 24px; font-size: 13px; color: var(--muted); }
.footer a { color: var(--text); font-weight: 500; text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

main.home { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 48px 24px 12vh; text-align: center; }
.home .logo svg { width: 64px; height: 64px; }
.home h1 { margin-top: 20px; font-size: 32px; letter-spacing: -0.03em; }
.home .button { min-width: 220px; margin-top: 32px; }
.home .footer { margin-top: 16px; }

main.column { display: flex; flex-direction: column; width: min(360px, 100% - 48px); margin: 0 auto; padding: max(12vh, 48px) 0 48px; text-align: center; }
.column .logo { align-self: center; margin-bottom: 24px; border-radius: 10px; }
.column .logo svg { width: 44px; height: 44px; }
.column form { margin-top: 28px; text-align: left; }
.column form.footer { margin-top: 20px; text-align: center; }
.column .code + form { margin-top: 0; }
.column .dot { align-self: center; }
.column [data-question], .column [data-answer] { display: flex; flex-direction: column; }

label { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 500; color: var(--text); }
form > label:first-child, form > input[type="hidden"] + label { margin-top: 0; }
input { display: block; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--card); box-shadow: inset 0 0 0 1px var(--field-border); color: var(--text); font: inherit; letter-spacing: normal; outline: none; transition: box-shadow var(--motion-fast) ease; }
input::placeholder { color: var(--placeholder); }
input:focus { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent); }
.hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.error { margin-top: 12px; font-size: 13px; color: var(--danger); }
.error:empty { display: none; }

button, .button { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; margin: 0; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none; }
button::before, .button::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; transition: background-color var(--motion-fast) ease, transform var(--motion-fast) ease; }
button:not(:disabled):active::before, .button:active::before { transform: scale(0.98); }
button:disabled { opacity: 0.45; cursor: default; }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ink { color: var(--on-accent); }
.ink::before { background: var(--accent); }
.ink:hover::before { background: color-mix(in srgb, var(--accent) 86%, var(--background)); }
.muted::before { background: var(--fill); }
.muted:hover::before { background: var(--selected); }
.text { height: auto; padding: 0; color: var(--muted); font-size: 13px; }
.text:hover { color: var(--text); }
form > .ink[type="submit"] { width: 100%; margin-top: 24px; }
.buttons { display: flex; gap: 12px; margin-top: 24px; }
.buttons button { flex: 1; }

.code { margin-top: 24px; padding: 18px; border-radius: 12px; background: var(--fill); font: 600 26px/1.2 ui-monospace, 'SF Mono', 'JetBrains Mono', monospace; letter-spacing: 0.12em; color: var(--strong); }
.dot { display: block; width: 8px; height: 8px; margin-bottom: 16px; border-radius: 50%; }
.dot.ok { background: var(--ok-dot); }
.dot.danger { background: var(--danger-dot); }

@media (max-width: 560px) {
  input { font-size: 16px; }
}
