@layer components {
  /* A course's result: how it went under the course's name and what to do next, who sat it, each answer against the
     right one, and the signature that keeps it. */
  .attempt .page-header__actions {
    align-items: start;
    flex-direction: column;
    font-size: var(--text-row);
    gap: var(--block-space);
    margin-block-start: var(--inline-space-half);
  }

  /* Passed or not, and beside it what passing takes, under it when there is no room. */
  .attempt__verdict {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--inline-space-half) var(--inline-space);
  }

  .attempt__mark {
    color: var(--color-meta);
  }

  .attempt__next {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    font-size: var(--text-control);
    gap: var(--inline-space-double);

    .btn--plain {
      --btn-icon-size: 1.1em;
    }
  }

  .attempt__aside {
    color: var(--color-meta);
  }

  /* A section's name over its answers. */
  .attempt .attempt__group {
    font-size: var(--text-control);
    font-weight: 700;
    margin: var(--block-space) 0 0;
  }

  .attempt__answers {
    display: flex;
    flex-direction: column;
    gap: var(--block-space-half);
    list-style: none;
    margin: 0;
    padding: 0;
  }

  /* A tick or a cross on the question's first line, the answer given under it and, when it was wrong, the right one in green. */
  .attempt__answer {
    align-items: start;
    display: flex;
    font-size: var(--text-row);
    gap: 0.6em;
  }

  /* Kept in colour on paper, where backgrounds are left out, so a wrong answer still prints its cross. */
  .attempt__tick {
    --icon-size: 0.75em;

    -webkit-print-color-adjust: exact;
    block-size: 1.15em;
    border-radius: 20%;
    display: grid;
    flex: none;
    inline-size: 1.15em;
    margin-block-start: calc((1lh - 1.15em) / 2);
    place-content: center;
    print-color-adjust: exact;
  }

  .attempt__tick--right {
    border: 1.5px solid var(--color-success-button);
    color: var(--color-success-text);
  }

  .attempt__tick--wrong {
    background-color: var(--color-error-button);
    color: var(--color-ink-inverted);
  }

  .attempt__answer-body {
    display: flex;
    flex-direction: column;
    min-inline-size: 0;
    overflow-wrap: anywhere;
  }

  .attempt__choice {
    color: var(--color-meta);
    font-size: var(--text-control);
  }

  .attempt__right {
    color: var(--color-success-text);
  }

  /* That it stays as sent, in a short measure under the rest. */
  .attempt > .record-page__meta {
    max-inline-size: 40rem;
  }

  /* What was signed, in a quiet card: each label over its value on a phone, beside it from 640px. */
  .attempt__signature .details {
    background-color: var(--color-meta-fill);
    border-radius: var(--radius-lg);
    inline-size: fit-content;
    max-inline-size: 100%;
    padding: var(--block-space) var(--inline-space-double);

    @media (min-width: 640px) {
      .details__row {
        column-gap: var(--inline-space-double);
        grid-template-columns: 10rem minmax(0, 1fr);
      }
    }
  }
}
