/* ==========================================================================
   JustRunLah! main stylesheet. Hand-written, no build step, mobile first.
   Sections:
     1. Tokens            6. Components
     2. Reset & base      7. Entry content (editor HTML)
     3. Utilities         8. Core block overrides + presets
     4. Layout            9. Legacy shortcodes / TagDiv compat
     5. Header, drawer, footer
   Breakpoints: 600px (large phone), 768px (tablet), 1024px (desktop: nav + sidebar), 1280px.
   Class naming: component, component__part, component--variant, is-state. Per-template CSS lives
   in assets/css/templates/<name>.css (see README).
   ========================================================================== */

/* 1. Tokens ================================================================ */
:root {
	--c-red: #d92329;          /* links, buttons, focus (4.98:1 on white, AA) */
	--c-red-dark: #b01b20;     /* hover */
	--c-accent: #ed1c24;       /* decorative only (logo red, rules, icons) */
	--c-red-on-dark: #ff6b6f;  /* red text on black (AA) */
	--c-ink: #111;
	--c-black: #000;
	--c-text: #1b1b1b;
	--c-muted: #555;           /* 7.4:1 */
	--c-subtle: #666;          /* 5.7:1 on white, 4.9:1 on --c-bg-muted (pass 5: was #707070, 4.2:1 on --c-bg-muted) */
	--c-line: #e4e4e4;
	--c-line-strong: #cfcfcf;
	--c-field-border: #8a8a8a; /* form field / dropdown outline: 3.4:1 on white, 3.2:1 on --c-bg-soft (WCAG 1.4.11 UI boundary) */
	--c-bg: #fff;
	--c-bg-soft: #f6f6f6;
	--c-bg-muted: #ececec;
	--c-green: #1e7d32;
	--c-green-bg: #e9f5ea;
	--c-purple: #6b2fa0;
	--c-purple-bg: #f3ecfa;
	--c-offer-bg: #fff1f1;     /* offer button (dark red text 6.3:1) */
	--c-warn: #b3261e;         /* form errors only: never on races / events (red reads "cancelled") */
	--c-warn-bg: #fdeceb;
	--c-focus: #d92329;

	/* Gold: featured races / events / calendar rows / badges (owner decision D2: never red there).
	   Shared by every template CSS; use these names, not hex values. Contrast on white / tint:
	   --jrl-gold 5.9:1 / 5.5:1 (text, AA); --jrl-gold-accent decorative only (borders, stars). */
	--jrl-gold: #7a5600;        /* text / icons on white or the tint (AA) */
	--jrl-gold-accent: #b8860b; /* decorative accent: star icon, hover underline, rules (never a side stripe, R2) */
	--jrl-gold-tint: #fff8e6;   /* Featured badge fill, status panels; also the start of the soft featured-row wash (27 Nov 2026) */
	--jrl-gold-border: #e0b84f; /* hairline borders, badge outline */
	/* Event status (D4): cancelled = dark neutral, closed = amber, postponed / new date = slate. */
	--jrl-status-dark: #2b2b2b;
	--jrl-status-slate: #2f4a66;
	--jrl-status-slate-bg: #eef3f8;

	/* Brand (README "Brand elements"): the logo's burst mark + pulse red. Decorative only, used
	   sparingly (section-head accent, .h-accent, .bg-speed, CTA focus ring, loader). Never on race /
	   event rows (R1). Path data shared with jrl_brand_mark_paths() (inc/logo.php) and main.js. */
	--jrl-pulse: #ed1c24;       /* logo deep pulse red */
	--jrl-pulse-2: #ff3d6e;
	--jrl-pulse-3: #ff5a5f;
	--jrl-pulse-4: #ff2d8a;
	--jrl-pulse-grad: linear-gradient(90deg, var(--jrl-pulse) 0%, var(--jrl-pulse-2) 55%, var(--jrl-pulse-4) 100%);
	--jrl-burst: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cpath d='M550 556 L236 84 C296 40 418 18 442 110 Z'/%3E%3Cpath d='M432 440 L82 240 C138 188 194 166 216 196 Z'/%3E%3Cpath d='M394 452 L52 448 C48 392 78 346 132 356 Z'/%3E%3C/svg%3E");
	--jrl-speed-angle: 28deg;   /* the burst angle: lines fall from top left to bottom right, like the logo strokes */

	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	/* Type scale (fluid between 360 and 1280px) */
	--fs-xs: .75rem;
	--fs-sm: .875rem;
	--fs-base: 1rem;
	--fs-md: 1.0625rem;
	--fs-lg: clamp(1.125rem, 1.08rem + .2vw, 1.25rem);
	--fs-xl: clamp(1.25rem, 1.15rem + .45vw, 1.5rem);
	--fs-2xl: clamp(1.5rem, 1.3rem + .9vw, 2rem);
	--fs-3xl: clamp(1.75rem, 1.45rem + 1.4vw, 2.625rem);
	--lh-tight: 1.2;
	--lh: 1.55;
	--lh-read: 1.7;

	/* Space scale */
	--sp-1: .25rem;
	--sp-2: .5rem;
	--sp-3: .75rem;
	--sp-4: 1rem;
	--sp-5: 1.5rem;
	--sp-6: 2rem;
	--sp-7: 3rem;
	--sp-8: 4rem;

	--radius-sm: 4px;
	--radius: 8px;
	--radius-lg: 14px;
	--radius-pill: 999px;
	--shadow-sm: 0 1px 2px rgba(0,0,0,.08);
	--shadow: 0 4px 16px rgba(0,0,0,.10);
	--shadow-lg: 0 12px 40px rgba(0,0,0,.18);

	--container: 1200px;
	--measure: 720px;
	--gutter: 16px;
	--sidebar: 300px;
	--header-h: 56px;
	--header-edge: 0px;  /* desktop: the angled bottom edge under the header (.site-header::after) */
	--header-stick: calc(var(--header-h) + var(--header-edge)); /* sticky offsets + anchor padding below the header */
	--bottom-offset: var(--jrl-anchor-h, 0px); /* fixed layers at the bottom: AdSense bottom anchor (jrl-core ads.js sets --jrl-anchor-h) + jrl-share bar */
	--tap: 44px;
	/* Form rows (shared.css "9. Form rows"): one height for every single-line control and one label box,
	   so labels and controls in a horizontal row sit on the same lines. */
	--control-h: var(--tap);
	--label-fs: var(--fs-sm);
	--label-lh: 1.35;
	--label-gap: 6px;
	--label-box: calc(var(--label-fs) * var(--label-lh) + var(--label-gap)); /* offset of a label-less button in a labelled row */

	/* Buttons / CTAs (jrl_button(); jrl-share reads --btn-h and --btn-radius too) */
	--btn-h: var(--tap);       /* every size: ≥44px tap target */
	--btn-h-lg: 52px;
	--btn-radius: var(--radius);
	--btn-gap: .45em;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --header-h: 64px; --header-edge: 30px; } }
@media (min-width: 1440px) { :root { --header-edge: 36px; } }
@media (max-width: 767px) { body.has-share-bar { --bottom-offset: calc(var(--jrl-share-bar-h, 50px) + var(--jrl-anchor-h, 0px)); } } /* jrl-share classic bar (off under this theme: compact mode) */

/* 2. Reset & base =========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-stick) + 16px); } /* the one anchor / TOC offset: header + 16px (no heading scroll-margin on top of it) */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: var(--lh); color: var(--c-text); background: var(--c-bg); overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.has-drawer-open { overflow: hidden; }
img, svg, video, canvas, picture { max-width: 100%; height: auto; }
img { border-style: none; vertical-align: middle; }
svg { vertical-align: middle; }
iframe { max-width: 100%; border: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 var(--sp-3); font-weight: 700; line-height: var(--lh-tight); color: var(--c-ink); letter-spacing: -.01em; overflow-wrap: break-word; }
h1 { font-size: var(--fs-3xl); letter-spacing: -.02em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5, h6 { font-size: var(--fs-base); }
p, ul, ol, dl, figure, blockquote, pre, table { margin: 0 0 var(--sp-4); }
ul, ol { padding-left: 1.4em; }
a { color: var(--c-red); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-red-dark); }
a:not([class]) { text-decoration-line: underline; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }
hr { height: 0; margin: var(--sp-6) 0; border: 0; border-top: 1px solid var(--c-line); }
small { font-size: var(--fs-sm); }
sup, sub { font-size: .75em; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -.5em; } sub { bottom: -.25em; }
code, kbd, pre, samp { font-family: var(--font-mono); font-size: .9em; }
code { padding: .1em .35em; background: var(--c-bg-soft); border-radius: var(--radius-sm); }
pre { padding: var(--sp-4); overflow-x: auto; background: var(--c-bg-soft); border-radius: var(--radius); }
pre code { padding: 0; background: none; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 12px; text-align: left; vertical-align: top; border: 1px solid var(--c-line); }
th { font-weight: 700; background: var(--c-bg-soft); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea {
	width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--c-field-border); border-radius: var(--radius); background: #fff; color: var(--c-text); font-size: 1rem; line-height: 1.3; /* never inherit: fields are white, also inside dark bars (header search) */
}
textarea { min-height: 120px; resize: vertical; }
::placeholder { color: var(--c-muted); opacity: 1; }
input::selection, textarea::selection { background: #cfe0ff; color: var(--c-ink); }
select { appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 1px; border-color: var(--c-ink); }
input[type="checkbox"], input[type="radio"] { width: 1.15em; height: 1.15em; accent-color: var(--c-red); vertical-align: -.15em; }
label { font-weight: 600; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; font-weight: 700; }
[hidden] { display: none !important; }
details > summary { cursor: pointer; }
dialog { color: inherit; }

/* 3. Utilities ============================================================== */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.screen-reader-text, .visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.screen-reader-text:focus { position: static !important; width: auto; height: auto; margin: 0; clip: auto; clip-path: none; white-space: normal; }
.skip-link { position: absolute; left: var(--sp-3); top: -100px; z-index: 1000; padding: var(--sp-3) var(--sp-4); background: var(--c-ink); color: #fff; font-weight: 700; border-radius: var(--radius); text-decoration: none; }
.skip-link:focus { top: var(--sp-3); color: #fff; }
.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.sep { margin-inline: .4em; color: var(--c-subtle); }
.kicker { margin: 0 0 var(--sp-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-red); }
.note { padding: var(--sp-3) var(--sp-4); background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: var(--radius); font-size: var(--fs-sm); } /* full hairline, no side stripe (R2) */
.anchor { display: block; position: relative; top: calc(-1 * var(--header-stick)); visibility: hidden; }
.text-center { text-align: center; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin: var(--sp-4) 0; }
.btn-row--center { justify-content: center; }
/* Legacy responsive helpers kept for ported markup */
.showfirst { display: none !important; }
@media (max-width: 409.98px) { .hidesecond { display: none !important; } .showfirst { display: block !important; } }
@media (max-width: 959.98px) { .hidefirst { display: none !important; } }
@media (min-width: 860px) { .hidelarge { display: none !important; } }

/* Icons */
/* Two sizes: 1.25em (default; buttons, headings, facts) and 1em (.icon--sm / jrl_icon( …, [ 'size' => 'sm' ] ); inline with small text).
   Icon-only buttons (.icon-btn) use 24px. Outline UI icons, solid brand icons, colour = currentColor. */
.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--sm { width: 1em; height: 1em; }
.icon--red { color: var(--c-red); }
.icon--gold, :is(h2, h3) .icon.icon--gold { color: var(--jrl-gold-accent); }

/* Image placeholder + flags */
.img-ph { display: grid; place-items: center; width: 100%; background: linear-gradient(135deg, var(--c-bg-muted), var(--c-bg-soft)); color: var(--c-subtle); font-size: 2rem; font-weight: 800; line-height: 1; }
a:has(> .img-ph) { text-decoration: none; }
.img-ph.img-ph.img-ph { display: grid; } /* media boxes set their img to display: block; the initial must stay centred */
.flag { display: inline-block; width: auto; height: 1.1em; margin-right: .35em; vertical-align: -.15em; filter: drop-shadow(0 0 .6px rgba(0,0,0,.45)); } /* hairline that follows the flag itself (the webp is square, flag centred on transparency), so white flags keep their edge; site-wide, owner 29 Nov 2026 */
.page-title .flag { height: .9em; vertical-align: -.05em; }

/* 4. Layout ================================================================ */
.site-content { padding-top: var(--sp-4); padding-bottom: var(--sp-7); }
.breadcrumbs-slot { margin-bottom: var(--sp-4); font-size: var(--fs-sm); color: var(--c-muted); }
.breadcrumbs-slot:empty { display: none; }
.breadcrumbs-slot ol, .breadcrumbs-slot ul { display: flex; flex-wrap: wrap; gap: .25em .5em; margin: 0; padding: 0; list-style: none; }
.breadcrumbs-slot li + li::before { content: "›"; margin-right: .5em; color: var(--c-subtle); }
.breadcrumbs-slot a { color: var(--c-muted); text-decoration: none; }
.breadcrumbs-slot a:hover { color: var(--c-red); text-decoration: underline; }
.site-main { min-width: 0; outline: none; }
.layout { display: grid; gap: var(--sp-6); grid-template-columns: minmax(0, 1fr); }
.layout--narrow .site-main { max-width: var(--measure); margin-inline: auto; width: 100%; }
@media (min-width: 1024px) {
	.layout--sidebar { grid-template-columns: minmax(0, 1fr) var(--sidebar); gap: var(--sp-7); }
}
.site-sidebar { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.site-sidebar__sticky { display: flex; flex-direction: column; gap: var(--sp-5); }
@media (min-width: 1024px) {
	.site-sidebar__sticky { position: sticky; top: calc(var(--header-stick) + var(--sp-4)); }
}
@media (max-width: 1023.98px) {
	.site-sidebar { border-top: 1px solid var(--c-line); padding-top: var(--sp-6); }
	.site-sidebar .toc--nav { display: none; }
}
.site-main--article { max-width: 100%; }
@media (max-width: 767px) { body.has-share-bar .site-content { padding-bottom: calc(var(--sp-7) + var(--bottom-offset)); } }

/* Sections (homepage, 404, related) */
.home-section { margin: 0 0 var(--sp-7); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin: 0 0 var(--sp-4); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--c-line); }
.section-head__title { margin: 0; font-size: var(--fs-xl); text-transform: none; }
/* Brand accent: small burst mark before the heading text (not when the heading has its own icon). */
.section-head__title:not(:has(> .icon, > svg))::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .4em; vertical-align: -.02em; background: var(--jrl-pulse-grad); -webkit-mask: var(--jrl-burst) no-repeat center / contain; mask: var(--jrl-burst) no-repeat center / contain; }
.section-head__link { flex: none; }
.section-head--plain { border-bottom-width: 1px; border-color: var(--c-line); margin-top: var(--sp-6); }

/* 5. Header, drawer, footer ================================================= */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--c-black); color: #fff; }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 0px); }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
/* Desktop: the old Newspaper header edge, rebuilt (owner, 27 Nov 2026). Newspaper drew it with
   td-composer row divider "divider10": three black zigzag layers at opacity 1 / .3 / .15, flipped to
   hang from the header. Same paths here, as one decorative ::after (no markup), 30px tall (36px from
   1440px), transparent between the facets so content shows through while scrolling. z-index -1 keeps
   it under the nav panels. Sticky bars and anchors use --header-stick (= header + edge). Phones keep
   the straight header. Static: no motion. */
@media (min-width: 1024px) {
	.site-header::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 100%; height: var(--header-edge); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2000 400' preserveAspectRatio='none'%3E%3Cg transform='translate%280 400%29 scale%281 -1%29' fill='%23000'%3E%3Cpath d='M0,520V196l215-83L601,264l279-51,576,175,544-228V520H0Z'/%3E%3Cpath fill-opacity='.3' d='M0,520V276L492,157,949,388l727-160,324,162V520H0Z'/%3E%3Cpath fill-opacity='.15' d='M0,520V150L305,63,641,344l489-171,326,265L2000,90V520H0Z'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; pointer-events: none; }
}
@media print { .site-header::after { display: none; } }
.site-header__bar { display: flex; align-items: center; gap: var(--sp-4); height: var(--header-h); }
.site-logo { display: inline-flex; align-items: center; flex: none; margin-right: auto; color: #fff; }
.site-logo .logo { display: block; width: 125px; height: auto; }
@media (min-width: 1024px) { .site-logo { margin-right: 0; } .site-logo .logo { width: 150px; } }
.site-header__actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: inherit; list-style: none; }
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn .icon { width: 24px; height: 24px; }
@media (max-width: 380px) { .site-header__cta span { display: none; } .site-header__cta { padding-inline: 10px; } }
.nav-toggle[aria-expanded="true"] { background: rgba(255,255,255,.12); }
@media (min-width: 1024px) { .nav-toggle { display: none; } }

/* Header search (details/summary) */
.header-search { position: static; }
.header-search > summary { list-style: none; }
.header-search > summary::-webkit-details-marker { display: none; }
.header-search[open] > summary { background: rgba(255,255,255,.12); }
.header-search__panel { position: absolute; left: 0; right: 0; top: 100%; padding: var(--sp-4) var(--gutter); background: var(--c-ink); box-shadow: var(--shadow-lg); }
.header-search__panel .search-form { max-width: 640px; margin: 0 auto; }

/* Desktop navigation */
.nav-primary { display: none; }
@media (min-width: 1024px) {
	.nav-primary { display: block; flex: 1 1 auto; min-width: 0; }
	.nav-primary__list { display: flex; align-items: center; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
	.nav-item--d0 { position: relative; }
	.nav-item--d0 > .nav-link, .nav-btn { position: relative; z-index: 0; display: inline-flex; align-items: center; gap: .3em; height: var(--header-h); padding: 0 var(--sp-3); border: 0; background: none; color: #fff; font-size: .9375rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
	/* Hover / open / current: a 36px pill inside the bar (the link keeps the full bar height as its hit area). */
	.nav-item--d0 > .nav-link::before, .nav-btn::before { content: ""; position: absolute; z-index: -1; left: 2px; right: 2px; top: 50%; height: 36px; margin-top: -18px; border-radius: var(--radius-pill); background: transparent; transition: background-color .15s; }
	.nav-btn--icon { padding: 0 var(--sp-1); margin-left: calc(-1 * var(--sp-3)); }
	.nav-item--d0 > .nav-link:hover::before, .nav-btn:hover::before, .nav-btn[aria-expanded="true"]::before { background: rgba(255,255,255,.12); } /* no one-sided stripe (R2) */
	.nav-item--d0.is-current > .nav-btn::before, .nav-item--d0.is-current > .nav-link::before, .nav-item--d0 > .nav-link[aria-current]::before { background: rgba(255,255,255,.18); }
	.nav-btn--icon::before { left: 0; right: 0; }
	.nav-btn .icon { transition: transform .15s; }
	.nav-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
	.nav-panel { display: none; position: absolute; top: 100%; left: 0; z-index: 10; min-width: 240px; padding: var(--sp-3); background: #fff; color: var(--c-text); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-lg); }
	.nav-item--d0:hover > .nav-panel, .nav-item--d0.is-open > .nav-panel, html:not(.js) .nav-item--d0:focus-within > .nav-panel { display: block; }
	html.js .nav-item--d0.is-closed > .nav-panel { display: none; }
	.nav-panel:has(.nav-sub--l3) { min-width: 520px; }
	.nav-panel:has(.nav-sub--l3) > .nav-sub { columns: 2; column-gap: var(--sp-5); }
	.nav-sub { margin: 0; padding: 0; list-style: none; }
	.nav-sub li { break-inside: avoid; }
	.nav-sub .nav-link, .nav-sub .nav-group { display: block; padding: 8px 10px; color: var(--c-text); font-size: .9375rem; font-weight: 600; text-decoration: none; border-radius: var(--radius-sm); }
	.nav-sub .nav-link:hover, .nav-sub .nav-link[aria-current] { background: var(--c-bg-soft); color: var(--c-red); }
	.nav-sub--l3 { margin: 0 0 var(--sp-2) var(--sp-3); padding-left: var(--sp-2); border-left: 2px solid var(--c-line); }
	.nav-sub--l3 .nav-link { padding: 5px 10px; font-weight: 400; font-size: .875rem; }
	.nav-item--d0:last-child .nav-panel, .nav-item--d0:nth-last-child(2) .nav-panel { left: auto; right: 0; }
}

/* Drawer (popover) */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(380px, 92vw); height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--c-ink); color: #fff; overflow-y: auto; overscroll-behavior: contain; display: none; flex-direction: column; }
.drawer:popover-open, .drawer.is-open { display: flex; }
.drawer::backdrop { background: rgba(0,0,0,.6); }
@media (prefers-reduced-motion: no-preference) {
	.drawer:popover-open { animation: drawer-in .2s ease-out; }
	@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); height: var(--header-h); padding: 0 var(--sp-2) 0 var(--sp-4); border-bottom: 1px solid rgba(255,255,255,.12); position: sticky; top: 0; background: var(--c-ink); z-index: 1; }
.drawer__head .logo { width: 120px; }
.drawer__body { display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-4); }
.drawer .search-form__input { background: #fff; color: var(--c-text); }
.drawer .search-form__btn, .header-search__panel .search-form__btn { --btn-bg: var(--c-red); --btn-bd: var(--c-red); --btn-bg-h: var(--c-red-dark); --btn-bd-h: var(--c-red-dark); }
.drawer-nav__list, .drawer-nav__sub { margin: 0; padding: 0; list-style: none; }
.drawer-nav__item { border-bottom: 1px solid rgba(255,255,255,.1); }
.drawer-nav__sub .drawer-nav__item { border: 0; }
.drawer-nav a, .drawer-nav summary, .drawer-nav .nav-group { display: flex; align-items: center; justify-content: space-between; min-height: var(--tap); padding: 8px 4px; color: #fff; font-weight: 600; text-decoration: none; list-style: none; }
.drawer-nav summary::-webkit-details-marker { display: none; }
.drawer-nav summary .icon { transition: transform .15s; }
.drawer-nav details[open] > summary .icon { transform: rotate(180deg); }
.drawer-nav details[open] > summary { color: var(--c-red-on-dark); }
.drawer-nav__sub { padding: 0 0 var(--sp-2) var(--sp-3); border-left: 2px solid rgba(255,255,255,.15); margin-left: 4px; }
.drawer-nav__sub a, .drawer-nav__sub summary { font-weight: 400; min-height: 40px; }
.drawer-nav a[aria-current] { color: var(--c-red-on-dark); }
.drawer__utility .menu { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: 0; padding: 0; list-style: none; }
.drawer__utility a { color: #ddd; font-size: var(--fs-sm); text-decoration: none; }
.drawer__utility a:hover { color: #fff; text-decoration: underline; }

/* Footer */
.site-footer { margin-top: var(--sp-7); background: var(--c-ink); color: #cfcfcf; font-size: var(--fs-sm); }
.site-content + .site-footer, .ad-slot + .site-footer { margin-top: 0; }
.site-footer a { color: #f2f2f2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }
.site-footer__grid { display: grid; gap: var(--sp-6); padding-top: var(--sp-7); padding-bottom: var(--sp-6); }
@media (min-width: 600px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__about { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .site-footer__about { grid-column: auto; } }
.site-footer__logo .logo { width: 160px; margin-bottom: var(--sp-4); }
.site-footer__about p { max-width: 46ch; }
.site-footer__learn { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.site-footer__title { margin: 0 0 var(--sp-3); color: #fff; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; }
.site-footer__title:not(:first-child) { margin-top: var(--sp-5); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: var(--sp-2); }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); background: var(--c-black); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-top: var(--sp-4); padding-bottom: var(--sp-4); }
.site-footer__bottom p { margin: 0; }
.menu--footer { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.menu--footer li { margin: 0; }
/* Bottom anchor ad / bottom layers (--bottom-offset = their height, 0 without): the footer's last line stays clear. */
.site-footer__bottom { padding-bottom: var(--bottom-offset); }
.social { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.social li { margin: 0 !important; }
.social a { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; }
.social a:hover { background: var(--c-red); color: #fff; }
.social--small a { width: 36px; height: 36px; background: var(--c-bg-soft); color: var(--c-ink); }
.social--small a:hover { background: var(--c-ink); color: #fff; }

/* 6. Components ============================================================= */

/* Buttons: the one CTA component (jrl_button(); variants in jrl_button_variants()).
   Every size is ≥ --btn-h (44px) tall; same radius, gap, weight and focus ring. Variants only set the
   --btn-* colour properties, so :visited / hover / content-link rules cannot drift per variant. */
.btn, .jrlbtn a, .wp-block-button__link, .comment-form .submit, .frm_button_submit {
	--btn-bg: var(--c-red); --btn-fg: #fff; --btn-bd: var(--c-red);
	--btn-bg-h: var(--c-red-dark); --btn-fg-h: #fff; --btn-bd-h: var(--c-red-dark);
	display: inline-flex; align-items: center; justify-content: center; gap: var(--btn-gap); min-height: var(--btn-h); padding: 10px 18px;
	border: 2px solid var(--btn-bd); border-radius: var(--btn-radius); background: var(--btn-bg); color: var(--btn-fg); font-size: .9375rem; font-weight: 700; line-height: 1.15;
	text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover, .jrlbtn a:hover, .wp-block-button__link:hover, .comment-form .submit:hover, .frm_button_submit:hover { background: var(--btn-bg-h); border-color: var(--btn-bd-h); color: var(--btn-fg-h); }
.btn:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.btn--secondary { --btn-bg: #fff; --btn-fg: var(--c-ink); --btn-bd: var(--c-ink); --btn-bg-h: var(--c-ink); --btn-fg-h: #fff; --btn-bd-h: var(--c-ink); }
.btn--offer { --btn-bg: var(--c-offer-bg); --btn-fg: var(--c-red-dark); --btn-bd: var(--c-red); --btn-bg-h: #ffe1e1; --btn-fg-h: var(--c-red-dark); --btn-bd-h: var(--c-red-dark); border-style: dashed; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--c-red); --btn-bd: currentColor; --btn-bg-h: transparent; --btn-fg-h: var(--c-red-dark); --btn-bd-h: currentColor; }
.btn--link { --btn-bg: transparent; --btn-fg: var(--c-red); --btn-bd: transparent; --btn-bg-h: transparent; --btn-fg-h: var(--c-red-dark); --btn-bd-h: transparent; padding-inline: 2px; gap: .3em; }
.btn--link:hover { text-decoration: underline; }
.btn--dark { --btn-bg: var(--c-ink); --btn-bd: var(--c-ink); --btn-bg-h: #333; --btn-bd-h: #333; }
.btn--sm { padding: 8px 14px; font-size: .875rem; }
.btn--link.btn--sm { padding-inline: 2px; }
.btn--lg { min-height: var(--btn-h-lg); padding: 12px 24px; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }
.btn--icon-only { padding-inline: 0; width: var(--btn-h); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .35em; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--c-bg-muted); color: var(--c-ink); font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.badge--official { background: var(--c-ink); color: #fff; }
.badge--official .icon { color: var(--c-accent); }
.badge--featured { background: var(--jrl-gold-tint); color: var(--jrl-gold); box-shadow: inset 0 0 0 1.5px var(--jrl-gold-border); }
.badge--featured .icon { color: var(--jrl-gold-accent); }
.badge--open { background: var(--c-green); color: #fff; }
.badge--closed { background: var(--c-bg-muted); color: var(--c-muted); }
.badge--warning { background: #fff4d6; color: #6b4a00; box-shadow: inset 0 0 0 1px var(--jrl-gold-border); text-transform: none; white-space: normal; } /* amber, never red */
/* Event status labels on rows / cards / tiles (jrl_event_status_badge(); D4) */
.badge--status { text-transform: none; letter-spacing: 0; white-space: normal; max-width: 100%; }
.badge--status-cancelled { background: var(--jrl-status-dark); color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.badge--status-closed { background: #f1f1f1; color: #111; box-shadow: inset 0 0 0 1px var(--c-line-strong); } /* grey, like the key-card band */
.badge--status-postponed, .badge--status-rescheduled { background: #fff4d6; color: #6b4a00; box-shadow: inset 0 0 0 1px #f0d48a; } /* amber, like the key-card band */
.badge--status-info { background: var(--c-bg-soft); color: var(--c-muted); box-shadow: inset 0 0 0 1px var(--c-line-strong); }

/* Chips (filters, categories, distances) */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-4); padding: 0; list-style: none; }
.chips--scroll { position: relative; /* contains absolutely positioned screen-reader counts: no page-wide overflow */ flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; padding-bottom: 2px; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips--scroll::-webkit-scrollbar { display: none; }
.chips--sm .chip { min-height: 26px; padding: 2px 9px; font-size: var(--fs-xs); }
.chip { display: inline-flex; align-items: center; gap: .35em; min-height: 36px; padding: 6px 14px; border: 1px solid var(--c-line-strong); border-radius: var(--radius-pill); background: #fff; color: var(--c-ink); font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; }
a.chip:hover, label.chip:hover { border-color: var(--c-ink); color: var(--c-ink); }
.chip--active, .chip[aria-current], .pills__input:checked + .chip { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
a.chip--active:hover, .chip[aria-current]:hover { color: #fff; }
.chip--category, .chip--type { min-height: 0; padding: 2px 8px; border: 0; border-radius: var(--radius-sm); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.chip--category { background: transparent; padding-left: 0; color: var(--c-red); }
.chip--category.chip--featured, .chip--category.chip--featured:hover { padding: 2px 8px; background: #6d28d9; color: #fff; } /* Featured Articles: purple, as on the old site (white on it: 7.1:1) */
a.chip--category:hover { color: var(--c-red-dark); text-decoration: underline; }
.chip--type { background: var(--c-bg-muted); color: var(--c-muted); }
.chip--premium { background: #fff8db; border-color: #e6c94f; }
.chip--official { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.chip__count { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; padding: 0 .35em; border-radius: var(--radius-pill); background: var(--c-red); color: #fff; font-size: .75em; }
.chips-nav { position: relative; }

/* Cards */
.card { position: relative; display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.card__media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--c-bg-soft); aspect-ratio: 3 / 2; }
.card__media img, .card__media .img-ph { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: inherit; transition: transform .3s; }
.card:hover .card__media img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .card:hover .card__media img { transform: none; } }
.card__body { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.card__kicker { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); align-items: center; position: relative; z-index: 2; }
.card__title { margin: 0; font-size: var(--fs-lg); line-height: 1.3; }
.card__title a { color: var(--c-ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__title a:hover { color: var(--c-red); }
.card__title a:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--c-focus); outline-offset: 4px; border-radius: var(--radius); }
.card:has(.card__kicker a:focus-visible) { outline: none; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3em; margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
.card__meta .icon { color: var(--c-subtle); }
.card__author { font-weight: 600; color: var(--c-text); }
.card__excerpt { margin: 0; color: var(--c-muted); font-size: .9375rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card--lead .card__title { font-size: var(--fs-2xl); }
.card--lead .card__excerpt { font-size: var(--fs-md); -webkit-line-clamp: 4; line-clamp: 4; }
.card--list { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--sp-3) var(--sp-4); align-items: start; }
.card--list .card__media { aspect-ratio: 1; }
.card--list .card__excerpt { -webkit-line-clamp: 2; line-clamp: 2; }
@media (min-width: 768px) {
	.card--list { grid-template-columns: 240px minmax(0, 1fr); }
	.card--list .card__media { aspect-ratio: 3 / 2; }
	.card--list .card__excerpt { -webkit-line-clamp: 3; line-clamp: 3; }
}
@media (max-width: 599.98px) { .card--list .card__title { font-size: var(--fs-md); } .card--list .card__excerpt { display: none; } }
.card--directory .card__media--square, .card--directory .card__media { aspect-ratio: 1; }
@media (min-width: 768px) { .card--directory { grid-template-columns: 160px minmax(0, 1fr); } }
.fit-contain .card__media { background: #fff; border: 1px solid var(--c-line); }
.fit-contain .card__media img { object-fit: contain; padding: 8px; }
.card--compact { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.card--compact .card__media { aspect-ratio: 1; border-radius: var(--radius-sm); }
.card--compact .card__title { font-size: var(--fs-base); }
.card--compact .card__kicker { display: none; }
.card--text { gap: var(--sp-1); }
.card--text .card__title { font-size: var(--fs-base); }

/* Post grids / lists */
.post-grid { display: grid; gap: var(--sp-5); margin: 0 0 var(--sp-5); padding: 0; list-style: none; grid-template-columns: minmax(0, 1fr); }
.post-grid > li { min-width: 0; }
@media (min-width: 600px) { .post-grid--card { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
	.post-grid--card.post-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.post-grid--card.post-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.layout--sidebar .post-grid--card.post-grid--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.post-grid__item--lead { grid-column: 1 / -1; }
@media (min-width: 1024px) {
	.post-grid--hero { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.post-grid--hero .post-grid__item--lead { grid-column: span 2; grid-row: span 2; }
	.post-grid--hero .post-grid__item--lead .card__media { aspect-ratio: 4 / 3; }
}
.post-grid--text, .post-grid--compact { gap: var(--sp-4); }
.post-grid--text > li + li { padding-top: var(--sp-3); border-top: 1px solid var(--c-line); }
.post-grid__ad, .post-list__ad { grid-column: 1 / -1; list-style: none; }
.post-list { margin: 0 0 var(--sp-5); padding: 0; list-style: none; }
.post-list__item { padding: var(--sp-4) 0; border-bottom: 1px solid var(--c-line); }
.post-list__item:first-child { padding-top: 0; }
.post-list .card--lead { padding-bottom: var(--sp-3); }
.post-list__ad { padding: var(--sp-4) 0; border-bottom: 1px solid var(--c-line); }

/* Tiles (square, featured races / vruns / notebooks) */
.tile { position: relative; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.tile__media { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: var(--radius); background: var(--c-bg-soft); }
.tile__media img, .tile__media .img-ph { width: 100%; height: 100%; object-fit: cover; }
.tile__chip { position: absolute; left: var(--sp-2); bottom: var(--sp-2); right: var(--sp-2); width: fit-content; max-width: calc(100% - 2 * var(--sp-2)); padding: 3px 8px; border-radius: var(--radius-sm); background: rgba(0,0,0,.82); color: #fff; font-size: var(--fs-xs); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__chip--open { background: var(--c-green); }
.tile__badges { display: flex; flex-wrap: wrap; gap: var(--sp-1); position: relative; z-index: 2; }
.tile__title { margin: 0; font-size: var(--fs-md); line-height: 1.3; }
.tile__title a { color: var(--c-ink); text-decoration: none; }
.tile__title a:hover { color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--jrl-gold-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; } /* never red on races (R1) */
.tile__meta { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
.tile:focus-within { outline: 3px solid var(--c-focus); outline-offset: 3px; border-radius: var(--radius); }
.tile__title a:focus-visible { outline: none; }
.tile-grid { display: grid; gap: var(--sp-4); margin: 0 0 var(--sp-5); padding: 0; list-style: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .layout--full .tile-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Race / event rows */
.race-list { margin: 0 0 var(--sp-5); padding: 0; list-style: none; }
.race-list > li + li { border-top: 1px solid var(--c-line); }
/* Rows: a full 1px border (transparent until hover) and the card radius. Never a one-side stripe (R2),
   never red (R1: red reads "cancelled"). Featured (owner, 27 Nov 2026): a full 1px gold hairline + the
   Featured badge + a thin gold ring on the date badge; NO background tint (rows and cards site-wide). */
.race-card { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: start; padding: var(--sp-4) var(--sp-2) var(--sp-4) var(--sp-3); border: 1px solid transparent; border-radius: var(--radius); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.race-card:hover, .race-card:focus-within { border-color: var(--c-line); background: #fcfcfc; }
.race-card.is-featured { border-color: var(--jrl-gold-border); background: none; }
.race-card.is-featured:hover, .race-card.is-featured:focus-within { border-color: var(--jrl-gold-accent); background: none; box-shadow: 0 1px 6px rgba(122,86,0,.12); }
.race-card.is-featured .date-badge { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--jrl-gold-border); } /* thin gold ring, white gap */
.race-list > li:has(> .race-card.is-featured), .race-list > li:has(> .race-card.is-featured) + li { border-top-color: transparent; } /* the gold hairline replaces the row rules around it */
.race-card.is-past { opacity: .85; }
.race-card.is-past .date-badge { background: var(--c-bg-soft); color: var(--c-muted); }
@media (min-width: 768px) { .race-card { grid-template-columns: 76px minmax(0, 1fr) 96px; gap: var(--sp-4); } }
.race-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.race-card__badges { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.race-card__title { margin: 0; font-size: var(--fs-lg); line-height: 1.3; }
.race-card__title a { color: var(--c-ink); text-decoration: none; }
.race-card__title a:hover { color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--jrl-gold-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; } /* never red (R1) */
/* Meta lines: icon + text on one line, long text wraps next to the icon (every race-card variant:
   calendars, race database, vrun rows, related). */
.race-card__place, .race-card__dist { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: .4em; margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
.race-card__place .icon, .race-card__dist .icon { color: var(--c-subtle); }
.race-card__place > .icon, .race-card__dist > .icon { flex: none; align-self: auto; margin-top: .2em; }
.race-card__place > span, .race-card__dist > span { min-width: 0; overflow-wrap: anywhere; }
.race-card__country { display: inline-flex; flex: none; align-items: center; font-weight: 700; color: var(--c-text); white-space: nowrap; } /* never broken mid-word: the venue shrinks / wraps instead */
/* Phones, rows that print a country (all-countries calendar, race DB, search): as a nowrap flex row the
   venue span was the only item that could shrink, so next to a thumbnail it broke one syllable per
   line ("Cha / ngi / Poin / t"). Inline flow instead: the venue wraps normally, the country moves to
   the next line as one unit. */
@media (max-width: 599.98px) {
	.race-card__place:has(> .race-card__country) { display: block; position: relative; padding-left: calc(1em + .4em); }
	.race-card__place:has(> .race-card__country) > .icon { position: absolute; left: 0; top: 0; }
}
.race-card__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-1); }
@media (max-width: 479.98px) { .race-card__actions .btn { flex: 1 1 100%; } }
.race-card__thumb { display: block; width: 64px; }
.race-card__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; }
@media (min-width: 768px) { .race-card__thumb { width: 96px; } }
.race-card--compact { grid-template-columns: 56px minmax(0, 1fr); padding: var(--sp-3) 0; border: 0; }
.race-card--compact .race-card__badges { grid-column: 2; }
.race-card--compact .race-card__title { font-size: var(--fs-base); }
.race-card--compact:hover { background: none; }
/* Featured compact rows (home widget, related lists): same gold hairline box as calendar rows. */
.race-card--compact.is-featured { padding: var(--sp-3); border: 1px solid var(--jrl-gold-border); }
.race-card--compact .race-card__actions .btn { flex: 0 0 auto; }
.race-card--db .race-card__title { font-size: var(--fs-md); }
.date-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; padding: 6px 4px; border-radius: var(--radius); background: var(--c-ink); color: #fff; text-align: center; line-height: 1.1; }
.date-badge__dow, .date-badge__label { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.date-badge__day { font-size: 1.625rem; font-weight: 800; letter-spacing: -.02em; }
.date-badge__mon { font-size: .75rem; font-weight: 600; text-transform: uppercase; white-space: nowrap; }
/* Another year: "JAN ’27" on the month line (jrl_date_badge_mon()), never a 4th row, so every badge keeps 3 rows and one height. */
.date-badge__yr { font-size: .85em; font-weight: 700; letter-spacing: .01em; opacity: .85; }
.date-badge--tbc { background: var(--c-bg-muted); color: var(--c-muted); }
.date-badge--tbc .date-badge__day { font-size: 1rem; }
.date-badge--open { background: var(--c-green); }
.race-card--compact .date-badge { min-height: 52px; }
.race-card--compact .date-badge__day { font-size: 1.25rem; }
/* Linked date badge (jrl_date_badge_html()): a mouse / touch target to the same URL as the title
   (tabindex -1 + aria-hidden; the title is the accessible link). Hover = the title's hover (ink text,
   gold underline) + a gold ring on the badge. Never red (R1). */
.date-badge-link { display: block; min-width: 0; border-radius: var(--radius); color: inherit; text-decoration: none; cursor: pointer; }
.date-badge-link:hover, .date-badge-link:focus { color: inherit; text-decoration: none; }
.date-badge-link:hover > .date-badge { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--jrl-gold-accent); }
.race-card:has(> .date-badge-link:hover) .race-card__title a { text-decoration: underline; text-decoration-color: var(--jrl-gold-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.month-head { position: sticky; top: var(--header-stick); z-index: 3; margin: var(--sp-5) 0 0; padding: var(--sp-2) var(--sp-3); background: var(--c-ink); color: #fff; font-size: var(--fs-md); border-radius: var(--radius-sm); }

/* Facts list */
.facts { display: grid; gap: 0; margin: 0 0 var(--sp-5); border-top: 1px solid var(--c-line); }
.facts__row { display: grid; grid-template-columns: minmax(170px, 34%) minmax(0, 1fr); gap: var(--sp-3); align-items: baseline; padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-line); } /* label and value share the first baseline (owner, 29 Nov 2026) */
.facts dt { display: flex; align-items: baseline; gap: .4em; color: var(--c-muted); font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; } /* 170px label column: two-word labels ("Event management", "Registration closes") stay on one line; a label that still wraps keeps tight lines */
.facts dt .icon { flex: none; align-self: flex-start; margin-top: .12em; color: var(--c-subtle); } /* on the first line of the label, also when it wraps */ /* red only for CTAs and the logo (R1) */
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
@media (min-width: 768px) { .facts--grid { grid-template-columns: 1fr 1fr; column-gap: var(--sp-6); } }
.facts--stack .facts__row { grid-template-columns: 1fr; gap: 2px; }
.facts--inline { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); border: 0; }
.facts--inline .facts__row { display: flex; gap: .4em; padding: 0; border: 0; }
.facts-title { font-size: var(--fs-xl); }
:is(.content-section, .vrun-section, .dir-section) > h2 + .facts { border-top: 0; } /* the section heading already draws the hairline: no double line */

/* Page header */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin: 0 0 var(--sp-5); }
.page-header__main { flex: 1 1 420px; min-width: 0; }
.page-title { margin: 0; font-size: var(--fs-3xl); }
.page-header__subtitle { margin: var(--sp-2) 0 0; max-width: 70ch; color: var(--c-muted); font-size: var(--fs-base); line-height: 1.5; } /* body size (was --fs-lg, read too large under the H1; owner, 29 Nov 2026) */
.page-header__intro { margin-top: var(--sp-3); max-width: 70ch; color: var(--c-muted); }
.page-header__intro p:last-child { margin-bottom: 0; }
.page-header__content { margin-top: var(--sp-4); }
.page-header__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.page-header--center { justify-content: center; text-align: center; }

/* Panels (sidebar boxes) */
.panel { padding: var(--sp-5); border-radius: var(--radius-lg); background: var(--c-bg-soft); }
.panel__title { margin: 0 0 var(--sp-3); font-size: var(--fs-md); text-transform: uppercase; letter-spacing: .06em; }
.panel__title a { color: inherit; text-decoration: none; }
.panel > :last-child { margin-bottom: 0; }
.widget__title { margin: 0 0 var(--sp-3); font-size: var(--fs-md); }
.race-count { text-align: center; }
.race-count__lead { margin: 0; color: var(--c-muted); }
.race-count__num { margin: var(--sp-1) 0; font-size: 2.5rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.race-count__num a { color: var(--c-ink); text-decoration: none; }
.race-count .btn { margin-top: var(--sp-4); }
/* Compact (event singles, owner 27 Nov 2026): one linked line + an ink text link; no red button. */
.race-count--compact { text-align: left; }
.race-count--compact p { margin: 0; }
.race-count__line { font-size: var(--fs-sm); }
.race-count__line a { color: var(--c-ink); text-decoration: none; }
.race-count__line a:hover { text-decoration: underline; }
.race-count--compact .race-count__num { margin: 0; font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.01em; }
.race-count__tickets a { display: inline-flex; align-items: center; gap: .3em; min-height: var(--tap); color: var(--c-ink); font-size: var(--fs-sm); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.race-count__tickets a:hover { text-decoration-thickness: 2px; }
.newsletter-box p { color: var(--c-muted); font-size: var(--fs-sm); }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-5); padding: var(--sp-4); border-radius: var(--radius-lg); background: var(--c-bg-soft); }
.filter-bar__fields { display: grid; flex: 1 1 100%; gap: var(--sp-3) var(--sp-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .filter-bar__fields { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.filter { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter > label, .pills legend { font-size: var(--fs-sm); color: var(--c-muted); }
.filter--checkbox { flex-direction: row; align-items: center; gap: var(--sp-2); min-height: var(--tap); }
.filter--checkbox label { font-weight: 600; color: var(--c-text); font-size: var(--fs-base); }
.filter--pills { grid-column: 1 / -1; }
.pills__list { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: 4px; }
.pills__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pills__input:focus-visible + .chip { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.pills .chip { cursor: pointer; }
.filter-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.filter-bar[data-autosubmit] .filter-bar__actions .btn { display: none; }
html:not(.js) .filter-bar[data-autosubmit] .filter-bar__actions .btn, .filter-bar[data-autosubmit] .filter-bar__actions .btn.is-needed { display: inline-flex; }
.filter-bar__reset { display: inline-flex; align-items: center; gap: .3em; font-size: var(--fs-sm); font-weight: 600; }
.filter-panel { margin: 0 0 var(--sp-5); }
.filter-panel__summary { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); padding: 8px 16px; border: 1px solid var(--c-line-strong); border-radius: var(--radius-pill); font-weight: 700; list-style: none; }
.filter-panel__summary::-webkit-details-marker { display: none; }
.filter-panel[open] .filter-panel__summary { margin-bottom: var(--sp-3); background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
@media (min-width: 1024px) { .filter-panel[data-open-desktop][open] > .filter-panel__summary { display: none; } }

/* Pagination */
.pagination { margin: var(--sp-6) 0; }
.pagination__list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.pagination__link { display: inline-grid; place-items: center; min-width: var(--tap); height: var(--tap); padding: 0 10px; border: 1px solid var(--c-line-strong); border-radius: var(--radius); color: var(--c-ink); font-weight: 700; text-decoration: none; }
a.pagination__link:hover { border-color: var(--c-ink); background: var(--c-bg-soft); color: var(--c-ink); }
.pagination__link.is-current { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.pagination__dots { display: inline-grid; place-items: center; min-width: 24px; height: var(--tap); color: var(--c-subtle); }
.my-paginated-posts { margin: var(--sp-5) 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); background: var(--c-bg-soft); }
.my-paginated-posts p { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0; }
.my-paginated-posts a, .my-paginated-posts .post-page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border: 1px solid var(--c-line-strong); border-radius: var(--radius); text-decoration: none; font-weight: 700; }
.my-paginated-posts .current { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }

/* Empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); margin: var(--sp-5) 0; padding: var(--sp-6) var(--sp-4); border: 2px dashed var(--c-line); border-radius: var(--radius-lg); text-align: center; }
.empty-state__icon { color: var(--c-subtle); }
.empty-state__title { margin: 0; font-size: var(--fs-xl); }
.empty-state__text { max-width: 52ch; color: var(--c-muted); }
.empty-state__text p:last-child { margin: 0; }
.empty-state .search-form { width: min(480px, 100%); }
.empty-state .btn-row { justify-content: center; margin: 0; }

/* Photo grids (ACF images, entitlement, medals, maps) */
.gallery-block { margin: 0 0 var(--sp-6); }
.gallery-block__title { font-size: var(--fs-xl); }
.photo-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .photo-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .photo-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.photo-grid--cols-1, .photo-grid--wide { grid-template-columns: minmax(0, 1fr); }
.photo-grid.photo-grid--cols-1:not(.photo-grid--wide) { max-width: 480px; } /* a lone medal / pack photo: larger, but not the full column (owner, 29 Nov 2026) */
.photo-grid__item { margin: 0; min-width: 0; }
.photo-grid__item a { display: block; overflow: hidden; border-radius: var(--radius); background: var(--c-bg-soft); aspect-ratio: 1; }
.photo-grid--wide .photo-grid__item a { aspect-ratio: auto; }
.photo-grid__item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-grid--wide .photo-grid__item img { height: auto; object-fit: contain; }
.photo-grid__item figcaption { margin-top: var(--sp-1); color: var(--c-muted); font-size: var(--fs-sm); }
.photo-grid__ad { grid-column: 1 / -1; }
/* Event singles (race / sports .event-body, virtual run .vrun-body; owner, 27 Nov 2026): entitlement,
   singlet, medal and map photos keep their own aspect ratio (width/height attributes + height:auto):
   no square box, no grey fill, nothing cropped. Items in a row align at the top; the caption sits
   tight under its image, small, muted, left-aligned. */
:is(.event-body, .vrun-body) .photo-grid { align-items: start; }
:is(.event-body, .vrun-body) .photo-grid__item { margin: 0; } /* not the .entry-content figure 1.25em */
:is(.event-body, .vrun-body) .photo-grid__item a { aspect-ratio: auto; background: transparent; border: 0; border-radius: var(--radius-sm); }
:is(.event-body, .vrun-body) .photo-grid__item img { width: 100%; height: auto; object-fit: initial; }
/* One-per-row (fees, race pack, route maps): full width, a tall image stops at 80vh (whole image,
   left-aligned, transparent around it; the lightbox shows it full size). */
:is(.event-body, .vrun-body) .photo-grid--wide .photo-grid__item img { max-height: min(80vh, 760px); object-fit: contain; object-position: left top; }
:is(.event-body, .vrun-body) .photo-grid__item figcaption { margin-top: 6px; font-size: var(--fs-xs); line-height: 1.4; text-align: left; }
/* Image rhythm (owner, 29 Nov 2026): every photo block in a section shares one column width
   (--measure, 720px; route maps keep the full column so they stay legible), sits a clear step below
   the text before it, and the note after it (e.g. "Race apparel by …") a small step below the captions. */
:is(.event-body, .vrun-body) .photo-grid { max-width: var(--measure); }
:is(.event-body, .vrun-body) #route-maps .photo-grid { max-width: none; }
:is(.event-body, .vrun-body) :is(.event-text, p, ul, ol, .btn-row) + .gallery-block { margin-top: var(--sp-4); }
:is(.event-body, .vrun-body) .gallery-block + :is(p, .event-text) { margin-top: var(--sp-3); }

/* Scroller / carousel */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: var(--slide, 80%); gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: var(--sp-2); -webkit-overflow-scrolling: touch; }
.scroller > * { scroll-snap-align: start; min-width: 0; }
.scroller:focus-visible { outline-offset: 4px; }
.carousel { position: relative; margin: var(--sp-5) 0; }
.carousel__title { font-size: var(--fs-lg); }
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-2); }
.carousel__controls .icon-btn { border: 1px solid var(--c-line-strong); border-radius: 50%; color: var(--c-ink); }
.carousel__controls .icon-btn:hover { background: var(--c-bg-soft); }
.carousel__controls .icon-btn[disabled] { opacity: .35; cursor: default; }
.carousel__count { min-width: 4em; color: var(--c-muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; text-align: center; }
.carousel--gallery .scroller { grid-auto-columns: 100%; }
.carousel__item { margin: 0; }
.carousel__item a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--c-bg-soft); }
.carousel__item img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: #111; }
.carousel__item figcaption { margin-top: var(--sp-2); color: var(--c-muted); font-size: var(--fs-sm); }
@media (min-width: 1024px) {
	.carousel--grid .scroller { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
	.carousel--grid .carousel__controls { display: none; }
}

/* Tabs */
.tabs__list { display: flex; gap: var(--sp-1); margin: 0 0 var(--sp-4); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--c-line); }
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__tab { flex: none; padding: var(--sp-2) var(--sp-4); border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; color: var(--c-muted); font-weight: 700; text-decoration: none; white-space: nowrap; }
.tabs__tab:hover { color: var(--c-ink); }
.tabs__tab[aria-selected="true"] { color: #fff; background: var(--c-ink); } /* R1/R2: no red underline */

/* Modal + lightbox (native <dialog>) */
.modal { width: min(640px, calc(100vw - 2 * var(--gutter))); max-height: calc(100dvh - 2 * var(--gutter)); padding: 0; border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(0,0,0,.6); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--c-line); position: sticky; top: 0; background: #fff; }
.modal__title { margin: 0; font-size: var(--fs-lg); }
.modal__close:hover { background: var(--c-bg-soft); }
.modal__body { padding: var(--sp-5); overflow-y: auto; }
.lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); }
.lightbox__count { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; opacity: .85; }
.lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 var(--sp-2); touch-action: pan-y pinch-zoom; }
.lightbox__img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox.is-loading .lightbox__img { opacity: .6; }
.lightbox__caption { margin: 0; padding: var(--sp-3) var(--sp-4) max(var(--sp-4), env(safe-area-inset-bottom)); text-align: center; font-size: var(--fs-sm); line-height: 1.4; color: #e6e6e6; }
.lightbox__caption:empty { padding-bottom: var(--sp-2); }
.lightbox__link, .lightbox__link:visited { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.lightbox__link:hover { color: #fff; text-decoration-thickness: 2px; }
.lightbox .icon-btn { color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255,255,255,.15); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,.45) !important; }
.lightbox__nav--prev { left: var(--sp-2); }
.lightbox__nav--next { right: var(--sp-2); }
.lightbox__nav[hidden] { display: none; }
@media (max-width: 599.98px) { .lightbox__nav { display: none; } }
a.lb-link, .entry-content a:has(> img) { cursor: zoom-in; }

/* Embeds + facades */
.embed { position: relative; width: 100%; margin: 0 0 var(--sp-5); overflow: hidden; border-radius: var(--radius); background: #000; }
.embed--16x9 { aspect-ratio: 16 / 9; }
.embed--4x3 { aspect-ratio: 4 / 3; }
.embed--1x1 { aspect-ratio: 1; }
.embed--9x16 { aspect-ratio: 9 / 16; max-width: 360px; margin-inline: auto; }
.embed iframe, .embed video, .embed > a, .embed > button, .embed object { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt__link { display: block; color: #fff; text-decoration: none; }
.yt__link picture { display: contents; }
.yt__link img { width: 100%; height: 100%; object-fit: cover; }
.yt__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 68px; height: 48px; transform: translate(-50%, -50%); border-radius: 12px; background: var(--c-red); color: #fff; box-shadow: var(--shadow); transition: transform .15s; }
.yt__play .icon { width: 28px; height: 28px; margin-left: 3px; }
.yt__link:hover .yt__play, .yt__link:focus-visible .yt__play { transform: translate(-50%, -50%) scale(1.08); }
.yt__title { position: absolute; left: 0; right: 0; top: 0; padding: var(--sp-3) var(--sp-4); background: linear-gradient(rgba(0,0,0,.65), transparent); font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt__link:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.embed-facade { background: var(--c-bg-muted); }
.embed-facade__btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); border: 0; background: repeating-linear-gradient(45deg, var(--c-bg-soft) 0 12px, var(--c-bg-muted) 12px 24px); color: var(--c-ink); font-weight: 700; }
.embed-facade__btn:hover { color: var(--c-red); }

/* Share block wrapper (jrl-share renders the buttons) */
.share-block { margin: var(--sp-5) 0; }
.share-block__title { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); text-align: center; }
.share-block--top { margin: var(--sp-4) 0; }
.share-block--top .jrl-share { justify-content: flex-start; }

/* Register CTA + sticky bar */
.register-cta { margin: var(--sp-4) 0 var(--sp-5); }
.register-cta__buttons { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
@media (max-width: 479.98px) { .register-cta__buttons .btn { flex: 1 1 100%; } }
.register-cta__note { display: flex; align-items: center; gap: .4em; margin: var(--sp-2) 0 0; color: var(--c-muted); font-size: var(--fs-sm); }
.register-bar { position: fixed; left: 0; right: 0; bottom: var(--bottom-offset); /* includes the AdSense bottom anchor (--jrl-anchor-h) */ z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) var(--gutter); padding-bottom: max(var(--sp-2), env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,.15); }
body.has-share-bar .register-bar { padding-bottom: var(--sp-2); }
.register-bar__title { min-width: 0; font-weight: 700; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.register-bar .btn { flex: none; }
.register-bar__title { flex: 1 1 auto; }
.register-bar__share { flex: none; margin-left: auto; }
@media (min-width: 768px) { .register-bar { display: none !important; } }
/* One fixed layer at the bottom: race / vrun singles switch the jrl-share bar off server side
   (jrl_single_has_register_bar()); this hides it on any other page with a register bar, and with
   jrl-share < 1.3.1. The footer gets room so the bar never covers its last line. */
@media (max-width: 767px) {
	body:has([data-register-bar]) .jrl-share--bar { display: none !important; }
	body.has-share-bar:has([data-register-bar]) { --bottom-offset: var(--jrl-anchor-h, 0px); }
	body:has(.register-bar:not([hidden])) .site-footer__bottom, body.register-bar-on .site-footer__bottom { padding-bottom: calc(var(--btn-h) + var(--sp-5) + var(--bottom-offset)); }
}

/* Event header, "Identity row" (pass 6, owner decision 27 Nov 2026) =========
   template-parts/components/event-header.php on race, virtual-run and sports-event singles.
   Row 1: logo frame (fixed height, width from the logo's ratio via --event-logo-ar, capped at 40%)
   + title block. Then the event key card (.event-key, below) and the quiet links.
   Neutral colours only (R1), full borders only (R2). */
.event-head { margin: 0 0 var(--sp-4); }
.event-head__identity { display: flex; align-items: flex-start; gap: var(--sp-3); }
.event-logo { --event-logo-h: 72px; flex: none; height: var(--event-logo-h); aspect-ratio: var(--event-logo-ar, 1); max-width: 40%; min-width: var(--tap); }
.event-logo .logo-frame__link { display: block; width: 100%; height: 100%; border-radius: var(--radius-sm); }
.event-logo .logo-frame.logo-frame--hero { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: var(--radius-sm); }
.event-logo .logo-frame.logo-frame--hero .logo-frame__img { --logo-pad: 0; } /* no inner gap (owner, 29 Nov 2026; was 6px) */
/* From 480px the frame shrink-wraps the image (height capped at --event-logo-h, width at 40% of the row),
   so the border sits tight on the logo for every ratio: a fixed-ratio box left a sliver beside it. */
@media (min-width: 480px) {
	.event-logo { height: auto; aspect-ratio: auto; min-width: 0; line-height: 0; }
	.event-logo .logo-frame__link { width: auto; height: auto; }
	.event-logo .logo-frame.logo-frame--hero { display: block; width: auto; height: auto; }
	.event-logo .logo-frame.logo-frame--hero .logo-frame__img { width: auto; height: auto; max-width: 100%; max-height: var(--event-logo-h); object-fit: fill; }
}
.event-head__main { flex: 1 1 auto; min-width: 0; }
.event-head__title { margin: 0; overflow-wrap: anywhere; }
.event-head__subtitle { margin: var(--sp-1) 0 0; color: var(--c-muted); font-size: var(--fs-md); }
.event-head__badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); }
.event-head__share { margin-top: var(--sp-2); }
@media (min-width: 768px) {
	.event-head__identity { gap: var(--sp-4); }
	.event-logo { --event-logo-h: 112px; } /* was 88px; larger on request (owner, 29 Nov 2026) */
	.event-head.has-logo .event-head__main { align-self: center; }
}

.event-head > .event-next { margin: var(--sp-4) 0 0; }

/* Event key card (owner, 27 Nov 2026): one white rectangle under the identity row, max 680px,
   full width on phones. Full hairline + radius 14px + soft shadow (no side stripe, R2). Inside:
   status band (tinted strip, never red, R1), facts grid (2 columns, small icons), action area
   (CTA / follow-up) after a hairline. Quiet links (.event-head__links) can sit under the card; the
   event singles pass none since 27 Nov 2026 (calendar links lower down, "Suggest an edit" = .event-edit). */
.event-key { max-width: 680px; margin: var(--sp-4) 0 0; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -16px rgba(0,0,0,.22); }

.event-key__status { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--c-line); background: #f1f1f1; color: var(--c-text); }
.event-key__status-icon { flex: none; margin-top: 2px; color: var(--c-muted); }
.event-key__status-body { flex: 1 1 auto; min-width: 0; margin: 0; line-height: 1.4; }
.event-key__status-label { display: block; color: var(--c-ink); font-size: var(--fs-base); font-weight: 800; }
.event-key__status-text { display: block; margin-top: 2px; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.event-key__status a { color: inherit; text-decoration: underline; }
/* Cancelled: dark neutral band, white text (14:1). */
.event-key__status--cancelled { border-bottom-color: var(--jrl-status-dark); background: var(--jrl-status-dark); color: #ececec; }
.event-key__status--cancelled .event-key__status-label, .event-key__status--cancelled .event-key__status-icon { color: #fff; }
/* Postponed / new date: amber band (label #6b4a00, text #4a3300 on #fff4d6: AA). */
.event-key__status--postponed, .event-key__status--rescheduled { border-bottom-color: #f0d48a; background: #fff4d6; color: #4a3300; }
.event-key__status--postponed .event-key__status-label, .event-key__status--rescheduled .event-key__status-label, .event-key__status--postponed .event-key__status-icon, .event-key__status--rescheduled .event-key__status-icon { color: #6b4a00; }
/* Registration closed, past, update: neutral grey band (defaults above). */

.event-key__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-4); margin: 0; padding: var(--sp-4); }
.event-key__fact { position: relative; min-width: 0; }
.event-key__fact--wide, .event-key__fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
.event-key__label { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; color: var(--c-muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; line-height: 1.3; text-transform: uppercase; }
.event-key__icon { display: inline-flex; flex: none; color: var(--c-muted); }
.event-key__icon .icon { width: 16px; height: 16px; }
.event-key__value { margin: 0; color: var(--c-ink); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.event-key__fact.is-void .event-key__value { color: var(--c-muted); }
.event-key__fact.is-void s { text-decoration-thickness: 1.5px; }
.event-key .event-strip__main, .event-key .event-strip__sub { display: block; }
.event-key .event-strip__sub { margin-top: 2px; color: var(--c-muted); font-size: var(--fs-sm); font-weight: 500; }
.event-key .event-strip__link { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--fs-sm); font-weight: 600; }
.event-key .sports-chips { margin: 2px 0 0; }
@media (max-width: 479.98px) { .event-key__facts { grid-auto-flow: row dense; } }
/* Badges row at the top of the key card (moved from under the H1, owner 29 Nov 2026). */
.event-key__badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-4) var(--sp-4) 0; }
.event-key__badges + .event-key__facts { padding-top: var(--sp-3); }
@media (min-width: 600px) {
	.event-key__badges { padding: var(--sp-5) var(--sp-5) 0; }
	.event-key__badges + .event-key__facts { padding-top: var(--sp-4); }
}
@media (min-width: 600px) {
	.event-key__status { padding: var(--sp-3) var(--sp-5); }
	.event-key__facts { gap: var(--sp-5) var(--sp-5); padding: var(--sp-5); }
	/* Wider screens: a 2 x 2 grid; only a lone last fact spans both columns. */
	.event-key__fact--wide { grid-column: auto; }
	.event-key__fact.has-icon { padding-left: 46px; }
	.event-key__fact.has-icon .event-key__icon { position: absolute; top: 0; left: 0; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--c-bg-soft); color: var(--c-ink); }
	.event-key__fact.has-icon .event-key__icon .icon { width: 18px; height: 18px; }
	.event-key .event-strip__link { min-height: 0; margin-top: 2px; }
}

.event-key__action { padding: var(--sp-4); }
.event-key__facts + .event-key__action { border-top: 1px solid var(--c-line); }
.event-key .register-cta { margin: 0; }
.event-key .register-cta__note { align-items: flex-start; margin: var(--sp-2) 0 0; }
.event-key .register-cta__note .icon { flex: none; margin-top: 2px; }
.event-key .event-custom-buttons { margin: var(--sp-2) 0 0; }
.event-key__follow { margin: 0; }
.event-key .event-next { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.event-key .event-next__title { font-size: var(--fs-md); }
/* Phones: full-width buttons. */
@media (max-width: 599.98px) {
	.event-key .register-cta__buttons .btn, .event-key .event-custom-buttons .btn, .event-key__follow .btn, .event-key .event-next__buttons .btn { flex: 1 1 100%; width: 100%; justify-content: center; }
}
@media (min-width: 600px) {
	.event-key__action { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
	/* Button(s) and the "Registration closes … · Tickets via JustRunLah!" note on one line. */
	.event-key .register-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
	.event-key .register-cta__note { margin: 0; }
}

.event-head__links { display: flex; flex-wrap: wrap; gap: 0 var(--sp-4); margin: var(--sp-2) 0 0; }
/* "Spot something out of date? Suggest an edit": last line of an event body (jrl_event_suggest_edit()).
   Small and muted; the link is muted too, with a faint hairline underline (so it still reads as a
   link without relying on colour, WCAG 1.4.1) that turns solid ink on hover / focus. The line box
   gives the link a 44px-high tap area without extra visual weight. */
.event-edit, .entry-content .event-edit { margin: var(--sp-6) 0 0; color: var(--c-muted); font-size: var(--fs-sm); line-height: var(--tap); }
.event-edit a, .entry-content .event-edit a, .entry-content .event-edit a:visited { display: inline-block; color: inherit; text-decoration: underline; text-decoration-color: var(--c-line-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.event-edit a:hover, .event-edit a:focus-visible, .entry-content .event-edit a:hover { color: var(--c-ink); text-decoration-color: currentColor; text-decoration-thickness: 1px; }
.vrun-facts__soon { color: var(--jrl-gold); font-weight: 700; }
@media (max-width: 479.98px) { .event-custom-buttons .btn { flex: 1 1 100%; } }

/* Race details section (race type, event management, registration close) at the top of the body. */
.event-details__facts { margin: 0; }

/* Sticky section nav (template-parts/components/section-nav.php, main.js "Section nav") ======
   Plain anchor list without JS. White bar, one full-width hairline under it (a rule, not a stripe
   on a box: R2), ink pill for the current section, 44px targets, sideways scroll on phones.
   Sticks under the site header; scroll-padding keeps jump targets below header + nav. */
html:has(.section-nav) { scroll-padding-top: calc(var(--header-stick) + var(--section-nav-h, 53px) + 12px); }
.section-nav { position: sticky; top: var(--header-stick); z-index: 40; margin: 0 calc(-1 * var(--gutter)) var(--sp-5); padding: 4px var(--gutter); background: #fff; border-bottom: 1px solid var(--c-line); }
.section-nav__list { display: flex; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: var(--gutter); }
.section-nav__list::-webkit-scrollbar { display: none; }
.section-nav__item { flex: none; }
.section-nav__link { display: inline-flex; align-items: center; gap: .4em; min-height: var(--tap); padding: 0 14px; border-radius: var(--radius-pill); color: var(--c-ink); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-nav__link:hover { background: var(--c-bg-soft); color: var(--c-ink); }
.section-nav__link:focus-visible { outline: 3px solid var(--c-focus); outline-offset: -3px; }
.section-nav__link[aria-current] { background: var(--c-ink); color: #fff; }
.section-nav__count { min-width: 1.5em; padding: 1px 6px; border-radius: var(--radius-pill); background: var(--c-bg-muted); color: var(--c-ink); font-size: var(--fs-xs); font-weight: 700; text-align: center; }
.section-nav__link[aria-current] .section-nav__count { background: #fff; color: var(--c-ink); }
.section-nav.is-stuck { box-shadow: 0 6px 12px -10px rgba(0,0,0,.35); }
@media (min-width: 1024px) { .section-nav { margin-inline: 0; padding-inline: 0; } }
@media print { .section-nav { display: none !important; } }

/* Past race → next edition banner (under the identity row, inline only: no sticky bar on past races).
   Gold-tinted panel with a full hairline border (R1 no red, R2 no side stripe). */
.event-next { margin: 0 0 var(--sp-4); padding: var(--sp-4); border: 1px solid var(--jrl-gold-border); border-radius: var(--radius); background: var(--jrl-gold-tint); }
.event-next__kicker { display: flex; align-items: center; gap: .35em; margin: 0 0 var(--sp-1); color: var(--jrl-gold); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.event-next__title a { color: var(--c-ink); }
.event-next__title a:hover { color: var(--c-ink); text-decoration-color: var(--jrl-gold-accent); text-decoration-thickness: 2px; }
.event-next__title { margin: 0; font-size: var(--fs-lg); font-weight: 700; line-height: var(--lh-tight); }
.event-next__buttons { margin: var(--sp-3) 0 0; }
@media (max-width: 479.98px) { .event-next__buttons .btn { flex: 1 1 100%; } }

/* Event status banner under the H1 (jrl_event_status_banner(); D4). Never red: cancelled is a dark
   neutral label, closed amber, postponed / new date slate, other notes neutral. Full 1px border +
   tint, no side stripe (R2). */
.event-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35em .6em; margin: var(--sp-3) 0 0; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--c-line-strong); border-radius: var(--radius); background: var(--c-bg-soft); color: var(--c-text); font-size: var(--fs-sm); line-height: 1.45; }
.event-status__icon { flex: none; align-self: center; }
.event-status__label { flex: none; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: var(--fs-xs); }
.event-status__text { flex: 1 1 14em; min-width: 0; overflow-wrap: anywhere; }
.event-status--cancelled { border-color: var(--jrl-status-dark); background: #f1f1f1; }
.event-status--cancelled .event-status__label { padding: 2px 8px; border-radius: var(--radius-sm); background: var(--jrl-status-dark); color: #fff; }
.event-status--closed { border-color: var(--jrl-gold-border); background: #fffaf0; }
.event-status--closed .event-status__label, .event-status--closed .event-status__icon { color: #6b4a00; }
.event-status--postponed, .event-status--rescheduled { border-color: #c9d6e4; background: var(--jrl-status-slate-bg); }
.event-status--postponed .event-status__label, .event-status--rescheduled .event-status__label, .event-status--postponed .event-status__icon, .event-status--rescheduled .event-status__icon { color: var(--jrl-status-slate); }
.event-status--info .event-status__label, .event-status--info .event-status__icon { color: var(--c-muted); }
.event-status a { color: inherit; text-decoration: underline; }

/* Compact share (jrl-share compact mode) on race / vrun / event singles: header slot .event-head__share (above) */
.event-share { margin: var(--sp-5) 0; padding-top: var(--sp-4); border-top: 1px solid var(--c-line); }

/* Featured grid ("Featured events", template-parts/races/featured-grid.php): gold accents (D2),
   heading + "sell tickets" link centred on one line on desktop and stacked on phones, tiles in a
   row equal height with the Tickets pill pinned to the bottom so all pills line up. Selectors are
   qualified (section.cal-featured) to win over templates/races.css, which loads later. */
section.cal-featured .cal-featured__head { align-items: center; border-bottom-color: var(--jrl-gold-border); }
section.cal-featured .cal-featured__title .icon { color: var(--jrl-gold-accent); }
section.cal-featured .cal-featured__sell { min-height: var(--tap); }
@media (max-width: 599.98px) {
	section.cal-featured .cal-featured__head { flex-direction: column; align-items: flex-start; gap: 0; }
	section.cal-featured .cal-featured__sell { margin-left: -2px; }
}
section.cal-featured .scroller__item { display: flex; }
section.cal-featured .scroller__item > .tile { flex: 1 1 auto; width: 100%; }
section.cal-featured .tile__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--sp-1); }
section.cal-featured .tile__meta { margin-bottom: var(--sp-2); }
section.cal-featured .tile__tickets { margin-top: auto; align-self: flex-start; }

/* Sidebar Register card (race / vrun singles, desktop sticky column) */
.event-card { margin: 0 0 var(--sp-5); padding: var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-bg); }
.event-card__title { margin: 0 0 var(--sp-1); font-size: var(--fs-md); font-weight: 700; line-height: var(--lh-tight); overflow-wrap: anywhere; }
.event-card__meta { margin: 0 0 var(--sp-3); color: var(--c-muted); font-size: var(--fs-sm); }
.event-card .btn { width: 100%; justify-content: center; }
.event-card .btn + .btn { margin-top: var(--sp-2); }
@media (max-width: 1023.98px) { .event-card { display: none; } }

/* Brand elements (README "Brand elements"). Sparingly; never on race / event rows (R1).
   - .jrl-mark: inline burst mark (jrl_brand_mark()), strokes in the logo reds.
   - .jrl-loader: inline loader (jrl_loader(), window.jrlLoading()): strokes pulse in sequence
     (1.1s, staggered 0 / .15 / .3s); static under prefers-reduced-motion. Never full screen (R6).
   - .h-accent: burst mark before any heading (section heads get it automatically).
   - .bg-speed: faint diagonal speed lines at the burst angle for promo bands, page headers, footer
     (.bg-speed--dark on black / ink backgrounds).
   - CTA focus accent: pulse-gradient ring on primary CTAs (register block, sticky bar, sidebar card). */
.jrl-mark { display: inline-block; flex: none; width: 1.25em; height: 1.25em; vertical-align: middle; overflow: visible; }
.jrl-mark__s--1 { fill: var(--jrl-pulse); }
.jrl-mark__s--2 { fill: var(--jrl-pulse-2); }
.jrl-mark__s--3 { fill: var(--jrl-pulse-3); }
.jrl-mark--mono .jrl-mark__s { fill: currentColor; }
.jrl-loader { display: inline-flex; align-items: center; gap: .6em; color: var(--c-muted); font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; }
.jrl-loader--block { display: flex; justify-content: center; width: 100%; padding: var(--sp-5) var(--sp-3); }
.jrl-loader--item { list-style: none; }
/* In a button / link (nav-loading.js submit feedback): laid over the label, so the button never
   changes size; the mark takes the button text colour (red strokes would vanish on a red button). */
.is-jrl-loading:is(.btn, button, a) { position: relative; }
:is(.btn, button, a) > .jrl-loader { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; justify-content: center; align-items: center; gap: 0; width: auto; padding: 0; margin: 0; border-radius: inherit; background: var(--btn-bg, transparent); color: currentColor; font-size: inherit; }
:is(.btn, button, a) > .jrl-loader .jrl-mark__s { fill: currentColor; }
.is-jrl-loading:is(.btn, button, a) > :not([data-jrl-loader]) { opacity: 0; }
.jrl-loader--sm .jrl-loader__mark { width: 20px; height: 20px; }
.jrl-loader--md .jrl-loader__mark { width: 36px; height: 36px; }
.jrl-loader__mark .jrl-mark__s { transform-box: fill-box; transform-origin: 100% 100%; }
@media (prefers-reduced-motion: no-preference) {
	.jrl-loader__mark .jrl-mark__s { animation: jrl-pulse 1.1s ease-in-out infinite both; }
	.jrl-loader__mark .jrl-mark__s--2 { animation-delay: .15s; }
	.jrl-loader__mark .jrl-mark__s--3 { animation-delay: .3s; }
}
@keyframes jrl-pulse {
	0%, 100% { opacity: .25; transform: translate(0, 0); }
	45% { opacity: 1; transform: translate(-6%, -4%); }
}
.is-jrl-loading > :not([data-jrl-loader]) { opacity: .5; transition: opacity .15s; } /* the area dims, the page stays usable */
.h-accent::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .4em; vertical-align: -.02em; background: var(--jrl-pulse-grad); -webkit-mask: var(--jrl-burst) no-repeat center / contain; mask: var(--jrl-burst) no-repeat center / contain; }
.bg-speed { background-image: repeating-linear-gradient(var(--jrl-speed-angle), transparent 0 18px, var(--jrl-speed-line, rgba(237,28,36,.06)) 18px 20px); }
.bg-speed--dark { --jrl-speed-line: rgba(255,255,255,.045); }
.register-cta .btn--primary, .register-bar .btn--primary, .event-card .btn--primary { position: relative; }
.register-cta .btn--primary::after, .register-bar .btn--primary::after, .event-card .btn--primary::after {
	content: ""; position: absolute; inset: -5px; padding: 2px; border-radius: calc(var(--btn-radius) + 5px); background: var(--jrl-pulse-grad); opacity: 0; pointer-events: none; transition: opacity .15s;
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.register-cta .btn--primary:focus-visible, .register-bar .btn--primary:focus-visible, .event-card .btn--primary:focus-visible { outline: 2px solid transparent; }
.register-cta .btn--primary:focus-visible::after, .register-bar .btn--primary:focus-visible::after, .event-card .btn--primary:focus-visible::after { opacity: 1; }
@media (forced-colors: active) { .register-cta .btn--primary:focus-visible, .register-bar .btn--primary:focus-visible, .event-card .btn--primary:focus-visible { outline: 3px solid CanvasText; } }

/* Promo banner */
.promo-banner { margin: var(--sp-4) 0; }
.promo-banner a { display: block; border-radius: var(--radius); overflow: hidden; }
.promo-banner img { display: block; width: 100%; height: auto; }

/* Search form */
.search-form { display: flex; gap: var(--sp-2); }
.search-form__input { flex: 1 1 auto; min-width: 0; }
.search-form__btn { flex: none; }
.search-again { margin: 0 0 var(--sp-5); max-width: 560px; }

/* Callout / stat / media-text / checklist (TagDiv compat + reusable) */
.callout { margin: var(--sp-5) 0; padding: var(--sp-5); border-radius: var(--radius-lg); background: var(--c-ink); color: #eee; }
.callout__title { color: #fff; font-size: var(--fs-xl); }
.callout a:not(.btn) { color: var(--c-red-on-dark); }
.callout .btn { margin-top: var(--sp-2); }
.stat { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); padding: var(--sp-5) var(--sp-3); border-radius: var(--radius-lg); background: var(--c-bg-soft); text-align: center; }
.stat__num { font-size: var(--fs-3xl); font-weight: 800; color: var(--c-red); letter-spacing: -.02em; line-height: 1.05; }
.stat__label { color: var(--c-muted); font-weight: 600; }
.media-text { display: grid; gap: var(--sp-4); align-items: center; margin: 0 0 var(--sp-6); }
@media (min-width: 768px) { .media-text { grid-template-columns: 1fr 1fr; gap: var(--sp-6); } .media-text--flip .media-text__media { order: 2; } .media-text--noimg { grid-template-columns: 1fr; } }
.media-text__media img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.media-text__body > :last-child { margin-bottom: 0; }
.entry-content .media-text__body { margin: 0; color: inherit; font-size: inherit; line-height: inherit; }
.checklist { margin: 0 0 var(--sp-5); padding: 0; list-style: none; }
.checklist li { display: flex; gap: var(--sp-2); padding: var(--sp-2) 0; }
.checklist .icon { margin-top: .2em; color: var(--c-green); }
.quote { margin: 0 0 var(--sp-2); }
.quote-by { color: var(--c-muted); font-weight: 600; }
.section-title { margin-top: var(--sp-6); }
.section-sub { color: var(--c-muted); }

/* Article (single post) */
.entry-header { margin: 0 0 var(--sp-5); }
.entry-header__cats { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin-bottom: var(--sp-3); }
.entry-title { margin: 0; font-size: var(--fs-3xl); line-height: 1.15; }
.entry-subtitle { margin: var(--sp-3) 0 0; color: var(--c-muted); font-size: var(--fs-md); font-style: italic; line-height: 1.5; } /* legacy TagDiv subtitle: small and italic, as on the old site */
/* Byline: name at body size, then the credential and the date line at one smaller size and one line height (owner, 27 Nov 2026: three sizes in three lines looked uneven). */
.byline { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); font-size: var(--fs-sm); line-height: 1.4; }
.byline__author { font-size: var(--fs-base); line-height: 1.3; color: var(--c-ink); }
.byline__avatar img { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.byline__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.byline__author a { font-weight: 700; color: var(--c-ink); text-decoration: none; }
.byline__author a:hover { color: var(--c-red); text-decoration: underline; }
.byline__cred { display: block; margin-top: 1px; color: var(--c-muted); font-size: var(--fs-sm); font-weight: 400; line-height: 1.4; }
.byline__meta { color: var(--c-muted); }
.entry-hero { margin: 0 0 var(--sp-4); }
.entry-hero a { display: block; overflow: hidden; border-radius: var(--radius); background: var(--c-bg-soft); }
.entry-hero img { display: block; width: 100%; height: auto; }
.entry-hero figcaption { margin-top: var(--sp-2); color: var(--c-muted); font-size: var(--fs-sm); }
.entry-source { margin: var(--sp-5) 0; color: var(--c-muted); font-size: var(--fs-sm); }
.entry-source span { margin-right: var(--sp-3); }
.entry-tags { margin: var(--sp-6) 0 var(--sp-4); }
.entry-tags__title { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); }
.toc { margin: 0 0 var(--sp-5); padding: var(--sp-4); border-radius: var(--radius); background: var(--c-bg-soft); font-size: var(--fs-sm); }
.toc summary, .toc__title { margin: 0; font-size: var(--fs-sm); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.toc--details[open] summary { margin-bottom: var(--sp-2); }
.toc__list { margin: 0; padding-left: 1.2em; }
.toc__item { margin: 4px 0; }
.toc__item--h3 { margin-left: var(--sp-3); list-style-type: circle; }
.toc a { color: var(--c-text); text-decoration: none; }
.toc a:hover, .toc a.is-active, .toc a[aria-current="true"] { color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--jrl-gold-accent); text-underline-offset: 3px; }
.toc--nav .toc__title { margin-bottom: var(--sp-2); }
.toc--nav { max-height: calc(100vh - var(--header-stick) - 340px); overflow-y: auto; }
@media (min-width: 1024px) { .post-single .toc--details { display: none; } }
.author-box { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--sp-4); margin: var(--sp-6) 0; padding: var(--sp-5); border-radius: var(--radius-lg); background: var(--c-bg-soft); }
.author-box__img img { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.author-box__name { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.author-box__name a { color: var(--c-ink); text-decoration: none; }
.author-box__cred { margin: 0 0 var(--sp-2); color: var(--c-muted); font-size: var(--fs-sm); }
.author-box__bio { font-size: .9375rem; color: var(--c-text); }
.author-box__bio p:last-child { margin-bottom: 0; }
.author-box__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-3); }
.prev-next { display: grid; gap: var(--sp-3); margin: var(--sp-6) 0; }
@media (min-width: 600px) { .prev-next { grid-template-columns: 1fr 1fr; } }
.prev-next__link { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--radius); color: var(--c-ink); text-decoration: none; }
.prev-next__link:hover { border-color: var(--c-ink); color: var(--c-ink); }
.prev-next__link--next { text-align: right; align-items: flex-end; grid-column: -2; }
.prev-next__label { display: inline-flex; align-items: center; gap: .3em; color: var(--c-muted); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.prev-next__title { font-weight: 700; line-height: 1.3; }
.related { margin: var(--sp-6) 0; }
.review-box { margin: var(--sp-5) 0; padding: var(--sp-5); border-radius: var(--radius-lg); border: 2px solid var(--c-ink); }
.review-box__title { font-size: var(--fs-lg); }
.review-box__list { margin: 0 0 var(--sp-3); padding: 0; list-style: none; }
.review-box__list li { display: flex; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-line); }
.review-box__avg { margin: 0; font-weight: 800; }
.stars { --pct: calc(var(--rating, 0) / 5 * 100%); display: inline-block; width: 6.2em; height: 1.2em; background: linear-gradient(90deg, var(--c-red) var(--pct), var(--c-line-strong) var(--pct)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cg%3E%3Cpath id='s' d='m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.2-6.2 3.2L7 14.2 2 9.3l6.9-1z'/%3E%3Cuse href='%23s' x='24'/%3E%3Cuse href='%23s' x='48'/%3E%3Cuse href='%23s' x='72'/%3E%3Cuse href='%23s' x='96'/%3E%3C/g%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cg%3E%3Cpath id='s' d='m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.2-6.2 3.2L7 14.2 2 9.3l6.9-1z'/%3E%3Cuse href='%23s' x='24'/%3E%3Cuse href='%23s' x='48'/%3E%3Cuse href='%23s' x='72'/%3E%3Cuse href='%23s' x='96'/%3E%3C/g%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%; }

/* Author archive header */
.author-head { margin: 0 0 var(--sp-5); }
.author-head__cover { margin: 0 0 var(--sp-4); overflow: hidden; border-radius: var(--radius-lg); background: var(--c-bg-soft); aspect-ratio: 16 / 5; }
.author-head__cover-img { width: 100%; height: 100%; object-fit: cover; }
.author-head__main { display: flex; align-items: center; gap: var(--sp-4); }
.author-head__img img { display: block; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: var(--shadow-sm); }
@media (min-width: 768px) { .author-head__img img { width: 120px; height: 120px; } }
.author-head--blogger .author-head__cover + .author-head__main { margin-top: -56px; padding-left: var(--sp-4); }
.author-head__text { min-width: 0; }
.author-head__by { margin: var(--sp-1) 0 0; color: var(--c-muted); font-weight: 600; }
.author-head__count { margin: var(--sp-1) 0 var(--sp-2); color: var(--c-muted); font-size: var(--fs-sm); }
.author-head__quote { margin: var(--sp-4) 0; }
.author-head__bio { margin: var(--sp-4) 0; max-width: 70ch; }
.author-head__facts { margin-top: var(--sp-4); }

/* Comments */
.comments { margin: var(--sp-7) 0 0; }
/* Compact discussion (owner, 27 Nov 2026): h2 at h3 size; the form collapsed behind a secondary
   "Write a comment" button (comments.php + main.js), then a white form with a hairline border. */
.comments__title { margin-bottom: var(--sp-3); font-size: var(--fs-lg); }
.comment-list + .comments__toggle, .comment-navigation + .comments__toggle { margin-top: var(--sp-4); }
.comments__form[hidden] { display: none; }
.comments__count { color: var(--c-muted); font-weight: 600; }
.comment-list, .comment-list .children { margin: 0; padding: 0; list-style: none; }
.comment-list .children { margin-left: var(--sp-4); padding-left: var(--sp-4); border-left: 2px solid var(--c-line); }
.comment-body { padding: var(--sp-4) 0; border-bottom: 1px solid var(--c-line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.comment-author { display: flex; align-items: center; gap: var(--sp-2); }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata a { color: var(--c-muted); text-decoration: none; }
.comment-content { overflow-wrap: anywhere; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { margin-top: var(--sp-2); font-size: var(--fs-sm); font-weight: 700; }
.reply a { text-decoration: none; }
.comment-respond { margin-top: var(--sp-4); padding: var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; }
.comment-reply-title { margin: 0 0 var(--sp-2); font-size: var(--fs-md); }
.comment-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
.comment-form > * { grid-column: 1 / -1; margin: 0; }
@media (min-width: 600px) {
	.comment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.comment-form > .comment-form-author, .comment-form > .comment-form-email { grid-column: auto; }
}
.comment-form textarea { min-height: 0; }
.comment-form .form-submit { margin: 0; }
.comment-reply-title small { margin-left: var(--sp-2); font-size: var(--fs-sm); }
.comment-form .field { display: flex; flex-direction: column; gap: 4px; }
.comment-form .field--check { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: var(--fs-sm); }
.comment-form .field--check label { font-weight: 400; }
.comment-notes, .logged-in-as { color: var(--c-muted); font-size: var(--fs-sm); }
.required { color: var(--c-red); }
.comments__closed { color: var(--c-muted); }

/* 404 */
.notfound { max-width: 640px; margin: 0 auto var(--sp-7); }
.notfound .search-form { margin-bottom: var(--sp-4); }

/* 7. Entry content ========================================================= */
.entry-content { font-size: var(--fs-md); line-height: var(--lh-read); overflow-wrap: break-word; }
@media (min-width: 768px) { .entry-content { font-size: 1.125rem; } }
/* Data pages (race, sports event, virtual run, directory singles): the text comes from fields, it is
   not an article. Body size instead of the larger article reading size, at every width; headings
   follow one ladder: section h2 = --fs-xl with a hairline, h3 inside a section = --fs-lg, no rule,
   no icons in section headings (owner, 27 Nov 2026). */
.entry-content:is(.event-body, .vrun-body, .dir-body) { font-size: var(--fs-base); line-height: 1.6; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content > * { max-width: 100%; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content dl, .entry-content blockquote, .entry-content figure, .entry-content table, .entry-content pre, .entry-content .table-scroll, .entry-content .embed { margin-bottom: 1.25em; }
.entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5 { margin: 1.6em 0 .6em; }
.entry-content h2 { font-size: var(--fs-2xl); }
.entry-content h3 { font-size: var(--fs-xl); }
.entry-content h4 { font-size: var(--fs-lg); }
.entry-content > :first-child { margin-top: 0; }
/* Text links only: buttons keep their own variant colours (:where keeps specificity at 0,1,1). */
.entry-content a:where(:not(.btn, .wp-block-button__link, .jrlbtn a)) { color: var(--c-red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.entry-content a:where(:not(.btn, .wp-block-button__link, .jrlbtn a)):visited { color: var(--c-red); }
.entry-content a:where(:not(.btn, .wp-block-button__link, .jrlbtn a)):hover { color: var(--c-red-dark); text-decoration-thickness: 2px; }
.entry-content a.btn, .entry-content .wp-block-button__link, .entry-content .jrlbtn a { text-decoration: none; }
.entry-content li { margin-bottom: .35em; }
.entry-content li > ul, .entry-content li > ol { margin: .35em 0 0; }
.entry-content dt { font-weight: 700; }
.entry-content dd { margin: 0 0 .75em 1.25em; }
.entry-content img { height: auto; }
.entry-content object, .entry-content embed[type="application/x-shockwave-flash"] { display: none; }
/* Quotes: a small burst mark at the top left instead of a coloured side bar (R2). */
.entry-content blockquote, .entry-content .wp-block-quote, .author-head__quote, .quote {
	position: relative; margin-left: 0; margin-right: 0; padding: .25em 0 .25em 1.75em; border: 0; font-size: 1.08em; font-style: italic; color: var(--c-ink);
}
.entry-content blockquote:not(.instagram-media, .twitter-tweet)::before, .entry-content .wp-block-quote::before, .author-head__quote::before, .quote::before {
	content: ""; position: absolute; left: 0; top: .45em; width: 1.05em; height: 1.05em; background: var(--jrl-pulse-grad); -webkit-mask: var(--jrl-burst) no-repeat center / contain; mask: var(--jrl-burst) no-repeat center / contain;
}
.entry-content blockquote p:last-child, .author-head__quote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite, .entry-content .wp-block-quote cite { display: block; margin-top: .5em; font-size: var(--fs-sm); font-style: normal; font-weight: 600; color: var(--c-muted); }
.entry-content blockquote.instagram-media, .entry-content blockquote.twitter-tweet { padding-left: 0; font-style: normal; font-size: var(--fs-base); }
.entry-content blockquote[class^="style-"], .entry-content blockquote[class*=" style-"] { padding: var(--sp-4) var(--sp-5) var(--sp-4) calc(var(--sp-5) + 1.5em); border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-bg-soft); }
.entry-content blockquote[class^="style-"]::before, .entry-content blockquote[class*=" style-"]::before { left: var(--sp-4); top: calc(var(--sp-4) + .2em); }
.entry-content .wp-block-pullquote { margin: 2em 0; padding: 1.5em 0; border-top: 3px solid var(--c-ink); border-bottom: 3px solid var(--c-ink); text-align: center; }
.entry-content .wp-block-pullquote blockquote { border: 0; padding: 0; font-size: var(--fs-xl); }
.entry-content hr, .entry-content .wp-block-separator { margin: 2em auto; border: 0; border-top: 1px solid var(--c-line-strong); }
.entry-content hr[class^="style-"], .entry-content hr[class*=" style-"] { width: 120px; border-top: 3px solid var(--c-accent); }
.entry-content .wp-block-separator.is-style-wide { width: 100%; }
.entry-content .wp-block-separator.is-style-dots { border: 0; text-align: center; }
.entry-content .wp-block-separator.is-style-dots::before { content: "···"; letter-spacing: 1em; color: var(--c-subtle); }
.entry-content iframe:not(.embed iframe) { display: block; max-width: 100%; margin-inline: auto; }
.entry-content iframe[src*="youtube"], .entry-content iframe[src*="vimeo"], .entry-content iframe[src*="facebook.com/plugins/video"], .entry-content iframe[src*="dailymotion"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.entry-content iframe[src*="google.com/maps"] { width: 100%; aspect-ratio: 4 / 3; height: auto; }
.entry-content video, .wp-video, .wp-video-shortcode, .entry-content audio { display: block; max-width: 100% !important; width: 100%; height: auto; }
.wp-video { width: auto !important; margin-bottom: 1.25em; }
.entry-content .embed .yt__link { color: #fff; text-decoration: none; }

/* Figures, captions, alignment */
.entry-content figure, .wp-caption { max-width: 100% !important; margin-left: 0; margin-right: 0; }
.wp-caption img, .entry-content figure img { display: block; max-width: 100%; height: auto; }
.wp-caption-text, .entry-content figcaption, .wp-element-caption, .gallery-caption { margin-top: .5em; color: var(--c-muted); font-size: var(--fs-sm); line-height: 1.45; text-align: left; }
.aligncenter { display: block; margin-left: auto !important; margin-right: auto !important; }
.wp-caption.aligncenter img, figure.aligncenter img { margin-inline: auto; }
.alignnone { display: block; margin-left: 0; margin-right: 0; }
.alignleft, .alignright { display: block; margin-left: auto; margin-right: auto; }
@media (min-width: 600px) {
	.alignleft { float: left; max-width: 50%; margin: .3em 1.5em 1em 0 !important; }
	.alignright { float: right; max-width: 50%; margin: .3em 0 1em 1.5em !important; }
	img.alignleft, img.alignright { height: auto; }
	/* Beats '.entry-content figure, .wp-caption { max-width: 100% !important }' and inline style widths. */
	.entry-content figure.alignleft, .entry-content figure.alignright, .wp-caption.alignleft, .wp-caption.alignright { max-width: 50% !important; }
}
.alignwide, .alignfull { width: 100%; max-width: 100%; }
.entry-content .size-full img, .entry-content img.size-full, .entry-content img.size-large { width: auto; }

/* Classic [gallery] */
.gallery { display: grid; gap: var(--sp-2); margin: 0 0 1.5em; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-columns-1 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) {
	.gallery-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.gallery-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.gallery-columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.gallery-columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.gallery-columns-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
	.gallery-columns-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
	.gallery-columns-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
}
.gallery br { display: none; }
.gallery-item { margin: 0 !important; min-width: 0; width: auto !important; }
.gallery-icon a { display: block; overflow: hidden; border-radius: var(--radius-sm); background: var(--c-bg-soft); }
.gallery-icon img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 0 !important; }
.gallery-columns-1 .gallery-icon img, .gallery-columns-2 .gallery-icon img { aspect-ratio: 3 / 2; }
.gallery-caption { margin-top: 4px; font-size: var(--fs-xs); }

/* Tables */
.table-scroll, .entry-content .wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; max-width: 100%; }
.table-scroll:focus-visible { outline-offset: 0; }
.table-scroll > table, .entry-content .wp-block-table table { margin: 0; }
.entry-content table, .jrl_table { min-width: min(100%, 480px); font-size: .9375rem; line-height: 1.45; }
.entry-content table td, .entry-content table th { padding: 8px 12px; border: 1px solid var(--c-line); }
.entry-content table thead th, .entry-content table tr:first-child > th { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.entry-content tbody tr:nth-child(even), .entry-content .is-style-stripes tbody tr:nth-child(odd) { background: #fafafa; }
.entry-content .is-style-stripes tbody tr:nth-child(even) { background: transparent; }
.entry-content table img { max-width: none; }
.entry-content table p { margin: 0; }
@media (max-width: 599.98px) { .entry-content table { font-size: .875rem; } .entry-content table td, .entry-content table th { padding: 6px 8px; } }
.table-scroll { position: relative; background: linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left / 32px 100% no-repeat local, linear-gradient(270deg, #fff 30%, rgba(255,255,255,0)) right / 32px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.14), transparent) left / 10px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.14), transparent) right / 10px 100% no-repeat scroll; }

/* Formidable forms (basic, plugin CSS may also load) */
.frm_forms { margin: 0 0 var(--sp-5); }
.frm_forms .frm_form_field { margin-bottom: var(--sp-4); }
.frm_forms label.frm_primary_label { display: block; margin-bottom: 4px; }
.frm_forms .frm_description { color: var(--c-muted); font-size: var(--fs-sm); }
.frm_forms .frm_error, .frm_error_style { color: var(--c-warn); font-size: var(--fs-sm); }
.frm_message { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); background: var(--c-green-bg); color: var(--c-green); }
.frm_forms .frm_checkbox label, .frm_forms .frm_radio label { font-weight: 400; }

/* 8. Core block overrides + presets (global-styles is not loaded) ============ */
.is-layout-flex { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.is-layout-flex > * { margin: 0; }
.is-content-justification-center { justify-content: center; }
.is-content-justification-right { justify-content: flex-end; }
.is-content-justification-space-between { justify-content: space-between; }
.is-vertical { flex-direction: column; align-items: flex-start; }
.wp-block-columns { display: flex; flex-wrap: wrap; gap: var(--sp-5); margin-bottom: 1.25em; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
.wp-block-column > :last-child { margin-bottom: 0; }
@media (max-width: 599.98px) { .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: 100% !important; } }
@media (min-width: 600px) { .wp-block-column[style*="flex-basis"] { flex-grow: 0; } }
.wp-block-image { margin: 0 0 1.25em; }
.wp-block-image img { display: block; height: auto; max-width: 100%; }
.wp-block-image.aligncenter, .wp-block-image .aligncenter { text-align: center; }
.wp-block-image .aligncenter > img, .wp-block-image.aligncenter img { margin-inline: auto; }
.wp-block-image.is-style-rounded img { border-radius: 999px; }
.wp-block-image.size-full img, .wp-block-image.size-large img { width: 100%; }
.wp-block-image figure.alignleft, .wp-block-image figure.alignright { display: table; }
.wp-block-image figcaption { display: block; }
.wp-block-gallery, .wp-block-gallery.has-nested-images { display: grid; gap: var(--sp-2); grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 1.5em; padding: 0; list-style: none; }
.wp-block-gallery.columns-1 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) {
	.wp-block-gallery.columns-3, .wp-block-gallery.columns-default { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.wp-block-gallery.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.wp-block-gallery.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.wp-block-gallery.columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.wp-block-gallery .wp-block-image, .wp-block-gallery .blocks-gallery-item { position: relative; width: auto !important; margin: 0 !important; }
.wp-block-gallery .wp-block-image img, .wp-block-gallery .blocks-gallery-item img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.wp-block-gallery.columns-1 .wp-block-image img, .wp-block-gallery.columns-2 .wp-block-image img { aspect-ratio: 3 / 2; }
.wp-block-gallery .wp-block-image figcaption { margin-top: 4px; font-size: var(--fs-xs); }
.wp-block-gallery > figcaption, .blocks-gallery-caption { grid-column: 1 / -1; }
.wp-block-media-text { display: grid; gap: var(--sp-4); align-items: center; margin-bottom: 1.5em; }
@media (min-width: 600px) { .wp-block-media-text { grid-template-columns: 50% 1fr; gap: var(--sp-5); } .wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr 50%; } .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 2; } }
.wp-block-media-text__media { margin: 0; }
.wp-block-media-text__media img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.wp-block-media-text__content > :last-child { margin-bottom: 0; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: 1.25em; }
.wp-block-button { margin: 0; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--c-red); border-color: currentColor; }
.wp-block-table { margin: 0 0 1.25em; }
.wp-block-table figcaption { margin-top: .5em; }
.wp-block-embed { margin: 0 0 1.5em; }
.wp-block-embed__wrapper { position: relative; }
.wp-block-embed__wrapper::before { content: none !important; }
.wp-block-embed__wrapper iframe { position: static !important; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.wp-block-embed__wrapper .embed { margin: 0; }
.wp-block-video { margin: 0 0 1.25em; }
.wp-block-video video { width: 100%; }
.wp-block-cover { position: relative; display: flex; align-items: center; justify-content: center; min-height: 320px; padding: var(--sp-5); margin-bottom: 1.5em; overflow: hidden; border-radius: var(--radius); color: #fff; }
.wp-block-cover__image-background, .wp-block-cover__background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wp-block-cover__background { background: rgba(0,0,0,.45); }
.wp-block-cover__inner-container { position: relative; z-index: 1; }
.wp-block-spacer { clear: both; }
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.has-text-align-left { text-align: left; }
.has-background { padding: 1.1em 1.4em; border-radius: var(--radius); line-height: 1.55; text-wrap: balance; }
/* Coloured boxes from the editor (inc/content.php jrl_bg_guard): text is forced to black or white
   when the editor's own choice does not reach 4.5:1 on that background, and links take the text
   colour (the red link colour is unreadable on pink, red, orange and amber boxes). */
.entry-content .jrl-bg--dark { color: #fff !important; }
.entry-content .jrl-bg--light { color: #1b1b1b !important; }
.entry-content .jrl-bg a:where(:not(.btn, .wp-block-button__link)),
.entry-content .jrl-bg a:where(:not(.btn, .wp-block-button__link)):visited,
.entry-content .jrl-bg a:where(:not(.btn, .wp-block-button__link)):hover { color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.entry-content .jrl-bg a:where(:not(.btn, .wp-block-button__link)):hover { text-decoration-thickness: 3px; }
.has-drop-cap::first-letter { float: left; margin: .05em .1em 0 0; font-size: 3.4em; font-weight: 800; line-height: .8; color: var(--c-red); }
.has-small-font-size { font-size: var(--fs-sm) !important; }
.has-medium-font-size { font-size: var(--fs-lg) !important; }
.has-large-font-size { font-size: var(--fs-xl) !important; }
.has-x-large-font-size { font-size: var(--fs-2xl) !important; }
/* WordPress default palette (used by ~90 posts) */
.has-black-color { color: #000 !important; } .has-black-background-color { background-color: #000 !important; }
.has-cyan-bluish-gray-color { color: #abb8c3 !important; } .has-cyan-bluish-gray-background-color { background-color: #abb8c3 !important; }
.has-white-color { color: #fff !important; } .has-white-background-color { background-color: #fff !important; }
.has-pale-pink-color { color: #f78da7 !important; } .has-pale-pink-background-color { background-color: #f78da7 !important; }
.has-vivid-red-color { color: #cf2e2e !important; } .has-vivid-red-background-color { background-color: #cf2e2e !important; }
.has-luminous-vivid-orange-color { color: #ff6900 !important; } .has-luminous-vivid-orange-background-color { background-color: #ff6900 !important; }
.has-luminous-vivid-amber-color { color: #fcb900 !important; } .has-luminous-vivid-amber-background-color { background-color: #fcb900 !important; }
.has-light-green-cyan-color { color: #7bdcb5 !important; } .has-light-green-cyan-background-color { background-color: #7bdcb5 !important; }
.has-vivid-green-cyan-color { color: #00d084 !important; } .has-vivid-green-cyan-background-color { background-color: #00d084 !important; }
.has-pale-cyan-blue-color { color: #8ed1fc !important; } .has-pale-cyan-blue-background-color { background-color: #8ed1fc !important; }
.has-vivid-cyan-blue-color { color: #0693e3 !important; } .has-vivid-cyan-blue-background-color { background-color: #0693e3 !important; }
.has-vivid-purple-color { color: #9b51e0 !important; } .has-vivid-purple-background-color { background-color: #9b51e0 !important; }

/* 9. Legacy shortcodes / TagDiv compat ====================================== */
.paragraph-row { display: grid; gap: var(--sp-4) var(--sp-5); grid-template-columns: minmax(0, 1fr); margin-bottom: 1.25em; }
@media (min-width: 600px) {
	.paragraph-row { grid-template-columns: repeat(12, minmax(0, 1fr)); }
	.paragraph-row > * { grid-column: span 12; }
	.paragraph-row > .column6 { grid-column: span 6; }
	.paragraph-row > .column4 { grid-column: span 4; }
	.paragraph-row > .column3 { grid-column: span 3; }
	.paragraph-row > .column8 { grid-column: span 8; }
}
.column6, .column4, .column3, .column8 { min-width: 0; }
.column6 > :last-child, .column4 > :last-child, .column3 > :last-child, .column8 > :last-child { margin-bottom: 0; }
.jrlbtn { margin: 1em 0; }
.entry-content div[style*="#d2e48d"], .entry-content div[style*="#ffbebe"], .note--green, .note--red { padding: 1em 1.25em !important; border-radius: var(--radius); color: var(--c-ink); }
.entry-content div[style*="#d2e48d"], .note--green { background-color: #eef5d6 !important; border: 1px solid #b9cc7a; } /* full hairline, no side stripe (R2) */
.entry-content div[style*="#ffbebe"], .note--red { background-color: #fff0f0 !important; border: 1px solid #f0b4b4; }
.entry-content div[align="right"] > div[style*="max-width:660px"], .narrow { max-width: 660px; }
.td-row { margin: 0 0 var(--sp-5); }
.td-row--cols { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .td-row--cols { grid-template-columns: repeat(12, minmax(0, 1fr)); } .td-row--cols > .td-col { grid-column: span var(--span, 12); } }
.td-col { min-width: 0; }
.td-text-block { margin: 0 0 var(--sp-5); }
.td-image img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.td-button { margin: var(--sp-4) 0; text-align: center; }

/* Print */
/* Reduced motion: one global guard (templates need no own copies). */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
	.card:hover .card__media img, .yt__link:hover .yt__play, .yt__link:focus-visible .yt__play, .jrl-share__btn:hover, .btn:hover, .btn:active { transform: none !important; }
}

@media print {
	.site-header, .site-footer, .site-sidebar, .share-block, .register-bar, .comments, .related, .prev-next, .ad-slot, .breadcrumbs-slot { display: none !important; }
	.layout--sidebar { display: block; }
	a { color: #000; }
}

/* Phones and tablets: no sidebar ads (the sidebar stacks below the content there). ads.js skips
   hidden units, so nothing is requested. Owner decision 27 Nov 2026. */
@media (max-width: 1023.98px) { .site-sidebar .jrl-ad, .site-sidebar__track--ad:not(:has(.event-card)) { display: none; } }

/* Featured race with the sticky Register bar (pass 6): the header share is never hidden. The bar
   only appears once the inline CTA has scrolled out above the viewport, and the header share sits
   above the CTA, so it has already scrolled away by then (main.js). */

/* Pass-6 review fixes (27 Nov 2026) ============================================== */
/* Logged-in visitors: the admin bar pushes the sticky header down above 600px, so sticky bars
   and jump offsets below the header move with it. */
@media (min-width: 601px) {
	.admin-bar .section-nav, .admin-bar .month-head { top: calc(var(--header-stick) + var(--wp-admin--admin-bar--height, 0px)); }
	html:has(body.admin-bar):has(.section-nav) { scroll-padding-top: calc(var(--header-stick) + var(--wp-admin--admin-bar--height, 0px) + var(--section-nav-h, 53px) + 12px); }
}
/* Screen-reader text inside the scrolling nav must not widen the page. */
.section-nav__link { position: relative; }
/* Phones (owner, 28 Nov 2026): the race logo gets its own full-width row above the title, without
   the frame's border and padding. A landscape logo (ratio 1.25 or wider, .event-logo--landscape)
   fills the full width at its own height (29 Nov 2026: the 140px cap left a 16:9 logo at about 60%);
   a square or tall one is capped at 140px high and sits left, in line with the title. The lightbox
   link still covers the whole logo. */
@media (max-width: 479.98px) {
	.event-head.has-logo .event-head__identity { display: block; }
	.event-logo { width: 100%; max-width: 100%; height: auto; max-height: 140px; margin: 0 0 var(--sp-3); }
	.event-logo--landscape { max-height: none; }
	.event-logo .logo-frame.logo-frame--hero { border: 0; border-radius: 0; background: none; box-shadow: none; }
	.event-logo .logo-frame.logo-frame--hero .logo-frame__img { --logo-pad: 0; object-position: left center; }
	.event-head__share .jrl-share__nets { flex-wrap: nowrap; }
}

/* Header edge vs content (owner, 27 Nov 2026). (1) The page starts below the edge, so the edge never
   covers the breadcrumb at the top. (2) A stuck bar (month heading, section nav) paints the strip
   between the see-through edge and itself white, so content doesn't show in that gap while
   scrolling. --header-edge is 0 below 1024px, so both are no-ops on phones. */
.site-header { margin-bottom: var(--header-edge); }
.month-head.is-stuck, .section-nav.is-stuck { box-shadow: 0 calc(-1 * var(--header-edge)) 0 0 var(--c-bg, #fff); }
.month-head.is-stuck { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* Featured rows, final (owner, 27 Nov 2026): no box, no gold border, no ring on the date, no tint, so
   date chips and text stay aligned with every other row. Featured = a small gold star before the
   title; the "Featured" badge stays for screen readers only (status badges stay visible). */
.race-card.is-featured, .race-card.is-featured:hover, .race-card.is-featured:focus-within, .race-card--compact.is-featured { border-color: transparent; background: none; box-shadow: none; }
.race-card--compact.is-featured { border: 0; padding-left: 0; padding-right: 0; } /* same insets as every compact row */
/* Featured rows: a soft gold wash that fades to white, so they read as different without a box or a stripe (owner, 27 Nov 2026, replaces "no tint"). */
.race-card.is-featured, .race-card.is-featured:hover, .race-card.is-featured:focus-within, .race-card--compact.is-featured { background: linear-gradient(100deg, var(--jrl-gold-tint) 0%, #fffcf3 45%, #fff 85%); }
.race-card--compact, .race-card--compact.is-featured { padding-left: var(--sp-3); padding-right: var(--sp-3); } /* every compact row has the same inset, so featured and plain rows line up (owner, 27 Nov 2026) */
.race-card.is-featured .date-badge { box-shadow: none; }
.race-card.is-featured .badge--featured { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.race-card.is-featured .race-card__badges:not(:has(> :not(.badge--featured))) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); } /* only the sr-only Featured badge: take the row out of the flow */
.race-card.is-featured .race-card__title a::before {
	content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .3em; vertical-align: -.02em;
	background: var(--jrl-gold-accent, #b8860b);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.95 6.6 7.05.65-5.33 4.73 1.6 7.02L12 17.27 5.73 21l1.6-7.02L2 9.25l7.05-.65z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.95 6.6 7.05.65-5.33 4.73 1.6 7.02L12 17.27 5.73 21l1.6-7.02L2 9.25l7.05-.65z'/%3E%3C/svg%3E") center / contain no-repeat;
}
