*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: #111; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px; -webkit-font-smoothing: antialiased; max-width: 100%; }
.page { max-width: min(1280px, 100%); margin: 0 auto; padding: 24px 20px 56px; }
.page-head { margin: 0 0 20px; padding-right: 124px; }
.page-head-text { min-width: 0; }
.page-title { font-size: 26px; line-height: 32px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
.page-summary { margin: 0; color: #666; font-size: 15px; }
.page-lead { margin: 8px 0 0; }
.hist-link { color: #111; font-size: 13px; line-height: 18px; text-decoration: underline; text-underline-offset: 2px; }
.hist-link:hover { text-decoration-thickness: 2px; }
.fs-btn { position: fixed; top: 12px; right: 12px; z-index: 10000; font: inherit; font-size: 13px; line-height: 18px; color: #111; background: #fff; border: 1px solid rgba(0,0,0,0.4); border-radius: 999px; padding: 6px 14px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.16); }
.fs-btn:hover { background: #f5f5f6; }
html:fullscreen, html:-webkit-full-screen { background: #fff; overflow: auto; }
html:fullscreen .fs-btn, html:-webkit-full-screen .fs-btn { position: fixed; top: 12px; right: 12px; }

.page-body { display: flex; flex-direction: column; gap: 24px; }
.layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; width: 100%; }
.main { flex: 100 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.dd240 { width: 100%; max-width: 240px; align-self: flex-start; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title { margin: 0; font-weight: 600; letter-spacing: -0.005em; }
h2.section-title { font-size: 20px; line-height: 28px; }
h3.section-title { font-size: 16px; line-height: 24px; }
.section-actions { display: flex; gap: 8px; }
.section-caption { margin: 0; color: #666; font-size: 13px; line-height: 19px; max-width: 80ch; }
.section-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.depth1 { margin-top: 8px; }
.text { margin: 0; color: #444; font-size: 14px; line-height: 21px; max-width: 80ch; }
.pill { font: inherit; font-size: 13px; line-height: 18px; color: #111; background: rgba(0,0,0,0.055); border: 0; border-radius: 999px; padding: 3px 11px; cursor: pointer; }
.pill:hover { background: rgba(0,0,0,0.1); }
.select { display: flex; flex-direction: column; gap: 4px; }
.select-label { font-size: 12px; line-height: 16px; color: #9a9a9a; }
.select select { width: 100%; font: inherit; font-size: 14px; color: #111; background-color: #fff; border: 1px solid rgba(0,0,0,0.18); border-radius: 8px; padding: 7px 34px 7px 10px; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23666' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; align-self: flex-start; }
.props { margin: 0; display: flex; flex-direction: column; border-top: 1px solid rgba(0,0,0,0.07); }
.props-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,0.07); font-size: 14px; line-height: 20px; }
.props-row dt { color: #666; flex-shrink: 0; }
.props-row dd { margin: 0; text-align: right; }
.plink { color: #111; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; }
.plink:hover { text-decoration-thickness: 2px; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
svg { max-width: 100%; }
@media (max-width: 640px) {
  .page { padding: 16px 12px 40px; }
  .page-head { padding-right: 118px; }
  .page-title { font-size: 22px; line-height: 28px; }
  .fs-btn { top: 8px; right: 8px; font-size: 13px; }
  h2.section-title { font-size: 18px; }
  .props-row { flex-direction: column; gap: 0; }
  .props-row dd { text-align: left; }
}

.main-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.main-controls .tabs { flex: 0 0 auto; }
.main-controls .search { flex: 1 1 240px; max-width: 420px; }
@media (max-width: 640px) {
  .main-controls { gap: 8px 12px; }
  .main-controls .search { flex: 1 1 100%; max-width: 420px; }
}
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search-input { width: 100%; font: inherit; font-size: 14px; color: #111; background: #fff; border: 1px solid rgba(0,0,0,0.25); border-radius: 999px; padding: 8px 14px; }
.search-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid rgba(0,0,0,0.18); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); max-height: 360px; overflow-y: auto; }
.search-item { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 20px; }
.search-item.active { background: rgba(0,0,0,0.06); }
.search-name { color: #111; min-width: 0; overflow-wrap: anywhere; }
.search-sub { color: #777; font-size: 12px; white-space: nowrap; flex-shrink: 0; align-self: center; }
.search-empty { padding: 8px 10px; color: #777; font-size: 13px; }
.tabs { display: flex; gap: 4px; }
.tab { color: #555; text-decoration: none; font-size: 14px; line-height: 20px; padding: 6px 12px; border-radius: 999px; }
.tab:hover { background: rgba(0,0,0,0.05); }
.tab.on { color: #111; font-weight: 600; background: rgba(0,0,0,0.07); }

.season-table th, .season-table td, .leaders th, .leaders td { padding: 8px 6px !important; font-size: 13px !important; }
.season-table th, .leaders th { white-space: normal !important; line-height: 16px !important; }

.subtabs { margin: 0 0 12px; }
.leader-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 20px; margin: 0 0 16px; }
.leader-controls .dd240 { flex: 0 0 auto; }
.leader-controls .min-slider { flex: 1 1 260px; max-width: 480px; margin: 0; }
.more-row { display: flex; justify-content: center; margin: 12px 0 4px; }

.leaders h3 { text-align: center !important; }
.leaders .section-head > h3 { flex: 1 1 auto; text-align: center !important; }

.pos-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.pos-chip { font: inherit; font-size: 13px; line-height: 18px; padding: 5px 14px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.25); background: #fff; color: #333; cursor: pointer; }
.pos-chip:hover { background: rgba(0,0,0,0.05); }
.pos-chip.on { background: #111; border-color: #111; color: #fff; }

.min-slider { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 4px 0 16px; max-width: 480px; }
.min-slider label { font-size: 13px; color: #555; }
.min-slider input[type="range"] { flex: 1 1 200px; min-width: 160px; accent-color: #111; }
.min-slider .min-val { font-size: 14px; color: #111; min-width: 3.5ch; font-variant-numeric: tabular-nums; }

/* Highlight the column a table is ranked or sorted by (Billy V t221u; school tables t86u). */
.rank-col-2 th:nth-child(2), .rank-col-2 td:nth-child(2),
.rank-col-3 th:nth-child(3), .rank-col-3 td:nth-child(3),
.rank-col-4 th:nth-child(4), .rank-col-4 td:nth-child(4),
.rank-col-5 th:nth-child(5), .rank-col-5 td:nth-child(5),
.rank-col-6 th:nth-child(6), .rank-col-6 td:nth-child(6),
.rank-col-7 th:nth-child(7), .rank-col-7 td:nth-child(7),
.rank-col-8 th:nth-child(8), .rank-col-8 td:nth-child(8),
.rank-col-9 th:nth-child(9), .rank-col-9 td:nth-child(9),
.rank-col-10 th:nth-child(10), .rank-col-10 td:nth-child(10),
.rank-col-11 th:nth-child(11), .rank-col-11 td:nth-child(11),
.rank-col-12 th:nth-child(12), .rank-col-12 td:nth-child(12) {
  background: #e7f1fa !important;
}

.elo-conf-band { pointer-events: none; }
.est-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 14px; font-size: 13px; color: #555; }
.est-toggle label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: #222; }
.est-note { color: #777; }

/* Billy t166u/t167u: titles and headings are centered across the site; the footnote under History tables is italic + centered. */
.page-head { text-align: center; padding-left: 124px; }
.page-title, .page-summary { text-align: center; }
.section-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 12px; }
.section-head .section-title { grid-column: 2; text-align: center; }
.section-head .section-actions { grid-column: 3; justify-self: end; }
.footnote { font-style: italic; text-align: center; max-width: none; }
@media (max-width: 640px) {
  .page-head { padding: 34px 0 0; }
}
.subtabs { justify-content: center; }
.layout.nosb { display: block; }
.layout.nosb .main { width: 100%; max-width: 1100px; margin: 0 auto; }

/* Billy t178u: everything is centered. Content columns are centered in the page; text, captions, controls and hints are centered too. */
.main { text-align: center; }
.main .text, .main .section-caption { margin-left: auto; margin-right: auto; }
.main-controls, .leader-controls, .btnrow { justify-content: center; }
.dd240 { align-self: center; }
.select { align-items: center; }
.toggle { align-self: center; }
.props-row dt { text-align: left; }
.depth1 { align-self: stretch; }
@media (max-width: 640px) { .props-row dt, .props-row dd { text-align: center; } }

/* Billy t184u: one consistent style for every explanatory paragraph (centered, comfortable measure, muted smaller type) and centered summary rows. */
.text, .section-caption, .main .text, .main .section-caption { max-width: 66ch; margin-left: auto; margin-right: auto; text-align: center; color: #666; font-size: 13px; line-height: 20px; }
.section { gap: 10px; }
.section-body { gap: 14px; }
.section-body > .select, .section-body > .dd240 { margin-left: auto; margin-right: auto; align-items: center; }
.props-row { justify-content: center; gap: 12px; }
.props-row dt, .props-row dd { text-align: center; }
.props { max-width: 640px; margin-left: auto; margin-right: auto; width: 100%; }
