:root {
  --frost: #F3F6F8;
  --paper: #FFFFFF;
  --ink: #16202B;
  --steel: #5B6B7A;
  --rink: #DCE6EE;
  --cobalt: #2446D8;
  --cobalt-deep: #1A34A8;
  --marker: #FFD23F;
  --marker-soft: #FFF3C4;
  --alert: #B42318;
  --ok: #1E7B4E;

  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --measure: 40rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
}
img { max-width: 100%; }
a { color: var(--cobalt); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; margin: 0; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.6rem, 8vw, 4rem); }
h2 { font-size: clamp(2rem, 6vw, 2.6rem); }
h3 { font-size: 1.45rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 72rem; margin: 0 auto; padding: 0 16px; }

/* Brand bar */
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.02em;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--marker);
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; letter-spacing: 0;
}
.brand small { display: block; font-family: var(--body); font-weight: 400; font-size: 0.78rem; color: var(--steel); letter-spacing: 0; }

/* Buttons */
.btn {
  appearance: none; border: 0; cursor: pointer;
  font: 700 1.05rem/1 var(--body);
  padding: 15px 22px; border-radius: var(--r-md);
  background: var(--cobalt); color: #fff;
  min-height: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.btn:hover { background: var(--cobalt-deep); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--rink); }
.btn-quiet:hover { background: var(--paper); }
.btn-small { min-height: 38px; padding: 9px 14px; font-size: 0.92rem; }
.btn-danger { background: transparent; color: var(--alert); box-shadow: inset 0 0 0 2px #F2C9C5; }
.btn-danger:hover { background: #FDF1F0; }

/* Form fields */
label.field { display: block; margin-bottom: 26px; }
.field { margin-bottom: 26px; }
.q-label { display: block; font-weight: 700; font-size: 1.08rem; margin-bottom: 4px; }
.q-hint { display: block; color: var(--steel); font-size: 0.95rem; margin-bottom: 10px; }
.req { color: var(--cobalt); font-weight: 700; }
input[type=text], input[type=email], textarea, select {
  width: 100%;
  font: 400 1.0625rem/1.4 var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--rink);
  border-radius: var(--r-md);
  padding: 13px 14px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--cobalt); outline: none; }

/* Choice rows: the highlighter */
.choices { display: grid; gap: 8px; }
.choices.inline { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.choice {
  position: relative;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 14px;
  background: var(--paper);
  border: 2px solid var(--rink);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.choices.inline .choice { justify-content: center; text-align: center; font-weight: 700; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .tick {
  flex: 0 0 22px; height: 22px; margin-top: 1px;
  border: 2px solid var(--steel); border-radius: 5px; background: var(--paper);
  display: grid; place-items: center;
}
.choice.radio .tick { border-radius: 50%; }
.choices.inline .tick { display: none; }
.choice:has(input:checked) { background: var(--marker); border-color: var(--ink); }
.choice:has(input:checked) .tick { background: var(--ink); border-color: var(--ink); }
.choice:has(input:checked) .tick::after { content: ''; width: 10px; height: 6px; border: solid var(--marker); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.choice.radio:has(input:checked) .tick::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--marker); transform: none; }
.choice:has(input:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.other-input { margin-top: 8px; }

/* 1–5 scale */
.scale-item { padding: 18px 0 20px; border-top: 2px solid var(--rink); }
.scale-item:first-of-type { border-top: 0; padding-top: 4px; }
.scale-item .q-label { font-weight: 400; margin-bottom: 12px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale .choice { flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px 8px; text-align: center; }
.scale .choice .tick { display: none; }
.scale .num { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1; }
.scale .word { font-size: 0.72rem; line-height: 1.15; color: var(--steel); }
.scale .choice:has(input:checked) .word { color: var(--ink); }

.group-head { margin: 34px 0 18px; padding-top: 22px; border-top: 4px solid var(--ink); }
.group-head p { color: var(--steel); }

/* Messages */
.note { background: var(--paper); border-left: 5px solid var(--cobalt); padding: 16px 18px; border-radius: 0 var(--r-md) var(--r-md) 0; }
.error { color: var(--alert); font-weight: 700; }
.muted { color: var(--steel); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}
