.football-page {
  margin-bottom: 3rem;
  font-variant-numeric: tabular-nums;
}

.football-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.football-heading {
  margin: clamp(1.5rem, 3vw, 2.65rem) 0 1.15rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--ink);
}
.football-heading h1 {
  margin-block: .2rem .25rem;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  letter-spacing: -.05em;
}
.football-kicker { color: var(--accent); }
.football-heading p, .football-source { color: var(--secondary); }
.football-source {
  margin-top: 1.25rem;
  font-size: .875rem;
}

.football-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1.15rem;
}
.football-filters a, .football-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .3rem .75rem;
  border: 1px solid var(--line);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.football-filters a:hover, .football-button:hover { border-color: var(--ink); }
.football-filters a[aria-current] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.football-filters a span { color: var(--accent); }
.football-filters a[aria-current] span { color: var(--pink); }

.team-badge {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  flex: none;
}
.team-badge.su-scuro, .badge-fallback {
  background: var(--ink);
  color: var(--pink);
  border-radius: 50%;
}
.team-badge.su-scuro { padding: .15rem; }
.badge-fallback { display: grid; place-items: center; font-size: .625rem; font-weight: 700; }

.cal-focus {
  display: grid;
  gap: .45rem;
  margin-bottom: 1.35rem;
  padding: .65rem;
  background: var(--ink) url("../img/motivo-maglia.svg") center/cover;
}
.fc { min-width: 0; padding: .65rem .8rem; background: var(--paper); }
.fc-next { background: var(--pink); }
.fc-poi { display: none; }
.fc-lab { color: var(--accent); }
.fc-next .fc-lab { color: var(--ink); }
.fc-body { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin-block: .2rem; }
.fc-body .cal-lato { flex: 1 0 min(100%, 10rem); }
.fc-body .cal-nome { font: 600 clamp(1.2rem, 2.1vw, 1.65rem)/1.08 var(--serif); overflow-wrap: normal; }
.fc-score { flex: none; margin-left: auto; font-size: 1.125rem; white-space: nowrap; }
.fc-meta { color: var(--secondary); font-size: .8rem; }
.fc-next .fc-meta { color: var(--ink); }
.cal-vai { grid-column: 1 / -1; justify-self: start; color: var(--paper); padding-inline: .5rem; }
.cal-vai:hover { color: var(--pink); }
.cal-blocco { border-bottom: 1px solid var(--line); }
.cal-mese {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem .7rem;
  min-height: 3.2rem;
  padding: .55rem .65rem;
  background: #f2eef0;
  cursor: pointer;
  list-style: none;
}
.cal-mese::-webkit-details-marker { display: none; }
.cal-mese::after {
  content: "";
  width: .45rem;
  height: .45rem;
  border: solid var(--ink);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
}
.cal-blocco[open] > .cal-mese::after { transform: rotate(45deg); }
.cal-mese-nome { font: 600 clamp(1.2rem, 2.5vw, 1.55rem)/1.1 var(--serif); }
.cal-mese-sum { color: var(--secondary); font-size: .8125rem; margin-left: auto; }
.cal-lista { list-style: none; padding: 0; }
.cal-riga {
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr);
  gap: .45rem .65rem;
  padding: .85rem .55rem;
  border-bottom: 1px solid var(--line);
}
.cal-riga:last-child { border-bottom: 0; }
.cal-riga.is-next { background: #fde4f3; box-shadow: inset 3px 0 var(--accent); }
.cal-data {
  grid-row: span 2;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: .12rem;
  border-right: 1px solid var(--line);
  padding-right: .4rem;
  color: var(--secondary);
  font-size: .75rem;
  line-height: 1.1;
}
.cal-num { color: var(--ink); font-size: 1.55rem; font-weight: 600; }
.cal-incontro { display: flex; align-items: center; gap: .5rem; }
.cal-squadre { display: grid; gap: .35rem; flex: 1; min-width: 0; }
.cal-team { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.cal-lato { display: flex; align-items: center; gap: .4rem; min-width: 0; font-weight: 500; }
.cal-nome { line-height: 1.2; overflow-wrap: anywhere; }
.cal-lato.noi { font-weight: 700; }
.cal-team strong, .cal-esito strong { font-size: 1.125rem; }
.cal-esito {
  display: grid;
  justify-items: end;
  max-width: 4.5rem;
  text-align: right;
  font-size: .75rem;
  line-height: 1.2;
  color: var(--secondary);
}
.cal-esito strong { color: var(--ink); }
.cal-comp { display: grid; justify-items: start; color: var(--secondary); font-size: .8125rem; }
.cal-nota { font-style: italic; }
.cal-flag { color: var(--accent); font-weight: 700; }
.cal-avviso { margin-top: 1.5rem; padding: .85rem 1rem; border-left: 3px solid var(--pink); background: #f2eef0; }
.cal-avviso p { margin-top: .35rem; color: var(--secondary); font-size: .875rem; }
#prossima { scroll-margin-block: 4rem; }
#prossima:focus, #palermo-in-classifica:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-sticky { position: fixed; inset: 0 0 auto; z-index: 4; background: var(--ink); color: var(--paper); }
.cal-sticky .paper-width { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.cs-item { display: block; min-width: 0; padding-block: .4rem; font-size: .75rem; }
.cs-item b { color: var(--pink); }
.cs-item i { font-style: normal; font-weight: 600; }
.cs-next { display: flex; flex-wrap: wrap; column-gap: .35rem; align-items: center; min-height: 2.75rem; }

.standing-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin: .2rem 0 1rem; }
.standing-palermo {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .7rem;
  min-height: 2.75rem;
  padding: .65rem .8rem;
  background: var(--pink);
  text-decoration: none;
}
.standing-palermo strong { font: 600 1.45rem/1.1 var(--serif); }
.standing-palermo span { font-size: .875rem; font-weight: 600; }
.standing-jump { margin-left: auto; text-decoration: underline; text-underline-offset: .15em; white-space: nowrap; }
.standing-view { flex: 1 1 100%; color: var(--accent); }
.standing-help { margin-bottom: .5rem; color: var(--secondary); font-size: .875rem; }
.standing-table { overflow-x: auto; }
.standing-table:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ctable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9375rem; }
.ctable :is(th, td) { padding: .55rem .5rem; text-align: center; }
.ctable thead { background: var(--ink); color: var(--paper); }
.ctable thead th { font-size: .875rem; font-weight: 600; }
.ctable abbr { text-decoration: none; }
.ctable tbody :is(th, td) { border-bottom: 1px solid var(--line); }
.ctable tbody tr:nth-child(even) { background: #f7f4f6; }
.ctable .crank { width: 3rem; padding-inline: .35rem; }
.ctable .tteam { text-align: left; }
.standing-team { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.ctable .cpt { font-weight: 700; }
.ctable tbody .cpt { color: var(--accent); font-size: 1.1rem; }
.ctable tbody tr.is-pal { background: var(--pink); }
.ctable .is-pal .standing-team { font-weight: 700; }
.ctable .is-pal .cpt { color: var(--ink); }
[data-zone="promo"] { --zone: #05532d; }
[data-zone="playoff"] { --zone: #886024; }
[data-zone="playout"] { --zone: #9b2756; }
[data-zone="retro"] { --zone: #a12020; }
.ctable tbody tr[data-zone] .crank { box-shadow: inset 3px 0 var(--zone); }
.standing-legend { display: flex; flex-wrap: wrap; gap: .4rem .8rem; list-style: none; padding: 0; margin-top: .8rem; color: var(--secondary); font-size: .8125rem; }
.standing-legend li { display: flex; align-items: center; gap: .4rem; }
.standing-legend li::before { content: ""; width: .65rem; height: .65rem; background: var(--zone); }
.standing-form { display: flex; gap: .22rem; justify-content: center; }
.standing-form abbr { display: grid; place-items: center; min-width: 1.3rem; min-height: 1.3rem; background: #eee9ed; color: var(--ink); font-weight: 600; font-size: .75rem; }
.standing-form [data-form="W"] { background: #def1e4; color: #05532d; }
.standing-form [data-form="L"] { background: #f8e3e3; color: #a12020; }

@media (max-width: 51.999rem) {
  .standing-table:not(.is-full) .stat { display: none; }
  .standing-table.is-full .ctable { min-width: 43rem; }
}

@media (min-width: 40rem) {
  .cal-focus { padding: .8rem; gap: .6rem; }
  .cal-focus:has(.fc + .fc) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-focus:has(.fc + .fc + .fc) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fc-poi { display: block; }
  .cal-riga { grid-template-columns: 3.6rem minmax(0, 1fr) minmax(0, .8fr); gap: 1rem; align-items: center; padding-inline: .85rem; }
  .cal-data { grid-row: auto; }
  .cal-esito { max-width: 6rem; }
  .cal-comp { justify-self: start; }
  .cal-sticky .paper-width { justify-content: center; gap: 2rem; }
}

@media (min-width: 52rem) {
  .standing-view, .standing-help { display: none; }
  .ctable :is(th, td) { padding-block: .6rem; }
  .ctable .crank { width: 4rem; }
}
