/* COFIRING ADJUSTED COMPARISON CARDS V6 R1
   CSS-only refinement on top of V4 comparison logic + V6 compact layout.
   User-approved changes:
   1) active [혼소 조정 적용중] state becomes a clearly visible red badge;
   2) desktop cards are slightly more compact than V6;
   3) ▲/▼ delta values are slightly larger and easier to scan.
*/

/* Stronger active-state visibility. */
[data-cfv56-adjust].is-active {
  background: #fff0f0 !important;
  background-image: none !important;
  border-color: #ef7777 !important;
  color: #c73636 !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.62), 0 1px 3px rgba(190,55,55,0.08) !important;
  font-weight: 900 !important;
}

@media screen and (min-width: 901px) {
  /* One more small density step beyond V6. */
  .cfv52-summary-grid {
    gap: 7px 12px !important;
  }

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

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

  /* Header: keep the labels readable, only trim vertical space. */
  .cfv52-summary-grid > .cfv-adjustment-original-card > header,
  .cfv52-summary-grid > .cfv-adjustment-card > header {
    padding: 7px 11px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv-original-kind,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv-adjustment-kind,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv-adjustment-applied,
  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv52-card-status,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv52-card-status {
    min-height: 18px !important;
  }

  /* Ratio area: reduce whitespace, not the important large ratio value. */
  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv52-metrics,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv52-metrics {
    gap: 5px !important;
    margin-top: 5px !important;
  }

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

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv52-metric-emphasis,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv52-metric-emphasis {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  /* Fuel area. */
  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-fuels,
  .cfv52-summary-grid > .cfv-adjustment-card .cfv10-fuels {
    margin-top: 6px !important;
  }

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

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

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

  /* User request: make changed ▲/▼ figures easier to see. */
  .cfv52-summary-grid > .cfv-adjustment-card .cfv-adjustment-delta {
    margin-left: 5px !important;
    font-size: 10.5px !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
  }

  /* Original cards still keep Bio 25% / closing information, but slightly shorter. */
  .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: 5px !important;
    padding: 6px 8px !important;
  }

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

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

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-target-details {
    margin-top: 2px !important;
  }

  .cfv52-summary-grid > .cfv-adjustment-original-card .cfv10-target-details > summary {
    padding: 1px 0 !important;
  }
}
