@layer components {
  /* Operations admin page — live ops console for editors.
     Matches the editorial admin pattern set by review-queue.css and
     knowledge.css: serif heading at weight 400, hairline rules between
     rows, muted body for meta. Sub-section heads use small-caps muted. */

  .operations__header {
    margin-block-end: var(--space-8);
  }

  .operations__heading {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--color-ink);
    margin: 0 0 var(--space-2) 0;
  }

  .operations__lede {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-muted);
    max-width: 38rem;
    margin: 0;
  }

  .operations__category {
    margin-block-end: var(--space-10);
  }

  .operations__category-head {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--color-ink);
    margin: 0 0 var(--space-4) 0;
    padding-block-end: var(--space-2);
    border-bottom: var(--border);
  }

  .operations__lists {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
  }

  .operations__state-head {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 0 0 var(--space-3) 0;
  }

  .operations__rows {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: var(--border);
  }

  /* Failure / discarded states carry via copy ("failed (reason)",
     "didn't start"), not a colour modifier. The modifier classes are
     left on the rows for future hooks; no styles attached. */
  .operations__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    border-bottom: var(--border);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    line-height: 1.5;
  }

  .operations__row-time {
    flex: 0 0 6rem;
    font-variant-numeric: tabular-nums;
    color: var(--color-muted);
  }

  .operations__row-agent {
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 400;
    color: var(--color-ink);
    min-width: 7rem;
  }

  .operations__row-summary {
    flex: 1 1 18rem;
    min-width: 0;
    color: var(--color-muted);
  }

  .operations__row-meta {
    flex: 0 0 auto;
    color: var(--color-muted);
    font-style: italic;
  }

  @media (max-width: 32rem) {
    .operations__row {
      flex-direction: column;
      align-items: flex-start;
      gap: var(--space-1);
      padding: var(--space-3) 0;
    }

    .operations__row-time,
    .operations__row-agent,
    .operations__row-summary,
    .operations__row-meta {
      flex: 0 0 auto;
      min-width: 0;
    }
  }

  .operations__empty {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-style: italic;
    color: var(--color-muted);
    margin: 0;
    padding-block: var(--space-3);
    border-top: var(--border);
    border-bottom: var(--border);
  }

  /* Recent attempts (concurrency-discarded clicks) — visually distinct
     from the live lists. Slightly indented + a lighter category-head
     treatment so editors read it as the "your action was logged" footer
     rather than a fifth state. */
  .operations__attempts {
    margin-block-start: var(--space-8);
    padding-block-start: var(--space-6);
    border-top: var(--border);
  }

  .operations__attempts-lede {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-style: italic;
    color: var(--color-muted);
    line-height: 1.5;
    margin: 0 0 var(--space-3) 0;
    max-width: 38rem;
  }
}
