:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, sans-serif;
  color: #101d3d;
  background: #eef1f6;
  --navy: #101d3d;
  --blue: #194493;
  --red: #c51b35;
  --red-dark: #a71129;
  --paper: #fff;
  --muted: #4f5a70;
  --line: #cbd4e3;
  --light-blue: #eaf0ff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.masthead {
  background: var(--navy);
  color: var(--paper);
  border-bottom: 4px solid var(--red);
}
.masthead-inner {
  width: min(1080px, calc(100% - 64px));
  min-height: 77px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.masthead img { width: 116px; height: auto; display: block; }
.masthead span, .kicker {
  font: 700 .73rem/1.4 ui-monospace, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.layout {
  width: min(820px, calc(100% - 64px));
  margin: clamp(28px, 5vh, 60px) auto;
}
.intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(30px, 5vw, 52px);
  color: var(--paper);
  background: linear-gradient(145deg, var(--navy) 35%, #183975);
}
.kicker {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 14px;
}
.kicker::before { content: ""; width: 24px; height: 4px; background: #f54d64; }
h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -.055em;
}
.intro-copy {
  max-width: 26ch;
  margin: 16px 0 0;
  color: #e2e9f7;
  font-size: 1rem;
  line-height: 1.55;
}
.race-stripes {
  position: absolute;
  z-index: -1;
  right: -55px;
  bottom: -26px;
  width: 215px;
  height: 116px;
  transform: skewX(-32deg);
  background: linear-gradient(90deg, var(--red) 0 28%, #f5f7fc 28% 38%, #3971cf 38% 65%, transparent 65%);
}
.ballot { margin-top: 18px; }
.question-section {
  margin-top: 16px;
  padding: clamp(18px, 4vw, 36px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px #101d3d08;
}
.question-section h2 {
  margin: 0 0 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
  font-size: 1.25rem;
  letter-spacing: -.02em;
}
fieldset { margin: 24px 0 0; padding: 0; border: 0; min-inline-size: 0; }
.follow-up {
  margin-left: 14px;
  border-left: 2px solid var(--line);
  padding-left: 14px;
}
legend {
  padding: 0;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.4;
}
.optional, .instruction { color: var(--muted); font-size: .875rem; font-weight: 400; }
.instruction { margin: 6px 0 0; }
.answer {
  display: block;
  width: min(100%, 440px);
  margin-top: 9px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #8997ae;
  border-radius: 0;
  background: var(--paper);
  color: var(--navy);
  font: inherit;
}
.answer[type="number"], .answer[type="time"], .answer[name="postcode"] { width: 10rem; max-width: 100%; }
.answer[name="postcode"] { text-transform: uppercase; }
textarea.answer { width: 100%; resize: vertical; }
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: #f9faff;
  cursor: pointer;
  font-size: .96rem;
  font-weight: 650;
}
.option:hover, .option:focus-within { border-color: var(--blue); }
.option:has(:checked) { background: var(--light-blue); border-color: var(--blue); }
.option input { margin: 0; width: 18px; height: 18px; flex: none; accent-color: var(--blue); }
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 23px;
}
button {
  padding: 12px 16px;
  min-height: 48px;
  background: var(--red);
  color: var(--paper);
  border: 1px solid var(--red-dark);
  font: inherit;
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--navy);
  cursor: pointer;
}
button span { margin-inline-start: 12px; }
button:hover:not(:disabled) { background: var(--red-dark); }
button:disabled { cursor: wait; }
button:focus-visible, input:focus-visible, .answer:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
#status { margin: 0; line-height: 1.5; }
#status:empty { display: none; }
form:not([hidden]) + #status { margin-top: 20px; }
#status[data-state="success"] {
  background: var(--light-blue);
  border-left: 4px solid var(--blue);
  padding: 17px 20px;
  font-size: 1.1rem;
  font-weight: 750;
}
#status[data-state="error"] { color: var(--red-dark); }

@media (max-width: 800px) {
  .masthead-inner { width: calc(100% - 36px); min-height: 62px; }
  .masthead img { width: 96px; }
  .layout { width: calc(100% - 36px); margin: 23px auto 30px; }
  .intro { padding: 28px 20px; }
  .race-stripes { right: -62px; width: clamp(120px, 28vw, 185px); height: 70px; }
}
