
/*
 * HLRN RACE INTELLIGENCE • CINEMATIC DAY/NIGHT EDITION
 * Image-only broadcast banner + distinct full-page telemetry wallpaper.
 * Scope: /race-intelligence/ only. No race data or interaction changes.
 */

/* The existing page stylesheet forces opaque black/white shells.
   Paint the uploaded wallpaper on the page, and clear only its frame. */
html[data-hlrn-route="race-intelligence"][data-hlrn-theme="light"] body.ri-cinematic-page,
html[data-hlrn-theme="light"] body.ri-cinematic-page{
  background-color:#eef2f6!important;
  background-image:
    linear-gradient(90deg,rgba(255,255,255,.10),rgba(255,255,255,.02) 24%,rgba(255,255,255,.02) 76%,rgba(255,255,255,.10)),
    url("./HLRN_Race_Intelligence_Full_Page_Day_Background.png")!important;
}
html[data-hlrn-route="race-intelligence"][data-hlrn-theme="dark"] body.ri-cinematic-page,
html[data-hlrn-theme="dark"] body.ri-cinematic-page{
  background-color:#040811!important;
  background-image:
    linear-gradient(90deg,rgba(1,3,10,.10),rgba(1,3,10,.02) 24%,rgba(1,3,10,.02) 76%,rgba(1,3,10,.10)),
    url("./HLRN_Race_Intelligence_Full_Page_Night_Background.png")!important;
}
html[data-hlrn-theme] body.ri-cinematic-page{
  background-repeat:no-repeat,no-repeat!important;
  background-position:center center,center center!important;
  background-size:cover,cover!important;
  background-attachment:fixed,fixed!important;
}
html[data-hlrn-theme] body.ri-cinematic-page > .shell{
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  /* Restore the original full-width Race Intelligence shell. The page's
     internal content regions already implement their own centering. */
  width:100%!important;
  max-width:none!important;
  margin:0 auto!important;
  padding:0 0 64px!important;
  position:relative;
}
html[data-hlrn-theme] body.ri-cinematic-page > .shell:before,
html[data-hlrn-theme] body.ri-cinematic-page > .shell:after{
  display:none!important;
  content:none!important;
}

/* A dedicated image-only banner avoids interference from the existing
   interactive intelligence board and all its CSS/JS functionality. */
html[data-hlrn-theme] body.ri-cinematic-page > .ri-cinematic-banner{
  display:block!important;
  width:100%;
  height:clamp(240px,28.125vw,540px);
  margin:0;
  background-repeat:no-repeat!important;
  background-size:cover!important;
  background-position:center center!important;
  border-bottom:5px solid #e32445;
  border-top:2px solid #e32445;
  position:relative;
  overflow:hidden;
  box-shadow:0 22px 60px rgba(0,0,0,.23);
  isolation:isolate;
}
html[data-hlrn-theme="light"] body.ri-cinematic-page > .ri-cinematic-banner{
  background-color:#f5f7fb!important;
  background-image:url("./HLRN_Race_Intelligence_Day_Banner.png")!important;
}
html[data-hlrn-theme="dark"] body.ri-cinematic-page > .ri-cinematic-banner{
  background-color:#060912!important;
  background-image:url("./HLRN_Race_Intelligence_Night_Banner.png")!important;
}
body.ri-cinematic-page > .ri-cinematic-banner:after{
  content:"";pointer-events:none;position:absolute;bottom:0;left:0;right:0;height:14%;
  background:linear-gradient(0deg,rgba(0,0,0,.12),transparent);
}

/* Keep telemetry/leaderboard cards readable. Let the large empty wrappers
   reveal the actual art instead of painting a full opaque rectangle. */
html[data-hlrn-theme] body.ri-cinematic-page > .shell :is(
  .intel-grid,.toolbar,.compact-tabs
){
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
}
html[data-hlrn-theme] body.ri-cinematic-page > .shell .hero{
  min-height:0!important;
  margin:16px 0 20px!important;
  padding:0!important;
  overflow:hidden;
  border-radius:5px!important;
  border:1px solid rgba(125,145,165,.33)!important;
  border-left:5px solid #e52443!important;
  background-image:none!important;
}
html[data-hlrn-theme="light"] body.ri-cinematic-page > .shell .hero{
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 15px 42px rgba(7,19,35,.11)!important;
}
html[data-hlrn-theme="dark"] body.ri-cinematic-page > .shell .hero{
  background:rgba(7,12,21,.94)!important;
  box-shadow:0 18px 47px rgba(0,0,0,.35)!important;
}
html[data-hlrn-theme] body.ri-cinematic-page > .shell .hero:after{
  content:none!important;
  display:none!important;
}
html[data-hlrn-theme] body.ri-cinematic-page > .shell .hero-inner{
  /* Let the native .hero-inner width, margins and padding center content. */
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
}
/* The banner already contains the big "Race Intelligence" title.
   Preserve the semantic H1, avoid displaying it a second time. */
body.ri-cinematic-page > .shell .hero h1,
body.ri-cinematic-page > .shell .hero .nn-page-title{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  border:0!important;
  clip:rect(0 0 0 0)!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
html[data-hlrn-theme="light"] body.ri-cinematic-page > .shell .hero :is(.kicker,p){
  color:#1d2938!important;
  -webkit-text-fill-color:#1d2938!important;
  text-shadow:none!important;
}
html[data-hlrn-theme="dark"] body.ri-cinematic-page > .shell .hero :is(.kicker,p){
  color:#f5f7fc!important;
  -webkit-text-fill-color:#f5f7fc!important;
  text-shadow:none!important;
}
html[data-hlrn-theme="light"] body.ri-cinematic-page > .shell :is(
  .toolbar,.section-label,.category-deep,.story-section,.detail-wrap
){
  color:#111923!important;
}
html[data-hlrn-theme="dark"] body.ri-cinematic-page > .shell :is(
  .toolbar,.section-label
){
  color:#f5f7fb!important;
}
html[data-hlrn-theme="light"] body.ri-cinematic-page > .shell :is(
  .intel-card,.category-deep,.story-section,.detail-wrap,.compact-panel,.compact-overview,.v3-contenders
){
  box-shadow:0 15px 42px rgba(9,25,41,.12)!important;
}
html[data-hlrn-theme="dark"] body.ri-cinematic-page > .shell :is(
  .intel-card,.category-deep,.story-section,.detail-wrap,.compact-panel,.compact-overview,.v3-contenders
){
  box-shadow:0 18px 48px rgba(0,0,0,.36)!important;
}

/* Make section headings readable even where the wallpaper is detailed. */
html[data-hlrn-theme="light"] body.ri-cinematic-page > .shell :is(
  .toolbar,.section-label,.story-head
){
  text-shadow:0 1px 0 rgba(255,255,255,.85);
}
html[data-hlrn-theme="dark"] body.ri-cinematic-page > .shell :is(
  .toolbar,.section-label,.story-head
){
  text-shadow:0 2px 16px rgba(0,0,0,.65);
}

@media(max-width:650px){
  html[data-hlrn-theme] body.ri-cinematic-page > .ri-cinematic-banner{
    height:clamp(170px,42vw,255px);
    background-position:center center!important;
  }
  html[data-hlrn-theme] body.ri-cinematic-page{
    background-attachment:scroll,scroll!important;
    background-size:cover,auto 100vh!important;
    background-repeat:no-repeat,repeat-y!important;
    background-position:center,center top!important;
  }
}
@media(prefers-reduced-motion:reduce){
  html[data-hlrn-theme] body.ri-cinematic-page{
    background-attachment:scroll,scroll!important;
  }
}
