/* Hound: race night at the dog track. Floodlit white paint, the starting traps as the header (graphite grilles over
   a strip of the six trap colours), a raked sand track with trap-coloured numbers, greyhounds in trap coats,
   collar medals for the places and a steel dog bowl of coins as the pot. */
@font-face { font-family: 'Limelight'; src: url(/fonts/limelight.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(/fonts/dmsans.woff2) format('woff2'); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: 'Source Code Pro'; src: url(/fonts/sourcecode.woff2) format('woff2'); font-weight: 200 900; font-display: swap; }

:root {
  --wall: #f3f1ec;
  --wall-2: #e2ddd1;
  --cream: #fffdf8;
  --paper: #f3efe6;
  --ink: #151a2b;
  --ink-2: #3f4557;
  --ink-3: #686e80;
  --red: #2152c4;          /* primary buttons: trap 2 blue */
  --red-dk: #183f9a;
  --bulb: #f5c242;         /* the hare's yellow */
  --amber: #ee7d14;        /* trap 5 orange */
  --cobalt: #d6312b;       /* trap 1 red: second accent */
  --turf: #d4a062;         /* the sand */
  --turf-2: #cc985a;
  --plank: #fbfaf6;
  --plank-dk: #d3d8de;
  --tin: #d9dde3;
  --night: #1d2747;        /* the stand under the floodlights */
  --grille: #1b1f2a;
  --up: #1b7f44;
  --down: #cf2f2f;
  --t1: #d6312b; --t2: #2152c4; --t3: #fbfaf6; --t4: #16181d; --t5: #ee7d14;
  --t7: #2e8b4a; --t8: #f5c242; --t9: #e86aa0; --t10: #6b3fa0;
  --traps: linear-gradient(90deg, var(--t1) 0 16.666%, var(--t2) 0 33.333%, var(--t3) 0 50%, var(--t4) 0 66.666%, var(--t5) 0 83.333%, transparent 0);
  --hoops: repeating-linear-gradient(90deg, var(--t4) 0 5px, var(--t3) 5px 10px);
  --display: 'Limelight', 'Didot', Georgia, serif;
  --text: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Source Code Pro', ui-monospace, Menlo, monospace;
}

body { background-color: var(--wall); background-image: linear-gradient(180deg, #f8f6f1, var(--wall) 420px); }
h1, h2, h3 { letter-spacing: 0; }
/* Limelight runs wide: sized so "Chase the pot." stays on one line in the hero column */
h1 { font-size: clamp(38px, 4.3vw, 62px); line-height: 1.06; }
@media (max-width: 1020px) { h1 { font-size: clamp(36px, 8.6vw, 64px); } }
.hero h1 .h1b { color: var(--red); text-shadow: 2px 2px 0 var(--ink); }
.lede { font-weight: 450; }
.btn { font-weight: 700; letter-spacing: 0; }
.btn:hover { background: #2b60d8; }
.step h3::before { color: var(--cobalt); }

/* the header: the front of the starting traps, graphite grilles, a strip of the six trap colours along the bottom */
.top {
  background-color: var(--grille);
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .055) 0 2px, transparent 2px 18px), linear-gradient(180deg, #262b38, var(--grille));
  padding-bottom: 12px;
}
.brand-horse { width: 92px; height: 54px; filter: drop-shadow(2px 2px 0 #000); }
.brand-word { letter-spacing: .01em; text-shadow: 2px 2px 0 #000; }
.bulbs.traps { bottom: 0; height: 12px; border-top: 2.5px solid var(--ink); background: var(--traps) 0 0 / 240px 100% repeat-x, var(--hoops) 0 0 / 10px 100% repeat-x; }
.nav a { white-space: nowrap; }
.nav a:hover { border-color: rgba(251, 250, 246, .4); }

/* the booth: the stand at night under the floodlights; the sign is the tote board */
.booth { background: var(--night); background-image: radial-gradient(120% 60% at 50% 0%, rgba(255, 246, 214, .16), transparent 60%); }
.booth-sign { background: #0f121b; color: #f6f2e6; border-color: var(--ink); border-radius: 6px; }
.booth-sign .t-meta { color: #aeb4c3; }
.booth-sign .clock { color: var(--bulb); }
.booth-sign .clock small { color: #aeb4c3; }
.booth-more, .booth-more a { color: #f6f2e6; }
/* the shelf is the white running rail */
.shelf::after { background: linear-gradient(var(--plank), var(--plank-dk)); }
.prize b { top: calc(clamp(60px, 7.8vw, 86px) * .74 - .55em); font-size: clamp(11px, 1.25vw, 15px); }
.pot .pot-sum { top: calc(clamp(86px, 11vw, 128px) * .72); }
.pot .pot-label { color: var(--ink); text-shadow: none; position: relative; z-index: 2; }

/* the track: raked sand, the white rail along the top, trap numbers in their colours */
.track {
  background-color: var(--turf);
  background-image:
    repeating-linear-gradient(180deg, rgba(120, 66, 20, .10) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, rgba(255, 240, 210, .18), transparent 30%);
  border-top-width: 6px; border-top-color: var(--plank);
  box-shadow: inset 0 2.5px 0 var(--ink);
  --lane-h: 70px;
}
.mini-booth .track { --lane-h: 48px; }
.lane { border-bottom: 1.5px solid rgba(110, 60, 20, .28); }
.lane:nth-child(even) { background: rgba(110, 60, 20, .05); }
.lane::after { background: rgba(110, 60, 20, .16); box-shadow: none; height: 3px; }
.lane-no { font: 400 20px/1 var(--display); background: var(--t1); color: #fff; }
.lane-no[data-t='1'] { background: var(--t2); color: #fff; }
.lane-no[data-t='2'] { background: var(--t3); color: var(--ink); }
.lane-no[data-t='3'] { background: var(--t4); color: #fff; }
.lane-no[data-t='4'] { background: var(--t5); color: var(--ink); }
.lane-no[data-t='5'] { background: repeating-linear-gradient(180deg, var(--t4) 0 6px, var(--t3) 6px 12px); color: var(--ink); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; }
.lane-no[data-t='6'] { background: var(--t7); color: #fff; }
.lane-no[data-t='7'] { background: var(--t8); color: var(--ink); }
.lane-no[data-t='8'] { background: var(--t9); color: var(--ink); }
.lane-no[data-t='9'] { background: var(--t10); color: #fff; }
.lane-empty { color: #fffaf0; }
.zero { border-left: 3px dashed rgba(255, 253, 248, .9); }
.zero span { color: #fffdf8; text-shadow: 1px 1px 0 var(--ink); }
/* the photo-finish line */
.finish { width: 22px; background: linear-gradient(90deg, var(--plank) 0 38%, var(--t1) 38% 62%, var(--plank) 62%); }

/* the greyhounds: 240 x 140 symbol, coin on the coat, a little sand kicked up behind */
.runner.hound { --hw: calc((var(--lane-h, 64px) - 12px) * 1.714); top: 4px; bottom: 4px; }
.runner.hound .disc { left: 46.5%; top: 29%; width: 17%; border-width: 2px; background: var(--silk, #2152c4); }
.runner.hound .rod {
  left: -10%; bottom: -2px; width: 30%; height: 12px; border: 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 92, 36, .5), rgba(150, 92, 36, 0));
}
.tag { border-radius: 5px; }
.runner.p1 .tag { background: #fbe7a6; }
.runner.me .tag { background: #cfe0ff; }

/* paper bits */
.panel { border-radius: 10px; }
.ticket.classic { --tk: var(--amber); }
.dlg-head { background: var(--night); }
.seg button[aria-pressed='true'] { box-shadow: 3px 3px 0 var(--red); }
.test-note { background: #fbf3d9; border-color: #ecd99a; }
.toast { box-shadow: 4px 4px 0 var(--red); }
.foot { position: relative; border-top: 0; padding-top: 12px; background: var(--ink); color: #cfd3dc; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: var(--traps) 0 0 / 240px 100% repeat-x, var(--hoops) 0 0 / 10px 100% repeat-x; }
.hits button:hover, .hits button:focus-visible, .wallets button:hover, .standings tr.me td { background: #e6eeff; }
.inp:focus-within { box-shadow: 0 0 0 3px #9db8f5; }

@media (max-width: 640px) {
  .track { --lane-h: 52px; }
  .brand-horse { width: 66px; height: 40px; }
  .brand-word { font-size: 30px; }
  .hero h1 .h1b { text-shadow: 1.5px 1.5px 0 var(--ink); }
  .lane-no { font-size: 15px; }
  .runner.hound { left: calc(28px + (100% - 28px - 18px - var(--hw)) * var(--x, 0)); }
  .finish { width: 14px; }
}
