.keywords {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);

  &.keywords--loading {
    display: block;

    text-align: center;

    .loading {
      margin-bottom: var(--spacing-4);
    }
  }

  /* Row: intro text. */
  .keywords__description {
    margin: 0;
    padding: 0;

    font-size: var(--font-size-1);
  }

  /* Row: keywords input. */
  .keywords__input {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);

    font-size: var(--font-size-1);
  }

  .keywords__input-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    font-weight: var(--font-weight-medium);
  }

  /* Row: rank source selector and evaluate button */
  .keywords__rank-evaluate {
    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: var(--font-size-1);
  }

  /* Row: generate content guidance button */
  .keywords__generate-guidance {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding: var(--spacing-4) 0;
  }

  /* Loading */
  .keywords__loading {
    text-align: center;
  }

  /* Evaluate results */
  .keywords__evaluate-results {
    padding: var(--spacing-4) var(--spacing-3);

    animation: var(--conductor-pop-in);

    border: var(--form-border);
    border-radius: var(--form-border-radius);

    table {
      width: 100%;
      border-spacing: 0;
      border-collapse: separate;

      line-height: var(--line-height-2);
    }

    /* Header styles */
    th {
      padding-bottom: var(--spacing-4);

      font-size: var(--font-size-2);
      font-weight: var(--font-weight-medium);
    }

    /* Body styles */
    tbody td {
      padding-bottom: var(--spacing-2);

      font-size: var(--font-size-1);
    }

    tbody tr:last-child td {
      padding-bottom: var(--spacing-4);

      border-bottom: var(--form-border);
    }

    /* Footer styles */
    tfoot {
      font-size: var(--font-size-2);
      font-weight: var(--font-weight-medium);
      line-height: var(--line-height-2);
    }

    tfoot tr:first-child td {
      padding-top: var(--spacing-4);
    }

    /* Column alignment and emphasis */
    th:first-child,
    td:first-child {
      text-align: left;
    }

    th:last-child,
    td:last-child {
      text-align: right;
    }

    th:last-child,
    tfoot td:last-child {
      font-weight: var(--font-weight-heavy);
    }
  }
}
