*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --faint: #a3a3a3;
  --rule: #eaeaea;
  --wash: #f3f3f3;
  --violet: #2400ff;
  --violet-soft: #7c6bff;
  --amber: #8a6a00;

  --font: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1120px;
  --bar: 64px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 16px); }
html, body { overflow-x: hidden; }

body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.topbar-inner { height: var(--bar); display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { font-size: 24px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.brand-mark i { color: var(--violet); font-style: normal; }
.brand-divider { width: 2px; height: 26px; background: var(--ink); }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a { white-space: nowrap; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.nav a:hover { color: var(--violet); }
.nav .nav-button { border: 2px solid var(--ink); padding: 9px 18px; }
.nav .nav-button:hover { background: var(--ink); color: var(--paper); }
.nav a[aria-current="page"] { color: var(--violet); }

.button {
  display: inline-block;
  border: 2px solid var(--ink);
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.button:hover { background: var(--ink); color: var(--paper); }

/* ---------- Status strip ---------- */

.status { position: relative; min-height: 44px; border-top: 2px solid var(--ink); font-size: 13px; }
.status:empty { display: none; }
.status-inner { display: flex; align-items: center; gap: 8px 18px; min-height: 44px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.status-dot { position: relative; width: 10px; height: 10px; flex: none; border: 2px solid var(--faint); border-radius: 50%; }
.status-dot.live { border-color: var(--violet); background: var(--violet); }
.status-dot.live::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 2px solid var(--violet);
  border-radius: 50%;
  animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { from { opacity: .7; transform: scale(.5); } to { opacity: 0; transform: scale(1.3); } }
.status-title { font-weight: 700; }
.status-part { color: var(--muted); }
.status-elapsed { font-variant-numeric: tabular-nums; }
.status-progress { position: absolute; left: 0; top: -2px; height: 2px; background: var(--violet); transition: width .6s ease; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  min-height: 420px;
}
.hero-glyph {
  position: absolute;
  right: -2vw;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wash);
  font-size: clamp(320px, 52vw, 760px);
  font-weight: 700;
  letter-spacing: -.08em;
  line-height: .8;
  pointer-events: none;
  user-select: none;
}
.hero-inner { position: relative; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 7vw, 80px); }
.loading { color: var(--muted); padding: 120px 0; }

.hero-title {
  margin-top: 20px;
  max-width: 14ch;
  font-size: clamp(44px, 8.4vw, 112px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .92;
  text-transform: uppercase;
  text-wrap: balance;
  animation: rise .9s cubic-bezier(.2, .7, .1, 1) both;
}
.hero-title .accent { color: var(--violet-soft); }
.hero-lede { margin-top: 28px; max-width: 46ch; color: var(--muted); font-size: 18px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); clip-path: inset(0 0 100% 0); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 -10% 0); }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: end;
  margin-top: clamp(40px, 6vw, 64px);
}

.hero-fixture { display: grid; gap: 14px; }
.hero-team { display: flex; align-items: center; gap: 16px; font-size: 22px; font-weight: 500; }
.hero-when { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--muted); font-size: 15px; }
.hero-countdown { color: var(--ink); font-weight: 500; }

.hero-side { display: grid; gap: 28px; }
.hero-numbers { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.hero-number { padding-top: 16px; }
.hero-number + .hero-number { padding-left: 24px; border-left: 1px solid var(--rule); }
.hero-number strong { display: block; font-size: clamp(44px, 5.5vw, 72px); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.hero-number span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
.hero-number:first-child strong { color: var(--violet); }

.hero-reason { margin-top: 40px; max-width: 72ch; color: var(--muted); font-size: 15px; padding-left: 16px; border-left: 2px solid var(--ink); }
.early-note { margin-top: 16px; color: var(--amber); font-size: 14px; }

/* ---------- Probability bar ---------- */

.pbar-track { display: flex; gap: 3px; height: 10px; }
.pbar-lg .pbar-track { height: 14px; }
.pbar-seg { background: var(--rule); min-width: 4px; }
.pbar-seg.on { background: var(--ink); }
.pbar-lg .pbar-seg.on { background: var(--violet); }

.pbar-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; font-size: 13px; }
.pbar-item { display: flex; align-items: baseline; gap: 6px; min-width: 0; color: var(--faint); }
.pbar-item:nth-child(2) { justify-content: center; }
.pbar-item:last-child { justify-content: flex-end; }
.pbar-item b { font-weight: 700; }
.pbar-item.on { color: var(--ink); }
.pbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar-value { font-weight: 500; }

/* ---------- Stats ---------- */

.stats { border-bottom: 2px solid var(--ink); }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat { padding: 28px 0 28px 24px; border-left: 1px solid var(--rule); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat strong { display: block; font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
a.stat strong { color: var(--violet); }
a.stat:hover span { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }

.section-lede { max-width: 52ch; margin: -16px 0 32px; color: var(--muted); }

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.section-title {
  margin-top: 12px;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  text-transform: uppercase;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #d4d4d4;
  background: none;
  color: var(--muted);
  font: 700 11px/1 var(--font);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-count { opacity: .55; }

/* ---------- Day blocks ---------- */

.day + .day { margin-top: 56px; }
.day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.day-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; text-transform: uppercase; }
.day-rel { color: var(--violet); }
.day-count { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------- Match row ---------- */

.match { border-bottom: 1px solid var(--rule); }

.match-line {
  display: grid;
  grid-template-columns: 120px minmax(0, 1.2fr) 72px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}
.match-line::-webkit-details-marker { display: none; }
.match-line:hover .ticket { border-color: var(--ink); }

.match-time strong { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.match-time span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.3; }

.match-teams { display: grid; gap: 8px; }
.match-team { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--muted); font-size: 17px; }
.match-team.picked { color: var(--ink); font-weight: 700; }
.match-team .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.logo { width: 28px; height: 28px; flex: none; object-fit: contain; }
.logo.lg { width: 48px; height: 48px; }
.logo.fallback {
  display: grid;
  place-items: center;
  border: 1px solid #d4d4d4;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.logo.fallback.lg { font-size: 13px; }

.ticket {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 2px solid var(--rule);
}
.ticket-sign { font-size: 32px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.call .ticket { border-color: var(--ink); }
.strong .ticket { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.unsure .ticket, .waiting .ticket { color: var(--faint); }

.call-text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 17px; font-weight: 700; line-height: 1.25; }
.unsure .call-text, .waiting .call-text { color: var(--muted); font-weight: 500; }
.call-meta { display: flex; gap: 14px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.call-meta .conf { color: var(--violet); font-weight: 700; }

.meter { display: block; height: 3px; margin-top: 10px; background: var(--rule); }
.meter-fill { display: block; height: 100%; background: var(--ink); }
.strong .meter-fill { background: var(--violet); }

.tag {
  padding: 3px 7px;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.early .ticket { border-style: dashed; }
.early.strong .ticket { background: none; color: var(--ink); border-color: var(--ink); }

.toggle { position: relative; width: 16px; height: 16px; justify-self: end; }
.toggle::before, .toggle::after { content: ""; position: absolute; inset: 7px 0 auto; height: 2px; background: var(--ink); transition: transform .25s ease; }
.toggle::after { transform: rotate(90deg); }
.match[open] .toggle::after { transform: rotate(0); }

.match-body { padding: 0 48px 28px calc(120px + 24px); display: grid; gap: 16px; max-width: calc(120px + 24px + 72ch); }
.match-body .early-note { margin-top: 0; }
.reason { color: var(--muted); font-size: 15px; }
.match[open] .match-body { animation: open .3s ease both; }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }

.empty { padding: 32px 0; color: var(--muted); border-top: 2px solid var(--ink); }

/* ---------- Results ---------- */

.match-team .score { margin-left: auto; padding-left: 12px; color: var(--ink); font-size: 20px; font-weight: 700; }

.verdict {
  padding: 3px 8px;
  border: 1px solid currentColor;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.verdict.hit { background: var(--violet); border-color: var(--violet); color: var(--paper); }
.verdict.miss { color: var(--ink); }
.verdict.pending, .verdict.void { color: var(--faint); }

.verdict-hit .ticket, .strong.verdict-hit .ticket { background: var(--violet); border-color: var(--violet); color: var(--paper); }
.verdict-miss .ticket, .strong.verdict-miss .ticket { background: none; border-color: var(--ink); color: var(--faint); }
.verdict-miss .ticket-sign { text-decoration: line-through; text-decoration-thickness: 3px; }
.verdict-hit .meter-fill { background: var(--violet); }
.verdict-miss .meter-fill, .verdict-void .meter-fill { background: var(--faint); }

.form { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.form-cell {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 4px;
  border: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.form-cell.hit { background: var(--violet); border-color: var(--violet); color: var(--paper); }
.form-cell.miss { color: var(--faint); text-decoration: line-through; }

.record-band { padding: 0 0 clamp(64px, 9vw, 112px); }
.record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px;
  align-items: end;
  padding-top: 28px;
  border-top: 2px solid var(--ink);
}
.record-rate strong { display: block; color: var(--violet); font-size: clamp(64px, 9vw, 120px); font-weight: 700; letter-spacing: -.05em; line-height: .9; }
.record-rate span { display: block; margin-top: 12px; color: var(--muted); }
.record-label { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.record-empty { color: var(--muted); }

.hero-glyph-pct { right: -6vw; }
.hero-lede-tight { margin: 0 0 20px; color: var(--ink); font-size: 20px; }

.analysis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 7vw, 96px); }
.analysis .section-title { font-size: clamp(30px, 3.6vw, 44px); }
.section-results { padding-top: 0; }

.bands { border-top: 2px solid var(--ink); }
.band { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.band-label { font-size: 17px; font-weight: 700; }
.band-rate { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.band-track { position: relative; height: 10px; margin-top: 12px; background: var(--rule); }
.band-fill { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.band-fill.good { background: var(--violet); }
.band-marker { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--ink); }
.band-marker::after { content: ""; position: absolute; top: -4px; left: -3px; border: 4px solid transparent; border-top-color: var(--ink); }
.band-meta { margin-top: 8px; color: var(--muted); font-size: 13px; }

/* ---------- System ---------- */

.system { padding-top: 0; }
.system-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 80px);
  padding-top: 28px;
  border-top: 2px solid var(--ink);
}
.system-state { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.system-state::before { content: ""; width: 10px; height: 10px; border: 2px solid var(--faint); border-radius: 50%; }
.system-state.live { color: var(--violet); }
.system-state.live::before { border-color: var(--violet); background: var(--violet); }
.system-title { margin-top: 14px; font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.system-facts { margin-top: 28px; border-top: 1px solid var(--rule); }
.system-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.system-facts dt { color: var(--muted); }
.system-facts dd { font-weight: 500; text-align: right; }

.feed { list-style: none; }
.feed-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding: 12px 0 12px 14px; border-left: 2px solid var(--rule); font-size: 15px; }
.feed-item + .feed-item { border-top: 1px solid var(--rule); }
.feed-item time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.feed-item.success { border-left-color: var(--violet); }
.feed-item.warning { border-left-color: var(--amber); }
.feed-item.error { border-left-color: var(--ink); }
.feed-item.error span { font-weight: 700; }
.feed-empty { color: var(--muted); }

/* ---------- Method (dark) ---------- */

.method {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 11vw, 140px) 0;
  background: var(--ink);
  color: var(--paper);
}
.method-glyph {
  position: absolute;
  right: -3vw;
  top: clamp(24px, 4vw, 56px);
  color: #161616;
  font-size: clamp(160px, 26vw, 380px);
  font-weight: 700;
  letter-spacing: -.06em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.method .wrap { position: relative; }
.method .kicker { color: #8a8a8a; }
.method-title {
  margin-top: 16px;
  font-size: clamp(38px, 6.5vw, 88px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .95;
  text-transform: uppercase;
}
.method-title span { color: var(--violet-soft); }
.method-lede { margin-top: 28px; max-width: 54ch; color: #a3a3a3; font-size: 18px; }

.legend { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 64px; border-top: 2px solid var(--paper); }
.legend div { padding: 24px 16px 0 0; }
.legend div + div { padding-left: 16px; border-left: 1px solid #262626; }
.legend dt { font-size: clamp(36px, 4.4vw, 56px); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.legend dd { margin-top: 10px; color: #a3a3a3; font-size: 14px; }

.steps { list-style: none; margin-top: 88px; border-top: 2px solid var(--paper); }
.steps li {
  display: grid;
  grid-template-columns: 120px minmax(0, 260px) minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 32px 0;
  border-bottom: 1px solid #262626;
}
.step-no { color: var(--violet-soft); font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.steps h3 { font-size: 22px; font-weight: 700; text-transform: uppercase; }
.steps p { max-width: 60ch; color: #a3a3a3; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--rule); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 28px; padding-bottom: 28px; color: var(--muted); font-size: 13px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .analysis, .record, .system-grid { grid-template-columns: 1fr; }
  .stats-grid, .stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(4) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 4) { border-top: 1px solid var(--rule); }
  .legend { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
  .legend div:nth-child(4) { padding-left: 0; border-left: 0; }
  .steps li { grid-template-columns: 80px minmax(0, 1fr); }
  .steps p { grid-column: 2; }
}

@media (max-width: 720px) {
  .status-detail { display: none; }
  .nav { gap: 18px; }
  .nav a:not(.nav-button):not([href="/history"]) { display: none; }
  .nav .nav-button { padding: 8px 12px; font-size: 12px; letter-spacing: .12em; }
  .brand-name { font-size: 17px; }

  .match-line {
    grid-template-columns: 56px minmax(0, 1fr) 16px;
    grid-template-areas:
      "time time time"
      "ticket teams toggle"
      "ticket call call";
    gap: 10px 16px;
    align-items: start;
  }
  .ticket { grid-area: ticket; width: 56px; height: 56px; }
  .ticket-sign { font-size: 24px; }
  .match-teams { grid-area: teams; }
  .match-call { grid-area: call; }
  .toggle { grid-area: toggle; margin-top: 4px; }
  .match-time { grid-area: time; display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
  .match-time strong { font-size: 14px; }
  .match-time span { margin-top: 0; }
  .match-team { font-size: 15px; }
  .call-text { font-size: 15px; }
  .match-body { padding: 0 0 24px; }
}

@media (max-width: 520px) {
  .brand-divider, .brand-name { display: none; }
  .hero { min-height: 0; }
  .hero-team { font-size: 18px; }
  .logo.lg { width: 36px; height: 36px; }
  .hero-number + .hero-number { padding-left: 16px; }
  .stats-grid, .stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat, .stat:nth-child(4) { padding: 20px 0 20px 16px; border-left: 1px solid var(--rule); border-top: 1px solid var(--rule); }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .stat strong { font-size: 32px; }
  .day-head { flex-direction: column; gap: 4px; }
  .day-title { font-size: 19px; }
  .pbar-label { display: none; }
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legend div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .legend div:nth-child(4) { padding-left: 16px; border-left: 1px solid #262626; }
  .steps li { grid-template-columns: 1fr; gap: 10px; }
  .steps p { grid-column: auto; }
}

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