/**
 * ZBI Layout Decompression v2 — P2 polish (CSS only).
 * Reduces compressed hero/product layouts and widens calculator content column.
 */
:root {
  --zbi-content-readable: 960px;
  --zbi-hero-ratio-text: 1.12;
  --zbi-hero-ratio-visual: 0.88;
}

/* --- Product / FMS authority hero --- */
.authority-hero {
  padding-top: 3.35rem !important;
  padding-bottom: 2.85rem !important;
  grid-template-columns: minmax(0, var(--zbi-hero-ratio-text, 1.12fr)) minmax(0, var(--zbi-hero-ratio-visual, 0.88fr)) !important;
  gap: clamp(1.25rem, 2.5vw, 2rem) !important;
  align-items: center;
}

.authority-hero-copy {
  max-width: none;
}

.authority-hero h1 {
  max-width: 18em;
  text-wrap: balance;
}

.authority-hero .lead {
  max-width: 42em;
}

.authority-hero-panel {
  min-height: 0;
  max-height: min(420px, 52vh);
}

.authority-hero-panel .media-slot-fms,
.authority-hero-panel .hero-image-panel,
.authority-hero-panel img {
  max-height: min(400px, 50vh);
  width: 100%;
  object-fit: contain;
}

/* --- Reference / split heroes (other product landings) --- */
.hero-reference {
  padding-top: 3.25rem !important;
  padding-bottom: 2.65rem !important;
  min-height: 0 !important;
}

.hero-reference .hero-copy {
  max-width: none !important;
}

.hero-reference h1 {
  max-width: 18em;
  text-wrap: balance;
}

.hero-reference .lead {
  max-width: 42em !important;
}

.hero-split,
.zbi-hero-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr) !important;
  gap: clamp(1.25rem, 2.5vw, 2rem) !important;
}

.product-hero {
  max-width: var(--zbi-shell-max, 1180px) !important;
  padding-top: 2.75rem !important;
  padding-bottom: 1.35rem !important;
}

.product-hero h1 {
  max-width: 20em;
  margin-left: auto;
  margin-right: auto;
}

/* FMS dark-band showcase (when present) */
.fms-showcase-section .dark-band-inner {
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 460px) minmax(0, 0.95fr) !important;
  gap: 1.75rem !important;
}

.fms-showcase-section .media-slot-fms {
  max-width: 460px !important;
}

/* --- Calculator runtime: article-narrow → readable shell width --- */
.zbi-tools-wrap {
  max-width: var(--zbi-content-readable, 960px) !important;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--zbi-shell-gutter, 1.25rem);
  padding-right: var(--zbi-shell-gutter, 1.25rem);
}

.zbi-tools-chrome .zbi-tools-wrap {
  max-width: var(--zbi-content-readable, 960px) !important;
}

/* --- 1366px laptop: keep primary CTAs above fold --- */
@media (min-width: 1024px) and (max-width: 1440px) {
  .authority-hero {
    padding-top: 2.85rem !important;
    padding-bottom: 2.35rem !important;
  }

  .hero-reference {
    padding-top: 2.85rem !important;
    padding-bottom: 2.35rem !important;
  }

  .authority-hero h1 {
    font-size: clamp(2.35rem, 4.2vw, 3.65rem) !important;
    margin-bottom: 0.75rem;
  }

  .hero-reference h1 {
    font-size: clamp(2.2rem, 4vw, 3.45rem) !important;
  }

  .authority-hero-panel {
    max-height: min(360px, 46vh);
  }
}

@media (max-width: 680px) {
  .zbi-tools-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .authority-hero h1,
  .hero-reference h1 {
    max-width: none;
  }
}
