@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap");
:root {
  color-scheme: light;
  --bg: #f3f2eb;
  --surface: #fff;
  --surface-alt: #e6e7de;
  --text: #172c28;
  --muted: #5b6963;
  --accent: #284e40;
  --border: #cdd2c8;
  --lime: #d9ef84;
  --display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
a,
button,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
input,
summary {
  outline-offset: 5px;
}
:focus-visible {
  outline: 3px solid #527620;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -100px;
  background: var(--lime);
  padding: 12px;
  z-index: 50;
}
.skip-link:focus {
  top: 10px;
}
.site-header {
  max-width: 1440px;
  margin: auto;
  padding: 25px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.wordmark {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -2px;
}
.wordmark span {
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-left: 16px;
  vertical-align: middle;
}
.site-header nav {
  display: flex;
  gap: 30px;
  font-size: 12px;
  font-weight: 600;
}
.hero {
  max-width: 1440px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  padding: 38px 5% 45px;
  gap: 6%;
}
.hero-copy {
  padding: 20px 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.eyebrow,
.section-kicker,
.stat-label,
.hero-index,
.hero-image figcaption {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #55714b;
  border-radius: 50%;
  margin-right: 8px;
}
h1 {
  font-family: var(--display);
  font-size: clamp(80px, 10.7vw, 157px);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -3px;
  margin: 32px 0 24px;
}
h1 span {
  color: #668052;
}
.hero-intro {
  font-size: clamp(22px, 2.8vw, 38px);
  letter-spacing: -1px;
  line-height: 1.1;
}
.hero-description {
  color: var(--muted);
  max-width: 325px;
  font-size: 13px;
  margin-top: 18px;
}
.hero-link {
  display: flex;
  align-items: center;
  gap: 35px;
  border-bottom: 1px solid var(--text);
  padding: 14px 0 10px;
  margin-top: 20px;
  font-weight: 600;
  font-size: 12px;
}
.hero-link span {
  font-size: 25px;
  font-weight: 400;
}
.hero-index {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 32px;
  color: var(--muted);
}
.hero-image {
  position: relative;
  min-width: 0;
  min-height: 560px;
  overflow: hidden;
  background: #284633;
}
.hero-image img {
  width: 100%;
  height: 100%;
  position: absolute;
  object-fit: cover;
  object-position: center 35%;
}
.hero-image figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, #14261ec9);
  padding: 45px 22px 20px;
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: 9px;
}
.stats {
  background: var(--text);
  color: var(--bg);
  padding: 32px max(5%, calc((100vw - 1296px) / 2));
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 0.65fr;
  gap: 30px;
  align-items: center;
}
.stats > div + div {
  border-left: 1px solid #4a5b53;
  padding-left: 35px;
}
.stat-label {
  color: #c4cfb9;
  display: block;
  font-size: 9px;
}
.stats strong {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 62px;
  line-height: 1.2;
  letter-spacing: -1px;
}
.stats strong span {
  font-size: 38px;
}
.stats small {
  color: #c4cfb9;
  font-size: 11px;
}
.stats-link {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #667469;
  padding-bottom: 12px;
  color: var(--lime);
  font-size: 12px;
}
.content-shell {
  max-width: 1296px;
  margin: auto;
  padding: 65px 0 80px;
  width: 90%;
}
.section-kicker {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.chart-card {
  padding: 32px 0 0;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 25px;
}
h2 {
  font-size: clamp(28px, 3.2vw, 43px);
  font-weight: 500;
  letter-spacing: -1.6px;
  line-height: 1.2;
}
.chart-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.chart-tabs {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.chart-tab {
  padding: 10px 19px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
}
.chart-tab--active {
  background: var(--text);
  border-color: var(--text);
  color: var(--lime);
}
.chart-tab:hover {
  border-color: var(--text);
}
.chart-wrap {
  position: relative;
  background: #fafbf6;
  border: 1px solid var(--border);
  padding: 12px;
}
#trend-chart {
  display: block;
  width: 100%;
  cursor: crosshair;
}
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  max-width: 250px;
  padding: 15px;
  background: #172c28;
  color: white;
  box-shadow: 0 8px 25px #172c2822;
  font-size: 12px;
  border-radius: 4px;
}
.tooltip-name {
  font-weight: 600;
}
.tooltip-time {
  font-size: 24px;
  color: var(--lime);
}
.tooltip-date {
  color: #d1d8c9;
}
.chart-note {
  font-size: 11px;
  color: var(--muted);
  max-width: 760px;
  margin-top: 15px;
}
.data-details {
  font-size: 12px;
  margin-top: 15px;
  overflow-x: auto;
}
.data-details summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.chart-table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 15px;
  font-size: 12px;
}
.chart-table th,
.chart-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}
.chart-table .season-summary th {
  font-weight: 600;
  background: var(--surface-alt);
}
.archive-kicker {
  margin-top: 65px;
}
.section-heading {
  margin: 30px 0;
}
.controls-card {
  padding: 0 0 24px;
  border-bottom: 1px solid var(--border);
}
.controls-row {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
}
.search-wrap {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #87948a;
  max-width: 400px;
  width: 100%;
  gap: 12px;
}
.search-icon {
  font-size: 26px;
}
.search-input {
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  padding: 12px 0;
  font-size: 13px;
  color: var(--text);
}
.season-filter {
  border: 0;
  padding: 0;
  margin: 0;
}
.filter-pills {
  display: flex;
  gap: 8px;
}
.filter-pills input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.filter-pills label {
  padding: 8px 15px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 12px;
}
.filter-pills input:checked + label {
  background: var(--text);
  color: var(--lime);
  border-color: var(--text);
}
.filter-pills input:focus-visible + label {
  outline: 3px solid #527620;
  outline-offset: 3px;
}
.result-count {
  color: var(--muted);
  font-size: 11px;
  margin-top: 15px;
}
.race-list {
  list-style: none;
}
.race-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(320px, 0.95fr);
  gap: 25px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 30px;
}
.race-card:not(:has(.race-img)) {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
}
.race-header {
  display: flex;
  flex-direction: column-reverse;
  gap: 7px;
}
.race-name {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 500;
  max-width: 410px;
  letter-spacing: -0.2px;
}
.race-meta {
  font-size: 11px;
  color: var(--muted);
}
.race-img {
  width: 90px;
  height: 76px;
  object-fit: cover;
  filter: saturate(0.7);
  border-radius: 2px;
}
.race-img--top {
  object-position: top;
}
.race-dl {
  display: grid;
  grid-template-columns: 1fr 0.65fr 1.1fr;
  gap: 12px;
}
.race-dl dt {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.race-dl dd {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
}
.result-link {
  font-size: 10px;
  text-align: right;
  margin-top: 8px;
}
.result-link a {
  border-bottom: 1px solid var(--border);
}
.race-details {
  font-size: 12px;
  margin-top: 12px;
}
.race-details summary {
  cursor: pointer;
}
.race-details p {
  margin-top: 8px;
}
.chart-highlight {
  background: #e5ebd4;
  outline: 2px solid #668052;
  outline-offset: 6px;
}
.no-results {
  padding: 40px 0;
  color: var(--muted);
}
.site-footer {
  background: var(--text);
  color: var(--bg);
  padding: 55px 5%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
}
.footer-brand {
  font-family: var(--display);
  font-size: 88px;
  font-weight: 700;
  line-height: 0.85;
  color: var(--lime);
}
.site-footer > div {
  font-size: 12px;
}
.footer-note {
  color: #c4cfb9;
  margin: 20px 0;
}
.site-footer a {
  text-decoration: underline;
}
.scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid #172c28;
  background: var(--lime);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}
.scroll-top-btn.visible {
  display: block;
}
@media (min-width: 1600px) {
  .stats {
    padding-left: calc((100vw - 1296px) / 2);
    padding-right: calc((100vw - 1296px) / 2);
  }
}
@media (max-width: 900px) {
  .hero {
    gap: 4%;
  }
  .hero-image {
    min-height: 510px;
  }
  .stats {
    gap: 18px;
  }
  .stats > div + div {
    padding-left: 18px;
  }
  .stats strong {
    font-size: 49px;
  }
  .stats-link {
    display: none;
  }
  .stats {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .race-card,
  .race-card:not(:has(.race-img)) {
    grid-template-columns: 1fr 1fr;
  }
  .race-img {
    display: none;
  }
  .chart-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .site-header {
    padding: 17px 6%;
  }
  .wordmark span {
    display: none;
  }
  .site-header nav {
    gap: 14px;
    font-size: 10px;
  }
  .hero {
    display: flex;
    flex-direction: column;
    padding: 25px 6% 30px;
    gap: 28px;
  }
  .hero-copy {
    padding: 0;
  }
  .eyebrow {
    font-size: 9px;
  }
  h1 {
    font-size: clamp(48px, 18vw, 104px);
    margin: 25px 0 20px;
    letter-spacing: -2px;
  }
  .hero-intro {
    font-size: 30px;
  }
  .hero-description {
    max-width: 100%;
    font-size: 13px;
  }
  .hero-link {
    margin-top: 10px;
  }
  .hero-index {
    padding-top: 25px;
  }
  .hero-image {
    min-height: 420px;
  }
  .hero-image img {
    object-position: center 30%;
  }
  .stats {
    padding: 25px 6%;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px 14px;
  }
  .stats > div + div {
    padding-left: 16px;
  }
  .stats > div:nth-child(3) {
    grid-column: 1/-1;
    display: flex;
    align-items: baseline;
    gap: 18px;
    border-left: 0;
    border-top: 1px solid #4a5b53;
    padding: 18px 0 0;
    flex-wrap: wrap;
  }
  .stats > div:nth-child(3) strong {
    font-size: 30px;
  }
  .stats > div:nth-child(3) .stat-label {
    order: 1;
  }
  .stats > div:nth-child(3) small {
    order: 2;
  }
  .stats strong {
    font-size: 46px;
  }
  .stat-label {
    font-size: 8px;
  }
  .stats small {
    font-size: 9px;
  }
  .content-shell {
    width: 88%;
    padding-top: 40px;
  }
  .section-kicker {
    font-size: 8px;
    gap: 15px;
  }
  .section-kicker span:last-child {
    text-align: right;
  }
  h2 {
    font-size: 31px;
  }
  .chart-wrap {
    padding: 0;
    margin-left: -10px;
    margin-right: -10px;
  }
  .chart-subtitle {
    font-size: 11px;
  }
  .controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .filter-pills {
    justify-content: space-between;
  }
  .filter-pills label {
    flex: 1;
    text-align: center;
  }
  .race-card,
  .race-card:not(:has(.race-img)) {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 0;
  }
  .race-name {
    font-size: 16px;
  }
  .race-dl {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .race-dl dd {
    font-size: 32px;
  }
  .result-link {
    text-align: left;
    margin-top: 12px;
  }
  .archive-kicker {
    margin-top: 40px;
  }
  .site-footer {
    padding: 40px 6%;
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-brand {
    font-size: 76px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Photo-led race cards: full-image disclosure with mouse, keyboard or touch. */
.race-card.has-photo {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 18px 36px;
  margin: 16px 0;
  padding: 28px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  color: #fff;
  background: #172c28;
  transition: box-shadow 0.25s ease;
}
.race-card.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--race-photo);
  background-size: cover;
  background-position: center 38%;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.race-card.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #10231deb, #10231d88);
}
.race-card.has-photo .race-meta,
.race-card.has-photo .race-dl dt {
  color: #dce6d5;
}
.race-card.has-photo .race-name {
  max-width: 540px;
}
.race-card.has-photo .result-link a {
  border-color: #a1b79c;
}
.race-photo-toggle {
  justify-self: start;
  border: 1px solid #b6c5ad;
  padding: 8px 12px;
  color: #ecf6df;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}
.race-photo-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows 0.35s ease,
    opacity 0.25s ease,
    visibility 0.35s;
}
.race-photo-inner {
  overflow: hidden;
  min-height: 0;
}
.race-card.has-photo .race-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 680px;
  object-fit: contain;
  object-position: center;
  filter: none;
  border-radius: 0;
  margin: 8px auto 0;
}
.race-photo-caption {
  color: #dce6d5;
  font-size: 11px;
  padding: 12px 0 0;
}
.race-card.is-expanded {
  box-shadow: 0 16px 36px #172c2826;
}
.race-card.is-expanded::before {
  opacity: 0.16;
}
.race-card.is-expanded .race-photo-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
}
@media (max-width: 700px) {
  .race-card.has-photo {
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 16px;
  }
  .race-card.has-photo .race-img {
    max-height: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .race-photo-panel,
  .race-card.has-photo,
  .race-card.has-photo::before {
    transition: none;
  }
}

/* Keep the source link anchored inside each race card's bottom-right inset. */
.race-card {
  position: relative;
  padding-bottom: 56px;
}
.race-card .result-link {
  position: absolute;
  right: 0;
  bottom: 20px;
  margin: 0;
  text-align: right;
}
.race-card.has-photo {
  padding-bottom: 64px;
}
.race-card.has-photo .result-link {
  right: 28px;
  bottom: 24px;
}
@media (max-width: 700px) {
  .race-card.has-photo .result-link {
    right: 22px;
    bottom: 22px;
  }
}

/* One shared metadata row, including the race date. */
.race-card,
.race-card:not(:has(.race-img)),
.race-card.has-photo {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.race-card .race-name {
  max-width: none;
}
.race-dl {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.65fr 1fr;
  align-items: start;
  gap: 20px;
}
.race-dl dd {
  display: flex;
  align-items: baseline;
  min-height: 46px;
  white-space: nowrap;
}
.race-date-stat dd {
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 19px;
  line-height: 46px;
  font-weight: 500;
}
@media (max-width: 600px) {
  .race-dl {
    grid-template-columns: 1.25fr 1fr 0.6fr 1fr;
    gap: 8px;
  }
  .race-dl dt {
    font-size: 8px;
    letter-spacing: 0;
    white-space: nowrap;
  }
  .race-dl dd {
    font-size: 25px;
    min-height: 39px;
  }
  .race-date-stat dd {
    font-size: 11px;
    line-height: 39px;
  }
}

/* Clearly defined search field. */
.search-wrap {
  border: 1px solid #87948a;
  border-radius: 6px;
  background: #fafbf6;
  padding: 0 14px;
  gap: 10px;
}
.search-wrap:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.search-input {
  padding: 12px 0;
  min-height: 46px;
}
.search-input:focus-visible {
  outline: none;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  list-style: none;
  padding: 18px 0 4px;
  color: var(--muted);
  font-size: 12px;
}
.chart-legend li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.legend-line {
  display: inline-block;
  width: 28px;
  height: 0;
  position: relative;
  border-top: 2px solid var(--series-color, #284e40);
}
.legend-results::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--series-color, #284e40);
  border-radius: 50%;
  left: 11px;
  top: -4px;
}
.legend-trend {
  border-top-style: dashed;
  opacity: 0.55;
}
.legend-average {
  border-top: 2px dashed #8a9ab0;
  opacity: 0.8;
}
.chart-note {
  margin-top: 10px;
}
@media (max-width: 600px) {
  .chart-legend {
    gap: 12px 18px;
    font-size: 11px;
  }
}

/* Shared stroke icons supplied by the designer. */
.arrow-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  vertical-align: middle;
}
.arrow-external {
  transform: rotate(-90deg);
}
.hero-link .arrow-icon {
  width: 24px;
  height: 24px;
}
.result-link .arrow-icon {
  width: 14px;
  height: 14px;
  margin-left: 3px;
}
.scroll-top-btn .arrow-icon {
  width: 24px;
  height: 24px;
}
.scroll-top-btn {
  padding: 9px;
}

.scroll-top-btn.visible {
  display: grid;
  place-items: center;
}
.scroll-top-btn {
  padding: 0;
  line-height: 1;
}
.scroll-top-btn .arrow-icon {
  display: block;
  margin: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 650ms ease,
      transform 650ms cubic-bezier(0.2, 0.65, 0.3, 1);
  }
  .scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Expanding photos must not move the viewport's scroll anchor. */
#race-list {
  overflow-anchor: none;
}
.race-photo-toggle {
  min-width: 126px;
  text-align: left;
}
