:root {
  --bg: #f3f5f4; --card: #fff; --ink: #14201a; --muted: #6b7a72; --line: #e3e8e5;
  --brand: #0b1d14; --accent: #f2b705; --live: #e5332a; --win: #1f9d55; --draw: #9aa5a0; --loss: #d64545;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.site-head { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 10; }
.head-row { display: flex; align-items: center; gap: 18px; height: 54px; }
.logo { font-weight: 800; font-size: 19px; text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo img { display: block; height: 40px; width: auto; }
.foot-brand { margin: 0 0 6px; } .foot-brand img { display: block; height: 32px; width: auto; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav a { text-decoration: none; padding: 6px 10px; border-radius: 6px; font-weight: 600; font-size: 14px; opacity: .9; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.1); opacity: 1; }

main { padding: 18px 14px 40px; }
h1 { font-size: 26px; line-height: 1.2; margin: 6px 0 6px; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.lede { color: var(--muted); margin: 0 0 16px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { text-decoration: none; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .grid, .grid.two { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.prose p { margin: 0 0 10px; }
.more { font-weight: 600; font-size: 14px; text-decoration: none; color: #0a6b3d; }
.btn { display: inline-block; background: var(--brand); color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; margin: 4px; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }

/* match rows */
.day { margin-bottom: 10px; }
.day-h { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 4px; }
.mrow { display: grid; grid-template-columns: 56px 1fr 64px 1fr; align-items: center; gap: 8px; padding: 9px 6px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .3s; }
.mrow:last-child { border-bottom: 0; }
.mrow:hover { background: #f7faf8; }
.mtime { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mteam.home { text-align: right; }
.mscore { text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.state-live .mtime, .state-live [data-f="label"] { color: var(--live); font-weight: 700; }
.state-live .mscore { color: var(--live); }
.state-upcoming .mscore { color: var(--muted); font-weight: 600; }
.flash { background: #fff6d6 !important; }
.live-card { border-color: #f3c2bf; }
.pulse { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--live); margin-right: 4px; animation: pulse 1.4s infinite; vertical-align: middle; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229,51,42,.6); } 70% { box-shadow: 0 0 0 8px rgba(229,51,42,0); } 100% { box-shadow: 0 0 0 0 rgba(229,51,42,0); } }

/* hero / scoreboard */
.hero, .scoreboard { text-align: center; }
.hero-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hero-row, .sb-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; text-decoration: none; margin: 10px 0 6px; }
.hero-team, .sb-team { font-weight: 700; font-size: 18px; text-decoration: none; }
.hero-team:first-child, .sb-team:first-child { text-align: right; }
.hero-team:last-child, .sb-team:last-child { text-align: left; }
.hero-score, .sb-score { font-size: 30px; font-weight: 800; min-width: 90px; font-variant-numeric: tabular-nums; }
.sb-row { font-size: inherit; margin: 14px 0 6px; }
.sb-team { font-size: 22px; }
.sb-score { font-size: 40px; }
.sb-status { font-weight: 700; }
.hero-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
@media (max-width: 560px) { .sb-team, .hero-team { font-size: 15px; } .sb-score { font-size: 30px; min-width: 70px; } }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.ev { display: grid; grid-template-columns: 44px 26px 1fr; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ev.away { direction: rtl; text-align: right; }
.ev.away > * { direction: ltr; }
.ev-min { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }

/* tables */
.table-scroll { overflow-x: auto; }
.standings { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.standings th, .standings td { padding: 7px 6px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.standings th { font-size: 12px; color: var(--muted); font-weight: 600; }
.standings .l { text-align: left; }
.standings td.l a { text-decoration: none; font-weight: 600; }
.standings tr.hl td { background: #fff6d6; }
.standings.compact { font-size: 13px; }
.form i, .form a { display: inline-block; width: 20px; height: 20px; line-height: 20px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 700; font-style: normal; text-align: center; margin-right: 2px; text-decoration: none; }
.fW { background: var(--win); } .fD { background: var(--draw); } .fL { background: var(--loss); }

.stats, .h2h-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin-bottom: 12px; }
.h2h-bar { grid-template-columns: repeat(3, 1fr); }
.stats div, .h2h-bar div { background: var(--bg); border-radius: 8px; padding: 10px 4px; }
.stats b, .h2h-bar b { display: block; font-size: 22px; }
.stats span, .h2h-bar span { font-size: 12px; color: var(--muted); }

.hist-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.links { list-style: none; padding: 0; margin: 0; columns: 1; }
.links li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.links a { text-decoration: none; }
.team-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.team-grid a { display: block; padding: 12px; background: var(--bg); border-radius: 8px; text-decoration: none; font-weight: 600; }
.players { padding-left: 0; list-style: none; margin: 0 0 8px; }
.players li { padding: 3px 0; }
.players .num { display: inline-block; width: 26px; color: var(--muted); font-variant-numeric: tabular-nums; }

.site-foot { border-top: 1px solid var(--line); background: #fff; padding: 18px 0; font-size: 13px; }

@media (max-width: 560px) {
  h1 { font-size: 22px; }
  .head-row { gap: 10px; }
  .logo { font-size: 16px; flex-shrink: 0; } .logo img { height: 28px; }
  .nav a { padding: 6px 7px; font-size: 13px; }
  .mrow { grid-template-columns: 40px 1fr 46px 1fr; gap: 6px; font-size: 14px; padding: 9px 2px; }
  .mtime { font-size: 12px; }
  .card { padding: 13px; }
}

/* compact rows inside two-column blocks (h2h page) */
.grid.two .mrow { grid-template-columns: 40px 1fr 34px 1fr; gap: 6px; font-size: 13px; padding: 7px 2px; }
.grid.two .mtime { font-size: 12px; }

/* Cup games shown among league games */
.comp-tag { display: block; font-size: 11px; font-weight: 600; color: var(--muted, #6b7280); text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; }
.mteam.home .comp-tag { text-align: inherit; }
