/* BGC Statistics - uses the main site's CSS variables from ../css/style.css */
.stats-hero { background: var(--green-dark); color: var(--white); padding: 2.5rem 1.5rem 2rem; text-align: center; }
.stats-hero h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--white); }
.stats-hero p { color: var(--gold-light); margin-top: .4rem; }
.stats-subnav { background: var(--green-mid); border-bottom: 3px solid var(--gold); }
.stats-subnav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; max-width: var(--max-width); margin: 0 auto; padding: .4rem 1rem; }
.stats-subnav a { display: block; color: var(--white); padding: .45rem .9rem; border-radius: var(--radius); font-weight: 500; font-size: .95rem; }
.stats-subnav a:hover, .stats-subnav a.active { background: var(--green-dark); color: var(--gold-light); }
.stats-main { max-width: var(--max-width); margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.stats-main h2 { font-family: var(--font-display); color: var(--green-dark); margin: 2.2rem 0 .3rem; font-size: 1.55rem; }
.stats-main h2:first-child { margin-top: 0; }
.stats-note { color: var(--text-light); font-size: .9rem; margin-bottom: .8rem; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.fact { background: var(--white); border: 1px solid var(--border); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: 1.1rem; text-align: center; box-shadow: var(--shadow-sm); }
.fact .num { font-family: var(--font-display); font-size: 2.2rem; color: var(--green-dark); line-height: 1.1; }
.fact .lbl { color: var(--text-light); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.highlight { background: var(--green-light); border-left: 4px solid var(--green-mid); border-radius: var(--radius); padding: 1rem 1.2rem; }
.highlight h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); }
.highlight .big { font-family: var(--font-display); font-size: 1.35rem; color: var(--green-dark); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.stat-card { display: block; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); color: var(--text-dark); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--text-dark); }
.stat-card h3 { font-family: var(--font-display); color: var(--green-dark); font-size: 1.3rem; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
table.stats { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.stats th, table.stats td { padding: .5rem .7rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.stats th { background: var(--green-dark); color: var(--white); font-weight: 600; position: sticky; top: 0; }
table.stats td.n, table.stats th.n { text-align: right; }
table.stats tbody tr:nth-child(even) { background: var(--off-white); }
table.stats tbody tr:hover { background: var(--green-light); }
table.sortable th { cursor: pointer; user-select: none; }
table.sortable th::after { content: ' \2195'; opacity: .45; font-size: .8em; }
table.sortable th[aria-sort="ascending"]::after { content: ' \25B2'; opacity: 1; color: var(--gold); }
table.sortable th[aria-sort="descending"]::after { content: ' \25BC'; opacity: 1; color: var(--gold); }
.cdh { color: var(--text-light); font-size: .8em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.two-col h2 { margin-top: 1.2rem; }
/* Honours board */
.honours-board { background: linear-gradient(180deg, #13301f, var(--green-dark)); border: 10px solid #5a3e1b; outline: 2px solid var(--gold); outline-offset: -18px; border-radius: 6px; padding: 2.5rem 1.5rem; color: var(--gold); box-shadow: var(--shadow-lg); }
.honours-board h2 { font-family: var(--font-display); color: var(--gold); text-align: center; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 1.5rem; font-size: 1.6rem; }
.honours-row { display: grid; grid-template-columns: 7rem 1fr 1fr; gap: 1rem; padding: .9rem .5rem; border-bottom: 1px solid rgba(201,168,76,.35); font-family: var(--font-display); align-items: start; }
.honours-row:last-child { border-bottom: 0; }
.honours-row.head { font-family: var(--font-body); text-transform: uppercase; font-size: .78rem; letter-spacing: .1em; color: var(--gold-light); }
.honours-season { font-size: 1.15rem; color: var(--gold-light); }
.honours-winner { font-size: 1.3rem; color: var(--gold); }
.honours-sub { font-size: .9rem; color: var(--gold-light); opacity: .85; font-family: var(--font-body); }
.honours-pts { font-family: var(--font-body); font-size: .85rem; color: var(--gold-light); }
@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; }
  .honours-row { grid-template-columns: 1fr; gap: .3rem; }
  .honours-row.head { display: none; }
  .honours-board { padding: 2rem .8rem; border-width: 6px; outline-offset: -12px; }
  table.stats th, table.stats td { padding: .4rem .5rem; font-size: .85rem; }
}
/* Records tab bar (below the Statistics sub-nav) */
.stats-tabs { background: var(--white); border-bottom: 1px solid var(--border); }
.stats-tabs ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem; max-width: var(--max-width); margin: 0 auto; padding: .35rem 1rem; }
.stats-tabs a { display: block; padding: .35rem .8rem; border-radius: 999px; font-size: .88rem; color: var(--green-mid); font-weight: 500; }
.stats-tabs a:hover { background: var(--green-light); }
.stats-tabs a.active { background: var(--gold); color: var(--green-dark); }
.teaser { margin-bottom: 1.5rem; }
.teaser h2 a { color: var(--green-dark); }
.honours-board a { color: inherit; border-bottom: 1px dotted rgba(201,168,76,.5); }
.honours-board a:hover { color: var(--white); }
@media (max-width: 720px) { .stats-tabs ul { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; } .stats-tabs a { white-space: nowrap; } }
/* Tabs, search, details (phase 2) */
.tab-buttons { display: flex; flex-wrap: wrap; gap: .3rem; margin: .5rem 0 .8rem; }
.tab-buttons button { font: inherit; font-size: .88rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--white); color: var(--green-mid); cursor: pointer; }
.tab-buttons button.active { background: var(--gold); color: var(--green-dark); border-color: var(--gold); }
.search-box { font: inherit; padding: .5rem .8rem; border: 1px solid var(--border); border-radius: var(--radius); width: 100%; max-width: 360px; margin: .5rem 0 1rem; }
details.cardlist { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .8rem; margin-bottom: .6rem; scroll-margin-top: 80px; }
details.cardlist summary { cursor: pointer; font-weight: 600; color: var(--green-dark); }
.player-head p { margin: .2rem 0; }
.empty-note { background: var(--green-light); border-radius: var(--radius); padding: .8rem 1rem; color: var(--text-mid); }

/* Front-page section cards: linked sub-headings (2026-10-22) */
.stat-card h3 a { color: inherit; text-decoration: none; }
.stat-card h3 a:hover { text-decoration: underline; }
.card-links { list-style: none; margin: .6rem 0 0; padding: .6rem 0 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.card-links a { color: var(--green-dark); font-weight: 600; font-size: .95rem; }
.honours-row, .tabset, #pairings { scroll-margin-top: 80px; }

/* Show all / Show top N, compare page (2026-10-22) */
button.show-all { margin: .5rem 0 1rem; padding: .45rem 1rem; border: 1px solid var(--green-dark); border-radius: var(--radius); background: var(--white); color: var(--green-dark); font-weight: 600; cursor: pointer; }
button.show-all:hover { background: var(--green-dark); color: var(--white); }
button.show-all:disabled { opacity: .6; cursor: wait; }
.compare-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0 1rem; }
.compare-controls .search-box { flex: 1 1 200px; max-width: 260px; margin: 0; }
.compare-controls button.show-all { margin: 0; }
#compare-out td { vertical-align: top; }

/* league chooser */
.fact-grid.mini { grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (max-width: 520px) { .fact-grid.mini { grid-template-columns: 1fr 1fr; } }


/* Summer competition formats (2026-10-22): badge + subtle row tint, and the format filter */
.fmt-badge { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.4; white-space: nowrap; color: #fff; }
.fmt-badge.fmt-N { background: #2e6b4a; }
.fmt-badge.fmt-G { background: #6a4c93; }
.fmt-badge.fmt-S { background: #1f63b0; }
tr.fmt-row-N > td:not([style]) { background-color: #f0f7f2; }
tr.fmt-row-G > td:not([style]) { background-color: #f5f1fa; }
tr.fmt-row-S > td:not([style]) { background-color: #edf3fb; }
tr.fmt-row > td:first-child { box-shadow: inset 4px 0 0 transparent; }
tr.fmt-row-N > td:first-child { box-shadow: inset 4px 0 0 #2e6b4a; }
tr.fmt-row-G > td:first-child { box-shadow: inset 4px 0 0 #6a4c93; }
tr.fmt-row-S > td:first-child { box-shadow: inset 4px 0 0 #1f63b0; }
.fmt-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: .6rem 0 .2rem; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.fmt-filter-lbl { font-weight: 700; color: var(--green-dark); margin-right: .2rem; }
.fmt-filter button { font: inherit; font-size: .85rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--white); color: var(--green-mid); cursor: pointer; }
.fmt-filter button.active { background: var(--green-dark); color: var(--white); border-color: var(--green-dark); }
.fmt-key { margin-left: auto; display: inline-flex; gap: .3rem; }
.fmt-sw > .fmt-v { display: none; }
.fmt-sw > .fmt-v.on { display: block; }
.fmt-cap { margin: .2rem 0 .3rem; font-size: .82rem; color: #555; }
