/*
Theme Name: Flatsome Child (Mach-Run Apex)
Theme URI: https://woo.foo/mach-run
Description: Child theme of Flatsome implementing the approved "Apex" design (design_handoff_machrun_apex). All design rules ride on machrun-apex.css; this file adds the supplementary chrome the design system doesn't ship (footer layout, header CTA placement, logo tag, mobile burger, etc.).
Author: Redesign team
Template: flatsome
Version: 1.0.34-apex
Text Domain: flatsome-child
*/

/* ============================================================
 * SUPPLEMENTARY RULES (on top of machrun-apex.css)
 * ============================================================ */

/* Body text default colour inside .mr (Flatsome may override). */
body.mr .mr-body { color: var(--mr-ink-2) !important; }

/* Generic page content — make Gutenberg / classic page text readable
   on the dark Apex page background. Catches Flatsome's default
   `.entry-content p { color: ... }` rules that leave body copy
   dim on dark surfaces. */
body.mr .entry-content,
body.mr .entry-content p,
body.mr .entry-content li,
body.mr .entry-content blockquote,
body.mr .entry-content figcaption,
body.mr .entry-content dl,
body.mr .entry-content dd,
body.mr .entry-content dt,
body.mr .entry-content table,
body.mr .entry-content td,
body.mr .entry-content th,
body.mr .page-content,
body.mr .page-content p,
body.mr .post-content,
body.mr .post-content p,
body.mr article p,
body.mr article li,
body.mr .wp-block-paragraph,
body.mr .wp-block-list li,
body.mr .wp-block-quote,
body.mr .wp-block-pullquote p {
    color: var(--mr-ink-2) !important;
    -webkit-text-fill-color: var(--mr-ink-2) !important;
}
body.mr .entry-content h1,
body.mr .entry-content h2,
body.mr .entry-content h3,
body.mr .entry-content h4,
body.mr .entry-content h5,
body.mr .entry-content h6,
body.mr .entry-title,
body.mr .page-title,
body.mr .wp-block-heading {
    color: var(--mr-ink) !important;
    -webkit-text-fill-color: var(--mr-ink) !important;
}

/* Tame Gutenberg dark-text presets that hard-bake colour on
   per-element class — these would normally be intentional choices
   on a light background but read as dark-on-dark in Apex. Lift to
   readable variants. (Light/coloured presets like vivid-red, white,
   pale-pink, vivid-amber are intentional and left alone.) */
body.mr .has-black-color,
body.mr .has-dark-gray-color,
body.mr .has-cyan-bluish-gray-color {
    color: var(--mr-ink-2) !important;
    -webkit-text-fill-color: var(--mr-ink-2) !important;
}

/* Links inside generic page content — Welsh Red on hover */
body.mr .entry-content a:not(.button):not(.mr-btn):not(.wp-block-button__link),
body.mr article a:not(.button):not(.mr-btn):not(.wp-block-button__link) {
    color: var(--mr-accent) !important;
    -webkit-text-fill-color: var(--mr-accent) !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
body.mr .entry-content a:hover { color: var(--mr-ink) !important; -webkit-text-fill-color: var(--mr-ink) !important; }

/* ============================================================
 * LEGACY FLATSOME PAGE CHROME OVERRIDES
 * The original site used Flatsome's blue page-title band + various
 * UX Builder sections with slate-blue bg colours. Force all of
 * those to the Apex dark palette so the legacy pages stop showing
 * up with old styling.
 * ============================================================ */

/* Flatsome's page-title band (used on Adrian Flux, Members Cars, etc.) */
body.mr .page-title,
body.mr .page-title-default,
body.mr .page-title-bg,
body.mr .page-title-inner,
body.mr .title-overlay,
body.mr .page-wrapper > .page-title {
    background: var(--mr-bg) !important;
    background-color: var(--mr-bg) !important;
    background-image: none !important;
    color: var(--mr-ink) !important;
    border-bottom: 1px solid var(--mr-line) !important;
    padding: 32px var(--mr-gutter) !important;
    text-align: left !important;
}
body.mr .page-title h1,
body.mr .page-title .entry-title,
body.mr .page-title-default h1,
body.mr .title-wrapper h1 {
    color: var(--mr-ink) !important;
    -webkit-text-fill-color: var(--mr-ink) !important;
    font-family: var(--mr-font-display) !important;
    text-transform: uppercase !important;
    font-size: clamp(32px, 5vw, 56px) !important;
    line-height: 1 !important;
    margin: 0 !important;
}
body.mr .page-title .breadcrumbs,
body.mr .page-title-inner .breadcrumbs {
    color: var(--mr-muted) !important;
}
body.mr .page-title .breadcrumbs a {
    color: var(--mr-ink-2) !important;
    -webkit-text-fill-color: var(--mr-ink-2) !important;
}

/* UX Builder + Flatsome section background overrides — any element
   carrying a slate-blue or off-cyan colour inline gets pulled back
   to Apex dark. Targets common legacy values used by Flatsome
   "Default Slate" theme. */
body.mr .section[style*="rgb(91, 110, 143)"],
body.mr .section[style*="#5b6e8f"],
body.mr .section[style*="#5B6E8F"],
body.mr .ux-banner[style*="rgb(91, 110, 143)"],
body.mr .ux_banner[style*="#5b6e8f"],
body.mr [data-bg*="5b6e8f"],
body.mr [bg-color="#5b6e8f"] {
    background-color: var(--mr-bg) !important;
}

/* Catch-all: any Flatsome ".dark" / ".has-dark" surface that's
   meant to be a dark band — make it match Apex bg exactly so the
   colour doesn't fight the rest of the page. */
body.mr .dark,
body.mr .section.dark,
body.mr .row.dark { background-color: var(--mr-bg) !important; }

/* Common Flatsome cover blocks with blue overlay */
body.mr .wp-block-cover.has-vivid-cyan-blue-background-color,
body.mr .wp-block-cover.has-pale-cyan-blue-background-color {
    background-color: var(--mr-panel) !important;
}

/* ============================================================
 * AGGRESSIVE BODY TEXT — catches text in Flatsome's wrappers
 * that don't carry .entry-content (older UX Builder pages).
 * ============================================================ */
body.mr article p,
body.mr article li,
body.mr article blockquote,
body.mr article figcaption,
body.mr .post-content p,
body.mr .post-content li,
body.mr .col-inner p,
body.mr .col-inner li,
body.mr .col-inner blockquote,
body.mr .text p,
body.mr .text li,
body.mr .text-block p,
body.mr .wp-block-group p,
body.mr .wp-block-column p,
body.mr .wp-block-columns p,
body.mr .ux-banner p,
body.mr .ux_banner p,
body.mr .row p,
body.mr .row li,
body.mr .row blockquote,
body.mr .section p,
body.mr .section li {
    color: var(--mr-ink-2) !important;
    -webkit-text-fill-color: var(--mr-ink-2) !important;
}
body.mr article h1,
body.mr article h2,
body.mr article h3,
body.mr article h4,
body.mr article h5,
body.mr article h6,
body.mr .post-content h1,
body.mr .post-content h2,
body.mr .post-content h3,
body.mr .post-content h4,
body.mr .col-inner h1,
body.mr .col-inner h2,
body.mr .col-inner h3,
body.mr .col-inner h4,
body.mr .row h1,
body.mr .row h2,
body.mr .row h3,
body.mr .row h4,
body.mr .section h1,
body.mr .section h2,
body.mr .section h3,
body.mr .section h4 {
    color: var(--mr-ink) !important;
    -webkit-text-fill-color: var(--mr-ink) !important;
}

/* ============================================================
 * SINGLE POSTS (News articles) — full-bleed Apex
 * ============================================================ */
body.mr.single-post .post-inside,
body.mr.single-post article.post,
body.mr.single-post .page-wrapper,
body.mr.single-post #content,
body.mr.blog #content,
body.mr.archive #content {
    background: var(--mr-bg) !important;
    color: var(--mr-ink) !important;
}
body.mr.single-post article.post .article-inner,
body.mr.single-post .entry-header,
body.mr.single-post .entry-content {
    background: transparent !important;
    color: var(--mr-ink-2) !important;
    padding: 32px var(--mr-gutter) !important;
}
body.mr.single-post .entry-title,
body.mr.blog .post-title {
    font-family: var(--mr-font-display) !important;
    text-transform: uppercase !important;
    color: var(--mr-ink) !important;
    -webkit-text-fill-color: var(--mr-ink) !important;
}
body.mr.single-post .entry-meta,
body.mr.single-post .post-meta,
body.mr.single-post .author-box {
    color: var(--mr-muted) !important;
    font-family: var(--mr-font-mono) !important;
    font-size: 12px !important;
    letter-spacing: .1em !important;
    text-transform: uppercase !important;
}

/* News index — blog listings */
body.mr.blog .article-inner,
body.mr.blog article {
    background: transparent !important;
    border-bottom: 1px solid var(--mr-line);
    padding: 32px var(--mr-gutter) !important;
}

/* ============================================================
 * NEWS LIST (rendered by [mr_news_posts]) — Apex card grid
 * ============================================================ */
.mr-news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
    border: 1px solid var(--mr-line);
    margin: 32px 0;
}
.mr-news-card {
    display: flex;
    flex-direction: column;
    background: var(--mr-panel);
    border-right: 1px solid var(--mr-line);
    border-bottom: 1px solid var(--mr-line);
    text-decoration: none;
    transition: background-color .15s var(--mr-ease);
}
.mr-news-card:hover { background: var(--mr-panel-2); text-decoration: none; }
.mr-news-card__image {
    aspect-ratio: 16 / 10;
    background: var(--mr-panel-2);
    overflow: hidden;
}
.mr-news-card__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    filter: saturate(0.85) contrast(1.08) brightness(0.96) sepia(0.06);
    transition: transform .4s var(--mr-ease);
}
.mr-news-card:hover .mr-news-card__image img { transform: scale(1.04); }
.mr-news-card__image--placeholder {
    background: linear-gradient(135deg, var(--mr-panel) 0%, var(--mr-panel-2) 100%);
}
.mr-news-card__body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.mr-news-card__date {
    color: var(--mr-accent) !important;
    -webkit-text-fill-color: var(--mr-accent) !important;
    margin-bottom: 10px;
}
.mr-news-card__title {
    font-family: var(--mr-font-display) !important;
    text-transform: uppercase;
    font-size: 22px !important;
    line-height: 1.05 !important;
    color: var(--mr-ink) !important;
    -webkit-text-fill-color: var(--mr-ink) !important;
    margin: 0 0 12px !important;
}
.mr-news-card__excerpt {
    color: var(--mr-ink-2) !important;
    -webkit-text-fill-color: var(--mr-ink-2) !important;
    font-size: 14px !important;
    line-height: 1.5;
    margin: 0 0 14px;
    flex: 1;
}
.mr-news-card__more {
    font-family: var(--mr-font-mono);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mr-accent);
    margin-top: auto;
}

/* ============================================================
 * SINGLE POST (single.php) — Apex post detail layout
 * ============================================================ */
.mr-post__hero {
    margin: 0 0 0 !important;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    background: var(--mr-panel-2);
}
.mr-post__hero img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    filter: saturate(0.85) contrast(1.08) brightness(0.96) sepia(0.06);
}
.mr-post__cats {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.mr-post__cats a {
    color: var(--mr-muted) !important;
    text-decoration: none !important;
}
.mr-post__cats a:hover { color: var(--mr-accent) !important; }

.mr-post__nav {
    border-top: 1px solid var(--mr-line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 48px;
}
.mr-post__nav-link {
    padding: 22px 24px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--mr-bg);
    transition: background-color .15s var(--mr-ease);
}
.mr-post__nav-link:hover { background: var(--mr-panel); }
.mr-post__nav-link--prev { border-right: 1px solid var(--mr-line); }
.mr-post__nav-link--next { text-align: right; grid-column: 2; }
.mr-post__nav-title {
    font-family: var(--mr-font-display);
    text-transform: uppercase;
    font-size: 18px;
    line-height: 1.1;
    color: var(--mr-ink);
}

/* ============================================================
 * SHOP SIDEBAR — Apex-styled WC filter widgets
 * (price + categories + active filters)
 * Re-enable the .col.large-3 column we previously hid + style
 * its content. Scoped to shop / category / tag archives only.
 * ============================================================ */
body.woocommerce-shop .col.large-3.hide-for-medium,
body.tax-product_cat .col.large-3.hide-for-medium,
body.tax-product_tag .col.large-3.hide-for-medium {
    display: block !important; /* override our earlier hide rule */
}
body.woocommerce-shop #shop-sidebar,
body.tax-product_cat #shop-sidebar,
body.tax-product_tag #shop-sidebar {
    padding: 0 !important;
}
/* Hide the "You need to assign Widgets" placeholder paragraph */
body.woocommerce-shop #shop-sidebar > p,
body.tax-product_cat #shop-sidebar > p,
body.tax-product_tag #shop-sidebar > p { display: none !important; }

.mr-shop-filters {
    background: var(--mr-bg);
    border: 1px solid var(--mr-line);
    color: var(--mr-ink-2);
    padding: 0;
    margin: 16px 0;
}
.mr-shop-filters .mr-filter {
    border-bottom: 1px solid var(--mr-line);
}
.mr-shop-filters .mr-filter:last-child { border-bottom: none; }
.mr-shop-filters .mr-filter__inner { padding: 20px 22px; }
.mr-shop-filters .mr-filter__title {
    color: var(--mr-muted) !important;
    -webkit-text-fill-color: var(--mr-muted) !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    background: transparent !important;
}
/* Price slider */
.mr-shop-filters .price_slider_wrapper { padding: 0; }
.mr-shop-filters .price_slider {
    background: var(--mr-panel-2);
    height: 4px;
    border-radius: 0;
    border: 1px solid var(--mr-line);
    margin: 16px 0;
}
.mr-shop-filters .price_slider .ui-slider-range {
    background: var(--mr-accent);
    height: 4px;
}
.mr-shop-filters .price_slider .ui-slider-handle {
    background: var(--mr-ink) !important;
    border: 1px solid var(--mr-ink) !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 0 !important;
    top: -6px !important;
    margin-left: -7px;
}
.mr-shop-filters .price_slider_amount {
    color: var(--mr-ink-2);
    font-family: var(--mr-font-mono);
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}
.mr-shop-filters .price_slider_amount .price_label { color: var(--mr-ink); }
.mr-shop-filters .price_slider_amount .button {
    background: var(--mr-accent) !important;
    color: var(--mr-on-accent) !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px 16px !important;
    font-family: var(--mr-font-mono) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    margin-left: auto;
}
/* Categories list */
.mr-shop-filters .product-categories,
.mr-shop-filters ul.cat-item,
.mr-shop-filters ul.product_list_widget {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mr-shop-filters .product-categories li,
.mr-shop-filters .cat-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.mr-shop-filters .product-categories li:last-child { border-bottom: none; }
.mr-shop-filters .product-categories a,
.mr-shop-filters .cat-item a {
    color: var(--mr-ink-2) !important;
    -webkit-text-fill-color: var(--mr-ink-2) !important;
    font-family: var(--mr-font-body);
    font-size: 14px;
    text-decoration: none !important;
    text-transform: none;
    letter-spacing: 0;
    display: inline-block;
}
.mr-shop-filters .product-categories a:hover,
.mr-shop-filters .cat-item a:hover { color: var(--mr-accent) !important; }
.mr-shop-filters .product-categories .count,
.mr-shop-filters .cat-item .count {
    color: var(--mr-muted) !important;
    -webkit-text-fill-color: var(--mr-muted) !important;
    font-family: var(--mr-font-mono);
    font-size: 11px;
    margin-left: 6px;
}
.mr-shop-filters .product-categories .children {
    padding-left: 16px;
    margin-top: 8px;
}

/* Active filters / chosen */
.mr-shop-filters .woocommerce-widget-layered-nav-list,
.mr-shop-filters ul.chosen {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mr-shop-filters .chosen li {
    background: var(--mr-panel);
    border: 1px solid var(--mr-line);
    padding: 6px 10px;
    font-family: var(--mr-font-mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mr-ink-2);
}
.mr-shop-filters .chosen li a {
    color: var(--mr-accent) !important;
    text-decoration: none !important;
    margin-right: 4px;
}

/* Flatsome "image circle" treatment used on Members Cars —
   neutralise the circular mask so cards render as Apex squares */
body.mr .box-image-overlay-circle .box-image,
body.mr .box.is-circle .box-image { border-radius: 0 !important; }

/* ============================================================
 * APEX — GENERIC PAGE TEMPLATE  (templates/template-apex-page.php)
 * Universal wrapper for any legacy page that gets assigned this
 * template. Provides a clean title bar + dark content surface
 * regardless of what UX Builder / Gutenberg blocks the page
 * had baked in.
 * ============================================================ */
.mr-page {
    background: var(--mr-bg) !important;
    color: var(--mr-ink-2) !important;
    min-height: 60vh;
}

.mr-page__title-bar {
    padding: 48px var(--mr-gutter) 32px;
    border-bottom: 1px solid var(--mr-line);
    background: var(--mr-bg);
}
.mr-page__title-bar .mr-eyebrow { margin-bottom: 12px; }
.mr-page__title {
    font-size: clamp(40px, 6vw, 80px) !important;
    line-height: .96 !important;
    margin: 0 !important;
    color: var(--mr-ink) !important;
    -webkit-text-fill-color: var(--mr-ink) !important;
    font-family: var(--mr-font-display) !important;
    text-transform: uppercase;
    letter-spacing: -0.005em;
}

.mr-page__content {
    padding: 48px var(--mr-gutter) 72px;
    background: var(--mr-bg) !important;
    color: var(--mr-ink-2) !important;
    max-width: 1480px;
    margin: 0 auto;
}
.mr-page__content > * + * { margin-top: 18px; }
.mr-page__content p,
.mr-page__content li,
.mr-page__content blockquote,
.mr-page__content figcaption {
    color: var(--mr-ink-2) !important;
    -webkit-text-fill-color: var(--mr-ink-2) !important;
    font-family: var(--mr-font-body);
    font-size: 17px;
    line-height: 1.65;
}
.mr-page__content h1,
.mr-page__content h2,
.mr-page__content h3,
.mr-page__content h4,
.mr-page__content h5,
.mr-page__content h6 {
    color: var(--mr-ink) !important;
    -webkit-text-fill-color: var(--mr-ink) !important;
    font-family: var(--mr-font-display) !important;
    text-transform: uppercase;
    letter-spacing: -0.005em;
    margin-top: 40px;
}
.mr-page__content h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1; }
.mr-page__content h3 { font-size: clamp(22px, 3vw, 32px); line-height: 1.1; }
.mr-page__content h4 { font-size: 20px; line-height: 1.2; }
.mr-page__content a {
    color: var(--mr-accent) !important;
    -webkit-text-fill-color: var(--mr-accent) !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.mr-page__content a:hover { color: var(--mr-ink) !important; }
.mr-page__content img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--mr-line);
}
.mr-page__content .wp-block-image figcaption {
    font-family: var(--mr-font-mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mr-muted);
}

/* Force any nested section / banner inside Apex page to stop
   wearing its old blue/grey backgrounds */
.mr-page__content .section,
.mr-page__content .ux-banner,
.mr-page__content .ux_banner,
.mr-page__content [class*="bg-color"],
.mr-page__content .has-background {
    background-color: transparent !important;
}
.mr-page__content .wp-block-cover {
    background: var(--mr-panel) !important;
    color: var(--mr-ink) !important;
}
.mr-page__content .wp-block-cover * { color: var(--mr-ink) !important; }

/* Force display headings to render in --mr-ink (warm off-white).
   Flatsome's parent heading colour leaks through and tints them
   grey otherwise. Belt-and-braces: also set -webkit-text-fill-color
   so any gradient-text trick can't beat us. */
body.mr .mr-h1,
body.mr .mr-h2,
body.mr .mr-h3,
body.mr .mr-display,
body.mr .mr-event-name,
body.mr .mr-charity-text .mr-h2,
body.mr .mr-nextruns .mr-h2,
body.mr .mr-hero-cell--text .mr-h1,
.mr .mr-h1, .mr .mr-h2, .mr .mr-h3, .mr .mr-display, .mr .mr-event-name {
    color: var(--mr-ink) !important;
    -webkit-text-fill-color: var(--mr-ink) !important;
    background: transparent !important;
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
}

/* Accent text inside a heading (e.g. "OBSESSION" in the hero,
   "RUN" in the footer wordmark) overrides the heading colour. */
body.mr .mr-h1 .mr-accent-text,
body.mr .mr-h2 .mr-accent-text,
body.mr .mr-h3 .mr-accent-text,
body.mr .mr-display .mr-accent-text,
body.mr .mr-accent-text,
.mr .mr-accent-text {
    color: var(--mr-accent) !important;
    -webkit-text-fill-color: var(--mr-accent) !important;
}

/* Reset Flatsome's wrapper paddings / max-widths so our hard grids
   can go edge to edge. Scoped to .mr so we don't leak into shop /
   admin / un-themed pages. */
.mr#wrapper,
#wrapper.mr {
    max-width: none;
    padding: 0;
    margin: 0;
    background: var(--mr-bg);
}
.mr-main { display: block; min-height: 40vh; }

/* Hide Flatsome's leftover chrome that might still try to render
   inside a child-theme rendered page (sticky overlays, demo bars). */
body.mr #top-bar,
body.mr .header-wrapper,
body.mr header#header,
body.mr footer.footer-wrapper,
body.mr .absolute-footer,
body.mr .footer-secondary,
body.mr .woocommerce-store-notice { display: none !important; }

/* Body bg + text safety (in case anything renders outside .mr wrappers). */
body.mr { background: var(--mr-bg); color: var(--mr-ink); }

/* ============================================================
 * Header — extras not in machrun-apex.css
 * ============================================================ */
.mr-header { padding: 0 var(--mr-gutter); }

.mr-logo__tag {
    font-family: var(--mr-font-mono);
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--mr-muted-2);
    line-height: 1.15;
    margin-left: 12px;
    align-self: center;
}

.mr-header__right {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0;
}

.mr-header__cta {
    height: 100%;
    padding: 0 22px !important;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    font-family: var(--mr-font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Cart pill — sits left of CHARITY INFO CTA */
.mr-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 0 18px;
    border-left: 1px solid var(--mr-line);
    color: var(--mr-ink);
    text-decoration: none;
    font-family: var(--mr-font-mono);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: color .15s var(--mr-ease);
}
.mr-cart:hover { color: var(--mr-accent); }
.mr-cart__label { color: var(--mr-muted); }
.mr-cart__count {
    display: inline-block;
    min-width: 20px;
    padding: 2px 6px;
    background: var(--mr-accent);
    color: var(--mr-on-accent);
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
}
@media (max-width: 900px) {
    .mr-cart__label { display: none; }
    .mr-cart { padding: 0 10px; }
}

/* ============================================================
 * Footer — the Apex spec calls it out in README §4.3 but the
 * base CSS doesn't ship its layout. Implement here.
 * ============================================================ */
.mr-footer {
    background: var(--mr-bg);
    color: var(--mr-ink-2);
    border-top: 1px solid var(--mr-line);
    padding: 56px var(--mr-gutter) 0;
}

.mr-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 0;
}

.mr-footer__col {
    padding: 0 36px 56px;
    border-right: 1px solid var(--mr-line);
}
.mr-footer__col:first-child { padding-left: 0; }
.mr-footer__col:last-child  { padding-right: 0; border-right: none; }

.mr-footer__col--brand { max-width: none; }

.mr-footer__wordmark {
    font-family: var(--mr-font-display);
    font-size: 44px;
    line-height: 1;
    color: var(--mr-ink);
    text-transform: uppercase;
    letter-spacing: .005em;
    margin-bottom: 18px;
}
.mr-accent-text { color: var(--mr-accent); }

.mr-footer__mission {
    font-family: var(--mr-font-body);
    font-size: 14px;
    line-height: 1.55;
    color: var(--mr-muted);
    max-width: 340px;
    margin: 0;
}

.mr-footer__label {
    font-family: var(--mr-font-mono);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--mr-muted-3);
    margin-bottom: 18px;
}

.mr-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mr-footer__links a {
    font-family: var(--mr-font-body);
    font-size: 14px;
    color: var(--mr-ink-2);
    text-decoration: none;
    transition: color .15s var(--mr-ease);
}
.mr-footer__links a:hover { color: var(--mr-accent); }

.mr-footer__sub {
    border-top: 1px solid var(--mr-line);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    font-family: var(--mr-font-mono);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mr-muted-3);
}

/* Whitfield credit line — sits below the sub-bar */
.mr-footer__credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px var(--mr-gutter);
    border-top: 1px solid var(--mr-line);
    background: var(--mr-bg);
    font-family: var(--mr-font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mr-muted-3);
}
.mr-footer__credit-logo {
    height: 28px;
    width: auto;
    display: block;
    opacity: 0.85;
    transition: opacity .15s var(--mr-ease);
}
.mr-footer__credit-logo:hover { opacity: 1; }
.mr-footer__credit a {
    color: var(--mr-ink-2) !important;
    -webkit-text-fill-color: var(--mr-ink-2) !important;
    text-decoration: none !important;
    transition: color .15s var(--mr-ease);
}
.mr-footer__credit a:hover {
    color: var(--mr-accent) !important;
    -webkit-text-fill-color: var(--mr-accent) !important;
}
@media (max-width: 549px) {
    .mr-footer__credit { flex-direction: column; gap: 8px; padding: 16px var(--mr-gutter); }
}

/* ============================================================
 * MOBILE MENU — burger button + slide-out drawer + scrim
 * ============================================================ */
.mr-burger {
    display: none; /* shown only on mobile via media query below */
    width: 44px;
    height: 100%;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--mr-ink);
}
.mr-burger__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--mr-ink);
    transition: transform .2s var(--mr-ease), opacity .15s var(--mr-ease);
}
.mr-burger[aria-expanded="true"] .mr-burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mr-burger[aria-expanded="true"] .mr-burger__bar:nth-child(2) { opacity: 0; }
.mr-burger[aria-expanded="true"] .mr-burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mr-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 360px);
    background: var(--mr-bg);
    border-left: 1px solid var(--mr-line);
    z-index: 90;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .25s var(--mr-ease);
    overflow-y: auto;
    visibility: hidden;
}
body.mr-drawer-open .mr-drawer {
    transform: translateX(0);
    visibility: visible;
}
.mr-drawer__scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 80;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s var(--mr-ease), visibility 0s linear .2s;
}
body.mr-drawer-open .mr-drawer__scrim {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
body.mr-drawer-open { overflow: hidden; }

.mr-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px var(--mr-gutter);
    border-bottom: 1px solid var(--mr-line);
}
.mr-drawer__head .mr-eyebrow { margin: 0; }
.mr-drawer__close {
    background: transparent;
    border: none;
    color: var(--mr-ink);
    font-size: 32px;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-family: var(--mr-font-display);
}
.mr-drawer__close:hover { color: var(--mr-accent); }

.mr-drawer__nav {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    flex: 1;
}
.mr-drawer__nav .mr-nav__link,
.mr-drawer__nav a {
    display: block !important;
    height: auto !important;
    padding: 18px var(--mr-gutter) !important;
    font-family: var(--mr-font-mono);
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mr-ink) !important;
    text-decoration: none;
    border-bottom: 1px solid var(--mr-line);
    background: transparent !important;
}
.mr-drawer__nav .mr-nav__link:hover,
.mr-drawer__nav a:hover { color: var(--mr-accent) !important; background: var(--mr-panel) !important; }
.mr-drawer__nav .mr-nav__link.is-active {
    background: var(--mr-panel) !important;
    color: var(--mr-ink) !important;
    border-left: 3px solid var(--mr-accent) !important;
}

.mr-drawer__cta {
    border-top: 1px solid var(--mr-line);
    padding: 18px var(--mr-gutter);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mr-drawer__charity {
    width: 100%;
    text-align: center;
    padding: 16px 22px !important;
}
.mr-drawer__cart-link {
    text-align: center;
    color: var(--mr-muted) !important;
    font-family: var(--mr-font-mono);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 8px 0;
}
.mr-drawer__cart-link:hover { color: var(--mr-accent) !important; }

/* ============================================================
 * Responsive — collapse footer + header on narrow screens
 * ============================================================ */
@media (max-width: 900px) {
    .mr-header { padding: 0 var(--mr-gutter); }
    .mr-logo__tag { display: none; }
    .mr-nav { display: none; } /* replaced by burger + drawer on mobile */
    .mr-burger { display: inline-flex; }
    .mr-header__cta { padding: 0 14px !important; font-size: 11px; }
    .mr-header__cta { display: none; }  /* CTA moves into the drawer to save header space */
    .mr-cart__label { display: none; }

    .mr-footer__grid { grid-template-columns: 1fr; }
    .mr-footer__col {
        padding: 36px 0;
        border-right: none;
        border-bottom: 1px solid var(--mr-line);
    }
    .mr-footer__col:last-child { border-bottom: none; }
    .mr-footer__sub { flex-direction: column; gap: 8px; }
}

/* ============================================================
 * HOMEPAGE (front-page.php) — Apex blocks per README §5.1
 * ============================================================ */

/* ---- 1. Hero (split grid) ---- */
.mr-hero-section { min-height: 70vh; }
.mr-hero-cell { position: relative; }
.mr-hero-cell--text {
    padding: 96px var(--mr-gutter);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--mr-bg);
}
.mr-hero-cell--text .mr-h1 { margin: 18px 0 24px; }
.mr-hero-body { max-width: 480px; margin: 0 0 32px; }
.mr-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.mr-accent-text { color: var(--mr-accent); }

.mr-hero-cell--image {
    background-size: cover;
    background-position: center;
    background-color: var(--mr-panel-2);
    min-height: 420px;
    border-left: 1px solid var(--mr-line);
}
.mr-hero-caption {
    position: absolute;
    left: 22px;
    bottom: 22px;
    color: var(--mr-ink);
    font-size: 11px;
    background: linear-gradient(to top, rgba(12,12,13,.8), transparent);
    padding: 14px 18px;
    border-radius: 0;
}

/* ---- 2. Stat bar ---- */
.mr-statbar { background: var(--mr-bg); }
.mr-statbar .mr-stat { border-right: 1px solid var(--mr-line); }
.mr-statbar .mr-stat:last-child { border-right: none; }

/* ---- 3. Charity feature ---- */
.mr-charity-feature { background: var(--mr-bg); min-height: 480px; }
.mr-charity-image {
    background-size: cover;
    background-position: center;
    background-color: var(--mr-panel-2);
    min-height: 420px;
}
.mr-charity-text {
    padding: 72px var(--mr-gutter);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--mr-line);
    background: var(--mr-panel);
}
.mr-charity-text .mr-h2 { margin: 18px 0 22px; }
.mr-charity-text .mr-body { margin: 0 0 28px; max-width: 480px; }
.mr-charity-text .mr-btn { align-self: flex-start; }

/* ---- 4. Next runs (3-up event cards) ---- */
.mr-nextruns { background: var(--mr-bg); }
.mr-nextruns__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}
.mr-nextruns__cards { gap: 16px; }

.mr-event-card {
    background: var(--mr-panel);
    border: 1px solid var(--mr-line-strong);
    display: flex;
    flex-direction: column;
}
.mr-event-card .mr-card__body {
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    min-height: 220px;
}
.mr-event-date {
    font-family: var(--mr-font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--mr-accent) !important;
    margin-bottom: 12px;
}
.mr-event-name {
    font-family: var(--mr-font-display);
    font-size: 30px;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--mr-ink);
    margin: 0 0 14px;
    letter-spacing: .01em;
}
.mr-event-card .mr-meta { color: var(--mr-muted); margin-bottom: 18px; }
.mr-event-foot {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--mr-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mr-event-cta {
    font-family: var(--mr-font-display);
    font-size: 26px;
    text-decoration: none;
    transition: transform .15s var(--mr-ease);
}
.mr-event-cta:hover { transform: translateX(4px); }
.mr-event-card--placeholder { opacity: 0.88; }

/* ---- 5. Gallery ---- */
.mr-gallery-section { background: var(--mr-bg); }
.mr-gallery-section .mr-eyebrow { margin-bottom: 24px; }

/* ============================================================
 * ABOUT PAGE (template-apex-about.php) — per README §5.4
 * ============================================================ */

/* ---- 1. Split hero ---- */
.mr-about-hero { background: var(--mr-bg); min-height: 60vh; }
.mr-about-hero__text {
    padding: 96px var(--mr-gutter);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mr-about-hero__h1 {
    font-size: clamp(48px, 8vw, 96px);
    line-height: .9;
    margin-top: 18px;
}
.mr-about-hero__image {
    background-size: cover;
    background-position: center;
    background-color: var(--mr-panel-2);
    min-height: 420px;
    border-left: 1px solid var(--mr-line);
}

/* ---- 2. Statement + story ---- */
.mr-about-statement { background: var(--mr-bg); }
.mr-about-lede {
    font-family: var(--mr-font-display);
    text-transform: uppercase;
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.15;
    color: var(--mr-ink-2);
    letter-spacing: .005em;
    max-width: 900px;
    margin: 0 0 56px;
    text-wrap: balance;
}
.mr-about-story { gap: 32px; }
.mr-about-story__col .mr-body {
    max-width: 540px;
    color: var(--mr-ink-2);
    font-size: var(--mr-body-lg);
    line-height: 1.65;
}

/* ---- 3. (Stat bar reuses the existing .mr-statbar rules from the home page) ---- */

/* ---- 4. Gallery — 6 photos at 4:3 ---- */
.mr-about-gallery .mr-eyebrow { margin-bottom: 24px; }
.mr-gallery--4-3 .mr-gallery__cell,
.mr-gallery__cell--4-3 { aspect-ratio: 4 / 3; }

/* ============================================================
 * Responsive — homepage adjustments
 * ============================================================ */
@media (max-width: 900px) {
    .mr-hero-section { min-height: auto; }
    .mr-hero-cell--text { padding: 56px var(--mr-gutter); }
    .mr-hero-cell--image { min-height: 320px; border-left: none; border-top: 1px solid var(--mr-line); }
    .mr-charity-image { min-height: 280px; }
    .mr-charity-text { padding: 48px var(--mr-gutter); border-left: none; border-top: 1px solid var(--mr-line); }
    .mr-nextruns__head { flex-direction: column; align-items: flex-start; }
    .mr-event-name { font-size: 26px; }
    .mr-statbar { grid-template-columns: 1fr 1fr; }
    .mr-statbar .mr-stat:nth-child(2) { border-right: none; }
    .mr-statbar .mr-stat:nth-child(-n+2) { border-bottom: 1px solid var(--mr-line); }

    /* About hero collapse */
    .mr-about-hero { min-height: auto; }
    .mr-about-hero__text { padding: 56px var(--mr-gutter); }
    .mr-about-hero__image { min-height: 280px; border-left: none; border-top: 1px solid var(--mr-line); }
    .mr-about-story { grid-template-columns: 1fr; gap: 24px; }
    .mr-gallery--3 { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
 * Skip-link — keep visible-on-focus accessibility behaviour.
 * ============================================================ */
.skip-link.screen-reader-text {
    position: absolute; left: -9999px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
}
.skip-link.screen-reader-text:focus {
    left: 6px; top: 7px; z-index: 100000;
    width: auto; height: auto; padding: 12px 18px;
    background: var(--mr-accent); color: var(--mr-on-accent);
    font-family: var(--mr-font-mono); font-size: 12px; letter-spacing: .1em;
    text-transform: uppercase;
}
