/* ============================================================
   cup.css — The Xavier Cup tab.

   This is the one screen where the World Cup theme is loud in
   both skins: the banner is a floodlit pitch whichever design the
   visitor has chosen, because a season tab that looked like the
   rest of the site would not read as a season.

   Everything below the banner is ordinary site furniture — panels,
   chips, cards — so the tab stays part of Campus Compass.
   ============================================================ */

.screen--cup {
  position: relative;
  isolation: isolate;
  padding-top: 0;
  padding-bottom: var(--space-8);
}

/* ============================================================
   BANNER
   ============================================================ */
/* Compact: the banner sits above every view now, so it leaves the
   first screen to the matches. */
.cup-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--space-6) var(--space-5);
  background: linear-gradient(180deg, var(--cup-navy) 0%, var(--cup-green-dk) 100%);
  color: #fff;
}

.cup-hero__scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* Mow stripes across the lower half */
.cup-hero__stripes {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 62%;
  background:
    linear-gradient(180deg, transparent 0%, var(--cup-pitch-2) 22%, var(--cup-pitch-3) 100%),
    repeating-linear-gradient(90deg,
      var(--cup-pitch-1) 0 64px,
      var(--cup-pitch-2) 64px 128px);
  background-blend-mode: multiply, normal;
  opacity: 0.95;
}
.cup-hero__lines {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 62%;
  opacity: 0.55;
}

.cup-hero__wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.cup-hero__text { max-width: 640px; }

.cup-hero__kicker {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--cup-gold) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--cup-gold) 55%, transparent);
  color: var(--cup-gold-lt);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.cup-hero__title {
  margin-top: var(--space-3);
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 900;
  letter-spacing: -1.4px;
  line-height: 1.02;
  color: #fff;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.cup-hero__tagline {
  margin-top: var(--space-2);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 700;
  color: var(--cup-gold-lt);
}
.cup-hero__lede {
  margin-top: var(--space-3);
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  max-width: 560px;
}

.cup-hero__trophy {
  width: 150px;
  flex: 0 0 auto;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.42));
  animation: trophyFloat 7s ease-in-out infinite;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.cup-section { padding-block: var(--space-7) 0; }
.cup-section:last-child { padding-bottom: var(--space-6); }

.cup-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.cup-section__title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
}
.cup-section__hint {
  margin-top: var(--space-2);
  max-width: 620px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Search results ---------- */
.cup-results {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.cup-results[hidden] { display: none; }
.cup-results__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.cup-results__title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- Map + panel ---------- */
.cup-map-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  align-items: start;
  gap: var(--space-5);
}
.cup-map-panel {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.cup-map-panel__legend { margin-top: var(--space-4); }

/* ============================================================
   MATCHES — calm by default: a title, the win counter, the team
   picker, ONE Filter button (everything else lives in the panel it
   opens), then three rows you swipe: Live now · Upcoming ·
   Finished recently. Markup: index.html; screens/cup.js paints it.
   ============================================================ */
.screen--cup .cup-matches__head {
  flex-direction: row;
  align-items: center;
  margin-bottom: var(--space-4);
}

/* ---------- Win counter: the trophy, then the teams with the most wins ---------- */
.cup-wins {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 14px 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.cup-wins__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--tx-tile);
}
.cup-wins__icon img { width: 34px; height: 34px; object-fit: contain; }
.cup-wins__text { flex: 1 1 auto; min-width: 0; }
.cup-wins__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.cup-wins__list {
  display: flex;
  gap: var(--space-4);
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.cup-wins__list::-webkit-scrollbar { display: none; }
.cup-wins__team {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.cup-wins__team img { width: 26px; height: 26px; object-fit: contain; }
.cup-wins__team b {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cup-wins__none { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.cup-wins__note { margin-top: 6px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }

/* ---------- Follow your teams ---------- */
.cup-follow { padding-top: var(--space-5); }
.cup-follow__head { margin-bottom: var(--space-3); }
.cup-follow .cup-section__hint { margin-top: 4px; }
.cup-section__title--sm { font-size: 19px; letter-spacing: -0.3px; }

/* ---------- The Filter button and List / Calendar ----------
   Always one line: Filter on the left, List / Calendar on the right,
   and the summary of what is filtered shrinks (with "…") between them. */
.cup-filterbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.cup-filterbtn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  transition: border-color 160ms, background 160ms;
}
.cup-filterbtn:hover { border-color: var(--border-strong); }
.cup-filterbtn[aria-expanded="true"] { border-color: var(--border-strong); background: var(--surface-2); }
.cup-filterbtn__icon { width: 15px; height: 15px; }
.cup-filterbtn__chev { width: 13px; height: 13px; color: var(--muted); transition: transform 180ms; }
.cup-filterbtn[aria-expanded="true"] .cup-filterbtn__chev { transform: rotate(180deg); }
.cup-filterbtn__count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--tx-accent);
  color: var(--tx-on-accent);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.cup-filterbtn__count[hidden] { display: none; }
.cup-filterbar__summary {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cup-filterbar__summary[hidden] { display: none; }

.seg.cup-viewswitch { display: inline-flex; width: auto; flex: 0 0 auto; margin-left: auto; }
.seg.cup-viewswitch[hidden] { display: none; }
.cup-viewswitch .seg__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 13px;
  font-size: 13px;
}
.cup-viewswitch .seg__icon { width: 14px; height: 14px; flex: 0 0 auto; }

/* ---------- The panel the Filter button opens ---------- */
.cup-filterpanel {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-4);
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.cup-filterpanel[hidden] { display: none; }
.cup-filterpanel__row { display: grid; gap: 6px; min-width: 0; }
.cup-filterpanel__row[hidden] { display: none; }
.cup-filterpanel__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.cup-filterpanel__row--selects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.cup-filterpanel [data-cup-clear-filters][hidden] { display: none; }

/* Days: one row of small pills that scrolls sideways. */
.cup-daychips,
.cup-status {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.cup-daychips::-webkit-scrollbar,
.cup-status::-webkit-scrollbar { display: none; }
.cup-daychip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 160ms, border-color 160ms, color 160ms;
}
.cup-daychip:hover { border-color: var(--border-strong); color: var(--ink); }
.cup-daychip.is-today { font-weight: 800; }
.cup-daychip[aria-pressed="true"] {
  background: var(--tx-primary);
  border-color: var(--tx-primary);
  color: var(--tx-on-primary-hi);
}

/* All · Live · Upcoming · Results */
.cup-status .chip {
  flex: 0 0 auto;
  gap: 6px;
  min-height: 34px;
  padding: 5px 12px;
  font-size: 12.5px;
}
.cup-status .chip:hover,
.cup-status .chip[aria-pressed="true"] { transform: none; }
.cup-status .chip[aria-pressed="true"] .chip__dot { display: block; background: currentColor; }

.cup-select { display: block; flex: 1 1 170px; min-width: 0; }
/* "All venues" / "All sports" say what each dropdown is; the label is for screen readers. */
.cup-select__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.cup-select__field { position: relative; display: block; }
.cup-select select {
  width: 100%;
  min-height: 36px;
  padding: 6px 34px 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 160ms;
}
.cup-select select:hover { border-color: var(--border-strong); }
.cup-select svg {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* ---------- Three rows you swipe (or step with the arrows) ---------- */
.cup-matches__calendar[hidden],
.cup-matches__list[hidden] { display: none; }
.cup-matches__list,
.cup-matches__calendar { margin-top: var(--space-5); }
.cup-rails { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.cup-rail {
  min-width: 0;
  padding: var(--space-4);
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.cup-rail__head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 2px; }
.cup-rail__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}
.cup-rail__live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tx-live);
  animation: livePulse 1.8s ease-in-out infinite;
}
.cup-rail__count {
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.cup-rail__body { position: relative; }
.cup-rail__track {
  display: flex;
  gap: 12px;
  margin: 0 -4px;
  padding: 12px 4px 6px;          /* room for the "Your team" badge and the rings */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  scrollbar-width: none;
}
.cup-rail__track::-webkit-scrollbar { display: none; }
/* No fade-in in a row: a card arrives from the side, not from below. */
.cup-rail__track > .match {
  flex: 0 0 min(330px, 86%);
  scroll-snap-align: start;
  opacity: 1;
  transform: none;
  transition: box-shadow 180ms, border-color 180ms;
}
.cup-rail__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  transform: translateY(-50%);
  transition: opacity 160ms;
}
.cup-rail__arrow svg { width: 16px; height: 16px; }
.cup-rail__arrow--prev { left: -12px; }
.cup-rail__arrow--next { right: -12px; }
.cup-rail__arrow[disabled] { opacity: 0; pointer-events: none; }
.cup-rail__empty { padding: var(--space-2) 0 2px; font-size: 14px; color: var(--muted); }

/* The calendar's day list keeps the featured match full width. */
.match-grid > .match--featured { grid-column: 1 / -1; }

.cup-matches__more {
  margin-top: var(--space-6);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.cup-matches__more a { font-weight: 700; color: var(--ink); }
.cup-matches__more a:hover { text-decoration: underline; }

/* ============================================================
   BANNER PHOTOS — a slideshow in the banner (screens/cup.js →
   mountHeroPhotos, data/xavier-cup.js → CUP_PHOTOS). The banner
   becomes a rounded photo frame in every design; the title sits
   bottom-left over a dark fade, and bars along the bottom pick a
   photo. The progress bars are the news hero's.
   ============================================================ */
.cup-photos[hidden] { display: none; }
.cup-hero.has-photos .cup-hero__wrap { display: block; }
.screen--cup .cup-hero.has-photos .cup-hero__tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0;
  min-height: clamp(300px, 36vw, 440px);
  /* Room at the top for the caption, at the bottom for the bars. */
  padding: 60px clamp(20px, 3vw, 36px) 64px;
  border-radius: var(--radius-xl);
  background: var(--tx-tile);
  color: #FFFFFF;
}
.cup-hero.has-photos .cup-hero__trophy { display: none; }
.cup-hero.has-photos .cup-hero__text { position: relative; z-index: 1; }

.cup-photos {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template: 1fr / 1fr;
}
/* The fade the title is read against, over a light tint of the whole
   photo so a bright picture never swallows the lime kicker. */
.cup-photos::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(4, 12, 28, 0.9) 0%, rgba(4, 12, 28, 0.5) 45%, transparent 75%),
    linear-gradient(90deg, rgba(4, 12, 28, 0.6) 0%, transparent 65%),
    rgba(4, 12, 28, 0.3);
  pointer-events: none;
}
.cup-photo {
  grid-area: 1 / 1;
  position: relative;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms ease, visibility 0s linear 700ms;
}
.cup-photo.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 700ms ease, visibility 0s;
}
.cup-photo__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cup-photo.is-active .cup-photo__img { animation: heroDrift var(--hero-ms) ease-out both; }
.cup-photo .news-ph__mark { font-size: 15px; }
.cup-photo .news-ph__mark svg { width: 26px; height: 26px; }
.cup-photo__caption {
  position: absolute;
  z-index: 1;
  top: clamp(16px, 2.4vw, 24px);
  left: clamp(20px, 3vw, 36px);
  max-width: calc(100% - 160px);
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(4, 12, 28, 0.6);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cup-photos .news-hero__bars {
  left: clamp(20px, 3vw, 36px);
  right: clamp(20px, 3vw, 36px);
  bottom: 16px;
}
/* wireHero() pauses the tile on hover and focus, and stills it for
   anyone who asks for less motion. */
.cup-hero__tile.is-paused .news-hero__bar.is-active .news-hero__fill,
.cup-hero__tile.is-paused .cup-photo.is-active .cup-photo__img { animation-play-state: paused; }
.cup-hero__tile.is-static .news-hero__bar.is-active .news-hero__fill { animation: none; width: 100%; }
.cup-hero__tile.is-static .cup-photo__img { animation: none; }

/* ============================================================
   FULL SCREEN — the photo banner fills the screen edge to edge,
   like Discover's full-screen hero (.dhero--full in
   discover-grid.css), on every screen size. The words stay lined
   up with the page below (inside .wrap); the photos fill the whole
   banner section, which is as wide as the page. A small bouncing
   arrow at the foot says there is more below.
   ============================================================ */
.cup-hero.has-photos {
  /* Where the page's content starts, from the banner's edge (100% is
     the banner's width wherever this is used): the photo caption and
     the bars line up with the words. */
  --cup-gutter: max(var(--space-5), calc((100% - var(--content-max)) / 2 + var(--space-5)));
}
:root[data-skin] .cup-hero.has-photos {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  background: var(--tx-tile);
}
.cup-hero.has-photos .cup-hero__scene { display: none; }
/* The wrap and the tile only hold the words now. Neither may be a
   positioned box, or the photos (absolutely placed) would size
   themselves to it (at most --content-max wide) instead of to the
   whole banner section. */
:root[data-skin] .cup-hero.has-photos .cup-hero__wrap { position: static; z-index: auto; }
:root[data-skin] .cup-hero.has-photos .cup-hero__tile {
  position: static;
  isolation: auto;
  overflow: visible;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  padding: 72px 0 clamp(104px, 15vh, 150px);
  border-radius: 0;
  background: none;
}
.cup-hero.has-photos .cup-photo__caption { top: 24px; left: var(--cup-gutter); }
.cup-hero.has-photos .cup-photo .news-ph--hero { padding: 24px var(--cup-gutter); }
.cup-hero.has-photos .cup-photos .news-hero__bars {
  left: var(--cup-gutter);
  right: var(--cup-gutter);
  bottom: 60px;
}

/* Discover's type: a big title, a roomier line under it. */
.cup-hero.has-photos .cup-hero__text { max-width: 980px; }   /* the title on one line on a wide screen */
.cup-hero.has-photos .cup-hero__kicker { font-size: 12px; letter-spacing: 0.18em; }
.cup-hero.has-photos .cup-hero__title {
  font-size: clamp(40px, min(7.4vw, 12.5vh), 100px);
  line-height: 0.96;
}
.cup-hero.has-photos .cup-hero__tagline { margin-top: var(--space-3); font-size: clamp(17px, 2vw, 24px); }
.cup-hero.has-photos .cup-hero__lede {
  display: block;
  max-width: 52ch;
  font-size: clamp(16px, 1.6vw, 20px);
  color: rgba(255, 255, 255, 0.86);
}

/* The arrow: there is more below. */
.cup-hero.has-photos .cup-hero__tile::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 22px;
  width: 14px;
  height: 14px;
  border-right: 3px solid var(--tx-accent);
  border-bottom: 3px solid var(--tx-accent);
  transform: translateX(-50%) rotate(45deg);
  animation: dheroBob 1.8s ease-in-out infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .cup-hero.has-photos .cup-hero__tile::after { animation: none; } }
:root[data-motion="reduced"] .cup-hero.has-photos .cup-hero__tile::after { animation: none; }

@media (max-width: 820px) {
  :root[data-skin] .cup-hero.has-photos .cup-hero__tile {
    min-height: calc(100vh - var(--nav-h-mob));
    min-height: calc(100svh - var(--nav-h-mob));
  }
}
@media (max-width: 768px) {
  .cup-hero.has-photos { --cup-gutter: 16px; }   /* the .wrap padding on phones (mobile.css) */
}
@media (max-width: 560px) {
  :root[data-skin] .cup-hero.has-photos .cup-hero__tile { padding: 64px 0 112px; }
  .cup-hero.has-photos .cup-hero__title { font-size: clamp(38px, 11.5vw, 60px); }
  .cup-hero.has-photos .cup-hero__kicker { font-size: 11px; letter-spacing: 0.14em; }
  .cup-hero.has-photos .cup-photo__caption { top: 16px; }
  .cup-hero.has-photos .cup-photo .news-ph--hero { padding: 14px var(--cup-gutter); }
}

/* ============================================================
   NEWS & UPDATES
   ============================================================ */
.cup-news { padding: var(--space-6); }
.news-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}
.news-title {
  margin-top: var(--space-1);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}
.news-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }

.news-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.news-post {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.news-post__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}
.news-post__tag {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--ocean-soft);
  color: var(--ocean-deep);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.news-post__date { font-size: 11.5px; color: var(--muted); }
.news-post__title {
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.news-post__body {
  margin-top: var(--space-2);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.news-post__link {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: 12.5px;
  font-weight: 700;
  color: #1877F2;
}
.news-empty { margin-top: var(--space-4); color: var(--muted); font-style: italic; }

.news-embed { margin-top: var(--space-5); }
.news-embed iframe { width: 100%; border-radius: var(--radius); }
.news-embed__note { margin-top: var(--space-2); font-size: 12px; color: var(--muted); font-style: italic; }

/* ============================================================
   ADDED WITH THE TXC MERGE
   ============================================================ */

/* The banner's inner tile is invisible to layout in the older two
   designs (its children join .cup-hero__wrap's flex row as before);
   skins.css turns it into the navy tile for Xavier Cup 2026. */
.cup-hero__tile { display: contents; }

/* ---------- Sticky tab bar (Matches · Map · News) ----------
   Comes after the shared header and sticks under the site nav. The
   pill behind the selected tab is one element that slides
   (screens/cup.js → movePill), as in the TXC proposal. On a phone
   the row scrolls sideways if it must. */
.cup-tabs {
  position: sticky;
  top: var(--nav-h);
  z-index: 30;
  margin-top: var(--space-5);
  padding-block: var(--space-3);
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.cup-tabs__wrap { display: flex; justify-content: center; }
.cup-tabs__nav {
  position: relative;
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.cup-tabs__nav::-webkit-scrollbar { display: none; }
.cup-tabs__pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--tx-primary);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--tx-accent) 25%, transparent),
    0 0 16px 2px color-mix(in srgb, var(--tx-accent) 45%, transparent);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1), width 280ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.cup-tabs__tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 160ms;
}
.cup-tabs__tab:hover { color: var(--ink); }
.cup-tabs__tab[aria-selected="true"] { color: var(--tx-on-primary-hi); }
.cup-tabs__tab[hidden] { display: none; }
.cup-tabs__live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--tx-live);
  animation: livePulse 1.8s ease-in-out infinite;
}
.cup-tabs__live[hidden] { display: none; }
.cup-tabs__tab[aria-selected="true"] .cup-tabs__live { background: currentColor; }

.cup-view[hidden] { display: none; }

@media (max-width: 820px) {
  .cup-tabs { top: var(--nav-h-mob); padding-block: var(--space-2); }
}
@media (max-width: 480px) {
  .cup-tabs__nav { display: flex; width: 100%; }
  .cup-tabs__tab { flex: 1 0 auto; justify-content: center; padding: 9px 12px; font-size: 13px; }
  .cup-tabs__long { display: none; }
}

/* Shown only while CUP_CONFIG.previewNow pins the clock */
.cup-hero__preview {
  display: inline-block;
  margin-top: var(--space-4);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px dashed rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.cup-hero__preview[hidden] { display: none; }

/* Sections land below the sticky nav + tab bar when scrolled to */
.cup-section { scroll-margin-top: calc(var(--nav-h) + 76px); }

/* ============================================================
   NEWS & UPDATES
   The newest post as one wide tile, then the rest in a looping
   carousel ("See all" swaps it for a grid). screens/cup.js →
   renderNews.
   ============================================================ */
.cup-news { padding: 0; }
.cup-news .news-head { padding-bottom: var(--space-5); }
.cup-news .news-title { font-size: clamp(24px, 3vw, 32px); }

/* ============================================================
   HERO — the newest posts, one at a time, FIFA-style.
   Desktop: the picture fills the tile, the story sits bottom-left
   on a dark fade. Phones: picture on top, a solid dark panel below.
   Progress bars along the bottom advance the slides.
   ============================================================ */
.news-hero {
  --hero-ms: 7000ms;
  position: relative;
  margin-top: var(--space-5);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--tx-navy-deep, var(--tx-tile));
  color: #FFFFFF;
  isolation: isolate;
}
.news-hero__viewport { display: grid; }
.news-hero__slide {
  grid-area: 1 / 1;
  position: relative;
  display: grid;
  min-height: clamp(380px, 46vw, 540px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease, visibility 0s linear 600ms;
}
.news-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 600ms ease, visibility 0s;
}

.news-hero__media {
  grid-area: 1 / 1;
  position: relative;
  overflow: hidden;
}
.news-hero__media img,
.news-hero__media .news-ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-hero__slide.is-active .news-hero__media > * { animation: heroDrift var(--hero-ms) ease-out both; }
@keyframes heroDrift { from { transform: scale(1.06); } to { transform: scale(1); } }

/* The story, over a fade from the bottom-left corner. */
.news-hero__panel {
  grid-area: 1 / 1;
  align-self: end;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: 720px;
  padding: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 64px;
}
.news-hero__slide::after {
  content: "";
  grid-area: 1 / 1;
  background:
    linear-gradient(0deg, rgba(4, 12, 28, 0.92) 0%, rgba(4, 12, 28, 0.55) 45%, transparent 75%),
    linear-gradient(90deg, rgba(4, 12, 28, 0.55) 0%, transparent 60%);
  pointer-events: none;
}
.news-hero__kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.news-hero__date { color: rgba(255, 255, 255, 0.7); font-weight: 500; }
.news-hero__flag {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--tx-accent);
  color: var(--tx-on-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.news-hero__title {
  font-family: var(--font-serif);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #FFFFFF;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.news-hero__body {
  max-width: 60ch;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* FIFA's white pill. */
.news-hero__cta {
  margin-top: var(--space-2);
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  color: #0B1B33;
  font-size: 15px;
  font-weight: 600;
  transition: background 160ms, transform 160ms;
}
.news-hero__cta:hover { color: #0B1B33; background: var(--tx-accent); transform: translateY(-1px); }

/* Progress bars: one per slide; the active one fills over --hero-ms. */
.news-hero__bars {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 4vw, 48px);
  right: clamp(24px, 4vw, 48px);
  bottom: 24px;
  display: flex;
  gap: 8px;
}
.news-hero__bar {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  height: 24px;              /* the tap area; the line itself is 3px */
  padding: 0;
  cursor: pointer;
  background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)) center / 100% 3px no-repeat;
}
.news-hero__fill {
  display: block;
  width: 0;
  height: 3px;
  background: #FFFFFF;
}
.news-hero__bar.is-done .news-hero__fill { width: 100%; }
.news-hero__bar.is-active .news-hero__fill { animation: heroFill var(--hero-ms) linear forwards; }
.news-hero.is-paused .news-hero__bar.is-active .news-hero__fill,
.news-hero.is-paused .news-hero__slide.is-active .news-hero__media > * { animation-play-state: paused; }
.news-hero.is-static .news-hero__bar.is-active .news-hero__fill { animation: none; width: 100%; }
@keyframes heroFill { from { width: 0; } to { width: 100%; } }

/* ============================================================
   PLACEHOLDER PICTURE — used until a post has its own photo.
   A mown-pitch graphic with the centre circle, in four colourways
   so a row of them does not read as one repeated tile.
   ============================================================ */
.news-ph {
  --ph-a: #0E2B55;
  --ph-b: #12305C;
  --ph-line: rgba(255, 255, 255, 0.12);
  --ph-glow: rgba(176, 234, 0, 0.28);
  --ph-ink: #B0EA00;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, transparent 17%, var(--ph-line) 17.4%, var(--ph-line) 18.2%, transparent 18.6%),
    linear-gradient(90deg, transparent calc(50% - 1px), var(--ph-line) calc(50% - 1px), var(--ph-line) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 78% 18%, var(--ph-glow), transparent 55%),
    repeating-linear-gradient(90deg, var(--ph-a) 0 44px, var(--ph-b) 44px 88px);
}
.news-ph--1 { --ph-a: #092040; --ph-b: #0D2750; --ph-glow: rgba(205, 165, 78, 0.35); --ph-ink: #E3C06A; }
.news-ph--2 { --ph-a: #A6DD00; --ph-b: #B0EA00; --ph-line: rgba(14, 43, 85, 0.18); --ph-glow: rgba(255, 255, 255, 0.35); --ph-ink: #0E2B55; }
.news-ph--3 { --ph-a: #16345F; --ph-b: #1B3C6B; --ph-glow: rgba(160, 11, 35, 0.4); --ph-ink: #FFFFFF; }
.news-ph__mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--ph-ink);
  opacity: 0.85;
}
.news-ph__mark svg { width: 28px; height: 28px; }
/* On the hero the story covers the lower left, so the mark moves to
   the top right, clear of the headline. */
.news-ph--hero { place-items: start end; padding: clamp(24px, 4vw, 44px); }
.news-ph--hero .news-ph__mark { font-size: 22px; }
.news-ph--hero .news-ph__mark svg { width: 34px; height: 34px; }

/* ---------- More updates: carousel + grid ---------- */
.news-more { margin-top: var(--space-6); }
.news-more__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.news-more__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.news-more__controls { display: flex; align-items: center; gap: var(--space-2); }
.news-step {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  transition: background 160ms, border-color 160ms;
}
.news-step:hover { border-color: var(--border-strong); background: var(--surface-2); }
.news-step svg { width: 15px; height: 15px; }
.news-step[hidden] { display: none; }

/* Fades at both ends say "there is more this way". */
.news-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: 4px 8px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.news-carousel::-webkit-scrollbar { display: none; }
.news-carousel[hidden] { display: none; }
.news-track {
  display: flex;
  gap: var(--space-4);
  width: max-content;
  padding-inline: 4px;
}
.news-track .news-card { flex: 0 0 auto; width: 250px; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--space-4);
}
.news-grid[hidden] { display: none; }

/* ---------- Carousel card: FIFA's "Moments" tile ----------
   A tall picture with the headline over a dark fade at the bottom,
   a "New" badge top right. The whole card is the link. */
.news-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: var(--tx-tile);
  color: #FFFFFF;
  text-decoration: none;
  isolation: isolate;
}
.news-card:hover { color: #FFFFFF; }
.news-card:focus-visible { box-shadow: var(--focus-ring); }
.news-card__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.news-card__media img,
.news-card__media .news-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease;
}
.news-card:hover .news-card__media > * { transform: scale(1.05); }
.news-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(4, 12, 28, 0.9) 0%, rgba(4, 12, 28, 0.45) 38%, transparent 62%);
}
.news-card__new {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #FFFFFF;
  color: #0B1B33;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.news-card__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
}
.news-card__meta {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}
.news-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* ---------- Upcoming Events (from the TXC proposal) ---------- */
.cup-events { margin-top: var(--space-7); }
.cup-events .news-more__title { margin-bottom: var(--space-3); }
.cup-events__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: var(--space-4);
}
.cup-event {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 180ms, box-shadow 180ms;
}
.cup-event:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.cup-event__photo {
  aspect-ratio: 4 / 3;
  max-width: 100%;
  overflow: hidden;
  background: var(--surface-2);
}
.cup-event__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.cup-event:hover .cup-event__img { transform: scale(1.04); }
/* No photo: the team crest on navy, like the headline tiles */
.cup-event__photo--crest {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, var(--tx-glow), transparent 60%),
    var(--tx-tile);
}
.cup-event__crest {
  width: 46%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}

.cup-event__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-4);
}
.cup-event__team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cup-event__team img { width: 20px; height: 20px; object-fit: contain; }
.cup-event__title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}
.cup-event__desc { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }

@media (max-width: 560px) {
  /* Hero on a phone, as FIFA does it: picture on top, a solid dark
     panel under it for the story, the progress bars at its foot. */
  .news-hero__slide { min-height: 0; grid-template-rows: auto 1fr; }
  .news-hero__media { grid-area: 1 / 1; aspect-ratio: 16 / 10; }
  .news-hero__panel {
    grid-area: 2 / 1;
    align-self: stretch;
    max-width: none;
    padding: 20px 20px 60px;
  }
  .news-hero__slide::after { display: none; }
  .news-hero__bars { left: 20px; right: 20px; bottom: 18px; }
  .news-ph--hero .news-ph__mark { transform: none; font-size: 20px; }
  .news-ph--hero .news-ph__mark svg { width: 32px; height: 32px; }
  .news-track .news-card { width: 210px; }
}

/* ============================================================
   SWIPE ROWS — on narrow screens the other lists of matches on the
   Cup tab (the calendar's day, a sport's and a team's matches) are
   one row of cards you swipe too, like the rows on Matches, so a
   list is one card tall however many it holds. The next card peeks
   in at the edge to say there is more. The 720px matches isSwipe()
   in screens/cup.js, which then puts every card in the row.
   ============================================================ */
@media (max-width: 720px) {
  .screen--cup .match-grid {
    --swipe-bleed: 16px;           /* the .wrap padding: rows run edge to edge */
    display: flex;
    gap: 10px;
    margin-inline: calc(-1 * var(--swipe-bleed));
    padding: 12px var(--swipe-bleed) 8px;   /* room for the "Your team" badge and rings */
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--swipe-bleed);
    scrollbar-width: none;
  }
  .screen--cup .match-grid::-webkit-scrollbar { display: none; }
  /* No fade-in here: a card swiped in from the side would be waiting
     on a scroll-into-view that never comes from below. */
  .screen--cup .match-grid > .match {
    flex: 0 0 min(320px, 86%);
    scroll-snap-align: start;
    opacity: 1;
    transform: none;
    transition: box-shadow 180ms, border-color 180ms;
  }
  .screen--cup .match-grid > .match:only-child { flex-basis: 100%; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .cup-map-grid { grid-template-columns: 1fr; }
  .cup-hero__trophy { width: 140px; }
}
@media (max-width: 820px) {
  .cup-hero { padding-block: var(--space-6) var(--space-5); }
  .cup-hero__wrap { gap: var(--space-4); }
  .cup-hero__trophy { width: 104px; align-self: flex-end; }
  .cup-section { padding-top: var(--space-6); }
  .cup-section__title { font-size: 21px; }
  .cup-section__head { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
}
@media (max-width: 560px) {
  /* The campus map runs almost to the panel's edges on a phone */
  .cup-map-panel { padding: var(--space-2); }
  .cup-map-panel__legend { padding: 0 var(--space-2) var(--space-2); }
  .cup-hero__wrap { flex-direction: column; align-items: flex-start; }
  .cup-hero__trophy { position: absolute; right: -14px; top: -10px; width: 96px; opacity: 0.9; }
  .cup-hero__lede { display: none; }
  /* The placeholder's label would crowd the caption: icon only. */
  .cup-photo .news-ph__mark > span { display: none; }
  .cup-photo__caption { max-width: calc(100% - 90px); }
  /* Matches on a phone: a slimmer win counter and rows. */
  .cup-wins { gap: var(--space-3); padding: 10px 14px; border-radius: 18px; }
  .cup-wins__icon { width: 44px; height: 44px; }
  .cup-wins__icon img { width: 28px; height: 28px; }
  .cup-wins__list { gap: var(--space-3); }
  .cup-wins__team:nth-child(n + 4) { display: none; }   /* the top three fit a phone */
  .cup-rail { padding: var(--space-3); border-radius: 20px; }
  .cup-rail__title { font-size: 17px; }
  .cup-rail__arrow { width: 34px; height: 34px; }
  .cup-rail__arrow--prev { left: -8px; }
  .cup-rail__arrow--next { right: -8px; }
  .cup-filterpanel { padding: var(--space-3); }
  /* The Filter row on a phone: a smaller button, a smaller summary,
     and List / Calendar as two small icons (their words stay for
     screen readers). */
  .cup-filterbar { gap: var(--space-2); margin-top: var(--space-4); }
  .cup-filterbtn { min-height: 34px; padding: 5px 11px; gap: 6px; font-size: 13px; }
  .cup-filterbar__summary { font-size: 12px; }
  .cup-viewswitch .seg__btn { min-height: 30px; padding: 4px 10px; }
  .cup-viewswitch .seg__icon { width: 15px; height: 15px; }
  .cup-viewswitch .seg__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  /* The four status chips share the width. */
  .cup-status .chip { flex: 1 0 auto; justify-content: center; gap: 5px; padding: 5px 8px; }
  .cup-status .chip__dot { display: none; }
  .cup-status .chip[aria-pressed="true"] .chip__dot { display: none; }
  .news-head { flex-direction: column; }
  .cup-results { padding: var(--space-4); }
  .cup-results__head { flex-direction: column; align-items: flex-start; }
}
