/* ==========================================================================
   COMPARISON ARCHIVE PAGE — "The Fit Finder"
   Prefix: rv-cmp-

   Identity: question-led hero, archetype cards showing 4 comparison types,
   face-to-face matchup cards with product thumbnails and "vs" dividers.
   ========================================================================== */

:root {
    --rv-ink: #111827;
    --rv-ink-2: #374151;
    --rv-ink-3: #6b7280;
    --rv-line: #e5e7eb;
    --rv-line-soft: #f3f4f6;
    --rv-cream: #fbf6ec;
    --rv-cream-line: #ecdfc2;

    /* Categorical archetype palette — single-step dots on cream card,
       identity not ranking. Never substitute readiness/evaluative colors. */
    --rv-cat-teal:   #0f766e;
    --rv-cat-violet: #7c3aed;
    --rv-cat-stone:  #78716c;
    --rv-cat-indigo: #4338ca;
}

/* Kill WP constrained-layout gaps */
:where(.wp-site-blocks) > .rv-comparisons-page,
.rv-comparisons-page,
.rv-comparisons-page > * {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Suppress wpautop */
.rv-cmp > p,
.rv-cmp-hero__center > p,
.rv-cmp-hero__stats > p,
.rv-cmp-archetypes__grid > p,
.rv-cmp-controls__bar > p,
.rv-cmp-controls__chips > p,
.rv-cmp-grid > p,
.rv-cmp-card__top > p,
.rv-cmp-card__matchup > p,
.rv-cmp-card__foot > p,
.rv-cmp-pagination > p {
    display: none !important;
}

/* ═══════════════════════════════════════════
   HERO — Question-led, centered
   ═══════════════════════════════════════════ */
.rv-cmp-hero__center {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.rv-cmp-hero__eyebrow {
    font-size: var(--rv-text-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rv-gold-on-light, #8e6f26);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.rv-cmp-hero__title {
    font-family: 'Literata', Georgia, serif !important;
    font-weight: 600 !important;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em;
    color: var(--rv-ink) !important;
    margin: 0 0 0.75rem 0 !important;
}
.rv-cmp-hero__title em {
    font-style: italic;
    color: var(--rv-brand-primary);
}

.rv-cmp-hero__sub {
    font-size: var(--rv-text-md);
    color: var(--rv-ink-2);
    line-height: 1.6;
    margin: 0 0 2rem 0 !important;
}

.rv-cmp-hero__stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    font-size: var(--rv-text-md);
    color: var(--rv-ink-3);
}

.rv-cmp-hstat {
    font-family: 'Literata', Georgia, serif;
    font-weight: 600;
    color: var(--rv-brand-primary);
    margin-right: 0.25rem;
}

/* ═══════════════════════════════════════════
   ARCHETYPE STRIP — the comparison page's unique element
   ═══════════════════════════════════════════ */
.rv-cmp-archetypes__head {
    margin-bottom: 1.5rem;
}
.rv-cmp-archetypes__eyebrow {
    font-size: var(--rv-text-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rv-gold-on-light, #8e6f26);
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.rv-cmp-archetypes__head h2 {
    font-family: 'Literata', Georgia, serif !important;
    font-weight: 500 !important;
    font-size: var(--rv-text-xl) !important;
    color: var(--rv-brand-primary) !important;
    margin: 0 !important;
}

.rv-cmp-archetypes__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.rv-cmp-acard {
    display: flex;
    gap: 0.875rem;
    padding: 1.25rem;
    border: 1px solid var(--rv-cream-line);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    align-items: flex-start;
}
.rv-cmp-acard:hover {
    border-color: var(--rv-brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06);
}
.rv-cmp-acard--active {
    border-color: var(--rv-brand-primary);
    background: rgba(30, 58, 95, 0.03);
    box-shadow: inset 0 0 0 1px var(--rv-brand-primary);
}

.rv-cmp-acard__icon {
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: 8px;
    background: var(--rv-cream, #fbf6ec);
    border: 1px solid var(--rv-cream-line, #ecdfc2);
    color: var(--rv-gold-on-light, #8e6f26);
    flex-shrink: 0;
}
.rv-cmp-acard__icon svg {
    width: 100%;
    height: 100%;
}

.rv-cmp-acard__label {
    font-size: var(--rv-text-md);
    font-weight: 600;
    color: var(--rv-ink);
    margin-bottom: 0.25rem;
}
.rv-cmp-acard__count {
    font-size: var(--rv-text-xs);
    color: var(--rv-ink-3);
    font-weight: 500;
    margin-left: 0.25rem;
}
.rv-cmp-acard__desc {
    font-size: var(--rv-text-xs);
    color: var(--rv-ink-3);
    line-height: 1.45;
}

/* ═══════════════════════════════════════════
   FILTER CONTROLS
   ═══════════════════════════════════════════ */
.rv-cmp-controls__bar {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--rv-line);
    border-radius: 12px;
    padding: 1.125rem 1.375rem;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
}

.rv-cmp-controls__group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rv-cmp-controls__label {
    font-size: var(--rv-text-2xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rv-ink-3);
    font-weight: 700;
    white-space: nowrap;
}

.rv-cmp-controls__chips {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.rv-cmp-chip {
    background: transparent;
    border: 1px solid var(--rv-line);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: var(--rv-text-xs);
    font-weight: 500;
    color: var(--rv-ink-2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
}
.rv-cmp-chip:hover { border-color: var(--rv-brand-primary); color: var(--rv-brand-primary); }
.rv-cmp-chip--active {
    background: var(--rv-brand-fill) !important;
    color: #fff !important;
    border-color: var(--rv-brand-primary) !important;
}

.rv-cmp-controls__divider {
    width: 1px;
    height: 22px;
    background: var(--rv-line);
    flex-shrink: 0;
}

.rv-cmp-controls__search {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--rv-ink-3);
}
.rv-cmp-search-form {
    flex: 1;
    display: flex;
}
.rv-cmp-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: var(--rv-text-md);
    color: var(--rv-ink-2);
    min-width: 0;
}
.rv-cmp-search-input::placeholder {
    color: var(--rv-ink-3);
    font-style: italic;
    font-family: 'Literata', Georgia, serif;
}

.rv-cmp-controls__reset {
    font-size: var(--rv-text-xs);
    color: var(--rv-ink-3);
    text-decoration: none;
    font-weight: 600;
    padding: 5px 12px;
    border: 1px solid var(--rv-line);
    border-radius: 999px;
    transition: all 0.15s;
}
.rv-cmp-controls__reset:hover {
    border-color: var(--rv-brand-primary);
    color: var(--rv-brand-primary);
}

/* ── Sort row ── */
.rv-cmp-sort {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.875rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.rv-cmp-sort__count {
    font-family: 'Literata', Georgia, serif;
    font-size: var(--rv-text-md);
    color: var(--rv-ink-2);
    font-weight: 500;
}
.rv-cmp-sort__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rv-cmp-sort__label {
    font-size: var(--rv-text-xs);
    color: var(--rv-ink-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.rv-cmp-sort__select {
    background: var(--rv-line-soft);
    border: 1px solid var(--rv-line);
    border-radius: 8px;
    padding: 5px 28px 5px 10px;
    font-size: var(--rv-text-xs);
    font-family: 'Inter', sans-serif;
    color: var(--rv-ink-2);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

/* ═══════════════════════════════════════════
   COMPARISON CARDS — face-to-face matchup layout
   ═══════════════════════════════════════════ */
.rv-cmp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* ── Comparison Card: category-themed ── */

/* Pills (product chips) — used inside the card body */
.rv-cmp-card__products {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.rv-cmp-card__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem 0.25rem 0.25rem;
    background: rgba(255,255,255,0.55);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.7);
    transition: border-color 0.15s;
}
.rv-cmp-card__chip-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
    mix-blend-mode: multiply;
}
.rv-cmp-card__chip-name {
    font-size: var(--rv-text-xs);
    font-weight: 500;
    color: var(--rv-cat-ink);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════
   Category palette tokens (used by V3). Scoped to comparison archive for now.
   ═══════════════════════════════════════════ */
.rv-cmp-grid {
    --rv-cat-lawn-bg: #f0f5ea;
    --rv-cat-lawn-ink: #2d4a1f;
    --rv-cat-lawn-accent: #5b7d3e;
    --rv-cat-pool-bg: #e8f1f5;
    --rv-cat-pool-ink: #1e3a4d;
    --rv-cat-pool-accent: #3a7799;
    --rv-cat-vacuum-bg: #f5ece4;
    --rv-cat-vacuum-ink: #4d2f1f;
    --rv-cat-vacuum-accent: #a06840;
    --rv-cat-window-bg: #eef0f4;
    --rv-cat-window-ink: #2a2f3d;
    --rv-cat-window-accent: #5b6479;
    --rv-cat-humanoid-bg: #ebe7ef;
    --rv-cat-humanoid-ink: #2e2538;
    --rv-cat-humanoid-accent: #6b5a82;
    --rv-cat-default-bg: var(--rv-cream);
    --rv-cat-default-ink: var(--rv-text-primary);
    --rv-cat-default-accent: var(--rv-gold-on-light, #8e6f26);
}
html[data-theme="dark"] .rv-cmp-grid {
    --rv-cat-lawn-bg: #243023;
    --rv-cat-lawn-ink: #c7dab1;
    --rv-cat-lawn-accent: #8aae6a;
    --rv-cat-pool-bg: #1f3140;
    --rv-cat-pool-ink: #b6cfdc;
    --rv-cat-pool-accent: #6ba0bf;
    --rv-cat-vacuum-bg: #3a2a1d;
    --rv-cat-vacuum-ink: #e8cdb6;
    --rv-cat-vacuum-accent: #d49060;
    --rv-cat-window-bg: #262a36;
    --rv-cat-window-ink: #bcc2d2;
    --rv-cat-window-accent: #8a93a8;
    --rv-cat-humanoid-bg: #292336;
    --rv-cat-humanoid-ink: #d6cce4;
    --rv-cat-humanoid-accent: #a691c4;
    --rv-cat-default-bg: var(--rv-surface-secondary);
    --rv-cat-default-ink: var(--rv-text-primary);
    --rv-cat-default-accent: var(--rv-gold-on-light, #c9a558);
}

/* ── Comparison card — category-themed ── */
a.rv-cmp-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    padding: 0;
    background: var(--rv-cat-bg, var(--rv-cat-default-bg));
    border: 1px solid transparent;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
a.rv-cmp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(17,24,39,0.10);
}
.rv-cmp-card--cat-lawn     { --rv-cat-bg: var(--rv-cat-lawn-bg);     --rv-cat-ink: var(--rv-cat-lawn-ink);     --rv-cat-accent: var(--rv-cat-lawn-accent); }
.rv-cmp-card--cat-pool     { --rv-cat-bg: var(--rv-cat-pool-bg);     --rv-cat-ink: var(--rv-cat-pool-ink);     --rv-cat-accent: var(--rv-cat-pool-accent); }
.rv-cmp-card--cat-vacuum   { --rv-cat-bg: var(--rv-cat-vacuum-bg);   --rv-cat-ink: var(--rv-cat-vacuum-ink);   --rv-cat-accent: var(--rv-cat-vacuum-accent); }
.rv-cmp-card--cat-window   { --rv-cat-bg: var(--rv-cat-window-bg);   --rv-cat-ink: var(--rv-cat-window-ink);   --rv-cat-accent: var(--rv-cat-window-accent); }
.rv-cmp-card--cat-humanoid { --rv-cat-bg: var(--rv-cat-humanoid-bg); --rv-cat-ink: var(--rv-cat-humanoid-ink); --rv-cat-accent: var(--rv-cat-humanoid-accent); }
.rv-cmp-card--cat-default  { --rv-cat-bg: var(--rv-cat-default-bg);  --rv-cat-ink: var(--rv-cat-default-ink);  --rv-cat-accent: var(--rv-cat-default-accent); }

.rv-cmp-card__head {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem 0.75rem;
    border-bottom: 1px solid color-mix(in srgb, var(--rv-cat-ink) 10%, transparent);
}
.rv-cmp-card__icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rv-cat-accent);
    flex-shrink: 0;
}
.rv-cmp-card__icon svg { width: 100%; height: 100%; }
.rv-cmp-card__cat {
    font-size: var(--rv-text-xs);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rv-cat-ink);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rv-cmp-card__archchip {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rv-cat-bg);
    background: var(--rv-cat-ink);
    padding: 0.3125rem 0.625rem;
    border-radius: 2px;
    flex-shrink: 0;
}
.rv-cmp-card__body {
    padding: 1.125rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    flex: 1;
}
.rv-cmp-card__title {
    font-family: 'Literata', Georgia, serif !important;
    font-weight: 700 !important;
    font-size: var(--rv-text-xl) !important;
    line-height: 1.25 !important;
    color: var(--rv-cat-ink) !important;
    margin: 0 !important;
    text-decoration: none;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s;
}
.rv-cmp-card__title:hover {
    text-decoration: underline;
}
.rv-cmp-card__excerpt {
    font-size: var(--rv-text-xs);
    line-height: 1.55;
    color: color-mix(in srgb, var(--rv-cat-ink) 70%, transparent);
    margin: 0 !important;
}
.rv-cmp-card__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid color-mix(in srgb, var(--rv-cat-ink) 10%, transparent);
    font-size: var(--rv-text-xs);
    color: var(--rv-cat-ink);
    opacity: 0.75;
    margin-top: auto;
}
.rv-cmp-card__arrow {
    font-size: var(--rv-text-base);
    color: var(--rv-cat-accent);
    transition: transform 0.2s, color 0.15s;
}
a.rv-cmp-card:hover .rv-cmp-card__arrow { transform: translateX(3px); }
.rv-cmp-card__arrow:hover {
    color: color-mix(in srgb, var(--rv-cat-accent) 65%, #000);
}

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */
.rv-cmp-empty {
    text-align: center;
    padding: 4rem 2rem;
    border: 1px dashed var(--rv-line);
    border-radius: 12px;
    background: var(--rv-line-soft);
}
.rv-cmp-empty h3 {
    font-family: 'Literata', Georgia, serif !important;
    font-weight: 500 !important;
    font-size: var(--rv-text-xl) !important;
    color: var(--rv-brand-primary) !important;
    margin: 0 0 0.5rem 0 !important;
}
.rv-cmp-empty p {
    font-size: var(--rv-text-md);
    color: var(--rv-ink-3);
    margin: 0 0 1.5rem 0 !important;
}
.rv-cmp-empty__reset {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: var(--rv-brand-fill);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--rv-text-md);
}

/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */
.rv-cmp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.625rem;
    margin-top: 2.5rem;
}
.rv-cmp-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid var(--rv-line);
    border-radius: 8px;
    font-size: var(--rv-text-md);
    font-weight: 500;
    color: var(--rv-ink-2);
    text-decoration: none;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
}
.rv-cmp-page:hover {
    border-color: var(--rv-brand-primary);
    color: var(--rv-brand-primary);
}
.rv-cmp-page--current {
    background: var(--rv-brand-fill);
    color: #fff !important;
    border-color: var(--rv-brand-primary);
}
.rv-cmp-page--dots {
    border: none;
    color: var(--rv-ink-3);
    min-width: auto;
    padding: 0 0.25rem;
}

/* ═══════════════════════════════════════════
   NEXT-UP CTA
   ═══════════════════════════════════════════ */
.rv-cmp-nextup__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.75rem;
    background: var(--rv-brand-fill);
    border-radius: 12px;
    padding: 2rem 2.25rem;
    box-shadow: 0 2px 6px rgba(11, 24, 43, 0.12);
}
.rv-cmp-nextup__label {
    font-size: var(--rv-text-2xs);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.rv-cmp-nextup__inner h3 {
    font-family: 'Literata', Georgia, serif !important;
    font-weight: 500 !important;
    font-size: var(--rv-text-xl) !important;
    color: #fff !important;
    margin: 0 !important;
}
.rv-cmp-nextup__inner h3 em { font-style: italic; color: var(--rv-gold); }
.rv-cmp-nextup__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    background: #fff;
    color: var(--rv-brand-fill);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: var(--rv-text-md);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.rv-cmp-nextup__btn:hover { opacity: 0.9; }
.rv-cmp-nextup__arrow svg { stroke: var(--rv-brand-fill); }

/* ═══════════════════════════════════════════
   META FOOTER
   ═══════════════════════════════════════════ */
.rv-cmp-metafoot__inner {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--rv-line);
    padding: 1.5rem 0;
    font-size: var(--rv-text-xs);
    color: var(--rv-ink-3);
    gap: 1.25rem;
    flex-wrap: wrap;
}
.rv-cmp-metafoot__inner a {
    color: var(--rv-brand-primary);
    text-decoration: none;
}
.rv-cmp-metafoot__inner a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════ */
html[data-theme="dark"] .rv-cmp-hero {
    background: linear-gradient(180deg, var(--rv-surface-secondary) 0%, var(--rv-surface-primary) 100%) !important;
}
html[data-theme="dark"] .rv-cmp-acard,
html[data-theme="dark"] .rv-cmp-controls__bar,
html[data-theme="dark"] .rv-cmp-empty {
    background: var(--rv-surface-secondary);
}
/* Card background comes from category palette tokens (which already have dark variants).
   The chip semi-transparent white needs a darker base in dark mode. */
html[data-theme="dark"] .rv-cmp-card__chip {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.10);
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .rv-cmp-hero {
        background: linear-gradient(180deg, var(--rv-surface-secondary) 0%, var(--rv-surface-primary) 100%) !important;
    }
    html:not([data-theme="light"]) .rv-cmp-acard,
    html:not([data-theme="light"]) .rv-cmp-controls__bar,
    html:not([data-theme="light"]) .rv-cmp-empty {
        background: var(--rv-surface-secondary);
    }
    html:not([data-theme="light"]) .rv-cmp-card__chip {
        background: rgba(255,255,255,0.06);
        border-color: rgba(255,255,255,0.10);
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 960px) {
    .rv-cmp-archetypes__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rv-cmp-hero__stats {
        flex-wrap: wrap;
        gap: 1rem 2rem;
    }
    .rv-cmp-archetypes__grid {
        grid-template-columns: 1fr;
    }
    .rv-cmp-grid {
        grid-template-columns: 1fr;
    }
    .rv-cmp-controls__bar {
        flex-direction: column;
        align-items: stretch;
    }
    .rv-cmp-controls__group {
        flex-direction: column;
        align-items: flex-start;
    }
    .rv-cmp-controls__divider {
        width: 100%;
        height: 1px;
    }
    .rv-cmp-controls__search {
        min-width: 100%;
    }
    .rv-cmp-nextup__inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .rv-cmp-hero__stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    .rv-cmp-metafoot__inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Comparisons archive — NEW HERO ("Navy authority + featured comparison")
   ==========================================================================
   Replaces the legacy .rv-cmp-hero__ centered hero above. Namespace
   .rv-cmp-hero-d__ kept distinct so the old block could coexist during
   rollout; it can be deleted once verified live.
   ========================================================================== */

.rv-cmp-hero-d {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: none;

    background: var(--rv-brand-fill, #1e3a5f);
    background-image: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    color: #fff;
    border-bottom: 1px solid var(--rv-line, #e5e7eb);
    overflow: hidden;
}

/* Faint engraved-grid texture overlay. */
.rv-cmp-hero-d__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 48px 48px;
}

.rv-cmp-hero-d__wrap {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 3.5rem;
    align-items: center;
}

/* ────── LEFT column: eyebrow + headline + lead + stats ────── */
.rv-cmp-hero-d__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: var(--rv-text-xs, 12px);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rv-gold, #c49a3c);
    margin-bottom: 1rem;
}
.rv-cmp-hero-d__eyebrow::before {
    content: "";
    width: 32px;
    height: 1px;
    background: var(--rv-gold, #c49a3c);
}

.rv-cmp-hero-d__title {
    font-family: 'Literata', Georgia, serif;
    font-weight: 600;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    color: #fff;
    margin: 0 0 1.125rem;
    text-wrap: balance;
}
/* Specificity bump: must beat blocks-shared.css `h1.rv-serif em`
   (0,1,2), which paints em with --rv-brand-accent (blue). */
.rv-cmp-hero-d .rv-cmp-hero-d__title em,
h1.rv-cmp-hero-d__title em {
    font-style: italic;
    color: var(--rv-gold, #c49a3c);
}

.rv-cmp-hero-d__lead {
    font-size: var(--rv-text-base, 16px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
    max-width: 38ch;
    margin: 0 0 1.75rem;
}

/* Stats row */
.rv-cmp-hero-d__stats {
    display: flex;
    gap: 1.625rem;
    align-items: baseline;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.25rem;
    margin: 0;
}
.rv-cmp-hero-d__stat {
    margin: 0;
    display: flex;
    flex-direction: row-reverse;
    align-items: baseline;
    gap: 0.5rem;
}
.rv-cmp-hero-d__stat dt {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 400;
}
.rv-cmp-hero-d__stat dd {
    font-family: 'Literata', Georgia, serif;
    font-weight: 600;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--rv-gold, #c49a3c);
    margin: 0;
}

/* ────── RIGHT column: featured comparison card ────── */
.rv-cmp-hero-d__featured {
    position: relative;
    display: block;
    text-decoration: none;
    color: var(--rv-ink, #111827);

    background: #fff;
    border-radius: 16px;
    padding: 1.375rem 1.5rem 1.25rem;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.32),
        0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.rv-cmp-hero-d__featured:hover,
.rv-cmp-hero-d__featured:focus-visible {
    transform: translateY(-2px);
    box-shadow:
        0 32px 56px rgba(0, 0, 0, 0.38),
        0 1px 0 rgba(255, 255, 255, 0.06);
    color: var(--rv-ink, #111827);
}
.rv-cmp-hero-d__featured:focus-visible {
    outline: 2px solid var(--rv-gold, #c49a3c);
    outline-offset: 4px;
}

.rv-cmp-hero-d__featured-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}
.rv-cmp-hero-d__featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rv-gold-on-light, #8e6f26);
    line-height: 1.2;
}
.rv-cmp-hero-d__featured-dot {
    width: 8px;
    height: 8px;
    border-radius: 100px;
    background: var(--dot, var(--rv-brand-primary, #1e3a5f));
    flex: 0 0 auto;
}
.rv-cmp-hero-d__featured-stamp {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rv-ink-3, #6b7280);
    white-space: nowrap;
}

.rv-cmp-hero-d__featured-q {
    font-family: 'Literata', Georgia, serif;
    font-weight: 600;
    font-size: 1.375rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--rv-ink, #111827);
    margin: 0 0 0.5rem;
    text-wrap: balance;
}
.rv-cmp-hero-d__featured-q em {
    font-style: italic;
    color: var(--rv-brand-primary, #1e3a5f);
}
.rv-cmp-hero-d__featured-excerpt {
    font-family: var(--rv-font-sans, 'Inter', sans-serif);
    font-size: 13px;
    line-height: 1.5;
    color: var(--rv-ink-3, #6b7280);
    margin: 0 0 1.125rem;
    text-wrap: pretty;
}

/* Versus block — used for 2-way matchups only (3+ uses the cluster). */
.rv-cmp-hero-d__featured-versus {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.125rem;
    align-items: center;
    padding: 0.5rem 0;
}
.rv-cmp-hero-d__featured-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    text-align: center;
    min-width: 0;
}

/* Cluster + list layout — used for 3- and 4-way matchups. */
.rv-cmp-hero-d__featured-group {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    padding: 0.5rem 0;
}
.rv-cmp-hero-d__featured-stack {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
.rv-cmp-hero-d__featured-stack .rv-cmp-hero-d__featured-photo {
    width: 56px;
    height: 56px;
    margin-left: -14px;
    box-shadow: none;
    position: relative;
    z-index: 1;
}
.rv-cmp-hero-d__featured-stack .rv-cmp-hero-d__featured-photo:first-child {
    margin-left: 0;
}
.rv-cmp-hero-d__featured-stack .rv-cmp-hero-d__featured-photo:hover {
    z-index: 2;
}
.rv-cmp-hero-d__featured-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-width: 0;
}
.rv-cmp-hero-d__featured-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}
.rv-cmp-hero-d__featured-list-name {
    font-family: var(--rv-font-sans, 'Inter', sans-serif);
    font-weight: 700;
    font-size: 13px;
    color: var(--rv-ink, #111827);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.rv-cmp-hero-d__featured-photo {
    width: 92px;
    height: 92px;
    border-radius: 100px;
    background: #fff;
    border: 2px solid var(--rv-gold, #c49a3c);
    background-image:
        radial-gradient(ellipse 60% 30% at 50% 88%, rgba(15, 23, 42, 0.18) 0%, transparent 65%),
        radial-gradient(ellipse 90% 70% at 35% 30%, #fff 0%, #e6ebf2 55%, #c9d3df 100%);
    overflow: hidden;
}
.rv-cmp-hero-d__featured-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.rv-cmp-hero-d__featured-name {
    font-family: var(--rv-font-sans, 'Inter', sans-serif);
    font-weight: 700;
    font-size: 13px;
    color: var(--rv-ink, #111827);
    line-height: 1.25;
    text-wrap: balance;
    max-width: 18ch;
}
.rv-cmp-hero-d__featured-vs {
    font-family: 'Literata', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 36px;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--rv-brand-primary, #1e3a5f);
    padding: 0 2px;
}

.rv-cmp-hero-d__featured-foot {
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--rv-cream-line, #ecdfc2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-family: var(--rv-font-sans, 'Inter', sans-serif);
    font-size: 12px;
    color: var(--rv-ink-3, #6b7280);
}
.rv-cmp-hero-d__featured-cta {
    color: var(--rv-brand-primary, #1e3a5f);
    font-weight: 600;
}

/* Hover affordance — underline only when the cursor is over the words
   themselves, not whenever the card has hover. Keyboard focus on the card
   still highlights both as a hint that they're the actionable cues. */
.rv-cmp-hero-d__featured-q:hover,
.rv-cmp-hero-d__featured-cta:hover,
.rv-cmp-hero-d__featured:focus-visible .rv-cmp-hero-d__featured-q,
.rv-cmp-hero-d__featured:focus-visible .rv-cmp-hero-d__featured-cta {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Suppress wpautop inside the new hero. Exclude paragraphs that ARE
   real content (lead, excerpt) so they aren't hidden alongside the
   stray wpautop wrappers. */
.rv-cmp-hero-d > p,
.rv-cmp-hero-d__wrap > p,
.rv-cmp-hero-d__left > p:not(.rv-cmp-hero-d__lead),
.rv-cmp-hero-d__stats > p,
.rv-cmp-hero-d__featured > p:not(.rv-cmp-hero-d__featured-excerpt),
.rv-cmp-hero-d__featured-head > p,
.rv-cmp-hero-d__featured-versus > p,
.rv-cmp-hero-d__featured-side > p,
.rv-cmp-hero-d__featured-foot > p,
.rv-cmp-hero-d__featured-group > p {
    display: none !important;
}

@media (max-width: 980px) {
    .rv-cmp-hero-d__wrap {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.5rem 1.5rem;
    }
    .rv-cmp-hero-d__lead {
        max-width: 56ch;
    }
}
@media (max-width: 560px) {
    .rv-cmp-hero-d__featured {
        padding: 1.125rem 1.125rem 1rem;
    }
    .rv-cmp-hero-d__featured-versus {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .rv-cmp-hero-d__featured-vs {
        font-size: 26px;
    }
    .rv-cmp-hero-d__featured-versus .rv-cmp-hero-d__featured-photo {
        width: 76px;
        height: 76px;
    }
    .rv-cmp-hero-d__featured-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.875rem;
    }
    .rv-cmp-hero-d__featured-stack {
        justify-content: center;
    }
    .rv-cmp-hero-d__stats {
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }
}

/* Dark mode — hero is already dark in light mode; keep cream card legible. */
html[data-theme="dark"] .rv-cmp-hero-d__featured {
    background: #fff;
    color: var(--rv-ink, #111827);
}
html[data-theme="dark"] .rv-cmp-hero-d__featured-q,
html[data-theme="dark"] .rv-cmp-hero-d__featured-name {
    color: var(--rv-ink, #111827);
}
