:root {
  color-scheme: dark;
  --ink: #ffffff;
  --muted: #b9c5dc;
  --deep: #071326;
  --night: #0a1f44;
  --panel: rgba(8, 23, 50, 0.82);
  --line: rgba(255, 255, 255, 0.16);
  --pink: #ff2c87;
  --blue: #1688ff;
  --yellow: #ffd84a;
  --cyan: #5ee7ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--deep);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(7, 19, 38, 0.18), var(--deep) 540px),
    radial-gradient(circle at 78% 12%, rgba(255, 216, 74, 0.24), transparent 26rem),
    radial-gradient(circle at 20% 10%, rgba(255, 44, 135, 0.26), transparent 28rem),
    var(--deep);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: rgba(5, 13, 28, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  color: var(--deep);
  background: linear-gradient(135deg, var(--yellow), var(--pink) 54%, var(--cyan));
  border-radius: 50%;
  box-shadow: 0 0 32px rgba(255, 44, 135, 0.38);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.top-nav a,
.button,
.year-switcher a {
  min-height: 2.5rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

.top-nav a:hover,
.year-switcher a:hover,
.button:hover,
.year-card:hover,
.leader-row:hover {
  border-color: rgba(255, 216, 74, 0.72);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.7rem;
  padding: 1.4rem clamp(1rem, 4vw, 3rem) 2rem;
  background: var(--deep);
}

.site-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.site-footer-links a[hidden] {
  display: none;
}

.site-footer-links a + a::before {
  content: "";
  width: 1px;
  height: 1em;
  background: rgba(196, 208, 240, 0.35);
}

.site-footer-links a[data-first-visible="true"]::before {
  display: none;
}

.site-footer-links a:hover {
  color: var(--yellow);
}

.hero {
  display: grid;
  min-height: min(760px, calc(100vh - 72px));
  align-items: end;
  padding: clamp(2rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
  background:
    linear-gradient(90deg, rgba(5, 13, 28, 0.9), rgba(5, 13, 28, 0.46) 56%, rgba(5, 13, 28, 0.12)),
    linear-gradient(0deg, var(--deep), rgba(7, 19, 38, 0.04) 38%),
    url("assets/scoobies-stage.png") center / cover;
}

.hero-copy {
  max-width: 850px;
  padding-bottom: 4rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 11ch;
  margin-bottom: 1rem;
  font-size: clamp(3.2rem, 6rem, 6rem);
  line-height: 0.95;
}

.hero p:not(.eyebrow) {
  max-width: 640px;
  color: #e7eefc;
  font-size: 1.2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.primary {
  border-color: transparent;
  color: var(--deep);
  background: var(--yellow);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.stats-strip div {
  min-height: 118px;
  padding: 1.25rem clamp(1rem, 3vw, 2rem);
  background: rgba(8, 23, 50, 0.92);
}

.stats-strip strong {
  display: block;
  color: var(--cyan);
  font-size: 2.15rem;
  line-height: 1;
}

.stats-strip div > span {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-weight: 700;
}

.stats-strip .person-stat {
  display: flex;
  align-items: center;
  min-height: 2.4rem;
}

.section-intro {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem clamp(1rem, 4vw, 2rem) 1.2rem;
}

.section-intro h1,
.section-intro h2 {
  margin-bottom: 0;
  font-size: 2.3rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 2rem;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.85rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem) 4rem;
}

.year-card {
  display: grid;
  min-height: 190px;
  align-content: space-between;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 44, 135, 0.15), rgba(22, 136, 255, 0.12)),
    rgba(8, 23, 50, 0.72);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.year-card.future {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.05);
}

.year-card-number {
  color: var(--yellow);
  font-size: 2.35rem;
  font-weight: 950;
  line-height: 1;
}

.host-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 0.34rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

.host-badge > span {
  font-size: 1.15rem;
  line-height: 1;
}

.year-card strong {
  font-size: 1.18rem;
  line-height: 1.2;
}

.year-card > span:not(.year-card-number) {
  color: var(--muted);
}

.split-result-card {
  grid-template-columns: minmax(0, 1fr) 6.2rem;
  align-items: stretch;
  align-content: stretch;
  min-height: 210px;
  overflow: hidden;
}

.split-result-card > .year-card-number,
.split-result-card > .host-badge,
.split-result-card > strong,
.split-result-card > span:not(.timeline-winner-panel) {
  grid-column: 1;
}

.timeline-winner-panel {
  grid-column: 2;
  grid-row: 1 / span 4;
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  margin: -1rem -1rem -1rem 0;
  padding: 0.8rem;
  border-left: 1px solid var(--line);
  background: rgba(94, 231, 255, 0.14);
  color: var(--ink);
  text-align: center;
}

.timeline-winner-panel img,
.fallback-initial {
  display: grid;
  width: 4.4rem;
  height: 4.4rem;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.16);
}

.timeline-winner-panel small {
  display: block;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.timeline-winner-panel strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--yellow);
  font-size: 1rem;
  line-height: 1;
}

.timeline-winner-panel.empty {
  color: var(--muted);
}

.timeline-winner-panel.empty strong {
  font-size: 0.9rem;
}

.year-page,
.records-page,
.uk-page,
.not-found {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem);
}

.year-switcher {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.year-switcher a:last-child {
  justify-self: end;
}

.year-hero {
  min-height: 330px;
  padding: clamp(1.2rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255, 44, 135, 0.22), rgba(22, 136, 255, 0.18)),
    rgba(8, 23, 50, 0.78);
  box-shadow: var(--shadow);
}

.year-hero.hero-with-photo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 1.5rem;
  overflow: hidden;
  padding: 0;
}

.year-hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(1.2rem, 4vw, 2.5rem);
}

.year-hero-photo {
  position: relative;
  min-height: 100%;
  margin: 0;
}

.year-hero-photo::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 42%;
  background: linear-gradient(90deg, rgba(22, 17, 52, 0.98), rgba(22, 17, 52, 0));
  content: "";
  pointer-events: none;
}

.year-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.year-hero h1 {
  margin-bottom: 0.6rem;
  color: var(--yellow);
  font-size: clamp(4rem, 7rem, 7rem);
  line-height: 0.9;
}

.year-hero p:not(.eyebrow) {
  max-width: 720px;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.15;
}

.year-hero .hero-location {
  margin-top: -0.35rem;
  color: #d6e2fa;
  font-size: 1.22rem;
  font-weight: 800;
}

.office-holders {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.office-holders div {
  display: grid;
  min-width: min(100%, 230px);
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.office-holders .hero-winner-chip {
  min-width: min(100%, 330px);
  border-color: rgba(255, 216, 74, 0.42);
  background: rgba(255, 216, 74, 0.12);
}

.office-holders .hero-office-group {
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.5rem;
  min-width: min(100%, 360px);
}

.office-holders span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.office-holders strong {
  color: var(--cyan);
  font-size: 1.1rem;
}

.office-holders .hero-winner-chip strong {
  color: var(--yellow);
  font-size: 1.55rem;
}

.office-holders .hero-winner-chip .person-chip img {
  width: 3.4rem;
  height: 3.4rem;
}

.office-holders .hero-office-group .person-chip img {
  width: 2rem;
  height: 2rem;
}

@media (min-width: 781px) {
  .office-holders {
    display: grid;
    width: min(100%, 680px);
    gap: 1rem;
    margin-top: 1.8rem;
  }

  .office-holders div {
    width: 100%;
  }

  .office-holders .hero-winner-chip {
    align-content: center;
    min-height: 190px;
    gap: 1rem;
    padding: 1.35rem 1.8rem;
  }

  .office-holders .hero-office-group {
    min-height: 145px;
    padding: 1.3rem 1.6rem;
  }

  .office-holders span {
    font-size: 1.05rem;
  }

  .office-holders strong {
    font-size: 2rem;
    line-height: 1;
  }

  .office-holders .person-chip span {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-transform: none;
  }

  .office-holders .hero-winner-chip strong {
    display: block;
    width: 100%;
    font-size: clamp(3.2rem, 3.4vw, 4rem);
    line-height: 1.15;
  }

  .office-holders .hero-winner-chip .person-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.65rem;
    width: 100%;
  }

  .office-holders .hero-winner-chip .person-chip img {
    width: 8.8rem;
    height: 8.8rem;
  }

  .office-holders .hero-winner-chip .person-chip span {
    color: var(--yellow);
    font-size: clamp(3.2rem, 3.4vw, 4rem);
    line-height: 0.95;
  }

  .office-holders .hero-office-group {
    grid-template-columns: minmax(11rem, 0.58fr) minmax(0, 1fr);
    column-gap: 1.6rem;
    row-gap: 1.15rem;
  }

  .office-holders .hero-office-group .person-chip {
    gap: 1rem;
  }

  .office-holders .hero-office-group .person-chip img {
    width: 4.8rem;
    height: 4.8rem;
  }
}

.year-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  margin-top: 1rem;
}

.eurovision-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 1rem;
  align-items: stretch;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(94, 231, 255, 0.14), rgba(255, 216, 74, 0.1)),
    rgba(8, 23, 50, 0.7);
  box-shadow: var(--shadow);
}

.eurovision-context h2 {
  margin-bottom: 0.65rem;
  font-size: 1.8rem;
}

.context-copy {
  max-width: 780px;
  color: #e7eefc;
  font-size: 1rem;
  line-height: 1.6;
}

.context-link {
  display: inline-flex;
  width: fit-content;
  min-height: 2.45rem;
  align-items: center;
  margin-top: 0.35rem;
  padding: 0.62rem 0.82rem;
  border: 1px solid rgba(94, 231, 255, 0.52);
  border-radius: 8px;
  color: var(--cyan);
  font-weight: 900;
  text-decoration: none;
}

.context-link:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.context-image {
  display: grid;
  overflow: hidden;
  align-self: stretch;
  min-height: 180px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(224, 239, 255, 0.94));
}

.context-image img {
  display: block;
  width: calc(100% - 2rem);
  max-height: 240px;
  margin: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(5, 13, 28, 0.26));
}

.context-image figcaption {
  padding: 0.55rem 0.7rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: 1rem;
  margin: 0;
}

.info-card,
.result-panel,
.award,
.leaderboard,
.award-table,
.mini-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.info-card {
  min-height: 145px;
  padding: 1rem;
}

.info-card.with-photo,
.award.with-photo {
  overflow: hidden;
  padding: 0;
}

.inline-photo {
  overflow: hidden;
  margin: 0;
  background: rgba(255, 255, 255, 0.08);
}

.inline-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.info-card.with-photo dt,
.info-card.with-photo dd,
.award.with-photo > span,
.award.with-photo > strong {
  margin-right: 1rem;
  margin-left: 1rem;
}

.info-card.with-photo dt,
.award.with-photo > span {
  margin-top: 1rem;
}

.info-card.with-photo dd,
.award.with-photo > strong {
  margin-bottom: 1rem;
}

.info-card dt,
.result-panel > span,
.award > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.info-card dd {
  margin: 0.35rem 0 0;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
}

.theme-location-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1fr);
}

.theme-location-card:not(.with-photo) {
  display: block;
}

.theme-location-card.with-photo .inline-photo img {
  height: 100%;
  min-height: 100%;
  aspect-ratio: auto;
}

.theme-location-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: 1rem;
}

.theme-location-copy dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.theme-location-copy dd {
  margin: 0.35rem 0 0;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
}

.result-panel {
  display: grid;
  min-height: 306px;
  align-content: center;
  justify-items: start;
  padding: 1.4rem;
  background:
    linear-gradient(160deg, rgba(255, 216, 74, 0.22), rgba(255, 44, 135, 0.18)),
    var(--panel);
}

.result-panel > .inline-photo {
  width: 100%;
  margin: -0.25rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-panel > .inline-photo img {
  aspect-ratio: 4 / 3;
}

.result-panel strong {
  color: var(--yellow);
  font-size: 2.6rem;
  line-height: 1;
}

.winner-hero-photo {
  width: min(220px, 72vw);
  aspect-ratio: 1;
  margin: 0.8rem 0 1rem;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 6px rgba(255, 216, 74, 0.18),
    0 20px 52px rgba(0, 0, 0, 0.36);
}

.result-panel p {
  margin: 1rem 0 0;
  color: #e7eefc;
  line-height: 1.55;
}

.winner-trophy-showcase {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 216, 74, 0.12), rgba(255, 44, 135, 0.1)),
    var(--panel);
  box-shadow: var(--shadow);
}

.showcase-copy {
  display: grid;
  align-content: center;
}

.showcase-copy h2 {
  margin-bottom: 0.55rem;
  color: var(--yellow);
  font-size: 2.2rem;
}

.showcase-photos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.showcase-photo {
  display: grid;
  min-height: 360px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.showcase-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
}

.showcase-photo.winner-photo img {
  object-fit: cover;
}

.showcase-photo.trophy-photo img {
  padding: 0.8rem;
  object-fit: contain;
}

.contest-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.contest-card {
  min-height: 250px;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(94, 231, 255, 0.08)),
    var(--panel);
  box-shadow: var(--shadow);
}

.winner-contest-card {
  background:
    linear-gradient(145deg, rgba(255, 216, 74, 0.18), rgba(255, 44, 135, 0.11)),
    var(--panel);
}

.uk-contest-card {
  background:
    linear-gradient(145deg, rgba(94, 231, 255, 0.15), rgba(22, 136, 255, 0.1)),
    var(--panel);
}

.country-line {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.flag {
  display: grid;
  width: 3.1rem;
  height: 3.1rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.85rem;
}

.country-line h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.song-line {
  min-height: 2.9rem;
  color: var(--yellow);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.16;
}

.contest-card dl {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
}

.contest-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.contest-card dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contest-card dd {
  margin: 0;
  color: #e7eefc;
  font-weight: 900;
  text-align: right;
}

.awards-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.award {
  min-height: 122px;
  padding: 1rem;
}

.award strong {
  display: block;
  margin-top: 0.45rem;
  color: var(--cyan);
  font-size: 1.35rem;
  line-height: 1.18;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 0.55rem;
  color: inherit;
  text-transform: none;
}

.person-chip img {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
}

.person-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.result-panel .person-chip {
  align-items: center;
  gap: 0.75rem;
}

.result-panel .person-chip img {
  width: 3.4rem;
  height: 3.4rem;
}

.photo-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 23, 50, 0.56);
  box-shadow: var(--shadow);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.photo-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.photo-card figcaption {
  padding: 0.75rem;
  color: var(--cyan);
  font-weight: 900;
}

.scoreboard-photo-panel,
.gallery-carousel-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 216, 74, 0.1), rgba(22, 136, 255, 0.08)),
    rgba(8, 23, 50, 0.64);
  box-shadow: var(--shadow);
}

.scoreboard-photo-panel {
  display: grid;
  grid-template-columns: minmax(210px, 0.35fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.scoreboard-photo-copy {
  align-content: center;
  display: grid;
}

.scoreboard-photo-copy h2 {
  color: var(--yellow);
  font-size: 2rem;
}

.scoreboard-photo-panel figure,
.gallery-slide {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.scoreboard-photo-panel img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.gallery-carousel {
  display: grid;
  grid-auto-columns: clamp(280px, 58vw, 720px);
  grid-auto-flow: column;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.75rem;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--yellow) rgba(255, 255, 255, 0.12);
}

.gallery-slide {
  min-width: 0;
  scroll-snap-align: start;
}

.gallery-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  cursor: zoom-in;
  background: transparent;
}

.gallery-slide img,
.gallery-slide iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 0;
}

.gallery-image-button img {
  transition: transform 180ms ease;
}

.gallery-image-button:hover img,
.gallery-image-button:focus-visible img {
  transform: scale(1.03);
}

.gallery-slide figcaption,
.gallery-tile figcaption {
  padding: 0.65rem 0.75rem;
  color: var(--cyan);
  font-weight: 900;
}

.full-gallery {
  margin-top: 1rem;
}

.full-gallery summary {
  width: fit-content;
  cursor: pointer;
  color: var(--yellow);
  font-weight: 950;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.gallery-tile {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.gallery-tile img,
.gallery-tile iframe {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 0;
}

.video-tile {
  background:
    linear-gradient(135deg, rgba(255, 216, 74, 0.12), rgba(255, 44, 135, 0.1)),
    rgba(8, 23, 50, 0.88);
}

.youtube-tile iframe {
  background: #000;
}

.gallery-slide.youtube-tile iframe {
  aspect-ratio: 16 / 9;
}

.gallery-tile.youtube-tile {
  grid-column: span 2;
}

.gallery-tile.youtube-tile iframe {
  aspect-ratio: 16 / 9;
}

.gallery-open-button {
  width: calc(100% - 1.3rem);
  margin: 0.65rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 216, 74, 0.65);
  border-radius: 8px;
  color: var(--yellow);
  cursor: pointer;
  background: rgba(255, 216, 74, 0.08);
  font: inherit;
  font-weight: 950;
}

.gallery-open-button:hover,
.gallery-open-button:focus-visible {
  color: var(--ink);
  background: var(--yellow);
}

body.has-media-lightbox {
  overflow: hidden;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(4.5rem, 7vw, 5.5rem) clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
  pointer-events: none;
}

.media-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 6, 18, 0.86);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.media-lightbox-controls {
  position: fixed;
  top: clamp(0.8rem, 2vw, 1.4rem);
  left: 50%;
  z-index: 1003;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  width: min(760px, calc(100vw - 1.4rem));
  transform: translateX(-50%);
  pointer-events: auto;
}

.media-lightbox-panel {
  position: relative;
  z-index: 1002;
  width: min(1180px, 96vw);
  max-height: 94vh;
  pointer-events: auto;
}

.media-lightbox-panel figure {
  overflow: hidden;
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(255, 216, 74, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 216, 74, 0.08), rgba(22, 136, 255, 0.08)),
    rgba(7, 18, 42, 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.media-lightbox-stage {
  display: grid;
  place-items: center;
  min-height: min(66vh, 720px);
  background: rgba(0, 0, 0, 0.3);
}

.media-lightbox-image,
.media-lightbox-video {
  display: block;
  max-height: 76vh;
  border: 0;
}

.media-lightbox-image {
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.media-lightbox-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.media-lightbox-panel figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  color: #e7eefc;
  font-weight: 900;
}

.media-lightbox-panel figcaption span {
  flex: 0 0 auto;
  color: var(--cyan);
}

.media-lightbox-close,
.media-lightbox-nav {
  border: 1px solid rgba(255, 216, 74, 0.55);
  border-radius: 8px;
  color: var(--yellow);
  cursor: pointer;
  background: rgba(8, 23, 50, 0.92);
  font: inherit;
  font-weight: 950;
}

.media-lightbox-close {
  padding: 0.8rem 1rem;
}

.media-lightbox-nav {
  flex: 1 1 0;
  min-width: 7.2rem;
  padding: 1rem;
}

.media-lightbox-close:hover,
.media-lightbox-close:focus-visible,
.media-lightbox-nav:hover,
.media-lightbox-nav:focus-visible {
  color: var(--ink);
  background: var(--yellow);
}

.final-results-panel,
.ssp-results-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 23, 50, 0.7);
  box-shadow: var(--shadow);
}

.final-results-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.final-results-table th,
.final-results-table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.final-results-table th {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.final-results-table td:first-child,
.final-results-table td:last-child {
  color: var(--yellow);
  font-weight: 900;
  white-space: nowrap;
}

.country-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 900;
}

.ssp-results-table th:nth-child(1),
.ssp-results-table td:nth-child(1),
.ssp-results-table th:nth-child(4),
.ssp-results-table td:nth-child(4) {
  width: 4.8rem;
}

.ssp-results-table th:nth-child(2),
.ssp-results-table td:nth-child(2) {
  width: 11rem;
}

.ssp-results-table th:nth-child(3),
.ssp-results-table td:nth-child(3) {
  width: 8.5rem;
}

.ssp-results-table td:nth-child(5) {
  min-width: 340px;
}

.ssp-results-table .person-chip span {
  white-space: nowrap;
}

.source-note {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.ssp-vote-details summary {
  width: max-content;
  cursor: pointer;
  color: var(--cyan);
  font-weight: 900;
}

.ssp-vote-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.ssp-vote-pill {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 0.45rem;
  padding: 0.28rem 0.38rem;
  border: 1px solid rgba(94, 231, 255, 0.16);
  border-radius: 999px;
  color: #d7e2f7;
  background: rgba(255, 255, 255, 0.045);
}

.ssp-vote-pill img,
.ssp-vote-avatar {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  object-fit: cover;
}

.ssp-vote-avatar {
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--cyan);
  font-size: 0.85rem;
  font-weight: 950;
}

.ssp-vote-pill span:not(.ssp-vote-avatar) {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssp-vote-pill b {
  color: var(--yellow);
  font-size: 1rem;
  font-weight: 850;
}

.semi-archive {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.semi-archive-heading h3 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.semi-archive-card {
  display: grid;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.semi-archive-card-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.semi-archive-card-heading h4 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
}

.semi-archive-card-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.semi-archive-card-heading strong {
  color: var(--yellow);
}

.semi-score-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.semi-score-strip > span {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.42rem;
  border: 1px solid rgba(94, 231, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.semi-score-strip b {
  color: var(--yellow);
}

.semi-archive-table {
  min-width: 980px;
}

.semi-archive-table th:not(:first-child),
.semi-archive-table td:not(:first-child) {
  text-align: center;
  width: 5rem;
}

.semi-archive-table tr.is-qualified td:first-child {
  background: rgba(94, 231, 255, 0.06);
}

.semi-song-line {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.qualifier-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.75rem;
  min-height: 1.75rem;
  margin-top: 0.45rem;
  border-radius: 999px;
  color: var(--ink);
  background: var(--cyan);
  font-size: 0.82rem;
  font-weight: 950;
}

.semi-mark {
  display: inline-grid;
  place-items: center;
  min-width: 1.75rem;
  min-height: 1.75rem;
  border-radius: 999px;
  font-weight: 950;
}

.semi-mark.correct {
  color: #052713;
  background: #59e989;
}

.semi-mark.wrong {
  color: #fff;
  background: #d9476d;
}

.semi-mark.blank {
  color: rgba(215, 226, 247, 0.35);
}

.non-qualifiers {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.non-qualifiers h3 {
  margin-bottom: 0.65rem;
  color: var(--cyan);
  font-size: 1rem;
  text-transform: uppercase;
}

.non-qualifiers ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}

.non-qualifiers li {
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.non-qualifiers li > span:last-child {
  color: var(--muted);
}

.source-note a {
  color: var(--cyan);
}

.records-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1rem;
}

.records-section {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 23, 50, 0.56);
  box-shadow: var(--shadow);
}

.records-section h2 {
  margin-bottom: 1rem;
}

.office-records-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.leaderboard,
.award-table {
  padding: 1rem;
}

.leaderboard h2,
.award-table h2,
.mini-board h3 {
  margin-bottom: 1rem;
}

.leader-row {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto auto;
  gap: 0.8rem;
  align-items: center;
  min-height: 58px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.leader-row + .leader-row,
.mini-board + .mini-board {
  margin-top: 0.65rem;
}

.leader-row > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: var(--deep);
  background: var(--yellow);
  font-weight: 950;
}

.leader-row em {
  color: var(--cyan);
  font-style: normal;
  font-weight: 900;
}

.leader-row small,
.muted {
  color: var(--muted);
}

.mini-board {
  padding: 1rem;
}

.mini-board div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.mini-board strong {
  color: var(--yellow);
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 23, 50, 0.72);
  box-shadow: var(--shadow);
}

.uk-performance-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.uk-performance-table th,
.uk-performance-table td {
  padding: 0.95rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.uk-performance-table th {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.uk-performance-table td:first-child,
.uk-performance-table td:nth-child(4),
.uk-performance-table td:nth-child(5) {
  font-weight: 900;
  white-space: nowrap;
}

.uk-performance-table a {
  color: var(--yellow);
  text-decoration: none;
}

.uk-performance-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.not-found {
  min-height: calc(100vh - 72px);
  display: grid;
  align-content: center;
  justify-items: start;
}

@media (max-width: 780px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 640px;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .stats-strip,
  .year-grid,
  .info-grid,
  .theme-location-card,
  .year-hero.hero-with-photo,
  .winner-trophy-showcase,
  .showcase-photos,
  .contest-results,
  .eurovision-context,
  .records-layout,
  .office-records-grid,
  .scoreboard-photo-panel {
    grid-template-columns: 1fr;
  }

  .gallery-carousel {
    grid-auto-columns: minmax(240px, 86%);
  }

  .gallery-tile.youtube-tile {
    grid-column: auto;
  }

  .media-lightbox {
    padding: 5rem 0.7rem 0.7rem;
  }

  .media-lightbox-stage {
    min-height: 48vh;
  }

  .media-lightbox-controls {
    gap: 0.45rem;
  }

  .media-lightbox-nav {
    min-width: 0;
    padding: 0.85rem 0.55rem;
  }

  .showcase-photo {
    min-height: 260px;
  }

  .showcase-photo img {
    min-height: 230px;
  }

  .year-hero-copy {
    padding-bottom: 0;
  }

  .year-hero-photo {
    min-height: 260px;
  }

  .year-hero-photo::before {
    inset: 0 0 auto;
    width: auto;
    height: 42%;
    background: linear-gradient(180deg, rgba(22, 17, 52, 0.98), rgba(22, 17, 52, 0));
  }

  .year-hero-photo img {
    min-height: 260px;
    max-height: 420px;
  }

  .theme-location-card.with-photo .inline-photo img {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .leader-row {
    grid-template-columns: 2.4rem 1fr auto;
  }

  .leader-row small {
    grid-column: 2 / -1;
  }

  .split-result-card {
    grid-template-columns: 1fr;
  }

  .split-result-card > .year-card-number,
  .split-result-card > .host-badge,
  .split-result-card > strong,
  .split-result-card > span:not(.timeline-winner-panel),
  .timeline-winner-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .timeline-winner-panel {
    display: flex;
    justify-content: flex-start;
    margin: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
    gap: 0.75rem;
  }

  .timeline-winner-panel small {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 0.95rem;
  }

  .top-nav a,
  .button,
  .year-switcher a {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }

  .hero-copy {
    padding-bottom: 2rem;
  }

  .year-hero h1 {
    font-size: 4rem;
  }

  .year-hero p:not(.eyebrow) {
    font-size: 1.55rem;
  }
}
