/* ==========================================================================
   Ligi Kuu – main stylesheet
   1. Tokens          6. Header & nav       11. Tables
   2. Base            7. Footer             12. News
   3. Layout          8. Page heads         13. Pages
   4. Typography      9. Cards & matches    14. Utilities
   5. Buttons        10. Hero & media
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
/* "Calm navy": navy is reserved for the header and footer, surfaces are quiet
   neutrals, red is a thin accent, and status colours are soft tints. */
:root{
  /* brand – #262262 is the exact backdrop of the league logo artwork */
  --navy:#262262;
  --navy-800:#201d55;
  --navy-900:#1b1848;
  --red:#c8323f;
  --gold:#d9a441;

  /* surfaces & text (light) */
  --bg:#f7f7f5;
  --surface:#ffffff;
  --surface-2:#fafaf8;
  --surface-3:#f1f1ee;
  --text:#1d1c2b;
  --text-muted:#5f5e6c;
  --border:#e6e5e0;
  --heading:var(--navy);
  --accent:var(--navy);
  --accent-soft:#ecebf4;
  --on-accent:#ffffff;
  --focus:#4f46e5;

  /* status tints (tables, form guide) */
  --win-bg:#e2f1e7;  --win-fg:#1c6b3c;
  --draw-bg:#ececef; --draw-fg:#585766;
  --loss-bg:#fbe5e7; --loss-fg:#a32432;

  --shadow:none;
  --shadow-lg:0 18px 40px -18px rgba(27,24,72,.28);

  /* type */
  /* Archivo is variable in width: normal width for reading, expanded and heavy for display */
  --font-body:'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display:'Archivo', 'Arial Black', system-ui, sans-serif;
  --display-stretch:118%;
  --display-weight:800;
  --fs-xs:.75rem;     /* 12 */
  --fs-sm:.875rem;    /* 14 */
  --fs-base:1rem;     /* 16 */
  --fs-lg:1.125rem;   /* 18 */
  --fs-xl:1.375rem;   /* 22 */

  /* shape & layout */
  --radius:12px;
  --radius-sm:8px;
  --container:1240px;
  --gutter:clamp(16px, 4vw, 32px);
  --header-h:60px;
  --ease:cubic-bezier(.4,0,.2,1);
}

/* ---------- 2. Base ---------- */
*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth; scroll-padding-top:calc(var(--header-h) + 16px); -webkit-text-size-adjust:100%;}
body{
  margin:0; min-height:100vh; display:flex; flex-direction:column;
  background:var(--bg); color:var(--text);
  font-family:var(--font-body); font-size:var(--fs-base); line-height:1.6;
  -webkit-font-smoothing:antialiased;
  padding-bottom:env(safe-area-inset-bottom, 0px);
}
img{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
button{font:inherit; color:inherit;}
abbr[title]{text-decoration:none; cursor:help;}
address{font-style:normal;}
h1,h2,h3,h4{margin:0; line-height:1.25;}

:focus-visible{outline:2px solid var(--focus); outline-offset:2px; border-radius:4px;}

.skip-link{
  position:absolute; left:16px; top:-48px; z-index:10000;
  background:var(--navy); color:#fff; padding:10px 16px; border-radius:var(--radius-sm); font-weight:700;
  transition:top .2s var(--ease);
}
.skip-link:focus{top:12px;}

.icon{width:20px; height:20px; flex:none; display:inline-block; vertical-align:middle;}
.icon--sm{width:16px; height:16px;}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important;}
}

/* Display type: wide, heavy, uppercase – used for titles, scores and the wordmark */
.section-title, .page-title, .nav-brand, .drawer__title, .footer-logo, .link-card__title,
.match-vs, .match-score, .video-feature__title, .countdown__unit span, .match-row__mid--score, .crest__txt, .doc__icon{
  font-family:var(--font-display); font-weight:var(--display-weight); font-stretch:var(--display-stretch);
  text-transform:uppercase; letter-spacing:-.005em;
}

/* ---------- 3. Layout ---------- */
.site-main{flex:1 0 auto; width:100%;}
.wrap{max-width:var(--container); margin:0 auto; padding:0 var(--gutter); width:100%;}
.wrap--narrow{max-width:880px;}
.section{padding:clamp(32px, 5vw, 56px) 0 0;}
.section:last-child{padding-bottom:clamp(40px, 6vw, 72px);}
.section--tight{padding-top:28px;}
.stack{display:flex; flex-direction:column; gap:28px;}
.grid-2{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:24px; align-items:start;}
.grid-2 > *{min-width:0;}

/* ---------- 4. Typography ---------- */
.section-head{display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:20px;}
.section-title{
  font-size:clamp(1.5rem, 2.6vw, 1.85rem);
  line-height:1.05; color:var(--heading);
  display:inline-flex; flex-direction:column; gap:8px;
}
.section-title::after{content:""; width:32px; height:2px; border-radius:2px; background:var(--red);}
.section-title--sm{font-size:clamp(1.25rem, 2vw, 1.5rem);}

.link-more{
  display:inline-flex; align-items:center; gap:6px;
  font-size:var(--fs-sm); font-weight:700; color:var(--accent);
}
.link-more .icon{transition:transform .2s var(--ease);}
.link-more:hover .icon, a:hover > .link-more .icon{transform:translateX(3px);}

.muted{color:var(--text-muted);}
.empty-state{color:var(--text-muted); text-align:center; padding:28px 16px; margin:0; font-size:var(--fs-sm);}

.pill{
  display:inline-block; background:var(--red); color:#fff;
  font-size:11px; font-weight:700; letter-spacing:.4px; text-transform:uppercase;
  padding:3px 10px; border-radius:999px; line-height:1.4;
}
.tag{
  margin-left:auto; font-size:var(--fs-xs); font-weight:800; letter-spacing:.4px;
  padding:3px 10px; border-radius:999px; background:var(--loss-bg); color:var(--loss-fg);
}
.tag--muted{background:var(--surface-3); color:var(--text-muted);}

.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;}

/* ---------- 5. Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 20px; border-radius:999px; border:1.5px solid transparent;
  font-weight:700; font-size:var(--fs-sm); line-height:1.2; cursor:pointer; white-space:nowrap;
  transition:background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .1s var(--ease);
}
.btn:active{transform:scale(.97);}
.btn--sm{padding:8px 16px; font-size:var(--fs-xs);}
.btn--lg{padding:14px 24px; font-size:var(--fs-base);}
.btn--block{width:100%;}
.btn--primary{background:var(--accent); color:var(--on-accent);}
.btn--primary:hover{background:var(--navy-800);}
.btn--outline{border-color:var(--border); color:var(--accent); background:var(--surface);}
.btn--outline:hover{border-color:var(--accent); background:var(--accent); color:var(--on-accent);}
.btn--light{background:#fff; color:var(--navy);}
.btn--light:hover{background:#ecebf4;}

.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:999px; border:0; background:transparent; cursor:pointer;
  transition:background .2s var(--ease);
}
.icon-btn:hover{background:rgba(127,127,160,.15);}

/* ---------- 6. Header & nav ---------- */
/* The banner image is white on the left and navy on the right; matching
   page-edge colours let it sit centred at a capped height on wide screens. */
.banner{background:linear-gradient(90deg, #fff 50%, #262262 50%);}
.banner__link{display:block; max-width:1050px; margin:0 auto;}  /* 1050 ≈ 150px tall */
.banner img{width:100%; height:auto; clip-path:inset(0 3px 0 0);} /* trims a grey edge in the PNG */

.site-header{
  position:sticky; top:0; z-index:900;
  background:var(--navy); color:#fff;
  box-shadow:0 1px 0 rgba(255,255,255,.06);
  transition:box-shadow .2s var(--ease);
}
.site-header.is-stuck{box-shadow:0 6px 24px -10px rgba(0,0,0,.5);}
.nav-bar{display:flex; align-items:center; gap:20px; height:var(--header-h);}

.nav-brand{
  display:none; align-items:center; gap:10px; flex:none;
  font-size:1.2rem; line-height:1;
}
.nav-brand img{height:36px; width:auto;}
.site-header.is-stuck .nav-brand{display:inline-flex;}

.nav-primary{flex:1; min-width:0;}
.nav-list{list-style:none; margin:0; padding:0; display:flex; align-items:center; gap:4px;}
.nav-item{position:relative;}
.nav-link{
  position:relative; display:inline-flex; align-items:center; gap:4px;
  height:var(--header-h); padding:0 12px; border:0; background:none; cursor:pointer;
  color:rgba(255,255,255,.88); font-size:var(--fs-sm); font-weight:600; white-space:nowrap;
}
.nav-link::after{
  content:""; position:absolute; left:12px; right:12px; bottom:0; height:2px; border-radius:2px 2px 0 0;
  background:var(--red); transform:scaleX(0); transition:transform .25s var(--ease);
}
.nav-link:hover, .nav-link[aria-expanded="true"]{color:#fff;}
.nav-link:hover::after, .nav-link[aria-expanded="true"]::after, .nav-link.is-active::after{transform:scaleX(1);}
.nav-link.is-active{color:#fff;}
.nav-link .icon{transition:transform .2s var(--ease); opacity:.8;}
.nav-link[aria-expanded="true"] .icon{transform:rotate(180deg);}

.nav-menu{
  position:absolute; top:calc(100% - 6px); left:0; z-index:950;
  min-width:220px; padding:8px; display:flex; flex-direction:column;
  background:var(--surface); color:var(--text);
  border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-lg);
  opacity:0; visibility:hidden; transform:translateY(6px);
  transition:opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.nav-menu--end{left:auto; right:0;}
.nav-item.is-open > .nav-menu{opacity:1; visibility:visible; transform:none;}
@media (hover:hover){
  .nav-item.has-menu:not(.nav-search-pop):hover > .nav-menu{opacity:1; visibility:visible; transform:none;}
}
.nav-menu > a, .mega-col li a{
  display:block; padding:9px 12px; border-radius:var(--radius-sm);
  font-size:var(--fs-sm); font-weight:600; color:var(--text);
  transition:background .15s var(--ease), color .15s var(--ease);
}
.nav-menu > a:hover, .mega-col li a:hover{background:var(--surface-2); color:var(--accent);}

.nav-menu--mega{min-width:min(680px, 90vw); padding:16px;}
.mega-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:12px;}
.mega-head{
  display:flex; align-items:center; gap:10px; padding:8px; border-radius:var(--radius-sm);
  font-weight:800; font-size:var(--fs-sm); color:var(--heading); line-height:1.25;
}
.mega-head:hover{background:var(--surface-2);}
.mega-logo{width:40px; height:40px; flex:none; border-radius:10px; overflow:hidden; background:#fff; border:1px solid var(--border);}
.mega-logo img{width:100%; height:100%; object-fit:contain;}
.mega-col ul{list-style:none; margin:4px 0 0; padding:0;}
.mega-col li a{font-weight:500; color:var(--text-muted); padding:7px 10px 7px 58px;}
.nav-menu > a.nav-menu__all{
  display:flex; align-items:center; gap:6px; margin-top:4px; padding-top:10px;
  border-top:1px solid var(--border); border-radius:0 0 var(--radius-sm) var(--radius-sm);
  color:var(--accent); font-weight:700;
}

.nav-actions{display:flex; align-items:center; gap:8px; margin-left:auto; flex:none;}
.nav-search-pop .nav-menu{top:calc(100% + 4px);}
.nav-menu--search{min-width:340px; padding:10px;}
.nav-search{display:flex; align-items:center; gap:8px; padding-left:8px;}
.nav-search > .icon{width:18px; height:18px; color:var(--text-muted);}
.nav-search input{
  flex:1; min-width:0; height:38px; border:0; outline:0; background:transparent; color:var(--text);
  font-family:inherit; font-size:var(--fs-base);
}

.site-header .icon-btn{color:#fff;}
.site-header .icon-btn:hover{background:rgba(255,255,255,.12);}
.nav-login .icon{width:16px; height:16px;}
.nav-burger{display:none;}

/* Floating menu button, top right – phones only (see the 640px breakpoint) */
.menu-fab{
  display:none; position:fixed; z-index:950;
  right:calc(12px + env(safe-area-inset-right, 0px));
  /* Sits just under the banner, then rides up with it and stays 12px from the top.
     --fab-banner-bottom is kept up to date by main.js. */
  top:max(calc(12px + env(safe-area-inset-top, 0px)), calc(var(--fab-banner-bottom, 0px) + 12px));
  align-items:center; gap:8px; height:44px; padding:0 16px 0 14px;
  border:0; border-radius:999px; cursor:pointer;
  background:var(--navy); color:#fff; font-weight:700; font-size:var(--fs-sm);
  /* the light ring keeps it distinct over the navy half of the banner */
  box-shadow:0 10px 24px -8px rgba(27,24,72,.55), 0 0 0 1px rgba(255,255,255,.28);
  transition:transform .15s var(--ease);
}
.menu-fab:active{transform:scale(.96);}
body.has-drawer .menu-fab{visibility:hidden;}

/* Mobile drawer */
.drawer{position:fixed; inset:0; z-index:1000;}
.drawer[hidden]{display:none;}
.drawer__backdrop{position:absolute; inset:0; background:rgba(10,8,30,.55); animation:fade-in .2s var(--ease);}
.drawer__panel{
  position:absolute; top:0; right:0; bottom:0; width:min(360px, 88vw);
  display:flex; flex-direction:column; overflow-y:auto; overscroll-behavior:contain;
  background:var(--surface); color:var(--text); box-shadow:var(--shadow-lg);
  animation:slide-in .25s var(--ease);
}
.drawer__head{display:flex; align-items:center; justify-content:space-between; padding:12px 12px 12px 20px; border-bottom:1px solid var(--border);}
.drawer__title{font-size:1.1rem; color:var(--heading);}
.drawer__search{
  display:flex; align-items:center; gap:8px; margin:16px 20px 8px; padding:0 14px; height:44px;
  border:1px solid var(--border); border-radius:999px; background:var(--surface-2);
}
.drawer__search .icon{width:16px; height:16px; color:var(--text-muted);}
.drawer__search input{flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--text); font:inherit; font-size:var(--fs-base);}
.drawer__label{display:block; padding:18px 20px 6px; font-size:var(--fs-xs); font-weight:800; letter-spacing:.6px; text-transform:uppercase; color:var(--text-muted);}
.drawer__link{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:13px 20px; font-weight:600; font-size:var(--fs-base); cursor:pointer; list-style:none;
  border-left:3px solid transparent;
}
.drawer__link::-webkit-details-marker{display:none;}
.drawer__link:hover{background:var(--surface-2);}
.drawer__link.is-active{border-left-color:var(--red); color:var(--accent);}
.drawer__group[open] > .drawer__link .icon{transform:rotate(180deg);}
.drawer__link .icon{transition:transform .2s var(--ease); color:var(--text-muted);}
.drawer__sub{display:flex; flex-direction:column; background:var(--surface-2); padding:4px 0;}
.drawer__sub a{padding:10px 20px 10px 36px; font-size:var(--fs-sm); color:var(--text-muted); font-weight:500;}
.drawer__sub a:hover{color:var(--accent);}
.drawer__foot{margin-top:auto; padding:20px;}
body.has-drawer{overflow:hidden;}

@keyframes fade-in{from{opacity:0}}
@keyframes slide-in{from{transform:translateX(100%)}}

/* ---------- 7. Footer ---------- */
.site-footer{
  flex-shrink:0; margin-top:clamp(40px, 6vw, 72px);
  background:var(--navy); color:rgba(255,255,255,.72); font-size:var(--fs-sm);
}

.footer-grid{display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr; gap:32px; padding-top:48px; padding-bottom:36px;}
.footer-logo{font-size:1.35rem; color:#fff; line-height:1;}
.footer-brand p{margin:10px 0 18px; max-width:30ch;}
.footer-title{font-size:var(--fs-xs); font-weight:700; letter-spacing:.8px; text-transform:uppercase; color:rgba(255,255,255,.5); margin-bottom:14px;}
.footer-col ul{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px;}
.footer-col a{color:rgba(255,255,255,.85);}
.footer-col a:hover{color:#fff; text-decoration:underline; text-underline-offset:3px;}
.footer-col address{line-height:1.7;}
.footer-mail{display:inline-flex; align-items:center; gap:8px; margin-top:12px;}
.footer-mail .icon{width:16px; height:16px;}

.socials{display:flex; flex-wrap:wrap; gap:10px;}
.socials a{
  width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(255,255,255,.2); color:#fff;
  transition:background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.socials a:hover{background:#fff; color:var(--navy); border-color:#fff;}
.socials .icon{width:17px; height:17px;}

.footer-bottom{background:var(--navy-900); font-size:var(--fs-xs); color:rgba(255,255,255,.55);}
.footer-bottom .wrap{display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; padding-top:16px; padding-bottom:16px;}
.footer-bottom a:hover{color:#fff;}

/* ---------- 8. Page heads ---------- */
.page-head{background:var(--surface); border-bottom:1px solid var(--border); padding:28px 0 32px;}
.crumbs{display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:var(--fs-xs); color:var(--text-muted); margin-bottom:12px;}
.crumbs a:hover{color:var(--accent); text-decoration:underline; text-underline-offset:3px;}
.page-title{font-size:clamp(1.75rem, 3.6vw, 2.5rem); line-height:1.05; color:var(--heading);}
.page-lead{margin:10px 0 0; color:var(--text-muted); max-width:62ch; font-size:var(--fs-lg);}

.league-hero{display:flex; align-items:center; gap:20px;}
.league-hero__logo{width:84px; height:84px; flex:none; border-radius:var(--radius); background:#fff; border:1px solid var(--border); padding:6px; box-shadow:var(--shadow);}
.league-hero__logo img{width:100%; height:100%; object-fit:contain;}
.league-hero .page-lead{font-size:var(--fs-base);}

.season-tabs{display:flex; gap:8px; margin-top:24px; overflow-x:auto; scrollbar-width:none; padding-bottom:2px;}
.season-tabs::-webkit-scrollbar{display:none;}
.season-tab{
  flex:none; padding:8px 16px; border-radius:999px; border:1px solid var(--border);
  font-size:var(--fs-sm); font-weight:700; color:var(--text-muted); background:var(--surface);
  transition:all .15s var(--ease);
}
.season-tab:hover{border-color:var(--accent); color:var(--accent);}
.season-tab.is-active{background:var(--accent-soft); border-color:var(--accent); color:var(--accent);}

/* ---------- 9. Cards & matches ---------- */
.card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow);}
.card-head{display:flex; align-items:center; gap:12px; padding:18px 20px; border-bottom:1px solid var(--border);}
.card-head__text{min-width:0;}
.card-title{font-size:var(--fs-base); font-weight:800; color:var(--heading); line-height:1.3;}
.card-sub{font-size:var(--fs-xs); color:var(--text-muted); font-weight:600; margin-top:2px;}
.card-label{padding:16px 20px 8px; font-size:var(--fs-xs); font-weight:800; letter-spacing:.6px; text-transform:uppercase; color:var(--text-muted);}
.card-foot{padding:14px 20px; border-top:1px solid var(--border); display:flex; justify-content:flex-end;}
.empty-card{text-align:center; padding:48px 24px; color:var(--text-muted); display:flex; flex-direction:column; align-items:center; gap:12px;}
.empty-card p{margin:0; font-weight:700; color:var(--text);}

.comp-badge{width:40px; height:40px; flex:none; border-radius:10px; overflow:hidden; background:#fff; border:1px solid var(--border);}
.comp-badge img{width:100%; height:100%; object-fit:contain;}
.comp-badge--sm{width:32px; height:32px; border-radius:8px;}

/* Crest: initials sit underneath; the logo covers them when it loads. */
.crest{
  position:relative; width:32px; height:32px; flex:none; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center; overflow:hidden;
  background:var(--surface-3); color:var(--accent); border:1px solid var(--border);
}
.crest__txt{font-size:.62rem; font-stretch:100%; line-height:1;}
.crest img{position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:var(--surface); padding:2px;}
.crest--sm{width:24px; height:24px;}
.crest--sm .crest__txt{font-size:.5rem;}
.crest--lg{width:64px; height:64px; border-radius:16px;}
.crest--lg .crest__txt{font-size:1rem;}

.match-card{display:flex; flex-direction:column;}
.match-card .card-head{border-bottom:0; padding-bottom:4px;}
.match-teams{display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; padding:16px 20px;}
.match-team{display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center; min-width:0;}
.match-team__name{font-weight:700; font-size:var(--fs-base); line-height:1.3; overflow-wrap:anywhere;}
.match-vs{font-size:1rem; color:var(--text-muted);}
.match-score{font-size:2.5rem; line-height:1; color:var(--heading); font-variant-numeric:tabular-nums; display:flex; gap:10px;}
.match-score i{font-style:normal; color:var(--text-muted);}
.match-meta{
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 16px; margin-top:auto;
  padding:14px 20px; border-top:1px solid var(--border); font-size:var(--fs-sm); color:var(--text-muted);
}
.match-meta span{display:inline-flex; align-items:center; gap:6px;}
.match-meta .icon{width:16px; height:16px;}

.countdown{display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; padding:0 20px 18px;}
.countdown__unit{background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px 4px; text-align:center;}
.countdown__unit span{display:block; font-size:1.5rem; line-height:1.1; color:var(--heading); font-variant-numeric:tabular-nums;}
.countdown__unit small{font-size:var(--fs-xs); color:var(--text-muted); font-weight:600;}
.countdown.is-live .countdown__unit{border-color:var(--red);}

/* Fixture / result rows */
.match-list__day{
  padding:10px 20px; background:var(--surface-2); border-bottom:1px solid var(--border);
  font-size:var(--fs-xs); font-weight:800; letter-spacing:.5px; text-transform:uppercase; color:var(--text-muted);
}
.match-row{
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:4px 12px;
  padding:12px 20px; border-bottom:1px solid var(--border);
}
.match-list > .match-row:last-child{border-bottom:0;}
.match-row__team{display:flex; align-items:center; gap:10px; min-width:0; font-weight:600; font-size:var(--fs-sm);}
.match-row__team--home{justify-content:flex-end; text-align:right;}
.match-row__name{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.match-row__mid{
  min-width:64px; text-align:center; padding:4px 10px; border-radius:var(--radius-sm);
  font-weight:800; font-size:var(--fs-sm); font-variant-numeric:tabular-nums;
}
.match-row__mid--time{background:var(--surface-3); color:var(--accent);}
.match-row__mid--score{background:var(--accent-soft); color:var(--heading); font-size:1rem; display:flex; justify-content:center; gap:6px;}
.match-row__mid--score i{font-style:normal; opacity:.5;}
.match-row__venue{grid-column:1 / -1; text-align:center; font-size:var(--fs-xs); color:var(--text-muted);}

/* ---------- 10. Hero & media ---------- */
.news-layout{display:grid; grid-template-columns:minmax(0, 1.75fr) minmax(0, 1fr); gap:24px; align-items:stretch;}

.hero{
  position:relative; border-radius:var(--radius); overflow:hidden; min-height:420px;
  background:linear-gradient(135deg, var(--navy) 0%, var(--navy-900) 100%);
  box-shadow:var(--shadow);
}
.hero__track{position:absolute; inset:0;}
.hero__slide{
  position:absolute; inset:0; opacity:0; visibility:hidden; transition:opacity .7s var(--ease), visibility .7s;
  /* opaque fallback so slides without a photo still cover the outgoing one */
  background:radial-gradient(500px circle at 20% 15%, rgba(217,164,65,.12), transparent 60%),
             radial-gradient(400px circle at 90% 90%, rgba(200,50,63,.08), transparent 60%),
             linear-gradient(135deg, var(--navy) 0%, var(--navy-900) 100%);
}
.hero__slide.is-active{opacity:1; visibility:visible; z-index:1;}
.hero__slide:not(.is-active) .hero__caption{opacity:0; transition:opacity .2s var(--ease);}
.hero__slide img{width:100%; height:100%; object-fit:cover; transition:transform 6s linear;}
.hero__slide.is-active img{transform:scale(1.04);}
.hero__slide::after{content:""; position:absolute; inset:0; background:linear-gradient(180deg, transparent 35%, rgba(10,8,35,.88) 100%);}
.hero__caption{
  position:absolute; left:0; right:0; bottom:0; z-index:1;
  display:flex; flex-direction:column; align-items:flex-start; gap:10px;
  padding:28px 28px 52px; color:#fff;
}
.hero__title{font-size:clamp(1.25rem, 2.4vw, 1.75rem); font-weight:800; line-height:1.25; max-width:30ch; text-wrap:balance;}
.hero__slide:hover .hero__title{text-decoration:underline; text-underline-offset:4px; text-decoration-thickness:2px;}
.hero__meta{font-size:var(--fs-sm); color:rgba(255,255,255,.8);}
.hero__nav{
  position:absolute; top:50%; z-index:2; transform:translateY(-50%);
  width:44px; height:44px; border-radius:50%; border:0; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.16); color:#fff; backdrop-filter:blur(6px);
  opacity:0; transition:opacity .2s var(--ease), background .2s var(--ease);
}
.hero:hover .hero__nav, .hero__nav:focus-visible{opacity:1;}
.hero__nav:hover{background:rgba(255,255,255,.3);}
.hero__nav--prev{left:16px;}
.hero__nav--next{right:16px;}
.hero__dots{position:absolute; left:28px; bottom:22px; z-index:2; display:flex; gap:8px;}
.hero__dot{width:10px; height:10px; border-radius:999px; border:0; padding:0; cursor:pointer; background:rgba(255,255,255,.45); transition:width .3s var(--ease), background .3s var(--ease);}
.hero__dot.is-active{width:28px; background:#fff;}

.headlines{display:flex; flex-direction:column; overflow:hidden;}
.headline{display:flex; gap:14px; align-items:center; padding:12px 20px; border-top:1px solid var(--border); transition:background .15s var(--ease);}
.headline:hover{background:var(--surface-2);}
.headline:hover .headline__title{color:var(--accent);}
.headline__thumb{
  width:72px; height:54px; flex:none; border-radius:var(--radius-sm); overflow:hidden;
  background:linear-gradient(135deg, var(--navy), var(--navy-900));
}
.headline__thumb img{width:100%; height:100%; object-fit:cover;}
.headline__text{display:flex; flex-direction:column; gap:4px; min-width:0;}
.headline__title{font-weight:700; font-size:var(--fs-sm); line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; transition:color .15s var(--ease);}
.headline__meta{font-size:var(--fs-xs); color:var(--text-muted);}

.video-grid{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:20px;}
.video-tile{
  position:relative; aspect-ratio:16/9; border:0; padding:0; cursor:pointer; overflow:hidden;
  border-radius:var(--radius); text-align:left; color:#fff;
  background:linear-gradient(135deg, var(--navy), var(--navy-900)); box-shadow:var(--shadow);
}
.video-tile img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .4s var(--ease);}
.video-tile:hover img{transform:scale(1.05);}
.video-tile::after{content:""; position:absolute; inset:0; background:linear-gradient(180deg, transparent 45%, rgba(10,8,35,.85) 100%);}
.video-tile__play{
  position:absolute; inset:0; z-index:1; margin:auto; width:52px; height:52px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.92); color:var(--navy); box-shadow:0 6px 18px -6px rgba(0,0,0,.5);
  transition:transform .2s var(--ease);
}
.video-tile:hover .video-tile__play{transform:scale(1.08);}
.video-tile__play .icon{width:22px; height:22px; margin-left:3px;}
.video-tile__cap{position:absolute; left:14px; right:14px; bottom:12px; z-index:1; font-size:var(--fs-sm); font-weight:700; line-height:1.35;}
.video-tile__dur{position:absolute; right:10px; top:10px; z-index:1; background:rgba(0,0,0,.6); font-size:var(--fs-xs); font-weight:600; padding:2px 8px; border-radius:6px;}

/* One highlight: a large player with a navy info panel beside it */
.video-feature{
  display:grid; grid-template-columns:minmax(0, 2fr) minmax(260px, 1fr);
  border-radius:calc(var(--radius) + 4px); overflow:hidden; box-shadow:var(--shadow);
  background:linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); color:#fff;
}
.video-feature__player{position:relative; aspect-ratio:16/9; background:#000;}
.video-feature__player iframe{position:absolute; inset:0; width:100%; height:100%; border:0;}
.video-feature__poster{position:absolute; inset:0; padding:0; border:0; cursor:pointer; background:#000; overflow:hidden;}
.video-feature__poster img{width:100%; height:100%; object-fit:cover; transition:transform .6s var(--ease), filter .3s var(--ease);}
.video-feature__poster::after{content:""; position:absolute; inset:0; background:linear-gradient(90deg, transparent 60%, rgba(27,24,72,.55) 100%);}
.video-feature__poster:hover img{transform:scale(1.03); filter:brightness(.92);}
.video-feature__play{
  position:absolute; inset:0; z-index:1; margin:auto; width:84px; height:84px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.95); color:var(--navy); box-shadow:0 12px 32px -10px rgba(0,0,0,.6);
  transition:transform .25s var(--ease);
}
.video-feature__play::before{
  content:""; position:absolute; inset:-10px; border-radius:50%; border:2px solid rgba(255,255,255,.6);
  animation:video-pulse 2.2s var(--ease) infinite;
}
.video-feature__poster:hover .video-feature__play{transform:scale(1.08);}
.video-feature__play .icon{width:32px; height:32px; margin-left:5px;}
@keyframes video-pulse{0%{transform:scale(.9); opacity:.9;} 100%{transform:scale(1.35); opacity:0;}}
@media (prefers-reduced-motion: reduce){.video-feature__play::before{animation:none;}}

.video-feature__body{
  display:flex; flex-direction:column; justify-content:center; gap:18px;
  padding:clamp(24px, 3vw, 40px); border-left:3px solid var(--red);
}
.video-feature__eyebrow{
  display:inline-flex; align-items:center; gap:8px; font-size:var(--fs-xs); font-weight:700;
  letter-spacing:.12em; text-transform:uppercase; color:rgba(255,255,255,.75);
}
.video-feature__eyebrow .icon{width:18px; height:18px; color:#ff4e45;}
.video-feature__title{margin:0; font-size:clamp(1.05rem, .95rem + .5vw, 1.4rem); font-stretch:105%; line-height:1.25; color:#fff; overflow-wrap:break-word;}
.video-feature__actions{display:flex; flex-wrap:wrap; align-items:center; gap:12px 20px; margin-top:4px;}
.video-feature__actions .btn .icon{width:16px; height:16px;}
.video-feature.is-playing [data-video-play]{display:none;}
.video-feature__more{display:inline-flex; align-items:center; gap:6px; color:#fff; font-size:var(--fs-sm); font-weight:600; opacity:.85; text-decoration:none;}
.video-feature__more:hover{opacity:1; text-decoration:underline;}
.video-feature__more .icon{width:16px; height:16px;}
@media (max-width: 900px){
  .video-feature{grid-template-columns:1fr;}
  .video-feature__body{border-left:0; border-top:3px solid var(--red);}
  .video-feature__poster::after{display:none;}
  .video-feature__play{width:68px; height:68px;}
  .video-feature__play .icon{width:26px; height:26px;}
}

.modal{position:fixed; inset:0; z-index:1100; display:flex; align-items:center; justify-content:center; padding:16px;}
.modal[hidden]{display:none;}
.modal__backdrop{position:absolute; inset:0; background:rgba(5,4,20,.85); animation:fade-in .2s var(--ease);}
.modal__body{position:relative; width:min(960px, 100%);}
.modal__frame{aspect-ratio:16/9; border-radius:var(--radius); overflow:hidden; background:#000; box-shadow:var(--shadow-lg);}
.modal__frame iframe{width:100%; height:100%; border:0;}
.modal__close{position:absolute; top:-52px; right:0; background:#fff; color:var(--navy);}
.modal__close:hover{background:#ecebf4;}

/* ---------- 11. Tables ---------- */
.table-card{overflow:hidden;}
.table-scroll{overflow-x:auto; -webkit-overflow-scrolling:touch;}
.table-scroll--capped{max-height:480px; overflow-y:auto;}
.data-table{width:100%; border-collapse:separate; border-spacing:0; font-size:var(--fs-sm); font-variant-numeric:tabular-nums;}
.data-table th{
  position:sticky; top:0; z-index:2; background:var(--surface-2);
  padding:10px 6px; border-bottom:1px solid var(--border);
  font-size:var(--fs-xs); font-weight:700; letter-spacing:.4px; text-transform:uppercase; color:var(--text-muted);
  text-align:center; white-space:nowrap;
}
.data-table td{padding:10px 6px; border-bottom:1px solid var(--border); text-align:center; white-space:nowrap; background:var(--surface);}
.data-table tbody tr:nth-child(even) td{background:var(--surface-2);}
.data-table tbody tr:hover td{background:var(--surface-3);}
.data-table tbody tr:last-child td{border-bottom:0;}
.data-table .col-left{text-align:left;}
.data-table .col-pos{width:48px; padding-left:16px;}
.data-table .col-club{text-align:left; font-weight:600;}
.data-table .col-pts{font-weight:800; color:var(--heading); font-size:var(--fs-base); padding-right:16px;}
.data-table th.col-pts{color:var(--heading); font-size:var(--fs-xs);}
.data-table .col-form{padding-right:16px;}

/* keep position + club visible while the stats scroll sideways on phones */
.data-table .col-pos, .data-table .col-club{position:sticky; z-index:1;}
.data-table .col-pos{left:0;}
.data-table .col-club{left:48px; box-shadow:1px 0 0 var(--border);}
.data-table th.col-pos, .data-table th.col-club{z-index:3;}

.club-cell{display:inline-flex; align-items:center; gap:10px;}
.club-cell--muted{color:var(--text-muted); font-weight:500;}
.flag{width:20px; height:15px; object-fit:cover; border-radius:2px; box-shadow:0 0 0 1px rgba(0,0,0,.08);}

.pos-chip{
  display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:6px;
  font-weight:800; font-size:var(--fs-xs); color:var(--text); background:transparent;
}
.pos-chip--top{background:var(--win-bg); color:var(--win-fg);}
.pos-chip--drop{background:var(--loss-bg); color:var(--loss-fg);}

.form{display:inline-flex; gap:2px;}
.form__dot{
  width:18px; height:18px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  font-size:10px; font-weight:800;
}
.form__dot--w{background:var(--win-bg); color:var(--win-fg);}
.form__dot--d{background:var(--draw-bg); color:var(--draw-fg);}
.form__dot--l{background:var(--loss-bg); color:var(--loss-fg);}

.table-legend{display:flex; flex-wrap:wrap; gap:8px 20px; padding:12px 20px; border-top:1px solid var(--border); font-size:var(--fs-xs); color:var(--text-muted);}
.table-legend span{display:inline-flex; align-items:center; gap:8px;}
.legend-swatch{width:12px; height:12px; border-radius:3px;}
.legend-swatch--top{background:var(--win-bg); box-shadow:inset 0 0 0 1px var(--win-fg);}
.legend-swatch--drop{background:var(--loss-bg); box-shadow:inset 0 0 0 1px var(--loss-fg);}

/* ---------- 12. News ---------- */
.news-grid{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:24px;}
.news-card{display:flex; flex-direction:column; overflow:hidden; transition:transform .2s var(--ease), box-shadow .2s var(--ease);}
.news-card:hover{transform:translateY(-3px); box-shadow:var(--shadow-lg);}
.news-card__media{position:relative; display:block; aspect-ratio:16/10; overflow:hidden; background:linear-gradient(135deg, var(--navy), var(--navy-900));}
.news-card__media img{width:100%; height:100%; object-fit:cover;}
.news-card__media .pill{position:absolute; top:14px; left:14px;}
.news-card__body{display:flex; flex-direction:column; gap:10px; flex:1; padding:18px 20px 20px;}
.news-card__title{font-size:var(--fs-lg); font-weight:800; line-height:1.35;}
.news-card__title a:hover{color:var(--accent);}
.news-card__body p{margin:0; color:var(--text-muted); font-size:var(--fs-sm); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;}
.news-card__meta{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; padding-top:14px; border-top:1px solid var(--border); font-size:var(--fs-xs); color:var(--text-muted);}

.pagination{display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:6px; margin-top:36px;}
.pagination__num, .pagination__step{
  min-width:40px; height:40px; padding:0 12px; border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center; gap:4px;
  border:1px solid var(--border); background:var(--surface); font-weight:700; font-size:var(--fs-sm);
}
.pagination a:hover{border-color:var(--accent); color:var(--accent);}
.pagination__num.is-current{background:var(--accent-soft); border-color:var(--accent); color:var(--accent);}
.pagination__gap{padding:0 4px; color:var(--text-muted);}

.page-head--article .pill{margin-bottom:14px;}
.article-title{font-size:clamp(1.75rem, 4vw, 2.5rem); font-weight:800; line-height:1.2; color:var(--heading); text-wrap:balance;}
.article-meta{display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:14px; font-size:var(--fs-sm); color:var(--text-muted);}
.article{overflow:hidden;}
.article__media img{width:100%; max-height:460px; object-fit:cover;}
.article .prose{padding:clamp(20px, 4vw, 40px);}
.article__foot{padding:0 clamp(20px, 4vw, 40px) clamp(20px, 4vw, 32px);}
.prose{font-size:var(--fs-lg); line-height:1.75;}
.prose p{margin:0 0 1.1em;}
.prose p:last-child{margin-bottom:0;}
.prose__lead{font-size:var(--fs-xl); font-weight:600; line-height:1.55; color:var(--heading);}
/* Imported article bodies can contain photos, embedded videos and lists */
.prose img{max-width:100%; height:auto; border-radius:var(--radius-sm); margin:0 auto 1.1em;}
.prose iframe{display:block; width:100%; aspect-ratio:16/9; height:auto; border:0; border-radius:var(--radius-sm); margin:0 0 1.1em;}
.prose ul, .prose ol{margin:0 0 1.1em; padding-left:1.4em;}
.prose a{color:var(--accent); text-decoration:underline; text-underline-offset:2px;}

/* ---------- 13. Pages ---------- */
/* Regulations */
.accordion{overflow:hidden;}
.accordion__item + .accordion__item{border-top:1px solid var(--border);}
.accordion__head{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px; cursor:pointer; list-style:none; transition:background .15s var(--ease);}
.accordion__head::-webkit-details-marker{display:none;}
.accordion__head:hover{background:var(--surface-2);}
.accordion__title{display:flex; align-items:center; gap:14px; font-weight:800; font-size:var(--fs-lg); color:var(--heading);}
.accordion__caret{color:var(--text-muted); transition:transform .2s var(--ease);}
.accordion__item[open] .accordion__caret{transform:rotate(180deg);}
.doc-list{list-style:none; margin:0; padding:0 20px 8px;}
.doc{display:flex; align-items:center; gap:16px; padding:14px 0; border-top:1px solid var(--border);}
.doc__icon{width:44px; height:44px; flex:none; border-radius:10px; display:flex; align-items:center; justify-content:center; background:var(--loss-bg); color:var(--loss-fg); font-size:.75rem;}
.doc__text{flex:1; min-width:0; display:flex; flex-direction:column;}
.doc__title{font-weight:700;}
.doc__meta{font-size:var(--fs-xs); color:var(--text-muted); font-weight:600;}

/* About */
.link-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:24px;}
.link-card{display:flex; flex-direction:column; gap:8px; padding:24px; transition:transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);}
.link-card:hover{transform:translateY(-3px); box-shadow:var(--shadow-lg); border-color:var(--accent);}
.link-card__title{font-size:1.2rem; color:var(--heading);}
.link-card p{margin:0 0 8px; color:var(--text-muted);}
.link-card .link-more{margin-top:auto;}
.prose-card{padding:clamp(24px, 5vw, 48px);}

.group-label{font-size:var(--fs-xs); font-weight:800; letter-spacing:.8px; text-transform:uppercase; color:var(--text-muted); margin-bottom:14px;}
.people-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:20px;}
.people-grid--2{grid-template-columns:repeat(2, minmax(0, 340px));}
.people-grid--org{grid-template-columns:repeat(auto-fill, minmax(190px, 1fr));}
.person-card{display:flex; flex-direction:column; align-items:center; text-align:center; padding:24px 16px;}
.person-card--featured{border-top:2px solid var(--red);}
.avatar{
  position:relative; width:84px; height:84px; border-radius:50%; overflow:hidden; margin-bottom:14px;
  display:flex; align-items:flex-end; justify-content:center;
  background:var(--surface-3); color:var(--text-muted); border:3px solid var(--surface); box-shadow:0 0 0 1px var(--border);
}
.avatar .icon{width:70%; height:70%; margin-bottom:-6%;}
.avatar img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover;}
.avatar--lg{width:108px; height:108px;}
.person-card__name{font-size:var(--fs-base); font-weight:800; color:var(--heading);}
.person-card--featured .person-card__name{font-size:var(--fs-lg);}
.person-card__role{margin:4px 0 0; font-size:var(--fs-sm); color:var(--text-muted);}

.org{display:flex; flex-direction:column; align-items:center;}
.org__head{width:min(100%, 320px);}
.org__line{width:2px; height:36px; background:var(--border);}
.org__team{width:100%; padding:24px; border:2px dashed var(--border); border-radius:calc(var(--radius) + 6px);}
.org__team .group-label{text-align:center;}

/* Contact */
.contact-card{padding:clamp(24px, 4vw, 36px);}
.contact-card .card-title{font-size:var(--fs-xl); margin-bottom:20px;}
.contact-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column;}
.contact-list li{display:flex; gap:16px; padding:18px 0; border-top:1px solid var(--border);}
.contact-list h3{font-size:var(--fs-sm); font-weight:800; margin-bottom:4px;}
.contact-list address{color:var(--text-muted); line-height:1.7;}
.contact-list a{color:var(--accent); font-weight:700;}
.contact-list__icon{width:44px; height:44px; flex:none; border-radius:12px; display:flex; align-items:center; justify-content:center; background:var(--accent-soft); color:var(--accent);}
.contact-card__social{padding-top:20px; border-top:1px solid var(--border);}
.contact-card__social h3{font-size:var(--fs-sm); font-weight:800; margin-bottom:12px;}
.contact-card .socials a{color:var(--accent); border-color:var(--border);}
.contact-card .socials a:hover{background:var(--accent); color:var(--on-accent); border-color:var(--accent);}

/* ---------- 14. Responsive ---------- */
@media (max-width: 1120px){
  .nav-primary, .nav-login{display:none;}
  .nav-burger{display:inline-flex;}
  .nav-brand{display:inline-flex;}
  .video-grid{grid-template-columns:repeat(2, minmax(0, 1fr));}
  .footer-grid{grid-template-columns:1fr 1fr;}
}

@media (max-width: 900px){
  .grid-2, .news-layout, .link-grid{grid-template-columns:1fr;}
  .news-grid{grid-template-columns:repeat(2, minmax(0, 1fr));}
  .hero{min-height:340px;}
  .hero__nav{opacity:1;}
}

@media (max-width: 640px){
  :root{--header-h:0px;}
  .site-header{display:none;}
  .menu-fab{display:inline-flex;}
  .news-grid, .people-grid--2{grid-template-columns:1fr;}
  .hero{min-height:300px;}
  .hero__caption{padding:20px 20px 44px;}
  .hero__dots{left:20px; bottom:18px;}
  .hero__nav{display:none;}
  .section-head{align-items:flex-start; flex-direction:column; gap:10px;}
  .match-score{font-size:2rem;}
  .crest--lg{width:52px; height:52px;}
  .countdown__unit span{font-size:1.25rem;}
  .match-row{padding:12px 14px; gap:4px 8px;}
  .match-row__mid{min-width:56px; padding:4px 6px;}
  .match-row .crest{display:none;}
  .hide-sm{display:none;}
  .video-grid{gap:12px;}
  .footer-grid{grid-template-columns:1fr 1fr; gap:28px 20px;}
  .footer-brand, .footer-col:last-child{grid-column:1 / -1;}
  .league-hero{gap:14px;}
  .league-hero__logo{width:64px; height:64px;}
  .doc{flex-wrap:wrap;}
  .doc__text{flex:1 1 calc(100% - 60px);}
  .doc .btn{margin-left:60px;}
  .modal__close{top:-48px;}
}

@media (max-width: 420px){
  .video-grid{grid-template-columns:1fr;}
}
