/* Address Validation mobile finishing layer.
   Loaded last so this page has one authoritative phone/tablet treatment. */

@media (max-width: 900px) {
  html {
    scroll-padding-top: 142px !important;
  }

  .address-case .case-content > section {
    scroll-margin-top: 142px !important;
  }

  /* The chapter rail docks beneath the homepage nav once it reaches it. */
  .address-case .section-nav {
    position: sticky !important;
    top: 76px !important;
    z-index: 990 !important;
    display: block !important;
    width: calc(100vw - 20px) !important;
    max-width: none !important;
    min-height: 52px !important;
    max-height: none !important;
    margin: 8px 0 0 calc(50% - 50vw + 10px) !important;
    padding: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 18px !important;
    background: rgba(17, 20, 16, .9) !important;
    box-shadow: 0 12px 34px rgba(17, 20, 16, .2), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
    -webkit-backdrop-filter: blur(18px) saturate(135%) !important;
    backdrop-filter: blur(18px) saturate(135%) !important;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 8px;
    scrollbar-width: none !important;
  }

  .address-case .section-nav::-webkit-scrollbar {
    display: none !important;
  }

  .address-case .section-nav > p {
    display: none !important;
  }

  .address-case .section-nav ol {
    display: flex !important;
    width: max-content !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    gap: 2px !important;
    list-style: none !important;
  }

  .address-case .section-nav li {
    flex: 0 0 auto !important;
  }

  .address-case .section-nav a {
    display: inline-flex !important;
    min-height: 40px !important;
    padding: 0 11px !important;
    align-items: center !important;
    gap: 7px !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, .62) !important;
    font-size: .88rem !important;
    font-weight: 650 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .address-case .section-nav a span {
    color: rgba(255, 255, 255, .38) !important;
    font-size: .74rem !important;
  }

  .address-case .section-nav a:hover,
  .address-case .section-nav a:focus-visible,
  .address-case .section-nav a[aria-current="location"] {
    background: rgba(63, 80, 240, .22) !important;
    color: #fff !important;
    font-weight: 800 !important;
  }

  .address-case .section-nav a[aria-current="location"] span {
    color: #aeb7ff !important;
  }

  /* The service blueprint becomes three compact steps instead of tall cards. */
  .address-case .system-map {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  .address-case .map-column,
  .address-case .map-column + .map-column,
  .address-case .rule-side,
  .address-case .recipient-side {
    min-height: 0 !important;
    padding: clamp(1.5rem, 6vw, 2rem) !important;
  }

  .address-case .map-column h3 {
    min-height: 0 !important;
    margin-bottom: 1.15rem !important;
    font-size: clamp(1.75rem, 7vw, 2.3rem) !important;
    line-height: 1.08 !important;
  }

  .address-case .map-column p,
  .address-case .rule-side p,
  .address-case .recipient-side p {
    padding: .85rem 0 !important;
    font-size: 1.04rem !important;
  }

  .address-case .case-content .map-column:not(:last-child)::after {
    top: auto !important;
    right: 50% !important;
    bottom: -22px !important;
    transform: translateX(50%) rotate(90deg) !important;
  }
}

@media (max-width: 560px) {
  html {
    scroll-padding-top: 136px !important;
  }

  .address-case .case-content > section {
    scroll-margin-top: 136px !important;
  }

  .address-case .section-nav {
    top: 74px !important;
    min-height: 50px !important;
    border-radius: 16px !important;
  }

  .address-case .section-nav a {
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: .84rem !important;
  }

  .address-case .section-nav a span {
    display: none !important;
  }

  .address-case .system-card {
    min-height: 0 !important;
  }

  .address-case .system-connector {
    min-height: 112px !important;
  }

  .address-case .hero-evidence-main img {
    min-height: 0 !important;
    aspect-ratio: 1.45 / 1;
    object-fit: contain !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .address-case .section-nav {
    scroll-behavior: auto !important;
  }
}
