:root {
  --pilot-bg: #0d1116;
  --pilot-surface: #141a21;
  --pilot-surface-2: #19212a;
  --pilot-line: rgba(255, 255, 255, 0.13);
  --pilot-text: #f6f7f9;
  --pilot-muted: #aab2bd;
  --pilot-soft: #d9dee6;
  --pilot-red: #d7262f;
  --pilot-red-dark: #9f1821;
  --pilot-amber: #f2b84b;
  --pilot-green: #39b54a;
  --pilot-blue: #3b82f6;
}

.pilot-state-card {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(215, 38, 47, 0.2), rgba(255, 255, 255, 0.04)),
    rgba(16, 21, 29, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.pilot-state-card h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.98;
}

.pilot-state-card p {
  max-width: 620px;
  margin: 0 auto 24px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.05rem;
  line-height: 1.55;
}

.pilot-state-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #ffffff;
  background: #d7262f;
  font-weight: 900;
  text-decoration: none;
}

.pilot-state-button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--pilot-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--pilot-text);
  background:
    radial-gradient(circle at 10% 0%, rgba(215, 38, 47, 0.24), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(57, 181, 74, 0.12), transparent 30rem),
    linear-gradient(180deg, #0d1116 0%, #111720 48%, #0b0f14 100%);
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.pilot-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pilot-area-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 36px);
}

.pilot-area-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  padding: 14px 0 24px;
}

.pilot-area-logo {
  display: flex;
  align-items: center;
  min-height: 64px;
  overflow: visible;
}

.pilot-area-logo img {
  width: auto;
  height: auto;
  max-width: min(290px, 68vw);
  max-height: 64px;
  object-fit: contain;
}

.pilot-area-kicker {
  padding: 10px 14px;
  border: 1px solid rgba(242, 184, 75, 0.28);
  border-radius: 999px;
  color: #ffe7ad;
  background: rgba(242, 184, 75, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pilot-area-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(22px, 4vw, 48px);
  align-items: end;
  min-height: 280px;
  margin-bottom: 22px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--pilot-line);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(13, 17, 22, 0.78), rgba(13, 17, 22, 0.38)),
    linear-gradient(135deg, rgba(215, 38, 47, 0.2), rgba(242, 184, 75, 0.06) 48%, rgba(57, 181, 74, 0.08)),
    url("images/banner-tracknight-03-10-2026.jpg") center / cover no-repeat;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.pilot-area-eyebrow {
  margin: 0 0 10px;
  color: var(--pilot-amber);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pilot-area-hero h1 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.pilot-area-lead {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.45;
}

.pilot-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pilot-area-disclaimer {
  border: 1px solid rgba(242, 184, 75, 0.26);
  border-left: 5px solid var(--pilot-amber);
  border-radius: 10px;
  padding: 18px;
  color: #ffe7ad;
  background: rgba(13, 17, 22, 0.72);
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.45;
  backdrop-filter: blur(12px);
}

.pilot-area-layout {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.pilot-highlights {
  margin: 16px 0 20px;
  padding: 14px 0 18px;
  border-top: 1px solid var(--pilot-line);
  border-bottom: 1px solid var(--pilot-line);
}

.pilot-highlights-heading {
  margin-bottom: 2px;
}

.pilot-highlight-event-header h3,
.pilot-highlight-ranking h4,
.pilot-highlight-category-heading h4 {
  margin: 0;
  letter-spacing: 0;
}

.pilot-highlight-event {
  padding: 10px 0 18px;
}

.pilot-highlight-event + .pilot-highlight-event {
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.pilot-highlight-category-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.pilot-highlight-event-label {
  margin: 0 0 6px;
  color: var(--pilot-amber);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pilot-highlight-event-header h3 {
  font-size: 1.55rem;
  line-height: 1.2;
}

.pilot-highlight-event-header time {
  color: inherit;
  font: inherit;
}

.pilot-highlight-event-separator {
  color: var(--pilot-muted);
}

.pilot-highlight-category-heading span {
  color: var(--pilot-muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.pilot-highlight-ranking {
  margin-top: 14px;
}

.pilot-highlight-ranking h4 {
  margin-bottom: 10px;
  color: var(--pilot-soft);
  font-size: 1rem;
}

.pilot-highlight-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pilot-highlight-results.has-two-results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pilot-highlight-results.has-one-result {
  grid-template-columns: minmax(0, 1fr);
}

.pilot-highlight-result {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 126px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top-width: 3px;
  border-radius: 8px;
  color: var(--pilot-text);
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
}

.pilot-highlight-result.is-position-1 {
  border-top-color: #f4bd44;
}

.pilot-highlight-result.is-position-2 {
  border-top-color: #c7d0da;
}

.pilot-highlight-result.is-position-3 {
  border-top-color: #c9825a;
}

a.pilot-highlight-result:hover {
  border-color: rgba(215, 38, 47, 0.74);
  background: rgba(215, 38, 47, 0.12);
}

a.pilot-highlight-result:focus-visible {
  outline: 3px solid rgba(244, 189, 68, 0.78);
  outline-offset: 3px;
}

.pilot-highlight-position {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 76px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.pilot-highlight-position-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pilot-highlight-trophy {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.pilot-highlight-trophy.is-gold {
  color: #f4bd44;
}

.pilot-highlight-trophy.is-silver {
  color: #c7d0da;
}

.pilot-highlight-trophy.is-bronze {
  color: #c9825a;
}

.pilot-highlight-position strong {
  color: white;
  font-size: 2rem;
  line-height: 1;
}

.pilot-highlight-position small {
  margin-top: 5px;
  color: var(--pilot-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pilot-highlight-result-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.pilot-highlight-result-copy > strong {
  color: white;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.pilot-highlight-time {
  color: var(--pilot-amber);
  font-size: 1.1rem;
  font-weight: 950;
}

.pilot-highlight-vehicle {
  color: var(--pilot-muted);
  font-size: 0.86rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pilot-highlight-category-heading {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.pilot-highlight-categories {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.pilot-selector-card,
.pilot-panel,
.pilot-profile-card,
.pilot-stat-card {
  border: 1px solid var(--pilot-line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035)),
    rgba(20, 26, 33, 0.86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.pilot-selector-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  height: 100%;
  padding: 20px;
}

.pilot-section-heading {
  margin-bottom: 18px;
}

.pilot-section-heading h2 {
  margin: 0;
  color: var(--pilot-text);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.06;
}

.pilot-search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--pilot-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.pilot-search-input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: white;
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.pilot-search-input:focus {
  border-color: rgba(215, 38, 47, 0.72);
  box-shadow: 0 0 0 4px rgba(215, 38, 47, 0.16);
}

.pilot-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.pilot-filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--pilot-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.pilot-filter-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: white;
  background: #141a21;
  outline: none;
}

.pilot-filter-grid select:focus {
  border-color: rgba(215, 38, 47, 0.72);
  box-shadow: 0 0 0 4px rgba(215, 38, 47, 0.16);
}

.pilot-list {
  display: grid;
  flex: 1 1 0;
  gap: 10px;
  min-height: 0;
  max-height: none;
  margin-top: 8px;
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  overscroll-behavior: contain;
  scrollbar-color: rgba(215, 38, 47, 0.78) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.pilot-list::-webkit-scrollbar {
  width: 10px;
}

.pilot-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.pilot-list::-webkit-scrollbar-thumb {
  border: 2px solid #171d24;
  border-radius: 8px;
  background: rgba(215, 38, 47, 0.78);
}

.pilot-list:focus-visible {
  outline: 3px solid rgba(244, 189, 68, 0.72);
  outline-offset: 3px;
}

.pilot-list-summary {
  margin: 16px 0 0;
  color: var(--pilot-soft);
  font-size: 0.86rem;
  font-weight: 850;
}

.pilot-list-button {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--pilot-text);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  text-align: left;
}

.pilot-list-button:hover,
.pilot-list-button.is-active {
  border-color: rgba(215, 38, 47, 0.7);
  background: rgba(215, 38, 47, 0.14);
}

.pilot-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--pilot-red), var(--pilot-red-dark));
  font-weight: 950;
}

.pilot-list-name {
  display: block;
  font-weight: 950;
  line-height: 1.15;
}

.pilot-list-meta {
  display: block;
  margin-top: 4px;
  color: var(--pilot-muted);
  font-size: 0.83rem;
  font-weight: 750;
}

.pilot-dashboard {
  display: grid;
  gap: 18px;
}

.pilot-profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
}

.pilot-profile-card,
.pilot-panel {
  padding: clamp(18px, 3vw, 26px);
}

.pilot-profile-card {
  display: grid;
  align-content: space-between;
  min-height: 330px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(215, 38, 47, 0.24), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    var(--pilot-surface);
}

.pilot-profile-media {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--pilot-red), var(--pilot-red-dark));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  font-size: 2rem;
  font-weight: 950;
}

.pilot-profile-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pilot-profile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pilot-number {
  display: grid;
  place-items: center;
  min-width: 72px;
  height: 72px;
  padding: 0 12px;
  border-radius: 10px;
  color: white;
  background: var(--pilot-red);
  font-size: 1.8rem;
  font-weight: 950;
}

.pilot-profile-card h2 {
  margin: 18px 0 8px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.98;
}

.pilot-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pilot-chip,
.pilot-status-chip,
.pilot-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: var(--pilot-soft);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-weight: 850;
}

.pilot-status-chip {
  color: #dff8e6;
  border-color: rgba(57, 181, 74, 0.34);
  background: rgba(57, 181, 74, 0.12);
}

.pilot-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pilot-stat-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 159px;
  padding: 18px;
}

.pilot-stat-card span {
  color: var(--pilot-muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pilot-stat-card strong {
  color: white;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.08;
}

.pilot-stat-card p {
  margin: 0;
  color: var(--pilot-muted);
  font-size: 0.92rem;
}

.pilot-event-history {
  display: grid;
  gap: 12px;
}

.pilot-event-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.35fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.pilot-event-card h3,
.pilot-vehicle-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.pilot-event-card p,
.pilot-vehicle-card p,
.pilot-integration-panel p {
  margin: 0;
  color: var(--pilot-muted);
  line-height: 1.46;
}

.pilot-event-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pilot-detail {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.pilot-detail span {
  color: var(--pilot-muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pilot-detail strong {
  color: white;
  line-height: 1.16;
}

.pilot-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.pilot-progress-card {
  min-height: 144px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.pilot-progress-card span {
  color: var(--pilot-amber);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pilot-progress-card strong {
  display: block;
  margin-top: 12px;
  color: white;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.05;
}

.pilot-progress-card p {
  margin: 10px 0 0;
  color: var(--pilot-muted);
}

.pilot-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.pilot-vehicle-list,
.pilot-badge-list,
.pilot-integration-fields {
  display: grid;
  gap: 10px;
}

.pilot-vehicle-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.pilot-vehicle-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pilot-badge-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pilot-badge {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
  min-height: 96px;
  border-color: var(--pilot-badge-accent, #9ca3af);
  border-radius: 8px;
  box-shadow: inset 3px 0 0 var(--pilot-badge-accent, #9ca3af);
}

.pilot-badge-head {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.pilot-badge-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}

.pilot-badge strong {
  color: white;
}

.pilot-badge span {
  color: var(--pilot-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.pilot-integration-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.pilot-integration-field {
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--pilot-soft);
  background: rgba(0, 0, 0, 0.18);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
}

.pilot-empty {
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--pilot-muted);
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 1180px) {
  .pilot-area-layout,
  .pilot-profile-grid,
  .pilot-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .pilot-selector-card {
    height: auto;
  }

  .pilot-list {
    flex: 0 1 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 60vh;
  }

  .pilot-highlight-categories {
    grid-template-columns: 1fr;
  }

  .pilot-integration-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .pilot-area-shell {
    padding: 14px;
  }

  .pilot-area-header,
  .pilot-area-hero {
    grid-template-columns: 1fr;
  }

  .pilot-area-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .pilot-area-hero {
    padding: 28px 18px;
  }

  .pilot-highlight-category-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .pilot-highlight-results,
  .pilot-highlight-results.has-two-results,
  .pilot-highlight-results.has-one-result {
    grid-template-columns: 1fr;
  }

  .pilot-list,
  .pilot-filter-grid,
  .pilot-stat-grid,
  .pilot-event-card,
  .pilot-event-details,
  .pilot-progress-grid,
  .pilot-badge-list,
  .pilot-integration-fields {
    grid-template-columns: 1fr;
  }

  .pilot-list {
    max-height: 58vh;
  }

  .pilot-highlight-trophy {
    width: 22px;
    height: 22px;
  }

  .pilot-profile-top {
    flex-direction: column-reverse;
  }

  .pilot-number {
    min-width: 64px;
    height: 64px;
  }
}
