/* =========================================================
   Redesigned Quality page only (resources/views/quality.blade.php)
   Every rule is scoped to .brx-q. Section titles use the home
   page's .section-title-8-wrapper from style.css.
   ========================================================= */

.brx-q {
    --q-teal: var(--secondary, #2F6662);
    --q-deep: #0f2423;
    --q-lime: var(--green, #85EE00);
    --q-ink: #151515;
    --q-muted: #5d6270;
    --q-line: rgba(19, 19, 46, .1);
    --q-soft: #f1f4f3;
    font-family: var(--font_dmsans, "DM Sans", sans-serif);
}

.brx-q * {
    box-sizing: border-box;
}

.brx-q section {
    position: relative;
    padding: 110px 0;
}

.brx-q__wrap {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- shared ---------- */
.brx-q .section-title-8-wrapper .title {
    margin-bottom: 0;
}

.brx-q .title mark {
    background: linear-gradient(transparent 62%, var(--q-lime) 62%, var(--q-lime) 92%, transparent 92%);
    color: inherit;
    padding: 0 4px;
}

.brx-q__head-row {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 60px;
    align-items: end;
    margin-bottom: 56px;
}

.brx-q__lead {
    margin: 0;
    font-size: 17px;
    line-height: 1.75;
    color: var(--q-muted);
}

.brx-q__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--q-teal);
    text-decoration: none;
    border-bottom: 2px solid var(--q-lime);
    padding-bottom: 4px;
    transition: gap .25s ease, color .25s ease;
}

.brx-q__link:hover {
    gap: 16px;
    color: var(--q-ink);
}

.brx-q a:focus-visible,
.brx-q button:focus-visible,
.brx-q [tabindex]:focus-visible {
    outline: 3px solid var(--q-lime);
    outline-offset: 4px;
}

.brx-q.has-js .brx-q__reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.22, .61, .36, 1);
}

.brx-q.has-js .brx-q__reveal.is-in {
    opacity: 1;
    transform: none;
}

/* =========================================================
   1. Commitment: look closer
   ========================================================= */
.brx-q__commit {
    background: #fff;
}

.brx-q__media {
    position: relative;
    margin: 0;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 40px 90px rgba(19, 19, 46, .16);
    background: #13132e;
}

.brx-q__media video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.brx-q__commit-foot {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 50px;
    align-items: start;
    margin-top: 50px;
}

.brx-q__commit-text p {
    margin: 0 0 24px;
    font-size: 17px;
    line-height: 1.75;
    color: var(--q-muted);
}

.brx-q__principles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.brx-q__principles li {
    padding: 26px 24px;
    border-radius: 20px;
    background: var(--q-soft);
    transition: background .3s ease, box-shadow .3s ease, transform .3s ease;
}

.brx-q__principles li:hover {
    background: #fff;
    box-shadow: 0 22px 50px rgba(19, 19, 46, .1);
    transform: translateY(-4px);
}

.brx-q__principles span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--q-teal);
    color: var(--q-lime);
    font-size: 13px;
    font-weight: 700;
}

.brx-q__principles h3 {
    margin: 18px 0 0;
    font-family: var(--font_outfit, sans-serif);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--q-ink);
}

.brx-q__principles p {
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--q-muted);
}

/* =========================================================
   2. Quality gates
   ========================================================= */
.brx-q__gates {
    background:
        linear-gradient(rgba(47, 102, 98, .06) 1px, transparent 1px) 0 0 / 60px 60px,
        linear-gradient(90deg, rgba(47, 102, 98, .06) 1px, transparent 1px) 0 0 / 60px 60px,
        var(--q-soft);
}

.brx-q__gate-list {
    --gap: 24px;
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
}

/* track from the first node to the last, and the fill that runs along it */
.brx-q__gate-list::before,
.brx-q__gate-list::after {
    content: "";
    position: absolute;
    top: 25px;
    left: calc((100% - var(--gap) * 3) / 8);
    right: calc((100% - var(--gap) * 3) / 8);
    height: 3px;
    border-radius: 3px;
    background: rgba(47, 102, 98, .18);
}

.brx-q__gate-list::after {
    background: linear-gradient(90deg, var(--q-teal), var(--q-lime));
    transform-origin: left;
    transition: transform 1.8s cubic-bezier(.65, 0, .35, 1) .2s;
}

.brx-q.has-js .brx-q__gate-list:not(.is-in)::after {
    transform: scaleX(0);
}

.brx-q__gate {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brx-q__gate-node {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 5px solid var(--q-soft);
    background: var(--q-lime);
    color: var(--q-ink);
    font-size: 17px;
    box-shadow: 0 0 0 6px rgba(133, 238, 0, .18);
    transition: background .5s ease, color .5s ease, box-shadow .5s ease;
    transition-delay: calc(var(--i) * .45s + .4s);
}

.brx-q.has-js .brx-q__gate-list:not(.is-in) .brx-q__gate-node {
    background: #fff;
    color: rgba(19, 19, 46, .2);
    box-shadow: 0 0 0 1px rgba(47, 102, 98, .2);
}

.brx-q__gate-card {
    flex: 1;
    width: 100%;
    margin-top: 28px;
    padding: 30px 28px;
    border-radius: 22px;
    background: #fff;
    transition: transform .35s ease, box-shadow .35s ease;
}

.brx-q__gate:hover .brx-q__gate-card {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(19, 19, 46, .1);
}

.brx-q__gate-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brx-q__gate-num {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--q-teal);
}

.brx-q__gate-top i {
    font-size: 26px;
    color: var(--q-teal);
}

.brx-q__gate h3 {
    margin: 22px 0 0;
    font-family: var(--font_outfit, sans-serif);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--q-ink);
}

.brx-q__gate p {
    margin: 10px 0 0;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--q-muted);
}

/* =========================================================
   3. Performance explorer
   ========================================================= */
.brx-q__perf {
    background: #fff;
}

.brx-q__px {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 28px;
    align-items: stretch;
}

.brx-q__px-tabs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brx-q__px-tab {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 14px 18px 14px 14px;
    border: 1px solid var(--q-line);
    border-radius: 18px;
    background: #fff;
    font: inherit;
    text-align: left;
    color: var(--q-ink);
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, color .25s ease;
}

.brx-q__px-tab > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--q-soft);
    color: var(--q-teal);
    font-size: 20px;
    transition: background .25s ease, color .25s ease;
}

.brx-q__px-tab span {
    font-family: var(--font_outfit, sans-serif);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.brx-q__px-tab small {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--q-muted);
}

.brx-q__px-tab:hover {
    background: var(--q-soft);
}

.brx-q__px-tab.is-on {
    border-color: var(--q-teal);
    background: var(--q-teal);
    color: #fff;
}

.brx-q__px-tab.is-on > i {
    background: var(--q-lime);
    color: var(--q-ink);
}

.brx-q__px-tab.is-on small {
    color: var(--q-lime);
}

.brx-q__px-panels {
    position: relative;
}

.brx-q__px-panel {
    position: relative;
    height: 100%;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px;
    border-radius: 28px;
    overflow: hidden;
    color: #fff;
    /* photo from --px-img (set per panel), darkened at the bottom so the text stays readable */
    background: linear-gradient(0deg, rgb(0 0 0 / 92%) 0%, rgb(0 0 0 / 60%) 45%, rgb(0 0 0 / 55%) 100%), var(--px-img, none) center / cover no-repeat, #000000
}

.brx-q__px-panel.is-on {
    animation: brx-q-panel .55s cubic-bezier(.22, .61, .36, 1);
}

.brx-q__px-count {
    position: absolute;
    left: 48px;
    top: 44px;
    font-family: var(--font_outfit, sans-serif);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--q-lime);
}

.brx-q__px-count small {
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
}

.brx-q__px-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: var(--q-lime);
    color: var(--q-ink);
    font-size: 32px;
}

.brx-q__px-panel h3 {
    margin: 26px 0 0;
    font-family: var(--font_outfit, sans-serif);
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1.1;
    font-weight: 600;
    color: #fff;
}

.brx-q__px-panel p {
    margin: 16px 0 0;
    max-width: 540px;
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .8);
}

.brx-q__px-method {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 26px;
    padding: 10px 16px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, .25);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.brx-q__px-method i {
    color: var(--q-lime);
}

.brx-q__note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
    padding: 20px 26px;
    border-radius: 16px;
    background: var(--q-soft);
}

.brx-q__note p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 15px;
    color: var(--q-muted);
}

.brx-q__note p i {
    color: var(--q-teal);
    font-size: 18px;
}

/* =========================================================
   4. Documentation
   ========================================================= */
.brx-q__docs {
    background:
        radial-gradient(circle at 85% 10%, rgba(47, 102, 98, .55), transparent 55%),
        var(--q-deep);
}

.brx-q__docs .section-title-8-wrapper .sub-title {
    background: transparent;
    border-color: rgba(255, 255, 255, .25);
    color: #fff;
}

.brx-q__docs .section-title-8-wrapper .sub-title::before,
.brx-q__docs .section-title-8-wrapper .sub-title::after {
    background: var(--q-lime);
}

.brx-q__docs .section-title-8-wrapper .title {
    color: #fff;
}

.brx-q__docs .brx-q__lead {
    color: rgba(255, 255, 255, .72);
}

.brx-q__doc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

.brx-q__doc {
    display: flex;
}

.brx-q__doc-sheet {
    --fold: 46px;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 34px 30px 32px;
    border-radius: 18px;
    background: #fff;
    /* paper with a folded top-right corner */
    clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
    transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}

.brx-q__doc-sheet::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: var(--fold);
    height: var(--fold);
    border-bottom-left-radius: 8px;
    background: linear-gradient(to bottom left, transparent 50%, #cfdad6 50%);
}

.brx-q__doc:nth-child(1) .brx-q__doc-sheet { transform: rotate(-1.5deg); }
.brx-q__doc:nth-child(3) .brx-q__doc-sheet { transform: rotate(1.5deg); }

.brx-q__doc:hover .brx-q__doc-sheet {
    transform: translateY(-8px) rotate(0deg);
}

.brx-q__doc-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brx-q__doc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--q-teal);
    color: var(--q-lime);
    font-size: 22px;
}

.brx-q__doc-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--q-teal);
}

.brx-q__doc-lines {
    display: grid;
    gap: 8px;
    margin: 26px 0 4px;
}

.brx-q__doc-lines i {
    display: block;
    height: 6px;
    border-radius: 6px;
    background: var(--q-soft);
}

.brx-q__doc-lines i:nth-child(1) { width: 78%; }
.brx-q__doc-lines i:nth-child(2) { width: 62%; }
.brx-q__doc-lines i:nth-child(3) { width: 44%; }

.brx-q__doc h3 {
    margin: 22px 0 0;
    font-family: var(--font_outfit, sans-serif);
    font-size: 24px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--q-ink);
}

.brx-q__doc p {
    margin: 10px 0 28px;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--q-muted);
}

.brx-q__doc-link {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 100px;
    background: var(--q-teal);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: gap .25s ease, background .25s ease, color .25s ease;
}

.brx-q__doc-link:hover {
    gap: 14px;
    background: var(--q-lime);
    color: var(--q-ink);
}

/* =========================================================
   5. Every detail: hotspots
   ========================================================= */
.brx-q__details {
    background: var(--q-soft);
}

.brx-q__spot-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 50px;
    align-items: center;
}

.brx-q__spot-media {
    position: relative;
    margin: 0;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 34px 80px rgba(19, 19, 46, .16);
}

.brx-q__spot-media img {
    display: block;
    width: 100%;
    height: auto;
}

.brx-q__spot-media figcaption {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 10px 16px;
    border-radius: 100px;
    background: rgba(255, 255, 255, .94);
    font-size: 13px;
    font-weight: 600;
    color: var(--q-ink);
}

.brx-q__spot {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    font-family: var(--font_outfit, sans-serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--q-ink);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
    cursor: pointer;
    transition: background .25s ease, transform .25s ease;
}

.brx-q__spot::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .8);
    animation: brx-q-pulse 2s ease-out infinite;
}

.brx-q__spot.is-on {
    background: var(--q-lime);
    transform: scale(1.15);
}

.brx-q__spot.is-on::before {
    border-color: var(--q-lime);
}

.brx-q__spot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.brx-q__spot-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 18px;
    padding: 22px 24px;
    border-radius: 20px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.brx-q__spot-item:hover {
    border-color: var(--q-line);
}

.brx-q__spot-item.is-on {
    background: #fff;
    box-shadow: 0 22px 50px rgba(19, 19, 46, .1);
}

.brx-q__spot-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--q-teal);
    font-family: var(--font_outfit, sans-serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--q-teal);
    transition: background .3s ease, color .3s ease;
}

.brx-q__spot-item.is-on .brx-q__spot-num {
    background: var(--q-teal);
    color: var(--q-lime);
}

.brx-q__spot-item h3 {
    margin: 8px 0 0;
    font-family: var(--font_outfit, sans-serif);
    font-size: 21px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--q-ink);
}

.brx-q__spot-item p {
    margin: 6px 0 0;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--q-muted);
}

.brx-q__spot-item .brx-q__link {
    margin-top: 14px;
}

/* =========================================================
   6. CTA
   ========================================================= */
.brx-q__cta {
    /* light grey band, same as the footer area below and the other page CTAs */
    background: #f1f1f1;
}

.brx-q__cta-box {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 50px;
    align-items: center;
    padding: 64px;
    border-radius: 32px;
    background: var(--q-teal);
    overflow: hidden;
}

.brx-q__cta-box::before {
    content: "";
    position: absolute;
    right: -120px;
    top: -140px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    border: 60px solid rgba(255, 255, 255, .06);
    pointer-events: none;
}

.brx-q__cta-box > * {
    position: relative;
}

.brx-q__cta-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--q-lime);
}

.brx-q__cta-kicker::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--q-lime);
}

.brx-q__cta-text h2 {
    margin: 16px 0 0;
    font-family: var(--font_outfit, sans-serif);
    font-size: clamp(30px, 3.4vw, 48px);
    line-height: 1.1;
    font-weight: 600;
    color: #fff;
}

.brx-q__cta-text p {
    margin: 16px 0 0;
    max-width: 520px;
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .8);
}

.brx-q__cta-side {
    padding: 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
}

.brx-q__cta-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.brx-q__cta-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.brx-q__cta-list i {
    color: var(--q-lime);
    font-size: 17px;
}

.brx-q__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    padding: 16px 28px;
    border-radius: 100px;
    background: var(--q-lime);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #13132E;
    text-decoration: none;
    transition: transform .25s ease, background .25s ease;
}

.brx-q__btn:hover {
    transform: translateY(-3px);
    background: #fff;
    color: #13132E;
}

/* ---------- keyframes ---------- */
@keyframes brx-q-panel {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes brx-q-pulse {
    0% { transform: scale(.85); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .brx-q.has-js .brx-q__reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .brx-q__px-panel.is-on,
    .brx-q__spot::before {
        animation: none;
    }

    .brx-q__gate-list::after,
    .brx-q__gate-node {
        transition: none;
    }
}

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
    .brx-q section {
        padding: 90px 0;
    }

    .brx-q__commit-foot {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .brx-q__px-panel {
        padding: 40px;
    }

    .brx-q__px-count {
        left: 40px;
        top: 36px;
    }

    .brx-q__doc-grid {
        gap: 22px;
    }

    .brx-q__doc-sheet {
        padding: 30px 24px 28px;
    }
}

@media (max-width: 991px) {
    .brx-q__head-row {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }

    .brx-q__gate-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 34px;
    }

    .brx-q__gate-list::before,
    .brx-q__gate-list::after {
        display: none;
    }

    .brx-q__px {
        grid-template-columns: 1fr;
    }

    /* tabs become a horizontal scroller above the panel */
    .brx-q__px-tabs {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .brx-q__px-tab {
        flex: 0 0 auto;
        width: auto;
        grid-template-columns: 40px auto;
        gap: 12px;
        padding: 10px 18px 10px 10px;
        scroll-snap-align: start;
    }

    .brx-q__px-tab > i {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }

    .brx-q__px-tab span {
        font-size: 16px;
        white-space: nowrap;
    }

    .brx-q__px-tab small {
        display: none;
    }

    .brx-q__px-panel {
        min-height: 400px;
    }

    .brx-q__doc-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }

    .brx-q__doc:nth-child(n) .brx-q__doc-sheet {
        transform: none;
    }

    .brx-q__spot-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .brx-q__cta-box {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 52px 34px;
    }
}

@media (max-width: 767px) {
    .brx-q__principles {
        grid-template-columns: 1fr;
    }

    /* caption would cover the hotspots on a small image */
    .brx-q__spot-media figcaption {
        display: none;
    }

    /* gates become a vertical checklist */
    .brx-q__gate-list {
        grid-template-columns: 1fr;
        row-gap: 18px;
    }

    .brx-q__gate-list::before,
    .brx-q__gate-list::after {
        display: block;
        top: 26px;
        bottom: 26px;
        left: 25px;
        right: auto;
        width: 3px;
        height: auto;
    }

    .brx-q__gate-list::after {
        transform-origin: top;
    }

    .brx-q.has-js .brx-q__gate-list:not(.is-in)::after {
        transform: scaleY(0);
    }

    .brx-q__gate {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }

    .brx-q__gate-node {
        flex: 0 0 auto;
    }

    .brx-q__gate-card {
        margin-top: 0;
        padding: 24px 22px;
    }
}

@media (max-width: 575px) {
    .brx-q section {
        padding: 70px 0;
    }

    .brx-q__wrap {
        padding: 0 16px;
    }

    .brx-q__media {
        border-radius: 22px;
    }

    .brx-q__px-panel {
        padding: 30px 24px;
        min-height: 380px;
        border-radius: 22px;
    }

    .brx-q__px-count {
        left: 24px;
        top: 26px;
    }

    .brx-q__px-icon {
        width: 62px;
        height: 62px;
        font-size: 26px;
    }

    .brx-q__px-panel p {
        font-size: 16.5px;
    }

    .brx-q__note {
        flex-direction: column;
        align-items: flex-start;
    }

    .brx-q__spot {
        width: 36px;
        height: 36px;
        margin: -18px 0 0 -18px;
        font-size: 14px;
    }

    .brx-q__spot-item {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 14px;
        padding: 18px;
    }

    .brx-q__spot-num {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .brx-q__cta-box {
        padding: 40px 22px;
        border-radius: 24px;
    }

    .brx-q__cta-side {
        padding: 20px;
    }
}

/* ---------- Performance explorer: mobile (<768px) - no tab slider, all 6 cards stacked one by one ---------- */
@media (max-width: 767px) {
    .brx-q__px-tabs {
        display: none;
    }

    .brx-q__px-panels {
        display: grid;
        gap: 20px;
    }

    .brx-q__px-panel[hidden] {
        display: flex !important;
    }

    .brx-q__px-panel.is-on {
        animation: none;
    }

    /* number in normal flow above the icon, so longer text can't push the icon under it */
    .brx-q__px-count {
        position: static;
        margin-bottom: 14px;
    }
}

/* ---------- Detail hotspots: on shorter images (<1200px) hotspot 2 sat on the caption - move caption top-right ---------- */
@media (max-width: 1199px) {
    .brx-q__spot-media figcaption {
        left: auto;
        right: 16px;
        top: 16px;
        bottom: auto;
    }
}
