.mad-lab-page {
  --mad-accent: #214ecd;
  background: #fff;
}

.mad-lab-hero {
  position: relative;
  min-height: 460px;
  height: 75vh;
  overflow: hidden;
  background: #071225;
}

.mad-lab-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(6, 16, 42, 0.84) 0%, rgba(6, 16, 42, 0.62) 38%, rgba(6, 16, 42, 0.2) 68%, rgba(6, 16, 42, 0) 100%),
    linear-gradient(180deg, rgba(6, 16, 42, 0.12) 0%, rgba(6, 16, 42, 0.44) 100%);
  pointer-events: none;
}

.mad-lab-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
}

.mad-lab-hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: 4rem;
}

.mad-lab-eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  color: var(--mad-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mad-lab-hero .mad-lab-eyebrow {
  color: rgba(255, 255, 255, 0.86);
}

.mad-lab-hero h1 {
  max-width: 10ch;
  margin: 0;
  color: #fff;
  font-size: var(--fs-h1);
  line-height: 0.96;
  letter-spacing: 0;
}

.mad-lab-hero .hero-title-accent {
  color: inherit;
}

.mad-lab-hero p {
  max-width: 48ch;
  margin: 1.35rem 0 1.65rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.mad-lab-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
}

.mad-lab-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.mad-lab-intro {
  padding: var(--site-section-gap) 0;
}

.mad-lab-intro__grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.mad-lab-intro h2,
.mad-lab-locator h2 {
  margin: 0;
  color: #121212;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.mad-lab-intro__copy p {
  margin: 0;
  color: #4d5563;
  line-height: 1.8;
}

.mad-lab-intro__copy p + p {
  margin-top: 1rem;
}

.mad-lab-locator {
  padding: var(--site-section-gap) 0;
  background: #f5f7fb;
}

.mad-lab-locator__heading {
  max-width: 760px;
}

.mad-lab-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  margin-top: 2rem;
}

.mad-lab-search {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 0.8rem;
  padding: 0 1rem;
  border: 1px solid #dce3ee;
  background: #fff;
}

.mad-lab-search:focus-within {
  border-color: var(--mad-accent);
  box-shadow: 0 0 0 3px rgba(33, 78, 205, 0.1);
}

.mad-lab-search svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  fill: var(--mad-accent);
}

.mad-lab-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #121212;
  font: inherit;
}

.mad-lab-search input::placeholder {
  color: #7b8390;
}

.mad-lab-geolocate {
  min-height: 54px;
  white-space: nowrap;
}

.mad-lab-status {
  min-height: 1.5rem;
  margin: 0.8rem 0 0;
  color: #4d5563;
  font-size: 0.9rem;
}

.mad-lab-locator__layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.36fr) minmax(0, 0.64fr);
  min-height: 680px;
  margin-top: 1rem;
  border: 1px solid #dce3ee;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 42, 76, 0.08);
}

.mad-lab-results {
  min-width: 0;
  border-right: 1px solid #dce3ee;
  background: #fff;
}

.mad-lab-results__header {
  display: flex;
  min-height: 64px;
  align-items: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid #e7ebf2;
  color: #121212;
}

.mad-lab-results__list {
  max-height: 616px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mad-lab-result {
  display: block;
  width: 100%;
  padding: 1.1rem 1.25rem;
  border: 0;
  border-bottom: 1px solid #e7ebf2;
  background: #fff;
  color: #263244;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.mad-lab-result:hover,
.mad-lab-result:focus-visible {
  outline: 0;
  background: #f5f8ff;
}

.mad-lab-result.is-active {
  background: #eef3ff;
  box-shadow: inset 4px 0 0 var(--mad-accent);
}

.mad-lab-result strong,
.mad-lab-result span {
  display: block;
}

.mad-lab-result strong {
  color: var(--mad-accent);
  font-size: 0.98rem;
  line-height: 1.35;
}

.mad-lab-result span {
  margin-top: 0.35rem;
  color: #606875;
  font-size: 0.88rem;
  line-height: 1.5;
}

.mad-lab-empty {
  margin: 0;
  padding: 2rem 1.25rem;
  color: #606875;
}

.mad-lab-map-shell {
  position: relative;
  min-width: 0;
  min-height: 680px;
}

.mad-lab-map {
  width: 100%;
  height: 100%;
  min-height: 680px;
  background: #e9eef6;
}

.mad-lab-map-error {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 2rem;
  background: #eef2f8;
  color: #263244;
  text-align: center;
}

.mad-lab-map-error[hidden] {
  display: none;
}

.mad-lab-map-error p {
  margin: 0.5rem 0 0;
}

.mad-lab-marker {
  display: block;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--mad-accent);
  box-shadow: 0 2px 9px rgba(12, 31, 76, 0.38);
}

.mad-lab-popup {
  min-width: 220px;
  color: #263244;
  line-height: 1.5;
}

.mad-lab-popup strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--mad-accent);
  font-size: 1rem;
}

.mad-lab-popup p {
  margin: 0.2rem 0;
}

.mad-lab-popup__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  margin-top: 0.7rem;
}

.mad-lab-popup a {
  color: var(--mad-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.mad-lab-product-link {
  padding: var(--site-section-gap) 0;
}

.mad-lab-product-link__card {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  overflow: hidden;
  background: var(--mad-accent);
  color: #fff;
  text-decoration: none;
}

.mad-lab-product-link__card small,
.mad-lab-product-link__card strong {
  display: block;
  color: #fff;
}

.mad-lab-product-link__card small {
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mad-lab-product-link__card strong {
  max-width: 22ch;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.mad-lab-product-link__arrow {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 1.5rem;
  transition: background-color 160ms ease, color 160ms ease;
}

.mad-lab-product-link__card:hover .mad-lab-product-link__arrow,
.mad-lab-product-link__card:focus-visible .mad-lab-product-link__arrow {
  background: #fff;
  color: var(--mad-accent);
}

@media (max-width: 1024px) {
  .mad-lab-locator__layout {
    grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  }
}

@media (max-width: 768px) {
  .mad-lab-hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
    padding: 3rem 0;
  }

  .mad-lab-hero__inner {
    grid-template-columns: 1fr;
  }

  .mad-lab-hero__copy {
    width: 100%;
  }

  .mad-lab-hero__media {
    height: clamp(270px, 72vw, 360px);
  }

  .mad-lab-hero h1,
  .mad-lab-hero .mad-lab-eyebrow {
    color: var(--mad-accent);
  }

  .mad-lab-hero p {
    color: #354158;
  }

  body.mad-lab-page .mobile-hero .mad-lab-hero__media img {
    object-fit: cover !important;
    transform: none !important;
  }

  .mad-lab-hero h1 {
    font-size: var(--fs-h1);
  }

  .mad-lab-intro__grid,
  .mad-lab-toolbar,
  .mad-lab-locator__layout {
    grid-template-columns: 1fr;
  }

  .mad-lab-intro__grid {
    gap: 2rem;
  }

  .mad-lab-geolocate {
    width: 100%;
  }

  .mad-lab-locator__layout {
    min-height: 0;
  }

  .mad-lab-map-shell {
    min-height: 430px;
    order: -1;
  }

  .mad-lab-map {
    min-height: 430px;
  }

  .mad-lab-results {
    border-top: 1px solid #dce3ee;
    border-right: 0;
  }

  .mad-lab-results__list {
    max-height: 560px;
  }

  .mad-lab-product-link__card {
    min-height: 170px;
    padding: 2rem 1.5rem;
  }

  .mad-lab-product-link__card strong {
    font-size: 2rem;
  }

  .mad-lab-product-link__arrow {
    width: 48px;
    height: 48px;
  }
}
