/* horseracing.be — Arcade Fun theme, 2026 refresh.
   Calibrated palette (cream paper, deep racing-green ink, single coral accent),
   Fredoka display + Outfit body, inline SVG icons (fill=currentColor). */

/* Self-hosted variable fonts (latin subset, Google Fonts/OFL) — no third-party
   CSS request and nothing for Cloudflare Fonts to rewrite at the edge. */
@font-face{font-family:'Fredoka';font-style:normal;font-weight:400 700;font-display:swap;
  src:url('/assets/fonts/fredoka-latin-var.woff2') format('woff2')}
@font-face{font-family:'Outfit';font-style:normal;font-weight:400 700;font-display:swap;
  src:url('/assets/fonts/outfit-latin-var.woff2') format('woff2')}
:root{
  --sky:#aedcf2; --grass:#74b657; --grass-soft:#dcecd2; --turf:#2e7d32; --sun:#ffd23f;
  --cta:#e8512e; --cta-dark:#b13518; --ink:#15301a; --ink-soft:#41573f;
  --paper:#faf4e6; --card:#fffdf5; --line:#e7decb; --muted:#5a6b8c;
  --radius:16px; --shadow:0 16px 32px -24px rgba(21,48,26,.4);
  --font-display:'Fredoka',system-ui,'Trebuchet MS',sans-serif;
  --font-body:'Outfit',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --font-mono:ui-monospace,'SF Mono',Menlo,monospace;
  --ease:cubic-bezier(.16,1,.3,1);
}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--font-body);color:var(--ink);background:var(--paper);line-height:1.55}
h1,h2,h3{font-family:var(--font-display);font-weight:700;line-height:1.12;letter-spacing:-.02em;margin:.4em 0}
a{color:var(--turf)}
img{max-width:100%;height:auto;display:block}
main{display:block;max-width:1140px;margin:0 auto;padding:16px 20px}
.hr-ic{display:inline-block;width:1em;height:1em;vertical-align:-.12em;fill:currentColor}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* ---------- Buttons ---------- */
.hr-btn{display:inline-flex;align-items:center;gap:9px;border:0;cursor:pointer;font-weight:600;
  font-family:var(--font-display);font-size:16px;padding:11px 24px;border-radius:99px;text-decoration:none;
  transition:transform .15s var(--ease),filter .2s}
.hr-btn-cta{background:var(--cta);color:#fff;box-shadow:0 4px 0 var(--cta-dark)}
.hr-btn-cta:hover{filter:brightness(1.06)}
.hr-btn-cta:active{transform:translateY(3px);box-shadow:0 1px 0 var(--cta-dark)}
.hr-btn-ghost{background:var(--card);color:var(--ink);border:1.5px solid var(--line);box-shadow:0 3px 0 var(--line)}
.hr-btn-ghost:active{transform:translateY(2px);box-shadow:0 1px 0 var(--line)}
.hr-btn-lg{font-size:17px;padding:14px 28px}
.hr-ad-wrap{margin:16px auto;text-align:center;min-height:90px}
/* collapse AdSense units that came back empty so they don't leave a hole */
ins.adsbygoogle[data-ad-status=unfilled]{display:none!important}
.hr-ad-wrap:has(ins.adsbygoogle[data-ad-status=unfilled]){min-height:0;margin:0 auto}
/* in the sidebar flex column, auto margins would shrink-wrap the wrap to 0 width
   and AdSense then refuses to fill (availableWidth=0) — force full width */
.hr-side .hr-ad-wrap{width:100%}

/* ---------- Header / nav ---------- */
.hr-header{background:var(--ink);color:#f3f0e2;position:sticky;top:0;z-index:50}
.hr-header-inner{max-width:1140px;margin:0 auto;padding:10px 20px;display:flex;align-items:center;gap:18px;position:relative}
.hr-logo{display:inline-flex;align-items:center;gap:9px;font-family:var(--font-display);font-weight:700;
  font-size:20px;color:#fff;text-decoration:none;letter-spacing:-.01em}
.hr-logo-ic{width:22px;height:22px;color:var(--sun)}
.hr-logo b{color:var(--sun)}
.hr-burger{display:none;background:rgba(255,255,255,.12);border:0;color:#fff;font-size:20px;line-height:1;
  width:42px;height:38px;border-radius:10px;cursor:pointer;margin-left:auto}
.hr-nav{display:flex;gap:2px;align-items:center;margin-left:auto}
.hr-nav a{color:#cfdcc6;text-decoration:none;font-weight:500;padding:7px 13px;border-radius:99px;
  transition:background .25s var(--ease)}
.hr-nav a:hover{background:rgba(255,255,255,.1)}
.hr-nav a[aria-current=page]{color:var(--sun)}
.hr-mute{background:rgba(255,255,255,.1);border:0;color:#f3f0e2;width:36px;height:36px;border-radius:50%;cursor:pointer}
.hr-mute-ic{width:15px;height:15px}
.hr-mute[aria-pressed=true]{opacity:.45}
.hr-header-cta{font-size:15px;padding:9px 20px}

/* ---------- Hero: asymmetric split + animated scene ---------- */
.hr-hero{padding:40px 0 28px}
.hr-hero-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:48px;align-items:center}
.hr-kicker{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;letter-spacing:.13em;
  text-transform:uppercase;color:var(--turf);background:var(--grass-soft);padding:6px 14px;border-radius:99px}
.hr-hero-title{font-size:clamp(34px,4.6vw,56px);line-height:1.03;margin:.45em 0 .3em}
.hr-hero-title em{font-style:normal;color:var(--cta)}
.hr-hero-sub{font-size:18px;color:var(--ink-soft);max-width:46ch;margin:0 0 24px}
.hr-cta-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:0}
.hr-hero-note{margin-top:16px;font-size:13.5px;color:var(--ink-soft)}
.hr-hero-note b{color:var(--turf)}
.hr-scene{position:relative;background:linear-gradient(178deg,var(--sky) 0%,#9fd0e8 30%,var(--grass) 31%,#5da344 100%);
  border-radius:24px;padding:28px 20px 22px;box-shadow:0 24px 48px -28px rgba(21,48,26,.45);overflow:hidden}
.hr-scene::after{content:"";position:absolute;top:0;right:24px;bottom:0;width:0;border-right:3px dashed rgba(255,255,255,.85)}
.hr-scene-flag{position:absolute;top:12px;right:10px;color:#fff;z-index:2}
.hr-scene-flag .hr-ic{width:20px;height:20px}
.hr-scene-lane{position:relative;height:52px;border-bottom:2px dashed rgba(255,255,255,.5)}
.hr-scene-lane:last-of-type{border-bottom:0}
.hr-scene-runner{position:absolute;top:7px;display:flex;align-items:center;gap:8px;will-change:transform;
  animation:hr-lope 1.05s var(--ease) infinite}
.hr-scene-horse{width:32px;height:32px}
.hr-scene-runner.r1{left:46%;animation-delay:0s}
.hr-scene-runner.r2{left:22%;animation-delay:.18s}
.hr-scene-runner.r3{left:58%;animation-delay:.32s}
.hr-scene-chip{font-family:var(--font-mono);font-size:12px;font-weight:700;background:rgba(255,255,255,.92);
  color:var(--ink);padding:3px 8px;border-radius:99px;white-space:nowrap}
.hr-scene-bar{position:relative;margin-top:16px;background:rgba(13,32,16,.85);border-radius:13px;padding:9px 14px;
  display:flex;justify-content:space-between;align-items:center;color:#f3f0e2;font-size:13px}
.hr-scene-bar b{color:var(--sun);font-family:var(--font-mono)}
.hr-blink{display:inline-block;width:8px;height:8px;border-radius:50%;background:#69d84f;margin-right:8px;
  animation:hr-pulse 1.6s ease-in-out infinite}
@keyframes hr-lope{0%,100%{transform:translateY(0)}45%{transform:translateY(-6px)}}
@keyframes hr-pulse{0%,100%{opacity:1}50%{opacity:.25}}

/* ---------- Marquee tape ---------- */
.hr-tape{background:var(--ink);color:var(--sun);overflow:hidden;padding:10px 0;
  border-top:3px solid var(--sun);border-bottom:3px solid var(--sun)}
.hr-tape-in{display:flex;width:max-content;animation:hr-tape 22s linear infinite;will-change:transform}
.hr-tape-in span{font-family:var(--font-display);font-weight:600;font-size:14px;letter-spacing:.17em;
  text-transform:uppercase;white-space:nowrap;padding:0 20px}
@keyframes hr-tape{to{transform:translateX(-50%)}}

/* ---------- Zig-zag feature rows ---------- */
.hr-split{display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:center;margin:56px 0}
.hr-split-flip .hr-split-copy{order:2}
.hr-eyebrow{font-size:12px;font-weight:700;letter-spacing:.15em;text-transform:uppercase;color:var(--cta)}
.hr-split h2{font-size:clamp(24px,2.6vw,32px);margin:.35em 0 .4em}
.hr-split p{color:var(--ink-soft);font-size:16.5px;margin:0 0 18px}
.hr-split-link{font-family:var(--font-display);font-weight:600;color:var(--turf);text-decoration:none;font-size:16.5px}
.hr-split-link:hover{text-decoration:underline}
/* calculator preview */
.hr-prev-calc{display:block;background:var(--card);border:1.5px solid var(--line);border-radius:20px;padding:22px;box-shadow:var(--shadow)}
.hr-prev-label{display:block;font-weight:700;font-size:13px;margin:12px 0 5px}
.hr-prev-label:first-child{margin-top:0}
.hr-prev-in{display:block;background:#fff;border:1.5px solid var(--line);border-radius:11px;padding:10px 13px;
  color:var(--ink-soft);font-size:14.5px}
.hr-prev-bars{margin-top:18px}
.hr-prev-row{display:flex;align-items:center;gap:11px;margin:9px 0;font-size:14px;font-weight:700}
.hr-prev-row > span:first-child{flex:0 0 112px;display:flex;gap:7px;align-items:center}
.hr-prev-row .hr-ic{color:var(--cta)}
.hr-prev-row b{font-family:var(--font-mono);font-weight:700;width:28px;text-align:right}
/* tote-board preview */
.hr-prev-tote{display:block;background:#0e2412;border:1px solid #1d3a22;border-radius:20px;padding:22px;
  color:#e8f3e2;text-decoration:none;box-shadow:0 20px 40px -28px rgba(0,0,0,.5)}
.hr-tote-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px;
  font-family:var(--font-display);font-weight:600;font-size:15px}
.hr-tote-fs{display:inline-flex;align-items:center;gap:7px;background:rgba(255,255,255,.08);border-radius:99px;
  padding:6px 13px;font-size:12px;font-weight:700;font-family:var(--font-body)}
.hr-tote-row{display:flex;align-items:center;gap:11px;padding:10px 4px;border-top:1px solid rgba(255,255,255,.09);font-size:14px}
.hr-tote-row > span{flex:1;font-weight:500}
.hr-tote-row b{font-family:var(--font-mono);color:var(--sun);letter-spacing:.05em}
.hr-tote-lead > span::after{content:"LEADER";font-size:9px;font-weight:700;letter-spacing:.12em;color:#0e2412;
  background:var(--sun);border-radius:4px;padding:2px 6px;margin-left:9px;vertical-align:1px}
.hr-silk{width:13px;height:13px;border-radius:4px;flex:0 0 auto;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}
.hr-tote-cta{margin-top:16px;width:100%;justify-content:center}

/* ---------- Legacy feature cards (kept for inner pages) ---------- */
.hr-features{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}
.hr-feature{display:flex;flex-direction:column;gap:4px;background:var(--card);border:1.5px solid var(--line);
  border-radius:var(--radius);padding:18px;text-decoration:none;color:var(--ink);box-shadow:var(--shadow);
  transition:transform .15s var(--ease)}
.hr-feature:hover{transform:translateY(-2px);border-color:var(--grass)}
.hr-feature-icon{font-size:32px}
.hr-feature-title{font-family:var(--font-display);font-weight:700;font-size:19px}
.hr-feature-desc{color:var(--ink-soft)}
.hr-feature-cta{color:var(--turf);font-weight:700;margin-top:6px}

/* ---------- Content + sidebar grid ---------- */
.hr-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}
.hr-col-main{min-width:0}
.hr-side{display:flex;flex-direction:column;gap:16px}

/* ---------- Cards ---------- */
.hr-card{background:var(--card);border:1.5px solid var(--line);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}
.hr-card-title{margin:0 0 8px;font-size:18px}
.hr-link-list{list-style:none;margin:0;padding:0}
.hr-link-list li{margin:4px 0}
.hr-link-list a{color:var(--turf);text-decoration:none;font-weight:600}
.hr-link-list a:hover{text-decoration:underline}

/* ---------- Forms ---------- */
.hr-form{background:var(--card);border:1.5px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}
.hr-field{display:flex;flex-direction:column;gap:4px;margin:10px 0}
.hr-field label{font-weight:700}
.hr-field input,.hr-field select{padding:10px 12px;border:1.5px solid var(--line);border-radius:11px;font:inherit;background:#fff}
.hr-field input:focus,.hr-field select:focus{outline:2px solid var(--grass);border-color:var(--grass)}
.hr-horsefs{border:0;padding:0;margin:10px 0}
.hr-horsefs legend{font-weight:700;padding:0}
.hr-horses{list-style:none;margin:0;padding:0}
.hr-horse-row{display:flex;gap:8px;align-items:center;margin:6px 0}
.hr-horse-row input{flex:1;padding:10px 12px;border:1.5px solid var(--line);border-radius:11px;font:inherit;background:#fff}
.hr-horse-row input:focus{outline:2px solid var(--grass);border-color:var(--grass)}
.hr-horse-row .hr-rm{background:#fff;border:1.5px solid #e0b3b3;color:#b3302e;border-radius:9px;cursor:pointer;width:34px;height:34px;flex:0 0 auto}
.hr-addhorse{background:var(--card);border:1.5px dashed var(--grass);color:var(--turf);font-weight:700;
  border-radius:11px;padding:8px 12px;cursor:pointer}

/* ---------- Results trifecta ---------- */
.hr-trifecta{display:flex;flex-direction:column;gap:10px;margin:12px 0}
.hr-runner-card{background:var(--card);border:1.5px solid var(--line);border-radius:14px;padding:10px 12px;box-shadow:var(--shadow)}
.hr-runner-head{display:flex;justify-content:space-between;font-weight:700}
.hr-runner-medal{font-size:20px;margin-right:6px}
.hr-bar{display:block;flex:1;height:11px;border-radius:99px;margin-top:6px;background:var(--grass-soft);overflow:hidden}
.hr-bar > i{display:block;height:100%;border-radius:99px}
.hr-bar-1 > i{background:var(--grass)}
.hr-bar-2 > i{background:var(--sun)}
.hr-bar-3 > i{background:var(--cta)}
.hr-bar-n > i{background:#9fb6c6}
.hr-prev-row .hr-bar{margin-top:0}

/* ---------- Notices ---------- */
.hr-notice{border-radius:12px;padding:10px 14px;margin:10px 0;font-weight:600}
.hr-notice-error{background:#ffe7e3;color:#9c2a16;border:1px solid #f3b8ab}
.hr-notice-info{background:#e7f0ff;color:#274b8c;border:1px solid #b8cdf3}
.hr-notice-success{background:#e6f6e2;color:#256b1c;border:1px solid #b3e0a6}

/* ---------- Footer ---------- */
.hr-footer{background:var(--ink);color:#bcd2b3;margin-top:48px}
.hr-footer-inner{max-width:1140px;margin:0 auto;padding:24px 20px calc(24px + env(safe-area-inset-bottom,0px));
  text-align:center;font-size:14px}
.hr-footer a{color:#e3eedd}
.hr-disclaimer{color:#8fae85;font-style:italic}

/* ---------- Consent banner ---------- */
/* padding-bottom clears the mobile browser's bottom bar / iOS home indicator (safe-area) */
.hr-consent{position:fixed;left:0;right:0;bottom:0;background:var(--card);border-top:3px solid var(--turf);
  box-shadow:0 -4px 16px rgba(0,0,0,.12);padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));
  display:flex;gap:14px;align-items:center;justify-content:center;flex-wrap:wrap;z-index:100;
  max-height:80vh;overflow:auto}
.hr-consent-text{margin:0;max-width:640px;font-size:14px}
.hr-consent-actions{display:flex;gap:8px}

/* ---------- Race game ---------- */
.hr-game{background:var(--card);border:1.5px solid var(--line);border-radius:var(--radius);padding:14px;box-shadow:var(--shadow)}
.hr-game-intro{color:var(--ink-soft);margin-top:0}
.hr-game-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px;flex-wrap:wrap}
.hr-bankroll{background:var(--ink);color:var(--sun);font-weight:700;padding:5px 14px;border-radius:99px}
.hr-bankroll strong{font-family:var(--font-mono)}
.hr-track{background:linear-gradient(180deg,var(--sky) 0,var(--grass) 28%,#5aae44 100%);border:2px solid var(--turf);
  border-radius:12px;padding:8px 8px 8px 0;position:relative}
.hr-lane{display:flex;align-items:center;gap:8px;margin:5px 0}
.hr-lane-label{flex:0 0 150px;font-size:13px;font-weight:700;color:var(--ink);background:rgba(255,255,255,.8);
  padding:2px 8px;border-radius:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hr-lane-label em{color:#555;font-style:normal;font-family:var(--font-mono);font-size:12px}
.hr-lane-rail{position:relative;flex:1;height:24px;border-bottom:2px dashed rgba(255,255,255,.6)}
.hr-runner{position:absolute;top:50%;transition:left .12s linear;transform:translate(-50%,-55%)}
.hr-runner-horse{display:block;width:26px;height:26px;fill:currentColor;
  filter:drop-shadow(0 2px 1px rgba(0,0,0,.18))}
.hr-finish{position:absolute;top:6px;right:4px;bottom:6px;width:0;border-right:3px dashed #fff;font-size:14px}
.hr-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0}
.hr-controls select,.hr-controls input{padding:9px 11px;border:1.5px solid var(--line);border-radius:11px;font:inherit;background:#fff}
.hr-controls input[type=number]{width:84px}
.hr-game-result{font-weight:700;min-height:1.4em;margin:6px 0}
.hr-game-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
.hr-game-bar .hr-btn{padding:8px 14px;font-size:14px}
.hr-lane-label .hr-silk{display:inline-block;width:11px;height:11px;border-radius:3px;vertical-align:-1px}
#hr-fs-mute[aria-pressed=true]{opacity:.5}

/* ---------- Fullscreen game (modal overlay; native Fullscreen API where available) ---------- */
body.hr-noscroll{overflow:hidden}
.hr-fs-only{display:none}
.hr-game-fs{position:fixed;inset:0;z-index:200;margin:0;border:0;border-radius:0;box-shadow:none;
  height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:auto;background:var(--paper);
  padding:10px clamp(12px,3vw,40px) calc(10px + env(safe-area-inset-bottom,0px))}
.hr-game-fs::backdrop{background:var(--ink)}
.hr-game-fs .hr-fs-only{display:inline-flex}
.hr-game-fs .hr-game-bar{flex:0 0 auto}
.hr-game-fs .hr-track{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;
  justify-content:space-evenly;padding:10px 10px 10px 0}
.hr-game-fs .hr-lane{margin:0}
.hr-game-fs .hr-lane-rail{height:clamp(26px,7vh,52px)}
.hr-game-fs .hr-lane-label{flex-basis:clamp(110px,18vw,200px);font-size:clamp(12px,1.8vh,16px)}
.hr-game-fs .hr-runner-horse{width:clamp(26px,5.5vh,46px);height:clamp(26px,5.5vh,46px)}
.hr-game-fs .hr-finish{font-size:clamp(14px,3vh,24px)}
.hr-game-fs .hr-controls,.hr-game-fs .hr-game-result{flex:0 0 auto;margin:6px 0}
.hr-game-fs .hr-controls select,.hr-game-fs .hr-controls input{padding:11px 12px;font-size:16px}
.hr-game-fs .hr-game-result{font-size:clamp(15px,2.4vh,20px)}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  .hr-scene-runner,.hr-tape-in,.hr-blink{animation:none}
}

/* ---------- Responsive ---------- */
@media (max-width:780px){
  .hr-grid{grid-template-columns:1fr}
  .hr-features{grid-template-columns:1fr}
  .hr-burger{display:block}
  .hr-mute{margin-left:4px}
  .hr-header-cta{display:none}
  /* nav collapses into a dropdown panel toggled by the hamburger */
  .hr-nav{display:none;position:absolute;top:100%;left:0;right:0;margin:0;flex-direction:column;
    align-items:stretch;gap:2px;background:var(--ink);padding:8px 16px 12px;
    box-shadow:0 10px 18px rgba(0,0,0,.25);z-index:60}
  .hr-nav.open{display:flex}
  .hr-nav a{padding:11px 8px;border-radius:10px;font-size:16px}
  .hr-hero{padding:18px 0 8px}
  .hr-hero-grid,.hr-split{grid-template-columns:1fr;gap:26px}
  .hr-split{margin:40px 0}
  .hr-split-flip .hr-split-copy{order:0}
  .hr-hero-sub{font-size:16.5px}
  .hr-lane-label{flex-basis:100px;font-size:11px}
  /* fullscreen on narrow screens: label sits above its rail so names + odds stay readable */
  .hr-game-fs .hr-track{padding-left:22px} /* room for the half-overhanging horse at the start line */
  .hr-game-fs .hr-lane{flex-direction:column;align-items:flex-start;gap:2px}
  .hr-game-fs .hr-lane-label{flex-basis:auto;width:max-content;max-width:100%;font-size:13px}
  .hr-game-fs .hr-lane-rail{width:100%;height:clamp(22px,4.5vh,40px)}
  .hr-game-fs .hr-runner-horse{width:clamp(20px,4vh,34px);height:clamp(20px,4vh,34px)}
}
