.button,
.next-link,
.card-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--black);
  padding: 0.75rem 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: color 200ms ease-out, background-color 200ms ease-out;
}

.button {
  align-self: flex-start;
  background: var(--red);
  color: var(--black);
}

.button:hover,
.button:focus-visible {
  background: var(--black);
  color: var(--white);
}

.button-blue {
  background: var(--blue);
  color: var(--white);
}

.card,
.question-card,
.term-card {
  min-width: 0;
  border-right: var(--rule);
  border-bottom: var(--rule);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--white);
}

.card h3,
.question-card h3,
.term-card h3 {
  margin-bottom: 0.75rem;
}

.card p:last-child,
.question-card p:last-child,
.term-card p:last-child {
  margin-bottom: 0;
}

.card-link {
  width: 100%;
  min-height: 56px;
  justify-content: space-between;
  margin-top: 1.5rem;
  background: var(--yellow);
  color: var(--black);
}

.card-link:hover,
.card-link:focus-visible,
.next-link:hover,
.next-link:focus-visible {
  background: var(--blue);
  color: var(--white);
}

.red-block {
  background: var(--red);
  color: var(--black);
}

.blue-block {
  background: var(--blue);
  color: var(--white);
}

.yellow-block {
  background: var(--yellow);
  color: var(--black);
}

.black-block {
  background: var(--black);
  color: var(--white);
}

.callout {
  position: relative;
  max-width: 64ch;
  border: var(--rule);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--yellow);
}

.callout::before {
  position: absolute;
  width: 28px;
  height: 28px;
  top: -4px;
  right: -4px;
  border-bottom: var(--rule);
  border-left: var(--rule);
  background: var(--red);
  content: "";
}

.checklist {
  margin-bottom: 0;
  padding-left: 1.35rem;
}

.checklist li + li {
  margin-top: 1rem;
}

.note-lines {
  border: var(--rule);
}

.note-row {
  min-height: 86px;
  padding: 1.25rem;
  border-bottom: 2px solid var(--black);
}

.note-row:last-child {
  border-bottom: 0;
}

.next-step {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(220px, 4fr);
  align-items: stretch;
  border: var(--rule);
}

.next-step-copy {
  padding: clamp(1.5rem, 4vw, 3rem);
}

.next-link {
  min-height: 120px;
  border: 0;
  border-left: var(--rule);
  background: var(--red);
  color: var(--black);
  text-align: center;
}

.footnotes {
  border-top: var(--rule);
  padding-block: 2.5rem;
}

.footnotes ol {
  margin-bottom: 0;
  padding-left: 1.5rem;
}

.footnotes li + li {
  margin-top: 1rem;
}

.footnotes a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--blue);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-underline-offset: 4px;
}

.source-mark {
  color: var(--blue);
  vertical-align: middle;
}

.source-mark a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-underline-offset: 4px;
}

.glossary-tools {
  border: var(--rule);
  padding: 1.25rem;
  background: var(--yellow);
}

.glossary-tools label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.glossary-input {
  width: 100%;
  min-height: 52px;
  border: 3px solid var(--black);
  border-radius: 0;
  padding: 0.65rem 0.75rem;
  background: var(--white);
  color: var(--black);
}

.glossary-input:focus,
a:focus-visible,
button:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 3px;
}

.filter-status {
  min-height: 28px;
  margin: 0.5rem 0 0;
}

@media (max-width: 767px) {
  .next-step {
    grid-template-columns: 1fr;
  }

  .next-link {
    border-top: var(--rule);
    border-left: 0;
  }
}
