.bbe-embed {
    --bbe-brand: #064370;
    --bbe-aero: #2682c6;
    --bbe-zone: #8cadc5;
    --bbe-zone-text: #6a9bbd;
    --bbe-momentum: #f38304;
    --bbe-error: #ff2200;
    --bbe-text: #434343;
    --bbe-text-secondary: #999;
    --bbe-chalk-300: #c1c1c1;
    --bbe-chalk-200: #f2f2f2;
    --bbe-bg: #f6f6f6;
    --bbe-white: #fff;
    --bbe-shadow: 0 1px 2px rgb(1 21 36 / 6%);
    --bbe-font: 'Poppins', sans-serif;
    --bbe-fs-xs: clamp(0.8rem, 0.72rem + 0.35vw, 0.9rem);
    --bbe-fs-sm: clamp(0.95rem, 0.85rem + 0.45vw, 1.05rem);
    --bbe-fs-md: clamp(1.05rem, 0.95rem + 0.5vw, 1.15rem);
    --bbe-fs-lg: clamp(1.2rem, 1.05rem + 0.65vw, 1.45rem);
    --bbe-fs-xl: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
    --bbe-space: clamp(0.55rem, 0.45rem + 0.45vw, 1rem);
    --bbe-page-pad: clamp(0.65rem, 0.4rem + 1.2vw, 2rem);
    --bbe-max: 90rem;
    --bbe-radius-card: 8px;

    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: var(--bbe-space) var(--bbe-page-pad);
    box-sizing: border-box;
    background: var(--bbe-bg);
    font-family: var(--bbe-font);
    color: var(--bbe-text);
}

@media (max-width: 767px) {
    .bbe-embed {
        --bbe-fs-xs: 0.85rem;
        --bbe-fs-sm: 0.98rem;
        --bbe-fs-md: 1.05rem;
        --bbe-fs-lg: 1.3rem;
        --bbe-fs-xl: 1.7rem;
        --bbe-page-pad: 0.55rem;
    }
}

.bbe-embed > * {
    width: 100%;
    max-width: var(--bbe-max);
    margin-inline: auto;
    box-sizing: border-box;
}

body.admin-bar {
    --bbe-sticky-offset: 32px;
}

@media (max-width: 782px) {
    body.admin-bar {
        --bbe-sticky-offset: 46px;
    }
}

.et_pb_section:has(.bbe-root),
.et_pb_row:has(.bbe-root),
.et_pb_column:has(.bbe-root),
.et_pb_module:has(.bbe-root),
.et_pb_text:has(.bbe-root),
.et_pb_code:has(.bbe-root),
#page-container:has(.bbe-root) {
    overflow: visible !important;
}

body:has(.bbe-root) header.et-l--header {
    position: relative;
    z-index: 500;
}

.bbe-error {
    color: var(--bbe-error, #c0392b);
    font-style: italic;
}

.bbe-no-results {
    color: var(--bbe-text-secondary, #999);
    font-style: italic;
    padding: 1em 0;
    font-size: var(--bbe-fs-sm, 1rem);
}

.bbe-loading {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.bbe-loading::after {
    content: '';
    position: absolute;
    top: 35%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid var(--bbe-chalk-200);
    border-top-color: var(--bbe-brand);
    border-radius: 50%;
    animation: bbe-spin 0.7s linear infinite;
    z-index: 5;
}

@keyframes bbe-spin {
    to { transform: rotate(360deg); }
}

.bbe-header {
    position: sticky;
    top: var(--bbe-sticky-offset, 0px);
    z-index: 10;
    background: var(--bbe-bg);
    padding: 0.25rem 0 0.35rem;
}

.bbe-heading {
    margin-bottom: 0.35em;
    text-align: center;
}

.bbe-comp-title {
    font-size: var(--bbe-fs-xl);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: var(--bbe-brand);
}

.bbe-subtitle {
    font-size: var(--bbe-fs-sm);
    font-weight: 400;
    color: var(--bbe-text-secondary);
    margin: 0.25em 0 0.5em;
    text-align: center;
}

.bbe-season-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    margin-bottom: var(--bbe-space);
}

.bbe-season-year {
    min-width: 5.5em;
    font-size: var(--bbe-fs-lg);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: var(--bbe-brand);
}

.bbe-season-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.5em;
    line-height: 1;
    color: var(--bbe-aero);
    text-decoration: none;
}

.bbe-season-chevron:hover,
.bbe-season-chevron:focus-visible {
    color: var(--bbe-brand);
}

.bbe-season-chevron.is-disabled {
    opacity: 0.25;
    pointer-events: none;
}

.bbe-scroll-wrap {
    margin-bottom: var(--bbe-space);
}

.bbe-scroller {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bbe-scroller::-webkit-scrollbar {
    display: none;
}

.bbe-scroller > :first-child {
    margin-left: auto;
}

.bbe-scroller > :last-child {
    margin-right: auto;
}

.bbe-scroll-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    min-height: 0.55rem;
    margin-top: 0.35rem;
}

.bbe-scroll-dots:empty,
.bbe-scroll-dots[hidden] {
    display: none;
}

.bbe-scroll-dot {
    width: 0.4rem;
    height: 0.4rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--bbe-chalk-300);
    cursor: pointer;
}

.bbe-scroll-dot.is-active {
    background: var(--bbe-text);
}

.bbe-stations {
    gap: 0.45rem;
    padding: 0.15rem 0.1rem 0.35rem;
    scroll-snap-type: x mandatory;
}

.bbe-station-pill {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45em 0.95em;
    font-size: var(--bbe-fs-sm);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    color: var(--bbe-white);
    background: var(--bbe-chalk-300);
    border-radius: 999px;
    transition: background 0.15s ease;
}

.bbe-station-pill:hover,
.bbe-station-pill:focus-visible {
    color: var(--bbe-white);
    background: var(--bbe-text-secondary);
}

.bbe-station-pill.is-active {
    color: var(--bbe-white);
    background: var(--bbe-aero);
}

.bbe-leagues {
    gap: 0;
    scroll-snap-type: x proximity;
    background-image: linear-gradient(to top, var(--bbe-chalk-200) 2px, transparent 2px);
}

.bbe-league-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55em 0.85em 0.6em;
    font-family: var(--bbe-font);
    font-size: var(--bbe-fs-sm);
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    color: var(--bbe-text-secondary);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.bbe-league-tab:hover,
.bbe-league-tab:focus-visible {
    color: var(--bbe-brand);
}

.bbe-league-tab.is-active {
    font-weight: 700;
    color: var(--bbe-text);
    border-bottom-color: var(--bbe-aero);
}

.bbe-content {
    padding-top: 0.25rem;
}

.bbe-panel[hidden] {
    display: none;
}

.bbe-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bbe-white);
    border-radius: var(--bbe-radius-card);
    box-shadow: var(--bbe-shadow);
}

.bbe-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: var(--bbe-fs-md);
    color: var(--bbe-text);
}

.bbe-table th,
.bbe-table td {
    padding: clamp(0.4rem, 0.3rem + 0.35vw, 0.7rem) clamp(0.35rem, 0.25rem + 0.4vw, 0.75rem) !important;
    text-align: left;
    vertical-align: middle;
    line-height: 1.35;
    overflow: hidden;
    border-bottom: 1px solid var(--bbe-chalk-200);
}

.bbe-table thead th,
.et_pb_module .bbe-table thead th {
    font-size: var(--bbe-fs-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--bbe-white) !important;
    background: var(--bbe-brand) !important;
    border: none;
}

.bbe-table tbody tr {
    background: var(--bbe-white);
}

.bbe-table tbody tr:nth-child(even) {
    background: var(--bbe-chalk-200);
}

.bbe-col-rank {
    width: 4.5rem;
    text-align: center !important;
}

.bbe-col-ftz {
    width: 7.5rem;
    text-align: center !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bbe-col-points {
    width: 5.5rem;
    text-align: right !important;
    white-space: nowrap;
}

.bbe-table td.bbe-col-rank,
.bbe-table td.bbe-col-name,
.bbe-table td.bbe-col-points {
    font-weight: 600;
}

.bbe-person-hint,
.bbe-matchday-count {
    display: block !important;
    margin-top: 0.15em;
    font-size: var(--bbe-fs-xs);
    font-weight: 400;
    color: var(--bbe-text-secondary);
}

.bbe-stat {
    font-weight: 600;
}

.bbe-stat-flash {
    color: var(--bbe-brand);
}

.bbe-stat-top {
    color: var(--bbe-aero);
}

.bbe-stat-zone {
    color: var(--bbe-zone-text);
}

.bbe-ftz-sep {
    margin: 0 0.15em;
    font-weight: 400;
    color: var(--bbe-chalk-300);
}

.bbe-rank-1 td.bbe-col-rank {
    color: var(--bbe-momentum);
}

.bbe-rank-2 td.bbe-col-rank {
    color: var(--bbe-brand);
}

.bbe-rank-3 td.bbe-col-rank {
    color: var(--bbe-aero);
}

.bbe-top-three td.bbe-col-points {
    color: var(--bbe-brand);
}

@media (max-width: 767px) {
    .bbe-table {
        font-size: 1rem;
    }

    .bbe-table th {
        padding: 0.45rem 0.3rem !important;
        font-size: 0.72rem;
        letter-spacing: 0.01em;
    }

    .bbe-table td {
        padding: 0.5rem 0.3rem !important;
    }

    .bbe-col-rank {
        width: 2.6rem;
    }

    .bbe-table th.bbe-col-rank {
        font-size: 0.65rem;
    }

    .bbe-col-ftz {
        width: 5.75rem;
    }

    .bbe-col-points {
        width: 4.25rem;
    }

    .bbe-person-hint {
        font-size: 0.78rem;
    }

    .bbe-ftz-sep {
        margin: 0 0.08em;
    }
}

.bbe-sf {
    --bbe-sf-box-inactive: rgb(193 193 193 / 15%);
    --bbe-sf-box-width: 26px;
    --bbe-sf-box-height: 19px;
    --bbe-sf-box-radius: 3px;
    --bbe-sf-font-box: 0.78rem;
    --bbe-sf-col-boulder: 2.4rem;

    margin: 0 0 var(--bbe-space);
    font-family: var(--bbe-font);
    color: var(--bbe-text);
}

@media (min-width: 768px) {
    .bbe-sf {
        --bbe-sf-box-width: 32px;
        --bbe-sf-box-height: 23px;
        --bbe-sf-font-box: 0.85rem;
        --bbe-sf-col-boulder: 2.9rem;
    }
}

.bbe-section-title {
    margin: 0 0 0.4em;
    font-size: var(--bbe-fs-md);
    font-weight: 600;
    color: var(--bbe-text);
}

.bbe-sf-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bbe-white);
    border-radius: var(--bbe-radius-card);
    box-shadow: var(--bbe-shadow);
}

.bbe-sf-table {
    width: 100%;
    min-width: max-content;
    margin: 0;
    border-collapse: collapse;
    font-size: var(--bbe-fs-md);
    color: var(--bbe-text);
}

.bbe-sf-table th,
.bbe-sf-table td {
    padding: clamp(0.4rem, 0.3rem + 0.35vw, 0.7rem) clamp(0.35rem, 0.25rem + 0.4vw, 0.75rem) !important;
    vertical-align: middle;
    line-height: 1.35;
    border-bottom: 1px solid var(--bbe-chalk-200);
}

.bbe-sf-table thead th,
.et_pb_module .bbe-sf-table thead th {
    font-size: var(--bbe-fs-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--bbe-white) !important;
    background: var(--bbe-brand) !important;
    border: none;
}

.bbe-sf-table tbody tr {
    background: var(--bbe-white);
}

.bbe-sf-table tbody tr:nth-child(even) {
    background: var(--bbe-chalk-200);
}

.bbe-sf-table tr.is-dns {
    opacity: 0.45;
}

.bbe-sf-col-rank,
.bbe-sf-col-boulder,
.bbe-sf-col-total {
    text-align: center !important;
    white-space: nowrap;
}

.bbe-sf-col-rank {
    width: 3.5rem;
}

.bbe-sf-col-boulder {
    width: var(--bbe-sf-col-boulder);
}

.bbe-sf-col-name {
    min-width: 9rem;
    text-align: left !important;
}

.bbe-sf-main {
    display: block;
    font-weight: 700;
    line-height: 1.25;
    color: var(--bbe-text);
}

.bbe-sf-hint {
    display: block;
    margin-top: 0.15em;
    font-size: var(--bbe-fs-xs);
    font-weight: 400;
    color: var(--bbe-text-secondary);
}

.bbe-sf-col-total .bbe-sf-hint {
    font-weight: 500;
}

.bbe-sf-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 4px;
    font-size: var(--bbe-fs-xs);
    font-weight: 600;
    color: var(--bbe-text-secondary);
    border: 1px solid var(--bbe-chalk-300);
    border-radius: var(--bbe-sf-box-radius);
    vertical-align: middle;
}

.bbe-sf-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--bbe-sf-box-width);
    height: var(--bbe-sf-box-height);
    margin: 0 auto;
    font-size: var(--bbe-sf-font-box);
    font-weight: 600;
    line-height: 1;
    color: var(--bbe-text-secondary);
    background: var(--bbe-sf-box-inactive);
}

.bbe-sf-box-top {
    border-radius: var(--bbe-sf-box-radius) var(--bbe-sf-box-radius) 0 0;
}

.bbe-sf-box-zone {
    margin-top: 1px;
    border-radius: 0 0 var(--bbe-sf-box-radius) var(--bbe-sf-box-radius);
}

.bbe-sf-box.is-active {
    color: var(--bbe-white);
}

.bbe-sf-box-top.is-active {
    background: var(--bbe-aero);
}

.bbe-sf-box-zone.is-active {
    background: var(--bbe-zone);
}
