:root {
  --standings-red: #e41421;
  --standings-gold: #f0c51a;
  --standings-panel: #0d0d0d;
  --standings-border: #303030;
  --standings-muted: #8d8d8d;
}

* {
  box-sizing: border-box;
}

body.standings-page {
  margin: 0;
  min-height: 100vh;
  background: #030303;
  color: #fff;
  font-family: "Kanit", sans-serif;
}

.standings-shell {
  width: min(1500px, calc(100% - 24px));
  margin: 14px auto 36px;
}

.standings-header,
.standings-card {
  border: 1px solid var(--standings-border);
  background: var(--standings-panel);
}

.standings-header {
  border-top: 6px solid var(--standings-red);
}

.standings-brand {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px 30px 22px;
  border-bottom: 4px solid var(--standings-gold);
}

.standings-eyebrow {
  margin: 0 0 6px;
  color: var(--standings-gold);
  font-size: .76rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: .08em;
}

.standings-brand h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  font-style: italic;
  line-height: .95;
}

.standings-brand p:last-child {
  margin: 12px 0 0;
  color: #aaa;
}

.standings-logo {
  width: min(185px, 24vw);
  height: auto;
}

.standings-status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 13px 18px;
  background: #080808;
}

.standings-status-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.standings-status-row strong {
  font-size: .77rem;
  letter-spacing: .06em;
}

.standings-status-row span:last-child {
  color: #8f8f8f;
  font-size: .72rem;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ed875;
  box-shadow: 0 0 12px rgba(78, 216, 117, .6);
}

#refreshStandings {
  padding: 8px 14px;
  border: 1px solid #444;
  background: #101010;
  color: #fff;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}

.standings-card {
  margin-top: 14px;
  overflow: hidden;
}

.standings-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--standings-border);
  background: #080808;
}

.standings-tab {
  padding: 13px 18px;
  border: 0;
  border-right: 1px solid #292929;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #a6a6a6;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 900;
  font-style: italic;
  cursor: pointer;
}

.standings-tab.active {
  border-bottom-color: var(--standings-red);
  color: #fff;
}

.standings-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 11px 16px;
  border-bottom: 1px solid #242424;
  background: #060606;
  color: #8b8b8b;
  font-size: .68rem;
}

.standings-key strong {
  color: #d5d5d5;
}

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

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

.standings-table th,
.standings-table td {
  padding: 8px 9px;
  border-right: 1px solid #242424;
  border-bottom: 1px solid #242424;
  text-align: center;
  font-size: .78rem;
}

.standings-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #151515;
  color: #bdbdbd;
  font-size: .65rem;
  letter-spacing: .06em;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2),
.standings-table th:nth-child(4),
.standings-table td:nth-child(4) {
  text-align: left;
}

.standings-table tbody tr:nth-child(even) {
  background: #080808;
}

.standings-table tbody tr:hover {
  background: #121212;
}

.standings-pos {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 28px;
  border: 1px solid #444;
  font-weight: 900;
}

.standings-pos.leader {
  border-color: var(--standings-gold);
  background: var(--standings-gold);
  color: #080808;
}

.standings-driver-name {
  white-space: nowrap;
}

.standings-cat {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin: 1px;
  border: 1px solid #474747;
  background: #151515;
  font-size: .63rem;
  font-weight: 900;
}

.standings-drop {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: #777;
  text-decoration: line-through;
}

.standings-drop small {
  color: var(--standings-red);
  font-size: .48rem;
  font-weight: 900;
  text-decoration: none;
}

.standings-dsq {
  color: #ff7d86;
  font-size: .67rem;
  font-weight: 900;
}

.standings-total {
  color: var(--standings-gold);
  font-size: 1rem;
}

.standings-lap {
  white-space: nowrap;
  color: #d8d8d8;
}

.standings-muted {
  color: #626262;
}

.standings-message,
.standings-empty {
  padding: 30px;
  color: #858585;
  text-align: center;
}

.standings-message.error {
  color: #ff8e96;
}

.hidden {
  display: none !important;
}

.team-table {
  min-width: 900px;
}

.team-table th:nth-child(3),
.team-table td:nth-child(3) {
  text-align: left;
}

@media (max-width: 700px) {
  .standings-shell {
    width: min(100% - 12px, 1500px);
    margin-top: 6px;
  }

  .standings-brand {
    padding: 20px 18px;
  }

  .standings-logo {
    width: 105px;
  }

  .standings-status-row {
    align-items: stretch;
    flex-direction: column;
  }

  #refreshStandings {
    width: 100%;
  }

  .standings-tab {
    flex: 1 1 auto;
    padding: 11px 10px;
  }
}


/* =====================================================
   TEST MODE
===================================================== */
.standings-test-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid #ff7b00;
  border-left: 5px solid #ff7b00;
  background: rgba(255, 123, 0, .09);
  color: #ffd1a1;
}

.standings-test-banner strong {
  color: #ff9f40;
  letter-spacing: .09em;
}

@media (max-width: 700px) {
  .standings-test-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}
