/* V5 disclosure alignment: leave V1–V4 and existing handlers untouched.
   Card (not toolbar) positions the bookmark and programme icons. */
body[data-design-edition="v5"] #results>.result .result-toggle-row,
body[data-design-edition="v5"] #results>.result .result-toggle-row:has(.result-details-toggle[aria-expanded="true"]){
  position:static!important;
  z-index:auto;
  justify-content:flex-start!important;
}
/* Review status belongs in the bottom disclosure line, not with the icons. */
body[data-design-edition="v5"] #results>.result .result-toggle-row:has(.result-details-toggle){
  display:flex;
  align-items:center;
  justify-content:space-between!important;
  flex-wrap:nowrap!important;
  gap:6px;
  width:100%;
  min-width:0;
}
body[data-design-edition="v5"] #results>.result .result-toggle-row .result-details-toggle{
  flex:0 1 auto;
  min-width:0;
}
body[data-design-edition="v5"] #results>.result .result-toggle-row>.review-badge{
  position:static!important;
  inset:auto!important;
  display:inline-flex!important;
  align-items:center;
  justify-content:flex-end;
  flex:0 0 auto!important;
  align-self:center!important;
  order:2;
  gap:5px;
  width:auto!important;
  max-width:none!important;
  min-height:0!important;
  height:auto!important;
  margin:0 0 0 auto!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#625b6b!important;
  font-size:0!important;
  font-weight:500;
  line-height:1.3;
  white-space:nowrap!important;
  overflow:visible;
  text-align:right;
  pointer-events:none;
}
body[data-design-edition="v5"] #results>.result .result-toggle-row>.review-badge::before{
  content:"";
  display:block;
  flex:0 0 7px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#d18e36;
}
body[data-design-edition="v5"] #results>.result .result-toggle-row>.review-badge.review-ok::before{background:#32916b}
body[data-design-edition="v5"] #results>.result .result-toggle-row>.review-badge.review-pending::after{
  content:"Noch nicht geprüft";
  font-size:11px;
}
body[data-design-edition="v5"] #results>.result .result-toggle-row>.review-badge.review-ok::after{
  content:"Geprüft";
  font-size:11px;
}
body[data-design-edition="v5"] #results>.result .chips>.review-badge{visibility:hidden}
@media(max-width:700px){
  body[data-design-edition="v5"] #results>.result .result-toggle-row:has(.result-details-toggle){gap:4px}
  body[data-design-edition="v5"] #results>.result .result-toggle-row .result-details-toggle::after{font-size:11px}
  body[data-design-edition="v5"] #results>.result .result-toggle-row>.review-badge::after{font-size:10px!important}
}
@media(max-width:330px){
  body[data-design-edition="v5"] #results>.result .result-toggle-row>.review-badge{
    flex:0 1 74px!important;
    max-width:74px!important;
    min-width:0!important;
    white-space:normal!important;
    line-height:1.15;
  }
  body[data-design-edition="v5"] #results>.result .result-toggle-row>.review-badge::after{
    display:block;
    min-width:0;
    white-space:normal!important;
    overflow-wrap:anywhere;
  }
}

/* Shared, fixed first column: previously each overview row had 84/76px of
   right padding and a percentage column, unlike the expanded details. That
   made values start at different x positions on desktop. */
body[data-design-edition="v5"] #results>.result{--v5-information-label:136px}
body[data-design-edition="v5"] #results>.result .meta-epoch,
body[data-design-edition="v5"] #results>.result .meta-ensemble,
body[data-design-edition="v5"] #results>.result .chips>.chip-difficulty,
body[data-design-edition="v5"] #results>.result .chips>.chip-duration,
body[data-design-edition="v5"] #results>.result .result-details-content .detail-item,
body[data-design-edition="v5"] #results>.result .result-details .detail-item{
  grid-template-columns:minmax(0,var(--v5-information-label)) minmax(0,1fr);
  column-gap:10px;
  padding-right:2px;
  width:100%;
  min-width:0;
}
/* Only the first row needs room for upper-right icons. Keep its line full width
   and its label/value start unchanged by padding just the final column. */
body[data-design-edition="v5"] #results>.result .meta-epoch{padding-right:52px}
body[data-design-edition="v5"] #results>.result .result-details-content .detail-grid,
body[data-design-edition="v5"] #results>.result .result-details .detail-grid{
  display:block;
  margin:0;
}
@media(max-width:700px){
  body[data-design-edition="v5"] #results>.result{--v5-information-label:108px}
  /* The four overview rows and detail rows all stay side-by-side on phones. */
  body[data-design-edition="v5"] #results>.result .meta-epoch,
  body[data-design-edition="v5"] #results>.result .meta-ensemble,
  body[data-design-edition="v5"] #results>.result .chips>.chip-difficulty,
  body[data-design-edition="v5"] #results>.result .chips>.chip-duration,
  body[data-design-edition="v5"] #results>.result .result-details-content .detail-item,
  body[data-design-edition="v5"] #results>.result .result-details .detail-item{
    display:grid;
    grid-template-columns:minmax(0,var(--v5-information-label)) minmax(0,1fr);
    column-gap:9px;
    padding-right:2px;
  }
  body[data-design-edition="v5"] #results>.result .meta-epoch{padding-right:38px}
}
