/* ============================================================
   BSB MECCA — Consolidated nav + site-wide CSS (externalized Session 4)
   Moved from inline <style> in mr-nav.php — 21 KB/page saved on every page load.
   ============================================================ */

/* --- block 0 from mr-nav.php --- */
/* ============================================================
   MOTORESULTS GLOBAL NAV — Two-state masthead (Section 27)
   ============================================================ */
:root {
    --color-bg-page: #F5F3EE;
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #444444;
    --color-text-muted: #888888;
    --color-accent: #C8102E;
    --color-accent-hover: #B84008;
    --color-border: #1A1A1A;
    --color-border-lt: #CCCCCC;
    --font-editorial: 'Playfair Display', Georgia, serif;
    --font-ui: 'DM Sans', -apple-system, system-ui, sans-serif;
    --font-badge: 'Barlow Condensed', sans-serif;

    /* Legacy aliases (used by mega menu, search overlay, etc.) */
    --mr-paper: #F5F3EE;
    --mr-ink: #1A1A1A;
    --mr-ink-light: #444444;
    --mr-ink-muted: #888888;
    --mr-rule: #CCCCCC;
    --mr-rule-heavy: #1A1A1A;
    --mr-accent: #C8102E;
    --mr-accent-dark: #B84008;
    --mr-card: #EFE9DC;
    --mr-surface: #FFFFFF;
    --mr-nav-accent: var(--mr-accent);
    --mr-nav-border: var(--mr-rule);
    --mr-nav-drop-bg: var(--mr-ink);
}

/* ── Global Editorial Foundation ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500&family=DM+Sans:wght@300;400;500;600;700&family=Barlow+Condensed:wght@600;700;800;900&display=swap');

html, body {
    background: var(--color-bg-page) !important;
    color: var(--color-text-primary) !important;
    font-family: var(--font-ui) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.site, .site-content, #content, #primary, .entry-content {
    background: transparent !important;
    color: inherit !important;
}

/* Global table reset — prevent theme borders clashing with dotted gradient rules */
table tr,
table th,
table td,
.entry-content table tr,
.entry-content table th,
.entry-content table td {
    border: 0 none transparent !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

/* Editorial typography globals */
h1, h2, h3, h4, h5, h6 { color: var(--color-text-primary); }

/* ============================================================
   UNIFIED PAGE-HERO H1 STYLE — Tablet-magazine editorial
   Matches the records page (which was approved as the reference).
   Targets every known page-hero h1 class so all page headers look
   identical: Playfair Display, weight 400, centered, tight letter-spacing.
   ============================================================ */
.mrh-hero-headline,
.mrh-hero h1,
.hpl-hero h1,
.ci-hero h1,
.mrchamps-hero h1,
.mrr-hero-title,
.rw-hero h1,
.rwa-hero h1,
.sl-hero-title,
.mr-cal-title,
.mr-hof-hero h1,
.mrhub-hero h1,
.mr-otd-hero h1,
.mr-rec-hero h1,
.mm-title,
.mr-riders-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(38px, 5.2vw, 56px) !important;
    font-weight: 400 !important;
    line-height: 1.02 !important;
    letter-spacing: -0.02em !important;
    color: #1A1A1A !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 900px !important;
    text-transform: none !important;
}

/* Hero containers themselves — center-align + the intro paragraph */
.mrh-hero,
.hpl-hero,
.ci-hero,
.mrchamps-hero,
.mrr-hero,
.rw-hero,
.rwa-hero,
.sl-hero,
.mr-hof-hero,
.mrhub-hero,
.mr-rec-hero {
    text-align: center !important;
}
.mrh-hero-dek,
.hpl-dek,
.ci-dek,
.mrchamps-hero p,
.mrr-hero-sub,
.rw-dek,
.rwa-dek,
.sl-hero-dek,
.mr-hof-hero p,
.mrhub-hero p,
.mr-rec-hero p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Editorial image treatment — grayscale → colour on hover (Section 14/26) */
/* Simple class-based approach for single images */
.mr-editorial-img, .mr-rider-photo, img[class*="rider"],
.grayscale-img {
    filter: grayscale(1);
    mix-blend-mode: multiply;
    transition: filter 0.5s ease-in-out;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mr-editorial-img:hover, .mr-rider-photo:hover, img[class*="rider"]:hover {
    filter: grayscale(0);
}
/* Two-image container pattern (grayscale base + colour overlay) */
.img-container { position: relative; overflow: hidden; }
.img-container .color-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.img-container:hover .color-img { opacity: 1; }
/* Full-bleed variant for feature splits */
.img-container--full { position: absolute; inset: 0; }
.img-container--full .grayscale-img,
.img-container--full .color-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
/* Hero variant — colour on scroll via IntersectionObserver */
.img-container--hero.is-active .color-img { opacity: 1; }
/* Championship logos in nav/footer
   NOTE: mega-menu sits on dark bg (#1A1A1A) so mix-blend-mode: multiply
   would wipe the logos out. Use opacity fade instead. The card variant
   (.mrh-champ-card-logo) sits on cream, so grayscale+multiply is fine there. */
.mr-mega-champ-logo {
    opacity: 0.85;
    transition: opacity 0.2s, filter 0.2s;
}
.mr-mega-champ:hover .mr-mega-champ-logo {
    opacity: 1;
}
.mrh-champ-card-logo img {
    filter: grayscale(1);
    mix-blend-mode: multiply;
    transition: filter 0.3s;
}
.mrh-champ-card:hover .mrh-champ-card-logo img {
    filter: grayscale(0);
}

/* Global link styling */
a { color: var(--color-accent); }
a:hover { color: var(--color-accent-hover); }

/* ============================================================
   HIDE THEME HEADER -- replaced by masthead
   ============================================================ */
.newsx-site-header,
.site-header,
.newsx-top-section-wrap,
.newsx-middle-section-wrap,
.newsx-bottom-section-wrap,
.newsx-navigation-section-wrap,
#masthead {
    display: none !important;
}
.site-content,
#content,
#page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
/* HIDE THEME FOOTER */
.newsx-site-footer,
.site-footer,
.newsx-footer-area,
.newsx-footer-widgets,
footer.newsx-footer {
    display: none !important;
}

/* ============================================================
   STATE 1: FULL MASTHEAD (scrolls away)
   ============================================================ */
#masthead-full {
    width: 100%;
    background: var(--color-bg-page);
    position: relative;
    z-index: 100;
}
.mh-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Row 1: Utility bar */
.mh-utility {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    border-bottom: 1px dashed transparent;
    background-image: linear-gradient(to right, var(--color-text-primary) 24%, transparent 0%);
    background-position: bottom;
    background-size: 4px 1px;
    background-repeat: repeat-x;
}
.mh-utility a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.12s;
}
.mh-utility a:hover {
    color: var(--color-text-primary);
}

/* Breadcrumbs (left column) */
.mh-breadcrumbs { flex: 1 1 auto; min-width: 0; }
.mh-crumbs-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    font-family: var(--font-ui); font-size: 0.6875rem; font-weight: 500;
    color: var(--color-text-muted); letter-spacing: 0.08em; text-transform: uppercase;
}
.mh-crumb { display: inline-flex; align-items: center; gap: 6px; }
.mh-crumb a { color: var(--color-text-muted); text-decoration: none; transition: color 0.12s; }
.mh-crumb a:hover { color: var(--color-accent); }
.mh-crumb:last-child span[itemprop="name"] { color: var(--color-text-primary); font-weight: 700; }
.mh-crumb-sep { color: var(--color-border-lt); font-weight: 400; opacity: 0.7; }
.mh-brand-tag { font-family: var(--font-ui); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); }

/* Date string on right */
.mh-date-string {
    flex: 0 0 auto;
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    text-transform: none;
    text-align: right;
    white-space: nowrap;
}

/* Row 2: Masthead identity */
.mh-identity {
    display: flex;
    align-items: center;
    padding: 1.5rem 0;
}
.mh-wordmark {
    font-family: var(--font-editorial);
    font-size: 3rem;
    font-weight: 400;
    color: var(--color-text-primary);
    letter-spacing: 0.04em;
    line-height: 1;
    text-decoration: none;
}
.mh-wordmark:hover {
    color: var(--color-text-primary);
    text-decoration: none;
}
.mh-mark {
    height: 3rem;
    width: auto;
    margin-left: 0.5rem;
}

/* Row 3: Navigation bar */
.mh-nav-row {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    height: 48px;
}
.mh-nav-items {
    display: flex;
    align-items: center;
    height: 100%;
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}
.mr-nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}
.mr-nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    height: 100%;
    color: var(--color-text-secondary);
    text-decoration: none !important;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.12s;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.mr-nav-link:hover,
.mr-nav-link.active {
    color: var(--color-text-primary) !important;
    text-decoration: none !important;
    border-bottom-color: var(--color-accent);
}
.mr-nav-link svg {
    width: 10px;
    height: 10px;
    opacity: 0.5;
    transition: transform 0.15s, opacity 0.12s;
    flex-shrink: 0;
}
.mr-nav-item:hover .mr-nav-link svg {
    transform: rotate(180deg);
    opacity: 1;
}

/* Right side controls */
.mh-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.mr-nav-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 0;
    background: transparent;
    border: 1px solid var(--color-border-lt);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.12s;
    text-decoration: none;
}
.mr-nav-search-btn:hover {
    background: var(--color-text-primary);
    color: #fff;
    text-decoration: none;
    border-color: var(--color-text-primary);
}

/* Mobile hamburger
   Notes:
   - 44x44 tap target (Apple HIG minimum) so it's easy to find + tap.
   - Spans get explicit width (26px) so they always render as visible bars
     regardless of parent flex sizing quirks.
   - 3px-tall bars (was 2px) and slightly tighter gap for better visibility
     on cream backgrounds.
*/
.mr-nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: 8px;
}
.mr-nav-burger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--color-text-primary);
    border-radius: 0;
    transition: all 0.2s;
}

/* ── Row 4: Ticker band ── */
.mh-ticker {
    width: 100%;
    background: #222222;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    overflow: hidden;
}
.mh-ticker[hidden] { display: none; }
.mh-ticker-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.5rem 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── MEGA MENU ── */
.mr-mega {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    background: var(--mr-ink);
    border-top: 2px solid var(--color-accent);
    border-bottom: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 10000;
    color: rgba(255,255,255,0.85);
}
/* Position mega menu below whichever masthead is active */
#masthead-full .mr-mega { top: auto; }
#masthead-sticky .mr-mega { top: 48px; }
.mr-nav-item:hover .mr-mega { display: block; }
.mr-mega-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 200px;
    gap: 0;
}
.mr-mega-col {
    padding: 0 24px 0 0;
    border-right: 1px solid var(--mr-nav-border);
    margin-right: 24px;
}
.mr-mega-col:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}
.mr-mega-col-label {
    font-family: var(--font-badge);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mr-mega-champ {
    margin-bottom: 16px;
}
.mr-mega-champ-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    text-decoration: none;
    color: #fff;
    transition: color 0.12s;
}
.mr-mega-champ-header:hover { color: var(--mr-nav-accent); text-decoration: none; }
.mr-mega-champ-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
    opacity: 0.85;
    flex-shrink: 0;
}
.mr-mega-champ-name {
    font-family: var(--font-editorial);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: var(--mr-paper);
}
.mr-mega-champ-links {
    display: flex;
    gap: 0;
    padding-left: 28px;
}
.mr-mega-champ-link {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    padding: 2px 8px 2px 0;
    transition: color 0.1s;
    border-right: 1px solid rgba(255,255,255,0.12);
    margin-right: 8px;
    line-height: 1.4;
}
.mr-mega-champ-link:last-child { border-right: none; margin-right: 0; }
.mr-mega-champ-link:hover { color: #fff; text-decoration: none; }

/* Right panel */
.mr-mega-panel {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mr-mega-panel-label {
    font-family: var(--font-badge);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mr-mega-panel-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 0;
    text-decoration: none !important;
    color: rgba(255,255,255,0.7);
    font-family: var(--font-editorial);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.1s, color 0.1s;
}
.mr-mega-panel-link:hover {
    background: rgba(255,255,255,0.06);
    color: var(--mr-paper) !important;
    text-decoration: none !important;
}
.mr-mega-panel-link svg { opacity: 0.5; flex-shrink: 0; }
.mr-mega-panel-link:hover svg { opacity: 1; }
.mr-mega-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 8px 0; }

/* Legacy dropdown -- keep for non-mega items */
.mr-nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0px);
    left: 0;
    min-width: 200px;
    background: var(--mr-nav-drop-bg);
    border: 1px solid var(--mr-nav-border);
    border-top: 2px solid var(--mr-nav-accent);
    border-radius: 0 0 8px 8px;
    padding: 8px 0;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    z-index: 10000;
}
.mr-nav-item:hover .mr-nav-dropdown { display: block; }
.mr-nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
}
.mr-nav-dropdown-item:hover { background: rgba(255,255,255,0.05); color: #fff; text-decoration: none; }

/* ============================================================
   STATE 2: STICKY BAR (appears on scroll)
   ============================================================ */
#masthead-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 48px;
    background: var(--color-bg-page);
    border-top: 2px solid var(--color-accent);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}
#masthead-sticky.is-visible {
    transform: translateY(0);
}
.sticky-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0;
}
.sticky-wordmark {
    font-family: var(--font-editorial);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-text-primary);
    letter-spacing: 0.04em;
    text-decoration: none;
    margin-right: 32px;
    flex-shrink: 0;
    line-height: 1;
}
.sticky-wordmark:hover {
    color: var(--color-text-primary);
    text-decoration: none;
}
.sticky-nav-items {
    display: flex;
    align-items: center;
    height: 100%;
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}
.sticky-nav-items .mr-nav-link {
    font-size: 0.75rem;
    padding: 0 10px;
}

/* Mobile drawer */
.mr-nav-mobile {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    max-width: 500px;
    bottom: 0;
    background: var(--mr-ink);
    z-index: 9998;
    overflow-y: auto;
    padding: 24px 0 40px;
    border-right: 1px solid rgba(255,255,255,0.1);
    box-shadow: 20px 0 60px rgba(0,0,0,0.3);
}
.mr-nav-mobile.open { display: block; }

.mr-mobile-item {
    display: block;
    padding: 16px 28px;
    color: rgba(255,255,255,0.85);
    font-family: var(--font-editorial);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.1s;
}
.mr-mobile-item:hover { color: var(--color-accent); text-decoration: none !important; }
.mr-mobile-section-label {
    padding: 24px 28px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
    font-family: var(--font-ui);
}
.mr-mobile-sub {
    padding: 10px 28px 10px 44px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mr-mobile-sub:hover { color: #fff; text-decoration: none !important; }

/* Report-incorrect-data trigger inside the burger drawer (mobile only).
   Visually matches the other .mr-mobile-item entries but is a <button>
   element that programmatically clicks the hidden mrf-open button. */
.mr-mobile-report {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

@media (max-width: 768px) {
    .mh-nav-items,
    .sticky-nav-items { display: none !important; }
    .mr-nav-burger { display: flex !important; }
    .mh-identity { padding: 1rem 0; }
    .mh-wordmark { font-size: 2rem; }
    .mh-mark { height: 2rem; }
    /* Guard against any theme rule that might collapse the nav row */
    .mh-nav-row { display: flex !important; }
    /* Ensure nav-right (containing search + burger) is visible + right-aligned */
    .mh-nav-right { display: flex !important; margin-left: auto; }
}

/* ============================================================
   STICKY MOBILE FOOTER NAV  (≤768px only) — TEXT ONLY
   Editorial register: cream surface, 1px black border-top, thin column
   rules between items, DM Sans uppercase labels, rust-orange accent +
   top indicator strip on the active tab. No icons.
   ============================================================ */
.mr-mobile-footer-nav { display: none; }

@media (max-width: 768px) {
    .mr-mobile-footer-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: var(--color-bg-page);
        border-top: 1px solid var(--color-text-primary);
        z-index: 9997;
        align-items: stretch;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
    }
    .mr-mfn-item {
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none !important;
        color: var(--color-text-secondary);
        flex: 1;
        padding: 0 4px;
        position: relative;
        transition: color 0.15s;
        border-right: 1px solid var(--color-border-lt, #CCCCCC);
        font-family: var(--font-ui);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        line-height: 1;
    }
    .mr-mfn-item:last-child { border-right: none; }
    .mr-mfn-item:hover { color: var(--color-text-primary); text-decoration: none !important; }
    .mr-mfn-item.active { color: var(--color-accent); }
    .mr-mfn-item.active::before {
        content: '';
        position: absolute;
        top: -1px;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--color-accent);
    }
    /* Push body content above the fixed footer so the last paragraph isn't clipped */
    body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

    /* Hide the "Report incorrect data" FAB on mobile — it overlaps the sticky
       footer nav. Mobile users get the same action via a link inside the
       burger drawer instead (see mr-nav.php). */
    .mrf-link { display: none !important; }

    /* Byline wrap on Rankings / Hall of Fame / Records / On This Day / etc.
       The wrap has inline `padding: 10px 0` which only sets vertical padding;
       on narrow viewports the byline text touches the left edge. Override
       with !important because inline styles win over external CSS otherwise. */
    .mr-byline-wrap {
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box;
    }
}
@media (min-width: 769px) {
    .mr-nav-mobile { display: none !important; }
}

/* --- block 1 from mr-nav.php --- */
.mr-search-overlay{position:fixed;inset:0;z-index:99999;display:flex;align-items:flex-start;justify-content:center;padding-top:min(20vh,120px)}
.mr-search-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.7);backdrop-filter:blur(4px)}
.mr-search-dialog{position:relative;width:90%;max-width:600px;background:var(--mr-surface);border:2px solid var(--mr-ink);border-radius:0;box-shadow:0 24px 80px rgba(0,0,0,.2);overflow:hidden}
.mr-search-input-wrap{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--mr-rule)}
.mr-search-icon{color:rgba(255,255,255,.35);flex-shrink:0}
.mr-search-input{flex:1;background:none;border:none;color:var(--mr-ink);font-size:17px;font-family:'Playfair Display',Georgia,serif;outline:none}
.mr-search-input::placeholder{color:var(--mr-ink-muted)}
.mr-search-kbd{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:2px 6px;font-size:10px;font-family:inherit;color:rgba(255,255,255,.35);flex-shrink:0}
.mr-search-results{max-height:400px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--mr-rule) transparent}
.mr-search-results:empty{display:none}
.mr-search-result{display:flex;align-items:center;gap:12px;padding:12px 20px;text-decoration:none !important;color:var(--mr-ink) !important;transition:background .1s;cursor:pointer;border-bottom:1px solid var(--mr-rule)}
.mr-search-result:hover,.mr-search-result.mr-sr-active{background:rgba(221,52,24,.06);text-decoration:none !important;color:var(--mr-ink) !important}
.mr-search-result:last-child{border-bottom:none}
.mr-sr-type{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;padding:3px 7px;border-radius:4px;flex-shrink:0;min-width:50px;text-align:center}
.mr-sr-type-rider{background:rgba(227,25,55,.15);color:#e31937}
.mr-sr-type-circuit{background:rgba(0,180,80,.12);color:#00cc66}
.mr-sr-type-championship{background:rgba(201,162,39,.15);color:#c9a227}
.mr-sr-name{font-size:15px;font-weight:600;flex:1}
.mr-sr-meta{font-size:11px;color:rgba(255,255,255,.35);flex-shrink:0}
.mr-search-empty{padding:32px 20px;text-align:center;color:rgba(255,255,255,.3);font-size:14px}
.mr-search-loading{padding:24px 20px;text-align:center;color:rgba(255,255,255,.25);font-size:13px}
.mr-search-footer{padding:10px 20px;border-top:1px solid var(--mr-rule);font-size:11px;color:var(--mr-ink-muted)}
.mr-search-hint{}
