/* Home system extensions for Ranking, History, Gallery and the upcoming-season page. */

body[data-page="historico"],
body[data-page="galeria"] {
  color: #edf4ff;
  background:
    radial-gradient(circle at 7% 12%, rgba(27, 104, 190, 0.18), transparent 34rem),
    radial-gradient(circle at 92% 42%, rgba(165, 38, 64, 0.11), transparent 31rem),
    #061426;
}

body[data-page="historico"] #site-shell > .history-page-frame,
body[data-page="galeria"] #site-shell > .gallery-page-frame {
  position: relative;
  isolation: isolate;
  width: calc(100% - clamp(20px, 3vw, 48px));
  min-width: 0;
  margin: clamp(12px, 2vw, 26px) auto 30px;
  padding: 8px 8px 14px;
  overflow: clip;
  border: 1px solid rgba(44, 145, 226, 0.55);
  border-radius: clamp(18px, 2vw, 28px);
  background:
    radial-gradient(circle at 8% 27%, rgba(22, 84, 148, 0.14), transparent 35rem),
    linear-gradient(145deg, rgba(6, 22, 41, 0.98), rgba(4, 13, 26, 0.99) 72%),
    #061426;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

body[data-page="historico"] .history-page-frame > .site-header,
body[data-page="galeria"] .gallery-page-frame > .site-header {
  position: sticky;
  top: 6px;
  z-index: 30;
  padding: 0 clamp(8px, 1.15vw, 16px);
  background: transparent;
  backdrop-filter: none;
}

body[data-page="historico"] .history-page-frame > .site-header .topbar,
body[data-page="galeria"] .gallery-page-frame > .site-header .topbar {
  top: 10px;
  min-height: 90px;
  margin-top: 0;
  gap: clamp(12px, 1.6vw, 26px);
  padding: 10px clamp(14px, 2vw, 28px);
  border: 1px solid rgba(47, 143, 255, 0.42);
  border-radius: 20px;
  background: rgba(3, 16, 33, 0.92);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

body[data-page="historico"] .history-page-frame .topbar .brand,
body[data-page="galeria"] .gallery-page-frame .topbar .brand {
  flex: 0 0 auto;
  gap: 11px;
  padding-inline: 0;
  text-decoration: none;
}

body[data-page="historico"] .history-page-frame .topbar .brand-logo,
body[data-page="galeria"] .gallery-page-frame .topbar .brand-logo {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
}

body[data-page="historico"] .history-page-frame .topbar .topbar-actions,
body[data-page="galeria"] .gallery-page-frame .topbar .topbar-actions {
  flex-wrap: nowrap;
  gap: clamp(12px, 1.6vw, 26px);
}

body[data-page="historico"] .history-page-frame .topbar .season-switcher,
body[data-page="galeria"] .gallery-page-frame .topbar .season-switcher {
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border-color: rgba(88, 147, 220, 0.38);
  border-radius: 13px;
  background: rgba(7, 23, 45, 0.88);
}

body[data-page="historico"] .history-page-frame .topbar .season-chip,
body[data-page="galeria"] .gallery-page-frame .topbar .season-chip {
  min-height: 40px;
  padding-inline: 15px;
  border-radius: 10px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

body[data-page="historico"] .history-page-frame .topbar .season-chip.is-active,
body[data-page="galeria"] .gallery-page-frame .topbar .season-chip.is-active {
  background: linear-gradient(115deg, #087ff4, #1457d4);
  box-shadow: 0 8px 20px rgba(0, 77, 196, 0.28);
}

body[data-page="historico"] .history-page-frame .topbar .nav-links,
body[data-page="galeria"] .gallery-page-frame .topbar .nav-links {
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(8px, 1.15vw, 20px);
  color: #e2edff;
  font-size: clamp(0.68rem, 0.78vw, 0.82rem);
}

body[data-page="historico"] .history-page-frame .topbar .nav-links a,
body[data-page="galeria"] .gallery-page-frame .topbar .nav-links a {
  padding: 7px 0;
  white-space: nowrap;
}

body[data-page="historico"] .history-page-frame .topbar .nav-links a.is-current,
body[data-page="galeria"] .gallery-page-frame .topbar .nav-links a.is-current {
  color: #63b8ff;
}

body[data-page="historico"] .history-page-frame > .page-main,
body[data-page="galeria"] .gallery-page-frame > .page-main {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: clamp(16px, 1.8vw, 24px);
  min-width: 0;
  overflow: clip;
  padding: 0 clamp(8px, 1.1vw, 16px) 14px;
}

body[data-page="historico"] .history-page-frame > .page-main > *,
body[data-page="galeria"] .gallery-page-frame > .page-main > * {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-inline: 0;
}

body[data-page="historico"] #site-shell > .history-page-frame > .page-main > .page-hero,
body[data-page="galeria"] #site-shell > .gallery-page-frame > .page-main > .page-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.68fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  min-height: clamp(250px, 22vw, 320px);
  margin: 0;
  padding: clamp(24px, 3.2vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(47, 143, 255, 0.36);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 5% 8%, rgba(13, 102, 191, 0.22), transparent 48%),
    radial-gradient(ellipse at 96% 94%, rgba(185, 42, 68, 0.14), transparent 40%),
    linear-gradient(112deg, rgba(3, 16, 33, 0.99), rgba(5, 24, 46, 0.95) 55%, rgba(6, 21, 39, 0.96));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.21), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body[data-page="historico"] #site-shell > .history-page-frame > .page-main > .page-hero::before,
body[data-page="historico"] #site-shell > .history-page-frame > .page-main > .page-hero::after,
body[data-page="galeria"] #site-shell > .gallery-page-frame > .page-main > .page-hero::before,
body[data-page="galeria"] #site-shell > .gallery-page-frame > .page-main > .page-hero::after {
  display: none;
  content: none;
}

body[data-page="historico"] .history-hero-copy,
body[data-page="galeria"] .gallery-hero-copy,
body[data-page="historico"] .history-hero-summary,
body[data-page="galeria"] .gallery-hero-summary {
  position: relative;
  z-index: 1;
  min-width: 0;
}

body[data-page="historico"] .history-hero-copy .eyebrow,
body[data-page="galeria"] .gallery-hero-copy .eyebrow {
  margin: 0;
  color: #35b9ff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body[data-page="historico"] .history-page-hero h1,
body[data-page="galeria"] .gallery-page-hero h1 {
  max-width: 13ch;
  margin: 10px 0 0;
  color: #f5f7fb;
  font-family: "Formula1 Bold", "Formula1", sans-serif;
  font-size: clamp(2.8rem, 5.2vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.99;
  text-wrap: balance;
}

body[data-page="historico"] .history-page-hero .hero-text,
body[data-page="galeria"] .gallery-page-hero .hero-text {
  max-width: 42rem;
  margin: 17px 0 0;
  color: #c2d5ed;
  font-size: clamp(0.9rem, 1.05vw, 1.05rem);
  line-height: 1.55;
}

body[data-page="galeria"] .gallery-hero-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  justify-self: end;
  width: fit-content;
  min-width: min(100%, 380px);
  max-width: 100%;
  gap: 0;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(0, 168, 255, 0.48);
  border-radius: 17px;
  background: linear-gradient(112deg, rgba(2, 16, 33, 0.87), rgba(5, 27, 52, 0.84));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.21), inset 0 0 25px rgba(3, 55, 96, 0.1);
  backdrop-filter: blur(8px);
}

body[data-page="galeria"] .gallery-hero-summary > div {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding-inline: 14px;
  text-align: center;
}

body[data-page="galeria"] .gallery-hero-summary > div + div {
  border-left: 1px solid rgba(106, 158, 210, 0.22);
}

body[data-page="galeria"] .gallery-hero-summary span {
  color: #9fb8d5;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

body[data-page="galeria"] .gallery-hero-summary strong {
  color: #f5f7fb;
  font-family: "Formula1 Bold", "Formula1", sans-serif;
  font-size: clamp(2rem, 4vw, 3.7rem);
  letter-spacing: -0.07em;
  line-height: 1;
}

body[data-page="historico"] .history-hero-summary {
  display: grid;
  align-content: center;
  justify-items: center;
  justify-self: end;
  width: fit-content;
  min-width: min(100%, 230px);
  max-width: 100%;
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid rgba(0, 168, 255, 0.48);
  border-radius: 17px;
  background: linear-gradient(112deg, rgba(2, 16, 33, 0.87), rgba(5, 27, 52, 0.84));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.21), inset 0 0 25px rgba(3, 55, 96, 0.1);
  backdrop-filter: blur(8px);
  text-align: center;
}

body[data-page="historico"] .history-hero-summary > span,
body[data-page="historico"] .history-hero-summary > small {
  color: #9fb8d5;
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body[data-page="historico"] .history-hero-summary > strong {
  color: #f5f7fb;
  font-family: "Formula1 Bold", "Formula1", sans-serif;
  font-size: clamp(2.8rem, 5vw, 4.3rem);
  letter-spacing: -0.07em;
  line-height: 1.1;
}

body[data-page="historico"] .history-hero-summary > small {
  color: #63b8ff;
}

body[data-page="etapas"] #site-shell > .stages-page-frame > .page-main.stages-page > .stages-page-hero .stages-page-hero-actions {
  justify-self: end;
  justify-items: center;
  width: fit-content;
  max-width: 100%;
  text-align: center;
}

body[data-page="etapas"] #site-shell > .stages-page-frame > .page-main.stages-page > .stages-page-hero .stages-page-count {
  justify-self: center;
  justify-content: center;
  text-align: center;
}

body[data-page="etapas"] #site-shell > .stages-page-frame > .page-main.stages-page > .stages-page-hero .stages-page-hero-actions .report-link {
  justify-content: center;
  max-width: 100%;
  text-align: center;
}

body[data-page="galeria"] .gallery-page-content.section {
  min-width: 0;
  margin: 0;
  padding: clamp(16px, 2.2vw, 28px);
  border: 1px solid rgba(47, 143, 255, 0.24);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(9, 27, 50, 0.92), rgba(5, 17, 33, 0.96));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body[data-page="historico"] .history-scope-switcher-shell {
  width: 100%;
  max-width: none;
  margin: 0 0 16px;
}

body[data-page="historico"] .history-scope-switcher-shell .ranking-series-switcher {
  width: min(100%, 680px);
  max-width: 100%;
  padding: 5px;
  border-color: rgba(72, 126, 185, 0.32);
  border-radius: 17px;
  background: rgba(3, 15, 30, 0.78);
}

body[data-page="historico"] .history-scope-switcher-shell .ranking-series-button {
  min-height: 44px;
  border-radius: 12px;
  color: #a9bfd9;
  letter-spacing: 0.05em;
}

body[data-page="historico"] .history-scope-switcher-shell .ranking-series-button.is-active {
  border-color: rgba(64, 159, 255, 0.46);
  background: linear-gradient(115deg, #087ff4, #1457d4);
  color: #f7fbff;
  box-shadow: 0 8px 20px rgba(0, 77, 196, 0.28);
}

body[data-page="historico"] .history-scope-panel[hidden] {
  display: none;
}

body[data-page="historico"] .history-scope-panel.section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="historico"] .trophy-room {
  border-color: rgba(255, 209, 102, 0.35);
  background:
    radial-gradient(ellipse at 50% -18%, rgba(255, 209, 102, 0.14), transparent 55%),
    linear-gradient(145deg, rgba(13, 32, 58, 0.98), rgba(5, 17, 34, 0.98));
}

body[data-page="historico"] .history-global-records,
body[data-page="historico"] .history-global-block {
  min-width: 0;
  padding: clamp(17px, 2.2vw, 28px);
  border: 1px solid rgba(47, 143, 255, 0.24);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(9, 27, 50, 0.92), rgba(5, 17, 33, 0.96));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body[data-page="historico"] .history-global-records {
  margin-bottom: 18px;
}

body[data-page="historico"] .history-global-heading {
  margin-bottom: 18px;
}

body[data-page="historico"] .history-global-heading > .eyebrow,
body[data-page="historico"] .trophy-room-heading .eyebrow {
  color: #35b9ff;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
}

body[data-page="historico"] .history-global-heading h2,
body[data-page="historico"] .trophy-room-heading h2 {
  color: #f4f7fc;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

body[data-page="historico"] .history-record-grid.history-global-record-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body[data-page="historico"] .history-global-record-grid .history-record-card {
  min-width: 0;
  min-height: 190px;
  border-color: rgba(47, 143, 255, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(41, 125, 218, 0.14), transparent 65%),
    linear-gradient(145deg, rgba(14, 36, 66, 0.92), rgba(6, 19, 36, 0.96));
}

body[data-page="historico"] .history-global-record-grid .history-record-card strong {
  color: #4b9bff;
  font-size: clamp(2rem, 3.2vw, 3rem);
}

body[data-page="historico"] .history-global-record-grid .history-record-label {
  color: #b8cce3;
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

body[data-page="historico"] .history-global-record-grid .history-record-card p {
  max-width: 36ch;
  color: #edf4ff;
  font-family: "Formula1", sans-serif;
  font-size: 0.88rem;
}

body[data-page="historico"] .history-global-block + .history-global-block {
  margin-top: 18px;
}

body[data-page="historico"] .history-champions-table {
  width: 100%;
  min-width: 560px;
}

body[data-page="historico"] .history-page .table-shell {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid rgba(70, 126, 187, 0.28);
  border-radius: 15px;
}

body[data-page="historico"] .history-page .history-note {
  max-width: none;
  margin: 14px 0 0;
  border-radius: 10px;
}

body[data-page="galeria"] .gallery-page-content {
  display: grid;
  gap: 16px;
}

body[data-page="galeria"] .gallery-content-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

body[data-page="galeria"] .gallery-content-heading .eyebrow {
  margin: 0 0 5px;
  color: #35b9ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

body[data-page="galeria"] .gallery-content-heading h2 {
  margin: 0;
  color: #f4f7fc;
  font-family: "Formula1 Bold", "Formula1", sans-serif;
  font-size: clamp(1.2rem, 2.1vw, 1.7rem);
}

body[data-page="galeria"] .gallery-content-count,
body[data-page="galeria"] .gallery-stage-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(47, 143, 255, 0.28);
  border-radius: 999px;
  background: rgba(13, 46, 79, 0.56);
  color: #b6cde7;
  font-size: 0.74rem;
  white-space: nowrap;
}

body[data-page="galeria"] .gallery-filter-bar {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(71, 126, 188, 0.25);
  border-radius: 15px;
  background: rgba(3, 15, 30, 0.62);
}

body[data-page="galeria"] .gallery-filter-bar .filter-field {
  width: min(100%, 440px);
}

body[data-page="galeria"] .gallery-archive {
  gap: 17px;
  min-width: 0;
}

body[data-page="galeria"] .gallery-stage {
  min-width: 0;
  gap: 15px;
  padding: clamp(14px, 1.8vw, 22px);
  border-color: rgba(47, 143, 255, 0.25);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(10, 30, 55, 0.92), rgba(5, 17, 33, 0.96));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.17);
}

body[data-page="galeria"] .gallery-stage-head {
  gap: 4px;
}

body[data-page="galeria"] .gallery-stage-kicker {
  margin: 0;
  color: #35b9ff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

body[data-page="galeria"] .gallery-stage-head h3 {
  color: #f4f7fc;
  font-family: "Formula1 Bold", "Formula1", sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
}

body[data-page="galeria"] .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  align-items: stretch;
  gap: 12px;
  min-width: 0;
}

body[data-page="galeria"] .gallery-thumb-button {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  min-width: 0;
  height: 100%;
  flex: initial;
  border-color: rgba(73, 129, 190, 0.26);
  border-radius: 14px;
  background: rgba(3, 15, 30, 0.85);
}

body[data-page="galeria"] .gallery-thumb-button img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

body[data-page="galeria"] .gallery-card-copy {
  min-width: 0;
  align-content: start;
  gap: 4px;
  padding: 10px 11px 11px;
}

body[data-page="galeria"] .gallery-card-copy strong {
  color: #edf4ff;
  font-size: 0.76rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

body[data-page="galeria"] .gallery-card-copy span {
  color: #9fb8d5;
  font-size: 0.69rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

body[data-page="galeria"] .gallery-modal-panel {
  border-color: rgba(47, 143, 255, 0.35);
  border-radius: 20px;
  background: rgba(3, 16, 33, 0.98);
}

body[data-page="galeria"] .gallery-modal-image {
  border-radius: 13px;
}

/* The upcoming season is intentionally a quiet, standalone destination. */

.upcoming-season-page {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: calc(100% - clamp(20px, 3vw, 48px));
  min-height: calc(100vh - clamp(24px, 4vw, 52px));
  margin: clamp(12px, 2vw, 26px) auto;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(44, 145, 226, 0.55);
  border-radius: clamp(18px, 2vw, 28px);
  background:
    radial-gradient(circle at 8% 27%, rgba(22, 84, 148, 0.16), transparent 35rem),
    linear-gradient(145deg, rgba(6, 22, 41, 0.98), rgba(4, 13, 26, 0.99) 72%),
    #061426;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.upcoming-season-header {
  position: relative;
  z-index: 2;
  padding: 0 clamp(8px, 1.15vw, 16px);
}

.upcoming-season-topbar {
  min-height: 90px;
  margin-top: 0;
  gap: 16px;
  padding: 10px clamp(14px, 2vw, 28px);
  border: 1px solid rgba(47, 143, 255, 0.42);
  border-radius: 20px;
  background: rgba(3, 16, 33, 0.92);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.upcoming-season-topbar .brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  padding: 0;
  color: #f4f7fc;
  text-decoration: none;
}

.upcoming-season-topbar .brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: contain;
}

.upcoming-season-topbar .brand-copy {
  display: grid;
  gap: 3px;
}

.upcoming-season-topbar .brand-copy strong {
  font-family: "Formula1 Bold", "Formula1", sans-serif;
  font-size: clamp(0.82rem, 1.3vw, 1.1rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.upcoming-season-topbar .brand-copy small {
  color: #9fb8d5;
  font-size: 0.62rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.upcoming-season-header-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 209, 102, 0.31);
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.07);
  color: #ffdc8a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.upcoming-season-header-status > span {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 0 5px rgba(255, 209, 102, 0.12), 0 0 20px rgba(255, 209, 102, 0.35);
}

.upcoming-season-main {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 0;
  padding: clamp(12px, 1.6vw, 22px) clamp(8px, 1.1vw, 16px) clamp(8px, 1.1vw, 16px);
}

.upcoming-season-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: clamp(480px, 66vh, 730px);
  margin: 0;
  padding: clamp(30px, 6vw, 88px);
  overflow: hidden;
  border: 1px solid rgba(47, 143, 255, 0.36);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 5% 8%, rgba(13, 102, 191, 0.23), transparent 48%),
    radial-gradient(ellipse at 96% 94%, rgba(185, 42, 68, 0.16), transparent 40%),
    linear-gradient(112deg, rgba(3, 16, 33, 0.99), rgba(5, 24, 46, 0.95) 55%, rgba(6, 21, 39, 0.96));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.21), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.upcoming-season-hero::before {
  position: absolute;
  inset: 0 0 0 43%;
  z-index: 0;
  background: linear-gradient(128deg, transparent 0 18%, rgba(19, 85, 151, 0.22) 18% 50%, rgba(140, 34, 65, 0.16) 50% 100%);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
  content: "";
  pointer-events: none;
}

.upcoming-season-hero::after {
  position: absolute;
  top: 50%;
  right: 8%;
  z-index: 0;
  width: clamp(260px, 35vw, 500px);
  aspect-ratio: 1;
  border: 1px solid rgba(57, 147, 235, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(57, 147, 235, 0.04), 0 0 0 70px rgba(220, 49, 70, 0.035), inset 0 0 80px rgba(57, 147, 235, 0.07);
  content: "";
  pointer-events: none;
  transform: translateY(-50%);
}

.upcoming-season-copy {
  position: relative;
  z-index: 2;
  width: min(68%, 850px);
}

.upcoming-season-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 17px;
  color: #35b9ff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.upcoming-season-kicker-line {
  display: inline-block;
  width: 34px;
  height: 4px;
  flex: 0 0 34px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e2372f, #3588ff);
}

.upcoming-season-copy h1 {
  max-width: 12ch;
  margin: 0;
  color: #f5f7fb;
  font-family: "Formula1 Bold", "Formula1", sans-serif;
  font-size: clamp(3rem, 6.1vw, 6.1rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.99;
  text-wrap: balance;
}

.upcoming-season-copy .hero-text {
  max-width: 650px;
  margin: 22px 0 0;
  color: #c2d5ed;
  font-size: clamp(0.98rem, 1.35vw, 1.22rem);
  line-height: 1.6;
}

.upcoming-season-return {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-top: 28px;
  padding-inline: 22px;
  border: 1px solid rgba(80, 164, 255, 0.43);
  border-radius: 12px;
  background: linear-gradient(115deg, #087ff4, #1457d4);
  color: #f7fbff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(0, 83, 193, 0.26);
}

.upcoming-season-return:hover,
.upcoming-season-return:focus-visible {
  border-color: rgba(145, 203, 255, 0.8);
  background: linear-gradient(115deg, #168eff, #246cea);
  transform: translateY(-1px);
}

.upcoming-season-year {
  position: absolute;
  z-index: 0;
  right: 8%;
  bottom: 8%;
  color: rgba(226, 235, 250, 0.065);
  font-family: "Formula1 Bold", "Formula1", sans-serif;
  font-size: clamp(8rem, 21vw, 20rem);
  letter-spacing: -0.09em;
  line-height: 0.8;
  pointer-events: none;
}

.upcoming-season-orbit {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 23%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #35b9ff;
  box-shadow: 0 0 0 8px rgba(53, 185, 255, 0.12), 0 0 32px rgba(53, 185, 255, 0.52);
  transform: translateY(-50%);
}

.upcoming-season-orbit span,
.upcoming-season-orbit i,
.upcoming-season-orbit b {
  position: absolute;
  inset: 50%;
  display: block;
  width: 15vw;
  max-width: 190px;
  aspect-ratio: 1;
  border: 1px solid rgba(120, 168, 241, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.upcoming-season-orbit i {
  width: 25vw;
  max-width: 320px;
  border-color: rgba(120, 168, 241, 0.2);
}

.upcoming-season-orbit b {
  width: 37vw;
  max-width: 470px;
  border-color: rgba(226, 55, 47, 0.16);
}

.upcoming-season-track {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: 4px;
  opacity: 0.9;
}

.upcoming-season-track span {
  flex: 1;
  background: linear-gradient(90deg, #e2372f, #f15249);
}

.upcoming-season-track span:nth-child(2n) {
  background: linear-gradient(90deg, #1e5cca, #4a92ff);
}

@media (max-width: 1120px) {
  body[data-page="historico"] #site-shell > .history-page-frame > .page-main > .page-hero,
  body[data-page="galeria"] #site-shell > .gallery-page-frame > .page-main > .page-hero {
      grid-template-columns: minmax(0, 1fr) minmax(270px, 0.72fr);
    }

  .upcoming-season-copy {
      width: min(74%, 800px);
    }
}

@media (max-width: 880px) {
  body[data-page="historico"] .history-record-grid.history-global-record-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

  body[data-page="historico"] .history-global-record-grid .history-record-card:last-child {
      grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
  body[data-page="historico"] #site-shell > .history-page-frame > .page-main > .page-hero,
  body[data-page="galeria"] #site-shell > .gallery-page-frame > .page-main > .page-hero {
      grid-template-columns: minmax(0, 1fr);
      gap: 18px;
      min-height: 0;
      padding: 22px 17px 17px;
      border-radius: 18px;
    }

  body[data-page="historico"] .history-page-frame > .site-header .topbar,
  body[data-page="galeria"] .gallery-page-frame > .site-header .topbar {
      min-height: 0;
    }

  body[data-page="historico"] #site-shell > .history-page-frame > .page-main > .page-hero h1,
  body[data-page="galeria"] #site-shell > .gallery-page-frame > .page-main > .page-hero h1 {
      max-width: 12ch;
      margin-top: 8px;
      font-size: clamp(2.2rem, 9.2vw, 3.35rem);
    }

  body[data-page="historico"] .history-page-hero .hero-text,
  body[data-page="galeria"] .gallery-page-hero .hero-text {
      margin-top: 11px;
      font-size: 0.8rem;
    }

  body[data-page="galeria"] .gallery-hero-summary {
      justify-self: stretch;
      width: 100%;
      min-width: 0;
      padding: 14px;
      border-radius: 14px;
    }

  body[data-page="galeria"] .gallery-hero-summary > div {
      padding-inline: 10px;
    }

  body[data-page="galeria"] .gallery-hero-summary span {
      font-size: 0.56rem;
    }

  body[data-page="galeria"] .gallery-hero-summary strong {
      font-size: 2.4rem;
    }

  body[data-page="historico"] .history-hero-summary {
      min-height: 0;
      grid-template-columns: minmax(0, 1fr);
      justify-self: center;
      width: fit-content;
      min-width: min(100%, 230px);
      justify-items: center;
      gap: 4px;
      padding: 14px 16px;
      border-radius: 14px;
    }

  body[data-page="etapas"] #site-shell > .stages-page-frame > .page-main.stages-page > .stages-page-hero .stages-page-hero-actions {
      grid-template-columns: minmax(0, 1fr);
      justify-self: center;
      justify-items: center;
      width: fit-content;
      min-width: 0;
      gap: 8px;
      padding: 8px 9px;
    }

  body[data-page="etapas"] #site-shell > .stages-page-frame > .page-main.stages-page > .stages-page-hero .stages-page-hero-actions .report-link {
      width: auto;
      padding: 8px 9px;
      font-size: 0.57rem;
    }

  body[data-page="historico"] .history-hero-summary > strong {
      font-size: 2.5rem;
    }

  body[data-page="galeria"] .gallery-page-content.section,
  body[data-page="historico"] .history-global-records,
  body[data-page="historico"] .history-global-block {
      padding: 15px;
      border-radius: 17px;
    }

  body[data-page="historico"] .history-scope-switcher-shell .ranking-series-switcher {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
      width: 100%;
      border-radius: 15px;
    }

  body[data-page="historico"] .history-scope-switcher-shell .ranking-series-button {
      min-width: 0;
      min-height: 40px;
      padding-inline: 8px;
      font-size: 0.66rem;
      letter-spacing: 0.025em;
    }

  body[data-page="historico"] .trophy-room {
      padding: 20px 16px;
      border-radius: 18px;
    }

  body[data-page="historico"] .trophy-award-grid {
      grid-template-columns: minmax(0, 1fr);
    }

  body[data-page="historico"] .trophy-award,
    body[data-page="historico"] .trophy-award-champion {
      min-height: 180px;
    }

  body[data-page="historico"] .history-record-grid.history-global-record-grid {
      grid-template-columns: minmax(0, 1fr);
    }

  body[data-page="historico"] .history-global-record-grid .history-record-card:last-child {
      grid-column: auto;
    }

  body[data-page="galeria"] .gallery-content-heading {
      align-items: flex-start;
      flex-direction: column;
      gap: 8px;
    }

  body[data-page="galeria"] .gallery-filter-bar .filter-field {
      width: 100%;
    }

  body[data-page="galeria"] .gallery-grid {
      grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr));
      gap: 9px;
    }

  .upcoming-season-page {
      grid-template-rows: auto minmax(0, 1fr);
      width: calc(100% - 24px);
      min-height: calc(100vh - 24px);
      margin: 12px auto;
      padding: 6px;
      border-radius: 19px;
    }

  .upcoming-season-header {
      padding: 0 6px;
    }

  .upcoming-season-topbar {
      min-height: 64px;
      gap: 8px;
      padding: 8px 10px;
      border-radius: 15px;
    }

  .upcoming-season-topbar .brand {
      min-width: 0;
      gap: 7px;
    }

  .upcoming-season-topbar .brand-logo {
      width: 38px;
      height: 38px;
      flex-basis: 38px;
    }

  .upcoming-season-topbar .brand-copy strong {
      font-size: 0.67rem;
      letter-spacing: 0.025em;
    }

  .upcoming-season-topbar .brand-copy small {
      font-size: 0.48rem;
      letter-spacing: 0.11em;
    }

  .upcoming-season-header-status {
      gap: 6px;
      min-height: 30px;
      padding: 0 8px;
      font-size: 0.48rem;
      letter-spacing: 0.01em;
    }

  .upcoming-season-header-status > span {
      width: 6px;
      height: 6px;
      flex-basis: 6px;
    }

  .upcoming-season-main {
      padding: 8px 6px 6px;
    }

  .upcoming-season-hero {
      align-items: flex-start;
      min-height: min(660px, calc(100svh - 110px));
      padding: clamp(25px, 7vw, 38px) clamp(18px, 5vw, 28px);
      border-radius: 17px;
    }

  .upcoming-season-copy {
      width: 100%;
    }

  .upcoming-season-copy .eyebrow {
      align-items: flex-start;
      gap: 8px;
      margin-bottom: 15px;
      font-size: 0.58rem;
      letter-spacing: 0.1em;
      line-height: 1.45;
    }

  .upcoming-season-kicker-line {
      width: 24px;
      height: 3px;
      flex-basis: 24px;
      margin-top: 6px;
    }

  .upcoming-season-copy h1 {
      max-width: 11ch;
      font-size: clamp(2.35rem, 10.8vw, 3.8rem);
    }

  .upcoming-season-copy .hero-text {
      max-width: 38ch;
      margin-top: 16px;
      font-size: 0.88rem;
      line-height: 1.55;
    }

  .upcoming-season-return {
      min-height: 48px;
      margin-top: 21px;
      padding-inline: 14px;
      font-size: 0.62rem;
    }

  .upcoming-season-hero::before {
      inset: 36% 0 0 0;
      clip-path: polygon(38% 0, 100% 0, 100% 100%, 0 100%);
    }

  .upcoming-season-hero::after {
      top: auto;
      right: -22%;
      bottom: 7%;
      width: 75vw;
      transform: none;
    }

  .upcoming-season-orbit {
      top: auto;
      right: 31%;
      bottom: 19%;
      transform: none;
    }

  .upcoming-season-orbit span {
      width: 34vw;
    }

  .upcoming-season-orbit i {
      width: 55vw;
    }

  .upcoming-season-orbit b {
      width: 78vw;
    }

  .upcoming-season-year {
      right: 6%;
      bottom: 8%;
      font-size: clamp(7rem, 36vw, 12rem);
    }
}

@media (max-width: 430px) {
  body[data-page="galeria"] .gallery-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

  .upcoming-season-topbar .brand-copy small {
      display: none;
    }

  .upcoming-season-header-status {
      max-width: 44%;
      white-space: normal;
      line-height: 1.2;
    }
}

/* One published partner at a time, carried consistently across public pages. */

.sponsor-spotlight {
  width: min(100%, 620px);
  max-width: 620px;
  margin: 18px auto 22px;
  overflow: hidden;
  border: 1px solid rgba(73, 143, 224, 0.38);
  border-radius: 13px;
  background: #08192d;
}

.sponsor-spotlight-link {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: #f4f8ff;
  text-decoration: none;
}

.sponsor-spotlight-logo {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #102742;
}

.sponsor-spotlight-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.sponsor-spotlight-initial {
  color: #a9d7ff;
  font-family: "Formula1 Bold", "Formula1", sans-serif;
  font-size: 1.45rem;
}

.sponsor-spotlight-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
}

.sponsor-spotlight-copy strong {
  overflow: hidden;
  color: #f4f8ff;
  font-size: 0.95rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sponsor-spotlight-copy > span {
  color: #b5c9e2;
  font-size: 0.73rem;
  line-height: 1.35;
}

.sponsor-spotlight-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: #b9dcff;
  font-size: 0.76rem;
  font-weight: 700;
}

.sponsor-spotlight-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.sponsor-spotlight-link:hover {
  background: #0b2038;
}

.sponsor-spotlight-link:hover .sponsor-spotlight-action {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sponsor-spotlight-link:focus-visible {
  outline: 3px solid #72d4ff;
  outline-offset: -3px;
}

.participants-page .sponsor-spotlight {
  margin-block: 14px 18px;
}

body[data-page="participantes"] .participants-page-frame > .page-main > .sponsor-spotlight {
  width: min(100%, 620px);
  max-width: 620px;
  margin-inline: auto;
}

body[data-page="etapas"] .stages-page-frame > .page-main > .sponsor-spotlight {
  width: min(100%, 620px);
  max-width: 620px;
  margin-inline: auto;
}

body[data-page="etapas"] .stages-page-hero h1 > span {
  color: #4eb6ff;
}

@media (max-width: 600px) {
  .sponsor-spotlight-link {
      min-height: 74px;
      gap: 10px;
      padding: 9px 11px;
    }

  .sponsor-spotlight-logo {
      flex-basis: 48px;
      width: 48px;
      height: 48px;
    }

  .sponsor-spotlight-copy strong { font-size: 0.82rem; }

  .sponsor-spotlight-copy > span { font-size: 0.67rem; }

  .sponsor-spotlight-action { gap: 3px; font-size: 0.66rem; }

  .sponsor-spotlight-action svg { width: 15px; height: 15px; }
}

body[data-page="etapas"] #site-shell > .stages-page-frame > .page-main.stages-page > .stages-page-hero .stages-page-hero-actions .report-link {
  font-size: 0.67rem;
}

body[data-page="historico"] .history-season-state-active {
  justify-items: stretch;
  gap: 20px;
  padding: clamp(18px, 3vw, 30px);
  text-align: left;
}

body[data-page="historico"] .history-season-state-copy {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 5px 16px;
}

body[data-page="historico"] .history-season-state-copy .history-state-icon {
  grid-column: 1;
  grid-row: 1 / span 4;
}

body[data-page="historico"] .history-season-state-copy > :not(.history-state-icon) {
  grid-column: 2;
}

body[data-page="historico"] .history-season-state-copy .eyebrow,
body[data-page="historico"] .history-season-state-copy > p:not(.eyebrow) {
  margin: 0;
}

body[data-page="historico"] .history-season-state-copy h2 {
  max-width: none;
}

body[data-page="historico"] .history-season-state-copy .button {
  margin-top: 5px;
}

body[data-page="historico"] .history-active-global-records {
  width: 100%;
  padding-top: 17px;
  border-top: 1px solid rgba(104, 159, 217, 0.22);
}

body[data-page="historico"] .history-active-global-records .history-global-heading {
  margin-bottom: 10px;
}

body[data-page="historico"] .history-active-global-records .history-global-heading h3 {
  margin: 0;
  color: #f4f7fc;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
}

body[data-page="historico"] .history-active-global-record-grid .history-record-card {
  min-height: 138px;
  padding: 15px;
}

body[data-page="historico"] .history-active-global-record-grid .history-record-card strong {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

@media (max-width: 760px) {
  body[data-page="historico"] .history-season-state-active {
      padding: 18px 15px;
    }

  body[data-page="historico"] .history-season-state-copy {
      grid-template-columns: minmax(0, 1fr);
    }

  body[data-page="historico"] .history-season-state-copy .history-state-icon,
    body[data-page="historico"] .history-season-state-copy > :not(.history-state-icon) {
      grid-column: 1;
      grid-row: auto;
    }

  body[data-page="historico"] .history-active-global-record-grid .history-record-card {
      min-height: 120px;
    }
}

/* Keep the ranking compact on phones while leaving every statistic reachable. */

@media (prefers-reduced-motion: reduce) {
  .upcoming-season-page *,
    .upcoming-season-page *::before,
    .upcoming-season-page *::after {
      scroll-behavior: auto !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
}

/* Championship movement stays in the driver's copy, preserving narrow screens. */

/* Ranking is a consultation page: keep its heading and controls compact. */

/* Keep the first photographs close to the gallery introduction. */

body[data-page="galeria"] #site-shell > .gallery-page-frame > .page-main > .page-hero {
  min-height: 0;
  padding-block: 20px;
  gap: 20px;
}

body[data-page="galeria"] .gallery-page-hero h1 {
  max-width: none;
  font-size: clamp(2rem, 3.5vw, 3.4rem);
}

body[data-page="galeria"] .gallery-hero-summary {
  padding: 10px 14px;
}

body[data-page="galeria"] .gallery-hero-summary strong {
  font-size: clamp(1.5rem, 2.5vw, 2.4rem);
}

body[data-page="galeria"] .gallery-page-content { gap: 10px; }

body[data-page="galeria"] .gallery-filter-bar { padding: 8px; }

body[data-page="galeria"] .gallery-stage { gap: 10px; padding: 12px; }

@media (max-width: 760px) {
  body[data-page="galeria"] #site-shell > .gallery-page-frame > .page-main > .page-hero {
      gap: 10px;
      padding: 16px;
    }

  body[data-page="galeria"] #site-shell > .gallery-page-frame > .page-main > .page-hero h1 {
      max-width: none;
      font-size: clamp(1.8rem, 7vw, 2.3rem);
    }

  body[data-page="galeria"] .gallery-page-hero .hero-text { margin-top: 6px; }

  body[data-page="galeria"] .gallery-hero-summary { padding: 8px; }

  body[data-page="galeria"] .gallery-hero-summary strong { font-size: 1.5rem; }
}
