:root {
  color-scheme: light;
  --page: #f6f7f1;
  --ink: #17201d;
  --muted: #66716d;
  --line: #d8ded8;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --wine: #8f2443;
  --gold: #b7791f;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(22, 32, 29, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.summary > span {
  min-width: 126px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: right;
}

.summary strong {
  display: block;
  color: var(--ink);
  font-size: 1.35rem;
}

.summary [data-i18n] {
  color: var(--wine);
  font-weight: 800;
}

.controls {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.7fr)) 44px;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 247, 241, 0.94);
  box-shadow: 0 12px 30px rgba(22, 32, 29, 0.08);
  backdrop-filter: blur(14px);
}

.field {
  display: grid;
  gap: 5px;
}

.field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.field input:focus,
.field select:focus,
.icon-button:focus {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  border-color: var(--accent);
}

.icon-button {
  align-self: end;
  width: 44px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
}

.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 1px 12px;
}

.day-tab {
  flex: 0 0 auto;
  min-width: 106px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.day-tab strong {
  display: block;
  font-size: 0.9rem;
}

.day-tab span {
  color: var(--muted);
  font-size: 0.74rem;
}

.day-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.day-tab.active span {
  color: rgba(255, 255, 255, 0.82);
}

.content {
  padding-top: 8px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.match-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 12px;
}

.match-card {
  display: grid;
  gap: 14px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 14px;
}

.match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue);
  font-weight: 800;
}

.teams {
  display: grid;
  gap: 10px;
}

.team-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
}

.crest {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.team-name {
  min-width: 0;
  font-size: 1rem;
  font-weight: 800;
}

.tla {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.score {
  min-width: 30px;
  text-align: right;
  font-size: 1.25rem;
  font-weight: 900;
}

.match-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.datetime strong {
  display: block;
  font-size: 1rem;
}

.datetime span,
.venue {
  color: var(--muted);
  font-size: 0.82rem;
}

.status {
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.empty-state {
  margin: 28px 0 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary {
    justify-content: flex-start;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .icon-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .match-list {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .summary > span {
    flex: 1 1 130px;
    text-align: left;
  }
}

.landing-page {
  background: #f8faf6;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 246, 0.92);
  backdrop-filter: blur(14px);
}

.site-nav a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.language-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 3px;
}

.language-toggle button {
  min-width: 38px;
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.language-toggle button.active {
  background: var(--ink);
  color: #fff;
}

.landing-page main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 42px;
  min-height: calc(100vh - 68px);
  padding: 48px 0 64px;
}

.hero-copy h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
}

.hero-copy p:not(.eyebrow) {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
}

.primary-action {
  background: var(--accent);
  color: #fff;
}

.secondary-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.hero-visual {
  display: grid;
  place-items: center;
  gap: 28px;
  min-height: 420px;
  border-left: 1px solid var(--line);
}

.hero-visual img {
  width: min(260px, 70%);
  height: auto;
  filter: drop-shadow(0 24px 28px rgba(22, 32, 29, 0.22));
}

.hero-visual div {
  text-align: center;
}

.hero-visual strong {
  display: block;
  color: var(--wine);
  font-size: 4.5rem;
  line-height: 0.9;
}

.hero-visual span {
  color: var(--muted);
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metrics div {
  min-height: 126px;
  background: #fff;
  padding: 18px;
}

.metrics strong,
.metrics span {
  display: block;
}

.metrics strong {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.metrics span {
  color: var(--muted);
  line-height: 1.45;
}

.api-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 26px;
  padding: 72px 0;
}

.endpoint-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.endpoint-list h2 {
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1;
}

.endpoint-list a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  text-decoration: none;
}

.code-panel {
  overflow: hidden;
  border-radius: 8px;
  background: #111917;
  color: #e9f7f2;
  box-shadow: var(--shadow);
}

.code-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  padding: 14px 16px;
}

.code-title span {
  font-weight: 900;
}

.code-title a {
  color: #8ee9d8;
  font-weight: 800;
  text-decoration: none;
}

.code-panel pre {
  margin: 0;
  overflow-x: auto;
  padding: 18px;
}

.code-panel code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.6;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-bottom: 32px;
}

.feature-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.feature-grid p {
  color: var(--muted);
  line-height: 1.5;
}

.docs-section {
  padding: 40px 0 76px;
}

.docs-heading {
  max-width: 760px;
  margin-bottom: 20px;
}

.docs-heading h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.98;
}

.docs-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.docs-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.docs-links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 900;
  text-decoration: none;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.doc-card {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.doc-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.doc-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.doc-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.doc-card pre {
  margin: 0;
  overflow-x: auto;
  border-radius: 6px;
  background: #111917;
  color: #e9f7f2;
  padding: 14px;
}

.doc-card code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
}

@media (max-width: 820px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .hero,
  .api-layout,
  .metrics,
  .feature-grid,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 38px;
  }

  .hero-visual {
    min-height: 280px;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 34px;
  }
}

@media (max-width: 520px) {
  .nav-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }
}
