:root {
  --navy: #1b2f5e;
  --header: #172e60;
  --body: #3b4668;
  --bg: #f9fafc;
  --line: #e2e4ea;
  --field-line: #c9cfdc;
  --tint: #eef1f8;
  font-family: "Mulish", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--body);
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(100% - 48px, 820px); margin-inline: auto; }

/* Header */
.site-header { background: var(--header); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.brand { display: block; height: 40px; width: auto; }
.menu {
  display: grid; align-content: center; gap: 3px;
  width: 26px; height: 24px; padding: 0 6px;
  border-radius: 4px; background: #e6e9f0;
}
.menu i { display: block; height: 2px; background: var(--header); border-radius: 1px; }

/* Card */
.card {
  margin-top: 36px;
  padding: 28px 32px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(23, 46, 96, 0.08), 0 8px 24px rgba(23, 46, 96, 0.08);
}
.step { animation: step-in 200ms cubic-bezier(0.2, 0, 0, 1); }
@keyframes step-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .step { animation: none; } }

h1 {
  margin: 0 0 0.75rem;
  max-width: 24ch;
  color: var(--navy);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 800;
  line-height: 1.15;
}
h1:focus { outline: none; }
.card p { margin: 0 0 0.75rem; font-size: 1rem; line-height: 1.4; max-width: 60ch; }
.hint { margin-bottom: 1.25rem !important; font-size: 0.95rem !important; }

/* Options: real radios and checkboxes, styled as cards */
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 1.25rem; }
.hint + .options { margin-top: 0; }
.option {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 64px; padding: 12px 14px 22px;
  background: #fcfcfc;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--navy);
  font-size: 1.05rem; font-weight: 600; text-align: center;
  cursor: pointer;
  transition: border-color 150ms, background-color 150ms;
}
.option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.option:hover { border-color: var(--field-line); }
.option:has(input:checked) { background: var(--tint); border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.option:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 2px; }
.key {
  position: absolute; left: 8px; bottom: 6px;
  display: grid; place-items: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: #ebedf2; color: #6b7388;
  font-size: 0.62rem; font-weight: 700;
}
.option:has(input:checked) .key { background: var(--navy); color: #fff; }

/* Text fields */
.fields { display: grid; gap: 12px; margin-top: 1.25rem; }
.hint + .fields { margin-top: 0; }
.fields.two { grid-template-columns: 1fr 1fr; }
.field {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--field-line); border-radius: 4px;
  background: #fff; color: var(--navy);
  font: inherit; font-size: 1rem;
}
.field::placeholder { color: #8a92a6; }
.field:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; }
.back, .next { font: inherit; cursor: pointer; border-radius: 4px; transition: opacity 150ms, background-color 150ms, scale 100ms; }
.back {
  width: 40px; height: 36px;
  border: 1px solid var(--field-line); background: #fff; color: var(--navy);
  font-size: 1.05rem;
}
.next { padding: 9px 18px; border: 0; background: var(--navy); color: #fff; font-size: 1rem; font-weight: 600; }
.next:hover:not(:disabled) { background: #243a70; }
.back:active:not(:disabled), .next:active:not(:disabled) { scale: 0.97; }
.back:disabled, .next:disabled { opacity: 0.4; cursor: default; }
.back:focus-visible, .next:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Start over: a small link under the card, handy for jumping back during the demo */
.restart {
  display: block; margin: 16px auto 32px; padding: 4px 8px;
  border: 0; border-radius: 4px; background: none;
  color: hsla(225, 12%, 60%, 1); font: inherit; font-size: 0.75rem;
  text-decoration: none; cursor: pointer;
}
.restart[hidden] { display: none; }
.restart:hover { color: var(--navy); }
.restart:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

@media (max-width: 520px) {
  .card { padding: 22px 20px; }
  .options, .fields.two { grid-template-columns: 1fr; }
}
