/* FB Stats — extras (round 5, track D): the new Facebook data (web/extras.js).
 * Only classes prefixed x-; colours are the role tokens of styles.css, so light and dark follow.
 * No :hover rules (touch first), no animation (nothing to respect for reduced motion). */

/* Three figures in a row (video card, ad card). */
.x-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3, 12px); }
.x-stat { min-width: 0; }
.x-stat-value { font-size: var(--fs-xl, 18px); font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.x-stat-label { color: var(--text-secondary); font-size: var(--fs-sm, 12px); }
.x-stat-sub { margin-top: 2px; color: var(--text-muted); font-size: var(--fs-xs, 11px); overflow-wrap: anywhere; }

/* Watch depth: label · bar · share. */
.x-ret-head { margin: var(--s-4, 16px) 0 var(--s-2, 8px); color: var(--text-secondary); font-size: var(--fs-sm, 12px); font-weight: 600; }
.x-retention { display: grid; gap: 6px; }
.x-ret-row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) 3.5em; gap: var(--s-2, 8px); align-items: center; font-size: var(--fs-md, 13px); }
.x-ret-label { color: var(--text-secondary); white-space: nowrap; }
.x-ret-track { position: relative; height: 8px; border-radius: var(--r-pill, 999px); background: var(--hover); overflow: hidden; }
.x-ret-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--series-1); }
.x-ret-value { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Wide cards (desktop, tablet, landscape): figures and bars side by side, bars not stretched. */
@media (min-width: 900px) {
  .x-video { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s-6, 24px); align-items: start; }
  .x-video .x-ret-head { margin-top: 0; }
  .x-retention { max-width: 560px; }
}
.detail-section .x-video { display: block; }      /* the ad card is narrow at any width */
.detail-section .x-ret-head { margin-top: var(--s-4, 16px); }

.x-note { margin-top: var(--s-3, 12px); }
.x-video-card .card-body { min-width: 0; }

/* Ad card: the three rankings. */
.x-quality .badge { white-space: normal; text-align: left; }

/* Badge «качество ▼» on ad rows. */
.x-qmark { white-space: nowrap; }

/* Opportunity score in the accounts table. */
.x-score { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--tone-ink, var(--text)); }

@media (max-width: 360px) {
  .x-stats { gap: var(--s-2, 8px); }
  .x-stat-value { font-size: var(--fs-lg, 16px); }
  .x-ret-row { grid-template-columns: 4em minmax(0, 1fr) 3em; }
}
