@font-face {
  font-family: "Ultra";
  src: url("/fonts/ultra.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --turf: #17603f;
  --mown: #1a6845; /* the lighter stripe a mower leaves */
  --ink: #0d3524;  /* the racecard is printed in green */
  --rule: #b9cdbf;
  --paper: #fff;
  --bulb: #ffb627;
  --silk-yellow: #ffd000;
  --silk-magenta: #d81b60;
  --display: "Ultra", "Rockwell Extra Bold", "Rockwell", Georgia, serif;
  --text: "Archivo", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.5;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

.defs {
  position: absolute;
}

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

:focus-visible {
  outline: 3px solid var(--silk-yellow);
  outline-offset: 3px;
}

/* The track: turf with mowing stripes, closed off by the running rail. */

.turf {
  background: repeating-linear-gradient(90deg, var(--turf) 0 9rem, var(--mown) 9rem 18rem);
  color: #fff;
}

.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem);
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.25rem, 11.5vw, 8.75rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-left: -0.04em;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  margin-top: clamp(1.75rem, 4vw, 3rem);
}

.lede {
  max-width: 30ch;
  font-size: clamp(1.3125rem, 2.4vw, 1.75rem);
  font-weight: 500;
  font-stretch: 92%;
  line-height: 1.3;
}

.status {
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--silk-yellow);
}

.turf a {
  color: inherit;
  font-weight: 700;
  text-decoration-color: var(--silk-yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
}

.turf a:hover {
  color: var(--silk-yellow);
}

.contact {
  margin-top: 0.625rem;
  font-size: 1.1875rem;
}

/* The tote board: the pairs are the runners, and the pips are what they race over. */

.tote {
  background: #000;
  border: 0.375rem solid #2a2a2a;
  border-radius: 0.25rem;
  padding: 1rem 1.25rem 0.875rem;
  box-shadow: 0 0.75rem 0 -0.25rem rgb(0 0 0 / 0.25);
}

.tote table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.tote caption {
  text-align: left;
  padding-bottom: 0.625rem;
  font-size: 0.875rem;
  font-weight: 700;
  font-stretch: 112%;
  color: #b3b3b3;
}

.tote thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #b3b3b3;
  text-align: right;
  padding-bottom: 0.25rem;
}

.tote thead th:first-child {
  text-align: left;
}

.tote tbody th {
  text-align: left;
  font-size: 1.125rem;
  font-weight: 700;
  font-stretch: 85%;
  color: #fff;
  padding-block: 0.3125rem;
  white-space: nowrap;
}

.tote tbody th span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  font-stretch: 100%;
  color: #b3b3b3;
  line-height: 1.1;
}

.tote td {
  text-align: right;
  color: var(--bulb);
  text-shadow: 0 0 0.5rem rgb(255 182 39 / 0.55);
  font-weight: 600;
  white-space: nowrap;
  padding-left: 0.75rem;
  transition: color 0.6s ease-out;
}

.tote td.lit {
  color: #fff3d6;
  transition: none;
}

.tote .fig {
  font-size: 0.9375rem;
}

.tote .pips {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.tote sup {
  font-size: 0.8125rem;
  vertical-align: 0.75em;
  line-height: 0;
}

.tote figcaption {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: #b3b3b3;
}

.rail {
  height: 3.5rem;
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 0.625rem no-repeat,
    repeating-linear-gradient(90deg, #fff 0 0.375rem, transparent 0.375rem 7rem) 2rem 0.625rem / 100% 2rem no-repeat;
}

/* The racecard. */

.racecard {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.racecard h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}

.conditions {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  font-stretch: 92%;
}

.columns,
.runners li {
  display: grid;
  grid-template-columns: 3rem 4.5rem minmax(0, 1fr) 5rem 5.5rem;
  column-gap: 1.25rem;
}

.columns {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.columns .horse {
  grid-column: 3;
}

.columns .odds,
.runners .odds {
  text-align: right;
}

.runners {
  list-style: none;
  padding: 0;
}

.runners li {
  grid-template-areas:
    "no silks name form odds"
    "no silks spot form odds";
  grid-template-rows: auto 1fr;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.runners .no {
  grid-area: no;
  font-family: var(--display);
  font-size: 1.75rem;
  line-height: 1.1;
}

.runners .silks {
  grid-area: silks;
  width: 4.5rem;
  height: 4.5rem;
  margin-top: -0.5rem;
}

.seam {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.runners h3 {
  grid-area: name;
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 78%;
  line-height: 1.2;
}

.spotlight {
  grid-area: spot;
  max-width: 62ch;
  margin-top: 0.375rem;
}

.runners .form {
  grid-area: form;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  padding-top: 0.25rem;
}

.runners .odds {
  grid-area: odds;
  font-weight: 700;
  font-size: 1.125rem;
  padding-top: 0.125rem;
  white-space: nowrap;
}

.label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.non-runners-heading {
  margin-top: 2.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.non-runners {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.non-runners li {
  padding-block: 0.375rem;
}

.non-runners s {
  font-weight: 700;
  font-stretch: 85%;
  margin-right: 0.375rem;
  text-decoration-thickness: 2px;
}

/* The finish. */

.finish {
  padding-block: clamp(3.5rem, 8vw, 5.5rem) 2.5rem;
}

.finish h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
}

.finish p {
  max-width: 52ch;
  margin-top: 1rem;
  font-size: 1.1875rem;
}

.finish .small {
  margin-top: 3.5rem;
  font-size: 0.875rem;
}

@media (max-width: 52rem) {
  .hero-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .tote {
    max-width: 24rem;
  }
}

@media (max-width: 40rem) {
  .columns {
    display: none;
  }

  .runners li {
    grid-template-columns: 2rem 3.25rem minmax(0, 1fr) auto;
    column-gap: 0.875rem;
    grid-template-areas:
      "no silks name odds"
      "no spot spot spot"
      "no form form form";
    grid-template-rows: auto auto auto;
  }

  .runners .silks {
    width: 3.25rem;
    height: 3.25rem;
    margin-top: -0.25rem;
  }

  .runners .no {
    font-size: 1.375rem;
  }

  .runners h3 {
    font-size: 1.3125rem;
  }

  .runners .form {
    padding-top: 0.5rem;
    font-size: 0.9375rem;
  }

  .runners .form .label {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
    letter-spacing: 0;
    font-weight: 600;
  }
}
