:root {
  --bg: #0d1117;
  --fg: #f2f4f7;
  --muted: #9aa4b2;
  --accent: #ff5a1f;
  --accent-hover: #ff7a45;
  --card: #161b22;
  --line: #2a313c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at top, #1b2230 0%, var(--bg) 60%);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  text-align: center;
  line-height: 1.5;
}
main { width: 100%; max-width: 32rem; }
.logo { width: 64px; height: 64px; margin-bottom: 1rem; }
h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin: 0 0 .5rem; letter-spacing: -.02em; }
p { color: var(--muted); margin: 0 0 2rem; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font: 600 1.125rem/1 system-ui, sans-serif;
  padding: 1rem 2.25rem;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
form { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
input.code {
  width: 100%;
  max-width: 16rem;
  font: 600 2rem/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .15em;
  text-align: center;
  padding: .75rem 1rem;
  background: var(--card);
  color: var(--fg);
  border: 2px solid var(--line);
  border-radius: 12px;
}
input.code:focus { outline: none; border-color: var(--accent); }
.error { color: #ff8a8a; min-height: 1.5em; margin: 0; }
footer { margin-top: 3rem; font-size: .875rem; color: var(--muted); }
footer a { color: var(--muted); }
pre {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-size: .85rem;
  color: var(--fg);
}
.wide { max-width: 44rem; }
.wide h2 { text-align: left; font-size: 1.125rem; margin: 2rem 0 .5rem; }
.wide p { text-align: left; margin-bottom: 1rem; }
.demo { margin: 1rem 0 2rem; }
.topnav { position: fixed; top: 0; right: 0; padding: 1.25rem 1.5rem; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.topnav a:hover { color: var(--fg); }
.wide ul { text-align: left; color: var(--muted); padding-left: 1.25rem; margin: 0 0 1rem; }
.wide li { margin-bottom: .5rem; }
