/*
 * A company's SEC filings and one filing's changes (companies/filings;
 * tasks/growth/milestones/12, D11): the red flags as a list of chips with
 * their headlines, the filing table, and a filing's changes as a list of
 * paragraphs whose word diff is <ins>/<del>.
 *
 * An insertion is underlined and a deletion struck through — the marks say
 * which is which, and the gain and loss tints only repeat them. An expired
 * flag is listed greyed, not hidden.
 */
@layer pages {
  .filings-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
  }

  .filings-page__section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .filings-page__reports {
    min-inline-size: 16rem;
    white-space: normal;
  }

  .filings-page__comparison {
    align-self: flex-start;
  }

  .flag-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: 0;
    list-style: none;
  }

  .flag-list__item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);

    & .page-meta {
      margin-block: 0;
    }

    &[data-expired] .flag-list__headline {
      color: var(--color-ink-subtle);
      font-weight: var(--weight-regular);
    }
  }

  .flag-list__headline {
    font-weight: var(--weight-semibold);
  }

  .flag-list__quote,
  .change-summary__quote {
    margin: 0;
    padding-inline-start: var(--space-sm);
    border-inline-start: var(--rule-width) solid var(--color-rule);
    font-family: var(--font-prose);
    font-style: italic;
  }

  .change-counters {
    color: var(--color-ink-subtle);
    font-size: var(--text-ui-sm);
  }

  .change-summary {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    border: var(--rule-width) solid var(--color-rule);
    border-radius: var(--radius-md);
  }

  .change-summary__findings {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding-inline-start: var(--space-md);
  }

  .change-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .change-list__filter {
    align-self: flex-start;
  }

  .change-list__items {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: 0;
    list-style: none;
  }

  .change {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding-block-start: var(--space-sm);
    border-block-start: var(--rule-width) solid var(--color-rule);
    scroll-margin-block-start: var(--navbar-height);
  }

  .change__head {
    color: var(--color-ink-subtle);
    font-size: var(--text-ui-sm);
  }

  .change__kind {
    color: var(--color-ink);
    font-weight: var(--weight-semibold);
  }

  .change__text {
    font-family: var(--font-prose);
    font-size: var(--text-prose-sm);
    line-height: var(--leading-prose-sm);

    & ins {
      background-color: var(--color-gain-tint);
      text-decoration: underline;
    }

    & del {
      background-color: var(--color-loss-tint);
      text-decoration: line-through;
    }
  }
}
