@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --ink: #f7faf7;
  --muted: #9aa69f;
  --quiet: #6f7b74;
  --page: #060807;
  --panel: #0c1110;
  --panel-2: #111715;
  --panel-3: #161d1a;
  --line: #222d29;
  --line-soft: #17201d;
  --accent: #9cff1a;
  --accent-2: #4ee1c1;
  --warning: #ffd166;
  --danger: #ff4d5e;
  --blue: #73a7ff;
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #050705 0, #08100d 560px, var(--page) 100%),
    var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  padding: 14px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(156, 255, 26, .14);
  background: rgba(5, 8, 7, .84);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(156, 255, 26, .42);
  border-radius: 8px;
  background: #101610;
  color: var(--accent);
  font-size: 13px;
}

.nav {
  display: flex;
  gap: 20px;
  align-items: center;
  color: #d4ded8;
  font-weight: 700;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
}

.hero {
  position: relative;
  z-index: 0;
  min-height: 280px;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #050706;
  color: white;
  text-align: center;
}

.hero::before,
.hero::after {
  position: absolute;
  inset: 0;
  content: "";
}

.hero::before {
  background-image: url("./assets/race-cars-hero.webp");
  background-position: center 42%;
  background-size: cover;
  filter: contrast(1.05) saturate(1.08) brightness(.62);
  opacity: .94;
  transform: scale(1.06);
  z-index: -2;
}

.hero::after {
  z-index: -1;
  background-image:
    radial-gradient(ellipse at 50% 47%, rgba(0, 0, 0, .66), transparent 36%),
    linear-gradient(180deg, rgba(4, 7, 6, .18), rgba(4, 7, 6, .46) 74%, #060807 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 40px));
  padding: 28px 0 58px;
}

.hero h1,
.hero-copy,
.hero-pill {
  text-shadow: 0 2px 18px rgba(0, 0, 0, .92), 0 0 34px rgba(0, 0, 0, .82);
}

.hero h1 {
  color: #ffffff;
}

.hero-copy {
  color: #f3f8f5;
}

.hero-pill,
.console-kicker,
.panel-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 12px auto 0;
  font-size: 56px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  margin: 12px auto 0;
  color: #d9e0dd;
  font-size: 20px;
}

.wrap {
  width: min(1250px, calc(100% - 32px));
  margin: 0 auto;
}

.dashboard-shell {
  position: relative;
  z-index: 2;
  margin-top: -34px;
  margin-bottom: 46px;
  overflow: hidden;
  border: 1px solid rgba(156, 255, 26, .26);
  border-radius: 8px;
  background: linear-gradient(180deg, #0b100f, #080c0b);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .45);
}

.console-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #070b0a;
}

.console-top h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.console-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.console-tab,
.chip,
.ghost-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #101614;
  color: #dbe5df;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.console-tab.is-active,
.console-tab:hover,
.chip.is-active {
  border-color: rgba(156, 255, 26, .78);
  background: rgba(156, 255, 26, .14);
  color: var(--accent);
}

.console-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  min-height: 640px;
}

.workbench {
  min-width: 0;
  padding: 18px;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric,
.chart-panel,
.table-card,
.filter-panel,
.note-panel,
.guide-card,
.legal-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  min-height: 102px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent),
    var(--panel-2);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.metric:nth-child(2) strong {
  color: var(--accent);
}

.metric:nth-child(3) strong {
  color: var(--warning);
}

.metric:nth-child(4) strong {
  color: var(--accent-2);
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, .9fr);
  grid-template-areas:
    "compare spread"
    "compare mix"
    "origin origin";
  gap: 14px;
  margin-bottom: 14px;
}

.chart-panel {
  min-width: 0;
  padding: 16px;
}

.primary-chart {
  grid-area: compare;
}

.analytics-grid > .chart-panel:nth-child(2) {
  grid-area: spread;
}

.analytics-grid > .chart-panel:nth-child(3) {
  grid-area: mix;
}

.analytics-grid > .chart-panel:nth-child(4) {
  grid-area: origin;
}

.panel-heading,
.table-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.panel-heading h3,
.table-top h2,
.filter-panel h2,
.note-panel h2,
.guide-card h2 {
  margin: 4px 0 0;
  font-size: 21px;
}

.panel-note,
.table-top > span {
  color: var(--quiet);
  font-size: 13px;
  font-weight: 700;
}

.bars {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 2.2fr) 64px;
  gap: 14px;
  align-items: center;
  color: #e9f1ed;
  font-weight: 800;
}

.bar-track,
.mix-track,
.origin-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #1b2521;
}

.bar-fill,
.mix-track span,
.origin-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.spread-chart {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 210px;
  margin-top: 14px;
}

.spread-bar {
  display: grid;
  grid-template-rows: 24px 145px 22px;
  gap: 7px;
  text-align: center;
}

.spread-count {
  color: var(--ink);
  font-weight: 800;
}

.spread-track {
  display: flex;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #101614;
}

.spread-track span {
  display: block;
  width: 100%;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, var(--accent), #427a16);
}

.spread-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mix-chart {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.mix-row {
  display: grid;
  gap: 8px;
}

.mix-top,
.origin-row {
  display: grid;
  align-items: center;
  gap: 10px;
  color: #dfe7e3;
  font-size: 14px;
  font-weight: 800;
}

.mix-top {
  grid-template-columns: 1fr auto;
}

.mix-top strong,
.origin-row strong {
  color: var(--accent);
}

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

.origin-row {
  grid-template-columns: minmax(112px, 1fr) minmax(120px, 2fr) 34px;
}

.filter-panel {
  padding: 18px;
  border-width: 0 0 0 1px;
  border-radius: 0;
  background: #0a0f0d;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

label {
  color: #b8c4bd;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #26342f;
  border-radius: 8px;
  background: #101614;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 700;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.ghost-button {
  width: 100%;
  color: var(--ink);
}

.table-card {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.table-top {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

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

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

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

th {
  background: #0a0f0d;
  color: #819087;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

td {
  color: #dfe6e2;
  font-weight: 700;
}

.vehicle-cell strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.vehicle-cell span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.time-pill {
  display: inline-flex;
  min-width: 70px;
  justify-content: center;
  border: 1px solid rgba(156, 255, 26, .36);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(156, 255, 26, .12);
  color: var(--accent);
  font-weight: 800;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #111715;
  color: #d7dfdb;
  font-size: 13px;
}

.source-link {
  color: var(--accent-2);
  font-weight: 700;
}

.compare-check {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.note-panel {
  margin: 0;
  padding: 18px 20px;
  border-width: 1px 0 0;
  border-radius: 0;
  background: #080c0b;
}

.note-panel p {
  max-width: 980px;
  margin: 6px 0 0;
  color: var(--muted);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 48px;
}

.guide-card {
  min-height: 150px;
  padding: 20px;
  color: var(--ink);
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(156, 255, 26, .08), transparent),
    var(--panel);
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.content-page,
.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 34px auto 52px;
  padding: 28px;
  background: var(--panel);
}

.content-page h1,
.legal-page h1 {
  color: var(--ink);
  font-size: 48px;
  line-height: 1.06;
}

.content-page h2,
.legal-page h2 {
  margin-top: 28px;
}

.content-page p,
.legal-page p,
.content-page li {
  color: #c4cec8;
}

.top-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.top-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px max(20px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  background: #070a09;
  color: #aab5af;
}

.footer-links {
  display: flex;
  gap: 16px;
}

@media (max-width: 1100px) {
  h1 {
    font-size: 48px;
  }

  .console-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-panel {
    grid-column: 1;
    border-width: 1px 0 0;
    border-radius: 0;
  }
}

@media (max-width: 920px) {
  .hero {
    min-height: 310px;
  }

  h1 {
    font-size: 42px;
  }

  .console-top,
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .analytics-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "compare"
      "spread"
      "mix"
      "origin";
  }

  .guide-grid,
  .origin-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav,
  .footer-links,
  .console-tabs {
    flex-wrap: wrap;
  }

  .hero {
    min-height: 330px;
  }

  .hero-inner {
    width: min(100% - 28px, 920px);
    padding: 28px 0 60px;
  }

  h1 {
    font-size: 36px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .racing-car {
    bottom: 44px;
    width: 178px;
    height: 68px;
  }

  .dashboard-shell {
    width: calc(100% - 16px);
    margin-top: -30px;
  }

  .console-body {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    grid-column: 1;
    grid-row: 2;
    border-width: 1px 0 0;
  }

  .workbench {
    grid-column: 1;
    grid-row: 1;
  }

  .workbench {
    padding: 12px;
  }

  .summary-row {
    grid-template-columns: 1fr;
  }

  .bar-row,
  .origin-row {
    grid-template-columns: 1fr;
  }

  .spread-chart {
    min-height: 180px;
  }

  .spread-bar {
    grid-template-rows: 24px 118px 22px;
  }

  .table-top {
    flex-direction: column;
  }

  .content-page h1,
  .legal-page h1 {
    font-size: 36px;
  }
}
