:root {
  --bg: #0c0e12;
  --card: #151922;
  --card-2: #1c2230;
  --line: #2c3444;
  --ink: #f4f6f8;
  --muted: #9aa3b2;
  --accent: #ff7a18;
  --accent-2: #ffb067;
  --pos: #7dcea0;
  --neg: #e07a68;
  --shadow: 0 18px 40px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(255, 122, 24, .16), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--line);
}

.brand {
  margin: 0;
  line-height: 0;
}

.brand a {
  display: block;
}

.brand img {
  display: block;
  width: 200px;
  height: auto;
  max-width: 100%;
}

.filters {
  display: flex;
  gap: 12px;
  margin: 0 0 10px;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

select {
  min-width: 148px;
  appearance: none;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa3b2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") right 12px center no-repeat;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 36px 10px 12px;
  font: 600 14px/1.2 Manrope, "Segoe UI", sans-serif;
}

select:disabled { opacity: .7; }

.archive {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.archive li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
}

.archive strong {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 22px;
  letter-spacing: .03em;
}

.archive span {
  color: var(--muted);
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .85fr);
  gap: 16px;
  align-items: start;
  margin-top: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 18px 12px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.card-head h2,
.section-head h2,
.error-card h2 {
  margin: 0;
  font-size: 20px;
}

.card-head p,
.section-head p,
.note,
.empty p,
.foot p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.table-wrap {
  margin: 0 -6px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { color: var(--muted); }
.team { font-weight: 600; }
.pts { color: var(--accent); font-weight: 800; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

tbody tr:hover td { background: rgba(255, 122, 24, .07); }

.note { margin: 12px 0 6px; }

.fixture-card { min-height: 280px; }

.empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  padding: 12px 8px 20px;
}

.empty strong { font-size: 18px; }

.fixture-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fixture-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.when {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.sides {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.sides span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sides span:last-child { text-align: right; }
.sides strong {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 22px;
  letter-spacing: .04em;
}

.records { margin-top: 4px; }

.section-head { margin-bottom: 14px; }
.section-head h2 { font-size: 28px; letter-spacing: -.02em; }
.section-head p { max-width: 62ch; margin-top: 4px; }

.boxes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 168px;
  background:
    linear-gradient(180deg, rgba(255, 122, 24, .18), transparent 42%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px 12px;
}

.cat {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.val {
  margin: 2px 0 6px;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 56px;
  line-height: .85;
  letter-spacing: .02em;
}

.who { font-weight: 700; }
.meta, .season { color: var(--muted); font-size: 13px; }
.season { margin-top: 6px; }

.group-title {
  margin: 18px 0 8px;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.card > .group-title:first-of-type { margin-top: 4px; }

.place {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.error-card p { margin-top: 8px; color: var(--ink); }

.foot { margin-top: 28px; }

@media (max-width: 900px) {
  .top, .layout { display: block; }
  .filters { margin-top: 16px; }
  .brand img { width: 168px; }
  .boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-wrap { max-height: none; }
}

@media (max-width: 560px) {
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  select { min-width: 0; width: 100%; }
  .boxes { grid-template-columns: 1fr; }
}
