@font-face {
  font-family: "Plex Arabic";
  src: url("./plex-en-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Plex Arabic";
  src: url("./plex-ar-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "Plex Arabic";
  src: url("./plex-en-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Plex Arabic";
  src: url("./plex-ar-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  color-scheme: light;
  --ink: #14261e;
  --muted: #4e6057;
  --paper: #f5f5ec;
  --surface: #fffef8;
  --tint: #eef0e5;
  --line: #d4d9cb;
  --green: #103529;
  --night: #08231c;
  --light-text: #e2ebe3;
  --lime: #d5f26e;
  --lime-hover: #e3fa98;
  --link: #275c44;
  --focus: #47732d;
  --radius: .65rem;
  --gutter: clamp(1rem, 3.3vw, 2.5rem);
  --max: 77rem;
  font-family: "Plex Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.22; }
p + p { margin-block-start: .65rem; }
strong, b { font-weight: 600; }
a { color: var(--link); text-underline-offset: .19em; }
a:hover { text-decoration-thickness: .12em; }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; }
button, select { color: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
:where([id]) { scroll-margin-block-start: 1rem; }
.wrap { width: min(100%, var(--max)); padding-inline: var(--gutter); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 5;
  inset-block-start: .75rem;
  inset-inline-start: var(--gutter);
  transform: translateY(-160%);
  background: var(--lime);
  color: var(--night);
  border-radius: var(--radius);
  padding: .65rem .9rem;
}
.skip-link:focus { transform: none; }

.topbar, .site-footer {
  --focus: var(--lime);
  background: var(--night);
  color: var(--light-text);
}
.topbar { border-block-end: 1px solid #315146; }
.nav-shell {
  min-height: 4rem;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  gap: clamp(.85rem, 2.7vw, 2.8rem);
  align-items: center;
}
.brand {
  display: inline-flex;
  gap: .55rem;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.brand::before {
  content: "";
  width: .24rem;
  height: 1.25em;
  background: var(--lime);
  flex: none;
}
.main-nav {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(.6rem, 2vw, 1.45rem);
  align-items: center;
  justify-content: center;
}
.main-nav a, .language {
  display: inline-flex;
  min-height: 2.7rem;
  align-items: center;
  color: inherit;
  font-size: .93rem;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a { border-block-end: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"], .main-nav .active {
  color: #fff;
  border-block-end-color: var(--lime);
}
.main-nav a:focus-visible { outline-offset: -2px; }
.language {
  border: 1px solid #436458;
  min-height: 2.25rem;
  padding-inline: .7rem;
  border-radius: .35rem;
  justify-self: end;
  color: #fff;
  font-weight: 600;
}
.language:hover { background: #173e31; }

.hero {
  --focus: var(--lime);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--night);
  color: var(--light-text);
  border-block-end: 1px solid #29483b;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
}
.hero::before {
  background: url("./stadium.webp") center 42% / cover no-repeat;
}
.hero::after {
  background: linear-gradient(to left, #08231c 4%, #08231ced 36%, #08231c58 61%, #08231c19 100%);
}
html[dir="ltr"] .hero::before, html:not([dir]) .hero::before { transform: scaleX(-1); }
html[dir="ltr"] .hero::after, html:not([dir]) .hero::after {
  background: linear-gradient(to right, #08231c 4%, #08231ced 36%, #08231c58 61%, #08231c19 100%);
}
.hero-inner {
  display: grid;
  justify-items: start;
  align-content: center;
  padding-block: clamp(2.4rem, 5vw, 4.2rem);
  min-height: clamp(20rem, 30vw, 27rem);
}
.hero h1 {
  color: #fff;
  max-width: 14ch;
  font-size: clamp(2.8rem, 6.5vw, 5.35rem);
  line-height: 1.04;
  letter-spacing: -.055em;
  text-wrap: balance;
}
[dir="rtl"] .hero h1 { letter-spacing: 0; font-size: clamp(2.65rem, 5.7vw, 4.9rem); line-height: 1.13; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-block-end: .9rem;
  color: var(--lime);
  font-weight: 600;
  font-size: .94rem;
  line-height: 1.2;
}
.eyebrow::before { content: ""; display: inline-block; width: 2rem; height: .11rem; background: currentColor; }
.hero .lead {
  margin-block-start: .95rem;
  max-width: min(46ch, 56%);
  color: #ecf2ec;
  font-size: clamp(1rem, 1.7vw, 1.23rem);
  text-wrap: pretty;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  margin-block-start: 1.14rem;
}
.button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem 1rem;
  border: 1px solid transparent;
  border-radius: .4rem;
  background: var(--lime);
  color: #183124;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}
.button:hover { background: var(--lime-hover); }
.button.secondary, .button--secondary, .button.outline, .button[data-variant="secondary"] {
  background: transparent;
  border-color: #8a9c8d;
  color: var(--green);
}
.button.secondary:hover, .button--secondary:hover, .button.outline:hover { background: var(--tint); }
.hero .button.secondary, .hero .button--secondary, .hero .button.outline, .hero .button[data-variant="secondary"] { color: #fff; border-color: #90ab99; }
.hero .button.secondary:hover, .hero .button--secondary:hover, .hero .button.outline:hover { background: #134537; }

main.wrap { padding-block-end: clamp(2.5rem, 6vw, 5rem); }
.section { margin-block-start: clamp(1.65rem, 4vw, 3.25rem); min-width: 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 1.3rem;
  row-gap: .35rem;
  flex-wrap: wrap;
  margin-block-end: .8rem;
}
.section h2, .section-head h2 { font-size: clamp(1.55rem, 3.25vw, 2.3rem); }
.section-head h2 {
  position: relative;
  padding-inline-start: .72rem;
  color: #152d22;
}
.section-head h2::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: .15em;
  width: .22rem;
  background: #a0ba3a;
}
.section-head a:not(.button), .section > a:not(.button) { font-weight: 600; }
.section-copy, .lead { max-width: 68ch; color: var(--muted); }
.section-copy { margin-block: -.25rem .85rem; }
.meta, .muted, .date-label { color: var(--muted); font-size: .9rem; }
.meta { margin-block-start: .65rem; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .65rem;
  align-items: center;
  margin-block: 1.15rem .85rem;
  font-size: .92rem;
  color: var(--muted);
}
.breadcrumbs ol, .breadcrumbs ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  gap: .35rem .65rem;
  padding: 0;
  margin: 0;
}
.breadcrumbs li + li::before { content: "/"; margin-inline-end: .65rem; color: var(--muted); }
.page-head {
  background: var(--green);
  color: #fff;
  padding: clamp(1.15rem, 4vw, 2.7rem) clamp(1rem, 3.6vw, 2.35rem);
  border-radius: var(--radius);
  border-inline-start: .23rem solid #a0ba3a;
  margin-block: 1.15rem 1.6rem;
}
.page-head h1 { font-size: clamp(1.95rem, 5vw, 3.55rem); text-wrap: balance; overflow-wrap: anywhere; }
.page-head :is(p, .lead, .meta) { color: var(--light-text); margin-block-start: .65rem; }
.page-head a:not(.button) { color: var(--lime); }
.page-head > .button { margin-block-start: 1rem; }

.table-frame {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.table-frame table, .standings-table, .scorers-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.table-frame table caption { padding: .7rem .85rem; color: var(--muted); text-align: start; }
.table-frame thead, .standings-table thead, .scorers-table thead { background: var(--green); color: #fff; }
.table-frame :is(th, td), .standings-table :is(th, td), .scorers-table :is(th, td) {
  padding: .55rem clamp(.4rem, 1.25vw, .95rem);
  font-size: .96rem;
  text-align: center;
  vertical-align: middle;
  line-height: 1.3;
}
.table-frame :is(th, td):nth-child(2), .scorers-table :is(th, td):nth-child(2), .scorers-table :is(th, td):nth-child(3) { text-align: start; }
.table-frame th { font-weight: 600; }
.table-frame tbody tr + tr { border-block-start: 1px solid var(--line); }
.table-frame tbody tr:nth-child(even) { background: #f8f9f1; }
.table-frame tbody th a, .table-frame tbody td a { color: var(--ink); font-weight: 600; }
.standings-table td:last-child { font-weight: 600; background: #f0f4e3; }
.table-frame .club { display: inline-flex; justify-content: start; text-align: start; }
.table-frame a:not(:hover), .fixture-card a:not(:hover), .result-list a:not(:hover) { text-decoration: none; }

.date-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-block: .5rem .85rem;
}
.date-tabs a, .date-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: .4rem .8rem;
  border: 1px solid #bec9ba;
  border-radius: .4rem;
  background: var(--surface);
  color: var(--ink);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}
.date-tabs a:hover, .date-tabs button:hover { border-color: var(--link); }
.date-tabs :is([aria-current="page"], [aria-current="date"], [aria-current="true"], [aria-selected="true"], .current, .active, .is-active) {
  background: var(--lime);
  border-color: #a7c450;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .65rem .8rem;
  padding: .9rem;
  margin-block: .8rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters label {
  display: grid;
  gap: .24rem;
  flex: 1 1 10rem;
  min-width: min(100%, 9rem);
  max-width: 15rem;
  font-size: .94rem;
  font-weight: 600;
}
.filters :is(input, select) {
  min-width: 0;
  width: 100%;
  background-color: var(--paper);
  color: var(--ink);
  min-height: 2.75rem;
  padding: .45rem .6rem;
  border: 1px solid #a8b5a5;
  border-radius: .4rem;
  font-weight: 400;
}
.filters select {
  appearance: none;
  padding-inline-end: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 1.02rem center, right .77rem center;
  background-repeat: no-repeat;
  background-size: .25rem .25rem;
}
[dir="rtl"] .filters select { background-position: left .77rem center, left 1.02rem center; }
.filters > a { display: inline-flex; min-height: 2.75rem; align-items: center; padding-inline: .3rem; }

.fixtures-grid, .panel-grid { display: grid; gap: clamp(.7rem, 2vw, 1.1rem); min-width: 0; }
.fixtures-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.fixture-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: .78rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-block-start: .18rem solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  padding: .8rem clamp(.75rem, 1.65vw, 1.1rem);
}
.fixture-card:focus-within { border-color: var(--link); }
.fixture-card > a, a.fixture-card { color: inherit; }
a.fixture-card:hover { border-color: var(--link); text-decoration: none; }
.fixture-top, .fixture-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem .85rem;
  color: var(--muted);
  font-size: .9rem;
  min-width: 0;
}
.fixture-top .meta, .fixture-bottom .meta { margin: 0; }
.fixture-card .fixture-bottom { border-block-start: 1px solid var(--line); padding-block-start: .6rem; }
.status {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 1.65rem;
  border-radius: .3rem;
  padding: .15rem .5rem;
  background: #e9ede3;
  color: #354b3e;
  font-size: .86rem;
  line-height: 1.15;
  font-weight: 600;
}
.status.is-live, .status.live { color: #8a231d; background: #f9e5e0; }
.status.is-live::before, .status.live::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; margin-inline-end: .32rem; }
.match-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(.3rem, 1.2vw, .75rem);
  min-height: 3.2rem;
}
.club {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.club-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.28rem;
  height: 1.4rem;
  flex: none;
  background: var(--club-color, #365e4a);
  color: #fff;
  clip-path: polygon(50% 0%, 96% 17%, 91% 70%, 50% 100%, 9% 70%, 4% 17%);
  font-size: .62rem;
  overflow: hidden;
}
img.club-icon { object-fit: contain; background: none; clip-path: none; }
.match-line .club:last-child { text-align: end; justify-content: end; }
.match-line .club:last-child .club-icon { order: 1; }
.score {
  min-width: 4.25rem;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  font-size: clamp(1.08rem, 2.4vw, 1.4rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}
.weather {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-self: start;
  min-width: 0;
  max-width: 100%;
  gap: .35rem;
  min-height: 1.65rem;
  border-radius: .3rem;
  padding: .12rem .45rem;
  background: #edf2de;
  color: #3d502e;
  line-height: 1.25;
}
.weather a { color: inherit; margin: 0; overflow-wrap: anywhere; }
.weather bdi, .fixture-bottom time bdi { white-space: nowrap; }

.clubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: .7rem;
}
.clubs-grid > .club {
  min-height: 3.35rem;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
}
.clubs-grid > .club:hover { border-color: var(--link); text-decoration: underline; }

.panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block-start: clamp(1.65rem, 4vw, 3.25rem); }
.panel-grid > .section, .panel {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(.8rem, 2.25vw, 1.35rem);
  min-width: 0;
}
.panel-grid h2 { font-size: clamp(1.3rem, 2.7vw, 1.85rem); }
.panel-grid .fixtures-grid { grid-template-columns: minmax(0, 1fr); }
.result-list { list-style: none; padding: 0; margin: 0; }
.result-row, .result-row > a { min-width: 0; }
.result-row {
  padding: .58rem .14rem;
  color: var(--ink);
  border-block-end: 1px solid var(--line);
}
a.result-row { display: block; }
.result-row a { color: inherit; }
.result-row .match-line { min-height: 2.3rem; }
.result-row:hover { background: #f0f3e7; }
.notice {
  background: var(--tint);
  border: 1px solid var(--line);
  border-inline-start: .2rem solid #7f985b;
  border-radius: .35rem;
  color: #374b37;
  padding: .75rem .95rem;
  margin-block: .65rem .8rem;
  overflow-wrap: anywhere;
}
.sources { border-block-start: 1px solid var(--line); margin-block-start: 1.8rem; padding-block-start: .95rem; color: var(--muted); font-size: .93rem; }
.sources:has(> a) { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.sources summary { color: var(--ink); cursor: pointer; font-weight: 600; }
.sources ul { margin-block: .45rem; padding-inline-start: 1.25rem; }
.site-footer { padding-block: 1.6rem; }
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem 1.5rem;
  align-items: start;
  justify-content: space-between;
  font-size: .93rem;
}
.footer-grid a { color: inherit; }
.footer-grid .brand { color: #fff; }
.footer-grid .meta { color: var(--light-text); }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: .35rem 1.05rem; }

@media (max-width: 58rem) {
  .nav-shell { gap: 0 1rem; grid-template-rows: auto auto; min-height: 0; }
  .brand, .language { margin-block: .55rem; }
  .language { grid-column: 3; grid-row: 1; }
  .main-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: start;
    gap: 0 1rem;
    border-block-start: 1px solid #315146;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-inline: .2rem;
    scrollbar-width: thin;
    scrollbar-color: #7b9388 transparent;
  }
  .main-nav a { flex: none; }
}

@media (max-width: 42rem) {
  .main-nav { flex-wrap: wrap; gap: 0 .65rem; overflow-x: visible; padding-inline: 0; }
  .main-nav a { min-height: 2.35rem; }
  .hero::before { background-image: url("./stadium-mobile.webp"); background-position: left top; }
  .hero::after, html[dir="ltr"] .hero::after, html:not([dir]) .hero::after { background: linear-gradient(to top, #08231c 0%, #08231cef 36%, #08231c65 75%, #08231c30 100%); }
  .hero-inner { min-height: 21.5rem; padding-block: 4.75rem 1.6rem; align-content: end; }
  .hero h1, [dir="rtl"] .hero h1 { max-width: 100%; font-size: clamp(2.2rem, 8.25vw, 3.1rem); text-wrap: pretty; }
  .hero .lead { max-width: 100%; margin-block-start: .55rem; }
  .hero .eyebrow { margin-block-end: .55rem; }
  .hero .button-row { margin-block-start: .8rem; }
  .panel-grid { grid-template-columns: minmax(0, 1fr); }
  .table-frame :is(th, td) { font-size: .9rem; padding: .55rem .4rem; }
  .table-frame .club-icon { width: 1rem; height: 1.08rem; }
  .table-frame :is(.optional, .extra, .desktop-only, .detail-col, .hide-mobile) { display: none; }
  .hero + main #table .standings-table tbody tr:nth-child(n + 4) { display: none; }
  .weather a { flex-basis: 100%; }
  .page-head { border-radius: .55rem; }
}

@media (max-width: 32rem) {
  .filters label { flex-basis: 100%; max-width: none; }
}

@media print {
  body, :root { background: #fff; }
  .topbar, .hero::before, .hero::after, .date-tabs, .site-footer, .button-row { display: none; }
  .hero, .page-head, .table-frame thead { background: #fff; color: #182b24; }
  .hero :is(h1, .lead, .eyebrow), .page-head .lead { color: #182b24; }
  .hero-inner { min-height: 0; padding-block: 1rem; }
  .fixture-card, .result-row { break-inside: avoid; }
}
