/* ===== 73QRZ redesign (2026-10) =====
   Loaded after style.css. Re-maps the shared color tokens to the FT8BR-family
   palette (so every page picks it up) and styles the new header, footer and
   homepage (classes start with rq-). Dark is the default; .light-theme on <html>
   switches to light. */

:root {
    --bg-primary: #0A0E17;
    --bg-secondary: #0D1320;
    --bg-card: #101726;
    --bg-card-hover: #162033;
    --bg-inset: #182235;
    --accent-primary: #22D3EE;
    --accent-primary-hover: #7FE9F7;
    --accent-primary-muted: rgba(34, 211, 238, 0.14);
    --accent-secondary: #FFCC00;
    --accent-blue: #60A5FA;
    --accent-cyan: #22D3EE;
    --accent-green: #34D399;
    --accent-yellow: #FFCC00;
    --accent-red: #F87171;
    --accent-purple: #A78BFA;
    --accent-orange: #FF9B80;
    --accent-pink: #FF3D8B;
    --accent-pink-soft: #FF6BA6;
    --fill-yellow: #FFCC00;
    --on-fill: #0A0E17;
    --text-primary: #E8EEF7;
    --text-secondary: #C9D6E6;
    --text-muted: #93A1B5;
    --border-color: #1E2A3D;
    --border-strong: #16404A;
    --band-closed: #2C3850;
    --live-bg: #24101C;
    --live-text: #E9C6D6;
    --soon-border: #4A3F12;
    --start-bg: #0C2230;
    --result-glow: rgba(34, 211, 238, 0.08);
    --result-border: rgba(34, 211, 238, 0.45);
    --font-head: 'Barlow', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    color-scheme: dark;
}

:root.light-theme {
    --bg-primary: #F4F6FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #EEF2F7;
    --bg-inset: #E7ECF3;
    --accent-primary: #0E7490;
    --accent-primary-hover: #155E75;
    --accent-primary-muted: rgba(14, 116, 144, 0.10);
    --accent-secondary: #A16207;
    --accent-blue: #1D4ED8;
    --accent-cyan: #0E7490;
    --accent-green: #047857;
    --accent-yellow: #A16207;
    --accent-red: #B91C1C;
    --accent-purple: #6D28D9;
    --accent-orange: #C2410C;
    --accent-pink: #BE185D;
    --accent-pink-soft: #BE185D;
    --fill-yellow: #FFCC00;
    --on-fill: #0A0E17;
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #475569;
    --border-color: #CBD5E1;
    --border-strong: #94C7D4;
    --band-closed: #CBD5E1;
    --live-bg: #FCE7F1;
    --live-text: #6B1238;
    --soon-border: #E5C46B;
    --start-bg: #E0F2F7;
    --result-glow: rgba(14, 116, 144, 0.06);
    --result-border: rgba(14, 116, 144, 0.4);
    color-scheme: light;
}

body { background: var(--bg-primary); }
h1, h2, h3, h4 { font-family: var(--font-head); }
a { color: var(--accent-primary); }

/* ---------- Header ---------- */
header.rq-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-strong);
    box-shadow: none;
}
.light-theme header.rq-header { background: #FFFFFF; border-bottom-color: var(--border-color); box-shadow: none; }
.rq-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 8px 18px;
    min-height: 64px;
}
.rq-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.rq-logo svg { display: block; }
.rq-logo-text { font-family: var(--font-head); font-weight: 800; font-size: 27px; color: var(--accent-secondary); letter-spacing: 0.01em; line-height: 1; }
.light-theme .rq-logo-text { color: var(--text-primary); }
.rq-logo-text b { color: var(--accent-primary); font-weight: 800; }

nav.rq-nav { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; flex-wrap: wrap; }
.rq-nav > a,
.rq-dd-btn {
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    font: 600 16px/1 'Inter', sans-serif;
    padding: 0 13px;
    min-height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.rq-nav > a:hover, .rq-dd-btn:hover, .rq-dd.open > .rq-dd-btn { color: var(--text-primary); background: var(--bg-inset); }
.rq-nav > a.active, .rq-dd.active > .rq-dd-btn { color: var(--text-primary); background: var(--bg-inset); box-shadow: inset 0 -2px 0 var(--accent-primary); }
.rq-dd-btn svg { transition: transform 0.15s; }
.rq-dd.open > .rq-dd-btn svg { transform: rotate(180deg); }
.rq-dd { position: relative; }
.rq-dd-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 250px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 1100;
}
.light-theme .rq-dd-menu { box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14); border-color: var(--border-color); }
.rq-dd.open > .rq-dd-menu { display: block; }
.rq-dd-menu a {
    display: flex;
    flex-direction: column;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
}
.rq-dd-menu a small { font-weight: 400; font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.rq-dd-menu a:hover { background: var(--bg-inset); color: var(--text-primary); }
.rq-dd-menu a.active { color: var(--accent-primary); }
.rq-dd-mega { min-width: 640px; display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; }
.rq-dd.open > .rq-dd-mega { display: grid; }
.rq-dd-group { display: flex; flex-direction: column; }
.rq-dd-group h3 { font: 700 13px/1 'Inter', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; margin: 8px 12px 6px; padding: 0; border: 0; }
.rq-dd-all { grid-column: 1 / -1; border-top: 1px solid var(--border-color); margin-top: 6px; padding-top: 6px; }
.rq-dd-all a { color: var(--accent-primary); }

.rq-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.rq-chip,
header.rq-header .grid-toggle,
header.rq-header .unit-toggle,
header.rq-header .theme-toggle {
    min-height: 44px;
    min-width: 44px;
    padding: 0 14px;
    margin: 0;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font: 600 15px/1 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: none;
}
header.rq-header .grid-toggle { border-color: var(--accent-secondary); color: var(--accent-secondary); background: rgba(255, 204, 0, 0.07); font-family: var(--font-mono); font-weight: 700; }
.light-theme header.rq-header .grid-toggle { background: #FEF9E7; }
header.rq-header .theme-toggle { padding: 0; }
header.rq-header .unit-toggle .unit-icon { font: 600 15px/1 'Inter', sans-serif; }
header.rq-header .header-btn-label { display: none; }
header.rq-header .grid-toggle:hover,
header.rq-header .unit-toggle:hover,
header.rq-header .theme-toggle:hover { border-color: var(--accent-primary); color: var(--text-primary); background: var(--bg-inset); }
.rq-theme-sun { display: none; }
.light-theme .rq-theme-sun { display: block; }
.light-theme .rq-theme-moon { display: none; }
.rq-support { color: var(--accent-secondary) !important; }
.rq-nav-toggle { display: none; }
header.rq-header .grid-dropdown { right: 0; left: auto; top: calc(100% + 8px); background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 12px; }

@media (max-width: 1180px) {
    .rq-header-inner { flex-wrap: wrap; }
    .rq-nav-toggle {
        display: inline-flex; align-items: center; gap: 8px;
        min-height: 44px; padding: 0 14px; border-radius: 22px;
        border: 1px solid var(--border-color); background: transparent;
        color: var(--text-primary); font: 600 15px 'Inter', sans-serif; cursor: pointer;
        order: 3;
    }
    .rq-actions { order: 2; }
    nav.rq-nav {
        order: 4;
        flex: 1 1 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 6px 0 12px;
        border-top: 1px solid var(--border-color);
    }
    nav.rq-nav.open { display: flex; }
    .rq-nav > a, .rq-dd-btn { width: 100%; justify-content: space-between; min-height: 52px; font-size: 17px; }
    .rq-dd-menu, .rq-dd-mega { position: static; box-shadow: none; border: 0; min-width: 0; padding: 0 0 6px 10px; background: transparent; }
    .rq-dd.open > .rq-dd-mega { display: flex; flex-direction: column; }
}
@media (max-width: 520px) {
    .rq-header-inner { padding: 8px 14px; gap: 8px; }
    .rq-logo-text { font-size: 23px; }
    .rq-logo svg { width: 30px; height: 30px; }
    .rq-support { display: none; }
    header.rq-header .unit-toggle { display: none; }
    .rq-nav-toggle span { display: none; }
}

/* ---------- Page headers on inner pages ---------- */
.page-header h1 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Footer ---------- */
footer.rq-footer {
    text-align: left;
    padding: 0;
    margin-top: 56px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-strong);
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
}
.light-theme footer.rq-footer { background: #E9EDF3; border-top-color: var(--border-color); }
.rq-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 28px;
}
.rq-footer strong { color: var(--text-primary); display: block; margin-bottom: 6px; }
.rq-footer a { color: var(--accent-primary); text-decoration: none; display: block; padding: 3px 0; }
.rq-footer a:hover { text-decoration: underline; }
.rq-footer-brand { font-family: var(--font-head); font-weight: 800; font-size: 24px; color: var(--accent-secondary); }
.light-theme .rq-footer-brand { color: var(--text-primary); }
.rq-footer-brand b { color: var(--accent-primary); }
.rq-footer .rq-coffee {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
    border-radius: 10px; background: var(--accent-pink); color: #0A0E17; font-weight: 700;
}
.light-theme .rq-footer .rq-coffee { color: #FFFFFF; }
.rq-footer .rq-coffee:hover { text-decoration: none; filter: brightness(1.08); }
.rq-footer-base { max-width: 1280px; margin: 0 auto; padding: 0 24px 24px; font-size: 13px; }

/* ---------- Shared homepage pieces ---------- */
body.rq-home main { max-width: 1280px; padding: 0 24px 24px; }
.rq-mono { font-family: var(--font-mono); }
.rq-card {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    padding: 24px;
}
.light-theme .rq-card { border-color: var(--border-color); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.rq-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 12px; }
.rq-card-head h2 { margin: 0; padding: 0; border: 0; font-size: 24px; font-weight: 700; }
.rq-card-head a { font-weight: 600; font-size: 16px; text-decoration: none; }
.rq-section { margin-top: 44px; }
.rq-section > .rq-card-head h2 { font-size: 30px; }
.rq-muted { color: var(--text-muted); }
.rq-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.rq-dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; background: var(--accent-green); flex: 0 0 auto; }
.rq-dot.live { background: var(--accent-pink); }
@keyframes rqPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: no-preference) { .rq-dot.live, .rq-dot.pulse { animation: rqPulse 2s ease-in-out infinite; } }

/* Live strip */
.rq-live { background: var(--bg-card); border-bottom: 1px solid var(--border-color); }
.rq-live-inner {
    max-width: 1280px; margin: 0 auto; padding: 8px 24px;
    display: flex; gap: 6px 22px; align-items: center; flex-wrap: wrap;
    font-size: 15px; color: var(--text-secondary); min-height: 40px; overflow: hidden;
}
.rq-live-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 700; color: var(--accent-pink); letter-spacing: 0.08em; }
.rq-live-item b { font-family: var(--font-mono); color: var(--text-primary); }
.rq-live-item i { font-style: normal; color: var(--accent-secondary); font-family: var(--font-mono); }

/* Hero */
.rq-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 28px; padding: 36px 0 28px; }
.rq-hero-main { display: flex; flex-direction: column; gap: 18px; justify-content: center; min-width: 0; }
.rq-hero-kicker { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-secondary); }
.rq-hero-kicker strong { color: var(--accent-secondary); font-family: var(--font-mono); }
.rq-hero h1 { margin: 0; font-weight: 700; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.1; letter-spacing: -0.01em; color: var(--text-primary); }
.rq-hero h1 .open { color: var(--accent-primary); }
.rq-hero h1 .fair { color: var(--accent-secondary); }
.rq-hero-sub { margin: 0; font-size: 19px; color: var(--text-secondary); max-width: 580px; }
.rq-search { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.rq-search input {
    flex: 1 1 260px; min-height: 58px; padding: 0 20px; border-radius: 12px;
    border: 2px solid var(--accent-primary); background: var(--bg-card); color: var(--text-primary);
    font: 500 19px 'Inter', sans-serif;
}
.rq-search input::placeholder { color: var(--text-muted); }
.rq-search input:focus { outline: 3px solid var(--accent-primary-muted); outline-offset: 1px; }
.rq-btn-yellow {
    min-height: 58px; padding: 0 28px; border-radius: 12px; border: 0;
    background: var(--fill-yellow); color: var(--on-fill); font: 700 18px 'Inter', sans-serif; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.rq-btn-yellow:hover { filter: brightness(1.06); color: var(--on-fill); }
.rq-try { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; color: var(--text-muted); }
.rq-try a { padding: 6px 12px; border-radius: 16px; background: var(--bg-inset); color: var(--text-primary); text-decoration: none; }
.rq-try a.mono { font-family: var(--font-mono); }
.rq-try a:hover { background: var(--accent-primary-muted); }
.rq-search-hint { min-height: 22px; font-size: 15px; color: var(--accent-secondary); }

/* Right now panel */
.rq-now { display: flex; flex-direction: column; gap: 16px; }
.rq-clocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rq-clock { background: var(--bg-primary); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.light-theme .rq-clock { background: var(--bg-inset); }
.rq-clock-label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; }
.rq-clock-value { font-family: var(--font-mono); font-weight: 700; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.2; white-space: nowrap; }
.rq-clock-value small { font-size: 0.55em; color: var(--text-secondary); }
.rq-clock-value.cyan { color: var(--accent-primary); }
.rq-clock-value.yellow { color: var(--accent-secondary); }
.rq-solar { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); border-top: 1px solid var(--border-color); }
.rq-solar > div { padding: 11px 4px; border-bottom: 1px solid var(--border-color); }
.rq-solar-label { font-size: 14px; color: var(--text-muted); }
.rq-solar-val { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rq-solar-val span:first-child { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--text-primary); }
.rq-solar-val span + span { font-size: 14px; font-weight: 700; }
.tone-good { color: var(--accent-green); }
.tone-mid { color: var(--accent-secondary); }
.tone-bad { color: var(--accent-pink); }
.tone-plain { color: var(--text-secondary); }

/* Band meters */
.rq-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 15px; color: var(--text-secondary); }
.rq-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rq-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.rq-bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 10px; }
.rq-band {
    display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; border-radius: 12px;
    background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--text-primary); min-width: 0;
}
.light-theme .rq-band { background: var(--bg-secondary); }
.rq-band-name { font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 1; }
.rq-meter { height: 84px; background: var(--bg-inset); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.rq-meter span { display: block;  width: 100%; border-radius: 6px 6px 0 0; transition: height 0.6s ease; }
.rq-band-word { font-size: 15px; font-weight: 700; }
.rq-band-reach { font-size: 13px; color: var(--text-muted); min-height: 19px; line-height: 1.35; }
.rq-band.s-open { border-color: var(--border-strong); }
.rq-band.s-open .rq-meter span { display: block;  background: var(--accent-primary); }
.rq-band.s-open .rq-band-word { color: var(--accent-primary); }
.rq-band.s-fair { border-color: var(--soon-border); }
.rq-band.s-fair .rq-meter span { display: block;  background: var(--fill-yellow); }
.rq-band.s-fair .rq-band-word { color: var(--accent-secondary); }
.rq-band.s-closed .rq-meter span { display: block;  background: var(--band-closed); }
.rq-band.s-closed .rq-band-word { color: var(--text-muted); }
.rq-foot-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 14px; font-size: 14px; color: var(--text-muted); }
.rq-foot-note a { font-weight: 600; text-decoration: none; }

/* How-it-works disclosure under the meters */
.rq-how { margin-top: 12px; border-top: 1px solid var(--border-color); padding-top: 10px; }
.rq-how summary { cursor: pointer; font-weight: 600; color: var(--accent-primary); min-height: 32px; display: flex; align-items: center; }
.rq-how-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px 28px; padding: 8px 0 4px; color: var(--text-secondary); font-size: 16px; }
.rq-how-body h3 { font-size: 17px; margin: 0 0 4px; color: var(--text-primary); border: 0; padding: 0; }
.rq-how-body ul { margin: 6px 0 0 20px; }

/* Events strip */
.rq-events { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.rq-event {
    display: flex; gap: 18px; align-items: center; padding: 18px 22px; border-radius: 16px;
    background: var(--bg-card); border: 1px solid var(--border-strong); color: var(--text-primary); text-decoration: none;
}
.rq-event:hover { color: var(--text-primary); border-color: var(--accent-primary); }
.rq-event.live { background: var(--live-bg); border-color: var(--accent-pink); }
.rq-event-date { flex: 0 0 auto; text-align: center; padding: 8px 12px; border-radius: 10px; background: var(--bg-primary); min-width: 92px; }
.rq-event.live .rq-event-date { background: var(--accent-pink); color: #0A0E17; }
.light-theme .rq-event.live .rq-event-date { color: #FFFFFF; }
.rq-event-tag { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; }
.rq-event-day { font-family: var(--font-head); font-size: 23px; font-weight: 700; line-height: 1.15; }
.rq-event-title { font-family: var(--font-head); font-size: 22px; font-weight: 700; line-height: 1.2; }
.rq-event-sub { font-size: 16px; color: var(--text-secondary); }
.rq-event.live .rq-event-sub { color: var(--live-text); }
.rq-event .soon { color: var(--accent-secondary); }

/* Spot lists */
.rq-spot { display: grid; grid-template-columns: minmax(96px, 120px) 1fr auto; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--border-color); }
.rq-spot-call { font-family: var(--font-mono); font-weight: 700; font-size: 18px; color: var(--accent-secondary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-spot-call:hover { text-decoration: underline; color: var(--accent-secondary); }
.rq-spot-mid { font-size: 15px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rq-spot-mid .f { font-family: var(--font-mono); font-size: 16px; color: var(--text-primary); }
.rq-spot-mid .ref { font-family: var(--font-mono); color: var(--accent-green); }
.rq-spot-end { font-size: 14px; color: var(--text-muted); white-space: nowrap; font-family: var(--font-mono); }
.rq-empty { padding: 14px 0; color: var(--text-muted); border-top: 1px solid var(--border-color); }

/* Tool groups */
.rq-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.rq-tool-group { background: var(--bg-card); border: 1px solid var(--border-color); border-top: 3px solid var(--tone, var(--accent-primary)); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; }
.rq-tool-group h3 { margin: 0 0 2px; font-size: 22px; font-weight: 700; color: var(--tone); border: 0; padding: 0; }
.rq-tool-group p { margin: 0 0 8px; font-size: 15px; color: var(--text-muted); }
.rq-tool-group a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 10px; margin: 0 -10px; border-radius: 8px; color: var(--text-primary); text-decoration: none; font-weight: 500; }
.rq-tool-group a::after { content: '›'; color: var(--text-muted); font-size: 20px; }
.rq-tool-group a:hover { background: var(--bg-inset); color: var(--text-primary); }

/* Learn */
.rq-start { background: var(--start-bg); border-color: var(--border-strong); }
.rq-start h2 span { color: var(--accent-primary); }
.rq-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rq-steps a { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 6px 14px; border-radius: 10px; background: var(--bg-primary); color: var(--text-primary); font-weight: 600; text-decoration: none; }
.light-theme .rq-steps a { background: #FFFFFF; }
.rq-steps a:hover { color: var(--accent-primary); }
.rq-steps b { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 16px; background: var(--fill-yellow); color: var(--on-fill); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.rq-guide { display: block; padding: 12px 0; border-top: 1px solid var(--border-color); color: var(--text-primary); text-decoration: none; }
.rq-guide strong { display: block; font-size: 18px; font-weight: 600; }
.rq-guide span { font-size: 14px; color: var(--text-muted); }
.rq-guide:hover strong { color: var(--accent-primary); }

/* Videos */
.rq-videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.rq-video { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-primary); text-decoration: none; }
.rq-video:hover { border-color: var(--accent-primary); color: var(--text-primary); }
.rq-video-thumb { aspect-ratio: 16 / 9; background: var(--bg-inset); overflow: hidden; }
.rq-video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rq-video-body { padding: 14px 16px 16px; }
.rq-video-title { font-weight: 600; font-size: 17px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rq-video-meta { font-size: 14px; color: var(--text-muted); margin-top: 6px; }

@media (max-width: 640px) {
    body.rq-home main { padding: 0 16px 16px; }
    .rq-card { padding: 18px; }
    .rq-live-inner { padding: 8px 16px; }
    .rq-hero { padding-top: 24px; }
    .rq-bands { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .rq-band { padding: 10px 8px; }
    .rq-band-name { font-size: 18px; }
    .rq-meter { height: 60px; }
    .rq-band-reach { display: none; }
    .rq-event { padding: 16px; gap: 14px; }
    .rq-spot { grid-template-columns: 96px 1fr auto; gap: 8px; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ======================================================================
   Inner page kit (every page except the homepage gets body.rq-page)
   Use these instead of per-page styles:
   .rq-page-head (via rq_page_head())  .rq-card / .rq-card-head  .rq-grid-2 / .rq-grid-3
   .rq-field  .rq-btn / .rq-btn-yellow / .rq-btn-ghost  .rq-seg  .rq-chip  .rq-stats/.rq-stat
   .rq-table  .rq-note (.warn/.danger)  .rq-result  .rq-details
   ====================================================================== */
body.rq-page main { max-width: 1280px; padding: 0 24px 24px; }
body.rq-page main > .container, body.rq-page main .container { max-width: none; padding-left: 0; padding-right: 0; }

/* Page header */
.rq-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 28px; padding: 32px 0 24px; margin: 0 0 24px; border-bottom: 1px solid var(--border-color); text-align: left; }
.rq-page-head-text { min-width: 0; flex: 1 1 520px; }
.rq-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; color: var(--text-muted); margin-bottom: 10px; }
.rq-crumbs a { color: var(--text-muted); text-decoration: none; }
.rq-crumbs a:hover { color: var(--accent-primary); text-decoration: underline; }
.rq-page-kicker { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--accent-primary); margin-bottom: 6px; }
.rq-page-head h1 { margin: 0; padding: 0; border: 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -0.01em; color: var(--text-primary); background: none; -webkit-text-fill-color: currentColor; text-align: left; }
.rq-page-sub { margin: 10px 0 0; font-size: 19px; line-height: 1.5; color: var(--text-secondary); max-width: 760px; }
.rq-page-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 15px; color: var(--text-muted); }
.rq-page-meta b, .rq-page-meta strong { color: var(--text-primary); font-family: var(--font-mono); }
.rq-page-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Layout */
.rq-stack { display: flex; flex-direction: column; gap: 24px; }
.rq-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.rq-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .rq-split { grid-template-columns: 1fr; } }
:where(body.rq-page) .rq-card + .rq-card { margin-top: 24px; }
body.rq-page .rq-grid-2 > .rq-card + .rq-card, body.rq-page .rq-grid-3 > .rq-card + .rq-card, body.rq-page .rq-split > .rq-card + .rq-card, body.rq-page .rq-stack > .rq-card + .rq-card, body.rq-page .rq-tools > * + * { margin-top: 0; }
.rq-card h2, .rq-card h3 { font-family: var(--font-head); font-weight: 700; color: var(--text-primary); border: 0; padding: 0; }
.rq-card > h2:first-child, .rq-card-title { margin: 0 0 14px; font-size: 24px; }
.rq-card h3 { font-size: 19px; margin: 18px 0 8px; }
.rq-card p { color: var(--text-secondary); }
.rq-inset { background: var(--bg-inset); border-radius: 12px; padding: 16px 18px; }

/* Forms */
.rq-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.rq-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rq-field > label, .rq-label { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.rq-field small, .rq-hint { font-size: 14px; color: var(--text-muted); }
body.rq-page main input[type="text"], body.rq-page main input[type="search"], body.rq-page main input[type="number"],
body.rq-page main input[type="email"], body.rq-page main input:not([type]), body.rq-page main select, body.rq-page main textarea {
    min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-strong);
    background: var(--bg-primary); color: var(--text-primary); font: 500 17px 'Inter', sans-serif; max-width: 100%;
}
body.rq-page main textarea { padding: 12px 14px; min-height: 96px; }
.light-theme body.rq-page main input, .light-theme body.rq-page main select, .light-theme body.rq-page main textarea { background: #FFFFFF; border-color: var(--border-color); }
body.rq-page main input:focus, body.rq-page main select:focus, body.rq-page main textarea:focus { outline: 3px solid var(--accent-primary-muted); border-color: var(--accent-primary); outline-offset: 0; }
body.rq-page main input::placeholder { color: var(--text-muted); }
body.rq-page main input[type="checkbox"], body.rq-page main input[type="radio"] { accent-color: var(--accent-primary); width: 18px; height: 18px; }

/* Buttons */
.rq-btn, .rq-btn-ghost { min-height: 48px; padding: 0 20px; border-radius: 10px; font: 700 16px 'Inter', sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.rq-btn { border: 0; background: var(--accent-primary); color: var(--on-fill); }
.light-theme .rq-btn { color: #FFFFFF; }
.rq-btn:hover { filter: brightness(1.08); color: var(--on-fill); }
.rq-btn-ghost { border: 1px solid var(--border-strong); background: transparent; color: var(--text-primary); font-weight: 600; }
.rq-btn-ghost:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
body.rq-page .rq-btn-yellow { min-height: 48px; padding: 0 22px; font-size: 16px; border-radius: 10px; }

/* Segmented control (tabs / mode switches) and chips */
.rq-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-inset); }
.rq-seg > button, .rq-seg > a { min-height: 42px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--text-secondary); font: 600 16px 'Inter', sans-serif; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.rq-seg > button:hover, .rq-seg > a:hover { color: var(--text-primary); }
.rq-seg > .active, .rq-seg > [aria-selected="true"], .rq-seg > [aria-pressed="true"] { background: var(--bg-card); color: var(--accent-primary); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.rq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-chip { min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); font: 600 15px 'Inter', sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.rq-chip:hover { border-color: var(--accent-primary); color: var(--text-primary); }
.rq-chip.active, .rq-chip[aria-pressed="true"] { background: var(--accent-primary-muted); border-color: var(--accent-primary); color: var(--accent-primary); }

/* Stat tiles */
.rq-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.rq-stat { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.rq-card .rq-stat { background: var(--bg-primary); border: 0; }
.light-theme .rq-card .rq-stat { background: var(--bg-inset); }
.rq-stat-label { font-size: 14px; color: var(--text-muted); }
.rq-stat-value { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1.2; overflow-wrap: anywhere; }
.rq-stat-value.good { color: var(--accent-green); } .rq-stat-value.warn { color: var(--accent-secondary); } .rq-stat-value.bad { color: var(--accent-red); } .rq-stat-value.accent { color: var(--accent-primary); }
.rq-stat-note { font-size: 14px; color: var(--text-secondary); }

/* Result block (calculator outputs) */
.rq-result { background: var(--result-glow); border: 1px solid var(--result-border); border-radius: 14px; padding: 20px 22px; }
.rq-result-big { font-family: var(--font-mono); font-size: clamp(30px, 4vw, 44px); font-weight: 700; color: var(--accent-primary); line-height: 1.1; }

/* Tables */
.rq-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rq-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.rq-table th { text-align: left; font-size: 14px; font-weight: 600; color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; background: none; }
.rq-table td { padding: 11px 12px; border-bottom: 1px solid var(--border-color); color: var(--text-primary); }
.rq-table tr:hover td { background: var(--bg-card-hover); }
.rq-table .num, .rq-table .mono { font-family: var(--font-mono); }
.rq-table .num { text-align: right; }

/* Notes / callouts */
.rq-note { border-radius: 12px; padding: 14px 18px; background: var(--start-bg); border: 1px solid var(--border-strong); color: var(--text-secondary); font-size: 16px; line-height: 1.55; }
.rq-note strong { color: var(--text-primary); }
.rq-note.warn { background: color-mix(in srgb, var(--accent-yellow) 10%, var(--bg-card)); border-color: var(--soon-border); }
.rq-note.danger { background: color-mix(in srgb, var(--accent-red) 10%, var(--bg-card)); border-color: color-mix(in srgb, var(--accent-red) 45%, transparent); }

/* Explainer disclosure ("How this works") */
.rq-details { border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-card); }
.rq-details > summary { cursor: pointer; list-style: none; min-height: 52px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 17px; color: var(--text-primary); }
.rq-details > summary::-webkit-details-marker { display: none; }
.rq-details > summary::after { content: '+'; font-size: 22px; color: var(--text-muted); }
.rq-details[open] > summary::after { content: '–'; }
.rq-details > div { padding: 0 18px 18px; color: var(--text-secondary); }

/* Badges */
.rq-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 6px; font-size: 13px; font-weight: 700; background: var(--bg-inset); color: var(--text-secondary); }
.rq-badge.good { background: color-mix(in srgb, var(--accent-green) 16%, transparent); color: var(--accent-green); }
.rq-badge.warn { background: color-mix(in srgb, var(--accent-yellow) 16%, transparent); color: var(--accent-secondary); }
.rq-badge.bad { background: color-mix(in srgb, var(--accent-red) 16%, transparent); color: var(--accent-red); }
.rq-badge.live { background: var(--accent-pink); color: #0A0E17; }

@media (max-width: 640px) {
    body.rq-page main { padding: 0 16px 16px; }
    .rq-page-head { padding: 22px 0 18px; margin-bottom: 18px; }
    .rq-page-sub { font-size: 17px; }
}

/* Tools page: richer tool groups + quick calculators */
.rq-tool-group h2 { margin: 0 0 2px; font-size: 22px; font-weight: 700; color: var(--tone); border: 0; padding: 0; }
.rq-tool-group-rich a { min-height: 60px; padding: 8px 10px; }
.rq-tool-group-rich a strong { display: block; font-weight: 600; }
.rq-tool-group-rich a small { display: block; font-size: 14px; color: var(--text-muted); font-weight: 400; line-height: 1.35; }
.rq-quick .rq-card { display: flex; flex-direction: column; gap: 12px; }
.rq-quick .rq-card-title { margin: 0; font-size: 20px; }
.rq-quick-out { font-family: var(--font-mono); font-size: 18px; font-weight: 600; color: var(--accent-primary); min-height: 28px; }
.rq-crumbs a, .rq-crumbs span { padding: 0; margin: 0; background: none; border: 0; font-size: 15px; font-weight: 500; min-height: 0; }
.rq-quick { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* Kit fixes collected from the page conversions */
body.rq-page .rq-table th { text-transform: none; letter-spacing: 0; }
body.rq-page main input::placeholder { text-transform: none; font-family: 'Inter', sans-serif; letter-spacing: 0; }
@media (max-width: 520px) { .rq-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
