.category-hero,
.category-board {
  display: grid;
  gap: 22px;
  padding-top: var(--section-space);
}

.category-summary-copy {
  display: grid;
  gap: 8px;
}

.category-page-title {
  margin: 0;
}

.category-title-shell {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.category-title-badge {
  flex: 0 0 auto;
}

.category-title-text {
  color: #f8fafc;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 0.92;
  text-transform: uppercase;
}

.category-summary-actions {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.category-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: #eef2f5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.category-home-link:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.category-hero-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.category-panel,
.category-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-surface);
  box-shadow: var(--shadow-subtle);
}

.section-kicker,
.standings-title {
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.category-next-event {
  display: grid;
  padding: 0;
}

.next-event-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 28px 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid rgba(255, 255, 255, 0.16);
  border-radius: calc(var(--radius-lg) - 2px);
  background: var(--panel-surface-soft);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.next-event-card::before,
.category-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  pointer-events: none;
}

.next-event-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 24%), rgba(28, 28, 28, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.18);
}

.next-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.next-event-date {
  color: #d9e7f5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.next-event-name {
  color: #f8fafc;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 50px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 0.92;
  text-transform: uppercase;
}

.next-event-circuit {
  color: #eef2f6;
  font-size: 18px;
  font-weight: 700;
}

.next-event-location,
.category-next-empty {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.next-event-time {
  color: #dce8f5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-event-link {
  color: #eef6ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.next-event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.next-event-status-stack {
  display: grid;
  gap: 9px;
}

.next-event-timing {
  color: #d7eaff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.next-event-card[data-category-code="f1"] { border-left-color: var(--f1); }
.next-event-card[data-category-code="f2"] { border-left-color: var(--f2); }
.next-event-card[data-category-code="f3"] { border-left-color: var(--f3); }
.next-event-card[data-category-code="motogp"] { border-left-color: #b4bcc8; }
.next-event-card[data-category-code="wec"] { border-left-color: var(--wec); }
.next-event-card[data-category-code="tc"] { border-left-color: #9b8765; }
.next-event-card[data-category-code="tcp"] { border-left-color: var(--tcp); }
.next-event-card[data-category-code="tcm"] { border-left-color: var(--tcm); }
.next-event-card[data-category-code="tcpm"] { border-left-color: var(--tcpm); }
.next-event-card[data-category-code="tcpk"] { border-left-color: var(--tcpu); }
.next-event-card[data-category-code="tcppk"] { border-left-color: var(--tcppu); }
.next-event-card[data-category-code="tc2000"] { border-left-color: var(--tc2000); }
.next-event-card[data-category-code="tr"] { border-left-color: var(--tr); }
.next-event-card[data-category-code="t4000"] { border-left-color: var(--t4000); }
.next-event-card[data-category-code="bora"] { border-left-color: var(--bora); }
.next-event-card[data-category-code="tp"],
.next-event-card[data-category-code="tpc3"] { border-left-color: var(--tp-c3); }
.next-event-card[data-category-code="tpc2"] { border-left-color: var(--tp-c2); }
.next-event-card[data-category-code="tpc1"] { border-left-color: var(--tp-c1); }
.next-event-card[data-category-code="tnc2"] { border-left-color: var(--tn-c2); }
.next-event-card[data-category-code="tnc3"],
.next-event-card[data-category-code="tn"] { border-left-color: var(--tn); }

.category-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 26px 28px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.category-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.category-label {
  color: #f6f8fb;
  font-size: 17px;
  font-weight: 700;
}

.category-supporting-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.category-total {
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.category-calendar-list {
  display: grid;
}

.category-event {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: center;
  padding: 18px 28px;
  border-top: 1px solid var(--line-soft);
  color: inherit;
  text-decoration: none;
}

.category-event:first-child {
  border-top: 0;
}

.category-event:hover {
  background: rgba(255, 255, 255, 0.03);
}

.category-event.is-live {
  background: linear-gradient(90deg, rgba(229, 72, 77, 0.08), transparent 38%);
}

.category-event-date {
  display: grid;
  gap: 10px;
  align-content: start;
}

.category-event-date-range {
  color: #e2e8ef;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.event-meta {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.event-name {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
}

.circuit {
  color: var(--muted);
  font-size: 14px;
}

.location-block {
  display: grid;
  justify-items: end;
  gap: 10px;
  text-align: right;
}

.location {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.event-link {
  color: #f2f5f9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.winner-line {
  margin-top: 2px;
}

.standings-card {
  position: relative;
  overflow: hidden;
}

.standings-stack {
  display: grid;
  gap: 0;
}

.standings-stack-dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.standings-section {
  padding: 24px 28px 28px;
  border-top: 1px solid var(--line-soft);
}

.standings-stack .standings-section:first-child {
  border-top: 0;
}

.standings-stack-dual .standings-section {
  border-top: 0;
}

.standings-stack-dual .standings-section + .standings-section {
  border-left: 1px solid var(--line-soft);
}

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

.standings-section-count {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.standings-table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
}

.standings-table th,
.standings-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

.standings-table th {
  color: var(--faint);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
}

.standings-table tr:last-child td {
  border-bottom: 0;
}

.standings-table tbody tr {
  background: transparent;
}

.standings-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.standings-row.is-top-three {
  background: rgba(255, 255, 255, 0.02);
}

.standings-row.is-top-1 {
  background: linear-gradient(90deg, rgba(198, 161, 91, 0.1), rgba(198, 161, 91, 0.02));
}

.standings-row.is-top-2,
.standings-row.is-top-3 {
  background: rgba(255, 255, 255, 0.03);
}

.standings-pos-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #edf2f7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.standings-name {
  color: #f7f9fb;
  font-size: 14px;
  font-weight: 700;
}

.standings-team {
  color: var(--muted);
  font-size: 13px;
}

.standings-wins,
.standings-points {
  color: #edf2f7;
  font-size: 12px;
  font-weight: 800;
}

.standings-empty {
  padding: 18px 0 2px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .standings-stack-dual {
    grid-template-columns: 1fr;
  }

  .standings-stack-dual .standings-section + .standings-section {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }

  .category-event {
    grid-template-columns: 1fr;
  }

  .location-block {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .summary,
  .category-head {
    grid-template-columns: 1fr;
  }

  .category-summary-actions,
  .location-block {
    justify-items: start;
  }

  .category-title-shell {
    align-items: flex-start;
  }

  .category-title-text {
    font-size: clamp(30px, 12vw, 46px);
  }

  .next-event-card,
  .category-head,
  .standings-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .category-event {
    padding: 16px 20px;
  }

  .standings-table-wrap {
    overflow-x: auto;
  }

  .standings-table {
    min-width: 560px;
  }
}
