/* In-house routes component partial. Also enqueued with this media query:
   neither these rules nor the responsive adapter change production desktop. */
@media (max-width: 1199.98px) {
    .hb-routes[data-hb-routes] {
        --hb-map-inset: 12px;
        --hb-header-h: 88px;
        padding: 0;
        width: 100%;
        max-width: none;
    }
    .hb-routes [hidden] { display: none !important; }
    .hb-routes[data-hb-routes] .hb-routes__intro { margin: 0 0 28px; font-size: 18px; line-height: 1.7; }
    .hb-routes__intro:empty { display: none; }
    .hb-routes__layout { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
    .hb-routes__sidebar { gap: 0; margin-top: 28px; min-width: 0; }
    .hb-routes__sidebar:has(.hb-routes__summary-card[hidden]) { display: none; }
    .hb-routes__picker-card {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 20px;
        padding: 16px 20px;
        margin-bottom: 20px;
    }
    .hb-routes__label { font-size: 13px; line-height: 1.3; margin: 0; }
    .hb-routes__select-wrap { min-width: 0; }
    .hb-routes__select-wrap > span { font: 14px / 1 "Inter", sans-serif; }
    .hb-routes__select { height: 48px; min-height: 48px; padding: 0 44px 0 16px; }
    .hb-routes__select:focus-visible,
    .hb-routes .hb-route-desc-toggle:focus-visible,
    .hb-routes[data-hb-routes] .hb-route-card a:focus-visible,
    .hb-routes .hb-route-card button:focus-visible,
    .hb-routes .hb-locate:focus-visible,
    .hb-routes .leaflet-control-zoom a:focus-visible {
        outline: 3px solid #0d72ab;
        outline-offset: 2px;
    }
    .hb-routes__map-card {
        position: relative;
        top: auto;
        width: 100%;
        height: auto;
        min-height: 240px;
        border: 0;
        aspect-ratio: auto;
    }
    .hb-routes__map-card.has-route {
        aspect-ratio: 1 / 1;
        min-height: 300px;
        max-height: min(680px, calc(100vh - var(--hb-header-h) - 120px));
        max-height: min(680px, calc(100svh - var(--hb-header-h) - 120px));
    }
    .hb-routes__map { font-size: 16px; line-height: 1.6; text-wrap: balance; }
    .hb-routes__map:not(.leaflet-container) { color: white; }
    .hb-routes__map.leaflet-container { background: #17171a; }
    .hb-routes__map:focus-visible { outline: 3px solid #0d72ab; outline-offset: -3px; }
    .hb-route-placeholder {
        position: absolute;
        z-index: 1100;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: #17171a;
        color: white;
        font: 16px / 1.6 "Inter", sans-serif;
        text-align: center;
    }
    .hb-route-placeholder__text { max-width: 34ch; text-wrap: balance; }
    .hb-routes__map-card:not(.has-route) .leaflet-control-container,
    .hb-routes__map-card:not(.has-route) .leaflet-map-pane { visibility: hidden; }
    /* Preserve the duplicate caption in the accessibility tree. */
    .hb-routes .hb-routes__map-message {
        position: absolute !important;
        width: 1px; height: 1px;
        padding: 0; margin: -1px;
        overflow: hidden; clip: rect(0, 0, 0, 0);
        white-space: nowrap; border: 0;
    }
    .hb-routes__marker {
        background: none;
        border: 0;
        box-shadow: none;
        font-size: 13px;
    }
    .hb-routes__marker span {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px; height: 32px;
        border: 3px solid white;
        border-radius: 50%;
        background: #c3d600;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
    }
    .hb-routes__marker.is-selected span {
        width: 40px; height: 40px;
        background: #1c1c1a;
        color: #c3d600;
        font-size: 15px;
        box-shadow: 0 0 0 4px rgba(195, 214, 0, .5);
    }
    .hb-routes .leaflet-marker-icon:focus-visible { outline: 3px solid white; outline-offset: 0; border-radius: 50%; }
    .hb-routes .leaflet-top .leaflet-control { margin-left: var(--hb-map-inset); margin-top: var(--hb-map-inset); }
    .hb-routes .leaflet-control-zoom { overflow: visible; }
    .hb-routes[data-hb-routes] .leaflet-control-zoom a {
        width: 44px; height: 44px;
        line-height: 44px;
        font-family: "Inter", sans-serif;
        color: #414042;
        background: white;
    }
    .hb-routes .leaflet-control-zoom a:first-child { border-radius: 11px 11px 0 0; border-bottom: 1px solid #ececec; }
    .hb-routes .leaflet-control-zoom a:last-child { border-radius: 0 0 11px 11px; }
    .hb-routes .leaflet-control-zoom a.leaflet-disabled { color: #a3a39d; }
    .hb-routes .leaflet-top .hb-locate-control { margin-top: 10px; }
    .hb-routes .hb-locate {
        display: flex; align-items: center; justify-content: center;
        width: 44px; height: 44px;
        padding: 0; border: 0; border-radius: 11px;
        background: white; color: #414042;
        box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
    }
    .hb-locate[aria-busy="true"], .hb-locate.is-active { color: #0d72ab; }
    .hb-locate[aria-busy="true"] circle:first-child { stroke-dasharray: 3 3; }
    .hb-locate[aria-busy="true"] circle:nth-child(2) { visibility: hidden; }
    .hb-routes__map.has-card .leaflet-bottom { bottom: var(--hb-card-offset); }
    .hb-routes .hb-map-status {
        position: absolute; z-index: 900;
        top: var(--hb-map-inset); left: calc(var(--hb-map-inset) + 54px); right: var(--hb-map-inset);
        display: flex; align-items: center; justify-content: center;
        min-height: 44px; padding: 11px 16px; margin: 0;
        border-radius: 11px; background: white; color: #33332f;
        box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
        font: 600 14px / 1.4 "Inter", sans-serif;
    }
    .hb-routes .hb-route-card {
        position: absolute; z-index: 900;
        left: var(--hb-map-inset); bottom: var(--hb-map-inset);
        width: min(420px, calc(100% - 2 * var(--hb-map-inset)));
        display: grid; grid-template-columns: 136px minmax(0, 1fr);
        min-height: 156px; padding: 0;
        overflow: hidden; border-radius: 18px; background: white;
        box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .28);
        font-family: "Inter", sans-serif;
        text-align: left;
    }
    .hb-route-card__photo { position: relative; background: #1f1f1d; }
    .hb-route-card__photo.is-empty { background: #edece8; }
    .hb-routes[data-hb-routes] .hb-route-card__photo img {
        position: absolute; inset: 0;
        width: 100%; height: 100%; max-width: none;
        margin: 0; border-radius: 0; object-fit: contain;
    }
    .hb-route-card__num {
        position: absolute; top: 10px; left: 10px;
        display: flex; align-items: center; justify-content: center;
        width: 30px; height: 30px; border: 2px solid white; border-radius: 50%;
        background: #c3d600; color: #3a3a38;
        font: 700 13px / 1 "Space Mono", monospace;
    }
    .hb-route-card__body { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px; }
    .hb-routes[data-hb-routes] p.hb-route-card__kicker {
        margin: 0; padding-right: 34px;
        color: #0d72ab; font: 700 11px / 1.45 "Space Mono", monospace;
        letter-spacing: .08em; text-transform: uppercase;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .hb-routes[data-hb-routes] h2.hb-route-card__title {
        margin: 4px 0 0; padding-right: 34px;
        font: 700 20px / 1.25 "Inter", sans-serif; letter-spacing: -.01em;
        text-wrap: balance; overflow-wrap: anywhere;
    }
    .hb-routes[data-hb-routes] .hb-route-card__title a {
        display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
        overflow: hidden; color: #0d72ab;
        text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
    }
    .hb-routes[data-hb-routes] p.hb-route-card__artist { margin: 2px 0 0; color: #6a6a64; font: 14px / 1.45 "Inter", sans-serif; overflow-wrap: anywhere; }
    /* At 320px (or enlarged text), wrap rather than shrinking touch targets. */
    .hb-route-card__controls { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
    .hb-route-card__nav { display: flex; gap: 6px; }
    .hb-route-card button {
        display: flex; align-items: center; justify-content: center;
        flex: 0 0 auto; width: 44px; height: 44px;
        padding: 0; cursor: pointer; transition: color .18s ease, background .18s ease;
    }
    .hb-route-card__prev, .hb-route-card__next { border: 1px solid #e2e2df; border-radius: 11px; background: white; color: #414042; font: 15px / 1 "Inter", sans-serif; }
    .hb-route-card button[aria-disabled="true"] { color: #a3a39d; border-color: #ececec; cursor: default; }
    .hb-route-card__audio { margin-left: auto; border: 0; border-radius: 50%; background: #0d72ab; color: white; }
    .hb-route-card__audio svg { width: 20px; height: 20px; }
    .hb-route-card__close { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; }
    .hb-route-card__close span { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #ededed; color: #0d72ab; font: 600 18px / 1 "Inter", sans-serif; }
    .hb-routes .hb-route-card__close:focus-visible { outline-offset: -2px; border-radius: 50%; }
    .hb-routes__summary-card { display: flex; flex-direction: column; padding: 28px; scroll-margin-top: calc(var(--hb-header-h) + 16px); }
    .hb-routes[data-hb-routes] p.hb-routes__summary-kicker { margin: 0; font-size: 20px; line-height: 1.2; gap: 10px; }
    .hb-routes__summary-kicker::before { width: 18px; border-width: 2.5px; background: radial-gradient(circle, currentColor 0 3px, transparent 3px); }
    .hb-routes .hb-routes__summary-card [data-hb-routes-title] { margin: 14px 0 0 !important; font-size: 26px; text-wrap: balance; }
    .hb-routes[data-hb-routes] p.hb-routes__summary-meta { margin: 8px 0 0; line-height: 1.4; }
    .hb-routes__summary-text { margin-top: 16px; font-size: 16px; line-height: 1.6; max-width: 62ch; overflow-wrap: anywhere; display: flow-root; }
    .hb-routes[data-hb-routes] .hb-routes__summary-text p { margin: 0 0 16px; }
    .hb-routes[data-hb-routes] .hb-routes__summary-text > :last-child,
    .hb-routes[data-hb-routes] .hb-routes__summary-text .is-last-visible { margin-bottom: 0; }
    .hb-routes__summary-text hr { width: 56px; height: 1px; margin: 20px 0; }
    .hb-routes[data-hb-routes] .hb-routes__summary-text img { max-width: 100%; height: auto; }
    .hb-routes__summary-text iframe, .hb-routes__summary-text video, .hb-routes__summary-text embed { max-width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .hb-routes__summary-text table { display: block; max-width: 100%; overflow-x: auto; }
    .hb-routes .hb-routes__summary-text a { text-underline-offset: 3px; }
    .hb-routes .hb-routes__summary-text a:focus-visible { outline: 3px solid #0d72ab; outline-offset: 2px; }
    .hb-route-desc-toggle {
        display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; gap: 8px;
        height: 48px; margin-top: 16px; padding: 0 18px;
        border: 1px solid #e2e2df; border-radius: 11px; background: white; color: #75756e;
        font: 700 12px / 1.3 "Space Mono", monospace; letter-spacing: .04em; text-transform: uppercase;
    }
    .hb-route-desc-toggle span { font: 14px / 1 "Inter", sans-serif; }
    .hb-route-desc-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
    .hb-routes__stops { padding: 0; margin-top: 48px; }
    .hb-routes__stops-header { gap: 16px; margin-bottom: 20px; }
    .hb-routes[data-hb-routes] .hb-routes__stops-header h2 { margin: 0; line-height: 1.2; }
    .hb-routes__stops-header span { margin: 0; }
    .hb-routes[data-hb-routes] .hb-routes__stop { margin: 0; }
    .hb-routes[data-hb-routes] .hb-routes__stop-card {
        display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 16px;
        min-height: 72px; border-radius: 12px; padding: 16px 20px;
        text-decoration-thickness: 1px; text-underline-offset: 3px;
        box-shadow: none; transform: none; transition: box-shadow .18s ease, transform .18s ease;
    }
    .hb-routes .hb-routes__stop-card:focus-visible { outline: 3px solid #0d72ab; outline-offset: 3px; }
    .hb-routes__stop-content { gap: 2px; overflow-wrap: anywhere; }
    .hb-routes__stop-title { font-size: 16px; line-height: 1.3; }
    .hb-routes__stop-artist { line-height: 1.4; }
    .hb-routes__stop-link { display: block; font-size: 14px; padding-left: 4px; white-space: nowrap; }
    @media (hover: hover) {
        .hb-routes__select:hover { border-color: #75756e; }
        .hb-routes .hb-locate:hover, .hb-routes .leaflet-control-zoom a:not(.leaflet-disabled):hover,
        .hb-route-card__prev:not([aria-disabled="true"]):hover, .hb-route-card__next:not([aria-disabled="true"]):hover,
        .hb-route-desc-toggle:hover { background: #f2f1ee; color: #414042; }
        .hb-routes .hb-route-card__title a:hover { color: #0a5c8a; }
        .hb-route-card__audio:hover { background: #0a5c8a; }
        .hb-route-card__close:hover span { background: #e2e2df; }
        .hb-routes .hb-routes__stop-card:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, .1); transform: translateY(-2px); }
    }
    @media (prefers-reduced-motion: reduce) {
        .hb-routes .hb-routes__stop-card:hover { transform: none; }
    }
}
@media (min-width: 600px) and (max-width: 1199.98px) {
    .hb-routes[data-hb-routes] .hb-routes__summary-text img:is(.alignleft, .alignright, [style*="float"]) { max-width: 45%; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hb-routes[data-hb-routes] { --hb-header-h: 84px; }
    .hb-routes__picker-card { margin-bottom: 24px; }
    .hb-routes__sidebar { margin-top: 32px; }
    .hb-routes__summary-card { padding: 32px; }
    .hb-routes__stops { margin-top: 56px; }
    .hb-routes__stops [data-hb-routes-stops] { gap: 14px; }
}
@media (max-width: 767.98px) {
    .hb-routes[data-hb-routes] { --hb-header-h: 72px; --hb-map-inset: 10px; }
    .hb-routes[data-hb-routes] .hb-routes__intro { margin-bottom: 24px; }
    .hb-routes__picker-card { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 10px; margin-bottom: 16px; }
    .hb-routes__map-card { min-height: 200px; }
    .hb-routes__sidebar { margin-top: 24px; }
    .hb-routes__summary-card { padding: 20px; }
    .hb-routes[data-hb-routes] p.hb-routes__summary-kicker { font-size: 18px; }
    .hb-routes__summary-kicker::before { width: 16px; background: radial-gradient(circle, currentColor 0 2.5px, transparent 2.5px); }
    .hb-routes .hb-routes__summary-card [data-hb-routes-title] { font-size: 24px; }
    .hb-route-desc-toggle { align-self: stretch; width: 100%; padding: 0 8px; }
    .hb-routes__stops { margin-top: 40px; }
    .hb-routes__stops-header { margin-bottom: 16px; }
    .hb-routes[data-hb-routes] .hb-routes__stops-header h2 { font-size: 22px; }
    .hb-routes__stops [data-hb-routes-stops] { gap: 10px; }
    .hb-routes[data-hb-routes] .hb-routes__stop-card { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
    .hb-routes__stop-number { width: 32px; height: 32px; font-size: 14px; }
}
@media (max-width: 599.98px) {
    .hb-routes__map-card.has-route { aspect-ratio: 4 / 5; }
    .hb-routes .hb-route-card { right: 10px; width: auto; grid-template-columns: 104px minmax(0, 1fr); min-height: 120px; }
    .hb-route-card__body { padding: 12px 14px; }
    .hb-routes[data-hb-routes] h2.hb-route-card__title { font-size: 18px; }
    .hb-route-card__close { top: 4px; right: 4px; }
    .hb-route-card__num { top: 8px; left: 8px; }
    .hb-routes[data-hb-routes] .hb-routes__summary-text img:is(.alignleft, .alignright, [style*="float"]) { float: none !important; display: block; margin: 4px 0 16px; }
}
@media (max-width: 599.98px) and (max-height: 540px) {
    .hb-routes .hb-route-card { left: 64px; }
}
/* The longest published name is 198px at 16px Inter. The specified 44px
   arrow reserve leaves only 184px at 320px; 28px still clears the same glyph. */
@media (max-width: 339.98px) {
    .hb-routes__select { padding-right: 28px; }
}
@media (min-width: 600px) and (max-width: 1199.98px) and (max-height: 540px) {
    .hb-routes .hb-route-card { left: auto; right: var(--hb-map-inset); }
}
