/* ================================
   Compare Casinos - Crypto Neon (Variant B)
   ================================ */

:root {
    /* Crypto Neon palette */
    --cyan: #00D9FF;
    --cyan-hot: #4ee7ff;
    --cyan-dim: #006d80;
    --magenta: #FF00AA;
    --magenta-hot: #ff3dbc;
    --magenta-dim: #80004f;
    --acid: #00FF94;
    --acid-dim: #006e3f;
    --hot-red: #FF3355;
    --hot-red-dim: #7a1929;

    /* Win/Loss/Draw */
    --win: #00FF94;
    --loss: #FF3355;
    --draw: #8a8a8a;

    /* Surfaces */
    --bg: #0A0E1A;
    --bg-2: #11162A;
    --bg-3: #1a213a;
    --bg-4: #232b48;
    --border: #232b48;
    --border-hi: #2f3859;

    /* Text */
    --text: #E8F4FF;
    --text-bright: #ffffff;
    --text-dim: #9aabc4;
    --text-muted: #6a7a96;

    /* Fonts */
    --f-display: "Space Grotesk", "Inter", system-ui, sans-serif;
    --f-body: "Inter", system-ui, sans-serif;
    --f-mono: "JetBrains Mono", "Consolas", monospace;

    /* Radii */
    --r-xs: 3px;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;

    /* Transitions */
    --t-fast: 150ms ease;
    --t-base: 250ms ease;

    /* Glow shadows */
    --glow-cyan: 0 0 20px rgba(0, 217, 255, 0.35), 0 0 40px rgba(0, 217, 255, 0.1);
    --glow-magenta: 0 0 20px rgba(255, 0, 170, 0.35), 0 0 40px rgba(255, 0, 170, 0.1);
    --glow-acid: 0 0 16px rgba(0, 255, 148, 0.35);
    --shadow-deep: 0 8px 32px rgba(0, 0, 0, 0.7);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.5);

    /* Layout */
    --container: 1200px;
    --container-narrow: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(circle at 15% 0%, rgba(0, 217, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 50%, rgba(255, 0, 170, 0.04) 0%, transparent 40%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.container-narrow { max-width: var(--container-narrow); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-display);
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.2;
    letter-spacing: -0.005em;
}
h1 { font-size: clamp(1.95rem, 3.6vw, 2.8rem); margin-bottom: 1rem; line-height: 1.2; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-bottom: 1rem; line-height: 1.25; }
h3 { font-size: 1.35rem; margin-bottom: 0.65rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
strong { font-weight: 700; color: var(--text-bright); }
em { font-style: italic; color: var(--text); }

a {
    color: var(--cyan);
    text-decoration: none;
    transition: all var(--t-fast);
    border-bottom: 1px dotted transparent;
}
a:hover {
    color: var(--cyan-hot);
    border-bottom-color: var(--cyan-hot);
    text-shadow: 0 0 8px rgba(78, 231, 255, 0.4);
}

.text-cyan { color: var(--cyan); }
.text-magenta { color: var(--magenta); }
.text-acid { color: var(--acid); }
.text-win { color: var(--win); }
.text-loss { color: var(--loss); }
.text-warn { color: #FFB800; }
.text-mono { font-family: var(--f-mono); }

img { max-width: 100%; height: auto; display: block; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.65rem;
    font-family: var(--f-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--t-base);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--cyan);
    color: var(--bg);
    border-color: var(--cyan);
}
.btn-primary:hover {
    background: var(--cyan-hot);
    color: var(--bg);
    transform: translateY(-1px);
    box-shadow: var(--glow-cyan);
    border-bottom-color: var(--cyan-hot);
}
.btn-accent {
    background: var(--magenta);
    color: var(--text-bright);
    border-color: var(--magenta);
}
.btn-accent:hover {
    background: var(--magenta-hot);
    color: var(--text-bright);
    transform: translateY(-1px);
    box-shadow: var(--glow-magenta);
    border-bottom-color: var(--magenta-hot);
}
.btn-outline {
    background: transparent;
    color: var(--cyan);
    border-color: var(--cyan-dim);
}
.btn-outline:hover {
    background: rgba(0, 217, 255, 0.1);
    color: var(--cyan-hot);
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-hi);
}
.btn-ghost:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

section { padding: 3rem 0; }

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.section-header h2 { margin: 0; }
.section-header__link {
    font-family: var(--f-body);
    font-size: 0.92rem;
    color: var(--cyan);
    border-bottom: 1px dashed var(--cyan-dim);
}
.section-header__link:hover { border-bottom-style: solid; box-shadow: 0 1px 0 var(--cyan-hot); }

.breadcrumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 1.25rem 0 0.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-dim); border-bottom: none; }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs-sep { color: var(--text-muted); }

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-family: var(--f-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--r-xs);
}
.badge--cyan {
    background: rgba(0, 217, 255, 0.12);
    color: var(--cyan);
    border: 1px solid var(--cyan-dim);
}
.badge--magenta {
    background: rgba(255, 0, 170, 0.12);
    color: var(--magenta-hot);
    border: 1px solid var(--magenta-dim);
}
.badge--acid {
    background: rgba(0, 255, 148, 0.12);
    color: var(--acid);
    border: 1px solid var(--acid-dim);
}
.badge--red {
    background: rgba(255, 51, 85, 0.12);
    color: var(--hot-red);
    border: 1px solid var(--hot-red-dim);
}
.badge--wip {
    background: rgba(255, 0, 170, 0.08);
    color: var(--magenta-hot);
    border: 1px dashed var(--magenta-dim);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.85rem 0;
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.site-header__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--f-display);
    font-size: 1.25rem;
    color: var(--text-bright);
    border-bottom: none;
    font-weight: 700;
}
.site-header__logo:hover {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.3);
}
.site-header__logo-icon { width: 28px; height: 28px; color: var(--cyan); filter: drop-shadow(0 0 6px rgba(0, 217, 255, 0.4)); }
.site-header__nav { display: flex; gap: 0.25rem; align-items: center; }
.site-header__nav a {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
    border-radius: var(--r-xs);
    transition: all var(--t-fast);
    border-bottom: none;
}
.site-header__nav a:hover, .site-header__nav a.active {
    color: var(--cyan);
    background: rgba(0, 217, 255, 0.08);
    text-shadow: none;
}
.site-header__cta { padding: 0.55rem 1.1rem; font-size: 0.88rem; }

/* === Mobile burger button (hidden on desktop) === */
.site-header__burger {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all var(--t-fast);
}
.site-header__burger:hover { border-color: var(--cyan-dim); }
.site-header__burger-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-bright);
    border-radius: 2px;
    transition: all var(--t-fast);
}
.site-header__burger[aria-expanded="true"] .site-header__burger-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.site-header__burger[aria-expanded="true"] .site-header__burger-bar:nth-child(2) {
    opacity: 0;
}
.site-header__burger[aria-expanded="true"] .site-header__burger-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* === Drawer-only chrome (hidden on desktop, visible inside mobile drawer) === */
.site-drawer__head,
.site-drawer__foot,
.site-drawer__backdrop,
.site-drawer__only { display: none; }

/* ============================================================
   MOBILE DRAWER — proper off-canvas right-side panel
   Active under 920px viewport. Built per mobile-design skill:
   thumb-zone CTA, 48px touch targets, slide-in 320ms, scroll lock,
   close on Esc / backdrop / link / X.
   ============================================================ */
@media (max-width: 920px) {

    /* === Header inner: row 1 = logo+burger, row 2 = full-width Get Lucky CTA === */
    .site-header__inner {
        flex-wrap: wrap;
        gap: 0.6rem 0.75rem;
        align-items: center;
    }
    .site-header__logo {
        flex: 1 1 auto;
        min-width: 0;
        order: 1;
    }
    .site-header__burger {
        display: inline-flex;
        flex: 0 0 auto;
        order: 2;
        position: relative;
        z-index: 110; /* stays above drawer */
    }
    /* Get Lucky CTA — visible on mobile, full-width second row */
    .site-header__lucky {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        min-height: 44px;
        box-sizing: border-box;
    }

    /* === Backdrop overlay — covers page when drawer open === */
    .site-drawer__backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(5, 8, 16, 0.65);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.32s ease, visibility 0.32s ease;
        z-index: 200;
    }
    .site-drawer__backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }

    /* === The drawer itself — slides in from the right === */
    .site-header__nav {
        display: flex;
        flex-direction: column;
        align-items: stretch; /* override desktop align-items:center which collapses height */
        justify-content: flex-start;
        gap: 0;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        height: 100vh; /* explicit fallback so menu list can grow */
        height: 100dvh; /* dynamic viewport on mobile (modern browsers) */
        width: min(86vw, 360px);
        max-width: 100%;
        background: var(--bg-1, #0A0E1A);
        border-left: 1px solid var(--border);
        box-shadow: -16px 0 40px rgba(0, 0, 0, 0.55);
        transform: translateX(100%);
        transition: transform 0.32s cubic-bezier(.22,.61,.36,1);
        z-index: 210;
        overscroll-behavior: contain;
    }
    .site-header__nav.is-open { transform: translateX(0); }

    /* Body scroll lock — class added/removed by JS */
    body.is-drawer-open { overflow: hidden; }

    /* === Drawer header (brand + X close) === */
    .site-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--border);
        background: var(--bg-2, #11162A);
        flex-shrink: 0;
    }
    .site-drawer__brand {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        font-family: var(--f-display, system-ui);
        font-weight: 700;
        font-size: 1.05rem;
        color: var(--text-bright, #fff);
    }
    .site-drawer__brand svg {
        width: 22px;
        height: 22px;
        color: var(--cyan, #00D9FF);
    }
    .site-drawer__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: transparent;
        border: 1px solid var(--border);
        border-radius: var(--r-sm);
        color: var(--text-bright, #fff);
        cursor: pointer;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }
    .site-drawer__close:hover {
        border-color: var(--cyan-dim);
        color: var(--cyan, #00D9FF);
    }

    /* === Menu list — fills remaining height, scrollable === */
    .site-header__menu {
        flex: 1 1 auto;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
        margin: 0;
        list-style: none;
        width: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .site-header__menu-item {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }
    .site-header__menu-item:last-child { border-bottom: none; }

    .site-header__menu-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.95rem 1rem;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-bright, #E8ECF1);
        width: 100%;
        min-height: 48px;
        box-sizing: border-box;
        background: transparent;
        border-bottom: none;
    }
    .site-header__menu-link:hover,
    .site-header__menu-link:focus-visible {
        background: rgba(0, 217, 255, 0.06);
        color: var(--cyan, #00D9FF);
        text-shadow: none;
    }
    .site-header__menu-caret {
        flex-shrink: 0;
        transition: transform 0.22s ease;
        color: var(--text-muted);
    }

    /* === Submenu = flat indented list (NO box, NO grid) ===
       !important is necessary because desktop rules below in the file
       (--wide modifier, :focus-within, base submenu) come later in the
       cascade and have equal-or-higher specificity. We ARE resetting
       desktop intentionally on mobile, so !important is correct here. */
    .site-header__submenu,
    .site-header__submenu--mid,
    .site-header__submenu--wide {
        display: none !important;
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 0 0.4rem 0 !important;
        margin: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        pointer-events: auto !important;
        transition: none !important;
        z-index: auto !important;
    }
    /* Kill the desktop "hover bridge" pseudo-element */
    .site-header__submenu::before { display: none !important; content: none !important; }

    /* On mobile we drive expansion via a class, NOT :hover/:focus-within.
       Override desktop's focus-within rule which would auto-expand on tap. */
    .site-header__menu-item--has-children:hover > .site-header__submenu,
    .site-header__menu-item--has-children:focus-within > .site-header__submenu {
        display: none !important;
    }
    .site-header__menu-item--has-children.is-mobile-open > .site-header__submenu { display: block !important; }
    .site-header__menu-item--has-children.is-mobile-open > .site-header__menu-link .site-header__menu-caret { transform: rotate(180deg); }

    /* Force any desktop grid into a flat block */
    .site-header__submenu-grid {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }
    .site-header__submenu-group {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* "All N" hub link — slightly emphasised, indented */
    .site-header__submenu-all {
        display: block !important;
        padding: 0.7rem 1rem 0.7rem 2rem !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        color: var(--cyan, #00D9FF) !important;
        font-weight: 600;
        font-size: 0.92rem !important;
        letter-spacing: normal !important;
        text-transform: none !important;
        border: none !important;
        border-bottom: none !important;
        text-decoration: none;
        background: transparent;
        align-items: stretch;
        gap: 0;
    }
    .site-header__submenu-all:hover {
        background: rgba(0, 217, 255, 0.06);
        color: var(--cyan-hot, #4EE7FF) !important;
        text-shadow: none;
    }

    /* Section headings inside submenus — flat label, no cyan, no border */
    .site-header__submenu-section,
    .site-header__submenu-group-title {
        display: block !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        padding: 0.55rem 1rem 0.25rem 2rem !important;
        padding-bottom: 0.25rem !important;
        font-family: var(--f-mono);
        font-size: 0.7rem !important;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--text-muted) !important;
        font-weight: 600;
        border: none !important;
        border-bottom: none !important;
        background: transparent !important;
    }

    /* Individual submenu links — flat, indented, full-width, WRAP not truncate */
    .site-header__submenu-list,
    .site-header__submenu-group-list {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        gap: 0 !important;
    }
    .site-header__submenu-list li,
    .site-header__submenu-group-list li {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }
    .site-header__submenu-list li a,
    .site-header__submenu-group-list li a {
        display: block !important;
        padding: 0.7rem 1rem 0.7rem 2rem !important;
        margin: 0 !important;
        color: var(--text-dim) !important;
        font-size: 0.93rem !important;
        line-height: 1.35;
        min-height: 44px;
        border-radius: 0 !important;
        border-bottom: none !important;
        text-decoration: none;
        background: transparent;
        /* Wrap long titles onto 2 lines instead of truncating with "..." */
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-break: break-word !important;
    }
    .site-header__submenu-list li a:hover,
    .site-header__submenu-group-list li a:hover {
        background: rgba(0, 217, 255, 0.06) !important;
        color: var(--cyan, #00D9FF) !important;
        text-shadow: none;
    }

    /* === Drawer footer — pinned Get Lucky CTA full-width === */
    .site-drawer__foot {
        display: block;
        padding: 1rem;
        border-top: 1px solid var(--border);
        background: var(--bg-2, #11162A);
        flex-shrink: 0;
    }
    .site-drawer__cta {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.85rem 1rem;
        font-size: 1rem;
        font-weight: 700;
        min-height: 48px;
        box-sizing: border-box;
    }

    /* Drawer-only menu item (e.g. "About") — visible only inside drawer, not desktop nav */
    .site-drawer__only { display: list-item; }
}

/* ============================================================
   Footer — modern multi-zone (4 horizontal zones)
   1. Top grid:  5 equal columns (brand + 4 nav columns)
   2. Stats row: full-width strip with 4 counters in a single line
   3. RG strip:  18+ banner + 5 help-line pills
   4. Bottom:    copyright + last-verified + editorial pledge
   ============================================================ */
.site-footer {
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
    background:
        radial-gradient(circle at 12% 0%, rgba(0, 217, 255, 0.06), transparent 55%),
        radial-gradient(circle at 88% 100%, rgba(255, 0, 170, 0.04), transparent 55%),
        var(--bg-2);
    border-top: 2px solid var(--cyan-dim);
    position: relative;
}

/* === Zone 1: top grid (5 equal columns) === */
.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem 1.75rem;
    margin-bottom: 2rem;
    align-items: start;
}

/* Brand column ----- */
.site-footer__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-bottom: none;
    margin-bottom: 0.85rem;
}
.site-footer__brand-name {
    font-family: var(--f-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -0.01em;
    background: linear-gradient(90deg, var(--cyan), #ff8fd1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.site-footer__tagline {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 0.85rem;
}
.site-footer__contact {
    margin: 0;
    font-size: 0.88rem;
}
.site-footer__contact a {
    color: var(--cyan);
    border-bottom: 1px dashed var(--cyan-dim);
}
.site-footer__contact a:hover {
    color: var(--text-bright);
    border-bottom-style: solid;
}

/* Nav columns ----- */
.site-footer__col h3 {
    color: var(--cyan);
    font-family: var(--f-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 1rem;
}
.site-footer__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer__col li { margin-bottom: 0.5rem; line-height: 1.4; }
.site-footer__col a {
    color: var(--text-dim);
    font-size: 0.9rem;
    border-bottom: none;
    transition: color var(--t-fast);
}
.site-footer__col a:hover { color: var(--cyan); }
.site-footer__count { color: var(--text-muted); font-size: 0.8rem; margin-left: 0.15rem; }

/* === Zone 2: stats row (full-width, 4 inline) === */
.site-footer__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    list-style: none;
    padding: 1.1rem 1.5rem;
    margin: 0 0 1.5rem;
    background: rgba(0, 217, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    gap: 1rem;
}
.site-footer__stats li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
    text-align: center;
    border-right: 1px solid var(--border);
    padding-right: 1rem;
}
.site-footer__stats li:last-child { border-right: 0; padding-right: 0; }
.site-footer__stats strong {
    font-family: var(--f-display);
    font-size: 1.7rem;
    color: var(--cyan);
    font-weight: 800;
    line-height: 1;
}
.site-footer__stats span {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1.3;
}

/* === Zone 3: responsible-gambling strip ===
   Outer padding 1.5rem top/bottom, 2rem left/right — leaves 32px gutter on each
   side so the 44px 18+ badge (with its 3px outer box-shadow) doesn't kiss the
   dashed border, and the right-most pill keeps a clear right margin.
   Selector is scoped through `footer.site-footer` so it OUT-specifies the
   per-template `body.tpl-home section { padding: 1.5rem 0 }` rule that
   otherwise zeroes our left/right padding. */
footer.site-footer .site-footer__rg {
    display: grid;
    grid-template-columns: 1.6fr auto;
    gap: 1.25rem 2rem;
    align-items: center;
    padding: 1.5rem 2rem;
    margin: 0 0 1.75rem;
    background: linear-gradient(90deg, rgba(245, 90, 90, 0.06), rgba(0, 217, 255, 0.04));
    border: 1px dashed var(--cyan-dim);
    border-radius: var(--r-md);
}
.site-footer__rg-headline {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.site-footer__rg-headline p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* RG pills — explicit two-row layout (top: 3 narrow, bottom: 2 wider) */
.site-footer__rg-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
}
.site-footer__rg-row {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.45rem;
    justify-content: flex-end;
    flex-wrap: nowrap;
}
.site-footer__rg-row a {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(0, 217, 255, 0.08);
    border: 1px solid var(--cyan-dim);
    border-radius: 999px;
    color: var(--cyan);
    font-size: 0.78rem;
    border-bottom: none;
    white-space: nowrap;
    transition: all var(--t-fast);
}
.site-footer__rg-row a:hover {
    background: rgba(0, 217, 255, 0.16);
    color: var(--text-bright);
}

.badge-18 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: var(--hot-red, #f55a5a);
    color: white;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.84rem;
    letter-spacing: 0;
    line-height: 1;
    box-shadow: 0 0 0 3px rgba(245, 90, 90, 0.18);
}

/* === Zone 4: bottom strip === */
.site-footer__bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.site-footer__bottom-left { flex: 1 1 auto; text-align: left; min-width: 16ch; }
.site-footer__bottom-mid { flex: 0 0 auto; text-align: right; }
.site-footer__bottom a { color: var(--text-dim); border-bottom: none; }
.site-footer__bottom a:hover { color: var(--cyan); }

/* === Responsive === */
@media (max-width: 1100px) {
    .site-footer__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem 1.5rem;
    }
    .site-footer__col--brand { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
    .site-footer__rg {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .site-footer__rg-links { align-items: flex-start; }
    .site-footer__rg-row { justify-content: flex-start; }
    .site-footer__bottom {
        flex-direction: column;
        gap: 0.5rem;
    }
    .site-footer__bottom-left,
    .site-footer__bottom-mid { text-align: center; min-width: 0; }
}
@media (max-width: 640px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 1.25rem; }
    .site-footer__stats { grid-template-columns: repeat(2, 1fr); gap: 1rem 0.5rem; }
    .site-footer__stats li { border-right: 0; padding-right: 0; }
    .site-footer__stats li:nth-child(odd) {
        border-right: 1px solid var(--border);
        padding-right: 0.5rem;
    }
}
@media (max-width: 420px) {
    .site-footer { padding: 2rem 0 1.25rem; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .site-footer__stats { grid-template-columns: 1fr; gap: 0.85rem; }
    .site-footer__stats li:nth-child(odd) { border-right: 0; padding-right: 0; }
    .site-footer__stats li:not(:last-child) {
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.85rem;
    }
}

.back-to-top {
    position: fixed; right: 1.25rem; bottom: 1.25rem;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-3);
    color: var(--cyan);
    border: 1px solid var(--cyan-dim);
    border-radius: 50%;
    z-index: 500;
    opacity: 0; pointer-events: none;
    transform: translateY(8px);
    transition: all var(--t-base);
    border-bottom: 1px solid var(--cyan-dim);
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--cyan); color: var(--bg); box-shadow: var(--glow-cyan); }

/* Article body */
.article-body {
    max-width: var(--container-narrow);
    margin: 0 auto;
    font-size: 1.04rem;
    line-height: 1.75;
    color: var(--text-dim);
}
.article-body h2 {
    font-family: var(--f-display);
    font-size: 1.75rem;
    color: var(--text-bright);
    margin: 2.25rem 0 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.article-body h3 {
    font-family: var(--f-display);
    font-size: 1.3rem;
    color: var(--cyan);
    margin: 1.75rem 0 0.65rem;
}
.article-body p { margin-bottom: 1.15rem; }
.article-body p strong { color: var(--text-bright); }
.article-body ul, .article-body ol { margin: 0.75rem 0 1.5rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: rgba(0, 217, 255, 0.05);
    border-left: 3px solid var(--cyan);
    color: var(--text);
    font-style: italic;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.article-body .table-wrap { overflow-x: auto; margin: 1.5rem 0; }

/* Global table-wrap (used outside .article-body too — comparison spec tables, leaderboard) */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.25rem 0;
    border-radius: var(--r-md);
    /* Visual scroll cue on mobile */
    background:
        linear-gradient(to right, var(--bg-2) 30%, rgba(17, 22, 42, 0)) 0 0/40px 100% no-repeat,
        linear-gradient(to right, rgba(17, 22, 42, 0), var(--bg-2) 70%) 100% 0/40px 100% no-repeat,
        linear-gradient(to right, rgba(0, 217, 255, 0.12), transparent) 0 0/14px 100% no-repeat,
        linear-gradient(to left,  rgba(0, 217, 255, 0.12), transparent) 100% 0/14px 100% no-repeat;
    background-attachment: local, local, scroll, scroll;
}
.table-wrap > table {
    min-width: 540px; /* keep readable on narrow viewports — overflow scrolls */
}
@media (max-width: 720px) {
    .spec-table th, .spec-table td { padding: 0.65rem 0.55rem; font-size: 0.86rem; }
    .spec-table .winner-cell { font-size: 0.78rem; }
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-2);
    font-size: 0.94rem;
}
.article-body th {
    background: var(--bg-3);
    color: var(--cyan);
    padding: 0.7rem 1rem;
    text-align: left;
    font-family: var(--f-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--cyan-dim);
}
.article-body td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
}

.hero-image {
    margin: 1.5rem 0 2rem;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border-hi);
    box-shadow: var(--shadow-card);
    max-width: 900px;
}

/* WIP banner */
.wip-banner {
    margin: 1rem 0 2rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 0, 170, 0.08);
    border: 1px dashed var(--magenta-dim);
    border-radius: var(--r-md);
    color: var(--magenta-hot);
    font-size: 0.92rem;
    text-align: center;
}
.wip-banner strong { color: var(--magenta-hot); }


/* ============= NEW Header dropdown with hover bridge ============= */
.site-header__menu {
    list-style: none;
    display: flex;
    gap: 0.15rem;
    align-items: center;
    margin: 0;
    padding: 0;
}
.site-header__menu-item { position: relative; }
.site-header__menu-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.7rem 0.95rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-dim);
    border-radius: var(--r-xs);
    transition: color var(--t-fast), background var(--t-fast);
    border-bottom: none;
    text-decoration: none;
}
.site-header__menu-link:hover {
    color: var(--cyan);
    background: rgba(0, 217, 255, 0.06);
    text-shadow: none;
}
.site-header__menu-item.is-active > .site-header__menu-link { color: var(--cyan); background: rgba(0, 217, 255, 0.06); }
.site-header__menu-caret {
    color: currentColor;
    opacity: 0.55;
    transition: transform var(--t-fast), opacity var(--t-fast);
}
.site-header__menu-item--has-children:hover .site-header__menu-caret {
    transform: rotate(180deg);
    opacity: 1;
}

/* SUBMENU */
.site-header__submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-2);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-deep), 0 0 30px rgba(0, 217, 255, 0.06);
    padding: 1rem 1.25rem;
    margin-top: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity var(--t-fast), visibility var(--t-fast), transform var(--t-fast);
    z-index: 200;
}

/* Invisible hover bridge — keeps cursor inside dropdown when crossing the gap */
.site-header__submenu::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 18px;
}

.site-header__menu-item--has-children:hover > .site-header__submenu,
.site-header__menu-item--has-children:focus-within > .site-header__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.site-header__submenu--mid { min-width: 280px; max-width: 320px; }
.site-header__submenu--wide { min-width: 720px; max-width: 760px; right: auto; left: -160px; }

.site-header__submenu-all {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.85rem;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: none;
    color: var(--cyan);
    background: rgba(0, 217, 255, 0.08);
    border: 1px solid var(--cyan-dim);
    border-radius: var(--r-sm);
    transition: all var(--t-fast);
    border-bottom: 1px solid var(--cyan-dim);
}
.site-header__submenu-all:hover {
    background: rgba(0, 217, 255, 0.14);
    color: var(--cyan-hot);
    border-color: var(--cyan);
}

.site-header__submenu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.site-header__submenu-list li { padding: 0; }
.site-header__submenu-list a {
    display: block;
    padding: 0.45rem 0.65rem;
    color: var(--text);
    font-size: 0.92rem;
    border-radius: var(--r-xs);
    transition: background var(--t-fast), color var(--t-fast);
    border-bottom: none !important;
}
.site-header__submenu-list a:hover {
    color: var(--cyan-hot);
    background: rgba(0, 217, 255, 0.07);
}
.site-header__submenu-section {
    font-family: var(--f-body);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    padding: 0.7rem 0.65rem 0.3rem !important;
    margin-top: 0.3rem;
    border-top: 1px solid var(--border);
}
.site-header__submenu-list .site-header__submenu-section:first-child { margin-top: 0; border-top: none; padding-top: 0.2rem !important; }

.site-header__submenu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.site-header__submenu-group { display: flex; flex-direction: column; }
.site-header__submenu-group-title {
    font-family: var(--f-body);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cyan);
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.site-header__submenu-group-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 0.1rem;
}
.site-header__submenu-group-list a {
    display: block;
    padding: 0.4rem 0.5rem;
    color: var(--text);
    font-size: 0.92rem;
    border-radius: var(--r-xs);
    transition: background var(--t-fast), color var(--t-fast);
    border-bottom: none !important;
}
.site-header__submenu-group-list a:hover { color: var(--cyan-hot); background: rgba(0, 217, 255, 0.07); }

.site-header__lucky {
    background: var(--magenta);
    color: var(--text-bright);
    border-color: var(--magenta);
    box-shadow: 0 0 12px rgba(255, 0, 170, 0.25);
    font-weight: 700;
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    border-bottom: none;
}
.site-header__lucky:hover {
    background: var(--magenta-hot);
    box-shadow: var(--glow-magenta);
    transform: translateY(-1px);
}

/* NOTE: mobile (<=920px) overrides for .site-header__nav are in the
   MOBILE DRAWER block above (line ~354). Do NOT add display:none here —
   it would conflict with the off-canvas drawer transform. */

/* Skip-to-content link (a11y, keyboard navigation) - hidden until focused */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    z-index: 9999;
    padding: 0.65rem 1.2rem;
    background: var(--cyan);
    color: #000;
    font-family: var(--f-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    border-radius: 0 0 6px 0;
    transition: top 0.18s ease-out;
}
.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
    outline: 2px solid var(--text-bright);
    outline-offset: 2px;
}

/* Screen-reader-only utility (a11y) */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
