/* Homepage-only styles: shared schedule-page presentation stays unchanged. */
.homepage main { width: min(100% - 32px, 1120px); padding: 12px 0 20px; }
.homepage .hero { margin: 0; }
.homepage .hero h1 { font-size: clamp(24px, 6.1vw, 34px); line-height: 1.12; letter-spacing: -.035em; margin: 0; }
.homepage .intro-copy { color: var(--muted); font-size: 13px; line-height: 1.4; margin: 6px 0 0; }
.homepage .featured, .homepage .sport-discovery { margin-top: 18px; }
.homepage .featured { margin-top: 14px; }
.homepage .section-heading { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.homepage h2 { font-size: 19px; letter-spacing: -.025em; margin: 0; }
.homepage .section-note, .homepage .local-time { font-size: 12px; color: var(--muted); line-height: 1.4; }
.homepage .local-time { display: block; margin: 0 0 8px; overflow-wrap: anywhere; }
.homepage #featured-slides { display: grid; touch-action: pan-y pinch-zoom; }
.homepage .featured { position: relative; max-width: 720px; }
.homepage .featured-card { border: 1px solid #28557a; border-radius: 14px; background: radial-gradient(ellipse at 100% 0, #12518c55, transparent 65%), #06111b; }
.homepage .featured-card:has(.featured-slide.f1:not([hidden])) { border-color: #724048; background: radial-gradient(ellipse at 100% 0, #91252b44, transparent 65%), #06111b; }
.homepage .featured-slide { --accent: var(--blue); min-width: 0; padding: 10px 12px; }
.homepage .featured-slide.f1 { --accent: #ff6868; }
/* Separate pre-rendered events when JavaScript is disabled and several remain visible. */
.homepage .featured-slide:not([hidden]) ~ .featured-slide:not([hidden]) { border-top: 1px solid #293f52; }
.homepage #featured-empty { padding: 0 12px; }
.homepage .featured-slide:not([hidden]) { animation: featured-appear .2s ease-out; }
@keyframes featured-appear { from { opacity: .65; } to { opacity: 1; } }
.homepage .featured-sport { color: var(--accent); font-size: 12px; line-height: 16px; font-weight: 800; margin: 0; display: flex; justify-content: space-between; gap: 8px; }
.homepage .featured-sport span { font-size: 10px; letter-spacing: .1em; color: var(--muted); flex-shrink: 0; }
.homepage .featured-name { font-size: clamp(18px, 4.8vw, 23px); line-height: 1.15; margin: 0; }
.homepage .featured-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 4px 0; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.homepage .featured-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.homepage .featured-link span { flex-shrink: 0; color: var(--accent); }
.homepage .featured-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 3px 12px; margin-top: 2px; }
.homepage .featured-date { font-size: 12px; color: var(--muted); line-height: 20px; }
.homepage .featured-countdown { font-size: 16px; line-height: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.homepage .carousel-controls { display: grid; grid-template-columns: 1fr 44px 44px 44px 1fr; align-items: center; gap: 4px; padding: 0 8px; border-top: 1px solid #293f52; min-height: 44px; }
.homepage #carousel-prev { grid-column: 2; }
.homepage #carousel-position { grid-column: 3; }
.homepage #carousel-next { grid-column: 4; }
.homepage #carousel-toggle { grid-column: 5; justify-self: end; }
.homepage button { font: inherit; color: var(--text); cursor: pointer; }
.homepage .carousel-controls button { width: 44px; min-width: 44px; min-height: 44px; border: 0; border-radius: 9px; background: transparent; padding: 8px; font-size: 18px; }
.homepage .carousel-controls button:hover { background: #0b1b2b; }
.homepage .rotation-toggle { font-size: 16px; }
.homepage #carousel-position { font-size: 12px; min-width: 44px; line-height: 16px; color: var(--muted); text-align: center; }
.homepage button:disabled { opacity: .6; cursor: default; }
.homepage .category-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.homepage .category-filters button { min-height: 44px; border: 1px solid #293f52; border-radius: 10px; background: #071521; padding: 8px 12px; font-size: 12px; }
.homepage .category-filters button[aria-pressed="true"] { background: #102f4b; border-color: var(--blue); color: #fff; }
.homepage .discovery-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.homepage .discovery-card { --accent: var(--blue); position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 100%; max-width: 300px; min-width: 0; min-height: 100px; padding: 12px; color: inherit; text-decoration: none; border: 1px solid #293f52; border-radius: 12px; background: #071521; transition: border-color .15s ease, background-color .15s ease; }
.homepage a.discovery-card:hover { border-color: var(--accent); background: #0c2033; }
.homepage .discovery-f1 { --accent: #ff6868; }
.homepage .discovery-mark { font: italic 800 24px/1 'Barlow Condensed', sans-serif; color: var(--accent); }
.homepage .discovery-card h3 { margin: 7px 0; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.homepage .tile-status { margin-top: auto; font-size: 11px; line-height: 1.4; color: var(--muted); }
.homepage .tile-competition { font-size: 12px; line-height: 1.4; color: var(--muted); }
.homepage .tile-next { margin-top: 6px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.homepage .tile-arrow { position: absolute; top: 12px; right: 12px; color: var(--muted); font-size: 16px; line-height: 24px; }
.homepage a.discovery-card .discovery-mark { padding-right: 20px; }
.homepage .coming-soon { border-style: dashed; }
.homepage .coming-soon .discovery-mark { color: var(--muted); }
.homepage .how-it-works { border-top: 1px solid #293f52; margin-top: 22px; padding-top: 16px; }
.homepage .how-it-works h2 { font-size: 16px; }
.homepage .how-it-works p { max-width: 760px; color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 0; }
/* A future active anchor-ad integration can set this to the actual occupied height. */
.homepage .home-footer { width: min(100% - 32px, 1120px); margin: auto; padding: 14px 0 calc(20px + env(safe-area-inset-bottom, 0px) + var(--active-anchor-ad-height, 0px)); border-top: 1px solid #293f52; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.homepage .home-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 13px; text-underline-offset: 4px; }
.homepage .home-footer div { display: flex; gap: 24px; }
.homepage :is(a, button):focus-visible { outline: 3px solid #8dceff; outline-offset: 3px; }
.homepage [hidden] { display: none !important; }
.homepage .menu-button { min-width: 44px; min-height: 44px; }
.homepage .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 299px) { .homepage .discovery-grid { grid-template-columns: 1fr; } }
@media (min-width: 600px) { .homepage .discovery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 760px) {
  .homepage main { padding-top: 24px; }
  .homepage .hero h1 { font-size: clamp(25px, 6.5vw, 36px); }
  .homepage .featured { margin-top: 18px; }
  .homepage .featured-slide { padding: 12px 16px; }
  .homepage .featured-bottom { justify-content: flex-start; gap: 24px; }
  /* Cap sparse catalogues at 300px per tile; larger catalogues fill the content width. */
  .homepage .discovery-grid { max-width: calc(var(--sport-count) * 300px + (var(--sport-count) - 1) * 10px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
  .homepage .intro-copy { font-size: 14px; }
  /* Keep the menu scalable rather than attempting to fit every sport in the header. */
  .homepage .menu-button { display: grid; }
  .homepage #site-nav { display: none; position: absolute; top: 52px; right: max(16px, calc((100vw - 1120px)/2)); margin: 0; min-width: 190px; padding: 9px; flex-direction: column; background: #0b1723; border: 1px solid #293a48; border-radius: 14px; box-shadow: 0 15px 40px #0007; }
  .homepage #site-nav.is-open { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .homepage .featured-slide:not([hidden]) { animation: none; }
  .homepage .discovery-card { transition: none; }
  html:has(.homepage) { scroll-behavior: auto; }
}
