/* -----------------------------------------------------------------------------
   HOMEPAGE SHELL - STATIC FRONT-PAGE LAYOUT AND STABILITY RULES
   Keeps the existing Bricks class structure but serves the layout from the
   plugin bundle so the homepage no longer depends on generated snippet CSS.
   ----------------------------------------------------------------------------- */

.home-layout,
.home-left-rail,
.home-main,
.home-top-row,
.home-headings,
.home-menu,
.home-legend,
.home-metrics,
.home-map,
.home-deep-dive,
.home-plot {
  min-width: 0;
}

.home-layout,
.home-left-rail,
.home-main,
.home-top-row {
  width: 100%;
  max-width: none;
}

.home-layout,
.home-layout :is(.brxe-heading, .brxe-text-basic, .brxe-button, h1, h2, h3, h4, h5, h6, p, a, button, label, input, select, option, textarea, li, span, strong, em, small) {
  font-family: "Poppins", "Segoe UI", sans-serif;
}

.home-layout {
  position: relative;
  overflow: clip;
  gap: 24px;
  padding: 16px;
  border: 1px solid rgba(37, 35, 40, 0.12);
  border-radius: 28px;
  background: #f4ebde;
  box-shadow: 0 18px 44px rgba(20, 33, 55, 0.1);
}

.home-layout::before,
.home-map::before,
.home-deep-dive::before,
.home-plot::before {
  content: none;
}

.home-left-rail,
.home-main,
.home-top-row {
  gap: 22px;
}

.home-headings .brxe-heading {
  margin: 0;
  font-family: "Poppins", "Segoe UI", sans-serif;
}

.home-layout .brxe-shortcode,
.home-layout .wv-insights-module,
.home-layout .wv-insights-module-map-frame,
.home-layout .wv-insights-module-scatterplot,
.home-layout .wv-insights-module-legend,
.home-layout .wv-insights-module-metrics,
.home-layout .wv-insights-module-deep-dive,
.home-layout .wv-insights-module-insights-menu,
.home-layout .wv-insights-module-footer-menu {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.home-headings,
.home-menu,
.home-legend,
.home-metrics {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(22, 107, 105, 0.14);
  border-radius: 20px;
  background: #f4ebde;
  box-shadow: 0 10px 24px rgba(20, 33, 55, 0.08);
}

.home-headings {
  display: flex;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-headings::after {
  content: "";
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: #166b69;
}

/* -----------------------------------------------------------------------------
   HEADER LOCKUP - KEEP LOGO/TITLE SCALE CONSISTENT ACROSS BREAKPOINTS
   Uses the current Bricks element IDs so the homepage override stays local.
   ----------------------------------------------------------------------------- */

.home-headings #brxe-vyimfo {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(10px, 1vw, 14px);
  min-width: 0;
}

.home-headings #brxe-ocigok {
  display: block;
  flex: 0 0 clamp(56px, 3.25rem + 1.1vw, 76px);
  width: clamp(56px, 3.25rem + 1.1vw, 76px);
  padding: 0;
}

.home-headings #brxe-ocigok .bricks-site-logo,
.home-headings #brxe-ocigok img {
  display: block;
  width: 100%;
  height: auto;
}

.home-headings .brxe-heading:last-child {
  margin: 0;
  color: #094f4b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.home-headings #brxe-ppxtzr {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  color: #444246;
  font-size: clamp(1.7rem, 1.35rem + 0.95vw, 2.45rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.8px;
  text-wrap: balance;
}

.home-menu {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #f4ebde;
  box-shadow: none;
}

.home-menu .wv-insights-menu,
.home-menu .wv-footer-menu {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
}

.home-menu .wv-insights-menu-button,
.home-menu .wv-footer-menu-button {
  color: #133e84;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-legend,
.home-metrics {
  padding: 0;
  border: 1px solid #e0aa68;
  overflow: hidden;
  background: #f4ebde;
}

.home-legend > .brxe-shortcode,
.home-metrics > .brxe-shortcode {
  width: 100%;
}

.home-legend .wv-insights-module-card,
.home-metrics .wv-insights-module-card,
.home-legend .wv-insights-module,
.home-metrics .wv-insights-module {
  margin: 0;
  padding: 11.52px;
  border-radius: inherit;
  background: #f4ebde;
}

.home-metrics .wv-insights-module-metrics.is-compact-view,
.home-legend .wv-insights-module-legend.is-compact-view {
  padding: 11.52px;
  background: #f4ebde;
}

.home-map,
.home-deep-dive,
.home-plot {
  position: relative;
}

.home-map > .brxe-shortcode,
.home-deep-dive > .brxe-shortcode,
.home-plot > .brxe-shortcode {
  position: relative;
  z-index: 1;
}

.home-map .wv-insights-module-map-frame,
.home-deep-dive .wv-insights-module,
.home-plot .wv-insights-module,
.home-legend .wv-insights-module,
.home-metrics .wv-insights-module {
  position: relative;
  z-index: 1;
}

.home-map .wv-insights-module-map-frame,
.home-map .map-container {
  min-height: var(--wv-map-height, 560px);
}

.home-plot .wv-insights-module-scatterplot,
.home-plot .scatterplot-container {
  min-height: var(--wv-scatter-height, 420px);
}

.home-deep-dive .wv-insights-module-card,
.home-deep-dive .wv-insights-module,
.home-deep-dive .wv-insights-module-deep-dive.is-compact-view {
  background: #e0aa68;
}

.home-deep-dive .wv-insights-module-deep-dive.is-compact-view .related-panel [data-wv-insights-part="related-dashboards-content"] {
  width: 100%;
}

.home-deep-dive .wv-insights-module-deep-dive.is-compact-view .dashboard-card-section,
.home-deep-dive .wv-insights-module-deep-dive.is-compact-view .dashboard-card {
  width: 100%;
  max-width: 100%;
}

.home-deep-dive h2.wv-insights-module-title.wv-insights-module-title-related-dashboards,
.home-legend .wv-insights-module-title,
.home-metrics .wv-insights-module-title,
.home-legend label.wv-insights-field-label.wv-insights-field-label-map-type,
.home-metrics label.wv-insights-field-label.wv-insights-field-label-theme,
.home-metrics label.wv-insights-field-label.wv-insights-field-label-metric,
.home-metrics label.wv-insights-field-label.wv-insights-field-label-compare-to,
.home-legend .wv-insights-bivariate-axis,
.home-legend .wv-insights-bivariate-corner,
.home-legend .wv-insights-legend-label {
  color: #252328 !important;
  font-family: "Poppins", "Segoe UI", sans-serif;
}

.home-legend label.wv-insights-field-label.wv-insights-field-label-map-type,
.home-metrics label.wv-insights-field-label.wv-insights-field-label-theme,
.home-metrics label.wv-insights-field-label.wv-insights-field-label-metric,
.home-metrics label.wv-insights-field-label.wv-insights-field-label-compare-to {
  font-size: 11px;
  line-height: 1.3;
}

.home-legend label.wv-insights-field-label.wv-insights-field-label-map-type,
.home-metrics label.wv-insights-field-label.wv-insights-field-label-theme,
.home-metrics label.wv-insights-field-label.wv-insights-field-label-metric,
.home-metrics label.wv-insights-field-label.wv-insights-field-label-compare-to,
.home-legend .wv-insights-bivariate-axis,
.home-legend .wv-insights-bivariate-corner {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.home-deep-dive .dashboard-link-button.wv-insights-dashboard-action-button {
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 700;
}

.home-legend .legend-map-type-control select,
.home-metrics select {
  font-family: "Poppins", "Segoe UI", sans-serif;
}

.home-deep-dive .wv-insights-module-deep-dive .panel-section.related-panel {
  width: 100%;
  flex: 1 1 auto;
}

@media (min-width: 1025px) {
  .home-layout {
    align-items: start !important;
  }

  .home-left-rail,
  .home-main,
  .home-top-row {
    gap: 16px;
    align-items: start !important;
    align-content: start;
  }

  .home-map,
  .home-deep-dive {
    height: 100%;
    align-self: stretch !important;
  }

  .home-map > .brxe-shortcode,
  .home-deep-dive > .brxe-shortcode {
    display: flex !important;
    height: 100% !important;
  }

  .home-map .wv-insights-module-map-frame,
  .home-deep-dive .wv-insights-module,
  .home-deep-dive .wv-insights-module-deep-dive {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    width: 100% !important;
    height: 100% !important;
    min-height: var(--wv-map-height, 560px) !important;
  }

  .home-map .map-container {
    flex: 1 1 auto;
    width: 100%;
    height: 100% !important;
    min-height: var(--wv-map-height, 560px) !important;
    max-height: none !important;
    aspect-ratio: auto !important;
  }

  .home-plot .scatterplot-container {
    width: 100%;
  }
}

@media (max-width: 1024px) and (min-width: 916px) {
  .home-top-row {
    display: contents !important;
  }

  .home-map {
    order: 1;
  }

  .home-plot {
    order: 2;
  }

  .home-deep-dive {
    order: 3;
  }
}

@media (max-width: 1099px) {
  .home-layout {
    gap: 18px;
    padding: 16px;
    border-radius: 22px;
  }

  .home-left-rail,
  .home-main,
  .home-top-row {
    gap: 18px;
  }

  .home-headings,
  .home-menu {
    padding: 0;
    border-radius: 0;
  }

  .home-legend,
  .home-metrics {
    padding: 0;
    border-radius: 18px;
  }

  .home-headings #brxe-ocigok {
    flex-basis: clamp(56px, 2.9rem + 1.8vw, 72px);
    width: clamp(56px, 2.9rem + 1.8vw, 72px);
  }

  .home-headings #brxe-ppxtzr {
    font-size: clamp(1.7rem, 1.2rem + 1.45vw, 2.25rem);
  }
}

@media (max-width: 915px) {
  .home-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
    align-items: start !important;
    align-content: start !important;
  }

  .home-left-rail,
  .home-main,
  .home-top-row {
    display: contents !important;
  }

  .home-headings {
    order: 1;
  }

  .home-menu {
    order: 2;
  }

  .home-legend {
    order: 3;
  }

  .home-map {
    order: 4;
  }

  .home-plot {
    order: 5;
  }

  .home-metrics {
    order: 6;
  }

  .home-deep-dive {
    order: 7;
  }

  .home-headings,
  .home-menu,
  .home-legend,
  .home-map,
  .home-plot,
  .home-metrics,
  .home-deep-dive {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 767px) {
  .home-headings #brxe-vyimfo {
    gap: 12px;
  }

  .home-headings #brxe-ocigok {
    flex-basis: clamp(52px, 2.6rem + 2.6vw, 64px);
    width: clamp(52px, 2.6rem + 2.6vw, 64px);
  }

  .home-headings #brxe-ppxtzr {
    font-size: clamp(1.65rem, 5.6vw, 2.1rem);
    line-height: 1.04;
  }

  .home-headings {
    padding: 0;
  }

  .home-menu .wv-insights-menu,
  .home-menu .wv-footer-menu {
    gap: 10px;
  }
}

@media (max-width: 479px) {
  .home-headings #brxe-vyimfo {
    gap: 10px;
  }

  .home-headings #brxe-ocigok {
    flex-basis: 52px;
    width: 52px;
  }

  .home-headings #brxe-ppxtzr {
    font-size: clamp(1.55rem, 6.4vw, 1.85rem);
  }
}
