/* The live parts of drexun.com (status, leaderboards, player pages). The base look (colors, fonts, boxes, tables)
   comes from docs/books/src/_template.html, which every page also carries. Source: web/site.css. */

.live-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; margin: 8px 0 14px; }
@media (max-width: 720px) { .live-grid { grid-template-columns: 1fr; } }

.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: 1px; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent); }
.dot.off { background: var(--red); }
.state { font: 700 20px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--text-strong); }
.big-num { font: 700 34px/1 var(--display); color: var(--text-strong); font-variant-numeric: tabular-nums; }
.big-num small { font-size: 18px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.chips li { font: 600 13px/1 var(--body); color: var(--gold); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; max-width: 100%; overflow-wrap: anywhere; }
.live a.play { font-size: 18px; padding: 11px 20px; margin: 14px 0 16px; }
.live a.play + .note { margin-top: 0; }
.live .updated { margin-top: 6px; }

form.search { display: flex; gap: 6px; margin: 6px 0 4px; }
form.search input { flex: 1; min-width: 0; font: 16px/1.2 var(--body); color: var(--text-strong); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; }
form.search input:focus { outline: 2px solid var(--lime); outline-offset: 1px; border-color: transparent; }
form.search button, .btn { font: 700 15px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--bg); background: var(--lime); border: 0; border-radius: 4px; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
form.search button:hover, .btn:hover { filter: brightness(1.1); }
.btn.ghost { background: var(--surface-2); color: var(--text-strong); border: 1px solid var(--line); }

ol.mini { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 2px; }
ol.mini li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); max-width: none; }
ol.mini li:first-child { border-top: 0; }
ol.mini .pos { font: 700 16px/1 var(--display); color: var(--muted); }
ol.mini .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.mini li.wide, ol.mini li.empty { display: block; color: var(--muted); padding: 2px 0 8px; }
ol.mini li.wide b { display: block; color: var(--text-strong); margin-bottom: 2px; }
.box.placing ol.mini { margin: 0; }
ol.mini .val { font: 500 13px/1 var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-block: 18px 6px; }
.toolbar form.search { flex: 0 1 340px; margin: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { font: 600 14px/1 var(--body); color: var(--text); text-decoration: none; padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.tabs a[aria-current="page"] { border-color: var(--accent); color: var(--text-strong); background: var(--surface-2); }

.board td:first-child { width: 1%; min-width: 0; white-space: nowrap; }
.board td.num, .board th.num { text-align: right; white-space: nowrap; }
.board td.player { width: auto; min-width: 140px; }
.board tr.me td { background: color-mix(in srgb, var(--lime) 8%, transparent); }
.board tr.vip td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
a.pname { color: var(--gold); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
a.pname:hover { text-decoration: underline; }
.title-tag { display: inline-block; font: 600 12px/1 var(--mono); letter-spacing: .03em; margin-left: 6px; }
@media (max-width: 560px) {
  .board .opt { display: none; }
  .board th, .board td { padding: 9px 8px; font-size: 14px; }
  .board td.player { min-width: 0; }
  .board th { letter-spacing: .02em; }
}

.pager { display: flex; justify-content: center; align-items: center; gap: 10px; padding-top: 10px; font: 500 14px/1 var(--mono); color: var(--muted); }
.pager a { color: var(--text-strong); text-decoration: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; margin: 18px 0 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.tile .k { font: 600 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile .v { font: 700 30px/1.15 var(--display); color: var(--text-strong); font-variant-numeric: tabular-nums; margin-top: 4px; overflow-wrap: anywhere; }
.tile .v small { font: 600 15px/1 var(--body); color: var(--muted); letter-spacing: 0; }
.tile .s { font-size: 14px; color: var(--muted); margin-top: 2px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.season-block { margin: 0 0 18px; }
.season-block h3 { margin-top: 18px; }
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.podium .box { padding: 12px 14px; }
.podium h4 { text-transform: none; letter-spacing: .01em; margin: 6px 0 4px; overflow-wrap: anywhere; }
.podium .place { font: 700 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.podium .first { border-color: var(--gold); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 40%, transparent); }
.podium .first .place { color: var(--gold); }

/* Steam avatars: small next to names, big on the player card. */
img.av, .av.letter { flex: none; border-radius: 4px; vertical-align: middle; margin-right: 10px; background: var(--surface-2); object-fit: cover; }
.av.letter { display: inline-grid; place-items: center; font: 700 13px/1 var(--display); color: var(--muted); border: 1px solid var(--line); box-sizing: border-box; font-style: normal; }
.pname { display: inline-flex; align-items: center; min-width: 0; vertical-align: middle; }
.board td { vertical-align: middle; }
.pname > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.profile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.profile h1 { overflow-wrap: anywhere; }
.profile .lede { margin-top: 6px; }
.av.big { width: 112px; height: 112px; margin: 0; border-radius: 8px; border: 1px solid var(--line); }
.av.blank { display: grid; place-items: center; font: 700 52px/1 var(--display); color: var(--accent); background: var(--surface); }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.profile-links .btn { font-size: 13px; padding: 8px 12px; }
@media (max-width: 480px) { .profile { grid-template-columns: 1fr; } .av.big { width: 88px; height: 88px; } }

/* Hit spread figure, top weapons, top maps (player page). */
.detail { margin-top: 18px; }
.detail .box h4 { margin-bottom: 12px; }
svg.figure { flex: none; }
.fig-part { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; }
.fig-part.on { fill: var(--lime); stroke: none; }
.spread { display: flex; align-items: center; gap: 22px; margin-bottom: 8px; }
.spread-row { display: grid; grid-template-columns: 48px 56px auto; align-items: baseline; gap: 8px; padding: 4px 0; }
.spread-row .k { font: 600 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.spread-row b { font: 700 22px/1 var(--display); color: var(--text-strong); font-variant-numeric: tabular-nums; }
.spread-row .s { font-size: 13px; color: var(--muted); }
.weapons td.big { font: 700 20px/1 var(--display); color: var(--text-strong); }
.weapons .wname { color: var(--text-strong); }
.mini-spread { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
ul.maps { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
ul.maps li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; max-width: none; }
ul.maps .map { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.maps .rate { text-align: right; font-variant-numeric: tabular-nums; }
ul.maps .rate b { font: 700 18px/1 var(--display); color: var(--text-strong); margin-right: 8px; }
ul.maps .rate b.good { color: var(--gold); }
ul.maps .rate small { color: var(--muted); font-size: 12px; }
ul.maps .bar { grid-column: 1 / -1; margin-top: 2px; height: 6px; }

@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Steam login in the nav: "Sign in with Steam", or the avatar + name opening a small menu (My stats, Sign out). */
.account { display: inline-flex; align-items: center; }
.account a.signin { font: 600 14px/1 var(--body); color: var(--text); text-decoration: none; padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; }
.account a.signin:hover { border-color: var(--lime); color: var(--text-strong); }
details.me-menu { position: relative; }
details.me-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px 8px 5px 5px; border-radius: 4px;
  font: 600 14px/1 var(--body); color: var(--text-strong); max-width: 200px; }
details.me-menu > summary::-webkit-details-marker { display: none; }
details.me-menu > summary:hover, details.me-menu[open] > summary { background: var(--surface-2); }
details.me-menu > summary img.av { margin: 0; width: 26px; height: 26px; border-radius: 4px; }
details.me-menu > summary .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.me-menu > summary::after { content: ""; border: 4px solid transparent; border-top-color: var(--muted); margin-top: 4px; }
details.me-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px; display: grid; gap: 2px; box-shadow: 0 10px 24px rgba(0, 0, 0, .45); z-index: 20; }
details.me-menu .menu a, details.me-menu .menu button { display: block; width: 100%; text-align: left; font: 600 14px/1 var(--body); color: var(--text);
  text-decoration: none; padding: 10px 10px; border: 0; border-radius: 4px; background: none; cursor: pointer; }
details.me-menu .menu a:hover, details.me-menu .menu button:hover { background: var(--surface-2); color: var(--text-strong); }
details.me-menu .menu form { margin: 0; }
.board tr.me td, ol.mini li.me { background: color-mix(in srgb, var(--lime) 9%, transparent); }
.podium .box.me { border-color: var(--lime); }

/* Rating graph (player page). */
.rating-box { margin-top: 18px; }
.rating-box h4 { margin-bottom: 8px; }
.graph-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.graph-head b { font: 700 22px/1 var(--display); color: var(--text-strong); margin-left: 4px; }
.graph-head .note { margin: 0 0 0 auto; }
svg.graph { display: block; width: 100%; height: 150px; }
.graph-line { fill: none; stroke: var(--lime); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.graph-fill { fill: color-mix(in srgb, var(--lime) 12%, transparent); }
.graph-peak { fill: var(--gold); }
ul.maps .mode-name { font-weight: 600; color: var(--text-strong); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.empty { padding: 18px; text-align: center; color: var(--muted); }
.error { border-left: 3px solid var(--red); }
.updated { font: 500 13px/1.4 var(--mono); color: var(--muted); margin-top: 10px; }

/* Title colors: the same order as the chat colors in game (grey, green, blue, purple, yellow, gold, red). */
.t-initiate { color: #9aa6b4; } .t-challenger { color: var(--green); } .t-duelist { color: var(--blue); }
.t-gladiator { color: var(--purple); } .t-champion { color: #f3e36a; } .t-legend { color: var(--gold); } .t-mythic { color: var(--red); }

/* The footer on every page: brand, Discord button, links, copyright. */
footer.site-footer { margin-top: 48px; padding: 28px 0 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 40px; }
.footer-brand { display: grid; gap: 10px; justify-items: start; max-width: 360px; }
.footer-brand .brand { font: 700 20px/1 var(--display); letter-spacing: .04em; color: var(--text-strong); text-decoration: none; }
.footer-brand .brand .tag { font-size: 13px; margin-right: 4px; }
.footer-brand p { margin: 0; }
a.discord-btn { display: inline-flex; align-items: center; gap: 8px; font: 700 14px/1 var(--body); color: #fff; background: #5865f2; text-decoration: none;
  padding: 10px 14px; border-radius: 4px; }
a.discord-btn:hover { background: #4752c4; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px 48px; }
.footer-links div { display: grid; gap: 8px; align-content: start; }
.footer-links h5 { margin: 0 0 2px; font: 600 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-strong); }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text-strong); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 26px; padding: 16px 0 6px; border-top: 1px solid var(--line); font-size: 13px; }
.footer-brand code.nowrap { white-space: nowrap; overflow-wrap: normal; }
/* The footer brings its own line: the last section above it gets none, or the two lines sit right on top of each other. */
.wrap > section.sec:last-of-type { border-bottom: 0; }
/* The menu button (three lines) only exists on phones. */
.menu-btn { display: none; }

/* Phones (owner, 2026-10-01: "the header is a bit weird" ... "3 lines on the top left and you can open a menu"): ONE slim
   row - menu button, logo, then Sign in and Join (short texts). The page links open as a list under it from the button.
   Signed in, only the avatar shows (its menu has the rest). */
@media (max-width: 640px) {
  .site-nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 10px; padding-block: 8px; }
  .nav-left { display: contents; }
  .menu-btn { display: grid; place-items: center; grid-column: 1; grid-row: 1; width: 38px; height: 38px; margin-left: -6px; padding: 0;
    border: 0; border-radius: 4px; background: none; color: var(--text-strong); cursor: pointer; }
  .menu-btn:hover, .site-nav.open .menu-btn { background: var(--surface-2); }
  .site-nav .brand { grid-column: 2; grid-row: 1; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .site-nav .brand .tag { display: none; }
  .nav-right { grid-column: 3; grid-row: 1; gap: 8px; }
  .site-links { display: none; }
  .site-nav.open .site-links { display: grid; grid-column: 1 / -1; grid-row: 2; gap: 0; margin-top: 8px; border-top: 1px solid var(--line); }
  .site-nav.open .site-links a { font-size: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .site-nav.open .site-links a[aria-current="page"] { color: var(--lime); border-bottom-color: var(--line); }
  .site-nav .long { display: none; }
  .account a.signin { padding: 7px 10px; font-size: 13px; }
  .site-nav a.join { padding: 8px 12px; font-size: 13px; }
  details.me-menu > summary .who { display: none; }
  details.me-menu > summary { padding: 3px; }
}
/* Back to the top: a round button at the bottom right, shown once the page is scrolled down (owner, 2026-10-01). */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text-strong); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--lime); color: var(--lime); }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* The small Discord logo in the line under the page title. */
.meta { align-items: center; }
a.meta-discord { display: inline-flex; color: var(--muted); line-height: 0; }
a.meta-discord:hover { color: #5865f2; }

/* The short Guide and VIP pages (owner, 2026-10-01: "simple and easy to understand"): big numbered sections, short cards. */
.guide-page section.sec { padding-block: 30px 10px; }
.guide-page h2 { font-size: 28px; margin-bottom: 14px; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; margin: 4px 0 14px; }
.guide-cards.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.guide-cards .box { padding: 16px 18px; }
.guide-cards .box h4 { margin-bottom: 8px; font-size: 18px; }
.guide-cards .box p { color: var(--text); }
.guide-cards .box.highlight { border-color: var(--gold); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent); }
.guide-cards .box.highlight h4 { color: var(--gold); }
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px; margin: 4px 0 12px; }
.cmd-grid div { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.cmd-grid code { font-size: 15px; }
.cmd-grid span { font-size: 14px; color: var(--muted); }
.title-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.title-chips span { font: 700 15px/1 var(--display); letter-spacing: .03em; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.title-chips small { font: 500 12px/1 var(--mono); color: var(--muted); margin-left: 4px; }
ul.rules-short { list-style: none; padding: 0; display: grid; gap: 8px; }
ul.rules-short li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--lime); border-radius: 6px; padding: 10px 14px; max-width: none; }
.guide-page .steps li { font-size: 17px; }
p.more { margin: 26px 0 0; font-size: 16px; }