/* Rankings (brackets_rankings.php) and the organizer page (brackets_org.php): the site's --bc-* tokens, so both
   follow the light and dark theme. Nothing changes size on hover. */
.rk { max-width: 1120px; margin: 0 auto; padding: 24px 16px 96px; display: grid; gap: 18px; color: var(--bc-ink, #111); font-family: var(--bc-font, inherit); box-sizing: border-box; }
.rk *, .rk *::before, .rk *::after { box-sizing: border-box; }
.rk a { color: inherit; }
.rk-head { display: grid; gap: 10px; }
.rk-kick { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bc-accent, #5b4bd1); }
.rk-kick a { color: inherit; text-decoration: none; }
.rk-head h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.05; letter-spacing: -.03em; }

.rk-search { position: relative; max-width: 420px; }
.rk-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--bc-muted, #777); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.rk-search input { width: 100%; height: 44px; padding: 0 14px 0 42px; border-radius: 12px; border: 1px solid var(--bc-line, rgba(0, 0, 0, .12)); background: var(--bc-surface, #fff); color: inherit; font: inherit; font-size: 16px; }
.rk-search input:focus { outline: 2px solid var(--bc-accent, #5b4bd1); outline-offset: 1px; }

.rk-filters { display: grid; gap: 8px; }
.rk-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rk-chips.rk-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.rk-chips.rk-scroll::-webkit-scrollbar { display: none; }
.rk-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--bc-line, rgba(0, 0, 0, .12)); background: var(--bc-surface, #fff); color: var(--bc-ink, #111) !important; font-size: 14px; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.rk-chip:hover { border-color: var(--bc-line-strong, rgba(0, 0, 0, .3)); }
.rk-chip.is-on { background: var(--bc-ink, #111); border-color: var(--bc-ink, #111); color: var(--bc-on-ink, #fff) !important; }
.rk-seg { gap: 0; }
.rk-seg .rk-chip { border-radius: 0; margin-left: -1px; }
.rk-seg .rk-chip:first-child { border-radius: 999px 0 0 999px; margin-left: 0; }
.rk-seg .rk-chip:last-child { border-radius: 0 999px 999px 0; }
.rk-seg .rk-chip:only-child { border-radius: 999px; }
.rk-belt { display: inline-block; width: 16px; height: 6px; border-radius: 2px; background: var(--b, #999); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); flex: none; }
.rk-cc { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--bc-line, rgba(0, 0, 0, .12)); background: var(--bc-surface, #fff); justify-self: start; max-width: 100%; }
.rk-cc span { font-size: 16px; line-height: 1; display: inline-flex; }
.rk-cc svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.rk-cc select { appearance: none; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; padding-right: 4px; max-width: 220px; }

.rk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.rk-grid.is-one { grid-template-columns: minmax(0, 760px); }
.rk-card { background: var(--bc-surface, #fff); border: 1px solid var(--bc-line, rgba(0, 0, 0, .08)); border-radius: 18px; padding: 16px; min-width: 0; }
.rk-ch { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.rk-ch h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.rk-ch h2 small { flex-basis: 100%; font-size: 13px; font-weight: 500; color: var(--bc-muted, #777); letter-spacing: 0; }
.rk-ch .rk-belt { width: 22px; height: 8px; }
.rk-more { flex: none; font-size: 14px; font-weight: 600; text-decoration: none !important; color: var(--bc-accent, #5b4bd1) !important; padding-top: 2px; }
.rk-empty { margin: 8px 0 4px; color: var(--bc-muted, #777); }

.rk-list { list-style: none; margin: 0; padding: 0; display: grid; }
.rk-row { display: grid; grid-template-columns: 30px 36px minmax(0, 1fr) auto 52px; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--bc-line, rgba(0, 0, 0, .06)); }
.rk-row:first-child { border-top: 0; }
.rk-pos { font-weight: 800; font-size: 16px; text-align: center; font-variant-numeric: tabular-nums; color: var(--bc-muted, #777); }
.rk-row.p1 .rk-pos { color: #c99a06; }
.rk-row.p2 .rk-pos { color: #8f99a6; }
.rk-row.p3 .rk-pos { color: #b0703a; }
.rk-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: rgba(127, 127, 127, .13); color: var(--bc-muted, #666); font: 800 12px var(--mono, ui-monospace, monospace); }
/* Academies: the avatar of the academy standings (bk-trophy.css .tro-logo) */
.rk-row .tro-logo { background: rgba(127, 127, 127, .13); color: var(--bc-muted, #666); }
/* bk-trophy.css names grid areas for its own phone layout; a ranking row keeps its plain columns */
.rk-row .tro-logo, .rk-row .tro-md { grid-area: auto; }
.rk-who { display: grid; min-width: 0; }
.rk-name { font-weight: 700; font-size: 15px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; line-height: 1.25; text-decoration: none !important; color: var(--bc-ink, #111) !important; }
a.rk-name:hover { text-decoration: underline !important; }
.rk-who small { font-size: 13px; color: var(--bc-muted, #777); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-who small a { text-decoration: none; color: inherit !important; }
/* The medals: the discs of the academy standings (bk-trophy.css .tro-md) */
.rk-med i { font-variant-numeric: tabular-nums; }
.rk-pts { display: grid; justify-items: end; line-height: 1.1; }
.rk-pts b { font-size: 17px; font-variant-numeric: tabular-nums; }
.rk-pts small { font-size: 11px; color: var(--bc-muted, #777); }
.rk-all { display: flex; justify-content: center; align-items: center; height: 40px; margin-top: 8px; border-radius: 12px; background: rgba(127, 127, 127, .13); font-weight: 700; font-size: 14px; text-decoration: none !important; color: var(--bc-ink, #111) !important; }

.rk-people { list-style: none; margin: 0; padding: 0; display: grid; }
.rk-people li { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--bc-line, rgba(0, 0, 0, .06)); }
.rk-people li:first-child { border-top: 0; }
.rk-spots { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-spot { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(127, 127, 127, .13); font-size: 13px; text-decoration: none !important; color: var(--bc-ink, #111) !important; }
.rk-spot b { font-variant-numeric: tabular-nums; }
.rk-foot { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--bc-muted, #777); }
.rk-wts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.rk-wt { font-style: normal; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(127, 127, 127, .13); white-space: nowrap; }

@media (max-width: 820px) {
	.rk-grid, .rk-grid.is-one { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
	.rk { padding-top: 16px; }
	.rk-card { padding: 12px 12px; border-radius: 16px; }
	.rk-row { grid-template-columns: 24px 32px minmax(0, 1fr) auto 44px; gap: 8px; }
	.rk-av, .rk-row .tro-logo { width: 32px; height: 32px; }
	.rk-med i { width: 18px; height: 18px; font-size: 10px; }
	.rk-seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}

/* ------------------------------------------------------------------ the organizer page */
.og-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.og-logo { width: 84px; height: 84px; border-radius: 20px; object-fit: cover; background: rgba(127, 127, 127, .13); display: grid; place-items: center; font-size: 34px; font-weight: 800; color: var(--bc-muted, #666); border: 1px solid var(--bc-line, rgba(0, 0, 0, .08)); }
.og-head h1 { margin: 2px 0 4px; font-size: clamp(26px, 4.5vw, 40px); line-height: 1.08; letter-spacing: -.03em; }
.og-where { margin: 0; color: var(--bc-muted, #777); font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.og-where a { color: var(--bc-accent, #5b4bd1) !important; text-decoration: none; font-weight: 600; }
.og-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.og-stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--bc-surface, #fff); border: 1px solid var(--bc-line, rgba(0, 0, 0, .08)); font-size: 13px; color: var(--bc-muted, #777); text-decoration: none !important; }
.og-stat b { font-size: 18px; color: var(--bc-ink, #111); font-variant-numeric: tabular-nums; }
a.og-stat:hover { border-color: var(--bc-line-strong, rgba(0, 0, 0, .3)); }
.og-h2 { margin: 10px 0 0; font-size: 20px; letter-spacing: -.01em; }
.og-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.og-card { display: grid; grid-template-rows: auto 1fr; border-radius: 16px; overflow: hidden; background: var(--bc-surface, #fff); border: 1px solid var(--bc-line, rgba(0, 0, 0, .08)); text-decoration: none !important; color: var(--bc-ink, #111) !important; }
.og-card:hover { border-color: var(--bc-line-strong, rgba(0, 0, 0, .3)); }
.og-cover { aspect-ratio: 16 / 8; background: rgba(127, 127, 127, .13) center / cover no-repeat; position: relative; }
.og-cover .og-state { position: absolute; left: 10px; top: 10px; }
.og-body { padding: 12px 14px 14px; display: grid; gap: 4px; align-content: start; }
.og-date { font-size: 13px; font-weight: 700; color: var(--bc-accent, #5b4bd1); text-transform: uppercase; letter-spacing: .04em; }
.og-body b { font-size: 17px; line-height: 1.25; }
.og-body small { color: var(--bc-muted, #777); font-size: 13px; }
.og-state { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, .6); color: #fff; backdrop-filter: blur(6px); }
.og-state i { width: 7px; height: 7px; border-radius: 50%; background: #9aa0ab; }
.og-state.is-open i { background: #35d07f; }
.og-state.is-live i { background: #ff5a4e; }
.og-past { list-style: none; margin: 0; padding: 0; display: grid; background: var(--bc-surface, #fff); border: 1px solid var(--bc-line, rgba(0, 0, 0, .08)); border-radius: 16px; overflow: hidden; }
.og-past li { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--bc-line, rgba(0, 0, 0, .06)); }
.og-past li:first-child { border-top: 0; }
.og-past .og-d { display: grid; justify-items: center; line-height: 1.05; }
.og-past .og-d b { font-size: 20px; font-variant-numeric: tabular-nums; }
.og-past .og-d small { white-space: nowrap; font-size: 11px; text-transform: uppercase; color: var(--bc-muted, #777); font-weight: 700; }
.og-past .og-n { display: grid; min-width: 0; }
.og-past .og-n b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.og-past .og-n small { color: var(--bc-muted, #777); font-size: 13px; }
.og-past .og-res { font-size: 14px; font-weight: 700; text-decoration: none !important; color: var(--bc-accent, #5b4bd1) !important; white-space: nowrap; }
@media (max-width: 420px) {
	.og-logo { width: 64px; height: 64px; border-radius: 16px; font-size: 26px; }
	.og-cards { grid-template-columns: minmax(0, 1fr); }
	.og-past li { grid-template-columns: 60px minmax(0, 1fr) auto; padding: 10px 12px; gap: 10px; }
}
