/* RunHaven results. Colours are sampled from the logo's sunset stripes. */
:root {
  --coral-red: #f07167;
  --coral: #f48b7b;
  --salmon: #f7a58f;
  --peach: #fed9b7;
  --cream: #fdfcdc;
  --mint: #bee9d4;
  --aqua: #7fd6cb;
  --teal: #40c3c2;
  --teal-deep: #0098b0;
  --navy: #002a40;

  --bg: #fffef6;
  --surface: #ffffff;
  --text: var(--navy);
  --muted: #557080;
  --line: #e6ecdf;
  --head-bg: var(--navy);
  --head-text: var(--cream);
  --accent: var(--teal-deep);
  --hit: #fff1c9;
  --chip: #eef8f4;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #001b2a;
    --surface: #002a40;
    --text: var(--cream);
    --muted: #9fbac4;
    --line: #11425a;
    --head-bg: #00384f;
    --head-text: var(--cream);
    --accent: var(--aqua);
    --hit: #3d3a1c;
    --chip: #0b3b52;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #001b2a; --surface: #002a40; --text: var(--cream); --muted: #9fbac4; --line: #11425a;
  --head-bg: #00384f; --head-text: var(--cream); --accent: var(--aqua); --hit: #3d3a1c; --chip: #0b3b52; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.45 Jost, "Futura", "Century Gothic", system-ui, sans-serif; }
a { color: var(--accent); }
h1, h2 { font-family: "Bebas Neue", Impact, "Arial Narrow", sans-serif; font-weight: 400; letter-spacing: .02em; line-height: 1; margin: 0; }
small { display: block; color: var(--muted); font-size: .8em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; }

.demo { margin: 0; padding: 8px 16px; background: var(--coral-red); color: #fff; text-align: center; font-weight: 600; }

/* Masthead and the logo's stripes */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1040px; margin: 0 auto; padding: 14px 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand img { width: 64px; height: 64px; border-radius: 50%; flex: none; background: #fff; }
.brand b { display: block; font: 400 1.9rem/1 "Bebas Neue", Impact, sans-serif; letter-spacing: .03em; }
.brand small { font-size: .85rem; }
.brand em { display: block; font-style: normal; font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 3px 0 2px; }
.home { font-size: .9rem; white-space: nowrap; }
.sunset { display: grid; grid-template-rows: repeat(6, 4px); }
.sunset i:nth-child(1) { background: var(--coral-red); }
.sunset i:nth-child(2) { background: var(--salmon); }
.sunset i:nth-child(3) { background: var(--peach); }
.sunset i:nth-child(4) { background: var(--mint); }
.sunset i:nth-child(5) { background: var(--teal); }
.sunset i:nth-child(6) { background: var(--teal-deep); }

/* Race tabs */
.races { display: flex; gap: 8px; overflow-x: auto; max-width: 1040px; margin: 0 auto; padding: 16px; scrollbar-width: none; }
.races a { flex: none; padding: 7px 18px 8px; border: 1.5px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; font-weight: 600; background: var(--surface); line-height: 1.2; }
.races a small { font-size: .7rem; font-weight: 500; letter-spacing: .02em; }
.races a:hover { border-color: var(--teal); }
.races a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.races a[aria-current="page"] small { color: var(--aqua); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .races a[aria-current="page"] { background: var(--teal-deep); border-color: var(--teal-deep); } }

.race-head { margin: 8px 0 16px; }
.race-head h1 { font-size: 3rem; }
.race-head p { margin: 4px 0 0; color: var(--muted); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.filters label { display: grid; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 500; }
.filters .q { flex: 1 1 240px; }
.filters input, .filters select, .finder input { font: inherit; font-size: 1rem; color: var(--text); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 44px; width: 100%; }
.filters input:focus, .filters select:focus, .finder input:focus { outline: 3px solid var(--aqua); outline-offset: 0; border-color: var(--teal); }
.filters output { margin-left: auto; padding: 10px 0; color: var(--muted); font-size: .9rem; }

/* Results table */
.results { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-variant-numeric: tabular-nums; }
.results th { background: var(--head-bg); color: var(--head-text); text-align: left; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 12px 14px; }
.results td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.results tbody tr:first-child td { border-top: 0; }
.results tr { scroll-margin-top: 80px; }
.results tr:target td { background: var(--hit); }
.results .pos { width: 64px; text-align: center; }
.results .pos span { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 999px; font-weight: 600; }
.podium.p1 .pos span { background: var(--coral-red); color: #fff; }
.podium.p2 .pos span { background: var(--salmon); color: var(--navy); }
.podium.p3 .pos span { background: var(--peach); color: var(--navy); }
.results .who b { font-weight: 600; }
.results td.time { font-weight: 600; font-size: 1.05rem; white-space: nowrap; text-align: right; }
.results td.net { color: var(--muted); white-space: nowrap; text-align: right; }
.results th.time, .results th.net { text-align: right; }
.results .cat, .results .gen { white-space: nowrap; }
.results .m { display: none; }
.others .pos span { font-size: .75rem; background: var(--chip); color: var(--muted); }
h2 { font-size: 1.8rem; margin: 32px 0 12px; }
.none { padding: 24px; text-align: center; color: var(--muted); }

@media (max-width: 680px) {
  .results th.cat, .results td.cat, .results th.gen, .results td.gen, .results th.net, .results td.net { display: none; }
  .results .m { display: inline; }
  .results small.m { display: block; font-weight: 400; font-size: .75rem; }
  .results td { padding: 10px 8px; }
  .results .pos { width: 48px; }
  .race-head h1 { font-size: 2.4rem; }
  .brand b { font-size: 1.5rem; }
  .brand img { width: 48px; height: 48px; }
  .home { display: none; }
  .filters output { margin-left: 0; }
}

/* Home page */
.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 3.6rem; }
.finder { margin: 16px 0 24px; max-width: 560px; }
.finder label span { display: block; font-weight: 500; margin-bottom: 6px; }
.found { list-style: none; margin: 8px 0 0; padding: 0; }
.found li a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.found li a:hover { background: var(--chip); }
.found li em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--teal); border-radius: 14px; color: var(--text); text-decoration: none; }
.card:nth-child(5n+1) { border-top-color: var(--coral-red); }
.card:nth-child(5n+2) { border-top-color: var(--salmon); }
.card:nth-child(5n+3) { border-top-color: var(--teal); }
.card:nth-child(5n+4) { border-top-color: var(--aqua); }
.card:nth-child(5n+5) { border-top-color: var(--teal-deep); }
.card:hover { border-color: var(--teal); }
.card h2 { margin: 0; font-size: 2.2rem; }
.card p { margin: 0; color: var(--muted); }
.card .count { color: var(--text); font-weight: 500; }
.card ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.card li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; }
.card li span { grid-column: 1 / -1; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card li em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.card .go { margin-top: auto; padding-top: 10px; color: var(--accent); font-weight: 500; }

/* Holding page */
.holding { max-width: 640px; padding-bottom: 8px; }
.holding .lead { font-size: 1.15rem; }
.button { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--coral-red); color: #fff; font-weight: 600; text-decoration: none; }
.button:hover { background: var(--coral); }
.sponsors h2 { font-size: 1.6rem; }
.sponsors ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sponsors li { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: 12px; font-weight: 600; }
.sponsors li:nth-child(odd) { border-left-color: var(--coral-red); }
.sponsors li small { font-weight: 500; margin-bottom: 2px; }

.foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.foot p { margin: 6px 0; }
