/* COFIRING ADJUSTED COMPARISON CARDS V6 R2
   CSS-only refinement on top of published V4 + V6 + V6 R1.
   User-approved preview:
   - Bio/organic blend-rate subcards use label + value + delta on one horizontal line.
   - Coal/Bio/organic/manure usage boxes use label + value + delta on one horizontal line.
   - Important values become larger while the four-card desktop layout becomes slightly shorter.
   - R1 red active-state badge, original closing area, orange adjusted cards and adjusted deadline removal are preserved.
*/

@media screen and (min-width: 901px) {
  /* Final small density step: the row layout itself saves height. */
  .cfv52-summary-grid {
    gap: 5px 10px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-card {
    margin-top: 12px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-card::before {
    top: -13px !important;
    height: 12px !important;
    font-size: 8.8px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card > header,
  .cfv52-summary-grid > .cfv-adjustment-card > header {
    padding: 6px 10px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv52-metrics,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv52-metrics {
    gap: 4px !important;
    margin-top: 4px !important;
  }

  /* Keep the large total ratio as the visual anchor. */
  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv52-metric-emphasis,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv52-metric-emphasis {
    padding: 7px 8px !important;
  }

  /* Bio / organic+manure ratio: label + value + delta on one line. */
  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv52-metric:not(.cfv52-metric-emphasis),
  .cfv52-summary-grid > .cfv-adjustment-card .cfv52-metric:not(.cfv52-metric-emphasis) {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 30px !important;
    padding: 4px 8px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv52-metric:not(.cfv52-metric-emphasis) > span,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv52-metric:not(.cfv52-metric-emphasis) > span {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 10.5px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv52-metric:not(.cfv52-metric-emphasis) > strong,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv52-metric:not(.cfv52-metric-emphasis) > strong {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: baseline !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    margin: 0 !important;
    font-size: 15.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* Fuel usage: label + main value + optional delta on one line. */
  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-fuels,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv10-fuels {
    margin-top: 5px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-fuels-head,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv10-fuels-head {
    margin-bottom: 3px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-fuel-grid,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv10-fuel-grid {
    gap: 4px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-fuel,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv10-fuel {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 7px !important;
    min-height: 29px !important;
    padding: 4px 7px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-fuel-label,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv10-fuel-label {
    flex: 0 0 auto !important;
    margin: 0 !important;
    font-size: 10.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-fuel-value,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv10-fuel-value {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: baseline !important;
    gap: 3px !important;
    margin: 0 0 0 auto !important;
    font-size: 15.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-fuel-value small,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv10-fuel-value small {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  /* Keep ▲/▼ changes clearly larger than labels and visually attached to the adjusted value. */
  .cfv52-summary-grid > .cfv-adjustment-card .cfv-adjustment-delta {
    flex: 0 0 auto !important;
    margin-left: 5px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* Original cards still keep Bio 25% / closing information. Only trim spare space. */
  .cfv52-summary-grid > .cfv-adjustment-original-card [data-cfv6-target],
  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv8-deadline-target,
  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-target {
    margin-top: 4px !important;
    padding: 5px 7px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-target-head {
    margin-bottom: 1px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-target-main {
    gap: 4px !important;
  }
}
