/* Horse Racing UK — site stylesheet. Mobile-first. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter Display"; font-weight: 800; font-style: normal; font-display: swap; src: url("/assets/fonts/InterDisplay-ExtraBold.woff2") format("woff2"); }

:root {
  --green: #0F4A33;
  --green-deep: #0A3324;
  --green-tint: #E3EDE7;
  --gold: #D9A520;
  --gold-deep: #B88A14;
  --gold-tint: #FBF1D6;
  --cream: #F6F1E6;
  --paper: #FFFFFF;
  --ink: #14171C;
  --ink-2: #4A5058;
  --ink-3: #7A818B;
  --rule: #DDD8CC;
  --rule-2: #ECE8DE;
  --red: #B8302A;
  --red-tint: #F8E4E2;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Display", "Inter", system-ui, sans-serif;
  --radius: 6px;
  --gutter: 16px;
  --max: 1040px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--cream); font-feature-settings: "tnum" 1, "kern" 1; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; margin-top: 1.6em; }
h3 { font-size: 1.1rem; margin-top: 1.3em; }
p { margin: 0 0 1em; }
small, .muted { color: var(--ink-2); }
.muted-3 { color: var(--ink-3); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 1.5rem 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--rule-2); padding: 0 .3em; border-radius: 3px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
th { font-weight: 600; color: var(--ink-2); font-size: .85rem; }
td.num, th.num { text-align: right; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 720px; }

/* ---------- header / nav ---------- */
.site-header { background: var(--green); color: #fff; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.site-header .logo img { height: 40px; width: auto; }
.nav-toggle { background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: var(--radius); padding: 6px 10px; font: inherit; font-size: .9rem; cursor: pointer; }
.site-nav { display: none; background: var(--green-deep); }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 6px 0; display: flex; flex-direction: column; }
.site-nav a { display: block; color: #fff; text-decoration: none; padding: 10px var(--gutter); font-weight: 600; font-size: .95rem; }
.site-nav a[aria-current="page"] { color: var(--gold); }
.site-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.age-strip { background: var(--gold); color: var(--ink); font-size: .8rem; font-weight: 600; text-align: center; padding: 4px var(--gutter); }
.age-strip a { color: inherit; }
@media (min-width: 820px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; background: transparent; }
  .site-header .bar { height: 64px; }
  .site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
  .site-nav ul { flex-direction: row; gap: 2px; padding: 0; }
  .site-nav a { padding: 8px 12px; border-radius: var(--radius); }
}

/* ---------- footer ---------- */
.site-footer { background: var(--green-deep); color: #D7E3DC; margin-top: 3rem; padding: 2rem 0 1.5rem; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-footer .cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.site-footer li { margin: .3rem 0; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1.5rem; padding-top: 1rem; color: #B9CBC2; font-size: .82rem; }
.site-footer .legal strong { color: #fff; }

/* ---------- page furniture ---------- */
.page-head { padding: 1.5rem 0 .5rem; }
.page-head p.lead { font-size: 1.05rem; color: var(--ink-2); max-width: 62ch; }
.byline { font-size: .85rem; color: var(--ink-3); }
.byline b { color: var(--ink-2); font-weight: 600; }
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem; }
.panel + .panel { margin-top: 1rem; }
.band { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1.5rem 0; margin: 1.5rem 0; }
.band-green { background: var(--green); color: #fff; border: 0; }
.band-green a { color: var(--gold); }
.band-green h2 { color: #fff; margin-top: 0; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
.btn { display: inline-block; background: var(--green); color: #fff; font-weight: 600; text-decoration: none; padding: .6rem 1rem; border-radius: var(--radius); border: 0; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--green-deep); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-deep); color: var(--ink); }
.btn-line { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn-line:hover { background: var(--green-tint); color: var(--green-deep); }
.btn-sm { padding: .35rem .65rem; font-size: .85rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--green-tint); color: var(--green-deep); vertical-align: middle; }
.tag-gold { background: var(--gold-tint); color: var(--gold-deep); }
.tag-red { background: var(--red-tint); color: var(--red); }
.tag-grey { background: var(--rule-2); color: var(--ink-2); }
.notice { background: var(--gold-tint); border-left: 4px solid var(--gold); padding: .7rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1rem 0; }
.notice-red { background: var(--red-tint); border-left-color: var(--red); }
.notice-green { background: var(--green-tint); border-left-color: var(--green); }
.empty { color: var(--ink-2); padding: 1.5rem; text-align: center; background: var(--paper); border: 1px dashed var(--rule); border-radius: var(--radius); }

/* ---------- meetings strip ---------- */
.meetings { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.meeting-chip { flex: 0 0 auto; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 8px 12px; text-decoration: none; color: var(--ink); min-width: 150px; }
.meeting-chip:hover { border-color: var(--green); color: var(--ink); }
.meeting-chip b { display: block; font-weight: 600; }
.meeting-chip span { display: block; font-size: .8rem; color: var(--ink-2); }
.meeting-chip .going { color: var(--green-deep); font-weight: 600; }
.meeting-chip.ire b::after { content: " IRE"; font-size: .7rem; color: var(--ink-3); font-weight: 600; }

/* ---------- next off ---------- */
.next-off { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.next-off li a { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 8px 12px; text-decoration: none; color: var(--ink); }
.next-off li a:hover { border-color: var(--green); }
.next-off .t { font-family: var(--display); font-size: 1.15rem; font-weight: 800; }
.next-off .n { font-size: .9rem; color: var(--ink-2); }
.next-off .n b { color: var(--ink); font-weight: 600; }
.next-off .f { font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
@media (min-width: 720px) { .next-off { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- racecard ---------- */
.race-list { list-style: none; margin: 0; padding: 0; }
.race-list li { border-bottom: 1px solid var(--rule); }
.race-list a { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 10px 0; text-decoration: none; color: var(--ink); }
.race-list a:hover .race-name { color: var(--green-deep); }
.race-list .t { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.race-list .race-name { font-weight: 600; }
.race-list .race-meta { font-size: .85rem; color: var(--ink-2); }
.race-list .nr { color: var(--red); font-weight: 600; }
.race-list .done { color: var(--ink-3); font-weight: 600; }
.race-head { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.race-head h1 { margin-bottom: .2em; font-size: 1.5rem; }
.race-head .meta { color: var(--ink-2); font-size: .95rem; }
.race-head .meta span + span::before { content: "\00a0\00a0|\00a0\00a0"; color: var(--rule); }
.runners { width: 100%; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.runner { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--rule-2); align-items: start; }
.runner:last-child { border-bottom: 0; }
.runner.nr { opacity: .55; }
.runner.nr .horse::after { content: " non-runner"; color: var(--red); font-weight: 600; font-size: .85rem; }
.runner .horse { font-weight: 600; font-size: 1.02rem; }
.runner .horse a { color: var(--ink); text-decoration: none; }
.runner .horse a:hover { color: var(--green); text-decoration: underline; }
.runner .line { font-size: .85rem; color: var(--ink-2); }
.runner .line b { color: var(--ink); font-weight: 600; }
.runner .form { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; color: var(--ink); }
.runner .form .w { color: var(--green-deep); font-weight: 700; }
.runner .stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.runner .stats b { color: var(--ink); font-weight: 600; }
.runner .draw { color: var(--ink-3); }
.result-pos { font-family: var(--display); font-weight: 800; font-size: 1.1rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius); background: var(--rule-2); color: var(--ink-2); }
.result-pos.p1 { background: var(--gold); color: var(--ink); }
.result-pos.p2, .result-pos.p3 { background: var(--green-tint); color: var(--green-deep); }

/* Saddlecloth numbers: the standard GB/IRE colours. */
.cloth { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 4px; font-family: var(--display); font-weight: 800; font-size: 1.25rem; line-height: 1; border: 1px solid rgba(0,0,0,.12); }
.cloth.c1 { background: #D7262C; color: #fff; }
.cloth.c2 { background: #fff; color: #111; }
.cloth.c3 { background: #1F49B6; color: #fff; }
.cloth.c4 { background: #F2D23A; color: #111; }
.cloth.c5 { background: #1F8A3B; color: #fff; }
.cloth.c6 { background: #111; color: #F2D23A; }
.cloth.c7 { background: #F28C28; color: #111; }
.cloth.c8 { background: #F4A3C6; color: #111; }
.cloth.c9 { background: #2DB66B; color: #111; }
.cloth.c10 { background: #6B3FA0; color: #fff; }
.cloth.c11 { background: #A7A7A7; color: #B8302A; }
.cloth.c12 { background: #B9E15A; color: #111; }
.cloth.c13 { background: #7A4B2A; color: #fff; }
.cloth.c14 { background: #7B1A2E; color: #F2D23A; }
.cloth.c15 { background: #E8DCB8; color: #111; }
.cloth.c16 { background: #2BA3A3; color: #111; }
.cloth.c17 { background: #0A2E66; color: #fff; }
.cloth.c18 { background: #D7262C; color: #F2D23A; }
.cloth.c19 { background: #1F49B6; color: #F2D23A; }
.cloth.c20 { background: #D7262C; color: #111; }
.cloth.c21 { background: #1F49B6; color: #D7262C; }
.cloth.c22 { background: #1F8A3B; color: #F2D23A; }
.cloth.c23 { background: #111; color: #fff; }
.cloth.c24 { background: #F2D23A; color: #1F49B6; }
.cloth.cx { background: var(--rule-2); color: var(--ink-2); }
.cloth.nr { background: var(--rule-2); color: var(--ink-3); font-size: .8rem; }
.cloth.sm { display: inline-grid; width: 26px; height: 26px; font-size: .85rem; border-radius: 3px; vertical-align: middle; margin-right: 4px; }

/* ---------- preview ---------- */
.preview { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: .9rem 1rem; margin: 1rem 0; }
.preview p { margin: 0 0 .5em; }
.preview p:last-child { margin: 0; }
.preview .who { font-size: .8rem; color: var(--ink-3); }

/* ---------- signup ---------- */
.signup { background: var(--green); color: #fff; border-radius: var(--radius); padding: 1.2rem; margin: 1.5rem 0; }
.signup h3 { margin: 0 0 .3em; color: #fff; }
.signup p { color: #D7E3DC; margin: 0 0 .8em; font-size: .95rem; }
.signup form { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input[type=email] { flex: 1 1 200px; padding: .6rem .8rem; border: 0; border-radius: var(--radius); font: inherit; min-width: 0; }
.signup .btn { flex: 0 0 auto; }
.signup .fine { font-size: .75rem; color: #B9CBC2; margin: .6rem 0 0; }
.signup .msg { font-size: .9rem; margin: .5rem 0 0; color: var(--gold); }

/* ---------- tools ---------- */
.tool-row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tool-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .tool-row { grid-template-columns: repeat(4, 1fr); } }
.tool-card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--ink); display: block; }
.tool-card:hover { border-color: var(--green); color: var(--ink); }
.tool-card b { display: block; font-family: var(--display); font-size: 1.05rem; font-weight: 800; margin-bottom: .2em; }
.tool-card span { font-size: .9rem; color: var(--ink-2); }
.tool-card.soon { border-style: dashed; }
.tool-card.soon b::after { content: " coming soon"; font-family: var(--sans); font-size: .75rem; color: var(--gold-deep); font-weight: 600; }
.filters { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem; display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .filters { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .filters { grid-template-columns: 1fr 1fr 1fr; } }
.filters label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.filters select, .filters input { width: 100%; padding: .5rem .6rem; border: 1px solid var(--rule); border-radius: var(--radius); font: inherit; background: #fff; margin-top: 3px; }
.filters .check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); margin-top: .4rem; }
.filters .check input { width: auto; margin: 0; }
.filters .span-all { grid-column: 1 / -1; }
.calc { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem; }
.calc .row { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; margin-bottom: .8rem; }
.calc label { font-size: .85rem; font-weight: 600; color: var(--ink-2); display: block; }
.calc input, .calc select { width: 100%; padding: .5rem .6rem; border: 1px solid var(--rule); border-radius: var(--radius); font: inherit; margin-top: 3px; }
.calc .out { background: var(--green-tint); border-radius: var(--radius); padding: 1rem; margin-top: .5rem; }
.calc .out .big { font-family: var(--display); font-size: 1.8rem; font-weight: 800; color: var(--green-deep); }
.calc .out table { font-size: .9rem; margin-top: .5rem; }
.notebook-list { list-style: none; padding: 0; margin: 0; }
.notebook-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: .6rem 0; border-bottom: 1px solid var(--rule-2); }
.notebook-list .x { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; font-size: .85rem; }
.star { background: none; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-3); cursor: pointer; font: inherit; font-size: .78rem; padding: 1px 8px; line-height: 1.4; }
.star.on { background: var(--gold-tint); border-color: var(--gold); color: var(--gold-deep); }

/* ---------- content ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.3rem; }
.prose blockquote { margin: 1.2rem 0; padding: .8rem 1rem; background: var(--paper); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote p:last-child { margin: 0; }
.prose table { background: var(--paper); font-size: .92rem; }
.prose img { border-radius: var(--radius); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .25rem 0; }
.card-list { display: grid; gap: 1rem; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 1rem 0; }
@media (min-width: 640px) { .card-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .card-list.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }
.card-list li { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem; }
.card-list li a.title { font-family: var(--display); font-weight: 800; font-size: 1.08rem; text-decoration: none; color: var(--ink); display: block; margin-bottom: .3em; }
.card-list li a.title:hover { color: var(--green); }
.card-list li p { font-size: .92rem; color: var(--ink-2); margin: 0 0 .4em; }
.card-list li .byline { margin: 0; }
.compare { overflow-x: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); }
.compare table { min-width: 720px; font-size: .88rem; }
.compare td.y { color: var(--green-deep); font-weight: 600; }
.compare td.n { color: var(--ink-3); }
.offer { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.offer .headline { font-family: var(--display); font-weight: 800; font-size: 1.15rem; margin-bottom: .3em; }
.offer .terms { font-size: .8rem; color: var(--ink-2); margin: .5rem 0 0; }
.pl { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 1rem 0; }
@media (min-width: 640px) { .pl { grid-template-columns: repeat(4, 1fr); } }
.pl div { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: .8rem; }
.pl b { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 800; }
.pl span { font-size: .82rem; color: var(--ink-2); }
.pl .pos b { color: var(--green-deep); }
.pl .neg b { color: var(--red); }
.tip-card { background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: 1rem; }
.tip-card .sel { font-family: var(--display); font-size: 1.5rem; font-weight: 800; }
.tip-card .where { color: var(--ink-2); }
.tip-card .why { margin-top: .6rem; }
.crumbs { font-size: .85rem; color: var(--ink-3); padding-top: 1rem; }
.crumbs a { color: var(--ink-2); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; font-size: .95rem; }
.sr { position: absolute; left: -9999px; }
.chart { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: .6rem; }
.chart svg { width: 100%; height: auto; }
