.os-bus-live {
    padding: .9rem;
    margin: .6rem 0 1rem;
    border: 1px solid #dce5db;
    border-radius: .7rem;
    background: #f5f8f3;
}

.os-bus-live label {
    display: block;
    margin-bottom: .35rem;
    color: #234536;
    font-size: .85rem;
    font-weight: 700;
}

.os-bus-live [hidden],
.os-home-buses [hidden] { display: none !important; }

.os-bus-live select {
    width: 100%;
    min-height: 2.75rem;
    margin-bottom: .65rem;
    padding: .45rem .65rem;
    border: 1px solid #9eb3a6;
    border-radius: .4rem;
    background: white;
    color: #173f32;
    font: inherit;
}

.os-bus-live-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem .85rem;
}

.os-bus-live-actions .os-bus-show {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .45rem .8rem;
    border: 1px solid #234f3b;
    border-radius: .4rem;
    background: #234f3b;
    color: white;
    cursor: pointer;
    font: inherit;
    font-weight: 650;
}

.os-bus-live :is(a, button, select):focus-visible,
.os-home-buses :is(a, button, summary, [role="tabpanel"]):focus-visible,
.os-bus-route-list summary:focus-visible {
    outline: 2px solid #2c634b;
    outline-offset: 3px;
}

.os-bus-live-note {
    margin: .65rem 0 0;
    color: #40584a;
    font-size: .83rem;
    line-height: 1.5;
}

.os-bus-board { margin-top: .75rem; }

.os-bus-board iframe {
    display: block;
    width: 100%;
    height: 42rem;
    max-height: 85vh;
    min-height: 25rem;
    border: 1px solid #d6e0d6;
    border-radius: .45rem;
    background: white;
}

.os-bus-route-note { margin: 0 0 .8rem; }
.os-bus-route-list { margin-bottom: .9rem; }
.os-bus-route-list summary { color: #234f3b; cursor: pointer; font-weight: 650; }
.os-bus-route-list p { margin: .45rem 0; }

.os-bus-journeys {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    gap: .4rem;
    margin-bottom: .55rem;
}

.os-bus-journeys button {
    padding: .6rem;
    min-height: 2.75rem;
    border: 1px solid #b4c4b7;
    border-radius: .4rem;
    background: white;
    color: #234536;
    cursor: pointer;
    font: inherit;
    font-weight: 650;
}

.os-bus-journeys button[aria-pressed="true"] { background: #234f3b; color: white; }
.os-bus-other-stops { margin-bottom: .7rem; }
.os-bus-other-stops summary { color: #234536; cursor: pointer; font-weight: 650; }
.os-bus-other-stops label { margin-top: .55rem; }
.os-bus-preview { margin: .8rem 0; }
.os-bus-preview-stop { margin: 0; color: #40584a; }
.os-bus-preview h4 { margin: .25rem 0 .45rem; }
.os-bus-preview-rows { margin: 0 0 .45rem; padding: 0; list-style: none; }

.os-bus-preview-rows li {
    display: grid;
    grid-template-columns: minmax(2.4rem, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: .45rem;
    padding: .32rem 0;
    border-bottom: 1px solid #dce5db;
    overflow-wrap: anywhere;
    font-size: .9rem;
}

.os-bus-preview-rows time { white-space: nowrap; font-variant-numeric: tabular-nums; }

.home .local-services.os-home-services { grid-template-columns: minmax(0, 1fr); }

.home .os-home-services .os-met-weather .weather-days { max-width: none; }

@media (min-width: 56rem) {
    .home .os-home-services .os-met-weather {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-areas: "heading current forecast" "credit extra forecast";
        align-items: center;
        column-gap: 1.5rem;
    }
    .os-home-services .os-met-weather .utility-heading { grid-area: heading; }
    .os-home-services .os-met-weather .weather-current { grid-area: current; }
    .os-home-services .os-met-weather .weather-extra { grid-area: extra; }
    .home .os-home-services .os-met-weather .weather-days { grid-area: forecast; border-top: 0; }
    .os-home-services .os-met-weather .weather-unavailable { grid-area: current; }
    .os-home-services .os-met-weather .utility-credit { grid-area: credit; }
}

.home .os-home-buses {
    min-width: 0;
    padding: clamp(1rem, 3vw, 1.75rem);
}

.os-home-buses,
.os-home-buses #buses-title { scroll-margin-top: 6rem; }

.os-bus-tabs,
.os-home-buses .os-bus-journeys {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

.os-bus-tabs {
    margin: 0 0 1rem;
    padding: .35rem;
    border: 1px solid #dce5db;
    border-radius: .65rem;
    background: #f5f8f3;
}

.os-bus-tabs button {
    min-height: 3.25rem;
    padding: .55rem;
    border: 1px solid #b4c4b7;
    border-radius: .4rem;
    background: white;
    color: #183d2e;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.os-bus-tabs button[aria-selected="true"] {
    background: #234f3b;
    border-color: #234f3b;
    color: white;
}

.os-bus-tabs button[aria-selected="false"]:hover { background: #e7efe4; }
.os-home-buses .os-bus-live { margin: 0; padding: clamp(.75rem, 2.5vw, 1.25rem); }
.os-home-buses .os-bus-journeys button { min-height: 3rem; }

.os-home-buses .os-bus-preview-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    margin-bottom: .25rem;
}

.os-home-buses .os-bus-preview h4 { margin: 0; font-size: 1rem; }
.os-home-buses .os-bus-preview-rows li { padding: .55rem 0; font-size: 1rem; }
.os-home-buses .os-bus-preview-rows time { font-weight: 700; }
.os-bus-departure-stop {
    display: block;
    margin-top: .1rem;
    color: #40584a;
    font-size: .86rem;
    line-height: 1.35;
}

.os-bus-timetable-toggle,
.os-bus-timetable-pages button {
    min-height: 2.75rem;
    padding: .45rem .75rem;
    border: 1px solid #9eb3a6;
    border-radius: .4rem;
    background: white;
    color: #173f32;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.os-bus-timetable-filter { max-width: 17rem; margin: .55rem 0; }
.os-bus-timetable-pages { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.os-bus-timetable-pages button:disabled { opacity: .55; cursor: default; }
.os-bus-page-range { font-size: .9rem; color: #40584a; }
.os-home-buses .os-bus-other-stops { margin: 0 0 .5rem; }
.os-home-buses summary { min-height: 2.75rem; align-content: center; }

.os-home-buses .os-bus-route-list {
    margin: .65rem 0 0;
    padding-inline: .25rem;
}

.os-bus-map-intro, .os-bus-map-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .35rem 1rem;
}

.os-bus-map-intro p, .os-bus-map-footer p { margin: 0; }
.os-bus-map-footer { margin-top: .5rem; }

.os-bus-map-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .45rem .75rem;
    border: 1px solid #a3b8a9;
    border-radius: .4rem;
    background: #f5f8f3;
    color: #183d2e;
    font-weight: 650;
}

.os-bus-map-panel iframe { height: clamp(27rem, 75vh, 42rem); }
