:root {
  --navy: #12345b;
  --navy2: #081b31;
  --red: #d52b37;
  --orange: #ef892d;
  --blue: #177fae;
}

body { overflow-x: hidden; }

/* Intrinsic image dimensions prevent layout shift; keep CSS-sized images proportional. */
img { height: auto; }

@media (max-width: 1280px) {
  .header-inner { gap: 20px; }
  .nav,
  .header-actions { display: none; }
  .menu { display: flex; align-items: center; gap: 4px; flex-direction: column; margin-left: auto; }
  .menu span { width: 25px; height: 2px; background: var(--navy); }
  .menu b { margin-top: 3px; font-size: 8px; text-transform: uppercase; }
  .nav.open { display: flex; position: absolute; left: 20px; right: 20px; top: 88px; align-items: stretch; flex-direction: column; gap: 0; padding: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 15px 35px rgba(0,0,0,.12); }
  .nav.open a { height: auto; padding: 13px; }
  .nav.open a::after { display: none; }
}

.mobile-nav-actions,
.nav .mobile-nav-secondary,
.nav-backdrop {
  display: none;
}

.nav .mobile-federation { display: none; }
.nav > a,
.outline-button,
.live-button { white-space: nowrap; }

.info-section {
  position: relative;
  background: linear-gradient(180deg, #f1f4f8 0%, #f8fafc 100%);
}

.info-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--red) 0 34%, var(--orange) 34% 67%, var(--blue) 67%);
}

.news-section {
  position: relative;
  padding-bottom: 92px;
  background: #fff;
}

.news-section::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0 22%, var(--orange) 22% 42%, var(--navy) 42% 100%);
}

.news-grid {
  align-items: start;
}

.news-card {
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  border-color: rgba(18, 52, 91, .18);
}

.guide-section {
  position: relative;
  padding: 108px 0;
  background: var(--navy);
}

.guide-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: rgba(255, 255, 255, .16);
}

.institutions {
  border-top: 1px solid rgba(255, 255, 255, .13);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: var(--navy);
}

.institutions .container > span { color: rgba(255, 255, 255, .62); }
.institution-logos img { filter: grayscale(1) brightness(0) invert(1); opacity: .7; }

.footer {
  background: var(--navy2);
}

.institution-logos { flex-wrap: wrap; }

.footer-wordmark { display: inline-flex; align-items: center; padding: 0 0 17px; border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-wordmark strong,.footer-wordmark b { display: block; }
.footer-wordmark strong { color: #fff; font-size: 17px; letter-spacing: .045em; }
.footer-wordmark b { margin-top: 3px; color: rgba(255,255,255,.62); font-size: 12px; font-weight: 600; }
.footer-cookie-link { display: block; margin: 11px 0; padding: 0; border: 0; color: rgba(255,255,255,.74); background: none; font: inherit; font-size: 11px; cursor: pointer; }
.footer-cookie-link:hover { color: #fff; }

.cookie-banner { position: fixed; z-index: 300; right: 24px; bottom: 24px; width: min(560px, calc(100% - 48px)); padding: 22px; border: 1px solid rgba(18,52,91,.15); border-radius: 12px; background: #fff; box-shadow: 0 24px 70px rgba(8,27,49,.28); }
.cookie-banner[hidden],.cookie-settings[hidden],.cookie-save[hidden] { display: none; }
.cookie-copy { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 14px; }
.cookie-copy > div { min-width: 0; }
.cookie-copy p { overflow-wrap: anywhere; }
.cookie-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--orange); font-size: 22px; }
.cookie-copy h2 { margin: 0 0 7px; color: var(--navy2); font-size: 18px; }
.cookie-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.cookie-copy a { display: inline-block; margin-top: 8px; color: var(--navy); font-size: 10px; font-weight: 800; text-decoration: underline; }
.cookie-settings { margin: 18px 0 4px; border-top: 1px solid var(--line); }
.cookie-settings label { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.cookie-settings strong,.cookie-settings small { display: block; }
.cookie-settings strong { color: var(--navy2); font-size: 12px; }
.cookie-settings small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.cookie-settings input { width: 18px; height: 18px; accent-color: var(--red); }
.cookie-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.cookie-actions button { min-height: 40px; padding: 0 15px; border-radius: 5px; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.cookie-secondary { color: var(--navy); border: 1px solid var(--line); background: #fff; }
.cookie-primary { color: #fff; border: 1px solid var(--red); background: var(--red); }

.side-link,
.outline-button,
.live-button,
.calendar-panel > a,
.guide-copy > a {
  transition: transform .22s ease, background-color .22s ease, color .22s ease, box-shadow .22s ease;
}

.outline-button:hover,
.live-button:hover,
.guide-copy > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(8, 27, 49, .14);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }

@media (max-width: 780px) {
  .nav.open { top: 76px; }
  .section { padding: 48px 0; }
  .info-section { padding: 36px 0 28px; }
  .news-section { padding: 38px 0 52px; }
  .guide-section { padding: 54px 0 46px; }
}

@media (max-width: 1120px) {
  body.menu-open { overflow: hidden; }
  .menu { position: relative; z-index: 104; width: 48px; height: 54px; justify-content: center; }
  .menu span { transition: transform .22s ease, opacity .18s ease; transform-origin: center; }
  .menu.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu.is-open span:nth-child(2) { opacity: 0; }
  .menu.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav.open {
    position: fixed;
    z-index: 103;
    top: 122px;
    left: max(20px, calc((100vw - 1220px) / 2));
    right: max(20px, calc((100vw - 1220px) / 2));
    max-height: calc(100dvh - 142px);
    overflow-y: auto;
    gap: 0;
    padding: 13px 20px 18px;
    border: 1px solid rgba(18, 52, 91, .12);
    border-radius: 10px;
    background: rgba(255, 255, 255, .985);
    box-shadow: 0 24px 60px rgba(8, 27, 49, .24);
  }
  .nav.open > a:not(.mobile-federation) {
    min-height: 48px;
    padding: 0 7px;
    border-bottom: 1px solid #e8edf2;
    color: var(--navy2);
    font-size: 14px;
  }
  .nav.open > a.active { color: var(--red); }
  .nav.open > a.active::before { content: ""; width: 4px; height: 18px; margin-right: 10px; border-radius: 5px; background: var(--red); }
  .mobile-nav-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
  .mobile-nav-actions a { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 6px; font-size: 12px; font-weight: 800; }
  .mobile-register { color: var(--navy); border: 1px solid var(--navy); }
  .mobile-live { color: #fff; background: var(--red); }
  .mobile-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.16); }
  .nav.open .mobile-nav-secondary { display: block; }
  .mobile-nav-secondary a { min-height: 48px; display: flex; align-items: center; padding: 0 7px; border-bottom: 1px solid #e8edf2; color: var(--navy2); font-size: 14px; font-weight: 700; }
  .nav.open .mobile-federation { min-height: auto; display: flex; justify-content: space-between; margin-top: 15px; padding: 9px 7px 0; color: #64748b; font-size: 10px; font-weight: 700; }
  .nav-backdrop.is-open { position: fixed; z-index: 99; inset: 0; display: block; border: 0; background: rgba(8, 27, 49, .48); backdrop-filter: blur(2px); }
}

@media (min-width: 521px) and (max-width: 780px) {
  .nav.open { top: 118px; }
}

@media (max-width: 520px) {
  .official-bar { display: none; }
  .header { top: 0; }
  .container { width: min(100% - 24px, 620px); }
  .header-inner { height: 66px; }
  .logo img { width: 205px; max-width: calc(100vw - 92px); }
  .menu span { width: 23px; }
  .nav.open { left: 12px; right: 12px; top: 74px; max-height: calc(100dvh - 86px); padding: 8px 16px 16px; }
  .nav.open > a:not(.mobile-federation) { min-height: 44px; font-size: 13px; }
  .mobile-nav-secondary a { min-height:44px; font-size:13px; }
  .mobile-nav-actions { margin-top: 13px; }
  .hero { padding-top: 10px; padding-bottom: 14px; }
  .hero-main { min-height: 420px; border-radius: 8px; }
  .hero-main > img { object-position: 57% center; }
  .hero-overlay { background: linear-gradient(0deg, rgba(7, 26, 52, .98) 0%, rgba(7, 26, 52, .75) 46%, rgba(7, 26, 52, .05) 82%); }
  .hero-content { left: 19px; right: 19px; bottom: 21px; }
  .hero-meta { gap: 10px; margin-bottom: 12px; font-size: 9px; }
  .hero-meta span { padding: 6px 8px; }
  .hero-content h1 { margin-bottom: 14px; font-size: clamp(26px, 8.1vw, 31px); line-height: 1.04; letter-spacing: -.035em; }
  .hero-content > strong { font-size: 11px; }
  .hero-content p, .hero-brand { display: none; }
  .hero-side { grid-template-columns: 1fr 1fr; }
  .side-link { min-height: 78px; padding: 11px; gap: 10px; border-right: 1px solid var(--line); }
  .side-link:nth-of-type(2n) { border-right: 0; }
  .side-icon { width: 33px; height: 33px; font-size: 15px; }
  .side-link small { font-size: 7px; }
  .side-link strong { font-size: 10px; line-height: 1.25; }
  .notice-inner { padding: 14px 0; }
  .notice-inner p { font-size: 11px; line-height: 1.5; }
  .announcements { padding: 24px 18px; }
  .announcement-list > a { grid-template-columns: 50px 1fr auto; gap: 13px; }
  .announcement-list h3 { font-size: 12px; }
  .calendar-panel { margin-top: 12px; }
  .calendar-head { padding: 20px 21px; }
  .calendar-head h2 { font-size: 24px; }
  .calendar-empty { padding: 27px 20px; }
  .calendar-panel > a { padding: 15px 20px; }
  .news-card.featured .news-image,
  .news-image { height: 215px; }
  .info-section { padding: 28px 0 22px; }
  .news-section { padding: 34px 0 44px; }
  .guide-section { padding: 46px 0 32px; }
  .guide-grid { gap: 28px; }
  .guide-copy h2 { margin-bottom: 14px; font-size: 34px; }
  .guide-copy ul { margin: 19px 0 23px; }
  .guide-image { height: 238px; }
  .control-flag { right: 18px; bottom: 18px; width: 48px; height: 48px; border-width: 14px; }
  .institutions { padding: 40px 0; background: var(--navy); }
  .institutions .container > span { font-size: 9px; line-height: 1.55; }
  .institution-logos { gap: 24px 28px; margin-top: 25px; }
  .institution-logos img { max-width: 112px; max-height: 48px; }
  .footer { padding: 48px 0 22px; background: var(--navy2); }
  .footer-grid { gap: 28px; padding-bottom: 34px; }
  .footer-about p { margin-top: 17px; }
  .footer h2 { margin-bottom: 14px; }
  .cookie-banner { right: 12px; bottom: 12px; width: calc(100% - 24px); padding: 18px; }
  .cookie-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-primary { grid-column: 1 / -1; grid-row: 1; }
  .cookie-save { grid-column: 1 / -1; }
}

.event-date.date-pending {
  align-content: center;
  gap: 5px;
  color: var(--navy);
  background: #fff;
  border-right: 1px solid var(--line);
}
.event-date.date-pending b { font-size: 25px; letter-spacing: .02em; }
.event-date.date-pending span,
.event-date.date-pending small { font-weight: 800; }
.event-date.date-pending small { color: #7a8798; font-size: 8px; letter-spacing: .02em; line-height: 1.25; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .news-card, .news-image img, .side-link { transition: none; }
}
