/* Spelling Bee events hub + event pages. Everything is scoped to .osb-ev. */

.osb-ev {
    --ev-primary: #1795dc;
    --ev-primary-hover: #1283c4;
    --ev-primary-soft: #e8f5fc;
    --ev-text: #14171f;
    --ev-text-2: #4b5260;
    --ev-muted: #7a8190;
    --ev-border: #e6e8ec;
    --ev-bg: #f6f7f9;
    --ev-surface: #ffffff;
    --ev-success: #15803d;
    --ev-success-soft: #e7f6ec;
    --ev-warning: #b45309;
    --ev-warning-soft: #fdf1de;
    --ev-danger: #b91c1c;
    --ev-danger-soft: #fdecec;
    --ev-radius: 16px;
    --ev-radius-sm: 10px;
    --ev-shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
    --ev-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    font-family: var(--ev-font);
    color: var(--ev-text);
    line-height: 1.55;
}

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

.osb-ev h1, .osb-ev h2, .osb-ev h3, .osb-ev p, .osb-ev ul, .osb-ev ol, .osb-ev dl, .osb-ev dd, .osb-ev figure {
    margin: 0;
    padding: 0;
    font-family: var(--ev-font);
    color: inherit;
    text-transform: none;
    letter-spacing: normal;
}

.osb-ev ul, .osb-ev ol { list-style: none; }
.osb-ev a { color: var(--ev-primary); text-decoration: none; }
.osb-ev a:hover { text-decoration: underline; }
.osb-ev img { max-width: 100%; height: auto; display: block; }
.osb-ev [hidden] { display: none !important; }

.osb-ev-muted { color: var(--ev-text-2); }

.osb-ev-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


.osb-ev-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px !important;
}

.osb-ev-count {
    font-size: .8rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--ev-primary-soft);
    color: var(--ev-primary);
}

/* ---------- Pills ---------- */
.osb-ev-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: #eef0f2;
    color: var(--ev-text-2);
}

.osb-ev-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.osb-ev-pill--registration_open { background: var(--ev-success-soft); color: var(--ev-success); }
.osb-ev-pill--live { background: var(--ev-danger-soft); color: var(--ev-danger); }
.osb-ev-pill--live::before { animation: osbEvPulse 1.4s ease-in-out infinite; }
.osb-ev-pill--registration_closed { background: var(--ev-warning-soft); color: var(--ev-warning); }
.osb-ev-pill--completed { background: var(--ev-primary-soft); color: var(--ev-primary); }

@keyframes osbEvPulse { 50% { opacity: .3; } }

/* ---------- Buttons ---------- */
.osb-ev-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--ev-radius-sm);
    border: 1px solid transparent;
    font: 600 .95rem/1.2 var(--ev-font);
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.osb-ev-btn:active { transform: scale(.98); }
.osb-ev-btn:disabled { opacity: .6; cursor: progress; }
.osb-ev-btn--block { width: 100%; }

/* !important: the theme styles every button[type=submit] orange */
.osb-ev .osb-ev-btn--primary { background: var(--ev-primary) !important; color: #fff !important; border-color: transparent !important; }
.osb-ev .osb-ev-btn--primary:hover { background: var(--ev-primary-hover) !important; }

.osb-ev .osb-ev-btn--ghost { background: var(--ev-surface) !important; color: var(--ev-text) !important; border-color: var(--ev-border) !important; }
.osb-ev .osb-ev-btn--ghost:hover { border-color: #cfd3da !important; background: var(--ev-bg) !important; }

.osb-ev-btn--light { background: #fff; color: var(--ev-text) !important; }

.osb-ev a:focus-visible,
.osb-ev button:focus-visible,
.osb-ev input:focus-visible,
.osb-ev select:focus-visible,
.osb-ev textarea:focus-visible {
    outline: 3px solid rgba(23, 149, 220, .35);
    outline-offset: 2px;
}

/* ================================================================
   Hub
   ================================================================ */
/* ---------- Slider ---------- */
.osb-ev-slider {
    position: relative;
    margin-bottom: 56px;
}

.osb-ev-slider__track {
    position: relative;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: var(--ev-radius);
    box-shadow: var(--ev-shadow);
}

.osb-ev-slider__track::-webkit-scrollbar { display: none; }

.osb-ev-slide {
    position: relative;
    flex: 0 0 100%;
    scroll-snap-align: start;
    min-height: 440px;
}

.osb-ev-slide__link {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    color: #fff !important;
    text-decoration: none !important;
}

.osb-ev-slide__media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform .6s ease;
}

/* Scrim strong enough for bright, text-heavy covers such as flyers */
.osb-ev-slide__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10,12,30,.78) 0%, rgba(10,12,30,.45) 45%, rgba(10,12,30,0) 75%),
        linear-gradient(180deg, rgba(10,12,30,.1) 0%, rgba(10,12,30,.45) 50%, rgba(10,12,30,.9) 100%);
}

.osb-ev-slide__link:hover .osb-ev-slide__media { transform: scale(1.03); }

.osb-ev-slide__media--fallback,
.osb-ev-card__media--fallback {
    background: radial-gradient(circle at 20% 20%, #5cc0f2 0%, transparent 55%),
                radial-gradient(circle at 85% 30%, #f59e0b 0%, transparent 45%),
                linear-gradient(135deg, #0e6aa3 0%, #083a5e 100%);
}

.osb-ev-slide__year {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 800;
    line-height: 1;
    color: rgba(255,255,255,.12);
}

.osb-ev-slide__body {
    position: relative;
    z-index: 1;
    max-width: 640px;
    padding: 40px 48px 92px;
}

/* Stage caption: an accent bar in the stage's colour plus letter-spaced text */
.osb-ev-slide__kicker {
    --kicker-accent: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px !important;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
    color: rgba(255, 255, 255, .92);
}

.osb-ev-slide__kicker-bar {
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--kicker-accent);
    box-shadow: 0 0 12px var(--kicker-accent);
}

.osb-ev-slide__kicker--registration_open { --kicker-accent: #4ade80; }
.osb-ev-slide__kicker--live { --kicker-accent: #f87171; }
.osb-ev-slide__kicker--live .osb-ev-slide__kicker-bar { animation: osbEvPulse 1.4s ease-in-out infinite; }
.osb-ev-slide__kicker--registration_closed { --kicker-accent: #fbbf24; }
.osb-ev-slide__kicker--awaiting_results { --kicker-accent: #7dd3fc; }
.osb-ev-slide__kicker--cancelled { --kicker-accent: #94a3b8; }

.osb-ev-slide__title {
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff !important;
    margin-bottom: 10px !important;
}

.osb-ev-slide__meta { font-size: 1rem; opacity: .9; margin-bottom: 6px !important; }
.osb-ev-slide__context { font-size: 1rem; font-weight: 600; margin-bottom: 22px !important; }

/* Prev / counter / next in one translucent control */
.osb-ev-slider__controls {
    position: absolute;
    right: 24px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .38);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.osb-ev .osb-ev-slider__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none !important;
    border-radius: 50%;
    background: transparent !important;
    color: #fff !important;
    cursor: pointer;
    transition: background-color .15s ease;
}

.osb-ev .osb-ev-slider__nav:hover { background: rgba(255, 255, 255, .16) !important; }
.osb-ev .osb-ev-slider__nav:active { background: rgba(255, 255, 255, .24) !important; }
.osb-ev .osb-ev-slider__nav:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.osb-ev-slider__nav svg { width: 18px; height: 18px; }

.osb-ev-slider__counter {
    min-width: 58px;
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

.osb-ev-slider__counter-sep { margin: 0 5px; opacity: .45; }

.osb-ev-slider__dots {
    position: absolute;
    left: 48px;
    bottom: 42px; /* centred on the prev/next control */
    display: flex;
    gap: 8px;
}

.osb-ev-slider__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    transition: width .25s ease, background-color .25s ease;
}

.osb-ev-slider__dot.is-active { width: 28px; background: #fff; }

/* ---------- All events ---------- */
.osb-ev-all__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.osb-ev-all__header .osb-ev-section-title { margin-bottom: 0 !important; }

.osb-ev-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.osb-ev-chip {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--ev-border);
    background: var(--ev-surface);
    color: var(--ev-text-2);
    font: 600 .85rem/1 var(--ev-font);
    cursor: pointer;
    transition: all .15s ease;
}

.osb-ev-chip:hover { border-color: #cfd3da; color: var(--ev-text); }
.osb-ev-chip.is-active { background: var(--ev-text); border-color: var(--ev-text); color: #fff; }

.osb-ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.osb-ev-card {
    display: flex;
    flex-direction: column;
    background: var(--ev-surface);
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    overflow: hidden;
    color: inherit !important;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.osb-ev-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ev-shadow);
    border-color: #d7dae0;
}

.osb-ev-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.osb-ev-card__media span {
    font-size: 2.6rem;
    font-weight: 800;
    color: rgba(255,255,255,.85);
}

.osb-ev-card__body { padding: 18px 20px 22px; }
.osb-ev-card__title { font-size: 1.1rem; font-weight: 700; line-height: 1.3; margin: 12px 0 6px !important; }
.osb-ev-card__meta { font-size: .9rem; color: var(--ev-muted); margin-bottom: 4px !important; }
.osb-ev-card__context { font-size: .9rem; font-weight: 600; color: var(--ev-text-2); }

.osb-ev-phase--cancelled.osb-ev-card { opacity: .6; }

.osb-ev-empty,
.osb-ev-empty-filter {
    text-align: center;
    padding: 48px 20px;
    border: 1px dashed #d7dae0;
    border-radius: var(--ev-radius);
    color: var(--ev-text-2);
}

.osb-ev-empty h2 { font-size: 1.2rem; margin-bottom: 6px !important; }

/* ================================================================
   Event page
   ================================================================ */
.osb-ev-breadcrumb { margin-bottom: 16px; font-size: .92rem; font-weight: 600; }
.osb-ev-breadcrumb a { color: var(--ev-text-2); }

/* Hero (2/3) + flyer (1/3); the hero spans the full width when there's no flyer */
.osb-ev-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

.osb-ev-top--with-flyer {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: stretch;
}

.osb-ev-hero {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: var(--ev-radius);
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 85% 15%, rgba(92, 192, 242, .4) 0%, transparent 45%),
                radial-gradient(circle at 10% 90%, rgba(6, 48, 78, .55) 0%, transparent 50%),
                linear-gradient(135deg, #0a4c7a 0%, #0e6aa3 100%);
}

.osb-ev-hero__inner { padding: 48px; max-width: 760px; }

/* A4-proportioned flyer; the full image opens in the lightbox */
.osb-ev-flyer {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1.414;
    border-radius: var(--ev-radius);
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--ev-shadow);
    cursor: zoom-in;
    text-decoration: none !important;
}

.osb-ev-flyer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .4s ease;
}

.osb-ev-flyer:hover img { transform: scale(1.03); }

.osb-ev-flyer__hint {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    opacity: .9;
    transition: opacity .2s ease;
}

.osb-ev-flyer:hover .osb-ev-flyer__hint { opacity: 1; }
.osb-ev-flyer__hint svg { width: 14px; height: 14px; }

.osb-ev-hero .osb-ev-pill { background: rgba(255,255,255,.95); }

.osb-ev-hero__title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff !important;
    margin: 16px 0 12px !important;
}

.osb-ev-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: 1.02rem;
    opacity: .92;
}

.osb-ev-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.osb-ev .osb-ev-hero .osb-ev-btn--primary { background: #fff !important; color: var(--ev-text) !important; }
.osb-ev .osb-ev-hero .osb-ev-btn--primary:hover { background: #eef0ff !important; }
.osb-ev .osb-ev-hero .osb-ev-btn--ghost { background: rgba(255,255,255,.1) !important; border-color: rgba(255,255,255,.35) !important; color: #fff !important; }
.osb-ev .osb-ev-hero .osb-ev-btn--ghost:hover { background: rgba(255,255,255,.18) !important; }

.osb-ev-countdown { margin-top: 28px; }
.osb-ev-countdown__label { font-size: .9rem; font-weight: 600; opacity: .9; margin-bottom: 10px !important; }
.osb-ev-countdown__units { display: flex; gap: 10px; }

.osb-ev-countdown__units div {
    min-width: 72px;
    padding: 12px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    text-align: center;
    backdrop-filter: blur(4px);
}

.osb-ev-countdown__units strong { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.osb-ev-countdown__units span { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }

/* ---------- Layout ---------- */
.osb-ev-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 36px;
    align-items: start;
}

.osb-ev-main,
.osb-ev-aside { min-width: 0; }
.osb-ev-main > * + * { margin-top: 44px; }
.osb-ev-aside { display: grid; gap: 20px; position: sticky; top: 24px; }

.osb-ev-section { scroll-margin-top: 24px; }

.osb-ev-prose p { color: var(--ev-text-2); font-size: 1.02rem; margin-bottom: 12px !important; }

/* ---------- Notices ---------- */
.osb-ev-notice {
    padding: 18px 20px;
    border-radius: var(--ev-radius-sm);
    background: var(--ev-warning-soft);
    border: 1px solid #f6dcb1;
}

.osb-ev-notice strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.osb-ev-notice p { color: var(--ev-text-2); }
.osb-ev-notice .osb-ev-btn { margin-top: 12px; }
.osb-ev-notice--live { background: var(--ev-danger-soft); border-color: #f5c6c6; }
.osb-ev-notice--success { background: var(--ev-success-soft); border-color: #bfe3cb; }
.osb-ev-notice--muted { background: var(--ev-bg); border-color: var(--ev-border); }

/* ---------- Steps ---------- */
.osb-ev-steps { display: grid; gap: 14px; }

.osb-ev-steps li {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius-sm);
    background: var(--ev-surface);
}

.osb-ev-steps__num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: var(--ev-primary-soft);
    color: var(--ev-primary);
}

.osb-ev-steps h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 4px !important; }
.osb-ev-steps p { color: var(--ev-text-2); font-size: .95rem; }

/* ---------- Sign-up ---------- */
.osb-ev-signup { display: grid; gap: 24px; }

.osb-ev-signup__returning,
.osb-ev-signup__new {
    padding: 26px;
    border-radius: var(--ev-radius);
    border: 1px solid var(--ev-border);
    background: var(--ev-surface);
}

.osb-ev-signup__returning { background: var(--ev-bg); }
.osb-ev-signup__returning .osb-ev-section-title,
.osb-ev-signup__new .osb-ev-section-title { font-size: 1.15rem; margin-bottom: 6px !important; }

.osb-ev-signup__returning-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.osb-ev-inline-field { display: flex; gap: 10px; }

/* ---------- Login popup ---------- */
.osb-ev-modal {
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    padding: 32px 28px 26px;
    border: none;
    border-radius: var(--ev-radius);
    background: var(--ev-surface);
    color: var(--ev-text);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
    overflow-y: auto;
}

.osb-ev-modal::backdrop { background: rgba(15, 23, 42, .6); backdrop-filter: blur(2px); }

.osb-ev-modal[open] { animation: osbEvModalIn .2s ease; }
@keyframes osbEvModalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.osb-ev-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--ev-bg);
    color: var(--ev-text-2);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.osb-ev-modal__close:hover { background: #e9ebef; color: var(--ev-text); }

.osb-ev-modal__header { margin-bottom: 18px; padding-right: 24px; }
.osb-ev-modal__header h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px !important; }
.osb-ev-modal__header p { color: var(--ev-text-2); font-size: .92rem; }

.osb-ev-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 18px;
    border-radius: 10px;
    background: #edeef1;
}

.osb-ev-tab {
    flex: 1;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ev-text-2);
    font: 600 .88rem/1 var(--ev-font);
    cursor: pointer;
}

.osb-ev-tab.is-active { background: #fff; color: var(--ev-primary); box-shadow: 0 1px 2px rgba(16,24,40,.08); }

.osb-ev-tab-panel label,
.osb-ev-modal__email label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 6px;
}

.osb-ev-tab-panel form > input { margin-bottom: 12px !important; }
.osb-ev-tab-panel .osb-ev-form-message:empty { display: none; }

/* WordPress's own login form inside the popup */
.osb-ev-modal #osb-ev-wp-login p { margin: 0 0 12px !important; }

.osb-ev-modal #osb-ev-wp-login input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d7dae0;
    border-radius: var(--ev-radius-sm);
    font: 400 .95rem/1.4 var(--ev-font);
}

.osb-ev-modal #osb-ev-wp-login .login-remember label { display: flex; align-items: center; gap: 6px; font-weight: 500; }

.osb-ev-modal #osb-ev-wp-login #wp-submit {
    width: 100%;
    padding: 12px 22px;
    border: none !important;
    border-radius: var(--ev-radius-sm) !important;
    background: var(--ev-primary) !important;
    color: #fff !important;
    font: 600 .95rem/1.2 var(--ev-font) !important;
    cursor: pointer;
}

.osb-ev-modal #osb-ev-wp-login #wp-submit:hover { background: var(--ev-primary-hover) !important; }

.osb-ev-modal__small { font-size: .85rem; text-align: center; }

.osb-ev-modal__email {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--ev-border);
}

.osb-ev-modal__email label { color: var(--ev-text-2); font-weight: 500; }
.osb-ev-inline-field input { flex: 1; min-width: 0; }

.osb-ev-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
    margin-top: 20px;
}

.osb-ev-field--full { grid-column: 1 / -1; }
.osb-ev-field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ev-text); }
.osb-ev-field label span { color: var(--ev-danger); }

.osb-ev input[type="text"],
.osb-ev input[type="email"],
.osb-ev input[type="tel"],
.osb-ev select,
.osb-ev textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d7dae0;
    border-radius: var(--ev-radius-sm);
    background: #fff;
    color: var(--ev-text);
    font: 400 .95rem/1.4 var(--ev-font);
    transition: border-color .15s ease, box-shadow .15s ease;
    margin: 0;
    height: auto;
}

.osb-ev input:focus,
.osb-ev select:focus,
.osb-ev textarea:focus {
    outline: none;
    border-color: var(--ev-primary);
    box-shadow: 0 0 0 3px var(--ev-primary-soft);
}

.osb-ev select:disabled { background: var(--ev-bg); color: var(--ev-muted); }

.osb-ev-form-message { margin-top: 10px !important; font-size: .92rem; font-weight: 600; color: var(--ev-text-2); min-height: 1.2em; }
.osb-ev-form-message.is-success { color: var(--ev-success); }
.osb-ev-form-message.is-error { color: var(--ev-danger); }

/* ---------- Results placeholder ---------- */
.osb-ev-placeholder {
    text-align: center;
    padding: 44px 24px;
    border-radius: var(--ev-radius);
    border: 1px dashed #d7dae0;
    background: var(--ev-bg);
}

.osb-ev-placeholder__icon { display: block; width: 40px; height: 40px; margin: 0 auto 12px; color: var(--ev-primary); }
.osb-ev-placeholder h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px !important; }
.osb-ev-placeholder p { color: var(--ev-text-2); max-width: 420px; margin: 0 auto !important; }

/* ---------- Media ---------- */
.osb-ev-video { margin-bottom: 20px !important; }

.osb-ev-video__frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--ev-radius);
    overflow: hidden;
    background: #000;
}

.osb-ev-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.osb-ev-video figcaption { margin-top: 10px; font-size: .92rem; color: var(--ev-text-2); }
.osb-ev-video figcaption strong { display: block; color: var(--ev-text); }

.osb-ev-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.osb-ev-gallery__item {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--ev-radius-sm);
    overflow: hidden;
    background: var(--ev-bg);
}

.osb-ev-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.osb-ev-gallery__item:hover img { transform: scale(1.05); }

.osb-ev-lightbox {
    max-width: min(1100px, 94vw);
    max-height: 92vh;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: #0b0c10;
    overflow: visible;
}

.osb-ev-lightbox::backdrop { background: rgba(5,6,10,.88); }
.osb-ev-lightbox img { max-width: 100%; max-height: 86vh; margin: 0 auto; border-radius: 12px; }

.osb-ev-lightbox__close,
.osb-ev-lightbox__nav {
    position: absolute;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.92);
    color: #111;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.osb-ev-lightbox__close { top: -14px; right: -14px; }
.osb-ev-lightbox__nav { top: 50%; transform: translateY(-50%); }
.osb-ev-lightbox__nav--prev { left: -22px; }
.osb-ev-lightbox__nav--next { right: -22px; }

/* ---------- Participating schools: one horizontally scrolling row ---------- */
.osb-ev-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.osb-ev-section-head .osb-ev-section-title { margin-bottom: 0 !important; }

.osb-ev-hscroll-nav { display: flex; gap: 6px; }

.osb-ev .osb-ev-hscroll-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--ev-border) !important;
    border-radius: 50%;
    background: var(--ev-surface) !important;
    color: var(--ev-text) !important;
    cursor: pointer;
    transition: background-color .15s ease, opacity .15s ease;
}

.osb-ev .osb-ev-hscroll-nav button:hover { background: var(--ev-bg) !important; }
.osb-ev .osb-ev-hscroll-nav button:disabled { opacity: .35; cursor: default; }
.osb-ev-hscroll-nav svg { width: 16px; height: 16px; }

.osb-ev-schools {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
            mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.osb-ev-schools::-webkit-scrollbar { display: none; }
.osb-ev-schools.is-at-end { -webkit-mask-image: none; mask-image: none; }

/* Continuous loop (events.js): no snapping, soft fade on both edges */
.osb-ev-schools.is-marquee {
    scroll-snap-type: none;
    scroll-behavior: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.osb-ev-schools.is-marquee li { scroll-snap-align: none; }

.osb-ev-schools li {
    flex: 0 0 240px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius-sm);
    background: var(--ev-surface);
    scroll-snap-align: start;
}

.osb-ev-schools__initial {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ev-primary-soft);
    color: var(--ev-primary);
    font-weight: 700;
}

.osb-ev-schools__text { min-width: 0; }
.osb-ev-schools strong { display: block; font-size: .92rem; line-height: 1.3; }
.osb-ev-schools__text > span { display: block; font-size: .8rem; color: var(--ev-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Event progress ---------- */
.osb-ev .osb-ev-progress {
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    background: var(--ev-surface);
    box-shadow: var(--ev-shadow);
    overflow: hidden;
}

.osb-ev .osb-ev-progress__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px 28px;
    border-bottom: 1px solid var(--ev-border);
}

.osb-ev .osb-ev-progress__status { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }

.osb-ev .osb-ev-progress__dot {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--ev-primary);
    box-shadow: 0 0 0 5px var(--ev-primary-soft);
}

.osb-ev .osb-ev-progress.is-live .osb-ev-progress__dot {
    background: var(--ev-danger);
    box-shadow: 0 0 0 5px var(--ev-danger-soft);
    animation: osbEvPulse 1.4s ease-in-out infinite;
}

.osb-ev .osb-ev-progress__headline { margin: 0 !important; font-size: 1.15rem; font-weight: 800; line-height: 1.3; color: var(--ev-text); }
.osb-ev .osb-ev-progress__subline { margin: 2px 0 0 !important; font-size: .92rem; color: var(--ev-text-2); }

.osb-ev .osb-ev-progress__count { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.osb-ev .osb-ev-progress__count-text { font-size: .85rem; color: var(--ev-muted); white-space: nowrap; }
.osb-ev .osb-ev-progress__count-text strong { font-size: 1.05rem; color: var(--ev-text); }

.osb-ev .osb-ev-progress__bar {
    display: block;
    width: 160px;
    height: 6px;
    border-radius: 999px;
    background: #eceef2;
    overflow: hidden;
}

.osb-ev .osb-ev-progress__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ev-primary), #5cc0f2);
}

/* Stepper: equal columns, one continuous track behind the markers */
.osb-ev ol.osb-ev-stepper {
    --osb-marker: 30px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--osb-steps), minmax(0, 1fr));
    margin: 0 !important;
    padding: 30px 12px 28px !important;
    list-style: none !important;
}

.osb-ev ol.osb-ev-stepper::before,
.osb-ev ol.osb-ev-stepper::after {
    content: "";
    position: absolute;
    top: calc(30px + var(--osb-marker) / 2 - 2px);
    left: calc(12px + (100% - 24px) / var(--osb-steps) / 2);
    height: 4px;
    border-radius: 999px;
}

/* grey track spans first to last marker; the fill covers the finished part */
.osb-ev ol.osb-ev-stepper::before {
    right: calc(12px + (100% - 24px) / var(--osb-steps) / 2);
    background: #e6e8ec;
}

.osb-ev ol.osb-ev-stepper::after {
    width: calc((100% - 24px - (100% - 24px) / var(--osb-steps)) * var(--osb-fill));
    background: linear-gradient(90deg, var(--ev-primary), #5cc0f2);
    transition: width .6s ease;
}

.osb-ev .osb-ev-stepper__step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0 !important;
    padding: 0 6px !important;
    list-style: none !important;
    text-align: center;
}

.osb-ev .osb-ev-stepper__step::before,
.osb-ev .osb-ev-stepper__step::marker { content: none; }

.osb-ev .osb-ev-stepper__marker {
    width: var(--osb-marker);
    height: var(--osb-marker);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ev-surface);
    border: 3px solid #d7dae0;
    color: #fff;
    transition: transform .2s ease;
}

.osb-ev .osb-ev-stepper__marker svg { width: 14px; height: 14px; }

.osb-ev .osb-ev-stepper__step.is-done .osb-ev-stepper__marker {
    background: var(--ev-primary);
    border-color: var(--ev-primary);
}

.osb-ev .osb-ev-stepper__step.is-current .osb-ev-stepper__marker {
    border-color: var(--ev-primary);
    box-shadow: 0 0 0 6px var(--ev-primary-soft);
    transform: scale(1.08);
}

.osb-ev .osb-ev-stepper__step.is-current .osb-ev-stepper__marker::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ev-primary);
}

.osb-ev .osb-ev-stepper__step.is-live .osb-ev-stepper__marker { border-color: var(--ev-danger); box-shadow: 0 0 0 6px var(--ev-danger-soft); }
.osb-ev .osb-ev-stepper__step.is-live .osb-ev-stepper__marker::after { background: var(--ev-danger); animation: osbEvPulse 1.4s ease-in-out infinite; }

.osb-ev .osb-ev-stepper__text { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.osb-ev .osb-ev-stepper__label { font-size: .95rem; font-weight: 700; line-height: 1.3; color: var(--ev-text); }
.osb-ev .osb-ev-stepper__step.is-upcoming .osb-ev-stepper__label { color: var(--ev-muted); font-weight: 600; }
.osb-ev .osb-ev-stepper__date { font-size: .8rem; line-height: 1.35; color: var(--ev-muted); }

.osb-ev .osb-ev-stepper__badge {
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--ev-primary);
    color: #fff;
}

.osb-ev .osb-ev-stepper__step.is-live .osb-ev-stepper__badge { background: var(--ev-danger); }

/* Headline numbers in the card footer */
.osb-ev dl.osb-ev-progress__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 !important;
    border-top: 1px solid var(--ev-border);
    background: var(--ev-bg);
}

.osb-ev .osb-ev-progress__stats > div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    padding: 18px 28px;
}

/* number first, label under it — kept top-aligned even when a label wraps */
.osb-ev .osb-ev-progress__stats dd { order: -1; }

.osb-ev .osb-ev-progress__stats > div + div { border-left: 1px solid var(--ev-border); }
.osb-ev .osb-ev-progress__stats dt { font-size: .82rem; color: var(--ev-muted); }
.osb-ev .osb-ev-progress__stats dd { margin: 0 !important; font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--ev-text); font-variant-numeric: tabular-nums; }

/* ---------- Groups & schedule ---------- */
.osb-ev-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.osb-ev-group {
    padding: 16px 18px;
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius-sm);
    background: var(--ev-surface);
}

.osb-ev-group.is-yours { border-color: var(--ev-primary); box-shadow: 0 0 0 3px var(--ev-primary-soft); }
.osb-ev-group__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.osb-ev-group__head h3 { font-size: 1rem; font-weight: 700; }

.osb-ev-group__yours {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ev-primary);
}

.osb-ev-group__when { margin: 4px 0 10px !important; font-size: .85rem; font-weight: 600; color: var(--ev-text-2); }
.osb-ev-group__schools li { padding: 6px 0; border-top: 1px solid #f1f2f4; font-size: .88rem; }
.osb-ev-group__schools li.is-you { font-weight: 700; color: var(--ev-primary); }
.osb-ev-group__empty { font-size: .85rem; color: var(--ev-muted); }

.osb-ev-group__done {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ev-success);
}
.osb-ev .osb-ev-group__schools li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.osb-ev-group__through { flex: none; font-size: .75rem; font-weight: 700; color: var(--ev-success); }

/* ---------- Registration Status page (no or unknown link) ---------- */
.osb-ev.osb-ev-status { padding-top: 48px; padding-bottom: 72px; }
.osb-ev-status__card {
    max-width: 520px;
    margin: 0 auto;
    padding: 40px 32px;
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    background: var(--ev-surface);
    box-shadow: var(--ev-shadow);
    text-align: center;
}
.osb-ev-status__icon {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--ev-primary-soft);
    color: var(--ev-primary);
}
.osb-ev .osb-ev-status__card h2 { margin-bottom: 8px !important; font-size: 1.4rem; font-weight: 800; }
.osb-ev .osb-ev-status__card > p { margin-bottom: 22px !important; color: var(--ev-text-2); }
.osb-ev .osb-ev-status__card p.osb-ev-status__hint { margin: 14px 0 0 !important; font-size: .85rem; color: var(--ev-muted); }
.osb-ev .osb-ev-status__card p.osb-ev-status__hint + p.osb-ev-status__hint { margin-top: 4px !important; }

/* Tournament pointer under a timeline step: "Now: Quarter Finals →" (links to Groups & schedule) */
.osb-ev a.osb-ev-stepper__stage {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    margin-top: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--ev-primary-soft);
    color: var(--ev-primary);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.osb-ev a.osb-ev-stepper__stage:hover { background: var(--ev-primary); color: #fff; }
.osb-ev a.osb-ev-stepper__stage:focus-visible { outline: 2px solid var(--ev-primary); outline-offset: 2px; }
.osb-ev a.osb-ev-stepper__stage.is-now::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: osbEvPulse 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    .osb-ev a.osb-ev-stepper__stage.is-now::before { animation: none; }
}

/* ---------- Livestreams (Groups & schedule) ---------- */
.osb-ev .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.osb-ev a.osb-ev-watch {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid var(--ev-border);
    border-radius: 999px;
    background: var(--ev-surface);
    color: var(--ev-text);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.osb-ev a.osb-ev-watch:hover { border-color: var(--ev-primary); color: var(--ev-primary); }
.osb-ev a.osb-ev-watch:focus-visible { outline: 2px solid var(--ev-primary); outline-offset: 2px; }
.osb-ev-watch__icon {
    width: 0; height: 0;
    border-style: solid;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent currentColor;
}
.osb-ev a.osb-ev-watch.is-live { border-color: #dc2626; background: #dc2626; color: #fff; }
.osb-ev a.osb-ev-watch.is-live:hover { background: #b91c1c; color: #fff; }
.osb-ev a.osb-ev-watch.is-live .osb-ev-watch__icon { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; animation: osbEvPulse 1.4s ease-in-out infinite; }
.osb-ev a.osb-ev-watch.is-replay { color: var(--ev-text-2); }

.osb-ev-group__watch { margin: -2px 0 10px; }
.osb-ev-match__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.osb-ev .osb-ev-match__foot .osb-ev-match__when { margin-top: 0 !important; }

.osb-ev-stage-tab__state.is-streaming { color: #dc2626 !important; }

.osb-ev-live {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #fecaca;
    border-radius: var(--ev-radius-sm);
    background: #fff;
}
.osb-ev .osb-ev-live__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px !important; font-size: .92rem; }
.osb-ev-live__head strong { color: #dc2626; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
.osb-ev-live__dot { width: 9px; height: 9px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .18); animation: osbEvPulse 1.4s ease-in-out infinite; }
.osb-ev-live__player { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.osb-ev-live__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.osb-ev-live__more { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.osb-ev-live__session { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; }

.osb-ev-stream-modal {
    width: min(960px, calc(100vw - 24px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #0b0d12;
    color: #fff;
    overflow: hidden;
}
.osb-ev-stream-modal::backdrop { background: rgba(10, 12, 20, .8); }
.osb-ev-stream-modal__head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; }
.osb-ev .osb-ev-stream-modal__head h2 { flex: 1; min-width: 0; margin: 0 !important; font-size: .95rem; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osb-ev a.osb-ev-stream-modal__open { color: #cbd5e1; font-size: .82rem; text-decoration: underline; white-space: nowrap; }
.osb-ev button.osb-ev-stream-modal__close { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.osb-ev button.osb-ev-stream-modal__close:hover { background: rgba(255,255,255,.22); }
.osb-ev-stream-modal__player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.osb-ev-stream-modal__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (prefers-reduced-motion: reduce) {
    .osb-ev a.osb-ev-watch.is-live .osb-ev-watch__icon, .osb-ev-live__dot { animation: none; }
}

/* ---------- Stage tabs (group stage → knockout rounds) ---------- */
.osb-ev-stages__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.osb-ev-stages__head .osb-ev-section-title { margin-bottom: 0 !important; }
.osb-ev-stages__head .osb-ev-muted { font-size: .85rem; }

.osb-ev-stage-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    border: 1px solid var(--ev-border);
    border-radius: 14px;
    background: var(--ev-bg);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.osb-ev-stage-tabs::-webkit-scrollbar { display: none; }

.osb-ev button.osb-ev-stage-tab {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: var(--ev-text-2);
    font: inherit;
    font-family: var(--ev-font);
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.25;
    cursor: pointer;
    scroll-snap-align: start;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.osb-ev button.osb-ev-stage-tab:hover { background: rgba(255,255,255,.6); color: var(--ev-text); }
.osb-ev button.osb-ev-stage-tab:focus-visible { outline: 2px solid var(--ev-primary); outline-offset: 1px; }
.osb-ev button.osb-ev-stage-tab[aria-selected="true"] {
    background: var(--ev-surface);
    color: var(--ev-text);
    box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 2px 8px rgba(16,24,40,.06);
}

.osb-ev-stage-tab__num {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid #cfd3da;
    background: var(--ev-surface);
    color: var(--ev-muted);
    font-size: .78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.osb-ev-stage-tab.is-completed .osb-ev-stage-tab__num { border-color: var(--ev-success); background: var(--ev-success); color: #fff; }
.osb-ev-stage-tab.is-in-progress .osb-ev-stage-tab__num { border-color: var(--ev-warning); color: var(--ev-warning); box-shadow: 0 0 0 3px var(--ev-warning-soft); }
.osb-ev button.osb-ev-stage-tab[aria-selected="true"].is-upcoming .osb-ev-stage-tab__num { border-color: var(--ev-primary); color: var(--ev-primary); }

.osb-ev-stage-tab__text { display: flex; flex-direction: column; min-width: 0; }
.osb-ev-stage-tab__name { font-size: .92rem; font-weight: 700; white-space: nowrap; }
.osb-ev-stage-tab__state { font-size: .74rem; font-weight: 600; color: var(--ev-muted); }
.osb-ev-stage-tab.is-completed .osb-ev-stage-tab__state { color: var(--ev-success); }
.osb-ev-stage-tab.is-in-progress .osb-ev-stage-tab__state { color: var(--ev-warning); }

.osb-ev-stage-panel:focus { outline: none; }
.osb-ev-stage-panel:focus-visible { outline: 2px solid var(--ev-primary); outline-offset: 4px; border-radius: var(--ev-radius-sm); }
.osb-ev-stage-panel__intro { margin-bottom: 14px !important; font-size: .92rem; color: var(--ev-text-2); }
.osb-ev-stage-panel__empty {
    padding: 28px 20px;
    border: 1px dashed var(--ev-border);
    border-radius: var(--ev-radius-sm);
    text-align: center;
    font-size: .9rem;
    color: var(--ev-muted);
}

/* ---------- Match-ups ---------- */
.osb-ev-matches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.osb-ev-match {
    display: flex;
    flex-direction: column;
    padding: 14px 16px 12px;
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius-sm);
    background: var(--ev-surface);
}
.osb-ev-match.is-yours { border-color: var(--ev-primary); box-shadow: 0 0 0 3px var(--ev-primary-soft); }

.osb-ev-match__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.osb-ev-match__head h3 { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ev-muted); }
.osb-ev-match__status { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.osb-ev-match__status.is-completed { color: var(--ev-success); }
.osb-ev-match__status.is-in-progress { color: var(--ev-warning); }

.osb-ev .osb-ev-match__slots { list-style: none; }

.osb-ev .osb-ev-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 10px 12px;
    border: 1px solid var(--ev-border);
    border-radius: 8px;
    background: var(--ev-surface);
}
.osb-ev-slot__name { font-size: .95rem; font-weight: 700; line-height: 1.3; color: var(--ev-text); }
.osb-ev-slot__from { font-size: .78rem; color: var(--ev-muted); }

.osb-ev .osb-ev-slot.is-tbd { border-style: dashed; background: var(--ev-bg); }
.osb-ev-slot.is-tbd .osb-ev-slot__name { font-weight: 600; color: var(--ev-text-2); }

.osb-ev .osb-ev-slot.is-winner { border-color: var(--ev-success); background: var(--ev-success-soft); padding-right: 76px; }
.osb-ev-slot__badge {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ev-success);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
}
.osb-ev-slot.is-you .osb-ev-slot__name { color: var(--ev-primary); }

.osb-ev .osb-ev-match__vs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ev-muted);
}
.osb-ev .osb-ev-match__vs::before,
.osb-ev .osb-ev-match__vs::after { content: ""; flex: 1; height: 1px; background: var(--ev-border); }

.osb-ev-match__when { margin-top: 10px !important; font-size: .82rem; font-weight: 600; color: var(--ev-text-2); }

/* ---------- Championship podium ---------- */
.osb-ev .osb-ev-podium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 16px !important;
    list-style: none;
}
.osb-ev-podium__place {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius-sm);
    background: var(--ev-surface);
}
.osb-ev-podium__place.is-champion { border-color: #e5b93c; background: linear-gradient(180deg, #fff8e1, #fff); }
.osb-ev-podium__label { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ev-muted); }
.osb-ev-podium__place.is-champion .osb-ev-podium__label { color: #a16207; }
.osb-ev-podium__school { font-size: 1.02rem; font-weight: 800; }

.osb-ev-your-group { display: flex; flex-direction: column; margin-bottom: 12px !important; }
.osb-ev-your-group span { font-size: .85rem; color: var(--ev-muted); }

/* ---------- Hero: live line ---------- */
.osb-ev-hero__live {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px !important;
    font-weight: 600;
}

.osb-ev-hero__live span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, .3);
    animation: osbEvPulse 1.4s ease-in-out infinite;
}

/* ---------- Competition information (About / Rules / Terms) ---------- */
.osb-ev-accordion { border: 1px solid var(--ev-border); border-radius: var(--ev-radius); background: var(--ev-surface); overflow: hidden; }
.osb-ev-accordion__item + .osb-ev-accordion__item { border-top: 1px solid var(--ev-border); }
.osb-ev-accordion__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.osb-ev-accordion__item summary::-webkit-details-marker { display: none; }
.osb-ev-accordion__item summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--ev-muted); }
.osb-ev-accordion__item[open] summary::after { content: "–"; }
.osb-ev-accordion__item summary:hover { background: var(--ev-bg); }
.osb-ev-accordion__item .osb-ev-prose { padding: 0 20px 18px; }
.osb-ev-accordion__item .osb-ev-prose ul, .osb-ev-accordion__item .osb-ev-prose ol { list-style: disc; padding-left: 20px !important; margin-bottom: 12px !important; color: var(--ev-text-2); }

/* ---------- Media sections ---------- */
.osb-ev-media-block { margin-top: 28px; }
.osb-ev-media-block:first-of-type { margin-top: 8px; }
.osb-ev-media-block__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px !important; }
.osb-ev-media-block__desc { color: var(--ev-text-2); font-size: .92rem; margin-bottom: 12px !important; }
.osb-ev-media-block__videos { display: grid; gap: 12px; margin-bottom: 12px; }
.osb-ev-media-block__videos.is-multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Aside ---------- */
.osb-ev-card-box {
    padding: 22px;
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    background: var(--ev-surface);
}

.osb-ev-card-box__title { font-size: .8rem; font-weight: 700; text-transform: uppercase !important; letter-spacing: .06em !important; color: var(--ev-muted) !important; margin-bottom: 14px !important; }
.osb-ev-card-box > p { margin-bottom: 12px !important; }

/* About this event (sidebar, above Event details) */
.osb-ev .osb-ev-about__text p { font-size: .95rem; line-height: 1.65; color: var(--ev-text-2); margin-bottom: 10px !important; }
.osb-ev .osb-ev-about__text p:last-child { margin-bottom: 0 !important; }
.osb-ev .osb-ev-about__text { overflow-wrap: anywhere; }
.osb-ev .osb-ev-about__text.is-clamped {
    max-height: 13em;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 65%, transparent);
            mask-image: linear-gradient(180deg, #000 65%, transparent);
}
.osb-ev button.osb-ev-about__toggle {
    margin: 10px 0 0; padding: 0;
    border: 0; background: none; box-shadow: none;
    color: var(--ev-primary); font: inherit; font-size: .9rem; font-weight: 600;
    text-transform: none; letter-spacing: 0; cursor: pointer;
}
.osb-ev button.osb-ev-about__toggle:hover { text-decoration: underline; background: none; }
.osb-ev button.osb-ev-about__toggle:focus-visible { outline: 2px solid var(--ev-primary); outline-offset: 2px; border-radius: 4px; }

/* A sidebar taller than the screen can't stick, or its bottom would be unreachable */
.osb-ev .osb-ev-aside.is-tall { position: static; }

.osb-ev-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f2f4;
    font-size: .92rem;
}

.osb-ev-facts > div:last-child { border-bottom: none; }
.osb-ev-facts dt { color: var(--ev-muted); flex-shrink: 0; }
.osb-ev-facts dd { font-weight: 600; text-align: right; }
.osb-ev-facts dd small { display: block; font-weight: 400; color: var(--ev-muted); }

.osb-ev .osb-ev-prize-total { margin: 0 !important; font-size: 1.35rem; font-weight: 800; color: var(--ev-text); font-variant-numeric: tabular-nums; }
/* Same colour as the total: it sits on the page background, which a theme may colour */
.osb-ev-prize-total span { font-size: .88rem; font-weight: 500; color: inherit; opacity: .85; }

/* Prizes (main column): one tile per position */
.osb-ev .osb-ev-prizes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    list-style: none;
}

.osb-ev .osb-ev-prizes__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius-sm);
    background: var(--ev-surface);
}

.osb-ev-prizes__pos {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: #e5e7eb;
    color: var(--ev-text-2);
    font-size: .9rem;
    font-weight: 800;
}

.osb-ev-prizes__item--1 { border-color: #f5d27a; background: linear-gradient(180deg, #fffaeb, var(--ev-surface) 70%); }
.osb-ev-prizes__item--1 .osb-ev-prizes__pos { background: #fcd34d; color: #78350f; }
.osb-ev-prizes__item--2 .osb-ev-prizes__pos { background: #d1d5db; color: #1f2937; }
.osb-ev-prizes__item--3 .osb-ev-prizes__pos { background: #f0b27a; color: #7c2d12; }

.osb-ev-prizes__title { font-size: .88rem; font-weight: 600; color: var(--ev-text-2); }
.osb-ev-prizes__amount { font-size: 1.3rem; font-weight: 800; color: var(--ev-text); font-variant-numeric: tabular-nums; line-height: 1.2; }

@media (max-width: 640px) {
    /* Phones: one compact row per prize */
    .osb-ev .osb-ev-prizes { grid-template-columns: 1fr; gap: 8px; }
    .osb-ev .osb-ev-prizes__item { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; }
    .osb-ev-prizes__pos { width: 30px; height: 30px; margin-bottom: 0; flex: none; }
    .osb-ev-prizes__title { flex: 1; }
    .osb-ev-prizes__amount { font-size: 1.1rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .osb-ev-top--with-flyer { grid-template-columns: minmax(0, 1fr); }
    .osb-ev-flyer { width: 100%; max-width: 380px; justify-self: center; }
    .osb-ev-layout { grid-template-columns: 1fr; }
    .osb-ev-aside { position: static; order: -1; }
}

@media (max-width: 640px) {
    .osb-ev button.osb-ev-stage-tab { flex: 0 0 auto; min-width: 0; padding: 9px 12px; }
    .osb-ev-matches { grid-template-columns: 1fr; }

    .osb-ev .osb-ev-progress__head { padding: 18px; }
    .osb-ev .osb-ev-progress__count { align-items: flex-start; }
    .osb-ev ol.osb-ev-stepper { grid-template-columns: 1fr; padding: 22px 18px 6px !important; }
    .osb-ev ol.osb-ev-stepper::before,
    .osb-ev ol.osb-ev-stepper::after { display: none; }
    .osb-ev .osb-ev-stepper__step { flex-direction: row; align-items: flex-start; gap: 14px; padding: 0 0 22px !important; text-align: left; }
    .osb-ev .osb-ev-stepper__step:not(:last-child)::after {
        content: "";
        position: absolute;
        left: 13px;
        top: 34px;
        bottom: 2px;
        width: 4px;
        border-radius: 999px;
        background: #e6e8ec;
    }
    .osb-ev .osb-ev-stepper__step.is-done:not(:last-child)::after { background: var(--ev-primary); }
    .osb-ev .osb-ev-stepper__marker { flex-shrink: 0; }
    .osb-ev .osb-ev-stepper__text { align-items: flex-start; padding-top: 3px; }
    .osb-ev .osb-ev-progress__stats > div { padding: 14px 16px; }
    .osb-ev .osb-ev-progress__stats dd { font-size: 1.3rem; }
    .osb-ev-media-block__videos.is-multi { grid-template-columns: 1fr; }
    .osb-ev-schools li { flex-basis: 78%; }
    .osb-ev { padding: 20px 14px 48px; }
    .osb-ev-slide { min-height: 480px; }
    .osb-ev-slide__body { padding: 28px 22px 76px; }
    /* Text covers most of the slide on phones, so shade the whole image */
    .osb-ev-slide__media::after {
        background: linear-gradient(180deg, rgba(10,12,30,.45) 0%, rgba(10,12,30,.7) 45%, rgba(10,12,30,.94) 100%);
    }
    .osb-ev-slider__dots { left: 22px; bottom: 31px; }
    .osb-ev-slider__controls { right: 14px; bottom: 14px; }
    .osb-ev .osb-ev-slider__nav { width: 32px; height: 32px; }
    .osb-ev-slider__counter { min-width: 48px; font-size: .74rem; }
    .osb-ev-hero__inner { padding: 36px 22px 30px; }
    .osb-ev-hero__title { font-size: 1.9rem; }
    .osb-ev-countdown__units div { min-width: 0; flex: 1; padding: 10px 4px; }
    .osb-ev-countdown__units strong { font-size: 1.35rem; }
    .osb-ev-form { grid-template-columns: 1fr; }
    .osb-ev-inline-field { flex-direction: column; }
    .osb-ev-signup__returning, .osb-ev-signup__new { padding: 20px; }
    .osb-ev-lightbox__nav--prev { left: 6px; }
    .osb-ev-lightbox__nav--next { right: 6px; }
    .osb-ev-lightbox__close { top: 6px; right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .osb-ev *, .osb-ev *::before, .osb-ev *::after {
        animation: none !important;
        transition: none !important;
    }
    .osb-ev-slider__track { scroll-behavior: auto; }
}
