
/* ================================================================
   StreetKings Italia — Statistiche / V52
   ================================================================ */

.stats-page {
  min-height: 100vh;
  padding-top: 82px;
  background:
    radial-gradient(circle at 85% 0%, rgba(247,186,24,.055), transparent 28%),
    #080a0d;
}

.stats-hero {
  min-height: 390px;
}

.site-v54 .stats-hero::before {
  background:
    linear-gradient(90deg, #080a0df5 10%, #080a0ddd 48%, #080a0d73),
    linear-gradient(0deg, #080a0d 0%, transparent 66%),
    url('/assets/media/hero-incrocio.webp') center 58% / cover no-repeat;
}

.stats-hero-meta {
  margin-top: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.stats-live-chip,
.stats-refresh-copy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  color: #c2c8d0;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.stats-live-chip {
  padding: 8px 11px;
  border: 1px solid #ffffff20;
  background: #0d1117c9;
}

.stats-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6bdc8a;
  box-shadow: 0 0 0 4px rgba(107,220,138,.09);
}

.stats-live-chip.is-stale .stats-live-dot {
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(247,186,24,.09);
}

.stats-live-chip.is-offline .stats-live-dot {
  background: #e86262;
  box-shadow: 0 0 0 4px rgba(232,98,98,.09);
}

.stats-live-chip.is-stale { color: var(--yellow); }
.stats-live-chip.is-offline { color: #ef8787; }

.stats-dashboard {
  width: min(1360px, calc(100% - 56px));
  margin: 0 auto;
  padding: 54px 0 92px;
}

.stats-error {
  display: none;
  margin-bottom: 26px;
  padding: 18px 20px;
  border: 1px solid rgba(232,98,98,.32);
  border-left: 4px solid #e86262;
  background: rgba(232,98,98,.06);
  color: #d8dce2;
  line-height: 1.65;
}

.stats-error.visible {
  display: block;
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid #ffffff20;
  background: #0d1117;
}

.stats-overview-card {
  min-width: 0;
  min-height: 142px;
  padding: 21px 20px;
  border-right: 1px solid #ffffff18;
}

.stats-overview-card:last-child {
  border-right: 0;
}

.stats-overview-card small {
  display: block;
  min-height: 30px;
  color: #89919c;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .11em;
  line-height: 1.45;
  text-transform: uppercase;
}

.stats-overview-card strong {
  display: block;
  margin-top: 10px;
  color: #f5f6f4;
  font: 400 clamp(2.55rem, 3.5vw, 3.75rem)/.95 'Bebas Neue', Impact, sans-serif;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.stats-overview-card strong span {
  color: #707984;
  font-size: .5em;
}

.stats-overview-card.is-primary {
  background:
    linear-gradient(135deg, rgba(247,186,24,.10), transparent 66%),
    #10151c;
  border-top: 2px solid var(--yellow);
}

.stats-overview-card.is-primary strong {
  color: var(--yellow);
}

.stats-section {
  padding: 72px 0 0;
}

.stats-section + .stats-section {
  margin-top: 6px;
}

.stats-section-head {
  margin-bottom: 24px;
  padding-bottom: 19px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 34px;
  border-bottom: 1px solid #ffffff20;
}

.stats-section-head h2 {
  margin-top: 7px;
  color: #f5f6f4;
  font: 400 clamp(2.8rem, 4.4vw, 4.4rem)/.98 'Bebas Neue', Impact, sans-serif;
}

.stats-section-head > p {
  max-width: 520px;
  margin: 0 0 4px;
  color: #aeb5bf;
  font-size: .9rem;
  line-height: 1.65;
}

.stats-section-kicker {
  display: block;
  color: var(--yellow);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .13em;
}

.stats-panel {
  border: 1px solid #ffffff20;
  background: #0f141a;
}

.stats-panel-head {
  min-height: 72px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid #ffffff18;
}

.stats-panel-head > div:first-child {
  min-width: 0;
}

.stats-panel-head small {
  display: block;
  color: #818a95;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.stats-panel-head strong {
  display: block;
  margin-top: 5px;
  color: #edf0f3;
  font-size: .9rem;
  line-height: 1.45;
}

.stats-season-timer {
  flex: 0 0 auto;
  color: var(--yellow);
  font: 400 1.7rem/1 'Bebas Neue', Impact, sans-serif;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
}

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

.stats-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.stats-table th,
.stats-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid #ffffff12;
}

.stats-table th {
  color: #7e8792;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.stats-table td {
  color: #bfc5cd;
  font-size: .83rem;
  font-variant-numeric: tabular-nums;
}

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

.stats-table tbody tr:hover {
  background: #ffffff05;
}

.stats-table .rank {
  width: 58px;
  color: #8d96a1;
  font-weight: 800;
}

.stats-table .rank.is-podium {
  color: var(--yellow);
}

.stats-table .name {
  color: #f2f3f4;
  font-weight: 700;
}

.stats-table .score {
  color: var(--yellow);
  font-weight: 800;
}

.stats-state {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid #ffffff20;
  color: #8d96a1;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}

.stats-state.ok {
  border-color: rgba(107,220,138,.25);
  color: #7ce298;
  background: rgba(107,220,138,.055);
}

.stats-state.warn {
  border-color: rgba(247,186,24,.25);
  color: var(--yellow);
  background: rgba(247,186,24,.055);
}

.stats-empty {
  padding: 30px 20px;
  color: #8e96a0;
  font-size: .84rem;
  line-height: 1.6;
}

.stats-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 16px;
}

.stats-crew-list {
  display: grid;
}

.stats-crew-card {
  position: relative;
  padding: 19px 20px 18px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 13px 20px;
  border-bottom: 1px solid #ffffff12;
  overflow: hidden;
}

.stats-crew-card:last-child {
  border-bottom: 0;
}

.stats-crew-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--crew-color, var(--yellow));
}

.stats-crew-name {
  color: #f2f4f5;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.65rem;
  line-height: 1;
}

.stats-crew-name span {
  margin-left: 8px;
  color: #919aa5;
  font-family: Inter, sans-serif;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .09em;
}

.stats-crew-meta {
  margin-top: 7px;
  color: #8e97a2;
  font-size: .7rem;
  line-height: 1.55;
}

.stats-crew-members {
  text-align: right;
}

.stats-crew-members strong {
  display: block;
  color: #f4f5f6;
  font: 400 1.8rem/1 'Bebas Neue', Impact, sans-serif;
}

.stats-crew-members span {
  color: #7d8691;
  font-size: .6rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.stats-crew-status {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stats-recruiting {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #89929d;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.stats-recruiting::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5c6570;
}

.stats-recruiting.open {
  color: #7ce298;
}

.stats-recruiting.open::before {
  background: #6bdc8a;
}

.stats-car-top {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  border: 1px solid #ffffff20;
  background:
    linear-gradient(135deg, rgba(247,186,24,.065), transparent 55%),
    #0f141a;
}

.stats-car-top-main {
  padding: 28px;
  min-height: 190px;
  border-right: 1px solid #ffffff18;
}

.stats-car-top-main small {
  color: var(--yellow);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.stats-car-top-main h3 {
  margin-top: 14px;
  color: #f5f6f4;
  font: 400 clamp(2.8rem, 4vw, 4.1rem)/.95 'Bebas Neue', Impact, sans-serif;
}

.stats-car-top-main p {
  margin-top: 12px;
  color: #959eaa;
  font-size: .8rem;
  line-height: 1.6;
}

.stats-car-top-numbers {
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 20px;
}

.stats-car-number small {
  display: block;
  color: #7e8792;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.stats-car-number strong {
  display: block;
  margin-top: 8px;
  color: var(--yellow);
  font: 400 2.6rem/1 'Bebas Neue', Impact, sans-serif;
}

.stats-car-tabs {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-car-tab {
  min-width: 58px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #ffffff22;
  background: #0f141a;
  color: #9ba3ad;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .08em;
}

.stats-car-tab:is(:hover, .active) {
  border-color: var(--yellow);
  color: #080a0d;
  background: var(--yellow);
}

.stats-car-ranking {
  margin-top: 10px;
  border: 1px solid #ffffff20;
  background: #0f141a;
}

.stats-car-row {
  min-height: 66px;
  padding: 13px 18px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 95px 100px;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid #ffffff12;
}

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

.stats-car-row:hover {
  background: #ffffff04;
}

.stats-car-rank {
  color: #747d88;
  font-weight: 800;
}

.stats-car-row:nth-child(-n+3) .stats-car-rank {
  color: var(--yellow);
}

.stats-car-name strong {
  display: block;
  color: #edf0f2;
  font-size: .86rem;
}

.stats-car-name small {
  display: block;
  margin-top: 4px;
  color: #707986;
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.stats-car-count,
.stats-car-owners {
  text-align: right;
}

.stats-car-count strong,
.stats-car-owners strong {
  display: block;
  color: #f0f2f4;
  font: 400 1.45rem/1 'Bebas Neue', Impact, sans-serif;
}

.stats-car-count small,
.stats-car-owners small {
  color: #747d88;
  font-size: .55rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stats-races-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 16px;
}

.stats-race-highlight {
  padding: 27px;
  border: 1px solid #ffffff20;
  border-top: 2px solid var(--yellow);
  background:
    linear-gradient(135deg, rgba(247,186,24,.07), transparent 60%),
    #10151c;
}

.stats-race-highlight small {
  color: var(--yellow);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .11em;
}

.stats-race-highlight h3 {
  margin-top: 14px;
  color: #f5f6f4;
  font: 400 clamp(2.5rem, 4vw, 3.9rem)/.98 'Bebas Neue', Impact, sans-serif;
}

.stats-race-highlight-grid {
  margin-top: 27px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #ffffff18;
}

.stats-race-highlight-grid div {
  padding: 18px 12px 0 0;
}

.stats-race-highlight-grid small {
  color: #7d8691;
  font-size: .58rem;
}

.stats-race-highlight-grid strong {
  display: block;
  margin-top: 8px;
  color: #f1f3f4;
  font: 400 1.9rem/1 'Bebas Neue', Impact, sans-serif;
}

.stats-race-list {
  border: 1px solid #ffffff20;
  background: #0f141a;
}

.stats-race-row {
  min-height: 60px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 68px;
  gap: 13px;
  align-items: center;
  border-bottom: 1px solid #ffffff12;
}

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

.stats-race-row b {
  color: #737c87;
  font-size: .72rem;
}

.stats-race-row:nth-child(-n+3) b {
  color: var(--yellow);
}

.stats-race-row strong {
  display: block;
  color: #e9ecef;
  font-size: .76rem;
  line-height: 1.4;
}

.stats-race-row small {
  display: block;
  margin-top: 3px;
  color: #747d88;
  font-size: .58rem;
}

.stats-race-row span {
  text-align: right;
  color: #cdd1d6;
  font: 400 1.45rem/1 'Bebas Neue', Impact, sans-serif;
}

.stats-level-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
}

.stats-levels {
  padding: 22px;
  border: 1px solid #ffffff20;
  background: #0f141a;
}

.stats-level-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 48px;
  gap: 14px;
  align-items: center;
  min-height: 45px;
}

.stats-level-row + .stats-level-row {
  border-top: 1px solid #ffffff0f;
}

.stats-level-label {
  color: #9aa2ad;
  font-size: .68rem;
  font-weight: 800;
}

.stats-level-track {
  height: 7px;
  background: #202730;
  overflow: hidden;
}

.stats-level-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--yellow);
  transition: width .55s ease;
}

.stats-level-count {
  text-align: right;
  color: #eef0f2;
  font-weight: 800;
  font-size: .78rem;
}

.stats-level-summary {
  padding: 24px;
  border: 1px solid rgba(247,186,24,.28);
  background:
    linear-gradient(135deg, rgba(247,186,24,.075), transparent 70%),
    #0f141a;
}

.stats-level-summary small {
  color: #7e8792;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.stats-level-summary strong {
  display: block;
  margin-top: 10px;
  color: var(--yellow);
  font: 400 4rem/.95 'Bebas Neue', Impact, sans-serif;
}

.stats-level-summary p {
  margin-top: 10px;
  color: #969faa;
  font-size: .72rem;
  line-height: 1.55;
}

.stats-global-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #ffffff20;
  border-left: 1px solid #ffffff20;
}

.stats-global-card {
  min-height: 150px;
  padding: 22px;
  border-right: 1px solid #ffffff20;
  border-bottom: 1px solid #ffffff20;
  background: #0f141a;
}

.stats-global-card small {
  display: block;
  color: #7c8590;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.45;
  text-transform: uppercase;
}

.stats-global-card strong {
  display: block;
  margin-top: 14px;
  color: #f2f3f4;
  font: 400 clamp(2.2rem, 3vw, 3rem)/1 'Bebas Neue', Impact, sans-serif;
  font-variant-numeric: tabular-nums;
}

.stats-global-card.highlight strong {
  color: var(--yellow);
}

.stats-sponsor-strip {
  margin-top: 16px;
  min-height: 92px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border: 1px solid #ffffff20;
  background: #0f141a;
}

.stats-sponsor-strip small {
  color: #7d8691;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.stats-sponsor-strip strong {
  display: block;
  margin-top: 6px;
  color: #f0f2f4;
  font-size: .93rem;
}

.stats-sponsor-number {
  text-align: right;
}

.stats-sponsor-number b {
  display: block;
  color: var(--yellow);
  font: 400 2.3rem/1 'Bebas Neue', Impact, sans-serif;
}

.stats-sponsor-number span {
  color: #7f8893;
  font-size: .59rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stats-privacy {
  margin-top: 64px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid #ffffff20;
  color: #7e8792;
  font-size: .68rem;
  line-height: 1.65;
}

.stats-privacy strong {
  color: #aeb5bd;
}

.stats-loading {
  animation: statsPulse 1.4s ease-in-out infinite;
}

@keyframes statsPulse {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

@media (max-width: 1120px) {
  .stats-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-overview-card:nth-child(3) {
    border-right: 0;
  }

  .stats-overview-card:nth-child(-n+3) {
    border-bottom: 1px solid #ffffff18;
  }

  .stats-two-column,
  .stats-races-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .stats-dashboard {
    width: min(100% - 40px, 1360px);
    padding-top: 40px;
  }

  .stats-section {
    padding-top: 58px;
  }

  .stats-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .stats-section-head > p {
    max-width: 100%;
  }

  .stats-car-top,
  .stats-level-layout {
    grid-template-columns: 1fr;
  }

  .stats-car-top-main {
    border-right: 0;
    border-bottom: 1px solid #ffffff18;
  }

  .stats-global-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-privacy {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 580px) {
  .stats-dashboard {
    width: min(100% - 32px, 1360px);
  }

  .stats-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-overview-card {
    min-height: 124px;
    border-bottom: 1px solid #ffffff18;
  }

  .stats-overview-card:nth-child(3) {
    border-right: 1px solid #ffffff18;
  }

  .stats-overview-card:nth-child(even) {
    border-right: 0;
  }

  .stats-overview-card:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .stats-car-row {
    grid-template-columns: 34px minmax(0, 1fr) 68px;
  }

  .stats-car-owners {
    display: none;
  }

  .stats-race-highlight-grid {
    grid-template-columns: 1fr;
  }

  .stats-race-highlight-grid div {
    border-top: 1px solid #ffffff12;
  }

  .stats-global-grid {
    grid-template-columns: 1fr;
  }

  .stats-sponsor-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-sponsor-number {
    text-align: left;
  }

  .stats-hero-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stats-loading,
  .stats-level-bar {
    animation: none !important;
    transition: none !important;
  }
}


/* =================================================================
   STREETKINGS ITALIA V65 — PUBLIC RACE ANALYTICS
   ================================================================= */

.stats-race-summary {
  display:grid;
  grid-template-columns:1.5fr repeat(3,minmax(0,1fr));
  gap:8px;
}

.stats-race-summary-card {
  min-height:118px;
  padding:18px;
  border:1px solid #ffffff1d;
  background:#0f141a;
}

.stats-race-summary-card.is-featured {
  border-top:2px solid var(--yellow);
  background:
    linear-gradient(130deg,rgba(247,186,24,.065),transparent 58%),
    #0f141a;
}

.stats-race-summary-card small {
  display:block;
  color:#737d88;
  font-size:.54rem;
  font-weight:800;
  letter-spacing:.1em;
}

.stats-race-summary-card.is-featured small {
  color:var(--yellow);
}

.stats-race-summary-card strong {
  display:block;
  margin-top:9px;
  color:#f0f2f4;
  font:400 1.9rem/1 'Bebas Neue',Impact,sans-serif;
}

.stats-race-summary-card.is-featured strong {
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.stats-race-summary-card > span {
  display:block;
  margin-top:8px;
  color:#69737e;
  font-size:.58rem;
}

.stats-race-summary-card > span b {
  color:#d8dde1;
  font-weight:800;
}

.stats-race-browser {
  margin-top:10px;
  border:1px solid #ffffff1d;
  background:#0d1218;
}

.stats-race-browser-head {
  min-height:82px;
  padding:15px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  border-bottom:1px solid #ffffff17;
}

.stats-race-browser-head > div:first-child small {
  color:var(--yellow);
  font-size:.5rem;
  font-weight:900;
  letter-spacing:.1em;
}

.stats-race-browser-head > div:first-child strong {
  display:block;
  margin-top:5px;
  color:#edf0f2;
  font:400 1.45rem/1 'Bebas Neue',Impact,sans-serif;
}

.stats-race-controls {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}

.stats-race-search {
  min-width:220px;
  height:38px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 11px;
  border:1px solid #ffffff1b;
  background:#090d12;
}

.stats-race-search span {
  color:#69737e;
  font-size:.85rem;
}

.stats-race-search input {
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#e9ecef;
  font:inherit;
  font-size:.62rem;
}

.stats-race-search input::placeholder {
  color:#525c66;
}

.stats-race-sort {
  display:flex;
  gap:5px;
  flex-wrap:wrap;
}

.stats-race-sort button {
  min-height:38px;
  padding:8px 10px;
  border:1px solid #ffffff18;
  background:#10161d;
  color:#727c87;
  cursor:pointer;
  font-size:.48rem;
  font-weight:900;
  letter-spacing:.06em;
}

.stats-race-sort button:is(:hover,.active) {
  border-color:var(--yellow);
  color:#080a0d;
  background:var(--yellow);
}

.stats-race-table-head,
.stats-race-directory-row {
  display:grid;
  grid-template-columns:minmax(230px,1.8fr) .58fr .72fr .72fr .82fr .72fr 26px;
  gap:12px;
  align-items:center;
}

.stats-race-table-head {
  min-height:39px;
  padding:0 14px;
  border-bottom:1px solid #ffffff12;
  color:#535e68;
  font-size:.44rem;
  font-weight:900;
  letter-spacing:.08em;
}

.stats-race-table-head span:not(:first-child) {
  text-align:right;
}

.stats-race-directory {
  max-height:620px;
  overflow:auto;
  scrollbar-width:thin;
  scrollbar-color:#3d4650 #0d1218;
}

.stats-race-directory-row {
  width:100%;
  min-height:63px;
  padding:9px 14px;
  border:0;
  border-bottom:1px solid #ffffff0e;
  background:transparent;
  color:inherit;
  cursor:pointer;
  text-align:left;
  transition:background .14s ease,border-color .14s ease;
}

.stats-race-directory-row:last-child {
  border-bottom:0;
}

.stats-race-directory-row:hover {
  background:#ffffff04;
}

.stats-race-directory-name {
  min-width:0;
}

.stats-race-directory-name strong {
  display:block;
  color:#e9ecef;
  font-size:.66rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.stats-race-directory-name small {
  display:block;
  margin-top:4px;
  color:#59646f;
  font-size:.44rem;
  font-weight:800;
  letter-spacing:.08em;
}

.stats-race-directory-row > b,
.stats-race-directory-row > span,
.stats-race-directory-row > time {
  text-align:right;
}

.stats-race-directory-row > b {
  color:var(--yellow);
  font:400 1.22rem/1 'Bebas Neue',Impact,sans-serif;
}

.stats-race-directory-row > span {
  color:#8b949e;
  font-size:.59rem;
}

.stats-race-directory-row > time {
  color:#59646f;
  font-size:.48rem;
  white-space:nowrap;
}

.stats-race-directory-row > i {
  color:#68727d;
  font-style:normal;
  text-align:right;
  transition:transform .14s ease,color .14s ease;
}

.stats-race-directory-row:hover > i {
  color:var(--yellow);
  transform:translateX(3px);
}

.stats-race-directory-foot {
  min-height:42px;
  padding:0 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-top:1px solid #ffffff13;
  color:#59646f;
  font-size:.5rem;
}

.stats-race-directory-foot span:first-child {
  color:#858f99;
  font-weight:900;
  letter-spacing:.07em;
}

/* Public race drawer */
.stats-hidden {
  display:none !important;
}

body.stats-drawer-open {
  overflow:hidden;
}

.stats-race-drawer {
  position:fixed;
  z-index:1200;
  inset:0;
  display:flex;
  justify-content:flex-end;
}

.stats-race-drawer-backdrop {
  position:absolute;
  inset:0;
  border:0;
  background:rgba(3,5,8,.74);
  backdrop-filter:blur(2px);
  cursor:default;
}

.stats-race-drawer-panel {
  position:relative;
  z-index:1;
  width:min(690px,100%);
  height:100%;
  padding:29px 30px 42px;
  overflow:auto;
  border-left:1px solid #ffffff1c;
  background:
    linear-gradient(150deg,rgba(247,186,24,.035),transparent 32%),
    #0b1016;
  box-shadow:-30px 0 70px rgba(0,0,0,.42);
}

.stats-race-drawer-close {
  position:absolute;
  top:17px;
  right:20px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:1px solid #ffffff18;
  background:#0f151b;
  color:#aeb5bd;
  cursor:pointer;
  font-size:1.2rem;
}

.stats-race-drawer-close:hover {
  border-color:var(--yellow);
  color:var(--yellow);
}

.stats-race-drawer-panel > h2 {
  margin-top:36px;
  color:#f2f4f5;
  font:400 clamp(2.6rem,5vw,3.65rem)/.94 'Bebas Neue',Impact,sans-serif;
}

#race-drawer-subtitle {
  margin-top:8px;
  color:#6f7984;
  font-size:.62rem;
  line-height:1.5;
}

#race-drawer-content {
  margin-top:23px;
}

.stats-race-drawer-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
}

.stats-race-drawer-summary article {
  min-height:87px;
  padding:12px;
  border:1px solid #ffffff12;
  background:#0e141a;
}

.stats-race-drawer-summary small {
  color:#59646f;
  font-size:.43rem;
  font-weight:900;
  letter-spacing:.075em;
}

.stats-race-drawer-summary strong {
  display:block;
  margin-top:8px;
  color:#edf0f2;
  font:400 1.65rem/1 'Bebas Neue',Impact,sans-serif;
}

.stats-race-drawer-section-title {
  margin-top:26px;
  padding-top:17px;
  border-top:1px solid #ffffff12;
}

.stats-race-drawer-section-title small {
  color:var(--yellow);
  font-size:.48rem;
  font-weight:900;
  letter-spacing:.09em;
}

.stats-race-drawer-section-title strong {
  display:block;
  margin-top:5px;
  color:#e9ecef;
  font:400 1.55rem/1 'Bebas Neue',Impact,sans-serif;
}

.stats-race-record-note {
  margin-top:7px;
  color:#626d78;
  font-size:.54rem;
  line-height:1.5;
}

.stats-race-records {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:7px;
  margin-top:11px;
}

.stats-race-record-card {
  min-width:0;
  min-height:160px;
  padding:13px 11px;
  border:1px solid #ffffff12;
  background:#0e141a;
}

.stats-race-record-class {
  width:31px;
  height:24px;
  display:grid;
  place-items:center;
  border:1px solid #ffffff1d;
  color:#929ba5;
  font-size:.48rem;
  font-weight:900;
}

.stats-race-record-card.class-s {
  border-top-color:rgba(255,91,122,.42);
}

.stats-race-record-card.class-a {
  border-top-color:rgba(247,186,24,.48);
}

.stats-race-record-card.class-b {
  border-top-color:rgba(93,224,160,.4);
}

.stats-race-record-card.class-c {
  border-top-color:rgba(137,194,255,.38);
}

.stats-race-record-card.class-entry {
  border-top-color:rgba(207,213,220,.32);
}

.stats-race-record-time {
  display:block;
  margin-top:15px;
  color:#f1f3f4;
  font:400 1.45rem/1 'Bebas Neue',Impact,sans-serif;
  white-space:nowrap;
}

.stats-race-record-card p {
  margin-top:9px;
  color:#d1d6db;
  font-size:.56rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.stats-race-record-card > small {
  display:block;
  margin-top:5px;
  color:#59646f;
  font-size:.46rem;
  line-height:1.35;
}

@media(max-width:1120px) {
  .stats-race-summary {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .stats-race-controls {
    justify-content:flex-start;
  }

  .stats-race-browser-head {
    align-items:flex-start;
    flex-direction:column;
  }

  .stats-race-table-head,
  .stats-race-directory-row {
    grid-template-columns:minmax(220px,1.7fr) .6fr .72fr .72fr .82fr 26px;
  }

  .stats-race-table-head span:nth-child(6),
  .stats-race-directory-row time {
    display:none;
  }
}

@media(max-width:760px) {
  .stats-race-summary {
    grid-template-columns:1fr 1fr;
  }

  .stats-race-search {
    min-width:100%;
    width:100%;
  }

  .stats-race-controls {
    width:100%;
  }

  .stats-race-sort {
    width:100%;
  }

  .stats-race-sort button {
    flex:1 1 calc(50% - 5px);
  }

  .stats-race-table-head {
    display:none;
  }

  .stats-race-directory-row {
    grid-template-columns:minmax(0,1fr) auto auto;
    gap:8px 12px;
    padding:12px 13px;
  }

  .stats-race-directory-name {
    grid-column:1;
    grid-row:1 / span 2;
  }

  .stats-race-directory-row > b {
    grid-column:2;
    grid-row:1;
  }

  .stats-race-directory-row > span:nth-of-type(1) {
    grid-column:2;
    grid-row:2;
  }

  .stats-race-directory-row > span:nth-of-type(2),
  .stats-race-directory-row > span:nth-of-type(3),
  .stats-race-directory-row > time {
    display:none;
  }

  .stats-race-directory-row > i {
    grid-column:3;
    grid-row:1 / span 2;
    align-self:center;
  }

  .stats-race-directory-foot {
    align-items:flex-start;
    flex-direction:column;
    padding-top:9px;
    padding-bottom:9px;
  }

  .stats-race-records {
    grid-template-columns:1fr;
  }

  .stats-race-record-card {
    min-height:110px;
  }
}

@media(max-width:520px) {
  .stats-race-summary {
    grid-template-columns:1fr;
  }

  .stats-race-drawer-panel {
    width:100%;
    padding:24px 17px 34px;
  }

  .stats-race-drawer-summary {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
