@layer components {
  /* « Rattrape-moi »: the banner takes its own place above the composer and slides up from behind it. */
  .recap-banner {
    flex: none; position: relative; z-index: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
    margin: 0 var(--gutter) 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface); box-shadow: var(--shadow-xs); animation: recap-rise-in 200ms var(--ease-out) both;
  }
  .recap-banner[hidden] { display: none; }
  .recap-banner[data-state=leaving] { animation: recap-rise-out 200ms ease-in both; }
  .recap-banner-text { flex: 1 1 14em; min-width: 0; margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
  .recap-banner-text strong { font-weight: 600; }
  .recap-banner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-left: auto; }
  /* The composer paints over the banner while it slides. */
  .recap-banner ~ .composer { position: relative; z-index: 1; background: var(--background); }
  @keyframes recap-rise-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes recap-rise-out { from { transform: none; opacity: 1; } to { transform: translateY(14px); opacity: 0; } }
  @media (prefers-reduced-motion: reduce) {
    .recap-banner, .recap-banner[data-state=leaving] { animation: none; }
  }
  /* Under the thumb: the text first, the actions on their own line, 44 px to touch. */
  @media (max-width: 1099px) {
    .recap-banner { padding: 8px 8px 8px 12px; }
    .recap-banner-text { flex-basis: 100%; }
    .recap-banner-actions { flex: 1 1 100%; margin-left: 0; }
    .recap-banner-close { margin-left: auto; }
    .recap-banner .button { min-height: var(--tap); }
  }

  /* The range menu: a little wider than the others, a count at each line's end. */
  .recap-menu-host { display: contents; }
  .recap-menu-host .menu:not(.menu--inline) { width: 300px; }
  .recap-menu-host .menu-label { display: flex; flex-direction: column; }
  .recap-menu-host .menu-hint { display: block; color: var(--muted-foreground); font-size: 13px; font-weight: 400; }
  .recap-menu-host .menu-trailing { font-variant-numeric: tabular-nums; text-align: right; }
  .menu-note {
    display: flex; align-items: flex-start; gap: 8px; padding: 8px 8px 6px; color: var(--muted-foreground);
    font-size: 13px; line-height: 1.4;
  }
  .menu-note svg { flex: none; margin-top: 2px; }
  .recap-since { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 2px 8px 8px; }
  .recap-since-field { flex: 1 1 12em; min-width: 0; height: 32px; }
  .menu-group[hidden] { display: none; }
  @media (max-width: 1099px) {
    .recap-since-field { height: var(--tap); }
    .recap-since .button { min-height: var(--tap); }
  }
}
