/* VTRSIM v0.15.3 — Professional Width / Season / Red Accent Repair */
:root{
  --vtr-max:1640px;
  --vtr-red:#e91c1c;
  --vtr-red-dark:#c91420;
  --vtr-red-soft:#fff1f2;
}

/* =========================================================
   1. WIDTH — less edge-to-edge, still premium / widescreen
   ========================================================= */
@media (min-width:1181px){
  body.premium-v015 .container{
    width:min(calc(100% - 112px),var(--vtr-max));
    max-width:var(--vtr-max);
  }
  body.premium-v015 .premium-navbar{gap:22px}
  body.premium-v015 .premium-nav{gap:22px}
  body.premium-v015 .premium-nav .nav-link{font-size:13px}
  .pixel-brand{flex-basis:188px}
  .pixel-account{min-width:126px}

  /* Home: balanced main / sidebar without stretching everything */
  .premium-home-grid{grid-template-columns:minmax(0,2.05fr) minmax(335px,.72fr);gap:24px}
  .premium-bottom-grid{grid-template-columns:minmax(0,1.45fr) minmax(345px,.65fr);gap:20px}

  /* Races: strong content column + restrained utility sidebar */
  .pixel-races-layout{grid-template-columns:minmax(0,1fr) 330px;gap:22px}
  .pixel-races-side{top:86px}
  .race-live-list-v117:has(> :only-child){grid-template-columns:minmax(480px,620px)!important;justify-content:start}
  .race-live-list-v117:has(> :nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:980px}
  .day-races:has(> :only-child){grid-template-columns:minmax(480px,620px)!important;justify-content:start}
  .day-races:has(> :nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:980px}

  /* Championships: 2 real cards fill the useful area, no fake third column */
  .pixel-champ-layout{grid-template-columns:minmax(0,1fr) 330px;gap:22px}
  .pixel-champ-layout .champ-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
  .pixel-champ-layout .champ-grid:has(> :only-child){grid-template-columns:minmax(460px,620px)!important}
  .pixel-champ-layout .champ-grid:has(> :nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:1040px}
  .pixel-champ-feature{grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr) auto}

  /* Detailed pages remain generous but not full-screen-wide */
  body[data-page="race"] .race-detail-page,
  body[data-page="driver"] .driver-page,
  body[data-page="championship"] .championship-page,
  body[data-page="season"] .season-page{max-width:none}
}

/* =========================================================
   2. MOTORSPORT RED — headings / selected accents
   Blue stays for actions so hierarchy remains obvious.
   ========================================================= */
body.premium-v015 h1,
body.premium-v015 h2,
body.premium-v015 h3,
body.premium-v015 h4{
  font-family:"Segoe UI",Arial,sans-serif;
  color:var(--vtr-red);
  letter-spacing:-.038em;
  line-height:1.05;
  margin-top:0;
}
body.premium-v015 .premium-hero h1 em{color:var(--vtr-red)!important}
body.premium-v015 .premium-detail-hero h1,
body.premium-v015 .premium-detail-hero h2,
body.premium-v015 .premium-detail-hero h3{color:#ff4141!important}
body.premium-v015 .premium-eyebrow,
body.premium-v015 .eyebrow,
body.premium-v015 .day-kicker{color:var(--vtr-red)!important}
body.premium-v015 .premium-nav .nav-link.active{color:var(--vtr-red)!important}
body.premium-v015 .premium-nav .nav-link.active:after{background:var(--vtr-red)!important}
body.premium-v015 .competition-subnav a.active{color:var(--vtr-red)!important;border-color:var(--vtr-red)!important}

/* Readability over dark photography */
body[data-page="championships"] .pixel-champ-feature h2{color:#ff4545!important;text-shadow:0 1px 10px rgba(0,0,0,.18)}
body[data-page="championships"] .champ-cover h3{color:#ff4b4b!important;text-shadow:0 2px 8px rgba(0,0,0,.65)}
body[data-page="championships"] .champ-cover p,
body[data-page="championships"] .champ-cover small{color:#fff!important;text-shadow:0 1px 5px rgba(0,0,0,.7)}
body[data-page="index"] .premium-champ-promo h2{color:#ff4a4a!important}

/* Keep functional dark cards legible */
body.premium-v015 .race-command-v7 h2,
body.premium-v015 .race-command-v7 h3,
body.premium-v015 .driver-license-card-v7 h2,
body.premium-v015 .driver-license-card-v7 h3{color:#fff!important}

/* =========================================================
   3. CARDS / LIVE — remove awkward empty white areas
   ========================================================= */
.race-live-section-v117{margin-bottom:26px}
.race-live-section-v117 .race-program-title-v117{display:flex;align-items:end;gap:16px;margin-bottom:12px}
.race-live-section-v117 .race-program-title-v117 h2{margin:0!important}
@media (min-width:1181px){
  .race-live-list-v117 .race-row-v5,
  .day-races .race-row-v5{width:100%;min-width:0}
  .premium-calendar-art{min-height:178px!important}
  .premium-calendar-body h3{font-size:18px!important}
  .pixel-side-card{padding:15px}
}

/* =========================================================
   4. CHAMPIONSHIPS — cleaner proportions + text contrast
   ========================================================= */
body[data-page="championships"] .champ-toolbar{margin-bottom:18px}
body[data-page="championships"] .champ-grid{align-items:start}
body[data-page="championships"] .champ-card{max-width:none}
body[data-page="championships"] .champ-cover{isolation:isolate}
body[data-page="championships"] .champ-cover:after{
  content:"";position:absolute;inset:0;z-index:-1;
  background:linear-gradient(180deg,rgba(2,18,31,.05) 10%,rgba(2,18,31,.85) 100%);
  pointer-events:none;
}
body[data-page="championships"] .champ-body{background:#fff}
body[data-page="championships"] .champ-podium .muted{line-height:1.45}

/* =========================================================
   5. SEASON — rebuilt visual hierarchy around existing live data
   ========================================================= */
body[data-page="season"] .season-hero-v4{min-height:390px}
body[data-page="season"] .season-hero-v4 .premium-hero-content{padding-top:42px;padding-bottom:34px}
body[data-page="season"] .season-hero-v4 h1{max-width:760px}
body[data-page="season"] .season-hero-v4 p{max-width:650px}
body[data-page="season"] .season-page{padding-top:20px!important}
body[data-page="season"] .competition-subnav{margin-bottom:18px}
body[data-page="season"] .season-hub-v122{gap:18px}
body[data-page="season"] .season-overview-v122{
  grid-template-columns:minmax(0,1fr) 330px;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 8px 28px rgba(18,48,76,.06);
}
body[data-page="season"] .season-overview-main-v122{padding:30px 32px}
body[data-page="season"] .season-overview-main-v122 h2{color:var(--vtr-red)!important;font-size:31px!important}
body[data-page="season"] .season-next-reward-v122{background:linear-gradient(145deg,#071b2d,#102f4a)}
body[data-page="season"] .season-kpi-grid-v122{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
body[data-page="season"] .season-kpi-grid-v122 article{border-radius:10px;min-height:105px}
body[data-page="season"] .season-kpi-grid-v122 strong{color:var(--vtr-red)!important}
body[data-page="season"] .season-roadmap-v122,
body[data-page="season"] .season-panel-v122{border-radius:12px;box-shadow:0 6px 22px rgba(18,48,76,.04)}
body[data-page="season"] .season-main-grid-v122{grid-template-columns:minmax(0,1.7fr) minmax(300px,.72fr);gap:16px}
body[data-page="season"] .season-bottom-grid-v122{gap:16px}
body[data-page="season"] .season-mission-section-head-v122 strong,
body[data-page="season"] .season-podium-v122 a strong,
body[data-page="season"] .season-leader-list-v122 a strong{color:#142d47!important;letter-spacing:0}
body[data-page="season"] .season-mission-copy-v122>strong{color:#173b55!important;letter-spacing:0}
body[data-page="season"] .season-your-rank-v122 strong{color:#fff!important}
body[data-page="season"] .season-reward-v122>div:nth-child(3)>strong{color:#173b55!important;letter-spacing:0}

/* =========================================================
   6. DESKTOP TYPOGRAPHY — red without becoming shouty
   ========================================================= */
@media (min-width:1181px){
  body.premium-v015 .premium-hero h1{font-size:66px;letter-spacing:-3.2px}
  body.premium-v015 .premium-internal-hero h1{font-size:62px}
  .section-head h2,.premium-block-head h2{letter-spacing:-.035em}
}

/* =========================================================
   7. MOBILE / TABLET safeguards
   ========================================================= */
@media (max-width:1180px){
  body.premium-v015 h1,body.premium-v015 h2,body.premium-v015 h3,body.premium-v015 h4{letter-spacing:-.028em}
}
@media (max-width:900px){
  .race-live-list-v117:has(> :only-child),
  .race-live-list-v117:has(> :nth-child(2):last-child),
  .day-races:has(> :only-child),
  .day-races:has(> :nth-child(2):last-child),
  .pixel-champ-layout .champ-grid:has(> :only-child),
  .pixel-champ-layout .champ-grid:has(> :nth-child(2):last-child){max-width:none!important;grid-template-columns:1fr!important}
  body[data-page="season"] .season-main-grid-v122,
  body[data-page="season"] .season-overview-v122{grid-template-columns:1fr}
}
