/* ==========================================================================
 * ZQM Bearings -- PDP v7.1 Universal Smart Module 02 Balancing Engine
 * Laser 0.0px Vertical Plumb-Line Alignment across 01 / 02 / 03 / 04
 * Scope: Strictly activated ONLY when body.zqm-v7-smart-m02 is present.
 * Zero touch to existing zqm-iso-pro-cad.v45.css or 8 frozen core pages.
 * ========================================================================== */

@media (min-width: 1024px) {
  /* Laser 54fr | 16px | 46fr master split on BOTH Top Split & Bottom Perf Grid */
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 #zqm-p6-split,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid {
    grid-template-columns: minmax(0, 54fr) minmax(0, 46fr) !important;
    gap: 16px !important;
  }

  /* Unified 20px left plumb-line across ALL group headers (.zqm-sg-hd) AND parameter names (th.zqm-col-param) */
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-dossier-d4 .zqm-sg-hd {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack th.zqm-col-param,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid th.zqm-col-param {
    padding-left: 20px !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack td.zqm-col-sym,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid td.zqm-col-sym {
    width: 76px !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack td.zqm-col-val,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid td.zqm-col-val {
    width: 134px !important;
    padding-right: 20px !important;
  }

  /* Left stack: proportional height stretch so left panel matches 2D Blueprint with 0px dead void */
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack > .zqm-sg-card {
    flex: var(--v7-card-grow, 1) 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack .zqm-sg-dual {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack .zqm-sg-half {
    flex: var(--v7-half-grow, 1) 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack .zqm-sg-half.zqm-v7-empty-r {
    display: none !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack .zqm-sg-tbl {
    flex: 1 1 auto !important;
    height: 100% !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack .zqm-sg-empty-row {
    display: none !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack > .zqm-sg-card:last-child .zqm-sg-half--r .zqm-sg-tbl tbody tr.zqm-v7-last-vis th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack > .zqm-sg-card:last-child .zqm-sg-half--r .zqm-sg-tbl tbody tr.zqm-v7-last-vis td,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack > .zqm-sg-card:last-child .zqm-sg-dual.zqm-v7-no-r .zqm-sg-half--l .zqm-sg-tbl tbody tr.zqm-v7-last-vis th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack > .zqm-sg-card:last-child .zqm-sg-dual.zqm-v7-no-r .zqm-sg-half--l .zqm-sg-tbl tbody tr.zqm-v7-last-vis td {
    border-bottom: 0 !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack .zqm-sg-dual.zqm-v7-no-r .zqm-sg-half--l .zqm-sg-tbl tbody tr:last-child th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack .zqm-sg-dual.zqm-v7-no-r .zqm-sg-half--l .zqm-sg-tbl tbody tr:last-child td {
    border-bottom: 0 !important;
  }

  /* Compact density mode when left stack holds 9+ rows (e.g. LM277149DA) or static 7+ rows (GE100ES-2RS) */
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 #zqm-p6-left.zqm-v7-compact table.zqm-sg-tbl tbody tr {
    height: 36px !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 #zqm-p6-left.zqm-v7-compact table.zqm-sg-tbl tbody th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 #zqm-p6-left.zqm-v7-compact table.zqm-sg-tbl tbody td,
  html body.zqm-p6-live.zqm-v7-smart-m02 #zqm-p6-left.zqm-p6-left--static.zqm-v7-compact table tbody th,
  html body.zqm-p6-live.zqm-v7-smart-m02 #zqm-p6-left.zqm-p6-left--static.zqm-v7-compact table tbody td {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    line-height: 1.32 !important;
  }

  /* Lock non-spanning perf cards to single column (overrides any legacy odd3 :last-child rules) */
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) {
    grid-column: auto !important;
  }

  /* --- Full-Width 2-Column Smart Span Card (.zqm-v7-span-full) with 0.0px Laser Plumb-Line Alignment! ---
   * Outer W = 1200 -> inner = 1198. Top/Bottom seam center = 1 + (W - 16)*0.54 + 8 = 647.36px.
   * Left half width = calc((100% - 14px) * 0.54 + 7px) puts border-right at EXACT 647.36px (Delta = 0.0px!).
   * Left half col-val gets +9px right padding (143px / 29px) so col-sym & col-val align 0.0px with 01 & 03!
   * Right half col-param gets +9px left padding (29px) so right labels align 0.0px with 04!
   */
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full {
    grid-column: 1 / -1 !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual:not(.zqm-sg-dual--single):not(.zqm-v7-no-r) {
    display: grid !important;
    grid-template-columns: calc((100% - 14px) * 0.54 + 7px) minmax(0, 1fr) !important;
    gap: 0 !important;
    align-items: stretch !important;
    flex: 1 1 auto !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-half {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual:not(.zqm-sg-dual--single):not(.zqm-v7-no-r) .zqm-sg-half--l {
    border-right: 1px solid #e5ebf2 !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual:not(.zqm-sg-dual--single):not(.zqm-v7-no-r) .zqm-sg-half--l td.zqm-col-val {
    width: 142px !important;
    padding-right: 28px !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual:not(.zqm-sg-dual--single):not(.zqm-v7-no-r) .zqm-sg-half--r th.zqm-col-param {
    padding-left: 29px !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-tbl {
    height: 100% !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual:not(.zqm-sg-dual--single):not(.zqm-v7-no-r) .zqm-sg-half--l .zqm-sg-tbl tbody tr:last-child th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual:not(.zqm-sg-dual--single):not(.zqm-v7-no-r) .zqm-sg-half--l .zqm-sg-tbl tbody tr:last-child td,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual:not(.zqm-sg-dual--single):not(.zqm-v7-no-r) .zqm-sg-half--r .zqm-sg-tbl tbody tr:last-child th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual:not(.zqm-sg-dual--single):not(.zqm-v7-no-r) .zqm-sg-half--r .zqm-sg-tbl tbody tr:last-child td {
    border-bottom: 0 !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-empty-row {
    display: table-row !important;
    pointer-events: none !important;
    cursor: default !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-empty-row th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-empty-row td {
    background: #ffffff !important;
    border-bottom: 0 !important;
  }

  /* Paired 54fr | 46fr Bottom Cards (Zero Dead Void!) */
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-empty-row {
    display: none !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-dual {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-half {
    flex: var(--v7-half-grow, 1) 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-half.zqm-v7-empty-r {
    display: none !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-tbl {
    flex: 1 1 auto !important;
    height: 100% !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-half--r .zqm-sg-tbl tbody tr.zqm-v7-last-vis th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-half--r .zqm-sg-tbl tbody tr.zqm-v7-last-vis td,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-dual.zqm-v7-no-r .zqm-sg-half--l .zqm-sg-tbl tbody tr.zqm-v7-last-vis th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-dual.zqm-v7-no-r .zqm-sg-half--l .zqm-sg-tbl tbody tr.zqm-v7-last-vis td {
    border-bottom: 0 !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-dual.zqm-v7-no-r .zqm-sg-half--l .zqm-sg-tbl tbody tr:last-child th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card:not(.zqm-v7-span-full) .zqm-sg-dual.zqm-v7-no-r .zqm-sg-half--l .zqm-sg-tbl tbody tr:last-child td {
    border-bottom: 0 !important;
  }

  /* Static-Table Flex Chain */
  html body.zqm-p6-live.zqm-v7-smart-m02 #zqm-p6-left.zqm-p6-left--static {
    display: flex !important;
    flex-direction: column !important;
  }
  html body.zqm-p6-live.zqm-v7-smart-m02 #zqm-p6-left.zqm-p6-left--static > .zqm-table-card,
  html body.zqm-p6-live.zqm-v7-smart-m02 #zqm-p6-left.zqm-p6-left--static > figure.wp-block-table,
  html body.zqm-p6-live.zqm-v7-smart-m02 #zqm-p6-left.zqm-p6-left--static > .zqm-table-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
  }
  html body.zqm-p6-live.zqm-v7-smart-m02 #zqm-p6-left.zqm-p6-left--static .zqm-table-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  html body.zqm-p6-live.zqm-v7-smart-m02 #zqm-p6-left.zqm-p6-left--static table {
    flex: 1 1 auto !important;
    height: 100% !important;
    margin: 0 !important;
  }
  html body.zqm-p6-live.zqm-v7-smart-m02 #zqm-p6-left.zqm-p6-left--static table tbody tr:last-child th,
  html body.zqm-p6-live.zqm-v7-smart-m02 #zqm-p6-left.zqm-p6-left--static table tbody tr:last-child td {
    border-bottom: 0 !important;
  }
}

html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-tbl tbody tr.zqm-p6-hl-row {
  cursor: pointer !important;
  transition: background-color .13s ease !important;
}
html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-tbl tbody tr.zqm-p6-hl-row:hover th,
html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-tbl tbody tr.zqm-p6-hl-row:hover td,
html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-tbl tbody tr.zqm-p6-hl-row.is-p6-lit th,
html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-tbl tbody tr.zqm-p6-hl-row.is-p6-lit td {
  background: #f1f5f9 !important;
  box-shadow: none !important;
}
html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-tbl tbody tr.zqm-p6-hl-row.is-p6-lit th {
  color: #0f1d30 !important;
}

.zqm-v7-static-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px 0;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1023px) {
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-geo-stack .zqm-sg-empty-row,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-empty-row {
    display: none !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full {
    grid-column: auto !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual {
    display: block !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-half--l {
    border-right: 0 !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual:not(.zqm-v7-no-r) .zqm-sg-half--l .zqm-sg-tbl tbody tr:last-child th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-sg-card.zqm-v7-span-full .zqm-sg-dual:not(.zqm-v7-no-r) .zqm-sg-half--l .zqm-sg-tbl tbody tr:last-child td {
    border-bottom: 1px solid #e5ebf2 !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-sg-half.zqm-v7-empty-r {
    display: none !important;
  }
}

/* v7.1.1 static-compact-polish */
@media (min-width: 1024px) {
  #zqm-p6-left.zqm-p6-left--static.zqm-v7-compact table.zqm-sg-tbl thead th {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
  #zqm-p6-left.zqm-p6-left--static.zqm-v7-compact table.zqm-sg-tbl tbody tr {
    height: 36px !important;
  }
  #zqm-p6-left.zqm-p6-left--static.zqm-v7-compact table.zqm-sg-tbl tbody th,
  #zqm-p6-left.zqm-p6-left--static.zqm-v7-compact table.zqm-sg-tbl tbody td {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    line-height: 1.28 !important;
  }
  #zqm-p6-left.zqm-p6-left--static.zqm-v7-compact .zqm-table-foot {
    padding: 8px 18px !important;
    font-size: 11.5px !important;
    line-height: 1.4 !important;
  }
}

/* v7.2 unbroken-16px-channel */
@media (min-width: 1024px) {
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-v7-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    min-width: 0 !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-v7-col > .zqm-sg-card {
    flex: var(--v7-card-grow, 1) 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 1px solid #d5dde7 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card.zqm-v7-card-compact table.zqm-sg-tbl tbody tr {
    height: 36px !important;
  }
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card.zqm-v7-card-compact table.zqm-sg-tbl tbody th,
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid .zqm-sg-card.zqm-v7-card-compact table.zqm-sg-tbl tbody td {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    line-height: 1.32 !important;
  }
}
@media (max-width: 1023px) {
  html body.zqm-p6-live.zqm-pdp-v25.zqm-v7-smart-m02 .zqm-p6-perf-grid > .zqm-v7-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }
}
