/* ==========================================================================
   Futbol Libre TV - UI polish layer
   Loaded AFTER the Tailwind build. Tailwind utilities live in
   @layer utilities, so this unlayered sheet wins the cascade without
   a single !important.

   Palette is untouched: every colour below is either an existing theme
   token (--color-green-600/700/800, --color-emerald-800, --color-gray-*)
   or a neutral black alpha, exactly like the shadows already in the build.
   What changes is geometry, density, depth, focus and motion.
   ========================================================================== */

:root {
  /* layered elevation - replaces the flat single-offset shadows */
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --sh-2: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 20px -10px rgba(16, 24, 40, .18);
  --sh-3: 0 1px 2px rgba(16, 24, 40, .07), 0 18px 34px -14px rgba(16, 24, 40, .26);
  --sh-4: 0 24px 60px -14px rgba(16, 24, 40, .45);

  --line: rgba(16, 24, 40, .08);
  --line-strong: rgba(16, 24, 40, .14);

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --ring: 0 0 0 3px color-mix(in oklab, var(--color-green-600) 32%, transparent);
}

/* ---------- base ---------------------------------------------------------- */

body {
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  letter-spacing: -.004em;
}

/* sticky header no longer swallows anchor jumps */
[id] { scroll-margin-top: 5.5rem; }

::selection {
  background: color-mix(in oklab, var(--color-green-600) 24%, transparent);
  color: var(--color-emerald-800);
}

/* one consistent focus treatment everywhere, keyboard only */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-green-700);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

@supports (scrollbar-width: thin) {
  html { scrollbar-width: thin; scrollbar-color: var(--color-gray-300) transparent; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
  background-clip: content-box;
}

/* ---------- header ------------------------------------------------------- */

body > header {
  background: color-mix(in oklab, var(--color-white) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  padding: .75rem 1.125rem;
  gap: 1rem;
}

body > header > a:first-child { gap: .625rem; }

body > header > a:first-child img {
  border-radius: var(--r-md);
  transition: transform .3s var(--ease-out);
}
body > header > a:first-child:hover img { transform: rotate(-6deg) scale(1.04); }

body > header > a:first-child span {
  font-size: 1.3125rem;
  letter-spacing: -.028em;
  line-height: 1.1;
}

body > header nav { gap: .25rem; }

body > header nav a {
  position: relative;
  padding: .4375rem .625rem;
  border-radius: var(--r-sm);
  letter-spacing: -.008em;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
body > header nav a::after {
  content: "";
  position: absolute;
  left: .625rem;
  right: .625rem;
  bottom: .125rem;
  height: 2px;
  border-radius: 2px;
  background: var(--color-green-600);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform .24s var(--ease-out);
}
body > header nav a:hover { background: color-mix(in oklab, var(--color-green-600) 7%, transparent); }
body > header nav a:hover::after { transform: scaleX(1); }

body > header > button {
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-right: -.375rem;
  border-radius: var(--r-md);
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
/* only ever shown below md - never override the md:hidden utility */
@media (width < 48rem) {
  body > header > button { display: flex; }
}
body > header > button:hover {
  background: var(--color-gray-100);
  color: var(--color-emerald-800);
}
body > header > button:active { transform: scale(.94); }

/* ---------- mobile menu sheet -------------------------------------------- */

#menu-overlay {
  background: rgba(16, 24, 40, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fl-fade .18s var(--ease) both;
}
#menu-overlay > div {
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  box-shadow: var(--sh-4);
  padding: 1.25rem;
  animation: fl-pop .26s var(--ease-out) both;
}
#menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
#menu-close:hover { background: var(--color-gray-100); color: var(--color-gray-900); }

#menu-overlay nav { gap: .25rem; margin-top: 1.25rem; }
#menu-overlay nav a {
  border-radius: var(--r-md);
  padding: .6875rem .75rem;
  font-size: 1rem;
  letter-spacing: -.01em;
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
#menu-overlay nav a:active { transform: scale(.985); }

/* ---------- type --------------------------------------------------------- */

main { padding-bottom: 1.5rem; }

.home-intro h1,
main > h1 {
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.home-intro h1 { margin-bottom: 1.5rem; }

.home-intro p { letter-spacing: -.011em; line-height: 1.65; }

/* section headings get a left accent mark; centred ones get a centred rule */
main h2 { letter-spacing: -.022em; line-height: 1.22; text-wrap: balance; }

main h2:not(.text-center) {
  position: relative;
  padding-left: .9375rem;
}
main h2:not(.text-center)::before {
  content: "";
  position: absolute;
  left: 0;
  top: .22em;
  bottom: .18em;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(var(--color-green-600), var(--color-green-800));
}

/* headings inside a card or link are titles, not sections.
   The :not() above carries a class, so these need one too to outrank it. */
main a h2:not(.text-center) { padding-left: 0; }
main a h2:not(.text-center)::before { content: none; }

main h2.text-center { position: relative; padding-bottom: .75rem; }
main h2.text-center::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2.5rem;
  height: 3px;
  border-radius: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--color-green-600), var(--color-green-800));
}

main h3 { letter-spacing: -.02em; }
main p { letter-spacing: -.008em; }

.article-content a,
.home-intro a {
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  text-decoration-color: color-mix(in oklab, var(--color-green-700) 40%, transparent);
  transition: text-decoration-color .18s var(--ease), color .18s var(--ease);
}
.article-content a:hover,
.home-intro a:hover { text-decoration-color: currentColor; }

main ol.list-decimal li,
main ul.list-disc li { padding-left: .125rem; line-height: 1.6; }
main ol.list-decimal li::marker { color: var(--color-green-700); font-weight: 700; }
main ul.list-disc li::marker { color: var(--color-green-600); }

/* ---------- form controls ------------------------------------------------ */

#ag-search,
#ch-search,
main input[type="text"],
main select {
  height: 2.75rem;
  padding: 0 .875rem;
  border-radius: var(--r-md);
  border-color: var(--line-strong);
  background-color: var(--color-white);
  font-size: .9375rem;
  letter-spacing: -.008em;
  box-shadow: inset 0 1px 1px rgba(16, 24, 40, .03);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
#ag-search::placeholder,
#ch-search::placeholder { color: var(--color-gray-500); }

#ag-search:hover,
#ch-search:hover,
main select:hover { border-color: var(--color-gray-500); }

#ag-search:focus,
#ch-search:focus,
main input[type="text"]:focus,
main select:focus {
  outline: none;
  border-color: var(--color-green-600);
  box-shadow: var(--ring);
}

main select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right .75rem center;
}

/* the search + filter pair reads as one toolbar */
#agenda .mb-4.mt-3,
#canales .mb-4.mt-3 { gap: .625rem; margin-top: 1rem; margin-bottom: 1rem; }

/* ---------- agenda ------------------------------------------------------- */

#agenda > div:first-of-type {
  border-radius: var(--r-lg);
  padding: .8125rem 1rem;
  box-shadow: var(--sh-2);
  background-image: linear-gradient(100deg, var(--color-green-700), var(--color-green-800));
}
#agenda > div:first-of-type h2 {
  padding-left: 0;
  letter-spacing: .005em;
  font-size: .9375rem;
}
#agenda > div:first-of-type h2::before,
#agenda > div:first-of-type h2::after { content: none; }

#ag-list {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--color-white);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
#ag-list > li { border-bottom: 1px solid rgba(16, 24, 40, .07); }
#ag-list > li:last-child { border-bottom: 0; }

#ag-list .ag-toggle {
  position: relative;
  padding: .75rem .9375rem .75rem 1rem;
  gap: .75rem;
  letter-spacing: -.008em;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
#ag-list .ag-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-green-600);
  opacity: 0;
  transition: opacity .16s var(--ease);
}
#ag-list .ag-toggle:hover::before { opacity: 1; }

#ag-list .ag-toggle > span:first-child { gap: .625rem; min-width: 0; }

#ag-list time {
  width: auto;
  min-width: 3.25rem;
  flex: none;
  white-space: nowrap;
  padding: .25rem .375rem;
  border-radius: 7px;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
  letter-spacing: .01em;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
#ag-list .ag-toggle:hover time {
  background: rgba(255, 255, 255, .18);
  color: var(--color-white);
}

#ag-list .ag-toggle img {
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--line);
}

#ag-list .ag-toggle > span:first-child > span:last-child {
  margin-left: .125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#ag-list .ag-toggle > span:last-child {
  flex: none;
  width: 1.25rem;
  text-align: center;
  font-size: .875rem;
  color: var(--color-gray-500);
}
#ag-list .ag-toggle:hover > span:last-child { color: var(--color-white); }

/* stream list under an open match */
#ag-list ul {
  margin: .125rem 0 .5rem 2rem;
  padding: .125rem 0 .125rem .875rem;
  border-left-width: 2px;
  animation: fl-reveal .2s var(--ease) both;
}
#ag-list ul li { padding-block: .1875rem; }

#ag-list .ag-play {
  padding: .3125rem .5rem .3125rem .375rem;
  border-radius: var(--r-sm);
  min-width: 0;
  letter-spacing: -.008em;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
#ag-list .ag-play:hover { background: color-mix(in oklab, var(--color-green-600) 9%, transparent); }
#ag-list .ag-play > span:first-child { font-size: .625rem; line-height: 1; }
#ag-list .ag-play .bg-gray-200 {
  border-radius: 999px;
  padding: .125rem .375rem;
  font-family: var(--font-mono);
  letter-spacing: .02em;
  text-transform: uppercase;
}
#ag-list ul li > a {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--r-sm);
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
#ag-list ul li > a:hover { background: var(--color-gray-100); }

/* ---------- player modal ------------------------------------------------- */

#ag-modal {
  background: rgba(10, 14, 22, .78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fl-fade .16s var(--ease) both;
}
#ag-modal > div {
  border-radius: var(--r-xl);
  padding: .625rem;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--sh-4);
  animation: fl-pop .26s var(--ease-out) both;
}
#ag-modal-title {
  letter-spacing: -.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: .25rem;
}
#ag-modal-close {
  flex: none;
  border-radius: 999px;
  padding: .3125rem .75rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: -.005em;
  transition: background-color .16s var(--ease);
}
#ag-modal-close:hover { background: var(--color-gray-600); }
#ag-modal-frame { border-radius: var(--r-md); }

/* ---------- pills and action buttons ------------------------------------- */

.rounded-full.bg-green-700 {
  box-shadow: 0 1px 2px rgba(16, 24, 40, .12), inset 0 1px 0 rgba(255, 255, 255, .14);
  letter-spacing: -.01em;
  transition: background-color .16s var(--ease), box-shadow .16s var(--ease), transform .12s var(--ease);
}
button.rounded-full.bg-green-700:hover { box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .14); }
button.rounded-full.bg-green-700:active { transform: translateY(1px) scale(.99); }

/* ---------- cards: channels and sports ----------------------------------- */

#ch-grid > a,
main > div.grid > a {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-1);
  transition: transform .26s var(--ease-out), box-shadow .26s var(--ease-out), border-color .26s var(--ease-out);
}
#ch-grid > a:hover,
main > div.grid > a:hover {
  scale: 1;                      /* neutralise the old 1.05 text-blurring jump */
  transform: translateY(-3px);
  box-shadow: var(--sh-3);
  border-color: color-mix(in oklab, var(--color-green-600) 32%, transparent);
}
#ch-grid > a:active,
main > div.grid > a:active { transform: translateY(-1px); }

/* channel logo plate: fluid instead of a fixed 160px box, so 4-up never crowds */
#ch-grid > a > div:first-child {
  height: auto;
  aspect-ratio: 5 / 4;
  padding: 1rem;
  background: linear-gradient(180deg, var(--color-gray-100), var(--color-white));
  border-bottom: 1px solid var(--line);
}
#ch-grid > a > div:first-child > div {
  width: 100%;
  height: 100%;
  max-width: 9.5rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}
#ch-grid > a > div:first-child img {
  width: 72%;
  height: 72%;
  transition: transform .3s var(--ease-out);
}
#ch-grid > a:hover > div:first-child img { transform: scale(1.05); }

#ch-grid > a > div:last-child { padding: 1.125rem 1rem 1.25rem; }
#ch-grid > a h3 { font-size: 1.0625rem; letter-spacing: -.022em; }
#ch-grid > a p { font-size: .8125rem; margin-bottom: .875rem; letter-spacing: -.005em; }
#ch-grid > a span.rounded-full {
  width: 100%;
  padding: .5625rem 1rem;
  font-size: .8125rem;
}
#ch-grid > a:hover span.rounded-full,
main > div.grid > a:hover span.rounded-full {
  background: var(--color-green-800);
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .14);
}

/* sports cards (deportes): the emoji becomes a proper icon tile */
main > div.grid > a { padding: 1.375rem; }
main > div.grid > a > div:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: .875rem;
  font-size: 1.75rem;
  line-height: 1;
  border-radius: var(--r-lg);
  background: var(--color-gray-100);
  border: 1px solid var(--line);
  transition: transform .3s var(--ease-out);
}
main > div.grid > a:hover > div:first-child { transform: translateY(-1px) rotate(-5deg); }
main > div.grid > a p { font-size: .9375rem; line-height: 1.55; }
main > div.grid > a span.rounded-full { margin-top: 1rem; }

@media (width >= 64rem) {
  #ch-grid { gap: 1rem; }
  #ch-grid > a > div:first-child { padding: .75rem; }
  #ch-grid > a > div:last-child { padding: .875rem .75rem 1rem; }
  #ch-grid > a h3 { font-size: .9375rem; }
  #ch-grid > a p { font-size: .75rem; margin-bottom: .75rem; }
  #ch-grid > a span.rounded-full { padding: .5rem; font-size: .75rem; }
}

/* ---------- community CTAs ----------------------------------------------- */

main > section.grid > a,
#android-app-link {
  border-radius: var(--r-lg);
  padding: .9375rem 1.25rem;
  letter-spacing: -.015em;
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), filter .2s var(--ease);
}
main > section.grid > a:hover,
#android-app-link:hover {
  scale: 1;
  transform: translateY(-2px);
  filter: saturate(1.06) brightness(1.03);
  box-shadow: var(--sh-3), inset 0 1px 0 rgba(255, 255, 255, .18);
}
main > section.grid > a:active,
#android-app-link:active { transform: translateY(0); box-shadow: var(--sh-1); }

main > section.grid > a svg,
#android-app-link svg { width: 1.375rem; height: 1.375rem; }

/* ---------- channel link list and league cards --------------------------- */

main ul.grid.list-none li > a:only-child {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .625rem;
  margin-left: -.625rem;
  border-radius: var(--r-md);
  letter-spacing: -.008em;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
main ul.grid.list-none li > a:only-child:hover {
  background: color-mix(in oklab, var(--color-green-600) 8%, transparent);
}
main ul.grid.list-none li > a:only-child span { font-size: .625rem; line-height: 1; }

main ul li.rounded-lg.bg-white {
  border-radius: var(--r-md);
  border-color: var(--line);
  padding: .8125rem .875rem;
  box-shadow: var(--sh-1);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), border-color .2s var(--ease-out);
}
main ul li.rounded-lg.bg-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
  border-color: color-mix(in oklab, var(--color-green-600) 30%, transparent);
}
main ul li.rounded-lg.bg-white a { letter-spacing: -.012em; }
main ul li.rounded-lg.bg-white span { margin-top: .125rem; font-size: .75rem; }

/* ---------- FAQ ---------------------------------------------------------- */

#faq details {
  border-radius: var(--r-md);
  border-color: var(--line);
  padding: .9375rem 1rem;
  box-shadow: var(--sh-1);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
#faq details:hover { border-color: color-mix(in oklab, var(--color-green-600) 28%, transparent); }
#faq details[open] {
  box-shadow: var(--sh-2);
  border-color: color-mix(in oklab, var(--color-green-600) 24%, transparent);
}

#faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  letter-spacing: -.012em;
  line-height: 1.45;
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after {
  content: "";
  flex: none;
  width: .5rem;
  height: .5rem;
  margin-right: .1875rem;
  border-right: 2px solid var(--color-green-700);
  border-bottom: 2px solid var(--color-green-700);
  transform: rotate(45deg) translateY(-1px);
  transition: transform .22s var(--ease-out);
}
#faq details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
#faq details > p { animation: fl-reveal .22s var(--ease) both; line-height: 1.6; }

/* ---------- live player (channel pages) ---------------------------------- */

main section > div.rounded-xl.bg-black {
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3), 0 0 0 1px rgba(16, 24, 40, .12);
}
main section > div.rounded-xl.bg-black iframe { display: block; }

main section > div.mt-3.mb-4 h1 { letter-spacing: -.032em; line-height: 1.12; }
main section > div.mt-3.mb-4 img {
  border-radius: var(--r-md);
  padding: .25rem;
  background: var(--color-white);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}

/* ---------- ad slots ----------------------------------------------------- */

#ad-bottom-banner {
  background: color-mix(in oklab, var(--color-white) 94%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 14px rgba(16, 24, 40, .1);
}
#ad-bottom-banner button {
  width: 1.375rem;
  height: 1.375rem;
  top: -.6875rem;
  border-radius: 999px;
  box-shadow: var(--sh-2);
}

/* the fixed mobile banner no longer sits on top of the footer links */
@media (width < 48rem) {
  body > footer { padding-bottom: 4.25rem; }
}

/* ---------- footer ------------------------------------------------------- */

body > footer {
  padding-block: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
body > footer > div { gap: 1rem; }
body > footer span { letter-spacing: -.005em; color: var(--color-gray-300); }
body > footer ul { gap: .25rem .75rem; }
body > footer ul a {
  display: inline-block;
  padding: .25rem .375rem;
  margin: -.25rem -.375rem;
  border-radius: var(--r-sm);
  letter-spacing: -.008em;
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
body > footer ul a:hover { background: rgba(255, 255, 255, .07); }

/* ---------- motion ------------------------------------------------------- */

@keyframes fl-fade {
  from { opacity: 0 }
  to   { opacity: 1 }
}
@keyframes fl-pop {
  from { opacity: 0; transform: translateY(10px) scale(.975) }
  to   { opacity: 1; transform: none }
}
@keyframes fl-reveal {
  from { opacity: 0; transform: translateY(-4px) }
  to   { opacity: 1; transform: none }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  #ch-grid > a:hover,
  main > div.grid > a:hover,
  main > section.grid > a:hover,
  #android-app-link:hover,
  main ul li.rounded-lg.bg-white:hover { transform: none }
}

/* ==========================================================================
   v2 - layout, live state and scroll-driven motion
   Still the same palette: nothing below introduces a new hue.
   ========================================================================== */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* cross-document page transitions where the browser supports them */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .22s; }

/* ---------- layout: a wider shell, a readable measure -------------------- */

/* the 768px box was the most dated thing here. Grids now breathe; prose
   stays at a comfortable measure inside it. The xl side ad rails are
   fixed at 160px + 8px, so the shell never comes closer than 200px to an edge. */
body > main {
  width: min(92%, 1120px);
  max-width: none;
}
@media (width >= 80rem) {
  body > main { width: min(1120px, 100vw - 25rem); }
}

/* Prose runs the full width of the shell - no narrow column, no dead space
   on the right. The longer measure is paid for with a looser line-height so
   the eye still finds the next line. */
main > p,
main > ul,
main > ol,
main > h2,
main > article,
main > section.mt-8,
.home-intro,
.home-intro p,
.article-content {
  max-width: none;
  margin-inline: 0;
}

main p,
main li { line-height: 1.7; }

/* inputs are the exception: a 1100px-wide text field is not a text field */
main > form,
main > div.rounded-xl {
  max-width: 40rem;
  margin-inline: 0;
}

main p { text-wrap: pretty; }

/* ---------- scroll progress rail ----------------------------------------- */

@supports (animation-timeline: scroll()) {
  body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: 3px;
    z-index: 45;
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--color-green-600), var(--color-green-800));
    animation: fl-progress linear both;
    animation-timeline: scroll(root block);
  }
  @media (prefers-reduced-motion: reduce) { body::before { display: none; } }
}
@keyframes fl-progress {
  from { transform: scaleX(0) }
  to   { transform: scaleX(1) }
}

/* ---------- reveal on scroll --------------------------------------------- */
/* uses `translate`, not `transform`, so the hover lift still works after
   the reveal animation has finished and locked in its end state */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    #ch-grid > a,
    main > div.grid > a,
    main > section.grid > a,
    main ul li.rounded-lg.bg-white,
    #faq details {
      animation: fl-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}
@keyframes fl-rise {
  from { opacity: 0; translate: 0 16px }
  to   { opacity: 1; translate: none }
}

/* ---------- live state --------------------------------------------------- */

#agenda > div:first-of-type {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
}

.fl-live {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .1875rem .5rem .1875rem .4375rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: .5625rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  white-space: nowrap;
}
.fl-live::before {
  content: "";
  width: .375rem;
  height: .375rem;
  border-radius: 999px;
  background: var(--color-white);
  animation: fl-pulse 1.8s var(--ease) infinite;
}
@keyframes fl-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 255, 255, .5) }
  50%      { opacity: .55; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0) }
}

/* ---------- agenda: sticky toolbar, skeleton, empty state ---------------- */

#agenda section > div:has(#ag-search) {
  position: sticky;
  top: 4rem;
  z-index: 20;
  margin-top: .75rem;
  padding-block: .625rem;
  background: var(--color-white);
  box-shadow: 0 10px 12px -12px rgba(16, 24, 40, .4);
}

/* loading placeholder rows */
.fl-skeleton {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1rem;
}
.fl-skeleton > span {
  height: .875rem;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--color-gray-100) 0%,
    var(--color-gray-200) 50%,
    var(--color-gray-100) 100%);
  background-size: 200% 100%;
  animation: fl-shimmer 1.4s linear infinite;
}
.fl-sk-time { width: 3.25rem; flex: none; }
.fl-sk-title { flex: 1; max-width: 22rem; }
.fl-skeleton:nth-child(2) .fl-sk-title { max-width: 15rem; }
.fl-skeleton:nth-child(4) .fl-sk-title { max-width: 18rem; }
.fl-skeleton:nth-child(5) .fl-sk-title { max-width: 12rem; }
@keyframes fl-shimmer {
  from { background-position: 100% 0 }
  to   { background-position: -100% 0 }
}
@media (prefers-reduced-motion: reduce) {
  .fl-skeleton > span { animation: none; }
}

/* "no hay partidos" / load failure */
#ag-list > li.p-4.text-center {
  padding: 3.5rem 1.5rem;
  font-size: .875rem;
  letter-spacing: -.008em;
}

/* ---------- numbered steps ----------------------------------------------- */

main ol.list-decimal {
  display: grid;
  gap: .5rem;
  padding-left: 0;
  list-style: none;
  counter-reset: fl-step;
}
/* the marker is absolute, not a grid/flex item - inline content inside the
   step (<strong>, links) has to keep flowing as normal text */
main ol.list-decimal > li {
  counter-increment: fl-step;
  position: relative;
  margin-bottom: 0;
  padding: .8125rem .9375rem .8125rem 3rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--color-white);
  box-shadow: var(--sh-1);
  line-height: 1.5;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
main ol.list-decimal > li:hover {
  border-color: color-mix(in oklab, var(--color-green-600) 30%, transparent);
  box-shadow: var(--sh-2);
}
main ol.list-decimal > li::before {
  content: counter(fl-step);
  position: absolute;
  left: .9375rem;
  top: .8125rem;
  display: grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 999px;
  background: var(--color-green-700);
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
}

/* ---------- channel shortcut links become real chips --------------------- */

main ul.grid.list-none li > a:only-child {
  width: 100%;
  margin-left: 0;
  padding: .625rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--color-white);
  box-shadow: var(--sh-1);
  transition: transform .2s var(--ease-out), border-color .2s var(--ease-out),
              box-shadow .2s var(--ease-out), color .2s var(--ease);
}
main ul.grid.list-none li > a:only-child:hover {
  transform: translateY(-2px);
  background: var(--color-white);
  border-color: color-mix(in oklab, var(--color-green-600) 32%, transparent);
  box-shadow: var(--sh-2);
}

/* ---------- contact page: form card -------------------------------------- */

main form {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
}
main form label {
  font-size: .875rem;
  letter-spacing: -.008em;
}
main input[type="email"],
main textarea {
  width: 100%;
  border-radius: var(--r-md);
  border-color: var(--line-strong);
  background-color: var(--color-white);
  font-size: .9375rem;
  letter-spacing: -.008em;
  box-shadow: inset 0 1px 1px rgba(16, 24, 40, .03);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
main input[type="email"] { height: 2.75rem; padding: 0 .875rem; }
main textarea {
  min-height: 8.5rem;
  padding: .75rem .875rem;
  line-height: 1.55;
  resize: vertical;
}
main input[type="email"]:hover,
main textarea:hover { border-color: var(--color-gray-500); }
main input[type="email"]:focus,
main textarea:focus {
  outline: none;
  border-color: var(--color-green-600);
  box-shadow: var(--ring);
}
main form button { padding: .625rem 1.5rem; }

main > div.rounded-xl.bg-gray-100 {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1.25rem 1.375rem;
}

/* ---------- footer accent ------------------------------------------------ */

body > footer { position: relative; }
body > footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg,
    var(--color-green-600),
    var(--color-green-800) 55%,
    transparent);
}
