/* One shared epoch table and breakdown for Validator and Delegation. */
.epoch-rewards-table { table-layout:fixed; width:100%; }
.table-scroll > table.epoch-rewards-table { min-width:0; }
.epoch-rewards-table th { width:25%; }
.epoch-rewards-table.data th, .epoch-rewards-table.data td.num { white-space:normal; }
.epoch-rewards-table.data td { height:auto; }
.epoch-rewards-table .epoch-rewards-summary td { vertical-align:middle; }
.epoch-rewards-table .epoch-rewards-detail[hidden] { display:none; }
.epoch-rewards-help { font-size:13px; color:var(--mute); }
.epoch-rewards-breakdown { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px 84px; }
.epoch-rewards-group { min-width:0; }
.epoch-rewards-group h4 { margin:0 0 10px; font:600 11px/1.5 var(--font-b); letter-spacing:.06em; text-transform:uppercase; color:var(--mute); }
.epoch-rewards-group .vp-facts { grid-template-columns:auto minmax(0,1fr); }
.epoch-rewards-group dt { white-space:nowrap; }
.epoch-rewards-group dd { display:block; min-block-size:0; text-align:right; }
/* The same breakdown in existing expandable rows, including narrow desktop cards. */
.row-details--adaptive { container-type:inline-size; }
.row-details--adaptive .epoch-rewards-breakdown { grid-template-columns:minmax(0,1fr); gap:0; }
.row-details--adaptive .epoch-rewards-group dt { white-space:normal; }
.row-details--adaptive .epoch-rewards-group .vp-facts { grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-auto-rows:minmax(32px,auto); row-gap:0; align-items:baseline; }
.row-details--adaptive .epoch-rewards-group + .epoch-rewards-group h4 { margin-block-start:16px; }
.row-details .row-detail-group--natural .vp-facts { display:block; }
.row-detail-fact { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 16px; min-block-size:32px; }
/* Multiline prose keeps the same trailing rhythm as a one-line fact. */
.row-detail-fact--prose { padding-block-end:max(0px, calc(32px - 1lh)); }
.row-detail-fact > dt { flex:1 1 auto; white-space:normal; overflow-wrap:normal; word-break:normal; }
.row-detail-fact > dd { flex:0 0 auto; max-width:100%; margin-inline-start:auto; }
@container(min-width:760px) {
  .row-details--adaptive .epoch-rewards-breakdown { grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px 84px; }
  .row-details--adaptive .epoch-rewards-group + .epoch-rewards-group h4 { margin-block-start:0; }
}
.epoch-rewards-table [data-epoch-pending-loss] { align-items:flex-end; }
@media(max-width:640px) {
  .epoch-rewards-table, .epoch-rewards-table tbody { display:block; }
  .epoch-rewards-table thead { display:none; }
  .epoch-rewards-table .epoch-rewards-summary { display:grid; grid-template-columns:minmax(0,1fr); gap:0; padding-block:12px; }
  .epoch-rewards-table .epoch-rewards-summary td { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:baseline; min-width:0; min-block-size:32px; text-align:right; border-bottom:0; }
  .epoch-rewards-summary td::before { content:attr(data-label); display:block; text-align:left;  }
  .epoch-rewards-table .epoch-rewards-detail, .epoch-rewards-table .epoch-rewards-detail > td { display:block; }
  .epoch-rewards-breakdown { grid-template-columns:minmax(0,1fr); gap:0; }
  .epoch-rewards-group + .epoch-rewards-group h4 { margin-block-start:16px; }
  .epoch-rewards-group .vp-facts { grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-auto-rows:minmax(32px,auto); row-gap:0; align-items:baseline; }
  .epoch-rewards-group dt { white-space:normal; }
  .epoch-rewards-table .epoch-rewards-summary td:has([data-epoch-pending-loss]),
  .epoch-rewards-group .vp-facts:has([data-epoch-pending-loss]) { grid-template-columns:minmax(0,1fr) minmax(min-content,1fr); }
}

/* Public side splits use the same table with seven equal-width columns. */
.epoch-rewards-table--sides th { width:auto; }
