/* ==========================================================================
   Virginia City Grand Prix — history-styles.css
   Page-specific styles for the History subpage.
   Load after styles.css and subpage-styles.css.
   ========================================================================== */

/* ---------- Vertical era timeline ---------- */
.timeline {
  position: relative;
  margin: 2.4em 0 1em;
  padding-left: 46px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--ochre) 0%, #e7e0d2 90%);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.2em;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -46px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--ochre);
}
.timeline-item.is-gap::before { border-color: var(--ink-soft); }
.timeline-year {
  display: block;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--rust);
  margin-bottom: 4px;
}
.timeline-item h3 {
  margin-top: 0;
  margin-bottom: 0.35em;
  font-size: 1.15rem;
  color: var(--ink);
}
.timeline-item p { margin-bottom: 0; }

@media (max-width: 640px) {
  .timeline { padding-left: 38px; }
  .timeline-item::before { left: -38px; }
}

/* ---------- Championship history ---------- */
.championship-history {
  margin-top: 72px;
  padding-top: 64px;
  border-top: 1px solid #e7e0d2;
}

.championship-heading {
  max-width: 700px;
  margin: 0 auto 34px;
  text-align: center;
}

.championship-heading h2 {
  margin: 8px 0 12px;
  color: var(--ochre-dark);
}

.championship-heading p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.championship-table-wrap {
  overflow: hidden;
  border: 1px solid #ddd4c5;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(27, 23, 18, 0.07);
}

.championship-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.championship-table thead {
  background: var(--ink);
  color: var(--white);
}

.championship-table th,
.championship-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e7e0d2;
}

.championship-table thead th {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.championship-table tbody th {
  width: 92px;
  color: var(--rust);
  font-family: var(--font-display);
  font-weight: 600;
}

.championship-table tbody td {
  color: var(--ink-soft);
}

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

.championship-table tbody tr:last-child th,
.championship-table tbody tr:last-child td {
  border-bottom: 0;
}

.championship-table tbody tr.no-race {
  background: #eee9df;
  font-style: italic;
}

.championship-table tbody tr.pending td {
  color: #978d80;
  font-style: italic;
}

.championship-source-note {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
}

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

@media (max-width: 640px) {
  .championship-history {
    margin-top: 54px;
    padding-top: 48px;
  }

  .championship-table-wrap {
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  .championship-table,
  .championship-table tbody,
  .championship-table tr,
  .championship-table th,
  .championship-table td {
    display: block;
    width: 100%;
  }

  .championship-table thead {
    display: none;
  }

  .championship-table tbody tr {
    margin-bottom: 14px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid #ddd4c5;
    border-top: 3px solid var(--ochre);
    border-radius: var(--radius);
    box-shadow: 0 7px 18px rgba(27, 23, 18, 0.06);
  }

  .championship-table tbody tr:nth-child(even) {
    background: var(--white);
  }

  .championship-table tbody tr.no-race {
    background: #eee9df;
    border-top-color: var(--ink-soft);
  }

  .championship-table th,
  .championship-table td,
  .championship-table tbody tr:last-child th,
  .championship-table tbody tr:last-child td {
    position: relative;
    min-height: 48px;
    padding: 13px 16px 13px 116px;
    border-bottom: 1px solid #e7e0d2;
  }

  .championship-table td:last-child {
    border-bottom: 0;
  }
.championship-table th::before,
.championship-table td::before {
	content: attr(data-label);
	position: absolute;
	left: 16px;
	top: 14px;
	width: 86px;
	color: var(--ochre-dark);
	font-family: var(--font-display);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* This closes the mobile media query */
}

/* This must be outside the media query */
.championship-results-link {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: -12px 0 32px;
}

.championship-results-link .btn {
	width: fit-content;
}

.championship-results-link .btn i {
	margin-right: 8px;
}