/* ==========================================================================
   Aryan X-clusive — competition board
   Delayed public-source standings, results and fixtures.
   ========================================================================== */

.competition-hero .page-hero__meta {
  flex-wrap: wrap;
}

.competition-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0 18px;
}

.competition-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 860px;
}

.competition-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
    background 0.18s var(--ease);
}

.competition-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.competition-chip[aria-current="location"] {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

.competition-updated {
  flex-shrink: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  text-align: right;
}

.competition-board {
  border: 1px solid var(--line);
  background: var(--surface);
}

.competition-board__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.competition-crest {
  width: 54px;
  height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.competition-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1) brightness(1.5);
  opacity: 0.86;
}

.competition-board__title {
  min-width: 0;
}

.competition-board__title h2 {
  margin: 3px 0 5px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.competition-board__title p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.feed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.feed-badge::before {
  width: 5px;
  height: 5px;
  background: currentColor;
  content: "";
}

.feed-badge--live {
  border-color: rgba(199, 244, 100, 0.34);
  color: var(--gold);
}

.feed-badge--pending {
  border-color: rgba(199, 244, 100, 0.24);
  color: var(--gold);
}

.feed-badge--error {
  border-color: rgba(255, 77, 61, 0.34);
  color: var(--brick);
}

.competition-board__source {
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.competition-board__source a {
  color: var(--gold);
  text-underline-offset: 3px;
}

.competition-board__source a:hover {
  color: var(--ink);
}

.competition-board__body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.competition-board__body--stacked {
  grid-template-columns: minmax(0, 1fr);
}

.competition-board__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.competition-board__foot p {
  max-width: 62ch;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.competition-board__foot .btn {
  flex-shrink: 0;
}

.data-section {
  min-width: 0;
  padding: 22px;
}

.data-section + .data-section {
  border-top: 1px solid var(--line);
}

.competition-board__body > .data-section:first-child {
  grid-row: span 2;
}

.competition-board__body > .data-section:not(:first-child) {
  border-top: 0;
  border-left: 1px solid var(--line);
}

.competition-board__body > .data-section:nth-child(3) {
  border-top: 1px solid var(--line);
}

.data-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.data-section__head h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.data-section__head p {
  max-width: 28ch;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.55;
  letter-spacing: 0.03em;
  text-align: right;
}

.data-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  white-space: nowrap;
}

.data-table thead th {
  padding: 0 7px 9px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.data-table thead th.num,
.data-table td.num {
  text-align: right;
}

.data-table tbody td,
.data-table tbody th {
  padding: 9px 7px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  text-align: left;
}

.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th {
  border-bottom: 0;
}

.data-table tbody th {
  font-weight: 500;
}

.data-table .position {
  width: 28px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.data-table .team-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table .num {
  font-family: var(--font-mono);
  font-size: 9px;
}

.data-table .points {
  color: var(--gold);
  font-weight: 600;
}

.form-line {
  display: inline-flex;
  gap: 3px;
}

.form-badge {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 500;
  line-height: 1;
}

.form-badge--w {
  border-color: rgba(199, 244, 100, 0.4);
  color: var(--gold);
}

.form-badge--d {
  border-color: var(--line-strong);
  color: var(--ink-2);
}

.form-badge--l {
  border-color: rgba(255, 77, 61, 0.38);
  color: var(--brick);
}

.match-list {
  display: grid;
  gap: 0;
}

.match-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.match-row:last-child {
  border-bottom: 0;
}

.match-row__date {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.match-row__date span {
  display: block;
  color: var(--cream-3);
}

.match-row__teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
}

.match-row__team {
  min-width: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
}

.match-row__team--away {
  text-align: right;
}

.match-row__score {
  min-width: 38px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.match-row__score--live {
  color: var(--gold);
}

.match-row__status {
  display: flex;
  justify-content: flex-end;
}

.status-pill {
  padding: 4px 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill--live {
  border-color: rgba(199, 244, 100, 0.36);
  color: var(--gold);
}

.status-pill--ft {
  border-color: var(--line-strong);
  color: var(--ink-2);
}

.empty-panel {
  padding: 24px 22px;
  border: 1px dashed var(--line-strong);
  background: rgba(244, 241, 232, 0.02);
}

.empty-panel h3 {
  margin-bottom: 6px;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.empty-panel p {
  max-width: 58ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.competition-loading {
  padding: 34px 22px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.competition-footnote {
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.competition-footnote strong {
  color: var(--ink-2);
  font-weight: 500;
}

.tag.is-live {
  border-color: rgba(199, 244, 100, 0.38);
  color: var(--gold);
}

.tag.is-pending {
  border-color: rgba(199, 244, 100, 0.24);
  color: var(--gold);
}

.tag.is-unavailable {
  border-color: rgba(255, 77, 61, 0.34);
  color: var(--brick);
}

.league-tile {
  color: var(--ink);
  text-decoration: none;
}

.competition-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.competition-note a {
  color: var(--gold);
}

@media (max-width: 1000px) {
  .competition-board__body {
    grid-template-columns: 1fr;
  }

  .competition-board__body > .data-section:first-child {
    grid-row: auto;
  }

  .competition-board__body > .data-section:not(:first-child) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 700px) {
  .competition-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .competition-updated {
    text-align: left;
  }

  .competition-board__head {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .feed-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .data-section {
    padding: 18px;
  }

  .data-section__head {
    flex-direction: column;
    gap: 5px;
  }

  .data-section__head p {
    text-align: left;
  }

  .data-table thead th,
  .data-table tbody td,
  .data-table tbody th {
    padding-left: 4px;
    padding-right: 4px;
  }

  .data-table .position {
    width: 20px;
  }

  .data-table .team-name {
    max-width: 145px;
  }

  .competition-board__foot {
    align-items: stretch;
    flex-direction: column;
  }

  .competition-board__foot .btn {
    width: 100%;
  }

  .match-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
  }

  .match-row__date {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
  }

  .match-row__status {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .match-row__teams {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
  }

  .match-row__team {
    grid-column: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .match-row__team--away {
    grid-row: 2;
    text-align: left;
  }

  .match-row__score {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 380px) {
  .data-table thead th,
  .data-table tbody td,
  .data-table tbody th {
    padding-left: 3px;
    padding-right: 3px;
  }

  .form-line {
    gap: 2px;
  }

  .data-table thead th:nth-child(7),
  .data-table thead th:nth-child(8),
  .data-table thead th:nth-child(9),
  .data-table tbody td:nth-child(7),
  .data-table tbody td:nth-child(8),
  .data-table tbody td:nth-child(9) {
    display: none;
  }
}
