/* The public Hall of Champions page (/champions/) — consumes design_tokens.css and
   layers on public_pages.css's .iil-doc-page. No JavaScript: the page is static markup,
   and the one value CSS cannot derive (a bar's width, relative to the top count) arrives
   as the --iil-bar-pct custom property set in the template. */

.iil-champ-page { max-width: 860px; margin: 0 auto; }

.iil-champ-section-title {
  font-family: var(--iil-font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--iil-text);
  margin: 48px 0 16px;
}

/* ===== Band 1 — reigning champion ===== */
.iil-champ-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  border-radius: 16px;
  border: 1px solid var(--iil-accent);
  background: var(--iil-accent-wash);
}
.iil-champ-hero-trophy { width: 44px; height: 44px; color: var(--iil-accent-strong); flex: none; }
.iil-champ-hero-text { flex: 1 1 auto; min-width: 0; }
.iil-champ-hero-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--iil-accent-strong);
}
.iil-champ-hero-name {
  font-family: var(--iil-font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  color: var(--iil-text);
  margin-top: 2px;
}
.iil-champ-hero-year {
  font-family: var(--iil-font-display);
  font-weight: 600;
  color: var(--iil-text-2);
}
.iil-champ-hero-span {
  text-align: right;
  font-size: 0.85rem;
  color: var(--iil-text-mute);
  flex: none;
}
.iil-champ-hero-range {
  display: block;
  font-family: var(--iil-font-display);
  font-weight: 600;
  color: var(--iil-text-2);
}

/* ===== Band 2 — titles by club ===== */
.iil-champ-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.iil-champ-board-row {
  display: grid;
  grid-template-columns: minmax(0, 12rem) 1fr 2.5rem;
  align-items: center;
  gap: 14px;
}
.iil-champ-board-name {
  font-weight: 600;
  color: var(--iil-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iil-champ-board-name--gone { color: var(--iil-text-mute); font-weight: 500; }
.iil-champ-bar {
  display: block;
  height: 18px;
  border-radius: 999px;
  background: var(--iil-hairline);
  overflow: hidden;
}
.iil-champ-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  /* The fallback matters: a bar whose width never arrived should read as empty rather
     than as a full-width club with every title in the league. */
  width: var(--iil-bar-pct, 0%);
  background: var(--iil-accent);
}
.iil-champ-bar-fill--gone { background: var(--iil-hairline-2); }
.iil-champ-board-count {
  font-family: var(--iil-font-display);
  font-weight: 700;
  color: var(--iil-text);
  text-align: right;
}
.iil-champ-legend {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--iil-text-mute);
}

/* ===== Band 3 — year by year ===== */
.iil-champ-decade { margin-top: 28px; }
.iil-champ-decade-title {
  font-family: var(--iil-font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--iil-text-dim);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--iil-hairline);
}
.iil-champ-years { list-style: none; margin: 0; padding: 0; }
.iil-champ-year {
  display: grid;
  grid-template-columns: 3.5rem 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--iil-hairline);
}
.iil-champ-year:last-child { border-bottom: none; }
.iil-champ-year-num {
  font-family: var(--iil-font-display);
  font-weight: 700;
  color: var(--iil-text-2);
}
.iil-champ-year-logo { width: 32px; height: 32px; object-fit: contain; }
.iil-champ-year-monogram {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--iil-bg-3);
  color: var(--iil-text-mute);
  font-family: var(--iil-font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.iil-champ-year-name {
  font-weight: 600;
  color: var(--iil-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iil-champ-year-runner-up {
  font-size: 0.85rem;
  color: var(--iil-text-mute);
  text-align: right;
}

/* ===== Breakpoints ===== */
@media (max-width: 640px) {
  .iil-champ-hero { flex-wrap: wrap; gap: 14px; padding: 20px; }
  .iil-champ-hero-span { text-align: left; width: 100%; }
  /* The honours board is the thing most likely to break narrow: the name column drops
     above its own bar so neither is squeezed to nothing. */
  .iil-champ-board-row {
    grid-template-columns: 1fr 2.5rem;
    grid-template-areas:
      "name  count"
      "bar   bar";
    gap: 4px 12px;
  }
  .iil-champ-board-name { grid-area: name; white-space: normal; }
  .iil-champ-board-count { grid-area: count; }
  .iil-champ-bar { grid-area: bar; }
  .iil-champ-year {
    grid-template-columns: 3rem 28px minmax(0, 1fr);
    grid-template-areas:
      "year mono name"
      ".    .    runner";
    gap: 4px 10px;
  }
  .iil-champ-year-num { grid-area: year; }
  .iil-champ-year-logo, .iil-champ-year-monogram { grid-area: mono; width: 28px; height: 28px; }
  .iil-champ-year-name { grid-area: name; white-space: normal; }
  .iil-champ-year-runner-up { grid-area: runner; text-align: left; }
}
