:root{
  --highlights-bg:#08111f;
  --highlights-surface:#0f1c31;
  --highlights-surface-2:#142541;
  --highlights-border:rgba(203,223,255,.14);
  --highlights-text:#f6fbff;
  --highlights-muted:#a4b5d1;
  --highlights-accent:#b9ff57;
  --highlights-accent-2:#6edcff;
  --league-accent:var(--highlights-accent);
  --card-shadow:0 18px 40px rgba(0,0,0,.24);
}

body.page-highlights{
  background:
    radial-gradient(circle at top right, rgba(110,220,255,.14), transparent 32%),
    radial-gradient(circle at top left, rgba(185,255,87,.10), transparent 28%),
    linear-gradient(180deg, #08111f 0%, #0a1527 42%, #09111d 100%);
  color:var(--highlights-text);
  min-height:100vh;
  padding:0 0 calc(var(--bnav-h) + env(safe-area-inset-bottom));
}

body.page-highlights > .page-shell,
body.page-highlights > .site-footer,
body.page-highlights > .bnav{
  width:100%;
}

.page-highlights .page-shell{
  max-width:var(--shell-max);
  width:100%;
  gap:var(--section-gap);
}

.page-highlights .highlights-page{
  display:flex;
  flex-direction:column;
  gap:clamp(18px, 2.6vw, 28px);
  padding:
    calc((var(--section-gap) / 2) + env(safe-area-inset-top))
    calc(var(--shell-pad) + env(safe-area-inset-right))
    calc(var(--section-gap) + var(--bnav-h) + env(safe-area-inset-bottom))
    calc(var(--shell-pad) + env(safe-area-inset-left));
}

.highlights-debug,
.highlights-alert,
.highlights-hero,
.highlights-spotlight,
.league-nav,
.league-section{
  border:1px solid var(--highlights-border);
  background:linear-gradient(180deg, rgba(20,37,65,.92), rgba(12,24,43,.92));
  box-shadow:var(--card-shadow);
}

.highlights-debug,
.highlights-alert{
  border-radius:18px;
  padding:14px 16px;
}

.highlights-debug pre{
  margin:10px 0 0;
  white-space:pre-wrap;
  word-break:break-word;
  color:var(--highlights-muted);
}

.highlights-alert--error{
  background:linear-gradient(180deg, rgba(84,28,39,.88), rgba(55,16,24,.92));
  color:#ffe7ea;
}

.highlights-hero{
  border-radius:32px;
  padding:clamp(18px, 3vw, 30px);
  display:grid;
  grid-template-columns:minmax(0, 1.3fr) minmax(280px, .9fr);
  gap:clamp(18px, 3vw, 26px);
  overflow:hidden;
  position:relative;
}

.highlights-hero::before{
  content:"";
  position:absolute;
  inset:auto -10% -40% auto;
  width:320px;
  height:320px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(110,220,255,.16), transparent 68%);
  pointer-events:none;
}

.hero-kicker,
.eyebrow{
  margin:0;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(246,251,255,.68);
}

.highlights-hero h1{
  margin:8px 0 10px;
  font-size:clamp(30px, 4vw, 48px);
  line-height:1.05;
  max-width:12ch;
}

.hero-season{
  margin:0 0 10px;
  color:var(--highlights-accent);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.hero-description{
  margin:0;
  max-width:58ch;
  color:var(--highlights-muted);
  line-height:1.65;
}

.highlights-hero__stats{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  align-content:start;
}

.hero-metric{
  border:1px solid rgba(255,255,255,.1);
  border-radius:20px;
  background:rgba(8,17,31,.55);
  padding:14px 16px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.hero-metric--wide{
  grid-column:1 / -1;
}

.hero-metric__label{
  color:rgba(246,251,255,.64);
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hero-metric__value{
  font-size:clamp(20px, 2vw, 28px);
  line-height:1.1;
}

.hero-metric__hint{
  color:var(--highlights-muted);
  font-size:13px;
  line-height:1.4;
}

.section-heading{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.section-heading h2{
  margin:0;
  font-size:clamp(22px, 3vw, 30px);
}

.section-heading--row{
  flex-direction:row;
  align-items:end;
  justify-content:space-between;
  gap:16px;
}

.highlights-section__link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  color:var(--highlights-text);
  text-decoration:none;
  background:rgba(255,255,255,.04);
  transition:background .18s ease, border-color .18s ease, transform .18s ease;
}

.highlights-section__link:hover{
  background:rgba(255,255,255,.1);
  border-color:rgba(255,255,255,.24);
  transform:translateY(-1px);
}

.highlights-spotlight{
  border-radius:28px;
  padding:clamp(18px, 2.4vw, 24px);
  display:flex;
  flex-direction:column;
  gap:16px;
}

.league-nav{
  border-radius:20px;
  padding:10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  position:sticky;
  top:calc(var(--page-chrome-height, 70px) + 10px);
  z-index:4;
  backdrop-filter:blur(14px);
}

.league-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 14px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  background:rgba(255,255,255,.04);
  color:var(--highlights-text);
  font:inherit;
  cursor:pointer;
  transition:transform .16s ease, background .16s ease, border-color .16s ease;
}

.league-pill:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.24);
}

.league-pill.active{
  color:#08111f;
  background:var(--highlights-accent);
  border-color:transparent;
}

.league-pill__logo{
  width:18px;
  height:18px;
  object-fit:contain;
}

.league-pill__count{
  min-width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  font-size:12px;
}

.league-pill.active .league-pill__count{
  background:rgba(8,17,31,.14);
}

.league-sections{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.league-section{
  border-radius:26px;
  padding:clamp(16px, 2.6vw, 24px);
  display:flex;
  flex-direction:column;
  gap:18px;
  scroll-margin-top:calc(var(--page-chrome-height, 70px) + 88px);
}

.league-section__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.league-section__brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.league-section__brand h2{
  margin:2px 0 0;
  font-size:clamp(24px, 3vw, 32px);
}

.league-section__logo{
  width:32px;
  height:32px;
  object-fit:contain;
  flex:0 0 auto;
}

.league-section__meta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.meta-chip,
.highlight-card__tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(246,251,255,.86);
  font-size:12px;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.highlight-feature{
  display:grid;
  grid-template-columns:minmax(0, 1.15fr) minmax(280px, .85fr);
  gap:18px;
  padding:14px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.02)),
    linear-gradient(180deg, rgba(10,18,31,.66), rgba(10,18,31,.3));
}

.highlight-feature__media,
.highlight-card__media{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:18px;
  background:#09111d;
  border:1px solid rgba(255,255,255,.1);
}

.highlight-feature__media{
  min-height:280px;
}

.highlight-feature__media img,
.highlight-card__media img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.highlight-feature__media::after,
.highlight-card__media::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(8,17,31,.04), rgba(8,17,31,.58));
}

.highlight-feature__fallback,
.highlight-card__media-fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100%;
  padding:32px;
  color:var(--highlights-muted);
  text-transform:uppercase;
  letter-spacing:.12em;
}

.highlight-feature__play,
.highlight-card__play{
  position:absolute;
  left:14px;
  bottom:14px;
  z-index:1;
  min-height:34px;
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  background:rgba(8,17,31,.82);
  color:var(--highlights-text);
  font-size:12px;
  letter-spacing:.04em;
}

.highlight-feature__body{
  display:flex;
  flex-direction:column;
  gap:12px;
  justify-content:center;
}

.highlight-feature__meta,
.highlight-card__meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  color:var(--highlights-muted);
  font-size:13px;
}

.dot{
  width:4px;
  height:4px;
  border-radius:50%;
  background:rgba(255,255,255,.38);
  flex:0 0 auto;
}

.highlight-feature__title,
.highlight-card__title{
  margin:0;
  font-size:clamp(22px, 2.4vw, 32px);
  line-height:1.12;
}

.highlight-card__title{
  font-size:18px;
}

.highlight-feature__title-link,
.highlight-card__title-link{
  color:var(--highlights-text);
  text-decoration:none;
}

.highlight-feature__title-link:hover,
.highlight-card__title-link:hover{
  color:var(--league-accent);
}

.highlight-feature__summary{
  margin:0;
  color:var(--highlights-muted);
  line-height:1.6;
}

.highlight-feature__footer,
.highlight-card__footer{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:space-between;
  color:var(--highlights-muted);
  font-size:13px;
}

.highlight-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

.highlight-grid--spotlight{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.highlight-card{
  display:flex;
  flex-direction:column;
  min-width:0;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)),
    linear-gradient(180deg, rgba(9,17,29,.7), rgba(9,17,29,.34));
  overflow:hidden;
}

.highlight-card__media{
  aspect-ratio:16 / 10;
}

.highlight-card__body{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
}

.highlight-card__score{
  color:rgba(246,251,255,.52);
}

.highlights-empty{
  border:1px dashed rgba(255,255,255,.16);
  border-radius:22px;
  padding:20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background:rgba(255,255,255,.03);
}

.highlights-empty p{
  margin:0;
  color:var(--highlights-muted);
  line-height:1.5;
}

.player-overlay{
  position:fixed;
  inset:0;
  z-index:120;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
}

.player-overlay[hidden]{
  display:none;
}

.player-overlay__backdrop{
  position:absolute;
  inset:0;
  border:0;
  background:rgba(3,8,15,.72);
  backdrop-filter:blur(8px);
}

.player-overlay__card{
  position:relative;
  z-index:1;
  width:min(1080px, 100%);
  border-radius:24px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.14);
  background:#09111d;
  box-shadow:0 26px 70px rgba(0,0,0,.42);
}

.player-overlay__controls,
.player-overlay__footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  background:rgba(255,255,255,.04);
}

.player-overlay__source,
.player-overlay__hint{
  color:var(--highlights-muted);
}

.player-overlay__close{
  width:40px;
  height:40px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  background:rgba(255,255,255,.04);
  color:var(--highlights-text);
  font-size:24px;
  cursor:pointer;
}

.player-overlay__frame{
  position:relative;
  aspect-ratio:16 / 9;
  background:#000;
}

.player-overlay__frame iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

.player-overlay__title{
  margin:0 0 6px;
  font-size:18px;
  line-height:1.35;
}

@media (max-width:1100px){
  .highlight-grid--spotlight{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  .highlight-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:900px){
  body.page-highlights{
    padding-bottom:calc(var(--bnav-h) + env(safe-area-inset-bottom) + 90px);
  }

  .page-highlights .highlights-page{
    padding-bottom:calc(var(--section-gap) + var(--bnav-h) + env(safe-area-inset-bottom) + 90px);
  }

  .highlights-hero,
  .highlight-feature{
    grid-template-columns:1fr;
  }

  .league-section__header{
    flex-direction:column;
    align-items:flex-start;
  }

  .league-section__meta{
    justify-content:flex-start;
  }
}

@media (max-width:720px){
  .highlights-hero{
    border-radius:24px;
  }

  .highlights-hero h1{
    max-width:none;
  }

  .highlights-hero__stats{
    grid-template-columns:1fr;
  }

  .hero-metric--wide{
    grid-column:auto;
  }

  .section-heading--row{
    flex-direction:column;
    align-items:flex-start;
  }

  .highlight-grid,
  .highlight-grid--spotlight{
    grid-template-columns:1fr;
  }

  .highlights-empty{
    flex-direction:column;
    align-items:flex-start;
  }

  .player-overlay{
    padding:12px;
  }

  .player-overlay__controls,
  .player-overlay__footer{
    align-items:flex-start;
    flex-direction:column;
  }
}
