:root {
  --bg: #f6f1e7;
  --surface: #fffdf8;
  --ink: #2a2118;
  --muted: #6e6253;
  --line: #e2d8c6;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #fde7d7;
  --good: #15803d;
  --good-soft: #dcfce7;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(42 33 24 / .06), 0 8px 24px rgb(42 33 24 / .08);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1712;
    --surface: #26201a;
    --ink: #f3ece1;
    --muted: #b3a593;
    --line: #3b3229;
    --accent: #fb923c;
    --accent-ink: #1b1712;
    --accent-soft: #43281a;
    --good: #4ade80;
    --good-soft: #163322;
    --bad: #f87171;
    --bad-soft: #3a1a1a;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .35);
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.site-header, main, .site-footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header { padding-top: 40px; text-align: center; }

.logo {
  margin: 0;
  font: 800 clamp(2.4rem, 9vw, 3.6rem)/1 Fraunces, Georgia, serif;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }

.tagline { margin: 10px 0 28px; color: var(--muted); }

.eyebrow {
  margin: 0 0 10px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- the zooming image ---- */
.viewer {
  position: relative;
  margin: 0 0 20px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}
.viewer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.zoom-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgb(0 0 0 / .55);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.zoom-chip:empty { display: none; }

/* ---- hints ---- */
.hints {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  counter-reset: hint;
}
.hints li {
  counter-increment: hint;
  margin-bottom: 8px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  animation: rise .4s ease both;
}
.hints li::before {
  content: "Hint " counter(hint) ": ";
  font-weight: 600;
  color: var(--accent);
}

/* ---- buttons ---- */
.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .1s, background .15s, border-color .15s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .choice:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.btn-ghost {
  width: 100%;
  margin-bottom: 20px;
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); }

.btn-primary {
  width: 100%;
  margin-top: 14px;
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---- choices ---- */
.choices { margin: 0; padding: 0; border: 0; min-width: 0; }
.choices legend {
  padding: 0;
  margin-bottom: 10px;
  font: 600 1.35rem/1.2 Fraunces, Georgia, serif;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 420px) { .choice-grid { grid-template-columns: 1fr; } }

.choice {
  font: inherit;
  font-weight: 500;
  text-align: left;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.choice:hover { border-color: var(--accent); }
.choice[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---- cards ---- */
.card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise .5s ease both;
}
.card h2 {
  margin: 0 0 8px;
  font: 800 1.8rem/1.15 Fraunces, Georgia, serif;
}
.card p { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.card .muted { color: var(--muted); }

.result {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
}
.result.good { background: var(--good-soft); color: var(--good); }
.result.bad { background: var(--bad-soft); color: var(--bad); }
.result.none { background: var(--accent-soft); color: var(--ink); }

.countdown { font: 800 2.4rem/1 Fraunces, Georgia, serif; color: var(--accent); }

.site-footer {
  padding-top: 40px;
  padding-bottom: 40px;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
