:root {
  /* Layout idea: photographs on a neutral grey viewing surround, like a print-viewing booth;
     one family (Archivo), extra-condensed for titles, normal width for reading. Left aligned. */
  --surround: #d3d3d0;   /* neutral grey the photos sit on */
  --panel: #f5f5f2;      /* number-panel white */
  --ink: #131517;
  --ink-soft: #4a4d50;
  --rule: #b4b4b0;
  --green: #0d5a3d;      /* team green, used for links and wins only */
  --booth: #262625;      /* darker neutral behind the full-size viewer */
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surround); color: var(--ink); font: 400 17px/1.55 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-stretch: 62%; font-weight: 800; line-height: .95; margin: 0; text-wrap: balance; letter-spacing: -.005em; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); }
.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.panel { background: var(--panel); font: italic 900 22px/1 var(--display); font-stretch: 75%; padding: 7px 10px 6px 8px; font-variant-numeric: tabular-nums; }
.word { font: 800 21px/1 var(--display); font-stretch: 62%; letter-spacing: .01em; }
.top nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.top nav a { text-decoration: none; font-weight: 600; font-size: 16px; padding: 6px 0; border-bottom: 3px solid transparent; }
.top nav a:hover, .top nav a[aria-current] { border-bottom-color: var(--ink); }

/* Home hero: the newest weekend's cover photo, edge to edge */
.hero { display: block; text-decoration: none; }
.hero img { width: 100%; max-height: 78vh; object-fit: cover; }
.hero-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; padding: 18px var(--gutter) 0; }
.hero-cap h1 { font-size: clamp(44px, 9vw, 128px); }
.meta { margin: 0; color: var(--ink-soft); font-size: 15px; font-variant-numeric: tabular-nums; }
.sep { display: inline-block; width: 1px; height: .9em; background: var(--ink-soft); margin: 0 .7em; vertical-align: -.05em; opacity: .6; }

/* Sections */
.block { padding: clamp(40px, 7vw, 88px) var(--gutter) 0; }
.block.first { padding-top: clamp(20px, 4vw, 48px); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.block h2 { font-size: clamp(30px, 4.5vw, 52px); }
.page-title { font-size: clamp(48px, 9vw, 120px); }
.more { color: var(--green); font-weight: 600; text-underline-offset: 4px; }
.year { font-size: clamp(24px, 3vw, 34px); color: var(--ink-soft); margin-top: 40px; }
.year .series { font: 500 15px/1 var(--body); font-stretch: 100%; margin-left: 12px; letter-spacing: 0; }

/* A weekend, shown as a strip of its first frames */
.event { display: block; text-decoration: none; padding: 22px 0 26px; border-top: 1px solid var(--rule); }
.event-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; margin-bottom: 12px; }
.event h3 { font-size: clamp(26px, 3.4vw, 40px); }
.event:hover h3 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.strip { display: flex; gap: 6px; height: clamp(84px, 15vw, 200px); overflow: hidden; }
.strip img { height: 100%; width: auto; flex: 1 1 0; min-width: 0; flex-grow: var(--r); object-fit: cover; }

.intro { max-width: 46rem; }
.intro p { margin: 12px 0 14px; }

/* Event gallery: rows of equal height, every photo at its own shape */
.event-title { margin-bottom: clamp(20px, 3vw, 36px); display: grid; gap: 10px; }
.result { margin: 0; font-weight: 700; color: var(--green); }
.note { margin: 0; color: var(--ink-soft); max-width: 60ch; }
.rows { --h: 170; display: flex; flex-wrap: wrap; gap: 6px; }
.rows::after { content: ""; flex-grow: 1000; }
.rows a { flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * var(--h) * 1px); aspect-ratio: var(--r); background: var(--rule); overflow: hidden; }
.rows img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 700px) { .rows { --h: 260; gap: 8px; } }
@media (min-width: 1400px) { .rows { --h: 340; } }

.pager { display: flex; justify-content: space-between; gap: 24px; margin-top: 48px; border-top: 1px solid var(--rule); padding-top: 18px; }
.pager a { text-decoration: none; font: 800 24px/1.05 var(--display); font-stretch: 62%; }
.pager a span { display: block; font: 500 14px/1.6 var(--body); font-stretch: 100%; color: var(--ink-soft); }
.pager .next { text-align: right; margin-left: auto; }

/* Full-size viewer */
.viewer { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: var(--booth); color: #e9e9e6; }
.viewer::backdrop { background: var(--booth); }
.viewer[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
.viewer figure { margin: 0; height: 100dvh; display: grid; grid-template-rows: 1fr auto; min-width: 0; grid-column: 2; }
.viewer figure img { width: 100%; height: 100%; min-height: 0; object-fit: contain; padding: 48px 0 0; }
.viewer figcaption { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: center; padding: 12px 8px 18px; font-size: 14px; font-variant-numeric: tabular-nums; }
.v-count { color: #a9a9a5; }
.v-shot { color: #a9a9a5; }
.viewer button { background: none; border: 0; color: inherit; font: 600 15px var(--body); cursor: pointer; }
.v-prev, .v-next { font-size: 44px !important; line-height: 1; padding: 24px 14px; }
.v-close { position: absolute; top: 8px; right: 12px; padding: 10px; }
@media (max-width: 700px) { .v-prev, .v-next { display: none; } .viewer[open] { grid-template-columns: 0 1fr 0; } }

/* Driver */
.driver { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.driver-text { max-width: 36rem; display: grid; gap: 14px; }
.driver-text p { margin: 0; }
.driver-text h2 { font-size: 30px; margin-top: 18px; }
.highlights { margin: 0; padding: 0; list-style: none; }
.highlights li { padding: 10px 0; border-top: 1px solid var(--rule); font-weight: 600; }
.driver-photo { width: 100%; }
@media (max-width: 800px) { .driver { grid-template-columns: 1fr; } .driver-photo { order: -1; } }

.table-wrap { overflow-x: auto; margin-top: 10px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15.5px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 600; color: var(--ink-soft); font-size: 14px; }
th, td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); }
.num { text-align: right; padding-right: 0; padding-left: 16px; }
td.win { font-weight: 800; color: var(--green); }

.empty { padding: 15vh var(--gutter); max-width: 44rem; }
.empty h1 { font-size: clamp(44px, 8vw, 96px); margin-bottom: 16px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin-top: clamp(56px, 9vw, 120px); padding: 20px var(--gutter) 32px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-soft); }
.foot p { margin: 0; }
