:root {
  color-scheme: light;
  --plum: #37003c;
  --plum-deep: #210024;
  --purple: #6f2c91;
  --pink: #e90052;
  --aqua: #04f5ff;
  --lime: #00ff85;
  --ink: #241f25;
  --muted: #706a73;
  --paper: #ffffff;
  --wash: #f4f2f5;
  --line: #ded9e1;
  --positive: #007a49;
  --negative: #c8103c;
}

* { box-sizing: border-box; }

html {
  font-family: Arial, Helvetica, ui-sans-serif, system-ui, sans-serif;
  background: var(--wash);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, transparent 0 72%, #ece7ee 72% 74%, transparent 74%) 0 0 / 520px 520px,
    var(--wash);
}

button { font: inherit; }

.shell {
  width: min(1460px, 100%);
  margin: auto;
  padding: 0 34px 50px;
}

.topbar {
  min-height: 76px;
  margin: 0 -34px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  background: var(--plum-deep);
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--pink), #963cff 48%, var(--aqua)) 1;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--lime);
  color: var(--plum);
  font-size: 24px;
  font-weight: 900;
  transform: skew(-7deg);
}

.brand span:last-child { display: grid; }

.brand b,
.arsenal-head small {
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--lime);
}

.brand strong {
  margin-top: 2px;
  font-size: 17px;
  letter-spacing: -.02em;
}

.brand i {
  color: #baa9bd;
  font-style: normal;
  font-weight: 400;
}

.updated {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 55%;
  color: #d6cad8;
  font-size: 11px;
  text-align: right;
}

.updated i {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
}

.intro {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: end;
  gap: 32px;
  margin: 26px 0 22px;
  padding: 38px 36px 30px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(108deg, var(--plum) 0 57%, #55308c 74%, #167f92 100%);
}

.intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -62%;
  right: -5%;
  width: 42%;
  aspect-ratio: 1;
  border: 52px solid #04f5ff24;
  border-radius: 50%;
}

.live-pill {
  display: inline-flex;
  gap: 3px;
  padding: 6px 10px;
  color: var(--plum);
  background: var(--lime);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 14px 0 12px;
  font-size: clamp(40px, 4.8vw, 68px);
  line-height: .97;
  letter-spacing: -.055em;
}

h1 em {
  color: var(--lime);
  font-style: normal;
}

.intro p {
  max-width: 660px;
  margin: 0;
  color: #e5dce7;
  font-size: 14px;
  line-height: 1.55;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border-bottom: 5px solid var(--lime);
}

.metrics div { padding: 18px 17px 15px; }
.metrics div + div { border-left: 1px solid var(--line); }

.metrics small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.metrics b {
  display: block;
  margin-top: 7px;
  color: var(--plum);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
}

.metrics div:first-child b { color: var(--pink); }

.panel {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 3px 12px #37003c0a;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 15px;
  border-top: 5px solid var(--plum);
  border-bottom: 1px solid var(--line);
}

h2 {
  margin: 0;
  color: var(--plum);
  font-size: 17px;
  letter-spacing: -.025em;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #eee9ef;
}

.segmented button {
  padding: 7px 11px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #625b65;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.segmented button:hover { color: var(--plum); }

.segmented button.active {
  color: #fff;
  background: var(--plum);
  border-bottom-color: var(--lime);
}

.table-wrap { overflow: auto; }

table {
  width: 100%;
  min-width: 770px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #ece8ed;
  text-align: right;
  font-size: 13px;
}

th {
  color: #6f6871;
  background: #f3f0f4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

th:first-child,
td:first-child {
  width: 56px;
  padding-left: 20px;
  text-align: left;
}

th:nth-child(2),
td:nth-child(2) { text-align: left; }

th:last-child,
td:last-child { padding-right: 20px; }

tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #faf7fb; }

tbody tr.arsenal {
  background: #fff4f7;
  box-shadow: inset 5px 0 0 var(--pink);
}

.club {
  display: flex;
  align-items: center;
  gap: 12px;
}

.club-code {
  display: grid;
  place-items: center;
  width: 36px;
  height: 30px;
  color: var(--club);
  background: color-mix(in srgb, var(--club) 9%, white);
  border-bottom: 3px solid var(--club);
  font-size: 10px;
  font-weight: 900;
}

.delta { font-weight: 800; }
.delta.pos { color: var(--positive); }
.delta.neg { color: var(--negative); }
.delta.zero { color: #6e6870; }

.lower-grid {
  display: grid;
  grid-template-columns: 1.55fr .85fr;
  gap: 22px;
  margin-top: 22px;
}

.chart-panel { padding-bottom: 15px; }

.chart {
  height: 370px;
  padding: 10px 16px 0;
  background: linear-gradient(#fff, #fbfafb);
}

.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.axis { stroke: #ded9e1; stroke-width: 1; }
.axis-label { fill: #766f78; font-size: 10px; }
.route-label { fill: var(--positive); font-weight: 700; }
.zero-line { stroke: var(--lime); stroke-width: 2; stroke-dasharray: 6 5; }
.reference { fill: none; stroke: var(--purple); stroke-dasharray: 3 7; opacity: .34; }
.team-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { cursor: help; stroke: #fff; stroke-width: 1; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0 20px;
  color: #716a73;
  font-size: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i { width: 8px; height: 8px; border-radius: 50%; }

.lower-grid aside {
  display: grid;
  gap: 22px;
}

.arsenal-panel { border-top: 5px solid var(--pink); }

.arsenal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  color: #fff;
  background: var(--plum);
}

.arsenal-head h2 { margin-top: 4px; color: #fff; }

.arsenal-head > b {
  padding: 6px 9px;
  color: var(--plum);
  background: var(--lime);
  font-size: 11px;
}

.match {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #ece8ed;
}

.match-order {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--purple);
  font-size: 11px;
  font-weight: 800;
}

.match-main b { font-size: 12px; }
.match-main .venue { color: #776f79; }

.match-main small,
.match-score small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.match-score { text-align: right; }
.match-score b { color: var(--plum); font-size: 13px; }

.next {
  display: flex;
  justify-content: space-between;
  margin: 14px;
  padding: 12px;
  color: var(--plum);
  background: #efffea;
  border-left: 5px solid var(--lime);
  font-size: 11px;
}

.rules {
  padding: 19px;
  border-top: 5px solid var(--aqua);
}

.rules h2 { font-size: 14px; }

.rule-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 15px;
}

.rule-stats div {
  padding: 11px 4px;
  color: #fff;
  text-align: center;
  background: var(--plum);
}

.rule-stats div:nth-child(2) { background: var(--purple); }
.rule-stats div:nth-child(3) { background: #136c7d; }
.rule-stats b { font-size: 21px; }
.rule-stats small { display: block; margin-top: 4px; color: #e9e2eb; font-size: 9px; }
.rules > p { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  margin-top: 28px;
  padding: 18px 2px 0;
  color: #716a73;
  border-top: 4px solid var(--plum);
  font-size: 10px;
}

noscript { display: block; padding: 20px; text-align: center; }

@media (max-width: 1000px) {
  .intro,
  .lower-grid { grid-template-columns: 1fr; }
  .metrics { max-width: 620px; }
  .chart { height: 340px; }
}

@media (max-width: 700px) {
  .shell { padding: 0 14px 36px; }
  .topbar { margin: 0 -14px; padding: 0 14px; min-height: 70px; }
  .brand b { display: none; }
  .brand strong { font-size: 14px; }
  .updated { max-width: 48%; font-size: 9px; }
  .updated i { display: none; }
  .intro { margin-top: 14px; padding: 28px 20px 20px; }
  .intro::after { right: -25%; width: 75%; }
  h1 { font-size: clamp(38px, 12vw, 52px); }
  .intro p { font-size: 13px; }
  .metrics div { padding: 13px 9px; }
  .metrics b { font-size: 25px; }
  .metrics small { font-size: 7px; }
  .panel-head { flex-direction: column; }
  .chart { height: 300px; padding-left: 4px; padding-right: 4px; }
  .legend { padding: 0 14px; }
  .next,
  footer { flex-direction: column; }
}
