  /* ---------- Heads Up brand variables ---------- */
  #heads-up-map-shell {
    --hu-dark-teal: #183f42;
    --hu-dark-green: #0c7750;
    --hu-light-green: #7db744;
    --hu-light-green-2: #a4cf4d;
    --hu-light-green-3: #b6d55f;
    --hu-gold: #d3a74f;
    --hu-linen: #f9efe8;
    --hu-charcoal: #292b2b;
    --hu-white: #ffffff;

    position: relative;
    width: 100%;
    height: 650px;
    min-height: 650px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--hu-dark-teal);
    font-family: inherit;
    isolation: isolate;
  }

  #heads-up-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  /* ---------- Category filters ---------- */
  .hu-map-filters {
    position: absolute;
    z-index: 5;
    top: 18px;
    left: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 110px);
    padding: 10px;
    border: 1px solid rgba(182, 213, 95, 0.35);
    border-radius: 999px;
    background: rgba(24, 63, 66, 0.92);
    box-shadow:
      0 8px 20px rgba(24, 63, 66, 0.22),
      0 0 12px rgba(164, 207, 77, 0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .hu-filter-label {
    margin: 0 4px 0 6px;
    color: var(--hu-linen);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .hu-filter-option {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    user-select: none;
  }

  .hu-filter-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .hu-filter-option span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 13px 6px 7px;
    border: 1px solid rgba(249, 239, 232, 0.34);
    border-radius: 999px;
    color: var(--hu-linen);
    background: rgba(249, 239, 232, 0.07);
    font-size: 13px;
    font-weight: 750;
    line-height: 1;
    transition: 160ms ease;
  }

  .hu-filter-icon {
    display: block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    box-sizing: border-box;
    border-radius: 999px;
    object-fit: contain;
  }

  /* Trial shield on a Linen badge. */
  .hu-filter-option input[value="trial"] + span .hu-filter-icon {
    padding: 2px;
    border: 1px solid rgba(24, 63, 66, 0.22);
    background: #F9EFE8;
  }

  /* Testimonial icon on a Dark Teal badge. */
  .hu-filter-option input[value="testimonial"] + span .hu-filter-icon {
    padding: 3px;
    border: 1px solid rgba(249, 239, 232, 0.32);
    background: #183F42;
  }

  /* The filter-specific video image already contains its gold circle. */
  .hu-filter-option input[value="video"] + span .hu-filter-icon {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .hu-filter-option input:checked + span {
    border-color: var(--hu-light-green-3);
    color: var(--hu-dark-teal);
    background: var(--hu-light-green-2);
    box-shadow: 0 0 16px rgba(164, 207, 77, 0.25);
  }

  .hu-filter-option input:focus-visible + span {
    outline: 3px solid rgba(249, 239, 232, 0.7);
    outline-offset: 2px;
  }

  /* ---------- Loading/error notice ---------- */
  .hu-map-notice {
    position: absolute;
    z-index: 8;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    max-width: calc(100% - 36px);
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--hu-linen);
    background: rgba(41, 43, 43, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    font-size: 14px;
    text-align: center;
  }

  .hu-map-notice[hidden] {
    display: none !important;
  }

  /* ---------- Custom map card ---------- */
  .hu-map-dimmer {
    position: absolute;
    z-index: 6;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(24, 63, 66, 0.2);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    cursor: default;
  }

  .hu-map-dimmer[hidden] {
    display: none !important;
  }

  .hu-detail-card {
    position: absolute;
    z-index: 7;
    top: 28px;
    left: 50%;
    width: min(800px, calc(100% - 48px));
    max-height: calc(100% - 56px);
    overflow: auto;
    transform: translateX(-50%);
    border: 1px solid rgba(182, 213, 95, 0.48);
    border-top: 5px solid var(--hu-light-green-2);
    border-radius: 18px;
    color: var(--hu-linen);
    background:
      linear-gradient(145deg, rgba(24, 63, 66, 0.985), rgba(12, 119, 80, 0.965));
    box-shadow:
      0 26px 70px rgba(0, 0, 0, 0.52),
      0 0 38px rgba(164, 207, 77, 0.4),
      0 0 80px rgba(125, 183, 68, 0.18);
    scrollbar-color: var(--hu-light-green-2) rgba(249, 239, 232, 0.12);
    scrollbar-width: thin;
  }

  .hu-detail-card[hidden] {
    display: none !important;
  }

  .hu-card-inner {
    position: relative;
    padding: 28px;
  }

  .hu-card-close {
    position: sticky;
    z-index: 2;
    top: 0;
    float: right;
    width: 40px;
    height: 40px;
    margin: -12px -12px 4px 14px;
    border: 1px solid rgba(249, 239, 232, 0.45);
    border-radius: 999px;
    color: var(--hu-linen);
    background: rgba(41, 43, 43, 0.7);
    cursor: pointer;
    font: inherit;
    font-size: 27px;
    font-weight: 400;
    line-height: 35px;
    text-align: center;
    transition: 160ms ease;
  }

  .hu-card-close:hover,
  .hu-card-close:focus-visible {
    color: var(--hu-dark-teal);
    background: var(--hu-light-green-2);
    outline: none;
  }

  .hu-card-kicker {
    margin: 0 0 8px;
    color: var(--hu-light-green-3);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .hu-card-title {
    margin: 0;
    color: var(--hu-linen);
    font-size: clamp(25px, 3.5vw, 42px);
    font-weight: 850;
    line-height: 1.06;
    letter-spacing: -0.025em;
  }

  .hu-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 10px;
    margin-top: 10px;
    color: rgba(249, 239, 232, 0.84);
    font-size: 14px;
    font-weight: 650;
  }


  .hu-card-media {
    display: grid;
    gap: 14px;
    margin-top: 22px;
  }

  .hu-card-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(55vh, 470px);
    object-fit: contain;
    border: 1px solid rgba(249, 239, 232, 0.2);
    border-radius: 13px;
    background: rgba(7, 42, 44, 0.52);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  }

  .hu-card-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(249, 239, 232, 0.2);
    border-radius: 13px;
    background: #071f21;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  }

  .hu-card-video-frame iframe,
  .hu-card-video-frame video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
  }

  .hu-card-copy {
    margin-top: 22px;
    color: var(--hu-linen);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.55;
  }

  .hu-card-copy.hu-testimonial-copy {
    font-style: italic;
  }

  .hu-card-attribution {
    margin-top: 16px;
    color: var(--hu-light-green-3);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.4;
  }

  .hu-card-video-link {
    display: inline-flex;
    align-items: center;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--hu-dark-teal) !important;
    background: var(--hu-gold);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none !important;
  }

  .hu-card-video-link:hover,
  .hu-card-video-link:focus-visible {
    filter: brightness(1.06);
    outline: 3px solid rgba(249, 239, 232, 0.64);
    outline-offset: 2px;
  }

  /* Keep Mapbox controls visually compatible with the brand. */
  #heads-up-map-shell .mapboxgl-ctrl-group {
    overflow: hidden;
    border: 1px solid rgba(24, 63, 66, 0.2);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  }

  @media (max-width: 767px) {
    #heads-up-map-shell {
      height: 600px;
      min-height: 600px;
      border-radius: 12px;
    }

    .hu-map-filters {
      top: 10px;
      left: 10px;
      right: 58px;
      max-width: none;
      gap: 6px;
      padding: 8px;
      border-radius: 14px;
    }

    .hu-filter-label {
      width: 100%;
      margin: 0 4px 2px;
      font-size: 10px;
    }

    .hu-filter-option span {
      min-height: 31px;
      padding: 6px 10px;
      font-size: 12px;
    }

    .hu-detail-card {
      top: 12px;
      width: calc(100% - 24px);
      max-height: calc(100% - 24px);
      border-radius: 14px;
    }

    .hu-card-inner {
      padding: 20px;
    }

    .hu-card-close {
      width: 38px;
      height: 38px;
      margin: -8px -8px 4px 10px;
    }


    .hu-card-image {
      max-height: 48vh;
    }
  }
