/* RMSC Live Updates page. Mobile first; everything sits under .rl so theme styles don't collide. */
.rl {
	--o: #E9640E; --o-deep: #c4510a; --o-soft: #fff1e6; --ink: #17140f; --ink-2: #4a433a; --muted: #8a8176;
	--line: #e6ddd2; --sand: #f4efe9; --card: #fff; --night: #141110; --wa: #1a9e5c; --r: 14px;
	box-sizing: border-box; color: var(--ink); font-family: inherit; line-height: 1.5; max-width: 1180px; margin: 0 auto;
}
.rl *, .rl *::before, .rl *::after { box-sizing: border-box; }
.rl [hidden] { display: none !important; }
.rl svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.125em; }
.rl a { text-decoration: none; }
.rl img { max-width: 100%; }
.rl .rl-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 18px; line-height: 1.2; font-weight: 800; color: var(--ink); }
.rl-h svg { color: var(--o); }
.rl-empty { padding: 30px 10px; text-align: center; color: var(--muted); }
.rl-cap { display: block; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #f3b88f; }

/* ---------- Race-day strip (only on race days, or when a results link is set) ---------- */
.rl-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r); background: var(--night); color: #fff; }
.rl-strip-tx { font-size: 14px; color: #ddd3c8; }
.rl-livebadge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 4px; background: #d7261e; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.rl-livebadge i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: rl-pulse 1.4s infinite; }
@keyframes rl-pulse { 50% { opacity: .25; } }
.rl a.rl-res { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; background: var(--o); color: #fff; font-size: 14px; font-weight: 700; }
.rl a.rl-res:hover { color: #fff; background: var(--o-deep); }

/* ---------- Tiles: picture with the headline over it (top stories, highlights) ---------- */
.rl a[data-tile] { position: relative; display: block; overflow: hidden; border-radius: var(--r); background: #3a2a1f; color: #fff; isolation: isolate; }
.rl a[data-tile] > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; z-index: -1; }
.rl a[data-tile]:hover > img { transform: scale(1.04); }
.rl a[data-tile]:focus-visible { outline: 3px solid var(--o); outline-offset: 2px; }
.rl-noimg { position: absolute; inset: 0; display: grid; place-items: center; z-index: -1; background: radial-gradient(260px 160px at 75% 15%, rgba(233, 100, 14, .55), transparent 70%), linear-gradient(160deg, #3a2a1f, #141110); color: rgba(255, 255, 255, .22); font-size: 64px; }
.rl-card .rl-noimg { font-size: 48px; }
.rl-ov { position: absolute; left: 0; right: 0; bottom: 0; display: block; padding: 40px 14px 14px; background: linear-gradient(180deg, transparent, rgba(12, 9, 7, .55) 30%, rgba(12, 9, 7, .9)); }
.rl-ov strong { display: block; margin-top: 4px; font-size: 16px; line-height: 1.25; font-weight: 800; color: #fff; overflow-wrap: anywhere; }
.rl-ov-ex { display: block; margin-top: 5px; font-size: 14px; line-height: 1.4; color: #ddd3c8; }

.rl-top { display: grid; gap: 10px; margin: 0 0 18px; }
.rl a.rl-top-big { aspect-ratio: 4 / 3.4; }
.rl a.rl-top-big .rl-ov { padding: 60px 16px 16px; }
.rl a.rl-top-big .rl-ov strong { font-size: clamp(21px, 5.6vw, 34px); line-height: 1.15; text-wrap: balance; }
.rl-top-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rl a.rl-top-sm { aspect-ratio: 1 / 1; }
.rl a.rl-top-sm .rl-ov { padding: 30px 10px 10px; }
.rl a.rl-top-sm .rl-ov strong { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.rl-hl { margin: 0 0 18px; }
.rl-hl-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -2px; padding: 0 2px 4px; }
.rl-hl-row::-webkit-scrollbar { display: none; }
.rl a.rl-hl-tile { flex: 0 0 40%; max-width: 190px; aspect-ratio: 9 / 14; scroll-snap-align: start; }
.rl a.rl-hl-tile .rl-ov { padding: 30px 10px 10px; }
.rl a.rl-hl-tile .rl-ov strong { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rl-play { position: absolute; inset: 0; display: grid; place-items: center; }
.rl-play svg { width: 60px; height: 60px; padding: 15px 13px 15px 17px; border: 2.5px solid #fff; border-radius: 50%; background: rgba(0, 0, 0, .35); fill: #fff; stroke: none; }
.rl-play.is-sm { inset: 10px 10px auto auto; display: block; }
.rl-play.is-sm svg { width: 34px; height: 34px; padding: 8px 7px 8px 10px; border-width: 2px; }

/* ---------- Filters ---------- */
.rl-filters { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 2px 0 4px; overflow-x: auto; scrollbar-width: none; }
.rl-filters::-webkit-scrollbar { display: none; }
.rl a.rl-chip { flex: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.rl a.rl-chip:hover { border-color: var(--o); color: var(--o); }
.rl a.rl-chip.is-on { background: var(--night); border-color: var(--night); color: #fff; }
.rl a.rl-chip.is-stage.is-on { background: var(--o); border-color: var(--o); }
.rl-chip-sep { flex: none; width: 1px; height: 22px; background: var(--line); }
.rl-stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r); background: var(--o-soft); }
.rl-stage strong { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--o-deep); }
.rl-stage > span { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.rl-km { display: inline-flex; align-items: center; gap: 5px; }
.rl-km b { color: var(--o); }

.rl-new { display: flex; justify-content: center; position: sticky; top: 12px; z-index: 5; margin: 0 0 12px; }
.rl-new a { padding: 9px 18px; border-radius: 999px; background: var(--o); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.rl-new a:hover { color: #fff; }

/* With only two updates, the second fills the side on its own. */
.rl-top-side.is-n1 { grid-template-columns: 1fr; }
.rl-top-side.is-n1 a.rl-top-sm { aspect-ratio: 16 / 9; }

/* ---------- Feed cards ---------- */
.rl-body { display: grid; gap: 18px; }
.rl-feed { display: grid; gap: 14px; align-content: start; }
.rl-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; }
.rl-card:hover { border-color: #d6c8b8; }
.rl-card.is-flash { animation: rl-flash 2.2s ease-out; }
@keyframes rl-flash { 0% { box-shadow: 0 0 0 3px var(--o); } 100% { box-shadow: 0 0 0 3px transparent; } }
.rl a.rl-card-im { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #3a2a1f; }
.rl a.rl-card-im img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rl-card-tx { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px; flex: 1; }
.rl-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--o); }
.rl .rl-card h3, .rl .rl-news-tx h3 { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.rl .rl-card h3 a { color: inherit; }
.rl .rl-card h3 a:hover { color: var(--o-deep); }
.rl-ex { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: auto 0 0; padding-top: 4px; font-size: 13px; color: var(--muted); }
.rl-meta time { font-weight: 600; }
.rl-chip-st { padding: 1px 7px; border-radius: 4px; background: var(--o-soft); color: var(--o-deep); font-size: 12px; font-weight: 700; }
.rl-acts { display: inline-flex; gap: 6px; margin-left: auto; }
.rl a.rl-wa, .rl button.rl-share-btn { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; line-height: 1.3; cursor: pointer; box-shadow: none; }
.rl a.rl-wa svg { color: var(--wa); }
.rl a.rl-wa:hover { border-color: var(--wa); color: var(--wa); }
.rl button.rl-share-btn:hover, .rl button.rl-share-btn.is-done { border-color: var(--o); color: var(--o); }

.rl-card.is-news { flex-direction: row; gap: 12px; padding: 14px; }
.rl-news-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--o-soft); color: var(--o); font-size: 19px; }
.rl-news-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rl .rl-news-tx h3 { font-size: 16px; }
.rl-news-text { font-size: 15px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rl-news-text p { margin: 0 0 6px; }

.rl-mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; aspect-ratio: 16 / 10; background: var(--night); }
.rl-mosaic.is-one { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.rl button.rl-ph { position: relative; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: #3a2a1f; cursor: zoom-in; box-shadow: none; line-height: 0; }
.rl button.rl-ph-big { grid-row: 1 / 3; }
.rl-mosaic.is-one button.rl-ph-big { grid-row: auto; }
.rl button.rl-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rl-ph-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 17, 16, .66); color: #fff; font-size: 22px; font-weight: 800; line-height: 1; }
.rl button.rl-link { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; box-shadow: none; line-height: inherit; }
.rl button.rl-vid { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: var(--night); cursor: pointer; box-shadow: none; line-height: 0; }
.rl button.rl-vid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rl-vid iframe, .rl-lb-v iframe { display: block; width: 100%; height: 100%; border: 0; }

.rl-quick { display: none; }
.rl a.rl-q { display: block; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); }
.rl a.rl-q:first-of-type { border-top: 0; }
.rl a.rl-q strong { display: block; font-size: 15px; line-height: 1.35; }
.rl a.rl-q small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.rl a.rl-q:hover strong { color: var(--o-deep); }
.rl-older { margin: 18px 0 0; text-align: center; }
.rl-older a { display: inline-block; padding: 10px 22px; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; color: var(--ink); }
.rl-older a:hover { border-color: var(--o); color: var(--o); }

/* ---------- Story reader ---------- */
html.rl-lock, html.rl-lock body { overflow: hidden; }
.rl-reader { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 8, 6, .7); }
.rl-r-sheet { position: relative; width: 100%; max-width: 760px; height: 94vh; height: 94dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 18px 18px 0 0; background: var(--card); animation: rl-up .25s ease-out; }
@keyframes rl-up { from { transform: translateY(40px); opacity: 0; } }
.rl button.rl-r-x { position: sticky; top: 10px; float: right; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; margin: 10px 10px -50px 0; padding: 0; border: 0; border-radius: 50%; background: rgba(20, 17, 16, .7); color: #fff; font-size: 20px; cursor: pointer; box-shadow: none; }
.rl-r-cover img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: cover; }
.rl-r-in { padding: 20px 20px 36px; }
.rl-r-in .rl-cap { color: var(--o); }
.rl .rl-r-in h2 { margin: 6px 0 4px; font-size: clamp(24px, 6vw, 34px); line-height: 1.15; font-weight: 800; color: var(--ink); text-wrap: balance; }
.rl-r-when { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.rl-r-text { font-size: 17px; line-height: 1.75; color: #2b2520; }
.rl-r-text p { margin: 0 0 14px; }
.rl-r-text img { height: auto; border-radius: 8px; }
.rl-r-in .rl-acts { margin: 18px 0 0; }
.rl-r-in .rl-acts a.rl-wa, .rl-r-in .rl-acts button.rl-share-btn { padding: 9px 16px; font-size: 15px; }

/* ---------- Photo and video viewer ---------- */
.rl-lightbox { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 50px 60px; background: rgba(10, 8, 6, .95); }
.rl-lightbox figure { margin: 0; text-align: center; width: 100%; }
.rl-lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 4px; }
.rl-lb-v { width: min(1000px, 100%); aspect-ratio: 16 / 9; margin: 0 auto; }
.rl-lightbox figcaption { margin-top: 8px; color: #d8cfc6; font-size: 13px; }
.rl .rl-lb-x, .rl .rl-lb-nav { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 24px; cursor: pointer; box-shadow: none; line-height: 1; }
.rl .rl-lb-x { top: 14px; right: 14px; }
.rl .rl-lb-nav { top: 50%; transform: translateY(-50%); }
.rl .rl-lb-nav.is-prev { left: 10px; }
.rl .rl-lb-nav.is-next { right: 10px; }

/* ---------- Wider layouts follow the width the theme gives the page, not the screen ---------- */
.rl-wrap { container: rl / inline-size; }
@container rl (min-width: 640px) {
	.rl-feed { grid-template-columns: 1fr 1fr; }
	.rl-feed .rl-card.is-news, .rl-feed .rl-empty { grid-column: 1 / -1; }
	.rl a.rl-hl-tile { flex-basis: 26%; }
	.rl a.rl-top-big { aspect-ratio: 16 / 9; }
	.rl a.rl-top-sm { aspect-ratio: 16 / 9; }
}
@media (min-width: 640px) {
	.rl-reader { align-items: center; padding: 24px; }
	.rl-r-sheet { height: auto; max-height: 92vh; border-radius: 18px; }
	.rl-r-in { padding: 26px 34px 40px; }
}
/* ---------- Desktop: news-site front page ---------- */
@container rl (min-width: 900px) {
	.rl-top:not(.is-single) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
	.rl-top:not(.is-single) a.rl-top-big { aspect-ratio: auto; min-height: 440px; }
	.rl-top-side { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 1fr; }
	.rl-top-side.is-n1 a.rl-top-sm { aspect-ratio: auto; }
	.rl a.rl-top-sm { aspect-ratio: auto; min-height: 0; }
	.rl a.rl-top-sm .rl-ov strong { font-size: 17px; }
	.rl a.rl-top-big .rl-ov { padding: 80px 24px 22px; }
	.rl a.rl-hl-tile { flex: 0 0 calc((100% - 40px) / 5); max-width: none; aspect-ratio: 4 / 5; }
	.rl-body.has-quick { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
	.rl-body.has-quick .rl-feed .rl-card.is-news { display: none; }
	.rl-body:not(.has-quick) .rl-feed { grid-template-columns: repeat(3, 1fr); }
	.rl-quick { display: block; position: sticky; top: 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
}
@media (max-width: 639px) {
	.rl-lightbox { padding: 60px 8px; }
	.rl .rl-lb-nav { top: auto; bottom: 14px; transform: none; }
	.rl-acts span { display: none; }
	.rl a.rl-wa, .rl button.rl-share-btn { padding: 6px 9px; }
	.rl-r-in .rl-acts span { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
	.rl-livebadge i, .rl-card.is-flash, .rl-r-sheet { animation: none; }
	.rl a[data-tile] > img { transition: none; }
}

/* ---------- Desert map background (Settings → Page style) ---------- */
body.rl-backdrop { background: #16110d !important; }
body.rl-backdrop::before { content: ""; position: fixed; inset: 0; z-index: -1; background: #16110d url(desert-map.svg) center / cover no-repeat; pointer-events: none; }
body.rl-backdrop .uicore-page-title { display: none !important; }
body.rl-backdrop .uicore-body-content, body.rl-backdrop #uicore-page, body.rl-backdrop #content, body.rl-backdrop #primary,
body.rl-backdrop #main, body.rl-backdrop .uicore-content-wrapper, body.rl-backdrop .uicore-content, body.rl-backdrop .uicore-animation-bg,
body.rl-backdrop .site, body.rl-backdrop .site-content, body.rl-backdrop .site-main, body.rl-backdrop article.page, body.rl-backdrop .entry-content { background: transparent !important; }
body.rl-backdrop #content.uicore-content { padding-top: var(--rl-head, 100px); }
.rl-head { margin: 28px 0 18px; }
.rl-head .rl-cap { color: #f3b88f; }
.rl .rl-title { margin: 4px 0 0; padding: 0; font-size: clamp(30px, 6vw, 46px); line-height: 1.05; font-weight: 800; letter-spacing: -.01em; color: #fff; }
body.rl-backdrop .rl .rl-h { color: #fff; }
body.rl-backdrop .rl a.rl-chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .28); color: #fff; }
body.rl-backdrop .rl a.rl-chip:hover { border-color: var(--o); color: #fff; background: rgba(233, 100, 14, .25); }
body.rl-backdrop .rl a.rl-chip.is-on { background: #fff; border-color: #fff; color: var(--night); }
body.rl-backdrop .rl a.rl-chip.is-stage.is-on { background: var(--o); border-color: var(--o); color: #fff; }
body.rl-backdrop .rl-chip-sep { background: rgba(255, 255, 255, .25); }
body.rl-backdrop .rl-empty { color: #d8cdbf; }
body.rl-backdrop .rl-older a { color: #fff; border-color: rgba(255, 255, 255, .3); }
body.rl-backdrop .rl-older a:hover { border-color: var(--o); color: #fff; }
body.rl-backdrop .rl-strip { background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .12); }
body.rl-backdrop .rl-card { border-color: transparent; }
@media (prefers-reduced-transparency: reduce) { body.rl-backdrop::before { background-image: none; } }

/* Some themes give every button and link padding, backgrounds and borders with very specific selectors. */
.rl button.rl-ph, .rl button.rl-vid { padding: 0 !important; border: 0 !important; background: var(--night) !important; min-height: 0 !important; border-radius: 0 !important; }
.rl button.rl-ph img, .rl button.rl-vid img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; }
.rl .rl-lb-x, .rl .rl-lb-nav, .rl button.rl-r-x { padding: 0 !important; border: 0 !important; color: #fff !important; min-height: 0 !important; }
.rl .rl-lb-x, .rl .rl-lb-nav { background: rgba(255, 255, 255, .12) !important; }
.rl button.rl-r-x { background: rgba(20, 17, 16, .7) !important; }
.rl button.rl-share-btn { padding: 5px 10px !important; background: var(--card) !important; color: var(--ink-2) !important; border: 1px solid var(--line) !important; min-height: 0 !important; text-transform: none !important; letter-spacing: 0 !important; }
.rl button.rl-share-btn:hover, .rl button.rl-share-btn.is-done { color: var(--o) !important; border-color: var(--o) !important; }
.rl button.rl-link { padding: 0 !important; background: none !important; border: 0 !important; color: inherit !important; min-height: 0 !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: inherit !important; }
.rl-r-in .rl-acts button.rl-share-btn { padding: 9px 16px !important; }
