:root {
  --bg: #f6f7f8;
  --panel: #ffffff;
  --panel2: #f3f5f6;
  --line: #e2e5e8;
  --text: #25282b;
  --muted: #707982;
  --red: #da291c;
  --red-soft: #fff0ef;
  --gold: #a66c16;
}

/* The configured brand is loaded before these data pages are revealed. */
body:not(.site-name-ready) > header,
body:not(.site-name-ready) > main { visibility: hidden; }

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "DM Sans", "Noto Sans SC", sans-serif;
}

body::before { display: none; }
a { color: inherit; text-decoration: none; }
button,
select { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 0 rgba(37, 40, 43, .025);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
}

.top-actions,
.hero-actions { display: flex; gap: 9px; }

.btn {
  display: inline-flex;
  height: 35px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #dce1e5;
  border-radius: 6px;
  background: #fff;
  color: #5f6871;
  font-size: 11px;
  font-weight: 600;
}

.btn i { width: 15px; }
.btn:hover { border-color: #edaaa4; background: #fff7f6; color: var(--red); }
.btn.primary { border-color: var(--red); background: var(--red); color: #fff; }
.btn.primary:hover { border-color: #bc2117; background: #bc2117; color: #fff; }

.page { max-width: 1180px; margin: 0 auto; padding: 36px 28px 70px; }

.crumb {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  color: #7b858e;
  font-size: 11px;
}

.crumb a { color: #5f6871; }
.crumb a:hover { color: var(--red); }

.hero {
  display: flex;
  align-items: center;
  gap: 19px;
  padding: 26px 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(37, 40, 43, .04);
}

.hero-logo { width: 68px; height: 68px; flex: 0 0 68px; object-fit: contain; }
.hero-copy { min-width: 0; flex: 1; }
.eyebrow { color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }
.hero h1 { margin: 7px 0; color: var(--text); font-size: 28px; line-height: 1.25; }
.hero p { margin: 0; color: var(--muted); font-size: 12px; }
.hero-actions { align-self: flex-end; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin: 16px 0; }
.metric { padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 3px 10px rgba(37, 40, 43, .03); }
.metric strong { color: var(--text); font-size: 21px; }
.metric span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }

.grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); gap: 15px; align-items: start; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 5px 16px rgba(37, 40, 43, .04); }
.panel-head { display: flex; min-height: 53px; align-items: center; justify-content: space-between; gap: 14px; padding: 0 17px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; color: var(--text); font-size: 14px; }
.panel-head a { color: var(--red); font-size: 11px; font-weight: 700; }
.panel-head > span,
.panel [style*="color"],
.row-main [style*="color"] { color: var(--muted) !important; }

.rows { padding: 4px 17px 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf0f2; }
.row:last-child { border-bottom: 0; }
.row:hover { background: #fff9f8; }
.logo { width: 34px; height: 34px; flex: 0 0 34px; object-fit: contain; }
.row-logo-pair { display: flex; flex: 0 0 auto; align-items: center; }
.row-logo-pair .logo + .logo { margin-left: -10px; border: 2px solid #fff; border-radius: 50%; background: #fff; }
.panel-note { margin: 0; padding: 12px 17px; border-bottom: 1px solid #edf0f2; color: var(--muted); font-size: 11px; }
.row-main { min-width: 0; flex: 1; }
.row-main strong { display: block; color: #30363b; font-size: 12px; }
.row-main span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.row-time { color: var(--red); font-size: 11px; font-weight: 700; text-align: right; white-space: nowrap; }
.row-link { border: 0; background: transparent; color: var(--red); font-size: 10px; font-weight: 700; }
.row-link:hover { color: #b92016; }

.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 14px 17px 17px; }
.team-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #e5e8eb; border-radius: 7px; background: #fff; }
.team-card:hover { border-color: #efaaa4; background: #fff8f7; }
.team-card .logo { width: 31px; height: 31px; flex-basis: 31px; }
.team-card strong { color: #30363b; font-size: 11px; }
.team-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }

.table-wrap { overflow: auto; }
table { width: 100%; min-width: 640px; border-collapse: collapse; }
th,
td { padding: 12px 15px; border-bottom: 1px solid #edf0f2; color: #4e5861; font-size: 11px; text-align: left; }
th { color: #7b858e; font-size: 10px; font-weight: 700; }
tr:hover td { background: #fff9f8; }
tr:last-child td { border-bottom: 0; }
.rank { color: var(--red); font-weight: 800; }
.form { color: #6e7880; font-size: 10px; }
.standing-team { display: flex; align-items: center; gap: 8px; color: #30363b; }
.standing-team img { width: 22px; height: 22px; object-fit: contain; }

.fixture-day { padding: 11px 17px; border-bottom: 1px solid #edc2be; background: #fff5f4; color: var(--red); font-size: 11px; font-weight: 800; }
.skeleton { height: 13px; margin: 12px 17px; border-radius: 4px; background: #e9ecef; }
.empty { padding: 40px; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 8; padding: 11px 15px; border-radius: 6px; background: var(--red); color: #fff; font-size: 11px; box-shadow: 0 8px 22px rgba(218, 41, 28, .19); transform: translateY(60px); opacity: 0; transition: .2s; }
.toast.show { transform: none; opacity: 1; }
.back { display: inline-flex; align-items: center; gap: 7px; color: #5f6871; font-size: 11px; }
.back i { width: 15px; }
.league-mark { background: #fff0ef !important; color: var(--red) !important; }
.panel p[style] { color: #59636c !important; }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; }
  .hero-actions { align-self: center; }
}

@media (max-width: 620px) {
  .topbar { height: 62px; padding: 0 15px; }
  .brand { font-size: 15px; }
  .top-actions .btn { width: 35px; padding: 0; justify-content: center; }
  .top-actions .btn:not(.primary) { font-size: 0; }
  .top-actions .btn i { width: 16px; }
  .page { padding: 25px 14px 50px; }
  .hero { display: block; padding: 21px; }
  .hero-logo { width: 54px; height: 54px; margin-bottom: 10px; }
  .hero h1 { font-size: 23px; }
  .hero-actions { margin-top: 17px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .panel-head { padding: 0 14px; }
  .rows { padding-right: 14px; padding-left: 14px; }
  .row { gap: 9px; }
}
