:root {
  --seo-desktop: #3f7772;
  --seo-desktop-dark: #285c58;
  --seo-window: #d4d0c8;
  --seo-navy: #0a246a;
  --seo-blue: #2f7ed8;
  --seo-link: #0000ee;
  --seo-text: #111;
  --seo-muted: #4b4b4b;
  --seo-green: #0b6f42;
  --seo-red: #9d1f1f;
}

* { box-sizing: border-box; }

html { color-scheme: light; background: var(--seo-desktop); }

body {
  min-width: 280px;
  margin: 0;
  color: var(--seo-text);
  background:
    linear-gradient(rgba(40, 92, 88, .82), rgba(40, 92, 88, .92)),
    url("/assets/matchpuls-program-header-v1.webp") center top / cover fixed;
  font: 13px/1.45 Tahoma, Verdana, Arial, sans-serif;
}

a { color: var(--seo-link); }
a:hover { color: #551a8b; }
img { max-width: 100%; }

.seo-skip {
  position: fixed;
  z-index: 100;
  top: 6px;
  left: 6px;
  padding: 7px 10px;
  color: #000;
  background: #fff;
  border: 2px solid #000;
  transform: translateY(-150%);
}
.seo-skip:focus { transform: none; }

.seo-desktop {
  width: min(1180px, calc(100% - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
  background: var(--seo-window);
  border: 2px solid;
  border-color: #fff #111 #111 #fff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .38);
}

.seo-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  padding: 3px 4px 3px 7px;
  color: #fff;
  background: linear-gradient(90deg, var(--seo-navy), #a6caf0);
  font-weight: 700;
}

.seo-titlebar a {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #000;
  background: var(--seo-window);
  border: 0;
  box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080;
  text-decoration: none;
}

.seo-menubar {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 3px 4px;
  border-bottom: 1px solid #808080;
  box-shadow: 0 1px #fff;
}

.seo-menubar a {
  padding: 3px 8px;
  color: #000;
  text-decoration: none;
}
.seo-menubar a:hover,
.seo-menubar a[aria-current="page"] { color: #fff; background: var(--seo-navy); }

.seo-hero {
  position: relative;
  min-height: 150px;
  display: grid;
  align-content: end;
  padding: 24px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(3, 28, 66, .94), rgba(12, 82, 106, .58)),
    url("/assets/matchpuls-program-header-v1.webp") center / cover;
  border-bottom: 2px solid;
  border-color: #808080 #fff #fff #808080;
}

.seo-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.035) 3px 4px);
}

.seo-hero > * { position: relative; z-index: 1; }
.seo-hero p { max-width: 760px; margin: 7px 0 0; color: #edf7ff; font-size: 14px; }
.seo-kicker { margin: 0 0 4px; color: #ffe98a; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
h1 { margin: 0; font-size: clamp(25px, 4vw, 40px); line-height: 1.1; text-shadow: 2px 2px #00153f; }
h2 { margin: 0 0 12px; color: #061d4b; font-size: 19px; line-height: 1.2; }
h3 { margin: 0 0 6px; font-size: 15px; }

.seo-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 7px 10px;
  color: var(--seo-muted);
  background: #efefef;
  border-bottom: 1px solid #808080;
}
.seo-breadcrumbs a { color: #001b74; }

.seo-content { padding: 14px; }
.seo-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.seo-span-12 { grid-column: span 12; }
.seo-span-8 { grid-column: span 8; }
.seo-span-6 { grid-column: span 6; }
.seo-span-4 { grid-column: span 4; }

.seo-panel {
  min-width: 0;
  padding: 12px;
  background: #f8f8f8;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}

.seo-panel > header {
  margin: -10px -10px 12px;
  padding: 6px 8px;
  color: #fff;
  background: linear-gradient(90deg, var(--seo-navy), var(--seo-blue));
  font-weight: 700;
}

.seo-intro { max-width: 80ch; font-size: 14px; }
.seo-updated { color: var(--seo-muted); font-size: 11px; }

.seo-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.seo-stat {
  padding: 10px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  text-align: center;
}
.seo-stat strong { display: block; color: var(--seo-navy); font-size: 24px; }
.seo-stat span { color: var(--seo-muted); }

.seo-table-wrap { max-width: 100%; overflow-x: auto; border: 2px solid; border-color: #808080 #fff #fff #808080; }
.seo-table { width: 100%; border-collapse: collapse; background: #fff; white-space: nowrap; }
.seo-table th,
.seo-table td { padding: 5px 7px; border: 1px solid #b8b8b8; text-align: right; }
.seo-table th { color: #fff; background: var(--seo-navy); }
.seo-table th:nth-child(2), .seo-table td:nth-child(2) { text-align: left; }
.seo-table tbody tr:nth-child(even) { background: #ededed; }
.seo-table a { font-weight: 700; }

.seo-list { margin: 0; padding: 0; list-style: none; }
.seo-list > li { border-top: 1px solid #b8b8b8; }
.seo-list > li:first-child { border-top: 0; }
.seo-list > li > a,
.seo-list > li > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 8px 4px; align-items: center; }
.seo-list strong { color: #061d4b; }
.seo-list small { display: block; color: var(--seo-muted); }

.seo-match-link { text-decoration: none; }
.seo-match-link:hover strong { text-decoration: underline; }
.seo-score {
  display: inline-grid;
  min-width: 52px;
  min-height: 28px;
  place-items: center;
  padding: 3px 7px;
  color: #000;
  background: #fff8c6;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  font-weight: 700;
}
.seo-score.is-upcoming { color: #fff; background: var(--seo-navy); }

.seo-team-card,
.seo-player-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  min-height: 74px;
  padding: 9px;
  color: #000;
  background: #fff;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  text-decoration: none;
}
.seo-team-card:hover,
.seo-player-card:hover { background: #e7f1ff; }
.seo-team-card img,
.seo-player-card img,
.seo-fallback-avatar {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #aaa;
}
.seo-player-card img { object-fit: cover; }
.seo-team-card small,
.seo-player-card small { display: block; margin-top: 3px; color: var(--seo-muted); }

.seo-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seo-alpha { margin: 18px 0 6px; padding: 4px 7px; color: #fff; background: var(--seo-navy); }
.seo-chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.seo-chip-list a,
.seo-chip-list span { display: inline-block; padding: 4px 7px; color: #000; background: #fff; border: 2px solid; border-color: #fff #808080 #808080 #fff; }

.seo-profile {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.seo-profile-image {
  width: 130px;
  max-height: 170px;
  object-fit: contain;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}
.seo-profile dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 10px; margin: 0; }
.seo-profile dt { color: var(--seo-muted); font-weight: 700; }
.seo-profile dd { margin: 0; }

.seo-match-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}
.seo-match-team { display: grid; justify-items: center; gap: 7px; color: #061d4b; text-align: center; text-decoration: none; }
.seo-match-team img { width: 76px; height: 76px; object-fit: contain; }
.seo-match-result { min-width: 92px; text-align: center; }
.seo-match-result strong { display: block; font-size: 30px; }
.seo-match-result small { color: var(--seo-muted); }

.seo-definition { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: #aaa; border: 1px solid #aaa; }
.seo-definition > div { padding: 8px; background: #fff; }
.seo-definition dt { color: var(--seo-muted); font-weight: 700; }
.seo-definition dd { margin: 2px 0 0; }

.seo-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  color: #fff;
  background: var(--seo-navy);
}
.seo-button {
  display: inline-block;
  padding: 6px 12px;
  color: #000;
  background: var(--seo-window);
  border: 0;
  box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080;
  text-decoration: none;
}

.seo-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-top: 1px solid #808080;
  box-shadow: inset 0 1px #fff;
  color: #333;
  font-size: 11px;
}
.seo-footer nav { display: flex; flex-wrap: wrap; gap: 10px; }

.seo-empty { padding: 14px; color: var(--seo-muted); background: #fff; border: 1px solid #aaa; }
.seo-positive { color: var(--seo-green); }
.seo-negative { color: var(--seo-red); }

@media (max-width: 820px) {
  .seo-desktop { width: calc(100% - 12px); min-height: calc(100vh - 12px); margin: 6px; }
  .seo-content { padding: 8px; }
  .seo-grid { gap: 8px; }
  .seo-span-8, .seo-span-6, .seo-span-4 { grid-column: span 12; }
  .seo-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-hero { min-height: 130px; padding: 16px; }
}

@media (max-width: 520px) {
  body { font-size: 12px; }
  .seo-menubar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seo-menubar a { padding: 6px 4px; text-align: center; }
  .seo-card-grid { grid-template-columns: 1fr; }
  .seo-profile { grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
  .seo-profile-image { width: 90px; max-height: 125px; }
  .seo-profile dl { grid-column: 1 / -1; }
  .seo-match-hero { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); gap: 5px; padding: 10px 5px; }
  .seo-match-team img { width: 48px; height: 48px; }
  .seo-match-team strong { font-size: 11px; }
  .seo-match-result { min-width: 0; }
  .seo-match-result strong { font-size: 22px; }
  .seo-definition { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
