/* Brawlhalla / Arenyze — shared presentation system.
   Loaded after the component and responsive styles on every full page.
   Same system as the THE FINALS tracker, tuned to this palette: the accent is
   warm, so the tinted surfaces are warm too and the popovers stay neutral. */
:root {
  color-scheme: dark;
  --background-color: #0c0c0f;
  --surface-color: #141418;
  --surface-2: #1c1c22;
  --surface-3: #26262e;
  --text-secondary: #b0aea9;
  --text-muted: #85838d;
  --line: #26262d;
  --line-strong: #3b3b45;
  --maxw: 1280px;
  --nav-height: 72px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --shadow-card: 0 8px 24px -18px #000a;
  --popover-bg: #191920;
  --option-hover: #2a2a33;
  --option-selected: #3a2c12;
  --option-ink: #f0efec;
  --option-selected-ink: #ffc46b;
  --z-content: 0;
  --z-floating: 100;
  --z-header: 1000;
  --z-dialog: 1200;
  --z-sheet: 1300;
}
html { scroll-padding-top: calc(var(--nav-height) + 24px); }
body { background-image: radial-gradient(ellipse at 80% 0, #4a2f0733, transparent 650px); }
body > main { animation: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 4px; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -.025em; }
.container { padding-inline: 32px; }
.section { padding-block: 36px; }
.section:first-of-type { padding-top: 40px; }
.grid { gap: 18px; }
.grid > *, .section-head > *, .panel, .chart-card { min-width: 0; }
.section-head { margin-bottom: 20px; }
.section-head:not(:first-child) { margin-top: 40px; }
.section-head > div > p { margin-top: 6px; }
.eyebrow, .widgets-eyebrow { font-size: .69rem; letter-spacing: .14em; }

/* Every page opens with a title and a standfirst; give that pair one shape
   instead of leaving each template to space it by hand. */
main.container > h1:first-of-type { margin-bottom: 0; font-style: normal; font-weight: 700; letter-spacing: -.045em; }
main.container > h1:first-of-type + p.muted {
  margin: 12px 0 0; max-width: 740px; line-height: 1.7; font-size: .95rem;
  padding-bottom: 28px; border-bottom: 1px solid var(--line);
}
.page-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--primary-light); font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.page-kicker .material-icons { font-size: 16px; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 3000; padding: 12px 18px; border-radius: 8px; background: var(--primary-color); color: var(--primary-ink); font-weight: 600; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); color: var(--primary-ink); }
.icons-loading .material-icons { display: inline-block; width: 1em; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Navigation: one aligned row; drawers never participate in page width, and a
   closed drawer is not reachable by keyboard either. */
/* The navbar is injected by script, so the empty <header> must already occupy
   its final height: without this the first paint puts the page 72px too high
   and everything jumps down the moment the chrome lands. */
.site-header { min-height: calc(var(--nav-height) + 1px); z-index: var(--z-header); border-color: #ffffff0e; transition: border-color .2s, box-shadow .2s; }
.site-header::before { background: #0c0c0fed; backdrop-filter: blur(18px); }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 24px #0004; }
.modern-navbar-container { padding-inline: 32px; gap: 28px; }
.modern-brand { gap: 10px; }
.modern-brand-logo { width: 32px; height: 32px; }
.brand-lockup { display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }
.brand-caption { font-size: .56rem; letter-spacing: .23em; color: var(--text-muted); font-weight: 500; }
/* style.css takes the menu out of the flow and pins it to the container's
   midpoint on purpose: that is the only centring that survives the brand, the
   account control or a web font changing width. Overriding it back into the
   flex flow made the whole row slide every time one of those settled. */
.modern-nav-menu { gap: 2px; }
.modern-nav-link { height: 40px; padding: 0 11px; font-size: .86rem; font-weight: 500; border-radius: 8px; }
button.modern-nav-link { border: 0; background: none; font-family: inherit; cursor: pointer; }
.modern-nav-link.active { color: var(--primary-light); background: var(--primary-soft); }
.modern-nav-link.active::after { content: ''; width: 4px; height: 4px; background: currentColor; border-radius: 50%; margin-left: 2px; }
.nav-search { display: inline-flex; align-items: center; justify-content: center; height: 38px; width: 38px; border: 1px solid var(--line); color: var(--text-secondary); border-radius: 9px; }
.nav-search:hover { color: var(--primary-light); background: var(--surface-2); }
.nav-search .material-icons { font-size: 20px; }
.modern-dropdown-content { padding: 10px; width: 280px; border-radius: 14px; max-height: calc(100dvh - var(--nav-height) - 28px); overflow-y: auto; background: var(--popover-bg); }
.modern-dropdown.is-open .modern-dropdown-content { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.modern-dropdown:not(.is-open) .modern-dropdown-content { opacity: 0; visibility: hidden; pointer-events: none; }
.modern-dropdown-item { min-height: 40px; color: var(--option-ink); }
.modern-dropdown-category { font-size: .62rem; letter-spacing: .15em; color: var(--text-muted); }
.modern-mobile-toggle { width: 42px; height: 42px; }
.modern-mobile-menu {
  visibility: hidden;
  /* visibility flips only after the drawer has slid out, so the panel stays
     painted for the whole close animation. */
  transition: transform .3s var(--ease-out), visibility 0s linear .3s;
  width: min(360px, 100vw); z-index: 1002; padding: 16px 16px 40px;
}
/* ...and instantly on open, or the drawer is still `hidden` on the frame it is
   asked to take focus, and the focus falls back to the body. */
.modern-mobile-menu.open { visibility: visible; transition: transform .3s var(--ease-out), visibility 0s; }
.mobile-menu-head { align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: 12px; padding-bottom: 14px; }
.mobile-menu-head > span { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.nav-backdrop { position: fixed; inset: var(--nav-height) 0 0; z-index: 1001; background: #0009; border: 0; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.nav-backdrop.is-open { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }
.modern-mobile-link { min-height: 46px; }
.modern-mobile-link.active { background: var(--primary-soft); color: var(--primary-light); }
.site-header .arzb-signin { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--line-strong); height: 38px; font-size: .82rem; white-space: nowrap; }
.site-header .arzb-signin:hover { background: var(--surface-3); color: #fff; }

/* Shared controls and surfaces. */
.btn { min-height: 44px; border-radius: 9px; font-size: .88rem; transition: background .18s, border-color .18s, color .18s, transform .18s var(--ease-out), box-shadow .18s; }
.btn-sm { min-height: 36px; font-size: .8rem; }
.btn-primary { font-weight: 700; box-shadow: inset 0 1px #ffffff30; }
.btn-primary:hover { box-shadow: 0 4px 18px #f5a62330; }
.btn-ghost { background: #ffffff02; }
.btn:disabled { opacity: .42; transform: none; box-shadow: none; }
input, textarea, .input { min-height: 44px; }
label { font-size: .72rem; letter-spacing: .06em; }

/* Native selects are replaced by a skin (see BH.enhanceSelects) so their menu
   can be opaque, keyboard-driven and painted in the browser's top layer. */
.sel { position: relative; width: 100%; }
/* The real control stays in the DOM for form semantics, but it must not paint
   or take focus: the button is the visible control from here on. */
.sel > select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.sel-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 40px; padding: 0 10px 0 13px; border-radius: var(--radius);
  background: var(--surface-color); border: 1px solid var(--line-strong); color: var(--text-primary);
  font-family: inherit; font-size: .92rem; font-weight: 600; text-align: left;
  cursor: pointer; transition: border-color .16s, background .16s;
}
.sel.is-open .sel-btn { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-soft); }
.sel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-caret { font-size: 20px !important; color: var(--text-muted); flex-shrink: 0; transition: transform .2s; }
.sel.is-open .sel-caret { transform: rotate(180deg); color: var(--primary-color); }
.sel.is-disabled { opacity: .45; }
.sel.is-disabled .sel-btn { cursor: default; }
.sel-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%; z-index: var(--z-floating);
  padding: 5px; border-radius: 12px; max-height: 320px; overflow-y: auto;
  background: var(--surface-color); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
}
.sel-menu[hidden] { display: none; }
.sel-menu::-webkit-scrollbar { width: 8px; }
.sel-menu::-webkit-scrollbar-thumb { background: #3b3b45; border-radius: 4px; }
.sel-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: .9rem; font-weight: 600; color: var(--text-secondary);
}
.sel-tick { font-size: 17px !important; flex-shrink: 0; opacity: 0; }
.sel-opt.is-sel .sel-tick { opacity: 1; }
.sel > .sel-btn { min-height: 44px; background: var(--input-bg); color: var(--option-ink); font-weight: 500; display: flex; align-items: center; }
.sel > .sel-btn:hover { background: #1f1f26; color: #fff; border-color: #4c4c58; }
.sel.is-open > .sel-btn { background: #241d10; color: var(--option-selected-ink); border-color: var(--primary-color); }
.sel.is-disabled > .sel-btn { background: var(--input-bg); color: var(--text-muted); }
.sel-menu { padding: 7px; background: var(--popover-bg); color: var(--option-ink); border-color: #3d3d47; box-shadow: 0 16px 40px #000a; }
.sel-opt { min-height: 42px; font-weight: 500; color: var(--option-ink); background: transparent; line-height: 1.4; }
.sel-opt > span:first-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.sel-opt.is-active, .sel-opt:hover:not(.is-off) { background: var(--option-hover); color: #fff; }
.sel-opt.is-sel { background: var(--option-selected); color: var(--option-selected-ink); }
.sel-opt.is-sel.is-active, .sel-opt.is-sel:hover { background: #4a3715; color: #ffd08f; }
.sel-opt.is-off, .sel-opt.is-off:hover { opacity: 1; color: #7d7b85; background: transparent; cursor: not-allowed; }
.sel-tick { color: currentColor; }
.sel-menu[popover], .search-results[popover] { margin: 0; }
.sel-menu.bh-floating, .search-results.bh-floating {
  position: fixed; inset: auto; min-width: 0; max-width: calc(100vw - 24px);
  box-sizing: border-box; margin: 0; overflow-y: auto; overscroll-behavior: contain;
  z-index: var(--z-floating); transform: none; translate: none; animation: none;
}
.sel-menu.bh-floating::backdrop, .search-results.bh-floating::backdrop { background: transparent; pointer-events: none; }
/* The filter selects here are narrow, and a menu the width of a 110px button
   breaks "All years" over two lines. The floating placement measures the panel
   after this applies, so the edge clamp still holds. */
.sel-menu.bh-floating { min-width: min(184px, calc(100vw - 24px)); }
.search-results { background: var(--popover-bg); border-color: #3d3d47; }
.search-item { min-height: 58px; align-items: center; padding-inline: 12px; }
.search-item .s-name { color: var(--option-ink); line-height: 1.4; }
.search-item .s-sub { margin-top: 3px; line-height: 1.4; color: #a9a7a2; }
.search-item.active, .search-item:hover { background: var(--option-hover); }
.search-item.active .s-name { color: #fff; }
.site-header .arzb-pop { background: var(--popover-bg); border-color: #3d3d47; }
.site-header .arzb-item { color: var(--option-ink); }
.site-header .arzb-item:hover, .modern-dropdown-item:hover { color: #fff; background: var(--option-hover); }
.site-header .arzb-item.danger { color: var(--error-color); }
.panel, .card, .stat-card, .chart-card, .table-wrap, .wcard { box-shadow: var(--shadow-card); }
.panel, .card { padding: 26px; }
.panel:hover, .card:hover { border-color: var(--line); }
a.panel:hover, a.card:hover { border-color: var(--line-strong); }
.stat-card { padding: 22px; border-radius: 12px; background: linear-gradient(145deg, #ffffff02, transparent), var(--surface-color); }
.stat-card .value, .hstat-value { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -.045em; }
.stat-card .label, .stat-label, .hstat-label { font-size: .67rem; letter-spacing: .1em; line-height: 1.6; }
.tabs { gap: 4px; padding: 5px; border-radius: 10px; }
.tab { min-height: 38px; border-radius: 7px; }
.tab.active, .tab.active:hover { background: var(--primary-soft); color: var(--primary-light); box-shadow: inset 0 0 0 1px #f5a62340; }
.badge, .pill { border-radius: 6px; }
.chips { gap: 8px; }
.seg-toggle { padding: 4px; border-radius: 10px; gap: 3px; }
.seg-btn { min-height: 38px; border-radius: 7px; font-weight: 600; }
.seg-btn.active, .seg-btn[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary-light); box-shadow: inset 0 0 0 1px #f5a62340; }
.filter-bar { gap: 18px; padding: 20px; background: var(--surface-color); border: 1px solid var(--line); border-radius: 12px; }
.filter-field { gap: 8px; min-width: 0; }
.filter-label { display: block; margin-bottom: 2px; }

/* Data tables remain readable and independently scrollable on small screens. */
.table-wrap { border-radius: 12px; }
th, td { padding: 16px 20px; }
th { background: #101014; font-size: .64rem; padding-block: 15px; color: #97959f; }
td { font-size: .88rem; border-bottom-color: #26262d99; }
tbody tr:hover { background: #1e1e25; }
td a:not(.badge):not(.pill) { color: var(--text-primary); font-weight: 500; }
td a:hover { color: var(--primary-light) !important; }
tbody tr:focus-visible { outline-offset: -2px; background: var(--surface-2); }
.rank-cell { color: var(--text-muted); font-size: .8rem; }
.table-wrap > .empty-state { border: 0; }
.table-wrap > .panel { border: 0; border-radius: 0; }
.pager, #lbPager { gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.pg-info, .pager-info { padding-inline: 10px; font-size: .8rem; }
.pg-btn, .pager .btn { min-width: 36px; min-height: 38px; }
.empty-state, .error-state { padding: 64px 24px; background: linear-gradient(160deg, #1c1c2266, transparent), var(--surface-color); }
.empty-state .icon.material-icons, .error-state .icon.material-icons { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 20px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; font-size: 28px; color: var(--primary-light); }
.empty-state h3, .error-state h3 { font-size: 1.2rem; margin-bottom: 10px; }
.empty-state p, .error-state p { line-height: 1.7; }
.notice { border-radius: 10px; line-height: 1.65; }
.skel-line { height: 14px; margin-block: 16px; }
.skel-line:nth-child(3n) { width: 72%; }
.skel-line:nth-child(3n + 2) { width: 88%; }
.skeleton::after { animation-duration: 1.8s; }

/* Home: a search-first introduction, then the routes into the tracker. This
   hero stays centred — there is no companion card to balance it against. */
.hero { padding-block: 70px 8px; }
.hero .tagline {
  background: none; border: 0; padding: 0; font-size: .67rem; color: var(--primary-light);
  letter-spacing: .16em; margin-bottom: 24px; display: inline-flex; align-items: center; gap: 7px;
}
.hero .tagline .material-icons { font-size: 15px; }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1.04; letter-spacing: -.055em; font-weight: 700; font-style: normal; }
.hero h1 mark { color: var(--primary-light); }
.hero .lead { margin: 22px auto 30px; max-width: 620px; font-size: 1rem; line-height: 1.75; }
.hero .search-wrap { max-width: 660px; margin-inline: auto; }
.search-form { min-height: 66px; border-radius: 12px; box-shadow: 0 8px 28px #0004; background: var(--surface-color); padding: 8px 8px 8px 18px; }
.search-form input { font-size: .95rem; }
.hs-go { border-radius: 8px; min-height: 48px; }
.hero-hint { display: block; font-size: .78rem; line-height: 1.7; margin-top: 15px; }
.hero-shortcuts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; margin-top: 26px; }
.hero-shortcuts a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: .8rem; }
.hero-shortcuts a:hover { color: var(--primary-light); }
.hero-shortcuts .material-icons { font-size: 16px; }

/* The three site-wide counters. Equal thirds, and every cell centres its own
   content, so the numbers share one vertical axis each and the dividers fall
   at even intervals across the row. */
.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 44px auto 0;
  background: #121216; border: 1px solid var(--line); border-radius: 12px;
}
.hs-cell { position: relative; display: flex; flex-direction: column; padding: 22px 28px; text-align: center; min-width: 0; }
/* The divider stops short of the card's top and bottom edges, so it reads as a
   separator between cells rather than as a second border. */
.hs-cell + .hs-cell::before { content: ''; position: absolute; left: 0; top: 16%; bottom: 16%; width: 1px; background: var(--line); }
.hs-top { display: flex; align-items: center; justify-content: center; gap: 8px; }
.hs-top .eyebrow { font-size: .63rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.hs-live { width: 7px; height: 7px; border-radius: 50%; background: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-glow); animation: hsPulse 2.4s ease-in-out infinite; }
@keyframes hsPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.hs-v { flex: 1; display: grid; place-items: center; margin-top: 16px; }
.hs-n { font-size: 2.2rem; font-weight: 600; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
/* margin-top:auto — the feet sit on the card's baseline, not under whatever
   their own cell happens to hold. */
.hs-foot { margin-top: auto; padding-top: 12px; font-size: .7rem; color: var(--text-muted); }

.home-features { padding-top: 36px; }
.feature-grid { gap: 14px; }
.feature, a.feature { display: flex; flex-direction: column; align-items: flex-start; position: relative; color: var(--text-primary); padding: 24px; transition: transform .25s var(--ease-out), border-color .2s, background .2s; }
.feature .fi { width: 38px; height: 38px; display: grid; place-items: center; background: #2b2313; color: var(--primary-light); border: 1px solid #453718; border-radius: 10px; margin-bottom: 22px; }
.feature h3 { font-size: 1.03rem; margin-bottom: 10px; }
.feature p { font-size: .85rem; line-height: 1.7; }
.feature-arrow { position: absolute; top: 25px; right: 24px; color: var(--text-muted); font-size: 19px; transition: transform .2s, color .2s; }
a.feature:hover .feature-arrow { transform: translate(2px, -2px); color: var(--primary-light); }
.home-closing { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px; background: linear-gradient(100deg, #3a2a0e70, transparent), var(--surface-color); }
.home-closing p { color: var(--text-secondary); font-size: .88rem; margin-top: 8px; }

/* Leaderboards and events. */
#lbTabs { margin-block: 24px 20px; }
#lbNotice .notice { margin-bottom: 16px; }
#lbPager { margin-top: 18px; }
.lb-updated { font-size: .75rem; color: var(--text-muted); }
.ev-row td { vertical-align: middle; }
.ev-name { font-weight: 600; }
.ev-official { color: var(--primary-light); }

/* Profile and comparison: identity above metrics, data below controls. */
/* The hero reads top to bottom in three bands: who, the headline numbers, then
   the tabs. Each band gets the full width rather than competing for one row. */
.stats-page .player-hero-card { padding: 0; overflow: hidden; }
.stats-page .player-hero-top { align-items: flex-start; gap: 18px; padding: 26px 26px 22px; }
.stats-page .player-profile { align-items: center; gap: 20px; }
.stats-page .player-avatar-wrap .player-avatar { width: 78px; height: 78px; border-radius: 20px; font-size: 2rem; }
.stats-page .player-username { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; font-style: normal; letter-spacing: -.04em; overflow-wrap: anywhere; }
.stats-page .player-name-row { gap: 12px; align-items: center; flex-wrap: wrap; }
.stats-page .player-sub {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px;
  margin: 9px 0 0; font-size: .85rem; color: var(--text-secondary);
}
.stats-page .player-sub-pr { display: inline-flex; align-items: center; gap: 7px; }
.stats-page .player-sub-pr .material-icons { font-size: 17px; color: var(--primary-light); }
.stats-page .player-sub-pr strong { color: var(--primary-light); font-weight: 700; }
.stats-page .hero-updated { font-size: .74rem; color: var(--text-muted); }
.stats-page .hero-action { flex: none; margin-left: auto; }
/* The metric band spans the card and divides evenly, so the four figures line
   up on one baseline instead of sitting in a shrink-to-fit row. */
.stats-page .player-headline-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid var(--line); background: #101014;
}
.stats-page .hstat {
  display: flex; flex-direction: column; gap: 7px; min-width: 0;
  padding: 18px 26px; background: none; border: 0; border-radius: 0;
}
.stats-page .hstat + .hstat { border-left: 1px solid var(--line); }
.stats-page .hstat-label { color: var(--text-muted); }
.stats-page .hstat-value { font-size: 1.55rem; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
/* Tabs are navigation, not part of the identity card. */
.stats-page .player-tabs { margin-top: 16px; }
.stats-page .main-tabs { flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 10px; background: var(--surface-color); border: 1px solid var(--line); }
.stats-page .main-tab { min-height: 40px; border-radius: 7px; }
.stats-page .main-tab.is-placeholder { opacity: .45; pointer-events: none; }
.stats-page .stats-shell { display: grid; gap: 20px; }
.stats-page .stats-sidebar .card-content { padding: 22px; }

@media (max-width: 760px) {
  .stats-page .player-hero-top { padding: 20px 20px 18px; gap: 14px; flex-wrap: wrap; }
  .stats-page .player-profile { gap: 14px; }
  .stats-page .player-avatar-wrap .player-avatar { width: 60px; height: 60px; border-radius: 16px; font-size: 1.5rem; }
  .stats-page .hero-action { margin-left: 0; }
  /* Two by two: four columns on a phone leaves each figure about 80px wide. */
  .stats-page .player-headline-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-page .hstat { padding: 15px 18px; }
  .stats-page .hstat:nth-child(odd) { border-left: 0; }
  .stats-page .hstat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats-page .hstat-value { font-size: 1.3rem; }
}
.stats-shell { gap: 20px; }
.stats-page { gap: 20px; }
.wcard { border-radius: 14px; }
.mb-item { border-radius: 10px; padding: 14px 12px; background: var(--surface-color); border: 1px solid var(--line); }
.mb-item .mb-l { color: var(--text-muted); }
.medal { font-variant-numeric: tabular-nums; }
.sb-row { gap: 12px; align-items: center; }
.sb-label { font-size: .82rem; color: var(--text-secondary); }
.sb-track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.sb-fill { border-radius: 999px; background: linear-gradient(90deg, var(--primary-dark), var(--primary-light)); }
.sb-val { font-variant-numeric: tabular-nums; font-weight: 700; }
.chartv { border-radius: 14px; }
.chartv-tip { background: var(--popover-bg); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-lg); }
.chartv-legend { gap: 14px; }
#cmpForm { align-items: end; gap: 18px; }
#cmpForm label { display: block; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
#cmpResult table td { text-align: center; vertical-align: middle; }
#cmpResult table th { text-align: center; white-space: normal; }

/* Widget studio. */
.widgets-hero { padding-block: 34px 26px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.widgets-hero h1 { font-style: normal; }
.widgets-hero p { margin-top: 10px; line-height: 1.7; color: var(--text-secondary); }
.widget-builder-panel, .widget-output { border-radius: 14px; }
.wb-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.widget-field { display: block; margin-bottom: 16px; }
.widget-type-list > div { border-radius: 10px; padding: 14px; background: var(--surface-color); border: 1px solid var(--line); }
.widget-empty-state { padding: 60px 24px; }

/* Informational pages and footer. */
.cmp-table { min-width: 640px; }
.prose .table-wrap, main.container .table-wrap { max-width: 100%; }
/* A single-column grid sizes its track to the widest item's min-content, so one
   unbreakable row — an icon sitting beside a heading — drags the whole column
   past the screen edge. A 0 minimum lets the content wrap inside it instead. */
.steps { grid-template-columns: minmax(0, 1fr); }
.step, .step > .body, .step h3 { min-width: 0; }
.step h3 { flex-wrap: wrap; }
.url-callout { max-width: 100%; overflow-wrap: anywhere; }
.prose { max-width: 920px; }
.prose h1 { font-style: normal; margin-bottom: 0; }
.prose h2 { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 1.2rem; }
.prose p, .prose li { line-height: 1.85; font-size: .96rem; }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose li { padding-left: 6px; margin-block: 14px; }
.prose li::marker { color: var(--primary-color); }
.prose .notice { margin-top: 30px; }
.not-found { max-width: 680px; margin: 40px auto; padding-block: 60px; text-align: center; }
.error-number { display: block; font-size: clamp(5rem, 16vw, 9rem); font-weight: 700; line-height: 1; letter-spacing: -.08em; color: var(--primary-light); margin-bottom: 24px; }
.not-found h1 { font-size: 2rem; margin-bottom: 16px; font-style: normal; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.site-footer { margin-top: 72px; background: #0f0f12; }
.footer-top { grid-template-columns: 2fr 1fr 1fr; padding: 48px 32px 40px; gap: 64px; }
.footer-brand p { max-width: 340px; font-size: .85rem; line-height: 1.8; }
.footer-col h4 { color: var(--text-muted); font-size: .63rem; letter-spacing: .15em; margin-bottom: 16px; }
.footer-col a { font-size: .83rem; font-weight: 400; padding-block: 6px; }
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom > div { padding: 20px 32px; font-size: .73rem; }

/* Motion is confined to interaction and a single short entrance. Content is
   always visible, including without JavaScript or IntersectionObserver. */
@keyframes menuIn { from { opacity: 0; translate: 0 5px; } to { opacity: 1; translate: 0 0; } }
@keyframes settleIn { from { opacity: .55; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
.is-revealed { animation: settleIn .5s var(--ease-out); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  a.feature:hover, a.wcard:hover { transform: translateY(-3px); border-color: #4a4a55; }
}

@media (max-width: 1100px) {
  .container, .modern-navbar-container { padding-inline: 24px; }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-inline: 24px; }
  .footer-bottom > div { padding-inline: 24px; }
  .hero-stats { max-width: none; }
}

@media (max-width: 760px) {
  .container, .modern-navbar-container { padding-inline: 20px; }
  .section { padding-block: 28px; }
  .hero { padding-block: 44px 4px; }
  .hero h1 { font-size: clamp(2rem, 8.5vw, 2.6rem); }
  .hero .lead { font-size: .94rem; margin-block: 18px 24px; }
  .search-form { min-height: 60px; padding: 6px 6px 6px 14px; gap: 8px; }
  .search-form input { font-size: 16px; }
  .hero-shortcuts { margin-top: 20px; gap: 12px 18px; }
  .hero-stats { margin-top: 28px; grid-template-columns: 1fr 1fr; }
  .hs-cell { padding: 20px; }
  .hs-cell:first-child { grid-column: 1 / -1; }
  .hs-cell:first-child::after { content: ''; position: absolute; left: 20px; right: 20px; bottom: 0; height: 1px; background: var(--line); }
  .hs-cell:nth-child(2)::before { display: none; }
  .hs-n { font-size: clamp(1.3rem, 5vw, 1.85rem); }
  .hs-top .eyebrow { font-size: .58rem; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { padding: 20px; }
  .feature h3 { font-size: .96rem; }
  .feature p { font-size: .79rem; }
  .panel, .card { padding: 20px; }
  .stat-card { padding: 17px; }
  .filter-bar { padding: 16px; gap: 14px; }
  .filter-field { flex: 1 1 100%; min-width: 0; }
  .filter-field .input, .filter-field .sel { max-width: none !important; width: 100%; }
  .table-wrap { max-width: 100%; }
  th, td { padding: 14px 16px; }
  .home-closing { flex-direction: column; align-items: flex-start; padding: 24px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 24px; padding: 36px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 420px; }
  .footer-bottom > div { padding: 18px 20px; flex-direction: column; gap: 8px; }
  .site-footer { margin-top: 44px; }
}

/* 641-760px only. Below that the phone rules take the tables over: a floor
   here would hide a third of every table behind a sideways scroll. */
@media (max-width: 760px) and (min-width: 641px) {
  .table-wrap table { min-width: 560px; }
  .cmp-table { min-width: 620px; }
}

/* Phones: the columns that survive get the whole width, and a long name is cut
   with an ellipsis inside its cell rather than pushing the table off-screen. */
@media (max-width: 640px) {
  .table-wrap table { min-width: 0; }
  table { font-size: .86rem; }
  th, td { padding: 11px 12px; }
  /* Numbers are never clipped, so a tight column has to give them the room in
     padding instead — otherwise the value spills over the next cell. */
  th.num, td.num { padding-inline: 8px; }
  th { white-space: normal; overflow: hidden; }
  /* Data tables get one line per cell, ellipsised. The about page's comparison
     table is prose: a truncated sentence says less than a wrapped one. */
  #lbBody td:not(.num), #topTracked td:not(.num), .ev-fixed td:not(.num) { max-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .cmp-table td, .cmp-table th { white-space: normal; overflow-wrap: anywhere; }
  .cmp-table th:nth-child(3), .cmp-table td:nth-child(3) { display: none; }

  /* Events: the tournament and when it ran are the point of the row. Format and
     host are detail, and type is already set in the filter bar above. */
  .ev-fixed table { table-layout: fixed; }
  .ev-fixed th:nth-child(3), .ev-fixed td:nth-child(3),
  .ev-fixed th:nth-child(4), .ev-fixed td:nth-child(4),
  .ev-fixed th:nth-child(5), .ev-fixed td:nth-child(5) { display: none; }
  .ev-fixed th:nth-child(2), .ev-fixed td:nth-child(2) { width: 58px; }
  .ev-fixed th:nth-child(6), .ev-fixed td:nth-child(6) { width: 88px; }
}

@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  /* Seven region tabs do not fit one phone row. Wrapping shows all of them;
     a scroller would hide half behind an edge with nothing to say so. */
  .tabs { display: flex; flex-wrap: wrap; max-width: 100%; }
  .tab { flex: 0 0 auto; padding-inline: 12px; }
  .seg-btn { padding-inline: 12px; }
}

@media (max-width: 400px) {
  .container, .modern-navbar-container { padding-inline: 16px; }
  .modern-navbar-container { gap: 12px; }
  .modern-brand-text { font-size: .95rem; }
  .modern-brand-logo { width: 28px; height: 28px; }
  .brand-caption { font-size: .5rem; }
  .site-header .arzb-signin { padding-inline: 10px; font-size: .75rem; }
  .site-header .arzb-signin .material-icons { display: none; }
  .modern-nav-actions { gap: 6px; }
  .modern-mobile-toggle { width: 36px; }
  .feature { padding: 22px; }
  .feature .fi { margin-bottom: 15px; }
  .hs-cell { padding-inline: 16px; }
  .pager, #lbPager { gap: 5px; }
  .pg-btn, .pager .btn { padding-inline: 10px; }
  .tab .material-icons, .seg-btn .material-icons { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
