:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --faint: #b5b5b5;
  --paper: #fafaf7;
  --line: #d8d8d2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}

footer { padding: 1rem; text-align: center; }
footer a { color: var(--muted); text-decoration: none; }

/* Answer pages */
.question { font-size: 1.25rem; color: var(--muted); margin: 0; }
.answer h1 {
  font-size: clamp(6rem, 25vw, 16rem);
  line-height: 1;
  margin: 1rem 0;
  letter-spacing: -0.04em;
}
.subtitle { font-size: 1.25rem; max-width: 40rem; margin: 0; }
.checked { font-size: 0.85rem; color: var(--faint); margin-top: 2rem; }

/* Ask form */
#ask {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.word { font-weight: 600; }
.box { position: relative; display: inline-block; }
.box input, .ghost {
  font: inherit;
  padding: 0.4rem 0.6rem;
  width: 14em;
  border: 1px solid transparent;
}
.box input {
  position: relative;
  background: transparent;
  border-color: var(--line);
  border-radius: 6px;
  color: var(--ink);
}
.ghost {
  position: absolute;
  inset: 0;
  color: var(--faint);
  white-space: pre;
  overflow: hidden;
  text-align: left;
  pointer-events: none;
}
.ghost .typed { color: transparent; }
button {
  font: inherit;
  padding: 0.4rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}
.hint { color: var(--faint); font-size: 0.85rem; }
