/* Results bento (ui.results_style = "bento"; markup app/templates/_results.html, docs/ui-switches.md "Results").
   The art tile spans two rows; four centred top-glow stat cards sit 2x2 beside it. The card form is site/stat-card.css
   (the house KPI standard); this sheet adds only the grid, the before/after bar, the raw numbers and the link.
   No url(), no filter, no animation. */

.rb { display: grid; gap: 20px; }
.rb--art { grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); align-items: stretch; }

.rb__art {
  margin: 0;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--stat-line, var(--hairline, var(--border, #1C2430)));
  border-radius: 12px;
  background: var(--stat-card, var(--card, var(--surface, #0E131B)));
}
/* two classes deep: hero-media.css (.hm__poster img { height: auto }) loads after this sheet */
.rb__art .hm__poster, .rb__art .hm__poster img { display: block; width: 100%; height: 100%; }
.rb__art .hm__poster img { object-fit: cover; }

.rb__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rb--art .rb__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.rb__card { gap: 10px; min-height: 220px; padding: 24px 20px; }
.rb__card > p { margin: 0; }
.rb__value { font-size: clamp(30px, 3.2vw, 40px); }
.rb__word {
  font: 600 .45em/1 var(--stat-mono, 'JetBrains Mono', ui-monospace, monospace);
  color: var(--stat-sub);
  letter-spacing: 0;
}
.rb__bars {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 10px;
  width: min(100%, 240px);
}
.rb__k {
  font: 500 12px/1 var(--stat-mono, 'JetBrains Mono', ui-monospace, monospace);
  color: var(--stat-sub);
  text-align: start;
}
.rb__bar { display: block; width: 100%; height: 6px; overflow: visible; }
.rb__track { fill: color-mix(in oklab, var(--stat-dim) 22%, var(--stat-bg)); }
.rb__was { fill: color-mix(in oklab, var(--stat-dim) 70%, var(--stat-bg)); }
.rb__fill { fill: var(--c); }
.rb__raw {
  font: 500 13px/1.3 var(--stat-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  color: var(--stat-sub);
}
.rb__raw > span { white-space: nowrap; } /* a phone wraps at the arrow, never inside a value and its unit */
.rb__link { margin-top: auto; max-width: 100%; flex-wrap: wrap; justify-content: center; text-align: center; } /* one baseline per row; a long translation wraps inside the card */

/* Tablet: the art goes on top as a wide band, the cards stay 2x2. Phone: 2 columns of smaller cards. */
@media (max-width: 960px) {
  .rb--art { grid-template-columns: 1fr; }
  .rb__art { min-height: 0; aspect-ratio: 16 / 9; } /* cover crops the empty margin above and below the object */
}
@media (max-width: 480px) {
  .rb, .rb__grid, .rb--art .rb__grid { gap: 10px; }
  .rb__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rb__card { min-height: 0; padding: 18px 12px 12px; gap: 8px; }
  .rb__value { font-size: 26px; line-height: 1.1; }
  .rb__word { display: block; margin-top: 4px; font-size: 13px; }
  .rb__label { letter-spacing: .06em; font-size: 12px; line-height: 1.35; min-height: 2.7em; }
  .rb__raw { font-size: 13px; line-height: 1.4; }
  .rb__bars { gap: 6px 8px; }
}
@media (forced-colors: active) {
  .rb__fill { fill: Highlight; }
  .rb__was { fill: CanvasText; }
  .rb__track { fill: GrayText; }
}
