:root {
  --primary: #1e5b3a;
  --secondary: #14422a;
  --accent: #f2c230;
  --cta: #c8174e;
  --cta-hover: #a01240;
  --bg: #fbfdf8;
  --surface: #ffffff;
  --surface-alt: #eef6ec;
  --petal: #fdeef3;
  --petal-line: #f5cfdc;
  --text: #172a20;
  --muted: #4f6358;
  --border: #dde8da;
  --row-alt: #f5faf3;
  --success: #1e7a45;
  --danger: #b42318;
  --radius: 10px;
  --radius-lg: 18px;
  --w: 1180px;
  --w-text: 72ch;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--secondary); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; border-radius: 4px; }
.container { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 18px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--secondary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { top: 0; color: #fff; }

/* Header */
.topbar { background: var(--secondary); color: #e3efe6; font-size: 0.82rem; }
.topbar .container { display: flex; gap: 10px; align-items: center; min-height: 34px; }
.badge-18 { display: inline-grid; place-items: center; min-width: 30px; height: 22px; border-radius: 999px; border: 1.5px solid currentColor; font-size: 0.7rem; font-weight: 800; }
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(251, 253, 248, 0.96); border-bottom: 1px solid var(--border); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(251, 253, 248, 0.86); backdrop-filter: saturate(1.4) blur(8px); } }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--secondary); }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 1.28rem; letter-spacing: -0.01em; line-height: 1.1; }
.brand__sub { display: block; font-family: var(--sans); font-size: 0.72rem; color: var(--muted); font-weight: 600; letter-spacing: 0.01em; }
.nav { margin-left: auto; }
.nav-desktop { display: none; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav-desktop a { display: block; padding: 8px 11px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.nav-desktop a:hover, .nav-desktop a[aria-current="page"] { background: var(--surface-alt); color: var(--secondary); }
.nav-mobile > summary { list-style: none; cursor: pointer; padding: 9px 16px; border: 1px solid var(--border); border-radius: 999px; font-weight: 700; font-size: 0.95rem; background: var(--surface); }
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile ul { list-style: none; margin: 0; padding: 10px; position: absolute; right: 18px; left: 18px; top: 62px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 36px rgba(20, 66, 42, 0.14); display: grid; gap: 2px; }
.nav-mobile a { display: block; padding: 11px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; }
.nav-mobile a[aria-current="page"] { background: var(--surface-alt); }
@media (min-width: 980px) { .nav-desktop { display: flex; } .nav-mobile { display: none; } }

/* Page head */
.page-head { position: relative; padding: 20px 0 0; background: linear-gradient(180deg, var(--surface-alt) 0%, var(--bg) 100%); }
.page-head__grid { display: grid; gap: 22px; padding-bottom: 26px; }
@media (min-width: 980px) { .page-head__grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 40px; } }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; font-size: 0.85rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #9db3a4; }
.crumbs a { color: var(--muted); }
h1, h2, h3 { font-family: var(--serif); color: var(--secondary); line-height: 1.18; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); margin: 0 0 12px; max-width: 24ch; }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin: 2.2em 0 0.6em; }
h3 { font-size: 1.22rem; margin: 1.6em 0 0.5em; }
.byline { margin: 0 0 14px; font-size: 0.9rem; color: var(--muted); }
.byline a { font-weight: 700; color: var(--text); }
.lead { font-size: 1.15rem; color: #2c4236; max-width: 62ch; margin: 0; }
.rose-strip { display: block; width: 100%; height: 46px; }

/* Race card: the signature element */
.racecard { background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius-lg); padding: 18px 20px 16px; box-shadow: 6px 6px 0 var(--accent); }
.racecard__top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.racecard__no { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--cta); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; }
.racecard__title { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; color: var(--secondary); line-height: 1.25; }
.racecard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 0.95rem; }
.racecard dt { color: var(--muted); }
.racecard dd { margin: 0; font-weight: 700; }
.racecard__note { margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); }

/* Layout */
.hero { margin: 0 0 26px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface-alt); }
.hero img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.layout { display: grid; gap: 34px; padding: 26px 0 70px; }
@media (min-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; } }
.content { min-width: 0; }
.content > p, .content > ul, .content > ol { max-width: var(--w-text); }
.content li { margin-bottom: 0.4em; }
.sidebar { display: grid; gap: 18px; align-content: start; }
@media (min-width: 980px) { .sidebar { position: sticky; top: 84px; } }
.side-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.side-box h2 { font-size: 1.08rem; margin: 0 0 8px; }
.side-box ul { list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.side-box li { padding: 6px 0; border-top: 1px dashed var(--border); }
.side-box li:first-child { border-top: 0; }

/* Summary, TOC, callouts */
.summary { background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 16px 20px 6px; margin: 0 0 24px; }
.summary h2 { font-size: 1.1rem; margin: 0 0 8px; }
.summary ul { margin: 0; padding-left: 1.1em; }
.toc { background: var(--surface-alt); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 8px; font-size: 0.97rem; }
.toc h2 { font-size: 1.05rem; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 1; }
@media (min-width: 700px) { .toc ol { columns: 2; column-gap: 28px; } }
.toc li { break-inside: avoid; margin-bottom: 4px; }
blockquote { margin: 1.4em 0; background: var(--petal); border: 1px solid var(--petal-line); border-radius: var(--radius); padding: 12px 18px; max-width: var(--w-text); }
blockquote p { margin: 0.4em 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
caption { text-align: left; padding: 10px 14px 0; font-weight: 700; color: var(--secondary); }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-alt); color: var(--secondary); font-weight: 700; white-space: nowrap; }
tbody tr:nth-child(even) { background: var(--row-alt); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.status { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.status--ok { background: #e3f3e8; color: var(--success); }
.status--wait { background: #fff4d1; color: #7a5600; }
.status--out { background: #fde7e7; color: var(--danger); }

/* Horse cards */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin: 1em 0 1.6em; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.card p { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* Toplist */
.toplist { margin: 0 0 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 16px 10px; }
.toplist h2 { font-size: 1.2rem; margin: 0 0 10px; }
.toplist ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.toplist__item { display: grid; grid-template-columns: 30px 52px minmax(0, 1fr); gap: 10px 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.toplist__rank { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--primary); text-align: center; }
.toplist__logo { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.toplist__name { display: block; font-weight: 800; }
.toplist__offer { display: block; font-weight: 600; font-size: 0.95rem; }
.toplist__meta { display: block; font-size: 0.85rem; color: var(--muted); }
.toplist__cta { grid-column: 1 / -1; }
@media (min-width: 700px) {
  .toplist__item { grid-template-columns: 34px 56px minmax(0, 1fr) auto; }
  .toplist__cta { grid-column: auto; }
}
.cta { display: inline-flex; justify-content: center; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 18px; border-radius: 999px; background: var(--cta); color: #fff; font-weight: 800; text-decoration: none; white-space: nowrap; }
.cta:hover { background: var(--cta-hover); color: #fff; }
@media (min-width: 700px) { .cta { width: auto; } }
.fineprint { font-size: 0.8rem; color: var(--muted); margin: 10px 2px 2px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; max-width: var(--w-text); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; padding: 12px 28px 12px 0; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font-size: 1.4rem; color: var(--primary); }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 10px 0 14px; }
@media (min-width: 980px) { .faq summary { font-size: 1.15rem; } }

/* Sources, author, related */
.sources { font-size: 0.93rem; }
.sources ol { padding-left: 1.2em; }
.author-box { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; margin-top: 36px; max-width: var(--w-text); }
.author-box img { border-radius: 50%; }
.author-box h2 { font-size: 1.1rem; margin: 0 0 4px; }
.author-box p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.related { margin-top: 36px; }
.related ul { list-style: none; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.related a { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; font-weight: 700; text-decoration: none; }
.related a:hover { border-color: var(--primary); }
.rg-note { background: var(--surface-alt); border-radius: var(--radius); padding: 12px 16px; font-size: 0.92rem; margin-top: 28px; max-width: var(--w-text); }

/* Sweep sheet */
.sweep { border: 2px dashed var(--primary); border-radius: var(--radius-lg); padding: 14px; background: var(--surface); }
.sweep table td:last-child { min-width: 160px; }

/* Footer */
.site-footer { background: var(--secondary); color: #d8e7dc; padding: 40px 0 26px; font-size: 0.93rem; }
.site-footer a { color: #ffffff; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.18); margin-top: 26px; padding-top: 16px; font-size: 0.85rem; color: #bcd1c3; }

@media print {
  .topbar, .site-header, .sidebar, .site-footer, .toplist, .toc, .related, .rose-strip, .hero, .faq, .author-box, .rg-note, .sources, .crumbs, .racecard { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .layout { display: block; padding: 0; }
  .sweep { border: 1px solid #000; }
}

@media (max-width: 699px) {
  .brand__sub { display: none; }
  .topbar { font-size: 0.76rem; }
  .racecard { box-shadow: 4px 4px 0 var(--accent); margin-right: 4px; }
  .lead { font-size: 1.05rem; }
}
.racecard dl { grid-template-columns: 6.5em 1fr; }

/* Authors */
.author-box { display: block; }
.author-box h2 { margin: 0 0 12px; }
.author-box__person { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 0; border-top: 1px dashed var(--border); }
.author-box__person:first-of-type { border-top: 0; padding-top: 0; }
.author-box__person img { border-radius: 50%; width: 64px; height: 64px; object-fit: cover; }
.author-box__person h3 { font-size: 1.05rem; margin: 0 0 4px; }
.author-box__label { font-size: 0.82rem !important; color: var(--primary) !important; font-weight: 700; margin: 0 0 2px !important; }
.author-box__policy { margin-top: 10px !important; }
.profile-photo { margin: 0; justify-self: start; text-align: center; }
.profile-photo img { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; border: 6px solid var(--surface); box-shadow: 6px 6px 0 var(--accent); }
.profile-photo figcaption { margin-top: 10px; font-weight: 700; color: var(--secondary); font-family: var(--serif); }

/* ===== Centred wide layout (site-wide) ===== */
:root { --w: 1200px; --w-text: 760px; --gutter: clamp(18px, 4vw, 56px); }
.container { max-width: calc(var(--w) + 2 * var(--gutter)); padding: 0 var(--gutter); }
.layout { display: block; padding: 30px 0 64px; }
.content { max-width: var(--w); margin: 0 auto; }
.content > h2, .content > h3, .content > p, .content > ul, .content > ol, .content > blockquote, .content > .rg-note { max-width: var(--w-text); margin-left: auto; margin-right: auto; }
.content > .table-wrap, .content > div.table-wrap { max-width: var(--w); margin-left: auto; margin-right: auto; }
.sidebar { display: none; }

/* Page head: same centred width as the body */
.page-head .container { max-width: calc(var(--w) + 2 * var(--gutter)); }
.page-head__grid { padding-bottom: 18px; }
@media (min-width: 980px) { .page-head__grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; } h1 { max-width: 26ch; } }
.lead { max-width: 68ch; }

/* Key dates strip */
.keydates { padding: 0 0 22px; }
.keydates ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .keydates ol { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.keydates li { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--primary); border-radius: var(--radius); padding: 10px 14px; }
.keydates li:last-child { border-top-color: var(--cta); }
.keydates__when { display: block; font-weight: 800; font-size: 0.92rem; color: var(--secondary); }
.keydates__what { display: block; font-size: 0.9rem; color: var(--muted); }

/* Shorter hero banner */
.hero { max-width: var(--w); margin: 0 auto 26px; }
.hero img { aspect-ratio: 4 / 1; object-position: center 45%; }
@media (max-width: 699px) { .hero img { aspect-ratio: 5 / 2; } }

/* Key facts and contents side by side */
.overview { max-width: var(--w); margin: 0 auto 26px; display: grid; gap: 18px; }
.overview .summary, .overview .toc { margin: 0; }
@media (min-width: 900px) { .overview--two { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } .overview--two .toc ol { columns: 1; } }

/* Toplists: centred, full width, compact rows */
.toplist { max-width: var(--w); margin: 0 auto 30px; padding: 18px 18px 12px; }
.toplist h2 { text-align: center; margin-bottom: 14px; }
.toplist ol { gap: 8px; }
.toplist__item { grid-template-columns: 30px 52px minmax(0, 1fr); padding: 10px 12px; }
.toplist__main { min-width: 0; }
.toplist__desc { grid-column: 1 / -1; margin: 0; font-size: 0.86rem; color: var(--muted); }
.toplist__terms { white-space: nowrap; }
@media (min-width: 760px) {
  .toplist__item { grid-template-columns: 34px 56px minmax(170px, 0.9fr) minmax(0, 1.6fr) auto; gap: 8px 18px; }
  .toplist__desc { grid-column: auto; }
}
.fineprint { text-align: center; }

/* Cards, FAQ, end matter, author box: use the width */
.content > .cards { max-width: var(--w); margin-left: auto; margin-right: auto; }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.faq { max-width: var(--w); margin: 0 auto; }
.faq details { max-width: none; }
@media (min-width: 980px) {
  .faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; align-items: start; }
  .faq > h2 { grid-column: 1 / -1; }
}
.rg-note { margin-left: auto; margin-right: auto; }
.endmatter { max-width: var(--w); margin: 28px auto 0; display: grid; gap: 10px 36px; }
.endmatter .sources h2, .endmatter .related h2 { margin-top: 0.6em; }
.endmatter .related { margin-top: 0; }
@media (min-width: 980px) { .endmatter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .endmatter .related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.author-box { max-width: var(--w); margin: 30px auto 0; }
.author-box > h2 { text-align: center; }
@media (min-width: 900px) {
  .author-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .author-box > h2, .author-box__policy { grid-column: 1 / -1; text-align: center; }
  .author-box__person { border-top: 0; padding-top: 0; }
}

/* Sweep sheet keeps full width */
.content > .sweep { max-width: var(--w-text); margin-left: auto; margin-right: auto; }

/* One constant column for every block: header, page head, prose, tables, toplists */
:root { --w: 1040px; --w-text: 1040px; }
@media (min-width: 980px) { body { font-size: 1.1rem; line-height: 1.7; } h1 { max-width: none; } }
.faq summary { font-size: 1.05rem; }
.nav-desktop a { white-space: nowrap; padding: 8px 9px; font-size: 0.93rem; }
@media (max-width: 1239px) { .brand__sub { display: none; } }

/* Tighter vertical rhythm to cut scrolling */
@media (min-width: 980px) { body { font-size: 1.075rem; line-height: 1.65; } }
h2 { margin: 1.7em 0 0.5em; }
h3 { margin: 1.3em 0 0.4em; }
th, td { padding: 7px 12px; }
table { font-size: 0.93rem; }
.table-wrap { margin: 0.9em auto 1.2em; }
.toplist__item { padding: 8px 12px; }
.toplist__logo { width: 46px; height: 46px; }
@media (min-width: 760px) { .toplist__item { grid-template-columns: 30px 48px minmax(170px, 0.9fr) minmax(0, 1.6fr) auto; } }
.cta { min-height: 42px; padding: 8px 18px; }
@media (min-width: 980px) { .hero img { aspect-ratio: 5 / 1; } }
.summary { padding: 14px 18px 4px; }
.faq summary { padding: 10px 28px 10px 0; }
.content li { margin-bottom: 0.25em; }
@media (max-width: 759px) {
  .toplist__desc { display: none; }
  .toplist__item { grid-template-columns: 26px 44px minmax(0, 1fr); gap: 6px 10px; }
  .toplist__logo { width: 44px; height: 44px; }
  .hero img { aspect-ratio: 3 / 1; }
  .keydates li { padding: 8px 10px; }
}
@media (min-width: 980px) { .footer-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Banners are drawn in banner proportions: show them whole, never cropped */
.hero img, .hero img[src] { aspect-ratio: auto !important; height: auto; object-fit: contain; }
