.checklist {
  padding: 32px 16px;

  & .__hero, & form, & .__selection, & .__success { max-width: 1120px; }

  & .__hero {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 16px 32px;
    padding: 0 0 24px;
    border: 0;
    border-radius: 0;
    background: transparent;

    & > img { width: 140px; grid-column: 1 / -1; }
    & > div {
      grid-column: 1;
      align-self: end;
      max-width: 64ch;
      margin-top: 0;

      & h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 36px); }
    }
    & .__clerk {
      align-self: end;
      color: var(--soft);
      font-size: 14px;

      & label { font-size: inherit; font-weight: 400; }
      & #checklist-clerk {
        padding: 8px 10px; border-radius: var(--r) 0 0 6px;
        background: transparent; color: var(--ink);
      }
      & button {
        flex-basis: 40px; padding: 8px; border-radius: 0 6px 6px 0;
        background: transparent; color: var(--soft); font-weight: 600;

        &:focus-visible { outline: 3px solid var(--magenta); }
      }
    }
  }

  & .__eyebrow { font-size: 13px; font-weight: 600; }

  & .__selection {
    margin: 24px auto;
    padding: 0 24px;
    border: 1px solid var(--line);
    border-radius: var(--r);

    & > a {
      padding: 20px 0;
      border-bottom: 1px solid var(--line);

      &:last-child { border-bottom: 0; }
      &:hover { background: var(--pale); }
      &:focus-visible { outline: 3px solid var(--magenta); }
    }
    & h2 { margin-bottom: 4px; font-size: 24px; }
  }

  & form { gap: 24px; padding: 0 0 32px; }
  & form > section {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--r);

    & > h2 {
      margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
      color: var(--blue); font-size: 26px;
    }
  }
  & .__fields {
    gap: 20px 24px;
    align-items: start;

    & > fieldset {
      min-width: 0; margin: 0; grid-column: auto;

      &:has(.__choices > label:nth-child(3)), &.--wide { grid-column: 1 / -1; }
    }
    &:has(> .__upload:nth-child(3)) {
      grid-template-columns: repeat(6, minmax(0, 1fr));

      & > .__upload { grid-column: span 2; }
    }
  }
  & label, & legend { font-size: 16px; font-weight: 500; }

  & input:not([type="radio"]):not([type="checkbox"]):not([type="file"]), & select, & textarea {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: var(--r);
    background: var(--surface);

    &:focus { outline: 3px solid var(--magenta); outline-offset: 2px; box-shadow: none; }
    &[aria-invalid="true"] { border-color: #a32929; }
  }
  & textarea { height: 96px; min-height: 96px; }
  & input:is([type="radio"], [type="checkbox"]) { accent-color: var(--blue); }
  & .__choices {
    gap: 8px;

    & span { min-width: 80px; padding: 10px 16px; border-radius: var(--r); background: var(--surface); text-align: center; }
    & input:focus-visible + span { outline: 3px solid var(--magenta); }
  }
  & fieldset .__fields { padding: 16px; border-radius: var(--r); }
  & .__hint, & .__error { font-size: 15px; }
  & .__upload { min-height: 120px; border-radius: var(--r); }
  & .__upload input:focus-visible ~ span { outline: 3px solid var(--magenta); }
  & .__upload > span:last-of-type { border-radius: var(--r); font-size: 15px; }

  & .__submit {
    gap: 24px;
    margin-top: 0;
    padding: 24px;
    border: 0;
    border-radius: var(--r);
    background: var(--surface);

    & h2 { margin: 0 0 8px; font-size: 28px; }
    & .__privacy { font-size: 15px; }
    & > .btn { flex-shrink: 0; }
  }
  &:has(> .__success) { display: grid; place-items: center; }

  & .__success {
    max-width: 720px;
    padding: 32px;
    border: 0;
    border-top: 4px solid var(--blue);
    border-radius: var(--r);
    background: var(--surface);
    text-align: center;

    & > img { width: 160px; margin-bottom: 24px; }
    & > span {
      margin: 0 auto 20px;
      background: color-mix(in srgb, var(--success, #16803c) 10%, white);
      color: var(--success, #16803c);
    }
    & h1 { font-size: 36px; }
    & > p:last-of-type { margin: 0 auto 24px; }
  }

  @media (max-width: 700px) {
    padding-block: 16px;

    & form { gap: 16px; }
    & form > section, & .__submit, & .__success { padding: 20px; }
    & .__hero { grid-template-columns: 1fr; gap: 16px; }
    & .__hero .__clerk { max-width: 220px; }
    & .__fields:has(> .__upload:nth-child(3)) {
      grid-template-columns: 1fr;

      & > .__upload { grid-column: auto; }
    }
    & .__submit button { justify-content: center; }
  }
}
