:root {
  --cream: #f6f8ee;
  --lime: #b7e23a;
  --lime-mid: #9bc72a;
  --green: #4d7c0f;
  --ink: #23291d;
  --deep: #131209;
  --card: #ffffff;
  --muted: #5a6550;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --radius: 16px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Geist", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 8px 28px rgba(19, 18, 9, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  /* soft lime aurora */
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(183, 226, 58, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(155, 199, 42, 0.2), transparent 50%);
}

a { color: var(--green); }

.app {
  max-width: 440px;
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--lime), var(--lime-mid));
  display: grid; place-items: center;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(35, 41, 29, 0.08);
}
.tagline {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  max-width: 11rem;
}

.progress {
  height: 6px;
  background: rgba(77, 124, 15, 0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lime-mid), var(--lime));
  border-radius: 99px;
  transition: width 0.25s ease;
}

.card {
  background: var(--card);
  border: 1px solid rgba(35, 41, 29, 0.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.card h1, .card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.card h1 { font-size: clamp(1.55rem, 5.5vw, 1.9rem); }
.card h2 { font-size: 1.25rem; }
.lead { color: var(--muted); margin: 0 0 1.25rem; }

.choices { display: grid; gap: 0.6rem; }
.choice {
  appearance: none;
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1.5px solid rgba(35, 41, 29, 0.12);
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.choice:hover, .choice:focus-visible {
  border-color: var(--lime-mid);
  outline: none;
  background: #f0f7d8;
}
.choice.selected {
  border-color: var(--green);
  background: #eaf6c4;
  box-shadow: 0 0 0 2px rgba(183, 226, 58, 0.45);
}
.choice small { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.15rem; }

.actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--ink);
  color: var(--lime);
}
.btn-primary:hover:not(:disabled) { background: var(--deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(35, 41, 29, 0.15);
  flex: 0 0 auto;
}

.field { margin-bottom: 0.9rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1.5px solid rgba(35, 41, 29, 0.15);
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.field input:focus {
  outline: none;
  border-color: var(--lime-mid);
  box-shadow: 0 0 0 3px rgba(183, 226, 58, 0.35);
}
.field .hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }
.field .err {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 0.3rem;
  display: none;
}
.field.has-error input {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.field.has-error .err { display: block; }

.form-banner {
  display: none;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger);
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
}
.form-banner.show { display: block; }

.result-pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--lime), var(--lime-mid));
  color: var(--deep);
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.lumie {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.foot {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1.25rem;
}
.foot a { color: var(--green); }

.hidden { display: none !important; }

@media (min-width: 480px) {
  .app { padding-top: 1.5rem; }
}

.hint-multi {
  font-size: 0.8rem;
  color: var(--muted);
  margin: -0.5rem 0 0.75rem;
}
.choice.multi {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}
.choice .box {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  border-radius: 4px;
  border: 1.5px solid rgba(35, 41, 29, 0.25);
  background: #fff;
  position: relative;
}
.choice.multi.selected .box {
  background: var(--green);
  border-color: var(--green);
}
.choice.multi.selected .box::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.05rem;
  width: 0.35rem;
  height: 0.65rem;
  border: solid var(--lime);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
