:root {
  --red: #bf2e1b;
  --red-dark: #9c2414;
  --red-tint: #fdf1ee;
  --orange: #f8981d;
  --ink: #131a2b;
  --body: #3d4759;
  --muted: #5b6577;
  --line: #cfd5df;
  --bg: #eef1f6;
  --card: #ffffff;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 4px solid var(--orange);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}
.logo { height: 60px; width: auto; display: block; }
.header-tag { font-weight: 600; font-size: 15px; color: var(--muted); }

/* Intro */
h1 {
  color: var(--ink);
  font-size: 30px;
  line-height: 1.15;
  margin: 28px 0 14px;
  letter-spacing: -0.01em;
}
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 18px;
}
.tags li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.intro { margin: 0 0 14px; }

.notice {
  background: #fff;
  border-left: 4px solid var(--red);
  padding: 14px 16px;
  border-radius: 8px;
}

/* Question cards */
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 20px 16px 18px;
  margin: 18px 0;
  border: 2px solid transparent;
  box-shadow: 0 1px 2px rgba(19, 26, 43, 0.06);
}
.card.invalid { border-color: var(--red); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; width: 100%; }

.eyebrow {
  display: block;
  color: var(--red);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.optional {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.q-text {
  display: block;
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
}
.hint { margin: 6px 0 12px; font-size: 16px; color: var(--muted); }

/* Option rows: the whole row is the tap target */
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  margin-top: 8px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.option input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin: 0;
  border: 2px solid #7b8596;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-content: center;
}
.option input[type="radio"] { border-radius: 50%; }
.option input[type="checkbox"] { border-radius: 6px; }
.option input[type="radio"]::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  transform: scale(0);
}
.option input[type="checkbox"]::before {
  content: "";
  width: 14px;
  height: 8px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg) translate(1px, -2px) scale(0);
}
.option input:checked { border-color: var(--red); }
.option input[type="checkbox"]:checked { background: var(--red); }
.option input[type="radio"]:checked::before { transform: scale(1); }
.option input[type="checkbox"]:checked::before { transform: rotate(-45deg) translate(1px, -2px) scale(1); }

.option:has(input:checked) {
  border-color: var(--red);
  background: var(--red-tint);
  font-weight: 600;
}
.option:has(input:focus-visible),
.scale label:has(input:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.option:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}
.option:has(input:disabled) input { cursor: not-allowed; }

/* 1 to 5 scale */
.scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.scale label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 60px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scale input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.scale label:has(input:checked) {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  margin: 6px 2px 4px;
  font-size: 15px;
  color: var(--muted);
}

/* Text fields */
.text-field {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 13px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 17px; /* 16px+ stops iOS zooming on focus */
}
input.text-field { min-height: 52px; }
textarea.text-field { min-height: 130px; resize: vertical; }
.text-field:focus { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.text-field::placeholder { color: #7b8596; }

.counter { margin: 12px 2px 0; font-size: 16px; font-weight: 600; color: var(--muted); }
.counter.full { color: var(--red); }

.q-error { margin: 12px 2px 0; color: var(--red-dark); font-size: 16px; font-weight: 700; }

/* Submit */
.form-error {
  background: #fff;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--red-dark);
  font-weight: 700;
}
.submit {
  display: block;
  width: 100%;
  min-height: 60px;
  margin-top: 22px;
  border: 0;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}
.submit:hover { background: var(--red-dark); }
.submit:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.submit:disabled { opacity: 0.6; cursor: progress; }
.under-button { text-align: center; font-size: 15px; color: var(--muted); margin: 12px 0 48px; }

/* Honeypot: hidden from people, visible to form-filling bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Thank-you screen */
.thanks {
  min-height: calc(100vh - 90px);
  min-height: calc(100dvh - 90px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 40px;
  padding-bottom: 80px;
  outline: none;
}
.thanks .tick { color: var(--red); }
.thanks h1 { font-size: 32px; margin: 18px 0 16px; }
.thanks p { font-size: 19px; max-width: 22em; margin: 0 0 18px; }
.thanks .pass-on { font-size: 17px; }

@media (min-width: 640px) {
  .logo { height: 72px; }
  h1 { font-size: 36px; margin-top: 40px; }
  .card { padding: 26px 24px 24px; }
}

@media (prefers-reduced-motion: no-preference) {
  .option, .scale label, .submit { transition: background-color 0.12s, border-color 0.12s; }
}
