.public-landing-body .landing-rankings-nav {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

/* Keep the new entry reachable in the existing compact desktop header band. */
@media (min-width: 761px) and (max-width: 900px) {
  .public-landing-body .landing-nav > .landing-rankings-nav { display: inline-flex; }
}

.rankings-modal {
  --rankings-bg: #0e1828;
  --rankings-surface: #142135;
  --rankings-line: rgba(164, 189, 221, 0.16);
  --rankings-muted: #aab9ce;
  width: min(960px, calc(100vw - 48px));
  max-width: none;
  max-height: min(850px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--rankings-line);
  border-radius: 22px;
  background: var(--rankings-bg);
  color: #f5f8fc;
  font-family: "Poppins", sans-serif;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  color-scheme: dark;
}

.rankings-modal:not([open]),
.rankings-modal [hidden] { display: none !important; }
.rankings-modal::backdrop { background: rgba(2, 7, 16, 0.76); backdrop-filter: blur(9px); }
body.rankings-modal-open { overflow: hidden !important; }
.rankings-panel { display: flex; flex-direction: column; height: min(848px, calc(100dvh - 50px)); }
.rankings-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; padding: 10px 20px; border-bottom: 1px solid var(--rankings-line); background: radial-gradient(ellipse at 90% 0, rgba(39, 94, 159, 0.22), transparent 65%), #101c2e; }
.rankings-header h2 { margin: 0; font-family: "Space Grotesk", "Poppins", sans-serif; font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: -0.035em; }
.rankings-header h2 > span { color: #ed1c24; }
.rankings-close { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 7px; border: 1px solid var(--rankings-line); border-radius: 50%; color: #d6e2f3; background: rgba(255, 255, 255, 0.04); cursor: pointer; }
.rankings-close svg { width: 21px; height: 21px; }
.rankings-close:hover { background: rgba(237, 28, 36, 0.14); color: #fff; border-color: rgba(237, 28, 36, 0.55); }
.rankings-modal :is(button, select, a, [tabindex]):focus-visible { outline: 2px solid #7fb6ff; outline-offset: 3px; }
.rankings-filters { padding: 10px 20px; flex-shrink: 0; border-bottom: 1px solid var(--rankings-line); }
.rankings-sports { display: flex; flex-wrap: wrap; gap: 7px; min-height: 34px; }
.rankings-sports button { flex: 1; min-height: 34px; padding: 6px 14px; border: 1px solid var(--rankings-line); border-radius: 8px; font: 600 12px "Poppins", sans-serif; white-space: nowrap; background: rgba(255, 255, 255, 0.025); color: var(--rankings-muted); cursor: pointer; transition: background 120ms ease, color 120ms ease; }
.rankings-sports button:hover { background: #1c304a; color: #fff; }
.rankings-sports button[aria-pressed="true"] { border-color: #ed1c24; color: #fff; background: #d61e2b; box-shadow: 0 3px 12px rgba(214, 30, 43, 0.15); }
.rankings-category-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.rankings-category { display: block; min-width: 215px; }
.rankings-category select { width: 100%; min-height: 34px; padding: 6px 34px 6px 13px; border: 1px solid var(--rankings-line); border-radius: 8px; background: var(--rankings-surface); color: #f5f8fc; font: 500 12px "Poppins", sans-serif; cursor: pointer; }
.rankings-update { display: flex; align-items: center; gap: 7px; text-align: right; }
.rankings-update span { color: var(--rankings-muted); font-size: 10px; }
.rankings-update time { color: #e1e9f5; font-size: 12px; font-weight: 600; }
.rankings-content { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.rankings-state { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; min-height: 0; padding: 36px 26px; text-align: center; overflow: auto; }
.rankings-state-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 18px; border: 1px solid var(--rankings-line); border-radius: 17px; background: var(--rankings-surface); color: #7b9dc9; }
.rankings-state-icon svg { width: 31px; height: 31px; }
.rankings-state h3 { margin: 0 0 9px; color: #edf3fb; font: 600 20px "Space Grotesk", sans-serif; }
.rankings-state p { max-width: 410px; margin: 0; color: var(--rankings-muted); font-size: 12px; line-height: 1.8; }
.rankings-retry { margin-top: 21px; padding: 10px 22px; border: 1px solid #ed1c24; border-radius: 8px; background: #d61e2b; color: #fff; font: 600 12px "Poppins", sans-serif; cursor: pointer; }
.rankings-modal.is-loading .rankings-state-icon { animation: rankings-pulse 1.2s ease-in-out infinite; }
.rankings-table-scroll { flex: 1 1 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; min-height: 0; }
/* Keep the frame steady through loading, empty and short-table selections. */
.rankings-modal .rankings-footer[hidden] { display: flex !important; visibility: hidden; }
.rankings-footer > span { min-height: 1.5em; line-height: 1.5; }
.rankings-table-scroll:not([hidden]), .rankings-state:not([hidden]) { animation: rankings-reveal 160ms ease-out both; }
/* Fast requests should not flash a loading message between tables. */
.rankings-modal.is-loading .rankings-state { animation-delay: 180ms; }
.rankings-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; }
.rankings-table thead th { position: sticky; top: 0; z-index: 1; padding: 14px 16px; border-bottom: 1px solid var(--rankings-line); color: #9bb1ce; background: #142135; font-size: 10px; font-weight: 600; letter-spacing: 0.03em; text-align: left; }
.rankings-table td, .rankings-table tbody th { height: 54px; padding: 13px 16px; border-bottom: 1px solid rgba(164, 189, 221, 0.09); color: #c0cfe2; font-weight: 400; vertical-align: middle; }
.rankings-table tbody th { color: #edf3fb; text-align: left; font-weight: 500; overflow-wrap: anywhere; }
.rankings-table .rankings-rank { width: 76px; padding-left: 20px; font-variant-numeric: tabular-nums; }
.rankings-table .rankings-number { width: 115px; text-align: right; font-variant-numeric: tabular-nums; }
.rankings-table .rankings-number:last-child { width: 151px; padding-right: 20px; }
.rankings-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.013); }
.rankings-table tbody tr:hover { background: rgba(90, 146, 218, 0.07); }
.rankings-table .rankings-leading-row .rankings-rank { color: #fff; font-weight: 700; background: linear-gradient(90deg, rgba(237, 28, 36, 0.09), transparent); box-shadow: inset 3px 0 rgba(237, 28, 36, 0.7); }
.rankings-footer { display: flex; flex-shrink: 0; padding: 8px 20px; border-top: 1px solid var(--rankings-line); color: #8fa5c1; background: #101b2b; font-size: 10px; }
@keyframes rankings-pulse { 50% { opacity: 0.45; } }
@keyframes rankings-reveal { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 600px) {
  .rankings-modal { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 17px; }
  .rankings-panel { height: calc(100dvh - 26px); }
  .rankings-header { padding: 10px 17px; gap: 12px; }
  .rankings-header h2 { font-size: 22px; }
  .rankings-close { width: 36px; height: 36px; flex-basis: 36px; }
  .rankings-filters { padding: 10px 17px; }
  .rankings-sports { gap: 6px; }
  .rankings-sports button { flex: 1 1 calc(33.33% - 6px); min-height: 35px; padding: 7px 8px; font-size: 11px; }
  .rankings-category-row { margin-top: 8px; gap: 10px; }
  .rankings-category { min-width: 0; width: 53%; }
  .rankings-category select { font-size: 11px; padding-left: 10px; padding-right: 10px; }
  .rankings-update { display: grid; gap: 2px; }
  .rankings-update time { max-width: 140px; font-size: 10px; }
  .rankings-state { padding: 28px 20px; }
  .rankings-state h3 { font-size: 19px; }
  .rankings-table { font-size: 11px; }
  .rankings-table thead th { padding: 11px 7px; font-size: 9px; }
  .rankings-table td, .rankings-table tbody th { height: 53px; padding: 12px 7px; }
  .rankings-table .rankings-rank { width: 47px; padding-left: 17px; }
  .rankings-table .rankings-number { width: 49px; }
  .rankings-table .rankings-number:last-child { width: 91px; padding-right: 17px; }
  .rankings-footer { padding: 7px 17px; font-size: 9px; }
}

@media (max-height: 540px) {
  .rankings-header { padding-top: 8px; padding-bottom: 8px; }
  .rankings-header h2 { font-size: 22px; }
  .rankings-close { width: 32px; height: 32px; flex-basis: 32px; padding: 6px; }
  .rankings-filters { padding-top: 8px; padding-bottom: 8px; }
  .rankings-sports { min-height: 32px; }
  .rankings-sports button { min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
  .rankings-category-row { margin-top: 8px; }
  .rankings-category select { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
  .rankings-table thead th { padding-top: 9px; padding-bottom: 9px; }
  .rankings-table td, .rankings-table tbody th { height: 44px; padding-top: 9px; padding-bottom: 9px; }
  .rankings-footer { padding-top: 6px; padding-bottom: 6px; }
  .rankings-state { padding: 20px; }
  .rankings-state-icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rankings-modal.is-loading .rankings-state-icon { animation: none; }
  .rankings-table-scroll:not([hidden]), .rankings-state:not([hidden]) { animation: none; }
  .rankings-sports button { transition: none; }
}
