:root {
  --bg: #0b0b0c;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --line: #2a2a2e;
  --line-strong: #3a3a3f;
  --gold: #d0ae80;
  --gold-strong: #ecd2a8;
  --gold-ink: #1a140b;
  --gold-10: rgba(208, 174, 128, 0.10);
  --gold-18: rgba(208, 174, 128, 0.18);
  --gold-30: rgba(208, 174, 128, 0.30);
  --text: #f4f0e8;
  --muted: #9b968d;
  --faint: #5e5a54;
  --up: #7fd6a0;
  --down: #ff7a6b;
  --live: #ff4d4d;
  --radius: 14px;
  --head: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 85% -120px, rgba(208, 174, 128, 0.13), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--body);
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
}
a { color: var(--gold); }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 11, 12, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 40px; height: 40px; }
.brand__name { font: italic 800 24px/1 var(--head); letter-spacing: 0.01em; text-transform: none; }
.brand__name small { font: 600 12px/1 var(--body); font-style: normal; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-left: 4px; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font: 600 13px/1 var(--body); white-space: nowrap;
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.status--live { border-color: rgba(255, 77, 77, 0.45); }
.status--live .status__dot { background: var(--live); box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.6); animation: pulse 1.6s infinite; }
.status--next .status__dot { background: var(--gold); }
.status--done .status__dot { background: var(--up); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 77, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); } }

/* Hero */
.hero { padding: 40px 0 8px; }
.eyebrow { margin: 0 0 6px; color: var(--gold); font: 700 13px/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; }
.hero h1 { margin: 0; font: italic 800 clamp(56px, 11vw, 112px)/0.88 var(--head); text-transform: uppercase; letter-spacing: -0.01em; }
.hero h1 span { color: var(--gold); }
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 0; color: var(--muted); font-weight: 500; }
.hero__meta span + span::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); margin: 0 18px 3px -12px; }

.progress { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 22px; max-width: 520px; }
.progress i { height: 6px; border-radius: 3px; background: var(--line); }
.progress i.done { background: var(--gold); }
.progress i.live { background: var(--live); animation: blink 1.2s ease-in-out infinite alternate; }
@keyframes blink { from { opacity: 1; } to { opacity: 0.35; } }

.banner { margin-top: 20px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 122, 107, 0.1); border: 1px solid rgba(255, 122, 107, 0.35); color: #ffc4bb; font-size: 14px; }

/* Sections */
.section { margin-top: 40px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 14px; }
.section h2 { margin: 0; font: italic 800 32px/1 var(--head); text-transform: uppercase; }
.section__sub { margin: 0; color: var(--muted); font-size: 14px; }

/* Duo cards */
.duos { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.skeleton { height: 290px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.duo {
  position: relative; overflow: hidden;
  padding: 18px 18px 16px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%);
  border: 1px solid var(--line);
}
.duo::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px;
  background: url('/assets/havok.png') center / contain no-repeat; opacity: 0.05; pointer-events: none;
}
.duo--lead { border-color: var(--gold-30); box-shadow: 0 0 0 1px var(--gold-10) inset, 0 20px 50px -30px rgba(208, 174, 128, 0.45); }
.duo__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.duo__rank { font: italic 800 56px/0.85 var(--head); color: var(--gold); letter-spacing: -0.02em; }
.duo__rank small { font-size: 24px; margin-right: 1px; }
.duo__pts { text-align: right; }
.duo__pts b { display: block; font: 800 34px/0.9 var(--head); }
.duo__pts span { color: var(--muted); font: 600 11px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; }
.duo__delta { display: inline-block; margin-top: 6px; font: 700 13px/1 var(--body); }
.duo__names { margin: 14px 0 0; font: 700 22px/1.1 var(--head); text-transform: uppercase; letter-spacing: 0.01em; }
.duo__names .hvk { color: var(--text); }
.duo__names .ext { color: var(--muted); font-weight: 600; }
.duo__names .sep { color: var(--faint); margin: 0 6px; }
.duo__stats { display: flex; gap: 6px; margin: 12px 0 14px; flex-wrap: wrap; }
.stat { padding: 5px 9px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.stat b { color: var(--text); font-weight: 700; }
.duo__games { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  height: 46px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  font-size: 11px; color: var(--faint);
}
.cell b { font: 700 16px/1 var(--head); color: var(--text); }
.cell span { font-size: 10.5px; color: var(--muted); }
.cell--empty { border-style: dashed; }
.cell--empty b { color: var(--faint); font-weight: 600; font-size: 12px; }
.cell--p1 { background: var(--gold); border-color: var(--gold); }
.cell--p1 b, .cell--p1 span { color: var(--gold-ink); }
.cell--top5 { background: var(--gold-18); border-color: var(--gold-30); }
.cell--top5 b { color: var(--gold-strong); }
.cell--top10 { background: var(--gold-10); }
.cell--out b { color: var(--muted); }
.duo__trend { margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.duo__trend b { color: var(--text); }

/* Tabs */
.tabs { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; max-width: 100%; }
.tab { border: 0; background: transparent; padding: 9px 16px; border-radius: 9px; cursor: pointer; font: 700 15px/1 var(--head); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--gold); color: var(--gold-ink); }
.tab:focus-visible, .gp:focus-visible, .toggle input:focus-visible + .toggle__ui { outline: 2px solid var(--gold); outline-offset: 2px; }

.panel__tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 10px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__ui { width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background 0.2s; }
.toggle__ui::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform 0.2s; }
.toggle input:checked + .toggle__ui { background: var(--gold); }
.toggle input:checked + .toggle__ui::after { transform: translateX(16px); background: var(--gold-ink); }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.chip { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; border: 1px solid var(--line); }
.chip--p1 { background: var(--gold); border-color: var(--gold); margin-left: 0; }
.chip--top5 { background: var(--gold-18); border-color: var(--gold-30); }
.chip--top10 { background: var(--gold-10); }

/* Table */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font: 600 11px/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; text-align: left; padding: 11px 10px; white-space: nowrap; }
.table td { padding: 9px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
.table .num { text-align: right; }
.table .ctr { text-align: center; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.table tr.is-havok td { background: var(--gold-10); }
.table tr.is-havok td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.table tr.is-havok:hover td { background: var(--gold-18); }
.rk { font: 800 18px/1 var(--head); width: 44px; }
.is-havok .rk { color: var(--gold); }
.duo-name { font-weight: 600; }
.duo-name .hvk { color: var(--gold-strong); font-weight: 700; }
.duo-name .sep { color: var(--faint); margin: 0 5px; }
.tag { display: inline-block; margin-left: 8px; padding: 2px 6px; border-radius: 5px; background: var(--gold); color: var(--gold-ink); font: 800 10px/1.2 var(--body); letter-spacing: 0.08em; vertical-align: 1px; }
.pts { font: 800 18px/1 var(--head); }
.delta { font: 700 12px/1 var(--body); }
.delta--up { color: var(--up); }
.delta--down { color: var(--down); }
.delta--eq { color: var(--faint); }
.g { display: inline-flex; flex-direction: column; align-items: center; min-width: 38px; padding: 3px 4px; border-radius: 6px; line-height: 1.1; }
.g b { font: 700 14px/1 var(--head); }
.g span { font-size: 10px; color: var(--muted); }
.g.cell--p1 span { color: var(--gold-ink); }
.g--none { color: var(--faint); }

/* Games */
.game-picker { display: grid; grid-template-columns: repeat(12, minmax(62px, 1fr)); gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.gp { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.gp b { font: 800 17px/1 var(--head); }
.gp span { font-size: 11px; color: var(--muted); }
.gp:disabled { cursor: default; opacity: 0.45; }
.gp[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.gp[aria-pressed="true"] span { color: var(--gold-ink); }
.gp--live { border-color: rgba(255, 77, 77, 0.55); }
.gp--live span { color: var(--live); font-weight: 700; }

.game-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.game-head h3 { margin: 0; font: italic 800 30px/1 var(--head); text-transform: uppercase; }
.game-head h3 small { color: var(--muted); font: 600 14px/1 var(--body); font-style: normal; text-transform: none; margin-left: 8px; }
.winner { color: var(--muted); font-size: 14px; }
.winner b { color: var(--gold-strong); }
.recap { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 14px; }
.recap__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--gold-10); border: 1px solid var(--gold-18); }
.recap__item .place { font: italic 800 28px/1 var(--head); color: var(--gold); min-width: 52px; }
.recap__item .who { font: 700 15px/1.15 var(--head); text-transform: uppercase; }
.recap__item .sub { color: var(--muted); font-size: 12.5px; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* Footer */
.footer { margin-top: 56px; border-top: 1px solid var(--line); }
.footer__inner { padding: 22px 16px 36px; color: var(--muted); font-size: 13px; }
.footer p { margin: 0 0 6px; }
.footer__note { color: var(--faint); }

@media (max-width: 760px) {
  .col-g { display: none; }
  .hero { padding-top: 28px; }
  .section { margin-top: 32px; }
  .brand__name small { display: none; }
  .table td, .table th { padding-left: 8px; padding-right: 8px; }
  .duo-name { white-space: normal; }
  .game-picker { grid-template-columns: repeat(12, 58px); }
}
@media (max-width: 420px) {
  .status { font-size: 12px; padding: 6px 10px; }
  .legend { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.table td.pts { padding-right: 14px; }
#lb th:nth-child(5), #lb td:nth-child(5) { padding-right: 16px; border-right: 1px solid var(--line); }
