/* One semantic palette across current and historical Igea standings. */
:root {
  --standing-promotion-ink:#145d43; --standing-promotion-soft:#d7eedf; --standing-promotion-solid:#2c795b;
  --standing-playoff-ink:#244c7c; --standing-playoff-soft:#dbe8fa; --standing-playoff-solid:#396ba3;
  --standing-playout-ink:#82500c; --standing-playout-soft:#ffebc5; --standing-playout-solid:#956017;
  --standing-relegation-ink:#8b3037; --standing-relegation-soft:#f6d6d9; --standing-relegation-solid:#ad4650;
  --standing-qualification-ink:#175b60; --standing-qualification-soft:#daf0ef; --standing-qualification-solid:#26787c;
}
.standings-zone--promotion { --zone-ink:var(--standing-promotion-ink); --zone-soft:var(--standing-promotion-soft); --zone-solid:var(--standing-promotion-solid); }
.standings-zone--playoff { --zone-ink:var(--standing-playoff-ink); --zone-soft:var(--standing-playoff-soft); --zone-solid:var(--standing-playoff-solid); }
.standings-zone--playout { --zone-ink:var(--standing-playout-ink); --zone-soft:var(--standing-playout-soft); --zone-solid:var(--standing-playout-solid); }
.standings-zone--relegation { --zone-ink:var(--standing-relegation-ink); --zone-soft:var(--standing-relegation-soft); --zone-solid:var(--standing-relegation-solid); }
.standings-zone--qualification { --zone-ink:var(--standing-qualification-ink); --zone-soft:var(--standing-qualification-soft); --zone-solid:var(--standing-qualification-solid); }
/* Explicit cells include the sticky team column and take precedence over club-row highlights. */
html body table[data-standings-key] tbody tr.standings-zone-row,
html body table[data-standings-key] tbody tr.standings-zone-row > :is(td,th) {
  background:var(--zone-soft) !important;
  color:#17201c;
}
html body table[data-standings-key] tbody tr.standings-zone-row > .standings-zone-position {
  background:var(--zone-solid) !important;
  color:#fff !important;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  width:52px;
  min-width:52px;
}
html body table[data-standings-key] .standings-zone-position .standing-position {
  color:inherit !important;
  font-size:14px;
  font-weight:800;
}
html body table[data-standings-key] tbody tr.standings-zone-row:is(.our-team,.ar-own-team,.is-igea,.as-igea) > .standings-zone-team {
  box-shadow:inset 4px 0 #bb8b00, inset -1px 0 #d6d5ce;
}
html body table[data-standings-key] .standings-zone-label {
  display:table;
  max-width:100%;
  width:fit-content;
  margin:6px 0 0;
  padding:3px 8px;
  border:1px solid var(--zone-solid);
  border-radius:3px;
  background:var(--zone-soft);
  color:var(--zone-ink);
  font-family:inherit;
  font-size:12px;
  font-weight:750;
  line-height:1.5;
  text-transform:none;
  letter-spacing:normal;
  text-align:left;
  white-space:normal;
  overflow-wrap:anywhere;
}
.standings-zone-legend {
  max-width:100%;
  margin:16px 0;
  padding:14px 0;
  border-bottom:1px solid #d6d5ce;
  color:#26302b;
  font-size:13px;
  line-height:1.65;
  text-align:left;
  overflow-wrap:anywhere;
}
.standings-zone-legend ul {
  display:flex;
  flex-wrap:wrap;
  gap:10px 22px;
  margin:0;
  padding:0;
  list-style:none;
}
.standings-zone-legend li { display:flex; align-items:flex-start; gap:8px; max-width:100%; }
.standings-zone-swatch { display:block; flex:0 0 12px; width:12px; height:12px; margin-top:5px; border-radius:2px; background:var(--zone-solid); }
.standings-zone-legend p { margin:10px 0 0; max-width:88ch; font-size:13px; line-height:1.65; }
.standings-zone-legend p:first-child { margin-top:0; }
.standings-zone-legend a { color:inherit; text-decoration:underline; text-underline-offset:3px; }
.standings-zone-legend a:focus-visible { outline:2px solid #8f1112; outline-offset:3px; }
/* Keep the original fallback until the shared legend has actually rendered. */
#classifica-squadre:has(.standings-zone-legend) > .standings-legend,
#classifica-squadre:has(.standings-zone-legend) > #standings-zones-note { display:none; }
@media (max-width:540px) {
  .standings-zone-legend ul { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
}
