/* =========================================
   HYDROGEN BUS EXPLORER
   Styles isolated from the existing website
   ========================================= */

.hbx {
    --hbx-ink: #173e31;
    --hbx-muted: #61786c;
    --hbx-green: #237b57;
    --hbx-border: #dce7de;
    --hbx-cream: #f6f7ef;
    --hbx-white: #ffffff;

    padding: 80px 24px;
    background: var(--hbx-cream);
    color: var(--hbx-ink);
    font-family: inherit;
    isolation: isolate;
}

.hbx,
.hbx *,
.hbx *::before,
.hbx *::after {
    box-sizing: border-box;
}

.hbx .hbx__container {
    max-width: 1200px;
    margin-inline: auto;
}

.hbx .hbx__header {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: end;
    gap: 40px;
    margin-bottom: 32px;
}

.hbx .hbx__eyebrow {
    margin: 0 0 16px;
    color: var(--hbx-green);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hbx .hbx__header h2 {
    margin: 0;
    color: var(--hbx-ink);
    font-size: clamp(30px, 3.7vw, 49px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.hbx .hbx__header h2 em {
    color: var(--hbx-green);
    font-weight: inherit;
}

.hbx .hbx__intro {
    max-width: 440px;
    margin: 0;
    color: var(--hbx-muted);
    font-size: 15px;
    line-height: 1.8;
}

.hbx .hbx__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: stretch;
}

/* Illustration */

.hbx .hbx__visual {
    min-width: 0;
    overflow: hidden;
    background: #edf3ec;
    border: 1px solid var(--hbx-border);
    border-radius: 24px;
}

.hbx .hbx__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 22px 24px 0;
}

.hbx .hbx__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4e6b5b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.hbx .hbx__badge > span {
    width: 7px;
    height: 7px;
    background: #3caa78;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgb(60 170 120 / 12%);
}

.hbx .hbx__toggle {
    appearance: none;
    padding: 10px 15px;
    border: 1px solid #cadbce;
    border-radius: 999px;
    background: #fff;
    color: var(--hbx-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease;
}

.hbx .hbx__toggle:hover {
    background: var(--hbx-ink);
    color: #fff;
}

.hbx .hbx__drawing {
    padding: 5px 8px 0;
}

.hbx .hbx__svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.hbx .hbx__part {
    opacity: 1;
    transition: opacity 180ms ease;
}

.hbx .hbx__part.is-muted {
    opacity: 0.3;
}

.hbx .hbx__part.is-selected {
    opacity: 1;
}

.hbx .hbx__part.is-selected:not(.hbx__body) {
    filter: drop-shadow(0 0 7px rgb(34 145 98 / 35%));
}

.hbx .hbx__guides,
.hbx .hbx__exploded-label {
    opacity: 0;
}

.hbx .hbx__diagram-label {
    fill: #315e49;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

/* Slider */

.hbx .hbx__slider-area {
    margin: 0 24px 24px;
    padding: 19px 20px;
    background: rgb(255 255 255 / 78%);
    border: 1px solid rgb(215 228 216 / 90%);
    border-radius: 16px;
}

.hbx .hbx__slider-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
}

.hbx .hbx__slider-heading output {
    color: var(--hbx-green);
    font-variant-numeric: tabular-nums;
}

.hbx .hbx__range {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    accent-color: var(--hbx-green);
    cursor: pointer;
}

.hbx .hbx__slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--hbx-muted);
    font-size: 11px;
}

/* Component panel */

.hbx .hbx__panel {
    padding: 25px;
    background: var(--hbx-white);
    border: 1px solid var(--hbx-border);
    border-radius: 24px;
}

.hbx .hbx__components {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.hbx .hbx__component {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 76px;
    padding: 12px;
    border: 1px solid #e1e8e1;
    border-radius: 12px;
    background: #f8faf6;
    color: var(--hbx-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease;
}

.hbx .hbx__component > span {
    color: #7b9383;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.hbx .hbx__component:hover {
    border-color: #7da88e;
    background: #edf5ed;
}

.hbx .hbx__component[aria-pressed="true"] {
    border-color: var(--hbx-ink);
    background: var(--hbx-ink);
    color: #fff;
}

.hbx .hbx__component[aria-pressed="true"] > span {
    color: #a5d9b8;
}

.hbx .hbx__details {
    margin-top: 25px;
    padding-top: 22px;
    border-top: 1px solid var(--hbx-border);
}

.hbx .hbx__detail-number {
    color: #78a18a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.hbx .hbx__details h3 {
    margin: 10px 0 12px;
    color: var(--hbx-ink);
    font-size: 25px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.hbx .hbx__details p {
    margin: 0;
    color: var(--hbx-muted);
    font-size: 14px;
    line-height: 1.8;
}

.hbx .hbx__vocabulary {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    padding: 15px;
    border-radius: 12px;
    background: #f0f5ec;
}

.hbx .hbx__vocabulary > span {
    color: #718774;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.hbx .hbx__vocabulary strong {
    color: #355c43;
    font-size: 12px;
    line-height: 1.6;
}

.hbx .hbx__note {
    margin: 17px 0 0;
    color: var(--hbx-muted);
    font-size: 11px;
    line-height: 1.7;
}

/* Keyboard accessibility */

.hbx button:focus-visible,
.hbx input:focus-visible {
    outline: 3px solid #bd8d2f;
    outline-offset: 4px;
}

/* Responsive */

@media (max-width: 1000px) {
    .hbx .hbx__layout {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .hbx .hbx__panel {
        padding: 20px;
    }
}

@media (max-width: 800px) {
    .hbx {
        padding: 56px 20px;
    }

    .hbx .hbx__header {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hbx .hbx__intro {
        max-width: 600px;
    }

    .hbx .hbx__layout {
        grid-template-columns: 1fr;
    }

    .hbx .hbx__components {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .hbx {
        padding: 44px 14px;
    }

    .hbx .hbx__toolbar {
        padding: 18px 16px 0;
    }

    .hbx .hbx__badge {
        font-size: 9px;
    }

    .hbx .hbx__toggle {
        padding: 9px 11px;
        font-size: 11px;
    }

    .hbx .hbx__slider-area {
        margin: 0 14px 16px;
        padding: 16px;
    }

    .hbx .hbx__components {
        grid-template-columns: repeat(2, 1fr);
    }

    .hbx .hbx__visual,
    .hbx .hbx__panel {
        border-radius: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hbx *,
    .hbx *::before,
    .hbx *::after {
        transition: none !important;
        animation: none !important;
    }
}