/* Excellent Nobody: data-forward look (panels, thin rules, big numerals), red accent. */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f5f5f6;
  --panel: #ffffff;
  --panel-2: #fafafa;
  --line: #e5e5e8;
  --line-strong: #d4d4d8;
  --fg: #17171c;
  --fg-2: #3f3f46;
  --muted: #71717a;
  --accent: #d7263d;
  --accent-strong: #b51d31;
  --accent-soft: rgba(215, 38, 61, 0.09);
  --accent-ink: #ffffff;
  --ok: #15803d;
  --warn: #c2410c;
  --hit-a: #d7263d;
  --hit-c: #ee7d8b;
  --hit-d: #f6c3ca;
  --hit-m: #3f3f46;
  --hit-npm: #a1a1aa;
  --shadow: 0 1px 2px rgba(16, 16, 20, 0.04), 0 1px 1px rgba(16, 16, 20, 0.03);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0e0e11;
    --panel: #17171b;
    --panel-2: #1c1c21;
    --line: #2a2a31;
    --line-strong: #3a3a42;
    --fg: #f4f4f5;
    --fg-2: #d4d4d8;
    --muted: #9b9ba4;
    --accent: #f0435a;
    --accent-strong: #ff6175;
    --accent-soft: rgba(240, 67, 90, 0.13);
    --ok: #4ade80;
    --warn: #fb923c;
    --hit-a: #f0435a;
    --hit-c: #b8505d;
    --hit-d: #6e3a42;
    --hit-m: #d4d4d8;
    --hit-npm: #71717a;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0e0e11;
  --panel: #17171b;
  --panel-2: #1c1c21;
  --line: #2a2a31;
  --line-strong: #3a3a42;
  --fg: #f4f4f5;
  --fg-2: #d4d4d8;
  --muted: #9b9ba4;
  --accent: #f0435a;
  --accent-strong: #ff6175;
  --accent-soft: rgba(240, 67, 90, 0.13);
  --ok: #4ade80;
  --warn: #fb923c;
  --hit-a: #f0435a;
  --hit-c: #b8505d;
  --hit-d: #6e3a42;
  --hit-m: #d4d4d8;
  --hit-npm: #71717a;
  --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
.muted { color: var(--muted); }
.num, .tnum { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--panel); padding: 8px 12px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-name { font-weight: 750; font-size: 16px; letter-spacing: -0.02em; }
.brand-name.small { font-size: 15px; margin-bottom: 4px; }
.brand-accent { color: var(--accent); margin-left: 1px; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--fg-2); font-weight: 550; font-size: 14px;
  padding: 7px 12px; border-radius: 8px;
}
.nav a:hover { background: var(--panel-2); color: var(--fg); }
.nav a[aria-current='page'] { color: var(--accent); background: var(--accent-soft); }
.topbar-actions { margin-left: auto; display: flex; gap: 4px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 8px; border: 0; background: transparent; color: var(--fg-2); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); color: var(--fg); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg.fill, .icon-btn svg .fill { fill: currentColor; stroke: none; }
.theme-toggle .i-moon { display: none; }
:root[data-theme='dark'] .theme-toggle .i-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme='light']) .theme-toggle .i-moon { display: block; }
}

@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 6px 12px; }
  .nav { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 4px 12px 8px; overflow-x: auto; border-top: 1px solid var(--line); }
  .nav a { padding: 8px 12px; }
}

/* ---------- page header ---------- */
.page-head { padding: 36px 0 20px; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.page-head h1 { font-size: clamp(28px, 4.2vw, 40px); font-weight: 750; }
.page-head .lede { margin-top: 10px; color: var(--muted); max-width: 70ch; font-size: 16px; }

/* ---------- hero (home) ---------- */
.hero { padding: 44px 0 20px; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.hero .lede { margin-top: 12px; font-size: 17px; color: var(--fg-2); max-width: 58ch; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 0 18px; border-radius: 10px; font-weight: 600; font-size: 14.5px;
  text-decoration: none; border: 1px solid var(--line-strong); background: var(--panel); color: var(--fg);
}
.btn:hover { border-color: var(--fg-2); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn svg.fill, .btn svg .fill { fill: currentColor; stroke: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--fg-2);
}
.tag.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.tag.ok { color: var(--ok); }
.tag.warn { color: var(--warn); }

/* ---------- panels & sections ---------- */
.section { padding: 18px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 19px; font-weight: 700; }
.section-head .more { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.section-head .more:hover { text-decoration: underline; }
.section-sub { color: var(--muted); font-size: 13.5px; max-width: 80ch; margin: -6px 0 14px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 0;
}
.panel-pad { padding: 18px; }
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-title { font-size: 14px; font-weight: 650; }
.panel-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0; overflow: hidden; }
.stat { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 30px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat-value.accent { color: var(--accent); }
.stat-value.ok { color: var(--ok); }

/* ---------- latest match card ---------- */
.latest { display: grid; grid-template-columns: 1.1fr 1fr; }
.latest-main { padding: 22px; border-right: 1px solid var(--line); }
.latest-main h3 { font-size: 22px; font-weight: 750; margin-top: 2px; }
.latest-meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.latest-big { display: flex; gap: 28px; margin-top: 18px; flex-wrap: wrap; }
.latest-big .v { font-size: 34px; font-weight: 780; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.latest-big .v small { font-size: 16px; color: var(--muted); font-weight: 600; }
.latest-big .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.latest-stages { padding: 8px 0; }
@media (max-width: 760px) {
  .latest { grid-template-columns: 1fr; }
  .latest-main { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* compact list rows */
.rowlist { list-style: none; margin: 0; padding: 0; }
.rowlist li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); min-height: 52px; }
.rowlist li:last-child { border-bottom: 0; }
.rowlist .idx { width: 26px; height: 26px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.rowlist .grow { flex: 1; min-width: 0; }
.rowlist .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowlist .s { font-size: 12.5px; color: var(--muted); }
.rowlist .r { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 650; }

.play {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; min-height: 40px; padding: 0 12px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 13px; text-decoration: none; flex-shrink: 0;
}
.play:hover { background: var(--accent); color: var(--accent-ink); }
.play svg { width: 14px; height: 14px; fill: currentColor; }
.play svg.fill, .play svg .fill { fill: currentColor; stroke: none; }
.play svg:not(.fill) { fill: none; stroke: currentColor; stroke-width: 2; }
.watch { display: inline-flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.vlinks { margin-top: 10px; }
@media (max-width: 480px) { .rowlist .watch .play span { display: none; } }
.play.none { background: transparent; color: var(--muted); font-weight: 500; pointer-events: none; }

/* ---------- charts ---------- */
.chart { position: relative; padding: 8px 12px 12px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis path, .chart .axis line { stroke: var(--line-strong); }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid line { stroke: var(--line); }
.chart .grid path { display: none; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.25; }
.chart .area { fill: var(--accent-soft); }
.chart .pt { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.chart .pt.dq { fill: var(--warn); stroke: var(--warn); }
.chart .ref { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; }
.chart .ref-label { fill: var(--muted); font-size: 11px; }
.chart .hover-line { stroke: var(--line-strong); stroke-width: 1; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0 18px 16px; font-size: 12px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 150px; max-width: 260px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 9px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); padding: 9px 11px; font-size: 12.5px; line-height: 1.45;
  opacity: 0; transition: opacity 0.12s;
}
.tip.on { opacity: 1; }
.tip strong { display: block; font-size: 13px; }
.tip .k { color: var(--muted); }
.noscript { padding: 18px; color: var(--muted); font-size: 14px; }

/* ---------- tables → cards on mobile ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data th { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; background: var(--panel-2); }
table.data th:first-child, table.data td:first-child { padding-left: 18px; }
table.data th:last-child, table.data td:last-child { padding-right: 18px; }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.name { white-space: normal; min-width: 200px; font-weight: 600; }
table.data td.name .s { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
table.data tr.dq td { color: var(--muted); }
.win { color: var(--ok); font-weight: 700; }

@media (max-width: 720px) {
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; }
  table.cards thead { display: none; }
  table.cards tr { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 12px; }
  table.cards tr:last-child { border-bottom: 0; }
  table.cards td { border: 0; padding: 0 !important; white-space: normal; text-align: left !important; }
  table.cards td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
  table.cards td.name, table.cards td.wide { grid-column: 1 / -1; min-width: 0; }
  table.cards td.name { font-size: 15px; }
  table.cards td.hide-sm { display: none; }
}

/* ---------- stage detail (per match <details>) ---------- */
details.match { border-bottom: 1px solid var(--line); }
details.match:last-child { border-bottom: 0; }
details.match > summary {
  list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 14px; min-height: 60px;
}
details.match > summary::-webkit-details-marker { display: none; }
details.match > summary:hover { background: var(--panel-2); }
.chev { width: 18px; height: 18px; color: var(--muted); transition: transform 0.15s; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; }
details.match[open] .chev { transform: rotate(90deg); }
.sum-main { flex: 1; min-width: 0; }
.sum-title { font-weight: 650; font-size: 14.5px; }
.sum-sub { font-size: 12.5px; color: var(--muted); }
.sum-stats { display: flex; gap: 18px; font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
.sum-stats .l { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 650; }
@media (max-width: 720px) { .sum-stats .opt { display: none; } }
details.match .stage-body { border-top: 1px solid var(--line); background: var(--panel-2); }
details.match table.data th { background: transparent; }
.hitbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; width: 110px; background: var(--line); }
.hitbar span { display: block; height: 100%; }
.cls { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: 1px; white-space: nowrap; }

/* ---------- videos ---------- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.vcard { display: flex; flex-direction: column; overflow: hidden; }
.vthumb { display: block; }
.vcard:hover { border-color: var(--line-strong); }
.vthumb { position: relative; aspect-ratio: 16 / 10; background: var(--panel-2); overflow: hidden; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 0.25s; }
.vcard:hover .vthumb img { transform: scale(1.06); }
.vthumb .pbtn {
  position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; transition: background 0.15s;
}
.vcard:hover .pbtn { background: var(--accent); }
.pbtn svg { width: 18px; height: 18px; fill: #fff; margin-left: 3px; }
.vbody { padding: 11px 13px 13px; }
.vtitle { font-weight: 650; font-size: 14px; }
.vsub { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.vgroup + .vgroup { margin-top: 30px; }
.vgroup-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.vgroup-head h2 { font-size: 17px; font-weight: 700; }

/* ---------- gear ---------- */
.gear-item { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.gear-cat { font-size: 11.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.gear-name { font-weight: 680; font-size: 15.5px; }
.gear-brand { color: var(--muted); font-size: 13.5px; }
.gear-link { margin-top: 10px; align-self: flex-start; }
.logo-plate { background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--line); height: 96px; display: grid; place-items: center; padding: 14px; margin-bottom: 10px; }
.logo-plate img { height: 68px; width: auto; max-width: 80%; object-fit: contain; }
.disclosure { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.note { font-size: 13.5px; color: var(--muted); padding: 14px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- footer ---------- */
.footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--panel); padding: 28px 0 22px; font-size: 13.5px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-start; }
.footer-links a { text-decoration: none; color: var(--fg-2); font-weight: 550; padding: 4px 0; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { margin-top: 18px; font-size: 12.5px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- about ---------- */
.about { max-width: 720px; font-size: 16.5px; display: flex; flex-direction: column; gap: 14px; }
.about a { color: var(--accent); }
