/* ============================================================
   British Gambler — UK Horse Racing plugin styles
   Design tokens lifted from britishgambler.co.uk:
   - Headings: Lora serif
   - Body:     Inter sans
   - Primary:  #1a3eb5 (indigo)
   - Accent:   #f4a300 (gold) — used sparingly for live/festival tags
   - Surface:  #ffffff
   - Border:   #e6e6ec
   - Body bg:  #f7f7fa
   ============================================================ */

:root {
    --bgr-indigo:       #1a3eb5;
    --bgr-indigo-dark:  #142e8a;
    --bgr-indigo-tint:  #eef1fa;
    --bgr-gold:         #f4a300;
    --bgr-gold-tint:    #fff6e1;
    --bgr-text:         #1a1a2e;
    --bgr-text-mute:    #5a5a72;
    --bgr-text-faint:   #8e8ea3;
    --bgr-border:       #e6e6ec;
    --bgr-border-soft:  #f0f0f4;
    --bgr-surface:      #ffffff;
    --bgr-surface-alt:  #fafafd;
    --bgr-bg:           #f7f7fa;
    --bgr-success:      #1f9d55;
    --bgr-danger:       #d93030;
    --bgr-shadow-sm:    0 1px 3px rgba(20,30,80,0.04);
    --bgr-shadow-md:    0 4px 16px rgba(20,30,80,0.06);
    --bgr-radius:       6px;
    --bgr-radius-lg:    10px;
}

/* Fonts are loaded by the British Gambler theme — we inherit them.
   If you ever run this plugin on a theme that doesn't preload Lora + Inter,
   uncomment the import below.
   @import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600;700&display=swap');
*/

/* ============================================================
   Suppress theme/SEO-plugin breadcrumbs on our pages.
   Scoped via .bgr-active body class so other site pages are untouched.
   We exclude .bgr-breadcrumb so our own breadcrumb is never hidden.
   ============================================================ */
.bgr-active .crumbs:not(.bgr-breadcrumb),
.bgr-active .breadcrumb:not(.bgr-breadcrumb),
.bgr-active .breadcrumbs:not(.bgr-breadcrumb),
.bgr-active .yoast-breadcrumbs:not(.bgr-breadcrumb),
.bgr-active .rank-math-breadcrumb:not(.bgr-breadcrumb),
.bgr-active .entry-breadcrumb:not(.bgr-breadcrumb),
.bgr-active .page-breadcrumb:not(.bgr-breadcrumb),
.bgr-active .site-breadcrumb:not(.bgr-breadcrumb),
.bgr-active .post-breadcrumb:not(.bgr-breadcrumb),
.bgr-active [class*="breadcrumb" i]:not(.bgr-breadcrumb),
.bgr-active nav[aria-label*="breadcrumb" i]:not(.bgr-breadcrumb),
.bgr-active [itemtype*="BreadcrumbList"]:not(.bgr-breadcrumb) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================================
   Layout container
   ============================================================ */
.bgr-main {
    background: var(--bgr-bg);
    padding: 24px 0 56px;
    min-height: 60vh;
}
.bgr-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    color: var(--bgr-text);
    /* Inherit theme body font (Inter on britishgambler.co.uk). Fallback chain
       below applies if the theme uses something else. */
    font-family: inherit;
    font-size: 15px;
    line-height: 1.55;
}

/* ============================================================
   Page head: breadcrumb + H1 + sub
   ============================================================ */
.bgr-page-head {
    margin-bottom: 24px;
}
.bgr-breadcrumb {
    font-size: 13px;
    color: var(--bgr-text-mute);
    margin-bottom: 14px;
}
.bgr-breadcrumb a {
    color: var(--bgr-indigo);
    text-decoration: none;
}
.bgr-breadcrumb a:hover { text-decoration: underline; }
.bgr-breadcrumb span { margin: 0 6px; color: var(--bgr-text-faint); }

.bgr-page-head h1 {
    /* Inherit font-family, font-size, font-weight, line-height from the
       theme's H1 cascade — so this matches the H1 on /bingo/, /casino/,
       /betting/ etc. exactly. We only control the margin for spacing
       with the breadcrumb and sub-headline. */
    margin: 0 0 10px;
    color: inherit;
}
.bgr-page-sub {
    color: var(--bgr-text-mute);
    font-size: 16px;
    margin: 0;
}

/* Festival stripe above H1 on relevant pages */
.bgr-festival-stripe,
.bgr-course-code-stripe,
.bgr-festival-code-stripe {
    display: inline-block;
    background: var(--bgr-gold-tint);
    color: var(--bgr-text);
    border-left: 4px solid var(--bgr-gold);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--bgr-radius);
    margin-bottom: 14px;
}
.bgr-festival-stripe a {
    color: var(--bgr-indigo);
    margin-left: 10px;
}
.bgr-live-tag {
    background: var(--bgr-danger);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}
.bgr-upcoming-tag {
    background: var(--bgr-indigo);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}

/* ============================================================
   Section nav (sub-page pills)
   ============================================================ */
.bgr-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}
.bgr-nav-pill {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bgr-surface);
    border: 1px solid var(--bgr-border);
    border-radius: 999px;
    color: var(--bgr-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 120ms, border-color 120ms;
}
.bgr-nav-pill:hover {
    background: var(--bgr-indigo-tint);
    border-color: var(--bgr-indigo);
}
.bgr-nav-pill-active {
    background: var(--bgr-indigo);
    border-color: var(--bgr-indigo);
    color: #fff;
}
.bgr-nav-pill-active:hover { background: var(--bgr-indigo-dark); color: #fff; }
.bgr-nav-pill-accent {
    background: var(--bgr-gold-tint);
    border-color: var(--bgr-gold);
}

/* ============================================================
   Card primitive
   ============================================================ */
.bgr-card {
    background: var(--bgr-surface);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--bgr-shadow-sm);
}
.bgr-card h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--bgr-text);
}
.bgr-card h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 8px;
    color: var(--bgr-text);
}
.bgr-card-intro {
    color: var(--bgr-text-mute);
    margin: 0 0 18px;
}

/* ============================================================
   Meet grid (hub + course pages)
   ============================================================ */
.bgr-meets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.bgr-meet-card {
    display: block;
    background: var(--bgr-surface);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius);
    padding: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 120ms, box-shadow 120ms, border-color 120ms;
}
.bgr-meet-card:hover {
    border-color: var(--bgr-indigo);
    box-shadow: var(--bgr-shadow-md);
    transform: translateY(-1px);
}
.bgr-meet-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.bgr-meet-card-course {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 18px;
    color: var(--bgr-text);
}
.bgr-meet-card-region {
    font-size: 12px;
    color: var(--bgr-text-faint);
}
.bgr-meet-card-body {
    font-size: 13px;
    color: var(--bgr-text-mute);
}
.bgr-meet-card-body > div { margin-bottom: 3px; }
.bgr-meet-card-cta {
    margin-top: 10px;
    font-size: 13px;
    color: var(--bgr-indigo);
    font-weight: 500;
}

/* ============================================================
   Festival grid (hub)
   ============================================================ */
.bgr-festivals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.bgr-festival-card {
    display: block;
    background: linear-gradient(135deg, var(--bgr-indigo) 0%, var(--bgr-indigo-dark) 100%);
    color: #fff;
    padding: 18px;
    border-radius: var(--bgr-radius-lg);
    text-decoration: none;
    transition: transform 120ms, box-shadow 120ms;
}
.bgr-festival-card:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--bgr-shadow-md);
}
.bgr-festival-card-code {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
}
.bgr-festival-card-name {
    font-family: 'Lora', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}
.bgr-festival-card-dates {
    font-size: 14px;
    opacity: 0.92;
    margin-bottom: 4px;
}
.bgr-festival-card-course {
    font-size: 13px;
    opacity: 0.75;
    margin-bottom: 12px;
}
.bgr-festival-card-cta {
    font-size: 13px;
    font-weight: 600;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 10px;
    margin-top: 6px;
}

/* ============================================================
   Course grid (hub) + course pills
   ============================================================ */
.bgr-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.bgr-course-card {
    display: block;
    background: var(--bgr-surface);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color 120ms, box-shadow 120ms;
}
.bgr-course-card:hover {
    border-color: var(--bgr-indigo);
    box-shadow: var(--bgr-shadow-md);
}
.bgr-course-card-name {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 4px;
}
.bgr-course-card-location {
    font-size: 13px;
    color: var(--bgr-text-mute);
    margin-bottom: 4px;
}
.bgr-course-card-type {
    display: inline-block;
    background: var(--bgr-indigo-tint);
    color: var(--bgr-indigo);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
}
.bgr-course-card-headline {
    font-size: 13px;
    color: var(--bgr-text);
}
.bgr-course-pill {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bgr-surface-alt);
    border: 1px solid var(--bgr-border);
    border-radius: 999px;
    color: var(--bgr-indigo);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin: 4px 4px 4px 0;
}
.bgr-course-pill:hover {
    background: var(--bgr-indigo-tint);
    border-color: var(--bgr-indigo);
}
.bgr-courses-other {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ============================================================
   Meeting block (today / tomorrow)
   ============================================================ */
.bgr-meeting-block { padding: 20px 24px; }
.bgr-meeting-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bgr-border-soft);
    margin-bottom: 14px;
}
.bgr-meeting-head-left h2 {
    margin: 0 0 4px;
    font-size: 22px;
    display: inline;
}
.bgr-meeting-fest-tag {
    display: inline-block;
    margin-left: 10px;
    background: var(--bgr-gold-tint);
    color: var(--bgr-text);
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}
.bgr-meeting-meta {
    color: var(--bgr-text-mute);
    font-size: 13px;
    margin-top: 4px;
}
.bgr-meeting-meta span { margin-right: 6px; }
.bgr-meeting-head-cta {
    background: var(--bgr-indigo);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--bgr-radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 120ms;
}
.bgr-meeting-head-cta:hover { background: var(--bgr-indigo-dark); color: #fff; }
.bgr-meeting-foot {
    margin-top: 10px;
    font-size: 13px;
}

/* Races strip — for today/tomorrow + festival days */
.bgr-races-strip {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}
.bgr-races-strip li a {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: var(--bgr-surface-alt);
    border: 1px solid var(--bgr-border-soft);
    border-radius: var(--bgr-radius);
    color: inherit;
    text-decoration: none;
    transition: background 120ms, border-color 120ms;
}
.bgr-races-strip li a:hover {
    background: var(--bgr-indigo-tint);
    border-color: var(--bgr-indigo);
}
.bgr-race-strip-off {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    color: var(--bgr-indigo);
    font-size: 16px;
}
.bgr-race-strip-name {
    font-weight: 500;
    font-size: 14px;
}
.bgr-race-strip-meta {
    font-size: 12px;
    color: var(--bgr-text-mute);
    white-space: nowrap;
}

/* ============================================================
   Meeting page: races table
   ============================================================ */
.bgr-meeting-intro {
    background: var(--bgr-indigo-tint);
    border-left: 4px solid var(--bgr-indigo);
    padding: 16px 20px;
    border-radius: var(--bgr-radius);
    margin-bottom: 24px;
}
.bgr-meeting-intro p { margin: 0; color: var(--bgr-text); }

.bgr-races-table { display: grid; gap: 8px; }
.bgr-race-row {
    display: grid;
    grid-template-columns: 50px 70px 1fr 200px auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    background: var(--bgr-surface);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius);
    color: inherit;
    text-decoration: none;
    transition: border-color 120ms, background 120ms;
}
.bgr-race-row:hover {
    border-color: var(--bgr-indigo);
    background: var(--bgr-indigo-tint);
}
.bgr-race-row-rno {
    background: var(--bgr-indigo);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 6px 0;
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
}
.bgr-race-row-off {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    color: var(--bgr-indigo);
    font-size: 18px;
}
.bgr-race-row-name strong { font-size: 15px; }
.bgr-race-row-headline {
    display: inline-block;
    background: var(--bgr-gold-tint);
    color: var(--bgr-text);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}
.bgr-race-row-meta {
    font-size: 12px;
    color: var(--bgr-text-mute);
    margin-top: 4px;
}
.bgr-race-row-fav {
    background: var(--bgr-surface-alt);
    border: 1px solid var(--bgr-border-soft);
    border-radius: 4px;
    padding: 6px 10px;
    text-align: center;
}
.bgr-race-row-fav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bgr-text-faint);
}
.bgr-race-row-fav-horse { font-size: 13px; font-weight: 600; }
.bgr-race-row-fav-price { font-size: 14px; color: var(--bgr-indigo); font-weight: 600; }
.bgr-race-row-cta {
    color: var(--bgr-indigo);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* ============================================================
   Stats row — used on course + festival + meeting pages
   ============================================================ */
.bgr-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.bgr-stat {
    background: var(--bgr-indigo-tint);
    border-radius: var(--bgr-radius);
    padding: 16px;
    text-align: center;
}
.bgr-stat-value {
    font-family: 'Lora', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--bgr-indigo);
}
.bgr-stat-label {
    font-size: 12px;
    color: var(--bgr-text-mute);
    margin-top: 2px;
}

/* ============================================================
   Race page: tipster cards
   ============================================================ */
.bgr-tipster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.bgr-pick-card {
    background: var(--bgr-surface);
    border: 2px solid var(--bgr-border);
    border-radius: var(--bgr-radius-lg);
    padding: 18px;
    position: relative;
}
.bgr-pick-nap { border-color: var(--bgr-indigo); background: var(--bgr-indigo-tint); }
.bgr-pick-ew  { border-color: #6b7fe3; }
.bgr-pick-dh  { border-color: var(--bgr-gold); background: var(--bgr-gold-tint); }
.bgr-pick-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--bgr-indigo);
}
.bgr-pick-dh .bgr-pick-label { color: #a17000; }
.bgr-pick-stars {
    color: var(--bgr-gold);
    font-size: 14px;
    margin-top: 2px;
}
.bgr-pick-horse {
    font-family: 'Lora', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    margin: 8px 0 4px;
}
.bgr-pick-price {
    font-family: 'Lora', Georgia, serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--bgr-indigo);
}
.bgr-pick-meta {
    font-size: 12px;
    color: var(--bgr-text-mute);
    margin-top: 4px;
}
.bgr-pick-signals {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.bgr-pick-sig {
    background: rgba(255,255,255,0.7);
    color: var(--bgr-text);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    border: 1px solid var(--bgr-border-soft);
}
.bgr-tipster-foot {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--bgr-text-mute);
    border-top: 1px solid var(--bgr-border-soft);
    padding-top: 12px;
}

/* ============================================================
   Race page: field table
   ============================================================ */
.bgr-field-table-wrap { overflow-x: auto; }
.bgr-field-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 760px;
}
.bgr-field-table th {
    text-align: left;
    padding: 10px 8px;
    background: var(--bgr-surface-alt);
    border-bottom: 2px solid var(--bgr-border);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bgr-text-mute);
}
.bgr-field-table td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--bgr-border-soft);
    vertical-align: top;
}
.bgr-field-table .bgr-num { text-align: right; font-variant-numeric: tabular-nums; }
.bgr-col-no { font-weight: 600; color: var(--bgr-indigo); }
.bgr-draw { font-size: 11px; color: var(--bgr-text-faint); font-weight: 400; }
.bgr-col-horse strong { font-size: 14px; }
.bgr-col-best { font-size: 16px; font-weight: 600; color: var(--bgr-indigo); }
.bgr-pick-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.bgr-tag-nap { background: var(--bgr-indigo); color: #fff; }
.bgr-tag-ew  { background: #6b7fe3; color: #fff; }
.bgr-tag-dh  { background: var(--bgr-gold); color: #fff; }
.bgr-nr-tag {
    background: var(--bgr-danger);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 6px;
}
.bgr-hg-tag {
    background: var(--bgr-surface-alt);
    border: 1px solid var(--bgr-border);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 6px;
    color: var(--bgr-text-mute);
}
.bgr-non-runner { opacity: 0.45; text-decoration: line-through; }
.bgr-row-picked { background: var(--bgr-indigo-tint); }
.bgr-row-pick-dh { background: var(--bgr-gold-tint); }
.bgr-bookie-pills {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.bgr-bookie-pills li {
    padding: 0;
    background: transparent;
}
.bgr-bookie-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: var(--bgr-surface-alt);
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: background 120ms, border-color 120ms;
}
.bgr-bookie-link:hover {
    background: var(--bgr-indigo-tint);
    border-color: var(--bgr-indigo);
}
.bgr-bookie-name { color: var(--bgr-text-mute); }
.bgr-bookie-price { font-weight: 600; color: var(--bgr-indigo); }
.bgr-bookie-link:hover .bgr-bookie-price { color: var(--bgr-indigo-dark); }
.bgr-no-odds { color: var(--bgr-text-faint); font-size: 11px; }
.bgr-spotlight-row td { background: var(--bgr-indigo-tint); border-bottom: 2px solid var(--bgr-border); }
.bgr-spotlight { font-size: 13px; color: var(--bgr-text); padding: 12px; }

/* ============================================================
   Festival page
   ============================================================ */
.bgr-festival-intro {
    background: var(--bgr-indigo);
    color: #fff;
    padding: 24px;
    border-radius: var(--bgr-radius-lg);
    margin-bottom: 24px;
}
.bgr-festival-intro p {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
}
.bgr-festival-intro strong { color: #fff; }
.bgr-headlines-table { display: grid; gap: 10px; }
.bgr-headline-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bgr-surface-alt);
    border-left: 4px solid var(--bgr-indigo);
    border-radius: var(--bgr-radius);
    color: inherit;
    text-decoration: none;
}
.bgr-headline-row-link {
    transition: background 120ms, border-left-color 120ms, transform 120ms;
}
.bgr-headline-row-link:hover {
    background: var(--bgr-indigo-tint);
    border-left-color: var(--bgr-gold);
    transform: translateX(2px);
    color: inherit;
}
.bgr-headline-cta {
    display: inline-block;
    margin-top: 8px;
    color: var(--bgr-indigo);
    font-size: 13px;
    font-weight: 600;
}
.bgr-headline-row-link:hover .bgr-headline-cta {
    color: var(--bgr-indigo-dark);
}
.bgr-headline-day {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    color: var(--bgr-indigo);
}
.bgr-headline-name {
    margin-bottom: 4px;
}
.bgr-headline-name strong { font-size: 16px; }
.bgr-headline-grade {
    color: var(--bgr-text-mute);
    font-size: 12px;
    margin-left: 8px;
}
.bgr-headline-summary {
    color: var(--bgr-text);
    font-size: 13px;
}
.bgr-festival-day h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    margin: 18px 0 10px;
    color: var(--bgr-indigo);
}
.bgr-why-list {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: none;
}
.bgr-why-list li {
    padding: 6px 0 6px 26px;
    position: relative;
    border-bottom: 1px solid var(--bgr-border-soft);
}
.bgr-why-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 6px;
    color: var(--bgr-success);
    font-weight: 700;
}
.bgr-why-list li:last-child { border-bottom: 0; }

/* ============================================================
   Course page extras
   ============================================================ */
.bgr-course-intro-text {
    font-size: 16px;
    line-height: 1.65;
    margin: 0 0 12px;
}
.bgr-festival-callout {
    background: linear-gradient(135deg, var(--bgr-indigo) 0%, var(--bgr-indigo-dark) 100%);
    color: #fff;
}
.bgr-festival-callout h2 {
    color: #fff;
    font-family: 'Lora', Georgia, serif;
}
.bgr-festival-callout p { color: rgba(255,255,255,0.92); }
.bgr-festival-callout-code {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
}
.bgr-festival-callout-dates {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}
.bgr-festival-callout-cta {
    display: inline-block;
    background: #fff;
    color: var(--bgr-indigo);
    padding: 10px 18px;
    border-radius: var(--bgr-radius);
    text-decoration: none;
    font-weight: 600;
    margin-top: 8px;
}
.bgr-festival-callout-cta:hover { background: var(--bgr-gold); color: var(--bgr-text); }

.bgr-course-callout {
    background: var(--bgr-surface-alt);
}

/* ============================================================
   Hub: explainer block
   ============================================================ */
.bgr-explainer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.bgr-explainer-grid h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--bgr-indigo);
}
.bgr-explainer-grid p {
    margin: 0;
    font-size: 14px;
    color: var(--bgr-text-mute);
}

/* ============================================================
   Affiliate displays — top picks + festival offers + grid
   ============================================================ */
.bgr-top-picks {
    background: var(--bgr-surface);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--bgr-shadow-sm);
}
.bgr-top-picks-head h2 {
    font-family: 'Lora', Georgia, serif;
    margin: 0 0 4px;
    font-size: 22px;
}
.bgr-top-picks-tag {
    color: var(--bgr-text-mute);
    font-size: 12px;
    margin: 0 0 16px;
}
.bgr-top-picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.bgr-top-pick {
    /* Same theme-proof grid pattern as festival-offer-card.
       Desktop: stacked column, centered. Mobile rules below
       re-template to 2-col with logo on left. */
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
        "logo"
        "badge"
        "name"
        "offer"
        "code"
        "cta"
        "review"
        "terms" !important;
    justify-items: center;
    /* Cards are stretched to equal height by the outer grid. Without this
       the spare height is shared out across the auto rows, so a card with
       no promo code row grows its remaining rows — which is why the SBK
       button rendered taller than the rest. Pack the rows to the top and
       let the terms block take up the slack instead. */
    align-content: start;
    background: var(--bgr-surface-alt);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius-lg);
    padding: 16px;
    text-align: center;
    position: relative;
    row-gap: 4px;
}
.bgr-top-pick-logo { grid-area: logo !important; }
.bgr-top-pick-logo img {
    max-width: 100%;
    height: 56px;
    object-fit: contain;
}
.bgr-top-pick-badge {
    grid-area: badge !important;
    background: var(--bgr-gold-tint);
    color: var(--bgr-text);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
    margin: 4px 0 0;
}
.bgr-top-pick-name {
    grid-area: name !important;
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 16px;
    margin: 4px 0 0;
}
.bgr-top-pick-offer {
    grid-area: offer !important;
    color: var(--bgr-text);
    font-weight: 700;
    font-size: 14px;
    margin: 2px 0 0;
}
.bgr-top-pick-code {
    grid-area: code !important;
    font-size: 12px;
    color: var(--bgr-text-mute);
    margin: 4px 0 0;
}
.bgr-top-pick-code code {
    background: #fff;
    padding: 1px 6px;
    border: 1px dashed var(--bgr-indigo);
    border-radius: 3px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    color: var(--bgr-indigo);
}
.bgr-top-pick-cta {
    grid-area: cta !important;
    /* Fixed box so every button matches across the row, whether or not the
       card carries a promo code. align-self stops it stretching to fill
       its track; the width pair keeps it identical card to card. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 190px;
    min-height: 42px;
    background: var(--bgr-indigo);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--bgr-radius);
    text-decoration: none;
    font-weight: 600;
    margin-top: 6px;
    transition: background 120ms;
}
.bgr-top-pick-cta:hover { background: var(--bgr-indigo-dark); color: #fff; }
.bgr-top-pick-terms {
    grid-area: terms !important;
    text-align: left;
    font-size: 11px;
    color: var(--bgr-text-mute);
    line-height: 1.45;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
    border-left: 2px solid var(--bgr-border);
    margin-top: 4px;
    box-sizing: border-box;
    width: 100%;
}
.bgr-top-pick-terms .bgr-terms-label {
    display: inline;
    color: var(--bgr-text);
    font-weight: 600;
    margin-right: 4px;
}
.bgr-top-picks-foot {
    text-align: center;
    margin: 18px 0 0;
}
.bgr-link-arrow {
    color: var(--bgr-indigo);
    font-weight: 500;
    text-decoration: none;
}
.bgr-link-arrow:hover { text-decoration: underline; }

/* Festival offers panel (race + meeting + festival pages) */
.bgr-festival-offers {
    background: var(--bgr-surface);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--bgr-shadow-sm);
}
.bgr-festival-offers-head h2 {
    font-family: 'Lora', Georgia, serif;
    margin: 0 0 6px;
    font-size: 22px;
}
.bgr-festival-offers-head p {
    color: var(--bgr-text-mute);
    margin: 0 0 18px;
}
.bgr-festival-offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.bgr-festival-offer-card {
    /* Theme-proof grid with !important so the British Gambler theme's
       .entry-content > div rules can't push elements into wrong cells.
       Desktop: stacked single column, centered. Mobile rules below
       re-template to 2-col with full-width CTA + T&Cs. */
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
        "logo"
        "name"
        "headline"
        "code"
        "cta"
        "review"
        "terms" !important;
    justify-items: center;
    align-items: center;
    text-align: center;
    background: var(--bgr-surface-alt);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius-lg);
    padding: 16px;
    row-gap: 6px;
}
.bgr-festival-offer-logo { grid-area: logo !important; }
.bgr-festival-offer-logo img {
    max-width: 100%;
    height: 52px;
    object-fit: contain;
}
.bgr-festival-offer-name {
    grid-area: name !important;
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 15px;
    margin: 4px 0 0;
}
.bgr-festival-offer-headline {
    grid-area: headline !important;
    font-weight: 700;
    color: var(--bgr-text);
    font-size: 14px;
    line-height: 1.3;
}
.bgr-festival-offer-code {
    grid-area: code !important;
    font-size: 12px;
    color: var(--bgr-text-mute);
}
.bgr-festival-offer-code code {
    background: #fff;
    padding: 1px 6px;
    border: 1px dashed var(--bgr-indigo);
    border-radius: 3px;
    color: var(--bgr-indigo);
    font-family: 'SFMono-Regular', Consolas, monospace;
}
.bgr-festival-offer-cta {
    grid-area: cta !important;
    display: inline-block;
    background: var(--bgr-indigo);
    color: #fff;
    padding: 8px 18px;
    border-radius: var(--bgr-radius);
    text-decoration: none;
    font-weight: 600;
    margin-top: 4px;
}
.bgr-festival-offer-cta:hover { background: var(--bgr-indigo-dark); color: #fff; }
.bgr-festival-offer-terms {
    grid-area: terms !important;
    font-size: 11px;
    color: var(--bgr-text-mute);
    width: 100%;
    text-align: left;
    line-height: 1.45;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
    border-left: 2px solid var(--bgr-border);
    margin-top: 6px;
    box-sizing: border-box;
}
.bgr-festival-offer-terms .bgr-terms-label {
    display: inline;
    color: var(--bgr-text);
    font-weight: 600;
    margin-right: 4px;
}
.bgr-festival-offers-foot {
    text-align: center;
    margin: 18px 0 0;
}

/* Full offers grid (bookmakers page) */
.bgr-offers-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 18px;
}
.bgr-offer-card {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 18px;
    background: var(--bgr-surface);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius-lg);
    padding: 20px;
    box-shadow: var(--bgr-shadow-sm);
}
.bgr-offer-rank {
    background: var(--bgr-indigo);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Lora', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
}
.bgr-offer-head {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    margin-bottom: 14px;
}
.bgr-offer-logo img {
    max-width: 100%;
    height: 64px;
    object-fit: contain;
}
.bgr-offer-name {
    font-family: 'Lora', Georgia, serif;
    font-size: 20px;
    margin: 0 0 4px;
}
.bgr-offer-name a {
    color: var(--bgr-text);
    text-decoration: none;
}
.bgr-offer-name a:hover { color: var(--bgr-indigo); }
.bgr-offer-badge {
    display: inline-block;
    background: var(--bgr-gold-tint);
    color: var(--bgr-text);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}
.bgr-offer-best-for {
    font-size: 13px;
    color: var(--bgr-text-mute);
    margin-bottom: 4px;
}
.bgr-offer-rating {
    font-size: 14px;
}
.bgr-star-on { color: var(--bgr-gold); }
.bgr-star-off { color: var(--bgr-border); }
.bgr-rating-val {
    font-size: 12px;
    color: var(--bgr-text-mute);
    margin-left: 6px;
}
.bgr-offer-editorial {
    font-size: 14px;
    margin: 0 0 14px;
    line-height: 1.6;
}
.bgr-offer-review-link {
    color: var(--bgr-indigo);
    font-weight: 500;
    text-decoration: none;
}
.bgr-offer-features {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.bgr-offer-features li {
    background: var(--bgr-indigo-tint);
    color: var(--bgr-indigo);
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}
.bgr-offer-cta-block {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    background: var(--bgr-indigo-tint);
    padding: 14px 16px;
    border-radius: var(--bgr-radius);
    margin-bottom: 14px;
}
.bgr-offer-headline {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--bgr-indigo);
}
.bgr-offer-code-wrap {
    margin-left: 12px;
    font-size: 13px;
    color: var(--bgr-text-mute);
}
.bgr-offer-code {
    background: #fff;
    padding: 2px 8px;
    border: 1px dashed var(--bgr-indigo);
    border-radius: 3px;
    color: var(--bgr-indigo);
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-weight: 700;
}
.bgr-offer-cta-btn {
    background: var(--bgr-indigo);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--bgr-radius);
    text-decoration: none;
    font-weight: 600;
    transition: background 120ms;
}
.bgr-offer-cta-btn:hover { background: var(--bgr-indigo-dark); color: #fff; }
.bgr-offer-terms {
    background: var(--bgr-surface-alt);
    border: 1px solid var(--bgr-border-soft);
    border-radius: var(--bgr-radius);
    padding: 10px 14px;
    font-size: 11px;
    color: var(--bgr-text-mute);
    line-height: 1.5;
}
.bgr-offer-terms strong {
    display: block;
    color: var(--bgr-text);
    margin-bottom: 4px;
    font-size: 12px;
}
.bgr-offer-terms p { margin: 0; }

/* Hero offer (single-card) — used on festival pages */
.bgr-hero-offer-wrap {
    margin-bottom: 24px;
}
.bgr-offer-hero {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 16px;
    align-items: center;
    background: linear-gradient(135deg, var(--bgr-indigo) 0%, var(--bgr-indigo-dark) 100%);
    color: #fff;
    padding: 20px;
    border-radius: var(--bgr-radius-lg);
    box-shadow: var(--bgr-shadow-md);
}
.bgr-offer-hero-logo {
    background: #fff;
    padding: 8px;
    border-radius: var(--bgr-radius);
}
.bgr-offer-hero-logo img {
    max-width: 100%;
    height: 56px;
    object-fit: contain;
}
.bgr-offer-hero-badge {
    background: var(--bgr-gold);
    color: var(--bgr-text);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 6px;
}
.bgr-offer-hero-name {
    font-family: 'Lora', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
}
.bgr-offer-hero-offer {
    font-size: 18px;
    margin: 4px 0;
}
.bgr-offer-hero-code {
    font-size: 13px;
    opacity: 0.92;
}
.bgr-offer-hero-code code {
    background: rgba(255,255,255,0.18);
    padding: 2px 8px;
    border-radius: 3px;
    color: #fff;
}
.bgr-offer-hero-cta {
    background: var(--bgr-gold);
    color: var(--bgr-text);
    padding: 14px 24px;
    border-radius: var(--bgr-radius);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}
.bgr-offer-hero-cta:hover { background: #fff; color: var(--bgr-indigo); }
.bgr-offer-hero-terms {
    grid-column: 1 / -1;
    font-size: 11px;
    opacity: 0.85;
    line-height: 1.45;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: 4px;
}
.bgr-offer-hero-terms .bgr-terms-label {
    display: inline;
    font-weight: 700;
    margin-right: 4px;
    opacity: 1;
}

/* ============================================================
   Responsible-gambling block
   ============================================================ */
.bgr-rg-block {
    background: var(--bgr-surface-alt);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius);
    padding: 14px 18px;
    margin: 24px 0;
    font-size: 12px;
    color: var(--bgr-text-mute);
    line-height: 1.55;
}
.bgr-rg-block strong { color: var(--bgr-text); }
.bgr-rg-block a { color: var(--bgr-indigo); }
.bgr-rg-tagline {
    margin: 6px 0 0;
    font-weight: 600;
    color: var(--bgr-text-mute);
    font-style: italic;
}

/* ============================================================
   Bookmakers page intro
   ============================================================ */
.bgr-bookmakers-intro p {
    font-size: 15px;
}
.bgr-bookmakers-intro ul {
    margin: 0;
    padding-left: 20px;
}
.bgr-bookmakers-intro ul li {
    margin-bottom: 6px;
}

/* ============================================================
   Mobile (≤768px) — major redesign of field table to stacked
   cards so no horizontal swipe is needed. Also tightens top
   spacing so breadcrumb + H1 sit closer to the nav.
   ============================================================ */
@media (max-width: 768px) {

    /* Tighter overall layout */
    .bgr-main { padding: 8px 0 40px; }
    .bgr-page { padding: 0 12px; }

    /* Breadcrumb + H1 moved up */
    .bgr-page-head { margin-bottom: 14px; }
    .bgr-breadcrumb { margin-bottom: 6px; font-size: 12px; }
    .bgr-breadcrumb span { margin: 0 4px; }
    .bgr-page-head h1 { margin: 0 0 6px; }
    .bgr-page-sub { font-size: 13px; line-height: 1.45; }
    .bgr-festival-stripe,
    .bgr-course-code-stripe,
    .bgr-festival-code-stripe {
        font-size: 12px;
        padding: 6px 10px;
        margin-bottom: 8px;
    }

    /* Cards padded down */
    .bgr-card { padding: 14px; margin-bottom: 14px; }
    .bgr-card h2 { font-size: 18px; }
    .bgr-card h3 { font-size: 16px; }
    .bgr-card-intro { font-size: 13px; margin-bottom: 12px; }

    /* Section nav pills more compact */
    .bgr-nav-pill { padding: 6px 12px; font-size: 12px; }

    /* === Field & odds table → card layout === */
    .bgr-field-table-wrap { overflow: visible; }
    .bgr-field-table,
    .bgr-field-table tbody {
        display: block;
        min-width: 0;
        width: 100%;
    }
    .bgr-field-table thead { display: none; }
    .bgr-field-table tr {
        display: grid;
        grid-template-columns: 40px 1fr auto;
        grid-template-areas:
            "no    horse  best"
            "jt    jt     jt"
            "form  rpr    ts"
            "books books  books";
        gap: 8px 10px;
        padding: 12px;
        background: var(--bgr-surface);
        border: 1px solid var(--bgr-border);
        border-radius: var(--bgr-radius);
        margin-bottom: 10px;
        min-width: 0;
    }
    .bgr-field-table td {
        display: block;
        padding: 0;
        border: 0;
        min-width: 0;
    }

    .bgr-col-no {
        grid-area: no;
        align-self: center;
        font-size: 18px;
        text-align: center;
        background: var(--bgr-indigo-tint);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        line-height: 36px;
    }
    .bgr-col-no .bgr-draw { display: block; font-size: 9px; line-height: 1; margin-top: -2px; }

    .bgr-col-horse {
        grid-area: horse;
        align-self: center;
    }
    .bgr-col-horse strong { display: block; font-size: 15px; line-height: 1.25; }
    .bgr-col-horse .bgr-pick-tag,
    .bgr-col-horse .bgr-nr-tag,
    .bgr-col-horse .bgr-hg-tag {
        margin: 4px 4px 0 0;
        vertical-align: top;
    }

    .bgr-col-best {
        grid-area: best;
        align-self: center;
        text-align: right;
        font-size: 18px !important;
        font-weight: 700;
        white-space: nowrap;
    }

    .bgr-col-jt {
        grid-area: jt;
        font-size: 12px;
        color: var(--bgr-text-mute);
        line-height: 1.4;
    }
    .bgr-col-jt > div { display: inline; }
    .bgr-col-jt > div + div::before {
        content: " · ";
        color: var(--bgr-text-faint);
    }

    /* Stats row — form / rpr / ts inline with prefix labels */
    .bgr-col-stat {
        font-size: 11px;
        color: var(--bgr-text-mute);
        padding: 4px 8px !important;
        background: var(--bgr-surface-alt);
        border-radius: 3px;
        text-align: center;
        font-variant-numeric: tabular-nums;
    }
    .bgr-col-form { grid-area: form; }
    .bgr-col-rpr  { grid-area: rpr; }
    .bgr-col-ts   { grid-area: ts; }
    .bgr-col-form::before { content: "Form "; opacity: 0.6; font-weight: 500; }
    .bgr-col-rpr::before  { content: "RPR ";  opacity: 0.6; font-weight: 500; }
    .bgr-col-ts::before   { content: "TS ";   opacity: 0.6; font-weight: 500; }
    /* Hide empty stat cells so the row doesn't show "RPR" with no number */
    .bgr-col-stat:empty,
    .bgr-col-stat:has(:only-child:empty) { visibility: hidden; }

    /* Bookies pills row — horizontal wrap on mobile */
    .bgr-col-bookies { grid-area: books; }
    .bgr-bookie-pills {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }
    .bgr-bookie-pills li {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0;
        background: transparent;
    }
    .bgr-no-odds { font-size: 11px; }

    /* Spotlight row sits flush under the runner card.
       Specificity .bgr-field-table tr.bgr-spotlight-row (0,2,1) beats
       the parent grid rule .bgr-field-table tr (0,1,1) so display: block
       wins and the spotlight escapes the 40px column trap. */
    .bgr-field-table tr.bgr-spotlight-row {
        display: block;
        margin-top: -6px;
        margin-bottom: 10px;
        background: transparent;
        border: 0;
        padding: 0;
        border-radius: 0;
    }
    .bgr-field-table tr.bgr-spotlight-row td {
        display: block;
        padding: 0;
        border: 0;
        width: 100%;
    }
    .bgr-field-table tr.bgr-spotlight-row td:first-child { display: none; }
    .bgr-field-table tr.bgr-spotlight-row .bgr-spotlight {
        font-size: 12px !important;
        padding: 10px 12px !important;
        line-height: 1.5;
        border-radius: 0 0 var(--bgr-radius) var(--bgr-radius) !important;
        background: var(--bgr-indigo-tint) !important;
        border: 1px solid var(--bgr-border) !important;
        border-top: 0 !important;
        margin: 0;
        white-space: normal;
        word-break: normal;
    }

    /* Bookie pills become clickable affiliate buttons */
    .bgr-bookie-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        background: var(--bgr-surface);
        border: 1px solid var(--bgr-border);
        border-radius: 4px;
        text-decoration: none;
        color: inherit;
        font-size: 11px;
        transition: background 120ms, border-color 120ms;
        min-height: 30px;
    }
    .bgr-bookie-link:hover,
    .bgr-bookie-link:active {
        background: var(--bgr-indigo);
        border-color: var(--bgr-indigo);
        color: #fff;
    }
    .bgr-bookie-link:hover .bgr-bookie-name,
    .bgr-bookie-link:hover .bgr-bookie-price { color: #fff; }

    /* === Meeting page races table simplification === */
    .bgr-race-row {
        grid-template-columns: 44px 60px 1fr;
        gap: 10px;
        padding: 12px;
    }
    .bgr-race-row-fav,
    .bgr-race-row-cta { display: none; }
    .bgr-race-row-rno { padding: 4px 0; font-size: 13px; }
    .bgr-race-row-off { font-size: 16px; }
    .bgr-race-row-name strong { font-size: 14px; }
    .bgr-race-row-meta { font-size: 11px; }

    /* === Tipster picks stack vertically === */
    .bgr-tipster-grid { grid-template-columns: 1fr; }
    .bgr-pick-card { padding: 14px; }
    .bgr-pick-horse { font-size: 18px; }
    .bgr-pick-price { font-size: 22px; }

    /* === Affiliate cards collapse to single column === */
    .bgr-offer-card {
        grid-template-columns: 40px 1fr;
        gap: 12px;
        padding: 14px 12px;
    }
    .bgr-offer-rank { width: 36px; height: 36px; font-size: 16px; }
    .bgr-offer-head { grid-template-columns: 80px 1fr; gap: 12px; }
    .bgr-offer-logo img { height: 48px; }
    .bgr-offer-name { font-size: 16px; }
    .bgr-offer-cta-block { grid-template-columns: 1fr; text-align: center; gap: 8px; }
    .bgr-offer-code-wrap { display: block; margin: 4px 0 0; }
    .bgr-offer-headline { font-size: 15px; }
    .bgr-offer-features { gap: 4px; }
    .bgr-offer-features li { font-size: 11px; padding: 3px 8px; }

    /* === Hero offer card === */
    .bgr-offer-hero { grid-template-columns: 70px 1fr; gap: 10px; padding: 14px; }
    .bgr-offer-hero-logo img { height: 44px; }
    .bgr-offer-hero-name { font-size: 16px; }
    .bgr-offer-hero-offer { font-size: 15px; }
    .bgr-offer-hero-cta { grid-column: 1 / -1; text-align: center; padding: 10px; }

    /* === Top picks — mobile re-template === */
    .bgr-top-picks { padding: 16px 14px; }
    .bgr-top-picks-grid { grid-template-columns: 1fr; gap: 10px; }
    .bgr-top-pick {
        grid-template-columns: 56px 1fr !important;
        grid-template-areas:
            "logo name"
            "logo offer"
            "cta  cta"
            "review review"
            "terms terms" !important;
        justify-items: start !important;
        align-items: start !important;
        text-align: left !important;
        column-gap: 12px;
        row-gap: 4px;
        padding: 12px;
    }
    .bgr-top-pick-logo { align-self: center; }
    .bgr-top-pick-logo img { height: 44px; }
    .bgr-top-pick-badge,
    .bgr-top-pick-code { display: none !important; }
    .bgr-top-pick-name { font-size: 14px; margin: 0; }
    .bgr-top-pick-offer { font-size: 13px; margin: 0; line-height: 1.3; }
    .bgr-top-pick-cta {
        width: 100%;
        margin: 6px 0 0;
        padding: 10px;
        text-align: center;
        box-sizing: border-box;
    }
    .bgr-top-pick-terms { margin-top: 4px; }

    /* === Festival offers — mobile re-template === */
    .bgr-festival-offers { padding: 16px 14px; }
    .bgr-festival-offers-grid { grid-template-columns: 1fr; gap: 10px; }
    .bgr-festival-offer-card {
        grid-template-columns: 56px 1fr !important;
        grid-template-areas:
            "logo  name"
            "logo  headline"
            "logo  code"
            "cta   cta"
            "review review"
            "terms terms" !important;
        justify-items: start !important;
        align-items: start !important;
        text-align: left !important;
        column-gap: 12px;
        row-gap: 4px;
        padding: 12px;
    }
    .bgr-festival-offer-logo { align-self: center; }
    .bgr-festival-offer-logo img { height: 44px; }
    .bgr-festival-offer-name { font-size: 14px; margin: 0; }
    .bgr-festival-offer-headline { font-size: 13px; line-height: 1.3; margin: 0; }
    .bgr-festival-offer-code { margin: 2px 0 0; }
    .bgr-festival-offer-cta {
        width: 100%;
        margin: 6px 0 0;
        padding: 10px;
        text-align: center;
        box-sizing: border-box;
    }
    .bgr-festival-offer-terms { margin-top: 4px; }

    /* === Headline races table — stack header above body === */
    .bgr-headline-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .bgr-headline-day {
        font-size: 12px;
        background: var(--bgr-indigo-tint);
        padding: 2px 8px;
        border-radius: 3px;
        display: inline-block;
        align-self: start;
    }
    .bgr-headline-name strong { font-size: 15px; }
    .bgr-headline-grade { display: block; margin-left: 0; margin-top: 2px; }

    /* === Meeting head + general === */
    .bgr-meeting-head { flex-direction: column; align-items: stretch; gap: 8px; }
    .bgr-meeting-head-cta { text-align: center; }
    .bgr-meeting-block { padding: 16px 14px; }
    .bgr-races-strip li a {
        grid-template-columns: 50px 1fr;
        gap: 8px;
        padding: 10px;
    }
    .bgr-race-strip-meta { display: none; }

    /* === Stats row tighter === */
    .bgr-stats-row { gap: 8px; }
    .bgr-stat { padding: 10px 8px; }
    .bgr-stat-value { font-size: 18px; }
    .bgr-stat-label { font-size: 11px; }

    /* === Meet cards (hub) compact === */
    .bgr-meets-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .bgr-meet-card { padding: 10px; }
    .bgr-meet-card-course { font-size: 15px; }
    .bgr-meet-card-body { font-size: 12px; }

    /* === Festivals + courses on hub === */
    .bgr-festivals-grid,
    .bgr-courses-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* Very narrow phones (≤380px) — extra tightening for legacy iPhone widths */
@media (max-width: 380px) {
    .bgr-page { padding: 0 10px; }
    .bgr-card { padding: 12px; }
    .bgr-field-table tr {
        grid-template-columns: 36px 1fr auto;
        padding: 10px;
        gap: 6px 8px;
    }
    .bgr-col-no { width: 32px; height: 32px; line-height: 32px; font-size: 15px; }
    .bgr-col-horse strong { font-size: 14px; }
    .bgr-col-best { font-size: 16px !important; }
    .bgr-col-stat { font-size: 10px; padding: 3px 5px !important; }
    .bgr-bookie-pills li { padding: 3px 6px; }
    .bgr-meets-grid { grid-template-columns: 1fr; }
}

/* ============ v1.2.0 — verdict, probability chart, course enrichment, horse profile ============ */

/* Extended editorial verdict block (on race pages, below tipster card) */
.bgr-verdict-extended .bgr-verdict-lead {
    font-size: 16px;
    line-height: 1.6;
    color: #1f2937;
    margin: 0 0 12px;
}
.bgr-verdict-extended p {
    margin: 0 0 10px;
    line-height: 1.6;
    color: #374151;
    font-size: 14px;
}
.bgr-verdict-extended .bgr-verdict-market {
    background: #fef3c7;
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}
.bgr-verdict-tag {
    color: #1e3a8a;
    font-weight: 700;
}
.bgr-verdict-ctx {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
    border-top: 1px dashed #e5e7eb;
    padding-top: 8px;
    margin-top: 12px;
}

/* Market-implied probability chart (pure CSS bars) */
.bgr-probchart {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}
.bgr-probchart-h {
    font-family: Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    color: #1e3a8a;
    letter-spacing: .05em;
    margin-bottom: 4px;
}
.bgr-probchart-sub {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 14px;
}
.bgr-probchart-rows {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bgr-probchart-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.5fr) 3fr 50px 70px;
    gap: 10px;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px dotted #e5e7eb;
}
.bgr-probchart-row:last-child { border-bottom: none; }
.bgr-probchart-row.is-fav {
    background: linear-gradient(90deg, #eef2ff 0%, transparent 100%);
    padding-left: 8px;
    margin-left: -8px;
    border-radius: 4px;
    border-bottom: none;
}
.bgr-probchart-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e3a8a;
}
.bgr-probchart-name a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted #6366f1;
}
.bgr-probchart-name a:hover { color: #1e40af; }
.bgr-probchart-bar-wrap {
    background: #e5e7eb;
    border-radius: 4px;
    height: 14px;
    overflow: hidden;
}
.bgr-probchart-bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 4px;
    transition: width .3s ease;
}
.bgr-probchart-row.is-fav .bgr-probchart-bar {
    background: linear-gradient(90deg, #b45309 0%, #f59e0b 100%);
}
.bgr-probchart-pct {
    font-weight: 700;
    font-size: 13px;
    color: #1f2937;
    text-align: right;
}
.bgr-probchart-price {
    display: inline-block;
    background: #1e40af;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
}
.bgr-probchart-price:hover {
    background: #1e3a8a;
    color: #fff;
}
.bgr-probchart-price.is-empty {
    background: #e5e7eb;
    color: #6b7280;
}

/* Course track-config grid */
.bgr-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 8px 0 18px;
    padding: 0;
    list-style: none;
}
.bgr-config-item {
    margin: 0;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    border-left: 3px solid #1e40af;
}
.bgr-config-item dt {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    margin-bottom: 4px;
}
.bgr-config-item dd {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}
.bgr-config-narrative {
    padding-top: 8px;
    border-top: 1px dashed #e5e7eb;
}
.bgr-config-narrative p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
}

/* Signature events list */
.bgr-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bgr-event-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: start;
}
.bgr-event-item:last-child { border-bottom: none; }
.bgr-event-month {
    font-family: Georgia, serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #fff;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    padding: 6px 10px;
    border-radius: 5px;
    text-align: center;
    align-self: start;
}
.bgr-event-name {
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.bgr-event-desc {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.55;
}

/* Punter tips list (gold-bordered) */
.bgr-course-tips .bgr-tips-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 12px;
}
.bgr-course-tips .bgr-tips-list li {
    position: relative;
    padding: 10px 12px 10px 32px;
    margin-bottom: 6px;
    background: #fffbeb;
    border-left: 3px solid #facc15;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
}
.bgr-course-tips .bgr-tips-list li:before {
    content: "★";
    position: absolute;
    left: 10px;
    top: 10px;
    color: #f59e0b;
    font-weight: 700;
}
.bgr-tips-byline {
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
    text-align: right;
    margin-top: 8px;
}

/* How to get there */
.bgr-course-getthere p {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}
.bgr-course-getthere a {
    color: #1e40af;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted #3b82f6;
}
.bgr-course-getthere a:hover { color: #1e3a8a; }

/* ===== Horse profile page ===== */
.bgr-horse-intro p { font-size: 15px; line-height: 1.6; color: #1f2937; }
.bgr-card-byline {
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
    margin-top: 8px;
}

/* Next race block */
.bgr-nextrace-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 10px;
}
@media (min-width: 700px) {
    .bgr-nextrace-block { grid-template-columns: 1fr 220px; align-items: center; }
}
.bgr-nextrace-time {
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: 800;
    color: #1e40af;
    line-height: 1;
}
.bgr-nextrace-course {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a8a;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 4px 0;
}
.bgr-nextrace-name {
    font-family: Georgia, serif;
    font-size: 16px;
    color: #1e1b4b;
    margin: 4px 0;
}
.bgr-nextrace-meta { font-size: 12px; color: #6b7280; margin: 4px 0 8px; }
.bgr-nextrace-meetlink {
    color: #1e40af;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted #3b82f6;
    font-size: 13px;
}
.bgr-nextrace-meetlink:hover { color: #1e3a8a; }
.bgr-nextrace-odds {
    background: #fff;
    padding: 14px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(30, 64, 175, .12);
}
.bgr-nextrace-odds-lbl {
    font-size: 9px;
    font-weight: 800;
    color: #6b7280;
    letter-spacing: .06em;
    margin-bottom: 6px;
    line-height: 1.2;
}
.bgr-nextrace-odds-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
}
.bgr-nextrace-odds-price {
    font-family: Georgia, serif;
    font-size: 26px;
    font-weight: 800;
    color: #1e40af;
}
.bgr-nextrace-odds-prob {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}
.bgr-nextrace-odds-prob-pct {
    font-family: Georgia, serif;
    font-weight: 700;
    color: #16a34a;
    font-size: 16px;
}
.bgr-nextrace-odds-prob-lbl { font-size: 9px; color: #6b7280; }
.bgr-nextrace-odds-bookie { font-size: 11px; color: #6b7280; margin: 4px 0 10px; }
.bgr-nextrace-betbtn {
    display: block;
    background: #b45309;
    color: #fff !important;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: transform .12s, box-shadow .12s;
}
.bgr-nextrace-betbtn:hover {
    transform: translateY(-1px);
    background: #d97706;
    box-shadow: 0 3px 8px rgba(180, 83, 9, .35);
}

/* Horse performance breakdown tables */
.bgr-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.bgr-breakdown-block {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
}
.bgr-breakdown-h {
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.bgr-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.bgr-breakdown-table th,
.bgr-breakdown-table td {
    padding: 6px 4px;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
}
.bgr-breakdown-table th:first-child,
.bgr-breakdown-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: #111827;
}
.bgr-breakdown-table thead th {
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid #d1d5db;
}
.bgr-breakdown-table tbody tr:last-child th,
.bgr-breakdown-table tbody tr:last-child td { border-bottom: none; }

/* Form analyst comments */
.bgr-comment-list {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}
.bgr-comment-list li {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #f9fafb;
    border-left: 3px solid #1e40af;
    border-radius: 4px;
}
.bgr-comment-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 4px;
    font-size: 11px;
}
.bgr-comment-pos {
    background: #1e40af;
    color: #fff;
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 700;
}
.bgr-comment-date { color: #6b7280; font-weight: 600; }
.bgr-comment-course { color: #1e40af; font-weight: 600; }
.bgr-comment-text {
    margin: 0;
    font-size: 13px;
    color: #374151;
    line-height: 1.55;
    font-style: italic;
}
.bgr-stats-byline {
    font-size: 11px;
    color: #6b7280;
    margin-top: 10px;
    font-style: italic;
}
.bgr-stats-byline strong { color: #1e40af; font-style: normal; }

/* Race history list (horse page) */
.bgr-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bgr-history-row {
    display: grid;
    grid-template-columns: 50px 1fr 70px;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #e5e7eb;
}
.bgr-history-pos {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    color: #fff;
}
.bgr-history-pos.bgr-pos-win   { background: #16a34a; }
.bgr-history-pos.bgr-pos-place { background: #f59e0b; }
.bgr-history-pos.bgr-pos-other { background: #9ca3af; }
.bgr-history-date {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}
.bgr-history-meta {
    font-size: 13px;
    color: #1f2937;
    margin: 2px 0;
}
.bgr-history-detail {
    font-size: 11px;
    color: #6b7280;
}
.bgr-history-sp {
    text-align: center;
    background: #fff;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}
.bgr-history-sp-price {
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
}
.bgr-history-sp-lbl {
    font-size: 9px;
    color: #6b7280;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Breeding grid */
.bgr-breed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.bgr-breed-pair {
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 6px;
}
.bgr-breed-pair dt {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 4px;
}
.bgr-breed-pair dd {
    margin: 0;
    font-size: 14px;
    color: #111827;
    font-weight: 600;
}

@media (max-width: 560px) {
    .bgr-event-item { grid-template-columns: 1fr; gap: 6px; }
    .bgr-event-month { justify-self: start; padding: 4px 8px; font-size: 10px; }
    .bgr-config-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .bgr-probchart-row {
        grid-template-columns: 1fr 60px;
        grid-template-areas: "name pct" "bar bar" "price price";
        gap: 4px;
    }
    .bgr-probchart-name { grid-area: name; }
    .bgr-probchart-bar-wrap { grid-area: bar; }
    .bgr-probchart-pct { grid-area: pct; }
    .bgr-probchart-price { grid-area: price; justify-self: start; }
}

/* ============ v1.2.1 — enriched today page ============ */

/* Hero stats pills row */
.bgr-today-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.bgr-today-pill {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    color: #1f2937;
}
.bgr-today-pill strong {
    color: #1e40af;
    font-weight: 800;
}
.bgr-today-pill-feat {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    color: #78350f;
}
.bgr-today-pill-feat strong { color: #92400e; }

/* Editorial intro */
.bgr-today-intro-text {
    font-size: 15px;
    line-height: 1.7;
    color: #1f2937;
}
.bgr-today-intro-text strong { color: #1e3a8a; }

/* Headline-of-the-day callout */
.bgr-today-headline { border-left: 4px solid #b45309; background: linear-gradient(90deg, #fffbeb 0%, #fff 60%); }
.bgr-headline-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 8px;
}
.bgr-headline-card-time {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 800;
    color: #b45309;
    line-height: 1;
}
.bgr-headline-card-course {
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 4px 0;
}
.bgr-headline-card-name {
    font-family: Georgia, serif;
    font-size: 16px;
    color: #1e1b4b;
    margin: 4px 0;
    font-weight: 600;
}
.bgr-headline-card-meta { font-size: 12px; color: #6b7280; }
.bgr-headline-card-cta {
    background: #b45309;
    color: #fff !important;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    transition: background .12s, transform .12s;
}
.bgr-headline-card-cta:hover {
    background: #d97706;
    transform: translateY(-1px);
}
@media (max-width: 560px) {
    .bgr-headline-card { grid-template-columns: 1fr; }
    .bgr-headline-card-cta { text-align: center; }
}

/* Today's top tips grid */
.bgr-today-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.bgr-today-tip-card {
    display: block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform .12s, box-shadow .12s, border-color .12s;
    border-left: 3px solid #1e40af;
}
.bgr-today-tip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(30, 64, 175, .12);
    border-left-color: #b45309;
}
.bgr-today-tip-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 6px;
}
.bgr-today-tip-off {
    font-weight: 700;
    color: #1e40af;
}
.bgr-today-tip-course {
    text-transform: uppercase;
    letter-spacing: .03em;
}
.bgr-today-tip-stars {
    color: #f59e0b;
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.bgr-today-tip-horse {
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 4px;
    line-height: 1.2;
}
.bgr-today-tip-price {
    display: inline-block;
    background: #1e40af;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}
.bgr-today-tip-race {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

/* "At a glance" facts list */
.bgr-today-facts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bgr-today-facts-list li {
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #f9fafb;
    border-left: 3px solid #1e40af;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
}
.bgr-today-facts-list a {
    color: #1e40af;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted #3b82f6;
}
.bgr-today-facts-list a:hover { color: #1e3a8a; }

/* ============ v1.3.0 — festival page enrichment ============ */

/* SVG day-by-day timeline */
.bgr-festival-timeline-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}
.bgr-festival-timeline-svg {
    display: block;
    min-width: 100%;
    height: auto;
    max-height: 240px;
}
@media (max-width: 700px) {
    .bgr-festival-timeline-svg { min-width: 700px; }
}

/* Punter tips card */
.bgr-festival-tips .bgr-festival-tips-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 10px;
}
.bgr-festival-tips .bgr-festival-tips-list li {
    position: relative;
    padding: 12px 14px 12px 36px;
    margin-bottom: 8px;
    background: #fffbeb;
    border-left: 3px solid #facc15;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
}
.bgr-festival-tips .bgr-festival-tips-list li:before {
    content: "★";
    position: absolute;
    left: 12px;
    top: 12px;
    color: #f59e0b;
    font-weight: 700;
    font-size: 14px;
}

/* Bookmaker strategy card */
.bgr-festival-bookie .bgr-festival-bookie-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
}
.bgr-festival-bookie .bgr-festival-bookie-list li {
    position: relative;
    padding: 12px 14px 12px 36px;
    margin-bottom: 8px;
    background: #eff6ff;
    border-left: 3px solid #1e40af;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.55;
    color: #1e3a8a;
}
.bgr-festival-bookie .bgr-festival-bookie-list li:before {
    content: "£";
    position: absolute;
    left: 12px;
    top: 10px;
    color: #1e40af;
    font-weight: 800;
    font-size: 16px;
    font-family: Georgia, serif;
}

/* Practical info card */
.bgr-finfo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin: 4px 0;
}
.bgr-finfo-item {
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    border-left: 3px solid #7c3aed;
}
.bgr-finfo-item dt {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    margin-bottom: 6px;
}
.bgr-finfo-item dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
}

/* =========================================================================
   Review links under the affiliate CTAs
   ========================================================================= */

/* A non-commercial route into our own coverage, so a reader not ready to
   click through to the bookmaker still has somewhere to go. Suppressed
   automatically for any brand without a real review page. */
.bgr-top-pick-review,
.bgr-festival-offer-review {
    grid-area: review !important;
    font-size: 12px;
    color: var(--bgr-indigo);
    text-decoration: underline;
    text-underline-offset: 2px;
    margin-top: 6px;
    line-height: 1.3;
}
.bgr-top-pick-review:hover,
.bgr-festival-offer-review:hover { color: var(--bgr-indigo-dark); }

/* =========================================================================
   Cross-links into the wider betting content
   ========================================================================= */

.bgr-related-links {
    background: var(--bgr-surface-alt);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius-lg);
    padding: 20px;
    margin: 24px 0;
}
.bgr-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.bgr-related-grid li { margin: 0; }
.bgr-related-grid a {
    display: block;
    height: 100%;
    box-sizing: border-box;
    background: var(--bgr-surface);
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius);
    padding: 14px;
    text-decoration: none;
    transition: border-color 120ms;
}
.bgr-related-grid a:hover { border-color: var(--bgr-indigo); }
.bgr-related-title {
    display: block;
    font-weight: 600;
    color: var(--bgr-indigo);
    margin-bottom: 4px;
}
.bgr-related-desc {
    display: block;
    font-size: 13px;
    color: var(--bgr-text-mute);
    line-height: 1.4;
}

/* The contextual line under the free bets block. */
.bgr-top-picks-foot-note {
    font-size: 13px;
    color: var(--bgr-text-mute);
    text-align: center;
    margin: 6px 0 0;
    line-height: 1.5;
}
.bgr-top-picks-foot-note a { color: var(--bgr-indigo); }

@media (max-width: 768px) {
    .bgr-related-links { padding: 16px 14px; }
    .bgr-related-grid { grid-template-columns: 1fr; gap: 8px; }
}

/* =========================================================================
   Market analysis — shortest-priced favourites
   ========================================================================= */

.bgr-favourites-basis,
.bgr-favourites-foot {
    font-size: 12px;
    color: var(--bgr-text-mute);
    line-height: 1.5;
}
.bgr-favourites-basis { margin: 0 0 16px; }
.bgr-favourites-foot {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--bgr-border);
}
.bgr-favourites-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
}
.bgr-favourite {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 0;
    border-top: 1px solid var(--bgr-border);
    margin: 0;
}
.bgr-favourite-rank {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bgr-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.bgr-favourite-body { flex: 1; min-width: 0; }
.bgr-favourite-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    flex-wrap: wrap;
}
.bgr-favourite-horse {
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    color: var(--bgr-indigo);
}
.bgr-favourite-horse:hover { text-decoration: underline; }
.bgr-favourite-price { font-size: 14px; font-weight: 700; white-space: nowrap; }
.bgr-favourite-book { font-weight: 400; color: var(--bgr-text-mute); }
.bgr-favourite-meta {
    font-size: 12px;
    color: var(--bgr-text-secondary, var(--bgr-text-mute));
    margin: 2px 0 8px;
}
.bgr-favourite-bar {
    display: block;
    height: 6px;
    background: var(--bgr-surface-alt);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.bgr-favourite-bar span {
    display: block;
    height: 100%;
    background: var(--bgr-indigo);
}
.bgr-favourite-note {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .bgr-favourite { gap: 12px; }
    .bgr-favourite-rank { flex: 0 0 28px; height: 28px; font-size: 13px; }
    .bgr-favourite-horse { font-size: 15px; }
    .bgr-favourite-head { gap: 6px; }
}

/* =========================================================================
   Runner price comparison (horse pages, declared runners only)
   ========================================================================= */

.bgr-price-list { list-style: none; margin: 0; padding: 0; }
.bgr-price-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--bgr-border);
    margin: 0;
}
.bgr-price-best { background: var(--bgr-surface-alt); }
.bgr-price-book { font-weight: 600; font-size: 14px; }
.bgr-price-odds { font-weight: 700; font-size: 15px; min-width: 56px; text-align: right; }
.bgr-price-ret  { font-size: 13px; color: var(--bgr-text-mute); min-width: 64px; text-align: right; }
.bgr-price-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 92px;
    min-height: 34px;
    padding: 6px 12px;
    background: var(--bgr-indigo);
    color: #fff;
    border-radius: var(--bgr-radius);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.bgr-price-cta:hover { background: var(--bgr-indigo-dark); color: #fff; }
.bgr-price-gap {
    font-size: 13px;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--bgr-border);
    line-height: 1.5;
}
.bgr-price-foot { font-size: 12px; color: var(--bgr-text-mute); margin: 8px 0 0; line-height: 1.5; }

@media (max-width: 768px) {
    .bgr-price-row { grid-template-columns: 1fr auto auto; row-gap: 6px; }
    .bgr-price-cta { grid-column: 1 / -1; width: 100%; }
    .bgr-price-ret { display: none; }
}

/* =========================================================================
   Odds comparison grid
   ========================================================================= */

.bgr-oddsgrid-race { border-top: 1px solid var(--bgr-border); padding: 16px 0 4px; }
.bgr-oddsgrid-head { margin-bottom: 10px; }
.bgr-oddsgrid-name { font-size: 16px; font-weight: 700; color: var(--bgr-indigo); text-decoration: none; }
.bgr-oddsgrid-name:hover { text-decoration: underline; }
.bgr-oddsgrid-meta { display: block; font-size: 12px; color: var(--bgr-text-mute); margin-top: 2px; }
.bgr-oddsgrid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bgr-oddsgrid-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 420px; }
.bgr-oddsgrid-table th,
.bgr-oddsgrid-table td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--bgr-border); }
.bgr-oddsgrid-table thead th { font-size: 11px; color: var(--bgr-text-mute); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.bgr-oddsgrid-table tbody th { text-align: left; font-weight: 700; white-space: nowrap; }
.bgr-oddsgrid-table td a { color: var(--bgr-text); text-decoration: none; }
.bgr-oddsgrid-best { background: var(--bgr-surface-alt); }
.bgr-oddsgrid-best a { font-weight: 700; color: var(--bgr-indigo); text-decoration: underline; text-underline-offset: 2px; }
.bgr-oddsgrid-none { color: var(--bgr-text-mute); }
.bgr-oddsgrid-gap { font-size: 13px; margin: 10px 0 0; line-height: 1.5; }
.bgr-oddsgrid-foot { font-size: 12px; color: var(--bgr-text-mute); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--bgr-border); line-height: 1.5; }

/* =========================================================================
   Meeting tips
   ========================================================================= */

.bgr-tip { border-top: 1px solid var(--bgr-border); padding: 14px 0 2px; }
.bgr-tip-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.bgr-tip-off { font-weight: 700; font-size: 15px; }
.bgr-tip-race { font-size: 14px; color: var(--bgr-indigo); text-decoration: none; }
.bgr-tip-race:hover { text-decoration: underline; }
.bgr-tip-prose { font-size: 14px; line-height: 1.6; margin: 0 0 6px; }
.bgr-tip-alt { color: var(--bgr-text-mute); }
.bgr-meeting-tips-foot { font-size: 12px; color: var(--bgr-text-mute); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--bgr-border); line-height: 1.5; }

/* =========================================================================
   Review-page racing odds widget
   ========================================================================= */

.bgr-review-odds {
    border: 1px solid var(--bgr-border);
    border-radius: var(--bgr-radius-lg);
    padding: 18px 20px;
    margin: 24px 0;
    background: var(--bgr-surface);
}
.bgr-review-odds-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bgr-review-odds-head h3 { margin: 0; font-size: 18px; }
.bgr-review-odds-date { font-size: 12px; color: var(--bgr-text-mute); }
.bgr-review-odds-list { list-style: none; margin: 0; padding: 0; }
.bgr-review-odds-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--bgr-border);
    margin: 0;
}
.bgr-review-odds-race a { font-size: 14px; font-weight: 600; color: var(--bgr-indigo); text-decoration: none; }
.bgr-review-odds-race a:hover { text-decoration: underline; }
.bgr-review-odds-field { display: block; font-size: 12px; color: var(--bgr-text-mute); }
.bgr-review-odds-horse { font-size: 14px; font-weight: 600; }
.bgr-review-odds-price { text-align: right; white-space: nowrap; }
.bgr-review-odds-frac { font-size: 16px; font-weight: 700; }
.bgr-review-odds-flag { display: block; font-size: 11px; color: var(--bgr-text-mute); text-transform: uppercase; letter-spacing: 0.03em; }
.bgr-review-odds-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--bgr-border); }
.bgr-review-odds-cta {
    display: inline-flex; align-items: center; justify-content: center;
    background: #e9e9ec; color: #1b1b2f; border: 1px solid #d4d4d9;
    padding: 10px 16px;
    border-radius: var(--bgr-radius); text-decoration: none; font-weight: 600; font-size: 14px;
}
.bgr-review-odds-cta:hover { background: #dededf; color: #1b1b2f; }

/* The heading promises free bets, so the offer is stated on the widget. */
.bgr-review-odds-offer { font-size: 14px; margin: 0 0 10px; line-height: 1.5; }
.bgr-review-odds-offer code {
    background: var(--bgr-surface-alt); padding: 1px 6px; border-radius: 3px;
    font-size: 13px; letter-spacing: 0.02em;
}
.bgr-review-odds-more { font-size: 13px; color: var(--bgr-indigo); }
.bgr-review-odds-terms { font-size: 12px; color: var(--bgr-text-mute); margin: 10px 0 0; line-height: 1.5; }

@media (max-width: 600px) {
    .bgr-review-odds-row { grid-template-columns: 1fr auto; }
    .bgr-review-odds-horse { grid-column: 1; }
    .bgr-review-odds-foot { flex-direction: column; align-items: stretch; }
    .bgr-review-odds-cta { width: 100%; }
}
