:root {
  --bg: #f4f6f8; --surface: #ffffff; --text: #14181f; --muted: #66707d; --line: #e2e6ea;
  --accent: #0b7a4b; --home: #1f6feb; --draw: #8a94a3; --away: #d1453b;
  --good: #11895a; --bad: #c4372d; --chip: #eaeef2; --shadow: 0 1px 2px rgba(0,0,0,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --surface: #161b22; --text: #e6edf3; --muted: #8b949e; --line: #262d36;
    --accent: #3fb97c; --home: #4c8dff; --draw: #6e7781; --away: #f0645a;
    --good: #3fb97c; --bad: #f0645a; --chip: #21262d; --shadow: none;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.brand { font-weight: 700; font-size: 18px; text-decoration: none; color: var(--accent); white-space: nowrap; }
nav a { text-decoration: none; margin-left: 16px; color: var(--muted); }
nav a:hover { color: var(--text); }
.hero h1 { margin: 24px 0 4px; font-size: 26px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.good { color: var(--good); } .bad { color: var(--bad); }
h2 { font-size: 18px; margin: 0 0 12px; }
h2.day { margin: 28px 0 12px; font-size: 16px; color: var(--muted); font-weight: 600; }
h3 { font-size: 15px; margin: 16px 0 8px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 4px; scrollbar-width: thin; }
.chip { white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--chip); text-decoration: none; font-size: 14px; }
.chip.on { background: var(--accent); color: #fff; }
.chip small { opacity: .7; margin-left: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s; }
.card:hover { border-color: var(--accent); }
.card-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 8px 0; }
.team { font-weight: 600; overflow-wrap: anywhere; }
.team.right { text-align: right; }
.xg { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; text-align: center; }
.big .team { font-size: 20px; }
.big .xg { font-size: 26px; color: var(--text); font-weight: 700; display: flex; flex-direction: column; align-items: center; }
.big .xg small { font-size: 11px; color: var(--muted); font-weight: 400; }
.bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; font-size: 12px; color: #fff; font-weight: 600; }
.bar span { display: flex; align-items: center; justify-content: center; min-width: 2px; }
.b-h { background: var(--home); } .b-d { background: var(--draw); } .b-a { background: var(--away); }
.card-foot { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 8px; font-size: 13px; }
.tip b { color: var(--accent); }
.stars { color: #e3a008; letter-spacing: 1px; }
.badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--chip); color: var(--muted); }
.badge.value { background: #e3a008; color: #111; }
.badge.ai { background: var(--accent); color: #fff; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 16px 0; box-shadow: var(--shadow); }
.values { display: grid; gap: 6px; }
.value-row { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; padding: 8px 10px; border-radius: 8px; background: var(--chip); text-decoration: none; font-size: 14px; }
.legend { display: flex; justify-content: space-between; font-size: 14px; margin: 6px 0 12px; flex-wrap: wrap; gap: 8px; }
.verdict { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.verdict > div { background: var(--chip); padding: 10px 12px; border-radius: 8px; }
.verdict .muted { display: block; font-size: 12px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 14px; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } nav a { margin-left: 10px; font-size: 14px; } .grid { grid-template-columns: 1fr; } }

.t { border-collapse: collapse; width: 100%; font-size: 14px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.t th, .t td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.t th { color: var(--muted); font-weight: 500; font-size: 13px; }
.t tr.sum td { font-weight: 700; }
.panel:has(.wide) { overflow-x: auto; }
.matrix { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; margin: 0 auto; }
.matrix th, .matrix td { width: 44px; height: 30px; text-align: center; }
.matrix th { color: var(--muted); font-weight: 500; }
.matrix td { border-radius: 4px; }
.matrix td.mh { background: color-mix(in srgb, var(--home) calc(var(--a) * 100%), transparent); }
.matrix td.md { background: color-mix(in srgb, var(--draw) calc(var(--a) * 100%), transparent); }
.matrix td.ma { background: color-mix(in srgb, var(--away) calc(var(--a) * 100%), transparent); }
.scores { display: flex; flex-wrap: wrap; gap: 6px; }
.scores span { background: var(--chip); padding: 4px 8px; border-radius: 6px; font-size: 13px; }

.form { display: flex; gap: 2px; margin-top: 4px; }
.form i { font-style: normal; font-size: 10px; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; color: #fff; font-weight: 700; }
.f-В { background: var(--good); } .f-Н { background: var(--draw); } .f-П { background: var(--bad); }
.team.right .form { justify-content: flex-end; }
.match-head { margin-top: 12px; }
.match-head .comp { color: var(--muted); font-size: 14px; }
.back { display: inline-block; margin-top: 16px; color: var(--muted); text-decoration: none; font-size: 14px; }
.news { padding: 8px 0; border-bottom: 1px solid var(--line); }
.news:last-child { border: 0; }
.news a { text-decoration: none; font-weight: 500; }
.news a:hover { text-decoration: underline; }
.ai-panel { border-left: 4px solid var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 48px 16px; background: var(--surface); border-radius: 12px; border: 1px dashed var(--line); margin-top: 24px; }
.prose li { margin-bottom: 6px; }
.foot { padding: 32px 16px 48px; font-size: 13px; color: var(--muted); }
