:root {
  --navy-brand: #1e4d8c;
  --orange: #cc6600;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e1e5ec;
  --text: #16202e;
  --text-muted: #5b6472;
  --green: #1b8a5a;
  --green-bg: #e6f4ee;
  --amber: #c98a12;
  --amber-bg: #fbf0dd;
  --red: #c0392b;
  --red-bg: #fbe9e7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --navy-brand: #3f76c4;
    --orange: #e08b3a;
    --bg: #0f1520;
    --surface: #161d2b;
    --surface-2: #1b2333;
    --border: #2a3346;
    --text: #e7ebf2;
    --text-muted: #a2adc0;
    --green: #4fbf8c;
    --green-bg: #12291f;
    --amber: #e0a83f;
    --amber-bg: #2e230f;
    --red: #e0736a;
    --red-bg: #2c1815;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  padding: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(16, 31, 54, 0.08);
  padding: 32px 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
h1 { font-family: "Manrope", "Inter", sans-serif; font-size: 1.25rem; margin: 0 0 20px; color: var(--navy-brand); text-wrap: balance; }
p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border: 0; padding: 0; margin: 0 0 18px; min-inline-size: 0; }
.face { position: relative; display: block; cursor: pointer; }
.face input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.face-body {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px 12px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease, opacity 0.12s ease;
}
.face svg { width: 56px; height: 56px; }
.face svg .ring { fill: none; stroke: currentColor; stroke-width: 4; }
.face svg .dot { fill: currentColor; }
.face svg .mouth { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
.face-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.face-happy .face-body { color: var(--green); }
.face-neutral .face-body { color: var(--amber); }
.face-sad .face-body { color: var(--red); }
.face:hover .face-body { transform: translateY(-2px); }
.face input:focus-visible + .face-body { outline: 2px solid var(--navy-brand); outline-offset: 2px; }
.face input:checked + .face-body { transform: translateY(-2px); }
.face-happy input:checked + .face-body { border-color: var(--green); background: var(--green-bg); }
.face-neutral input:checked + .face-body { border-color: var(--amber); background: var(--amber-bg); }
.face-sad input:checked + .face-body { border-color: var(--red); background: var(--red-bg); }
.face input:checked + .face-body .face-label { color: var(--text); }
.faces.has-choice .face input:not(:checked) + .face-body { opacity: 0.55; }

textarea {
  width: 100%;
  min-height: 84px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 16px;
  background: var(--surface-2);
  color: var(--text);
}
textarea:focus-visible { outline: 2px solid var(--navy-brand); outline-offset: 1px; }
button#submit-btn {
  background: var(--navy-brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 24px;
  font-family: "Manrope", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  width: 100%;
}
button#submit-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
button#submit-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.error { color: var(--red); font-size: 0.85rem; margin: 12px 0 0; }
.check {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--green-bg); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 1.4rem;
}
@media (prefers-reduced-motion: reduce) { .face-body { transition: none; } }
