/* ============ Tokens ============ */
:root {
  --bg: #0a0c0b;
  --surface: #121514;
  --surface-2: #191d1b;
  --surface-3: #222724;
  --line: rgba(236, 234, 228, 0.08);
  --line-strong: rgba(236, 234, 228, 0.16);
  --text: #eceae4;
  --muted: #8d928e;
  --accent: #ff6b1a;
  --accent-ink: #160800;
  --accent-soft: rgba(255, 107, 26, 0.14);
  --zone: #3ccff0;
  --zone-soft: rgba(60, 207, 240, 0.14);
  --win: #c8f03c;
  --win-soft: rgba(200, 240, 60, 0.14);
  --danger: #ff4d5e;
  --danger-soft: rgba(255, 77, 94, 0.14);
  --gold: #ffc23d;
  --silver: #c9d1d6;
  --bronze: #d38a55;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: "Chakra Petch", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: 16px;
  --header-h: 64px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f0ea;
  --surface: #ffffff;
  --surface-2: #f7f5f0;
  --surface-3: #ebe8e0;
  --line: rgba(18, 20, 19, 0.09);
  --line-strong: rgba(18, 20, 19, 0.18);
  --text: #121413;
  --muted: #5c615d;
  --accent: #e2580b;
  --accent-ink: #ffffff;
  --accent-soft: rgba(226, 88, 11, 0.1);
  --zone: #0a8fb0;
  --zone-soft: rgba(10, 143, 176, 0.1);
  --win: #5c8a00;
  --win-soft: rgba(92, 138, 0, 0.12);
  --danger: #d4243a;
  --danger-soft: rgba(212, 36, 58, 0.1);
  --gold: #c58a00;
  --silver: #7d8a93;
  --bronze: #a8602d;
  --shadow: 0 20px 50px -24px rgba(20, 20, 10, 0.25);
  color-scheme: light;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; text-transform: uppercase; }
.h3 { font-size: 1.35rem; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.02em; text-transform: uppercase; }
.center { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ============ Primitives ============ */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: currentColor; }
.dot--live { background: var(--danger); box-shadow: 0 0 0 0 var(--danger); animation: pulse 1.6s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(255, 77, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); }
}

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 4px;
  background: var(--surface-3); color: var(--text);
  white-space: nowrap;
}
.tag--accent { background: var(--accent-soft); color: var(--accent); }
.tag--zone { background: var(--zone-soft); color: var(--zone); }
.tag--live { background: var(--danger-soft); color: var(--danger); }
.tag--new { background: var(--zone-soft); color: var(--zone); }
.tag--buff { background: var(--win-soft); color: var(--win); }
.tag--nerf { background: var(--danger-soft); color: var(--danger); }
.tag--fix { background: var(--surface-3); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); border-radius: 0; }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { border: 1px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--text); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 0.8rem; }

.icon-btn {
  height: 40px; min-width: 40px; padding: 0 10px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kbd { font-family: var(--font-mono); font-size: 0.68rem; padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }

.kicker { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

/* ============ Ticker ============ */
.ticker {
  display: flex; align-items: center; height: 36px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.75rem; overflow: hidden;
}
.ticker__label {
  flex: none; display: flex; align-items: center; gap: 8px; height: 100%;
  padding: 0 14px; background: var(--danger); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
.ticker__label .dot--live { background: #fff; animation: none; }
.ticker__track { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker__inner { display: inline-flex; gap: 40px; white-space: nowrap; padding-left: 24px; animation: marquee 50s linear infinite; }
.ticker:hover .ticker__inner { animation-play-state: paused; }
.ticker__item { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); }
.ticker__item b { color: var(--text); font-weight: 700; }
.ticker__item .up { color: var(--win); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Header ============ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.06em; }
.logo svg { width: 30px; height: 30px; }
.logo b { color: var(--accent); font-weight: 700; }
.nav { display: none; gap: 4px; margin-left: 12px; }
.nav a {
  white-space: nowrap;
  position: relative; padding: 8px 12px; font-weight: 500; font-size: 0.92rem; color: var(--muted); border-radius: 8px;
  transition: color 0.15s;
}
.nav a:hover, .nav a.is-active { color: var(--text); }
.nav a.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--accent); }
.header__actions { margin-left: auto; display: flex; gap: 8px; }
.search-trigger .kbd { display: none; }
.i-sun { display: none; }
:root[data-theme="light"] .i-sun { display: block; }
:root[data-theme="light"] .i-moon { display: none; }

@media (min-width: 1100px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
  .search-trigger { padding: 0 10px 0 12px; }
  .search-trigger .kbd { display: inline; }
}
@media (max-width: 1099px) {
  .nav.is-open {
    display: flex; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0;
    padding: 12px var(--gutter) 20px; margin: 0; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.is-open a { padding: 14px 4px; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav.is-open a.is-active::after { display: none; }
}

/* ============ Hero ============ */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; border-bottom: 1px solid var(--line); }
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.topo { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--line-strong); opacity: 0.8; }
.hud-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
}
.zone { position: absolute; border-radius: 50%; left: 72%; top: 46%; transform: translate(-50%, -50%); }
.zone--outer { width: 900px; height: 900px; border: 2px solid var(--zone); opacity: 0.35; box-shadow: inset 0 0 120px var(--zone-soft); animation: shrink 14s ease-in-out infinite; }
.zone--inner { width: 420px; height: 420px; border: 1.5px dashed rgba(255, 255, 255, 0.35); }
:root[data-theme="light"] .zone--inner { border-color: rgba(0, 0, 0, 0.25); }
@keyframes shrink { 0%, 100% { width: 900px; height: 900px; } 50% { width: 560px; height: 560px; } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 50%, transparent 100%); pointer-events: none; }

.hero__grid { position: relative; z-index: 1; display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.hero__title { font-size: clamp(2.1rem, 5.4vw, 4.1rem); font-weight: 700; text-transform: uppercase; line-height: 1.02; max-width: 15ch; text-wrap: balance; }
.hero__lede { margin-top: 20px; font-size: 1.1rem; color: var(--muted); max-width: 54ch; }
.hero__cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 36px; margin: 40px 0 0; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); max-width: 560px; }
.hero__stats dt { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.hero__stats dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; }

.hero__side { display: grid; gap: 16px; align-content: start; grid-template-columns: minmax(0, 1fr); }
.hero__side .card { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); box-shadow: var(--shadow); }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; padding: 12px 0 8px; }
.countdown span { display: block; font-family: var(--font-mono); font-weight: 700; font-size: 1.8rem; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown small { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

.map-chip { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.map-chip__art { width: 44px; height: 44px; border-radius: 6px; flex: none; }
.map-chip b { display: block; font-family: var(--font-display); font-size: 1rem; }
.map-chip span.muted { font-size: 0.82rem; }

.map--erangel { background: radial-gradient(circle at 30% 30%, #6c8f4a, transparent 50%), radial-gradient(circle at 70% 70%, #3f6b3a, transparent 55%), linear-gradient(135deg, #2d4a2f, #567a45); }
.map--miramar { background: radial-gradient(circle at 70% 30%, #d9a660, transparent 50%), radial-gradient(circle at 20% 80%, #a86f3a, transparent 50%), linear-gradient(135deg, #8a5a2e, #c99558); }
.map--sanhok { background: radial-gradient(circle at 40% 60%, #2f8a5a, transparent 50%), radial-gradient(circle at 80% 20%, #1e6f6a, transparent 50%), linear-gradient(135deg, #1a4d3a, #2c7a55); }
.map--vikendi { background: radial-gradient(circle at 30% 70%, #e6eef2, transparent 50%), radial-gradient(circle at 75% 30%, #9fb6c4, transparent 50%), linear-gradient(135deg, #6b8597, #c8d6de); }
.map--livik { background: radial-gradient(circle at 60% 40%, #5aa0c8, transparent 45%), radial-gradient(circle at 25% 75%, #7a9c52, transparent 50%), linear-gradient(135deg, #39627a, #6a9058); }
.map--rondo { background: radial-gradient(circle at 35% 35%, #c9a77a, transparent 45%), radial-gradient(circle at 75% 70%, #6b8c5a, transparent 50%), linear-gradient(135deg, #5f6b4a, #b08a5e); }

.mini-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mini-board li { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 6px; font-size: 0.9rem; }
.mini-board li:nth-child(odd) { background: var(--surface-2); }
.mini-board .pos { font-family: var(--font-mono); font-weight: 700; color: var(--muted); font-size: 0.78rem; }
.mini-board .alive { display: flex; gap: 3px; }
.mini-board .alive i { width: 5px; height: 14px; border-radius: 1px; background: var(--win); }
.mini-board .alive i.dead { background: var(--surface-3); }
.mini-board .pts { font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem; min-width: 32px; text-align: right; }

.zone-bar { margin-top: 14px; }
.zone-bar__label { display: flex; justify-content: space-between; margin-bottom: 8px; }
.zone-bar__track { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.zone-bar__track span { display: block; height: 100%; background: linear-gradient(90deg, var(--zone), var(--accent)); border-radius: 3px; }

@media (min-width: 1024px) {
  .hero { padding: 80px 0 96px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: center; }
}

/* ============ Sections ============ */
.section { padding: 72px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--alt .card { background: var(--surface-2); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section__head--tight { margin-bottom: 20px; }
@media (min-width: 1024px) { .section { padding: 96px 0; } }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 0.85rem; font-weight: 500; color: var(--muted); transition: all 0.15s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.segmented { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.segmented button { height: 36px; padding: 0 16px; border-radius: 8px; font-weight: 600; font-size: 0.88rem; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.segmented button[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
.segmented .count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }

/* ============ News ============ */
.news-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
  .news-card--lead { grid-column: span 2; grid-row: span 2; }
  .news-card--lead { position: relative; }
  .news-card--lead .news-card__thumb { aspect-ratio: auto; flex: 1; min-height: 420px; }
  .news-card--lead .news-card__thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.85)); }
  .news-card--lead .glyph { top: 10px; bottom: auto; font-size: 7rem; }
  .news-card--lead .news-card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px; color: #fff; z-index: 1; }
  .news-card--lead h3 { font-size: 2.1rem; max-width: 22ch; }
  .news-card--lead p { color: rgba(255, 255, 255, 0.75); font-size: 1rem; max-width: 60ch; }
  .news-card--lead .news-card__meta { color: rgba(255, 255, 255, 0.7); }
}
.news-card {
  display: flex; flex-direction: column; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  animation: rise 0.4s ease both;
}
.news-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.news-card:hover h3 { color: var(--accent); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.news-card__thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.news-card__thumb .art { position: absolute; inset: 0; transition: transform 0.5s; }
.news-card:hover .art { transform: scale(1.04); }
.news-card__thumb .glyph {
  position: absolute; right: 16px; bottom: 6px; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3rem, 8vw, 5.5rem); line-height: 1; color: rgba(255, 255, 255, 0.16); letter-spacing: -0.02em; text-transform: uppercase;
}
.news-card__thumb .tag { position: absolute; left: 14px; top: 14px; background: rgba(0, 0, 0, 0.55); color: #fff; backdrop-filter: blur(6px); }
.news-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.news-card h3 { font-size: 1.2rem; font-weight: 600; transition: color 0.15s; text-wrap: pretty; }
.news-card p { color: var(--muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__meta { display: flex; gap: 12px; margin-top: auto; padding-top: 6px; color: var(--muted); }

.art--esports { background: radial-gradient(circle at 80% 20%, rgba(255, 107, 26, 0.75), transparent 55%), radial-gradient(circle at 10% 90%, #3a1a0a, transparent 60%), linear-gradient(135deg, #1b0f08, #4a2210); }
.art--update { background: radial-gradient(circle at 20% 30%, rgba(60, 207, 240, 0.6), transparent 55%), radial-gradient(circle at 90% 80%, #0a2a3a, transparent 60%), linear-gradient(135deg, #061820, #0e3b4c); }
.art--event { background: radial-gradient(circle at 70% 70%, rgba(200, 240, 60, 0.5), transparent 55%), linear-gradient(135deg, #12180a, #2f3d12); }
.art--guide { background: radial-gradient(circle at 30% 70%, rgba(255, 194, 61, 0.55), transparent 55%), linear-gradient(135deg, #1d1606, #4a3a10); }
.art--community { background: radial-gradient(circle at 75% 30%, rgba(190, 120, 255, 0.55), transparent 55%), linear-gradient(135deg, #140a1f, #33184d); }
.art::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 14px);
}
.art::after {
  content: ""; position: absolute; width: 60%; aspect-ratio: 1; right: -10%; top: -20%;
  border: 1.5px solid rgba(255, 255, 255, 0.22); border-radius: 50%;
}

/* ============ Tournaments ============ */
.tour-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .tour-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tour-grid { grid-template-columns: repeat(3, 1fr); } }
.tour-card { display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; animation: rise 0.4s ease both; }
.tour-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--muted); }
.tour-card[data-status="live"]::before { background: var(--danger); }
.tour-card[data-status="upcoming"]::before { background: var(--zone); }
.tour-card[data-status="completed"]::before { background: var(--win); }
.tour-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tour-card__crest {
  width: 52px; height: 52px; flex: none; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.02em;
  background: var(--surface-3); border: 1px solid var(--line-strong);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.tour-card h3 { font-size: 1.25rem; font-weight: 700; }
.tour-card__sub { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.tour-card__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.tour-card__facts div { background: var(--surface); padding: 10px 12px; }
.section--alt .tour-card__facts div { background: var(--surface-2); }
.tour-card__facts dt { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.tour-card__facts dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress__label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.82rem; }
.progress__track { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress__track span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.stages { display: flex; gap: 4px; }
.stages span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.stages span.done { background: var(--win); }
.stages span.now { background: var(--danger); }
.tour-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.winner { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.winner svg { width: 18px; height: 18px; fill: var(--gold); }

/* ============ Standings ============ */
.standings-layout { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .standings-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; } }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--surface); }
.standings { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 340px; }
.standings th {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.standings td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.standings tr:last-child td { border-bottom: 0; }
.standings tbody tr { transition: background 0.15s; }
.standings tbody tr:hover { background: var(--surface-2); }
.standings .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.standings .total { font-weight: 700; font-size: 1rem; color: var(--text); }
.standings .rank { font-family: var(--font-mono); font-weight: 700; width: 48px; }
.standings tr:nth-child(1) .rank { color: var(--gold); }
.standings tr:nth-child(2) .rank { color: var(--silver); }
.standings tr:nth-child(3) .rank { color: var(--bronze); }
.standings tr.cutoff td { border-bottom: 1px dashed var(--accent); }
.team { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team__badge {
  width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; color: #fff;
}
.team__name { font-weight: 600; white-space: nowrap; }
.trend { font-family: var(--font-mono); font-size: 0.7rem; margin-left: 4px; }
.trend.up { color: var(--win); }
.trend.down { color: var(--danger); }
.wwcd-icons { display: inline-flex; gap: 2px; justify-content: flex-end; }
.wwcd-icons i { width: 8px; height: 8px; border-radius: 2px; background: var(--gold); display: inline-block; }
.legend { margin-top: 12px; }
@media (max-width: 560px) { .hide-sm { display: none; } .standings td, .standings th { padding: 12px 10px; } }

.players { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.player {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.player__avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #fff; position: relative; }
.player__avatar small { position: absolute; bottom: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 0.6rem; display: grid; place-items: center; color: var(--text); }
.player__name { font-weight: 700; font-family: var(--font-display); font-size: 1.05rem; }
.player__team { font-size: 0.8rem; color: var(--muted); }
.player__stat { text-align: right; }
.player__stat b { display: block; font-family: var(--font-mono); font-size: 1.2rem; }
.player__stat span { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.08em; }
.player__bar { grid-column: 1 / -1; height: 3px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.player__bar span { display: block; height: 100%; background: var(--accent); }

/* ============ Updates / timeline ============ */
.updates-layout { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
  .updates-layout { grid-template-columns: 320px minmax(0, 1fr); gap: 64px; }
  .updates-intro { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}
.updates-intro h2 { margin-bottom: 14px; }
.legend-tags { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.timeline { position: relative; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.timeline::before { content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 1px; background: var(--line-strong); }
.patch { position: relative; padding-left: 40px; }
.patch::before {
  content: ""; position: absolute; left: 4px; top: 24px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
}
.patch.is-latest::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.patch__card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.patch__head { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-align: left; }
.patch__ver { font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; color: var(--accent); flex: none; }
.patch__title { flex: 1; min-width: 0; }
.patch__title h3 { font-size: 1.15rem; font-weight: 600; }
.patch__title span { font-size: 0.82rem; color: var(--muted); }
.patch__chev { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; transition: transform 0.25s; }
.patch[open] .patch__chev, .patch.is-open .patch__chev { transform: rotate(180deg); }
.patch__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.patch.is-open .patch__body { grid-template-rows: 1fr; }
.patch__body > div { overflow: hidden; }
.patch__list { list-style: none; margin: 0; padding: 0 20px 20px; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.patch__list li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: baseline; font-size: 0.92rem; }
.patch__list li .tag { justify-content: center; }
.patch__summary { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px 16px; margin-top: -6px; }

/* ============ Meta ============ */
.meta-layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .meta-layout { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.meta-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.meta-row { display: grid; grid-template-columns: 26px 1fr 64px; gap: 14px; align-items: center; padding: 10px 4px; }
.meta-row + .meta-row { border-top: 1px solid var(--line); }
.meta-row .idx { font-family: var(--font-mono); color: var(--muted); font-size: 0.78rem; }
.meta-row__name { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.meta-row__name b { font-family: var(--font-display); font-size: 1.05rem; }
.meta-row__name span { font-size: 0.75rem; color: var(--muted); }
.meta-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.meta-bar span { display: block; height: 100%; border-radius: 4px; background: var(--accent); width: 0; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.meta-bar span.ar { background: var(--accent); }
.meta-bar span.dmr { background: var(--zone); }
.meta-bar span.smg { background: var(--win); }
.meta-row__val { text-align: right; font-family: var(--font-mono); }
.meta-row__val b { display: block; font-size: 0.95rem; }
.meta-row__val small { font-size: 0.7rem; }
.meta-row__val .up { color: var(--win); }
.meta-row__val .down { color: var(--danger); }

.maps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.map-tile { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 132px; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; isolation: isolate; }
.map-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.7)); z-index: -1; }
.map-tile .art-bg { position: absolute; inset: 0; z-index: -2; }
.map-tile b { font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.04em; }
.map-tile span { font-family: var(--font-mono); font-size: 0.7rem; opacity: 0.85; }
.map-tile .rate { position: absolute; top: 12px; right: 12px; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; background: rgba(0, 0, 0, 0.5); padding: 3px 7px; border-radius: 4px; }

/* ============ CTA ============ */
.cta {
  position: relative; overflow: hidden; display: grid; gap: 28px; align-items: center;
  padding: 36px 24px; border-radius: 20px; border: 1px solid var(--line);
  background: radial-gradient(circle at 100% 0%, var(--accent-soft), transparent 50%), radial-gradient(circle at 0% 100%, var(--zone-soft), transparent 50%), var(--surface);
}
.cta h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 10px; }
.cta__form { display: flex; flex-wrap: wrap; gap: 10px; }
.cta__form input {
  flex: 1 1 220px; height: 46px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text); font: inherit;
}
.cta__form input::placeholder { color: var(--muted); }
.cta__form input:focus { outline: none; border-color: var(--accent); }
.cta__msg { flex-basis: 100%; min-height: 1.2em; }
.cta__msg.ok { color: var(--win); }
.cta__msg.err { color: var(--danger); }
@media (min-width: 900px) { .cta { grid-template-columns: 1.2fr 1fr; padding: 48px; } }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); padding: 56px 0 24px; background: var(--surface); }
.footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.footer__grid > div:first-child { grid-column: 1 / -1; display: grid; gap: 14px; max-width: 380px; }
.footer h4 { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
.footer__grid a:not(.logo) { display: block; padding: 4px 0; font-size: 0.92rem; }
.footer__grid a:not(.logo):hover { color: var(--accent); }
.footer__base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer__grid > div:first-child { grid-column: auto; }
}

/* ============ Dialogs ============ */
dialog { color: var(--text); border: 1px solid var(--line-strong); background: var(--surface); padding: 0; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); }
.search { width: min(640px, calc(100% - 32px)); border-radius: 16px; margin-top: 12vh; }
.search__box { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search__box svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search__box input { flex: 1; height: 58px; border: 0; background: none; color: var(--text); font: inherit; font-size: 1.05rem; outline: none; min-width: 0; }
.search__results { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.search__results li a, .search__results li button { display: flex; width: 100%; text-align: left; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; }
.search__results li a:hover, .search__results li button:hover, .search__results li .is-focus { background: var(--surface-2); }
.search__results .tag { flex: none; min-width: 84px; justify-content: center; }
.search__results .res-title { font-weight: 500; }
.search__empty { padding: 28px 12px; text-align: center; color: var(--muted); }

.reader { width: min(760px, calc(100% - 24px)); max-height: calc(100% - 48px); border-radius: 18px; overflow: auto; }
.reader__close { position: absolute; top: 14px; right: 14px; z-index: 2; background: rgba(0, 0, 0, 0.5); color: #fff; border-color: transparent; }
.reader__hero { position: relative; aspect-ratio: 21 / 9; overflow: hidden; }
.reader__hero .art { position: absolute; inset: 0; }
.reader__content { padding: 28px clamp(20px, 5vw, 48px) 44px; }
.reader__content h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); text-transform: none; margin: 14px 0 12px; }
.reader__content p { color: var(--muted); margin-top: 16px; font-size: 1.02rem; line-height: 1.7; }
.reader__content p:first-of-type { color: var(--text); font-size: 1.12rem; }

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

/* ============ Content states ============ */
[hidden] { display: none !important; }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton--title { height: 180px; max-width: 620px; }
.skeleton--text { height: 64px; max-width: 480px; margin-top: 20px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.prose h2 { font-size: 1.3rem; margin: 28px 0 4px; }
.prose ul { margin: 16px 0 0; padding-left: 20px; color: var(--muted); }
.prose li { margin: 6px 0; }
.prose li strong, .prose p strong { color: var(--text); }
.prose blockquote { margin: 20px 0 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); font-family: var(--font-display); font-size: 1.2rem; color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.reader__content .prose p:first-child { color: var(--text); font-size: 1.12rem; }
.reader__content p:first-of-type { color: var(--muted); font-size: 1.02rem; }

/* ============ Submit tournament ============ */
.section__tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.submit { width: min(640px, calc(100% - 24px)); max-height: calc(100% - 32px); border-radius: 18px; overflow: auto; }
.submit__close { position: absolute; top: 14px; right: 14px; }
#submitForm, .submit__done { padding: 28px clamp(20px, 5vw, 36px); }
.submit__head { margin-bottom: 22px; padding-right: 40px; }
.submit__head h2 { font-size: 1.7rem; margin-bottom: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span { font-size: 0.82rem; font-weight: 600; }
.field .opt { font-style: normal; font-weight: 400; color: var(--muted); }
.field input:not([type="radio"]) {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text); font: inherit; font-size: 0.95rem;
}
.field input::placeholder { color: var(--muted); opacity: 0.7; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[type="date"] { color-scheme: inherit; }
.field.has-error input { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 0.78rem; }
.field small { font-size: 0.75rem; }
.seg-input { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); height: 44px; }
.seg-input label { flex: 1; position: relative; }
.seg-input input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-input span { display: grid; place-items: center; height: 100%; border-radius: 7px; font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.seg-input input:checked + span { background: var(--surface-3); color: var(--text); }
.seg-input input:focus-visible + span { outline: 2px solid var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--danger); font-size: 0.88rem; min-height: 1.3em; margin-top: 16px; }
.submit__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.submit__foot .btn[disabled] { opacity: 0.6; cursor: progress; }
.submit__done { text-align: center; display: grid; justify-items: center; gap: 14px; padding-top: 48px; padding-bottom: 40px; }
.submit__done p { max-width: 42ch; }
.submit__check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--win-soft); }
.submit__check svg { width: 30px; height: 30px; fill: none; stroke: var(--win); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tour-card__org { color: var(--accent); }

/* ============ Article page ============ */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--zone), var(--accent)); }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); margin-bottom: 18px; }
.crumbs a:hover { color: var(--accent); }
.article__hero { position: relative; overflow: hidden; padding: 72px 0 40px; border-bottom: 1px solid var(--line); isolation: isolate; }
.article__cover { position: absolute; inset: 0; z-index: -1; }
.article__cover .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article__cover .glyph { position: absolute; right: 4%; top: 16px; font-family: var(--font-display); font-weight: 700; font-size: clamp(5rem, 16vw, 12rem); line-height: 1; color: rgba(255, 255, 255, 0.1); text-transform: uppercase; }
.article__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 35%, transparent) 0%, var(--bg) 92%); }
.article__head { max-width: 860px; }
.article__hero .crumbs { color: color-mix(in srgb, var(--text) 70%, transparent); }
.article__title { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.05; text-wrap: balance; margin-top: 6px; }
.article__dek { margin-top: 18px; font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.byline__avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 700; }
.byline b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.article__layout { display: grid; gap: 24px; padding-top: 40px; padding-bottom: 72px; max-width: 860px; grid-template-columns: minmax(0, 1fr); }
.share { display: flex; align-items: center; gap: 8px; }
.share .icon-btn svg { fill: currentColor; stroke: none; }
.share .icon-btn svg.stroke { fill: none; stroke: currentColor; }
.share .icon-btn.is-done { color: var(--win); border-color: var(--win); }
.article__body { font-size: 1.08rem; line-height: 1.75; max-width: 68ch; }
.article__body p { color: var(--text); opacity: 0.88; margin-top: 18px; }
.article__body p:first-child { margin-top: 0; font-size: 1.2rem; opacity: 1; }
.article__body h2 { font-size: 1.6rem; margin: 40px 0 0; text-transform: none; }
.article__body ul { color: var(--text); opacity: 0.88; }
@media (min-width: 1024px) {
  .article__hero { padding: 96px 0 56px; }
  .article__layout { grid-template-columns: 56px minmax(0, 1fr); gap: 40px; max-width: 980px; }
  .share { flex-direction: column; position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}
.news-grid--plain .news-card--lead { grid-column: auto; grid-row: auto; }

/* ============ News index / 404 ============ */
.news-index { padding-top: 40px; }
.page-title { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; }
.chip { display: inline-flex; align-items: center; }
.chip[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; }
.not-found { padding: 120px 0; min-height: 60vh; }

/* ============ Checkboxes, info pages ============ */
.check { display: flex; gap: 10px; align-items: flex-start; flex-basis: 100%; color: var(--muted); line-height: 1.45; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.check a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.field.check { display: flex; }
.field.check > span { font-weight: 400; font-size: 0.85rem; }
.check.has-error { color: var(--danger); }
.info-page { padding-top: 40px; }
.info-page__inner { max-width: 820px; }
.info-page .page-title { margin-bottom: 10px; }
.info-page .article__body { margin-top: 32px; }
.info-page .article__body p:first-child { font-size: 1.12rem; }

/* ============ Illustrations ============ */
.ico { display: block; }
.ico .cut { fill: rgba(0, 0, 0, 0.38); }
.news-card__thumb .illus {
  position: absolute; right: 7%; top: 50%; color: rgba(255, 255, 255, 0.92);
  transform: translateY(-50%) rotate(-6deg); filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.4));
  transition: transform 0.5s cubic-bezier(.2, .8, .2, 1);
}
.news-card__thumb .illus--square { height: 58%; width: auto; }
.news-card__thumb .illus--wide { width: 70%; height: auto; right: 5%; }
.news-card:hover .illus { transform: translateY(-54%) rotate(-3deg) scale(1.06); }
.news-card__thumb .glyph { font-size: clamp(2.4rem, 6vw, 4rem); left: 16px; right: auto; bottom: 4px; color: rgba(255, 255, 255, 0.14); }
.news-card--lead .news-card__thumb .illus { top: 30%; right: 9%; }
.news-card--lead .news-card__thumb .illus--square { height: 34%; }
.news-card--lead .news-card__thumb .illus--wide { width: 44%; }
.news-card--lead .glyph { left: auto; right: 24px; }
.article__cover .illus { position: absolute; right: 5%; top: 32px; height: 72%; width: auto; color: rgba(255, 255, 255, 0.14); transform: rotate(-6deg); }
.article__cover .illus--wide { width: 46%; height: auto; top: 18%; }
.article__cover .glyph { display: none; }

.meta-row { grid-template-columns: 26px 92px 1fr 64px; }
.meta-row__gun .gun { width: 92px; height: auto; color: var(--text); opacity: 0.85; }
.meta-row__gun .gun-img { width: 92px; height: 32px; object-fit: contain; }
@media (max-width: 480px) {
  .meta-row { grid-template-columns: 20px 64px 1fr 56px; gap: 10px; }
  .meta-row__gun .gun, .meta-row__gun .gun-img { width: 64px; }
}

.wwcd-icons { align-items: center; }
.wwcd-icons .wwcd { width: 15px; height: 15px; color: var(--gold); }

/* Sits in the gap between the headline and the side cards (cards: 380px wide, 56px gap). */
.hero-drop { position: absolute; right: calc(max(var(--gutter), (100vw - 1280px) / 2 + var(--gutter)) + 380px + 40px); top: 9%; width: 120px; color: var(--accent); opacity: 0.95; z-index: 1; animation: drop-sway 6s ease-in-out infinite; transform-origin: 50% 0; }
.hero-drop .ico { width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45)); }
@keyframes drop-sway { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(14px) rotate(4deg); } }
@media (max-width: 1279px) { .hero-drop { width: 88px; } }
@media (max-width: 1023px) { .hero-drop { width: 72px; right: var(--gutter); top: 16px; opacity: 0.5; } }

.team__badge--img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: var(--surface-2); padding: 3px; }
.tour-card__logo { width: 52px; height: 52px; flex: none; object-fit: contain; border-radius: 10px; background: var(--surface-3); padding: 4px; }
.not-found__art { width: 96px; height: 96px; color: var(--accent); margin-bottom: 24px; animation: drop-sway 6s ease-in-out infinite; }

/* ============ Map images ============ */
.maps { grid-template-columns: repeat(3, 1fr); align-content: start; }
.map-tile { aspect-ratio: 1; min-height: 0; padding: 12px; transition: transform 0.2s; }
.map-tile:hover { transform: translateY(-2px); }
.map-tile img.art-bg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.map-tile:hover img.art-bg { transform: scale(1.06); }
.map-tile::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 35%, rgba(0, 0, 0, 0.8)); }
.map-tile b { font-size: 1rem; }
.map-tile--all { background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--text); justify-content: center; text-align: center; }
.map-tile--all::before { display: none; }
.map-tile--all span { color: var(--accent); opacity: 1; margin-top: 4px; }
@media (max-width: 640px) { .maps { grid-template-columns: repeat(2, 1fr); } }
a.map-chip { transition: background 0.15s; }
a.map-chip:hover { background: var(--surface-3); }
img.map-chip__art { object-fit: cover; }

.maps-page { padding-top: 40px; }
.maps-page__intro { margin-top: 10px; max-width: 52ch; }
.map-entry { display: grid; gap: 24px; padding: 40px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); grid-template-columns: minmax(0, 1fr); }
.map-entry__img { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); cursor: zoom-in; padding: 0; }
.map-entry__img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s; }
.map-entry__img:hover img { transform: scale(1.02); }
.map-entry__zoom { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, 0.65); color: #fff; padding: 6px 10px; border-radius: 6px; backdrop-filter: blur(4px); }
.map-entry__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.map-entry h2 { margin-bottom: 12px; }
.map-entry__label { margin: 26px 0 12px; color: var(--muted); font-weight: 500; }
.map-entry__drops { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.map-entry__drops li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 500; font-size: 0.92rem; }
.map-entry__drops .drop-ico { width: 18px; height: 18px; color: var(--accent); }
@media (min-width: 900px) {
  .map-entry { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 56px 0; }
  .map-entry--flip .map-entry__img { order: 2; }
}

.mapview { width: min(92vw, 88vh); max-width: none; padding: 0; border-radius: 16px; overflow: hidden; background: #000; }
.mapview img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.mapview__caption { margin: 0; padding: 12px 16px; color: #ddd; background: #111; }
.mapview__close { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, 0.6); color: #fff; border-color: transparent; }

/* ============ Official game art ============ */
.news-card__thumb .illus--photo { filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.5)); }
.news-card__thumb .illus--photo.illus--wide { width: 78%; right: 4%; }
.news-card--lead .news-card__thumb .illus--photo.illus--wide { width: 56%; }
.article__cover .illus--photo { opacity: 0.22; filter: grayscale(0.3); }
.patch__gun { display: block; width: 84px; height: auto; margin: 0 0 6px; }
.meta-row__gun .gun-img { width: 92px; height: auto; max-height: 34px; }
.hero-drop img { width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45)); }
.map-tile img.map-img { filter: saturate(1.05); }
/* The renders are dark gunmetal; lift them a little so they read on the dark theme. */
:root:not([data-theme="light"]) .gun-img, :root:not([data-theme="light"]) .patch__gun { filter: brightness(1.8) contrast(1.05); }
@media (max-width: 1023px) { .hero-drop { width: 52px; top: 10px; } }

/* ============ Weapons ============ */
.weapons-page { padding-top: 40px; }
.sort-select { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.sort-select select { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; }
.weapon-chips { margin: -12px 0 8px; }
.weapon-group { padding-top: 36px; scroll-margin-top: calc(var(--header-h) + 16px); }
.weapon-group__title { font-size: 1.35rem; margin-bottom: 16px; display: flex; align-items: baseline; gap: 10px; }
.weapon-group__title .mono { font-size: 0.8rem; }
.weapon-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.weapon-card {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); transition: transform 0.2s, border-color 0.2s;
}
.weapon-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.weapon-card__img { height: 84px; display: grid; place-items: center; border-radius: var(--radius-sm); background: radial-gradient(ellipse at center, var(--surface-3), transparent 70%); }
.weapon-card__img .gun-img { max-width: 92%; max-height: 72px; width: auto; height: auto; object-fit: contain; }
.weapon-card__img .gun { width: 70%; color: var(--muted); }
.weapon-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.weapon-card__head h3 { font-size: 1.15rem; }
.weapon-card__nums { display: flex; gap: 20px; margin: 0; }
.weapon-card__nums dt { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.weapon-card__nums dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; }
.mini-bar { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--muted); }
.mini-bar i { display: block; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.mini-bar b { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.weapons-source { margin-top: 40px; max-width: 80ch; }
.weapons-source a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.weapon-hero { position: relative; padding: 40px 0 48px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 75% 50%, var(--accent-soft), transparent 60%); }
.weapon-hero__grid { display: grid; gap: 24px; align-items: center; grid-template-columns: minmax(0, 1fr); }
.weapon-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.weapon-keystats { display: flex; gap: 32px; margin: 28px 0 0; flex-wrap: wrap; }
.weapon-keystats dt { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.weapon-keystats dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1; }
.weapon-hero__img { display: grid; place-items: center; min-height: 160px; }
.weapon-hero__gun { width: 100%; max-width: 620px; height: auto; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.35)); }
svg.weapon-hero__gun { color: var(--text); opacity: 0.8; }
@media (min-width: 900px) { .weapon-hero__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } .weapon-hero { padding: 56px 0 64px; } }
:root:not([data-theme="light"]) .weapon-hero__gun, :root:not([data-theme="light"]) .weapon-card__img .gun-img, :root:not([data-theme="light"]) .compare__gun { filter: brightness(1.8) contrast(1.05) drop-shadow(0 18px 24px rgba(0, 0, 0, 0.4)); }

.weapon-body { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 72px; grid-template-columns: minmax(0, 1fr); }
.weapon-stats { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.stat-bar__label { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 6px; }
.stat-bar__track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); }
.stat-bar__track span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--zone), var(--accent)); }
.stat-bar__track i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 1px; }
.weapon-proscons { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .weapon-proscons { grid-template-columns: 1fr 1fr; } }
.procon h2 { margin-bottom: 8px; }
.procon p { color: var(--muted); }
.procon--pro { border-left: 3px solid var(--win); }
.procon--con { border-left: 3px solid var(--danger); }
.weapon-section h2 { margin-bottom: 14px; }
.chip--static { cursor: default; }
.chip--static:hover { color: var(--muted); border-color: var(--line); }
.compare tr.is-current td { background: var(--accent-soft); }
.compare td.is-best { color: var(--win); font-weight: 700; }
.compare__name { display: flex; align-items: center; gap: 12px; font-weight: 600; white-space: nowrap; }
.compare__name:hover span { color: var(--accent); }
.compare__gun { width: 64px; height: 22px; object-fit: contain; flex: none; }
svg.compare__gun { color: var(--muted); }
.meta-row__name a:hover { color: var(--accent); }
@media (min-width: 1024px) { .weapon-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .weapon-section, .weapons-source { grid-column: 1 / -1; } .weapon-proscons { grid-template-columns: 1fr; } }

/* ============ Charts (viz) ============ */
/* Series colours validated for colour-blind separation on these surfaces; dark is the default theme. */
:root {
  --viz-1: #3987e5; --viz-2: #d95926; --viz-muted: #4a4d4a;
  --viz-grid: #2c2c2a; --viz-axis: #383835; --viz-tick: #898781;
}
:root[data-theme="light"] {
  --viz-1: #2a78d6; --viz-2: #eb6834; --viz-muted: #cfcec7;
  --viz-grid: #e1e0d9; --viz-axis: #c3c2b7; --viz-tick: #898781;
}
.viz { font-size: 0.85rem; }
.viz-c1 { background: var(--viz-1); }
.viz-c2 { background: var(--viz-2); }
.viz-muted { background: var(--viz-muted); }
.viz-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; font-size: 0.8rem; color: var(--muted); }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-bars, .viz-stack { display: grid; gap: 4px; }
.viz-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 44px; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 6px; color: var(--text); outline-offset: 1px; }
.viz-row:hover, .viz-row:focus-visible { background: var(--surface-2); }
.viz-row__label { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-row__track { height: 10px; display: flex; gap: 2px; }
.viz-row__fill { display: block; height: 100%; background: var(--viz-1); border-radius: 0 4px 4px 0; min-width: 2px; transition: width 0.4s cubic-bezier(.2, .8, .2, 1); }
.viz-row.is-muted .viz-row__fill { background: var(--viz-muted); }
.viz-row.is-emphasis .viz-row__label { font-weight: 700; }
.viz-row__value { font-family: var(--font-mono); font-size: 0.8rem; font-variant-numeric: tabular-nums; text-align: right; color: var(--muted); }
.viz-row.is-emphasis .viz-row__value { color: var(--text); font-weight: 700; }
.viz-bars--compact .viz-row { padding: 3px 4px; }
/* Phones: label and value share a line and the bar gets the full width, so names are not cut off. */
@media (max-width: 560px) {
  .viz-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "track track"; gap: 4px 10px; padding: 7px 4px; }
  .viz-row__label { grid-area: label; }
  .viz-row__value { grid-area: value; }
  .viz-row__track { grid-area: track; }
  .viz-bars--compact .viz-row { padding: 5px 4px; }
}
@media (max-width: 420px) { .standings { min-width: 0; } .standings td, .standings th { padding: 10px 6px; } .team__name { white-space: normal; } }

.viz-bars--compact .viz-row__track { height: 8px; }
.viz-seg { display: block; height: 100%; }
.viz-seg:last-child { border-radius: 0 4px 4px 0; }
a.viz-row:hover .viz-row__label { color: var(--accent); }
.viz-scatter svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-scatter__narrow { display: none !important; }
@media (max-width: 639px) { .viz-scatter__wide { display: none !important; } .viz-scatter__narrow { display: block !important; } }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { stroke: var(--viz-axis); stroke-width: 1; }
.viz-tick, .viz-axis-label { fill: var(--viz-tick); font-family: var(--font-mono); font-size: 11px; }
.viz-axis-label { font-size: 12px; }
.viz-pt { cursor: pointer; outline: none; }
.viz-hit { fill: transparent; }
.viz-dot { fill: var(--viz-muted); stroke: var(--surface); stroke-width: 2; transition: r 0.15s; }
.viz-pt.is-emphasis .viz-dot { fill: var(--viz-1); }
.viz-pt:hover .viz-dot, .viz-pt:focus-visible .viz-dot { r: 7.5; }
.viz-pt-label { fill: var(--text); font-size: 12px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.viz-tip {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; max-width: 280px;
  padding: 7px 10px; border-radius: 8px; font-size: 0.8rem; line-height: 1.35;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.viz-tip[hidden] { display: none; }

.scatter-card { margin: 8px 0 28px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.scatter-card__head { display: grid; gap: 12px; }
.scatter-card__head h2 { margin-bottom: 4px; }
.scatter-classes .chip { height: 32px; font-size: 0.8rem; }
.scatter-classes .chip[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.standings-chart { margin-bottom: 16px; }
.class-chart { margin-bottom: 16px; }

/* ============ Loadout optimiser ============ */
.loadout { grid-column: 1 / -1; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.loadout__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.loadout__head h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); text-transform: none; }
.goal-tabs { flex-wrap: wrap; height: auto; }
.goal-tabs button { height: 34px; padding: 0 12px; font-size: 0.82rem; }
.loadout__blurb { color: var(--muted); margin-top: -6px; }
.loadout__grid { display: grid; gap: 18px; align-items: center; grid-template-columns: minmax(0, 1fr); }
.loadout__gun { display: grid; place-items: center; min-height: 120px; border-radius: var(--radius); background: radial-gradient(ellipse at center, var(--accent-soft), transparent 70%); padding: 12px; }
.loadout__gun-img { width: 100%; max-width: 520px; height: auto; }
svg.loadout__gun-img { color: var(--muted); }
:root:not([data-theme="light"]) img.loadout__gun-img { filter: brightness(1.8) contrast(1.05); }
.loadout__slots { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.slot { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); transition: border-color 0.2s; }
.section--alt .slot, .card .slot { background: var(--bg); }
.slot.is-empty { opacity: 0.6; }
.slot__icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-3); }
.slot__icon img { width: 56px; height: 56px; object-fit: contain; }
.slot__ph { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--muted); }
.slot__label { display: block; color: var(--accent); margin-bottom: 4px; }
.slot select { width: 100%; height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; }
.slot__desc { margin-top: 6px; line-height: 1.4; }
.loadout__chart-title { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; color: var(--text); }
.loadout__note { max-width: 90ch; }
@media (min-width: 1024px) { .loadout__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
/* On phones the scatter swaps to a narrow plot (see js/charts.js) so its text stays readable without sideways scrolling. */
.scatter-card > * { min-width: 0; }

/* ============ Community tournaments ============ */
.empty-note { padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; margin: 24px 0; }
.empty-note a { color: var(--accent); text-decoration: underline; }
.linklike { color: var(--muted); text-decoration: underline; padding: 0; font-size: 0.88rem; }
.linklike:hover { color: var(--accent); }
.ct-danger { color: var(--danger); }
.ct-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-top: 28px; }
.ct-card { display: grid; gap: 10px; align-content: start; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.15s, transform 0.15s; }
a.ct-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.ct-card h3 { font-size: 1.15rem; text-transform: uppercase; }
.ct-card p { margin: 0; }
.ct-card__stats { display: flex; gap: 20px; margin: 4px 0; }
.ct-card__stats dt { font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.ct-card__stats dd { margin: 0; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.ct-card__lead { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 600; }
.ct-card__lead svg { width: 18px; height: 18px; fill: var(--gold); flex: none; }
.ct-card__lead b { margin-left: auto; color: var(--accent); }
.ct-card__links { display: flex; gap: 8px; flex-wrap: wrap; }

.ct-page .stat-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 28px 0 8px; }
.stat-tile { display: grid; gap: 2px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-tile span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat-tile b { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; }
.stat-tile b i { font-size: 1rem; color: var(--muted); font-style: normal; }
.ct-h { margin: 48px 0 16px; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.ct-sub { margin: 28px 0 12px; font-size: 1rem; text-transform: uppercase; color: var(--muted); }
.ct-two { display: grid; gap: 24px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .ct-two { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.ct-matches { display: grid; gap: 10px; }
.ct-match { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ct-match summary { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; list-style: none; }
.ct-match summary::-webkit-details-marker { display: none; }
.ct-match__sum { color: var(--muted); font-size: 0.88rem; display: inline-flex; align-items: center; gap: 6px; }
.ct-match__sum svg { width: 16px; height: 16px; fill: var(--gold); }
.ct-match .table-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.ct-disclaimer { margin-top: 36px; }

/* organiser dashboard */
.ct-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; font-size: 0.88rem; }
.ct-points { margin: 20px 0 28px; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; }
.ct-in, .ct-num { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 0.95rem; min-width: 0; }
textarea.ct-in { height: auto; padding: 10px 12px; width: 100%; resize: vertical; }
.ct-in:focus, .ct-num:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input, .field textarea { width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 0.95rem; }
.field textarea { height: auto; padding: 10px 12px; }
.ct-create, .ct-signin { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.ct-create .ct-in, .ct-signin .ct-in { flex: 1 1 260px; }
.ct-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.ct-title { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.ct-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ct-toggle { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.ct-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.ct-dirty { color: var(--accent); }
.ct-tabs { max-width: 100%; overflow-x: auto; margin-bottom: 20px; }
.ct-panel { min-width: 0; }
.ct-hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0 16px; }
.ct-bulk { display: grid; gap: 10px; margin-bottom: 24px; justify-items: start; }
.ct-bulk .field { width: 100%; }
.ct-teams { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ct-team { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 16px 16px; margin: 0; min-width: 0; }
.ct-team legend { color: var(--muted); font-size: 0.7rem; padding: 0 6px; text-transform: uppercase; }
.ct-team__top { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.ct-team__top .ct-in:first-child { flex: 1; }
.ct-tag { width: 76px; text-transform: uppercase; }
.ct-players { display: grid; gap: 8px; }
.ct-mtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.ct-mtabs .chip { cursor: pointer; }
.ct-mtabs .chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.ct-mhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; flex-wrap: wrap; max-width: 560px; }
.ct-mhead .field { min-width: 180px; }
.ct-results { display: grid; gap: 12px; margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.ct-res { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 14px; min-width: 0; }
.ct-res__head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ct-res__head b { flex: 1 1 120px; font-family: var(--font-display); text-transform: uppercase; }
.ct-place { display: inline-flex; gap: 6px; align-items: center; font-size: 0.8rem; color: var(--muted); }
.ct-pts { min-width: 56px; text-align: right; color: var(--accent); font-weight: 700; }
.ct-prow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.ct-prow label { display: inline-flex; gap: 6px; align-items: center; font-size: 0.72rem; color: var(--muted); }
.ct-num { width: 64px; height: 36px; text-align: center; padding: 0 6px; }
.ct-num--wide { width: 80px; }
.ct-num.is-bad { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
ul.form-error { padding-left: 20px; margin: 0 0 16px; }

/* ============ Stats page: data tables ============ */
.stats-intro { max-width: 70ch; margin: 8px 0 20px; }
.stats-table { min-width: 0; }
.stats-events { min-width: 880px; }
.stats-table th[scope="row"] { text-align: left; white-space: nowrap; }
.stats-sub { display: block; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 0.78rem; color: var(--muted); max-width: 22ch; white-space: normal; }
.stats-table .nowrap { white-space: nowrap; }
.stats-table .rank { font-family: var(--font-mono); color: var(--muted); width: 1%; }
.stats-table .is-top-1 .rank { color: var(--gold); }
.stats-table .is-top-2 .rank { color: var(--silver); }
.stats-table .is-top-3 .rank { color: var(--bronze); }
.stats-table .is-top td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.stats-table .sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.stats-table .sortable:hover, .stats-table .sortable:focus-visible { color: var(--accent); outline: none; }
.stats-table .sortable[aria-sort="ascending"]::after { content: " ▲"; font-size: 0.65em; }
.stats-table .sortable[aria-sort="descending"]::after { content: " ▼"; font-size: 0.65em; }
.stats-table td .team { display: inline-flex; align-items: center; gap: 8px; }
.stats-award { margin-left: 6px; vertical-align: middle; }
.stats-tabs { margin: 12px 0 16px; }
.stats-tabs .chip[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.stats-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.stats-toolbar .stats-tabs { margin: 12px 0; }
.stats-search { flex: 1 1 220px; max-width: 320px; }
.stats-note { margin: 10px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 899px) { .hide-md { display: none; } }
@media (max-width: 560px) {
  .stats-table th, .stats-table td { padding: 10px 8px; }
  .stats-players .team__name { display: none; }
  .stats-players td:nth-child(2) { white-space: normal; min-width: 96px; }
  .stats-events th[scope="row"], .stats-events td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
}
