/* ==========================================================================
   DATABASE ARCHIVE PAGE — "The Collection"
   Prefix: rv-db-

   Identity: stat-led hero (big number), segmented distribution bar,
   visual category showcase with product thumbnails, compact readiness strip.
   Distinct from Tracker (temporal/pulse) and Homepage (educational/ladder).
   ========================================================================== */

/* ── Shared ink/line tokens ── */
/* Local token overrides removed — base.css is the single source of truth.
   These restated tokens diverged from base (--rv-line-soft was #f3f4f6 here
   vs #eef1f5 in base). All canonical values now flow from base.css. */

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

/* Taxonomy archives (rv-tax-page on <main>): kill the 1.5rem
   :where(.wp-site-blocks) > * { margin-block-start } gap above the explore panel.
   Preserves the inline padding-top on <main>, which sets the intended
   breathing room above the panel content. */
:where(.wp-site-blocks) > .rv-tax-page {
    margin-block-start: 0 !important;
}

/* Suppress wpautop */
.rv-db > p,
.rv-database-hero__inner > p,
.rv-database-hero__chart-rows > p,
.rv-db-distro__bar > p,
.rv-db-distro__legend > p,
.rv-db-showcase__grid--c2 > p,
.rv-db-readiness__row > p,
.rv-db-controls__bar > p,
.rv-db-controls__chips > p,
.rv-db-grid > p,
.rv-db-compare__inner > p,
.rv-db-compare__selects > p,
.rv-db-pagination > p {
    display: none !important;
}

/* ═══════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════ */
.rv-db-crumbs {
    font-size: var(--rv-text-xs);
    letter-spacing: 0.06em;
    color: var(--rv-ink-3);
    margin-bottom: 2.5rem;
}
.rv-db-crumbs a { color: var(--rv-brand-primary); text-decoration: none; }
.rv-db-crumbs a:hover { text-decoration: underline; }
.rv-db-crumbs span { margin: 0 0.5rem; color: var(--rv-line); }

/* wpautop fix: make <p> wrappers in flex/grid containers transparent */
.rv-db-compare__form > p {
    display: contents !important;
}

/* ═══════════════════════════════════════════
   HERO — Navy authority + autonomy distribution chart
   Recreated from a Claude Design handoff. Two-column hero with copy/search
   on the left and a horizontal bar-chart distribution on the right.
   Uses navy fill in both light + dark modes (per spec — it's "dark-mode-like").
   ═══════════════════════════════════════════ */
.rv-database-hero {
    background: var(--rv-brand-fill);
    background-image:
        radial-gradient(circle at 85% 30%, rgba(212,170,82,0.10) 0%, transparent 50%),
        linear-gradient(135deg, var(--rv-brand-fill) 0%, var(--rv-brand-fill-dark) 100%);
    color: #fff;
    padding: 80px 80px;
    position: relative;
    overflow: hidden;
}
/* Subtle engraved-grid texture overlay. Pure decoration. */
.rv-database-hero::before {
    content: "";
    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-database-hero__inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    align-items: center;
}

/* ── Left column ── */
.rv-database-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rv-gold);
}
.rv-database-hero__eyebrow::before {
    content: "";
    width: 32px;
    height: 1px;
    background: var(--rv-gold);
}

.rv-database-hero__title {
    font-family: 'Literata', Georgia, serif !important;
    font-weight: 600 !important;
    font-size: clamp(2.2rem, 4.5vw, 3.8rem) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.025em !important;
    color: #fff !important;
    margin: 16px 0 22px !important;
}
.rv-database-hero__title em {
    font-style: italic !important;
    color: var(--rv-gold) !important;
}

.rv-database-hero__lead {
    font-size: 18px;
    line-height: 1.55;
    color: rgba(255,255,255,0.78);
    max-width: 52ch;
    margin: 0 0 36px !important;
}

/* ── Search field (dark-on-dark) ── */
.rv-database-hero__search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    padding: 6px 6px 6px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    max-width: 480px;
    transition: border-color 0.15s, background-color 0.15s;
}
.rv-database-hero__search:focus-within {
    border-color: var(--rv-gold);
    background: rgba(255,255,255,0.09);
}
.rv-database-hero__search input {
    flex: 1;
    border: 0;
    background: transparent;
    font-family: 'Literata', Georgia, serif;
    font-style: italic;
    font-size: 18px;
    color: #fff;
    padding: 14px 8px;
    min-width: 0;
}
.rv-database-hero__search input:focus,
.rv-database-hero__search input:focus-visible {
    outline: 0 !important;
}
.rv-database-hero__search input::placeholder {
    color: rgba(255,255,255,0.45);
}
/* Override Chrome autofill — it forces white bg + dark text and ignores normal
   background-color overrides. The inset box-shadow trick is the canonical fix. */
.rv-database-hero__search input:-webkit-autofill,
.rv-database-hero__search input:-webkit-autofill:hover,
.rv-database-hero__search input:-webkit-autofill:focus,
.rv-database-hero__search input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(40,55,80,1) inset !important;
    box-shadow: 0 0 0 1000px rgba(40,55,80,1) inset !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    transition: background-color 5000s ease-in-out 0s;
}
/* White clear (X) button — overrides the dark WebKit default that's invisible on navy */
.rv-database-hero__search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'><path d='M3 3l10 10M13 3L3 13'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.rv-database-hero__search input::-webkit-search-cancel-button:hover {
    opacity: 1;
}
.rv-database-hero__search button {
    background: var(--rv-gold);
    color: #fff;
    border: 0;
    padding: 14px 22px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.15s;
}
.rv-database-hero__search button:hover {
    background: var(--rv-gold-light);
}

/* ── Right column: chart panel ── */
/* Hero distribution lives directly on the navy — no card chrome, no panel.
   The dedicated "Autonomy distribution" section below owns categorical color encoding;
   here the bars are a hero accent, unified in gold to echo the headline's "5 tiers". */
.rv-database-hero__chart {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 4px 0 0;
    color: #fff;
}
.rv-database-hero__chart-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 16px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.rv-database-hero__chart-header-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rv-gold);
}
.rv-database-hero__chart-header-label::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--rv-gold);
}
.rv-database-hero__chart-header-total {
    font-family: 'Literata', Georgia, serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1;
    color: #fff;
}
.rv-database-hero__chart-header-total span {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-left: 6px;
}
.rv-database-hero__chart-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.rv-database-hero__chart-row {
    display: grid;
    grid-template-columns: 160px 1fr 36px;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 4px;
    transition: background 160ms ease, transform 160ms ease;
}
.rv-database-hero__chart-row:hover,
.rv-database-hero__chart-row:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}
.rv-database-hero__chart-row:focus-visible {
    outline: 2px solid var(--rv-gold);
    outline-offset: 2px;
}
.rv-database-hero__chart-row:hover .rv-database-hero__chart-row-name,
.rv-database-hero__chart-row:focus-visible .rv-database-hero__chart-row-name {
    color: #fff;
}
.rv-database-hero__chart-row:hover .rv-database-hero__chart-bar,
.rv-database-hero__chart-row:focus-visible .rv-database-hero__chart-bar {
    background: rgba(212, 170, 82, 1);
}
.rv-database-hero__chart-row:hover .rv-database-hero__chart-track,
.rv-database-hero__chart-row:focus-visible .rv-database-hero__chart-track {
    background: rgba(255, 255, 255, 0.12);
}
.rv-database-hero__chart-row-label {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.rv-database-hero__chart-row-roman {
    font-family: 'Literata', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 17px;
    line-height: 1;
    color: var(--rv-gold);
    min-width: 28px;
}
.rv-database-hero__chart-row-name {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: rgba(255,255,255,0.82);
}
.rv-database-hero__chart-track {
    height: 8px;
    background: rgba(255,255,255,0.07);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}
.rv-database-hero__chart-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 400ms ease;
}
.rv-database-hero__chart-bar--1,
.rv-database-hero__chart-bar--2,
.rv-database-hero__chart-bar--3,
.rv-database-hero__chart-bar--4,
.rv-database-hero__chart-bar--5 { background: rgba(212, 170, 82, 0.78); }
.rv-database-hero__chart-count {
    font-family: 'Literata', Georgia, serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
    text-align: right;
    color: rgba(255,255,255,0.92);
    font-variant-numeric: tabular-nums;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .rv-database-hero { padding: 56px 32px; }
    .rv-database-hero__inner { grid-template-columns: 1fr; gap: 40px; }
    .rv-database-hero__lead { max-width: none; }
}
@media (max-width: 600px) {
    .rv-database-hero { padding: 40px 20px; }
    .rv-database-hero__search { max-width: none; }
}


/* ═══════════════════════════════════════════
   AUTONOMY DISTRIBUTION — segmented bar
   Compact, horizontal, clickable segments.
   ═══════════════════════════════════════════ */
.rv-db-distro__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}
.rv-db-distro__title {
    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-db-distro__link {
    font-size: var(--rv-text-xs);
    color: var(--rv-brand-primary);
    text-decoration: none;
    font-weight: 500;
}
.rv-db-distro__link:hover { text-decoration: underline; }

.rv-db-distro__bar {
    display: flex;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    gap: 2px;
}

.rv-db-distro__seg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.15s, transform 0.1s;
    min-width: 36px;
    position: relative;
}
.rv-db-distro__seg:hover { opacity: 0.85; transform: scaleY(1.06); }

.rv-db-distro__seg--1 { background: var(--rv-autonomy-1, #93b5d1); }
.rv-db-distro__seg--2 { background: var(--rv-autonomy-2, #6a96ba); }
.rv-db-distro__seg--3 { background: var(--rv-autonomy-3, #4678a0); }
.rv-db-distro__seg--4 { background: var(--rv-autonomy-4, #2f5a82); }
.rv-db-distro__seg--5 { background: var(--rv-autonomy-5, #1e3a5f); }

.rv-db-distro__seg-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    opacity: 0.8;
    font-family: 'Inter', sans-serif;
}
.rv-db-distro__seg-count {
    font-family: 'Literata', Georgia, serif;
    font-size: var(--rv-text-md);
    font-weight: 600;
}

/* Legend */
.rv-db-distro__legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.875rem;
    flex-wrap: wrap;
}
.rv-db-distro__key {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--rv-text-xs);
    color: var(--rv-ink-2);
}
.rv-db-distro__dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}
.rv-db-distro__dot--1 { background: var(--rv-autonomy-1, #93b5d1); }
.rv-db-distro__dot--2 { background: var(--rv-autonomy-2, #6a96ba); }
.rv-db-distro__dot--3 { background: var(--rv-autonomy-3, #4678a0); }
.rv-db-distro__dot--4 { background: var(--rv-autonomy-4, #2f5a82); }
.rv-db-distro__dot--5 { background: var(--rv-autonomy-5, #1e3a5f); }

.rv-db-distro__key-name {
    font-weight: 500;
}
.rv-db-distro__key-pct {
    color: var(--rv-ink-3);
    font-weight: 600;
    margin-left: 0.125rem;
}

/* ═══════════════════════════════════════════
   CATEGORY SHOWCASE — SVG icon variations
   ═══════════════════════════════════════════ */
.rv-db-showcase__head {
    margin-bottom: 1.5rem;
}
.rv-db-showcase__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-db-showcase__head h2 {
    font-family: 'Literata', Georgia, serif !important;
    font-weight: 500 !important;
    font-size: var(--rv-text-2xl) !important;
    color: var(--rv-brand-primary) !important;
    margin: 0 !important;
}

/* Shared catcard base */
.rv-db-catcard {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* ── Category grid cards ── */
.rv-db-showcase__grid--c2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.rv-db-catcard--c2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    border: 1px solid var(--rv-line);
    border-radius: 10px;
    background: #fff;
}
.rv-db-catcard--c2:hover {
    border-color: var(--rv-gold);
    box-shadow: 0 4px 16px rgba(184, 135, 58, 0.08);
    transform: translateY(-2px);
}
.rv-db-catcard--c2:hover .rv-db-catcard__arrow {
    opacity: 1;
    transform: translateX(0);
}
.rv-db-catcard__icon--c2 {
    width: 48px;
    height: 48px;
    color: var(--rv-gold-on-light, #8e6f26);
    flex-shrink: 0;
}
.rv-db-catcard__icon--c2 svg {
    width: 100%;
    height: 100%;
}
.rv-db-catcard__text--c2 {
    flex: 1;
    min-width: 0;
}
.rv-db-catcard__name--c2 {
    font-weight: 600;
    font-size: var(--rv-text-md);
    color: var(--rv-ink);
    margin-bottom: 0.125rem;
}
.rv-db-catcard__count--c2 {
    font-size: var(--rv-text-xs);
    color: var(--rv-ink-3);
}

/* ═══════════════════════════════════════════
   READINESS STRIP — compact inline row
   ═══════════════════════════════════════════ */
.rv-db-readiness__row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.rv-db-readiness__label {
    font-size: var(--rv-text-2xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rv-ink-3);
    font-weight: 700;
    margin-right: 0.5rem;
}

.rv-db-rpill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--rv-line);
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
    background: #fff;
}
.rv-db-rpill:hover {
    border-color: var(--rv-brand-primary);
}

.rv-db-rpill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.rv-db-rpill__name {
    font-size: var(--rv-text-xs);
    font-weight: 600;
    color: var(--rv-ink);
}
.rv-db-rpill__count {
    font-size: var(--rv-text-xs);
    color: var(--rv-ink-3);
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   FILTER CONTROLS
   ═══════════════════════════════════════════ */
.rv-db-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-db-controls__group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rv-db-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-db-controls__chips {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.rv-db-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);
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.rv-db-chip:hover { border-color: var(--rv-brand-primary); color: var(--rv-brand-primary); }
.rv-db-chip--active {
    background: var(--rv-brand-fill) !important;
    color: #fff !important;
    border-color: var(--rv-brand-primary) !important;
}
.rv-db-chip__count {
    font-size: 10px;
    opacity: 0.7;
}
.rv-db-chip--active .rv-db-chip__count { opacity: 0.8; }
.rv-db-chip--level {
    min-width: 38px;
    justify-content: center;
    font-weight: 600;
}

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

.rv-db-controls__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;
}

.rv-db-controls__search {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--rv-ink-3);
    font-size: var(--rv-text-md);
}
.rv-db-search-form {
    flex: 1;
    display: flex;
}
.rv-db-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-db-search-input::placeholder {
    color: var(--rv-ink-3);
    font-style: italic;
    font-family: 'Literata', Georgia, serif;
}

.rv-db-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-db-controls__reset:hover {
    border-color: var(--rv-brand-primary);
    color: var(--rv-brand-primary);
}

/* ── Sort row ── */
.rv-db-sort {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.875rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.rv-db-sort__count {
    font-family: 'Literata', Georgia, serif;
    font-size: var(--rv-text-md);
    color: var(--rv-ink-2);
    font-weight: 500;
}
.rv-db-sort__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rv-db-sort__label {
    font-size: var(--rv-text-xs);
    color: var(--rv-ink-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.rv-db-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;
}

/* ═══════════════════════════════════════════
   PRODUCT GRID
   ═══════════════════════════════════════════ */
.rv-db-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.rv-db-grid .rv-product-card {
    height: 100%;
}

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */
.rv-db-empty {
    text-align: center;
    padding: 4rem 2rem;
    border: 1px dashed var(--rv-line);
    border-radius: 12px;
    background: var(--rv-line-soft);
}
.rv-db-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-db-empty p {
    font-size: var(--rv-text-md);
    color: var(--rv-ink-3);
    margin: 0 0 1.5rem 0 !important;
}
.rv-db-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);
    transition: opacity 0.15s;
}
.rv-db-empty__reset:hover { opacity: 0.9; }

/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */
.rv-db-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.625rem;
    margin-top: 2.5rem;
}
.rv-db-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-db-page:hover {
    border-color: var(--rv-brand-primary);
    color: var(--rv-brand-primary);
}
.rv-db-page--current {
    background: var(--rv-brand-fill);
    color: #fff !important;
    border-color: var(--rv-brand-primary);
}
.rv-db-page--dots {
    border: none;
    color: var(--rv-ink-3);
    min-width: auto;
    padding: 0 0.25rem;
}

/* ═══════════════════════════════════════════
   COMPARE TOOL
   ═══════════════════════════════════════════ */
.rv-db-compare__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.rv-db-compare__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.5rem;
}
.rv-db-compare__copy h2 {
    font-family: 'Literata', Georgia, serif !important;
    font-weight: 500 !important;
    font-size: var(--rv-text-2xl) !important;
    color: var(--rv-brand-primary) !important;
    letter-spacing: -0.015em;
    margin: 0 0 0.5rem 0 !important;
}
.rv-db-compare__copy p {
    font-family: 'Literata', Georgia, serif;
    font-size: var(--rv-text-md);
    color: var(--rv-ink-2);
    line-height: 1.6;
    margin: 0 !important;
}

.rv-db-compare__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.rv-db-compare__selects {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.rv-db-compare__select {
    flex: 1;
    background: #fff;
    border: 1px solid var(--rv-line);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    font-size: var(--rv-text-md);
    font-family: 'Inter', sans-serif;
    color: var(--rv-ink-2);
    cursor: pointer;
}
.rv-db-compare__select:focus {
    outline: 2px solid var(--rv-brand-primary);
    outline-offset: -1px;
}
.rv-db-compare__vs {
    font-family: 'Literata', Georgia, serif;
    color: var(--rv-ink-3);
    font-size: var(--rv-text-md);
    flex-shrink: 0;
}
.rv-db-compare__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--rv-brand-fill);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: var(--rv-text-md);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: opacity 0.15s;
}
.rv-db-compare__btn:hover { opacity: 0.9; }
.rv-db-compare__btn svg { stroke: #fff; }

/* ═══════════════════════════════════════════
   COMPARE RESULTS TABLE
   ═══════════════════════════════════════════ */
.rv-db-compare__results {
    display: none;
    margin-top: 2rem;
    border-top: 1px solid var(--rv-line);
    padding-top: 2rem;
}
.rv-db-compare__table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--rv-text-md);
}
.rv-db-compare__table thead th {
    font-family: 'Literata', Georgia, serif;
    font-weight: 600;
    font-size: var(--rv-text-base);
    color: var(--rv-brand-primary);
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 2px solid var(--rv-line);
    vertical-align: bottom;
}
.rv-db-compare__table thead th:first-child {
    text-align: left;
    width: 140px;
}
.rv-db-compare__product {
    text-align: center !important;
}
.rv-db-compare__product a {
    color: var(--rv-brand-primary);
    text-decoration: none;
}
.rv-db-compare__product a:hover {
    text-decoration: underline;
}
.rv-db-compare__product a:has(img) {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    border: 1px solid var(--rv-line);
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}
.rv-db-compare__img {
    display: block;
    width: 180px;
    height: auto;
}
.rv-db-compare__table td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--rv-line-soft);
    color: var(--rv-ink-2);
    text-align: center;
}
.rv-db-compare__table td.rv-db-compare__rowlabel {
    text-align: left;
}
.rv-db-compare__rowlabel {
    font-size: var(--rv-text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rv-ink-3) !important;
}
.rv-db-compare__viewrow td {
    padding-top: 1rem !important;
    border-bottom: none !important;
}
.rv-db-compare__viewrow a {
    font-size: var(--rv-text-md);
    font-weight: 600;
    color: var(--rv-brand-primary);
    text-decoration: none;
}
.rv-db-compare__viewrow a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   NEXT-UP CTA
   ═══════════════════════════════════════════ */
.rv-db-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-db-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-db-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-db-nextup__inner h3 em { font-style: italic; color: var(--rv-gold); }
.rv-db-nextup__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    background: #fff;
    color: var(--rv-brand-primary);
    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-db-nextup__btn:hover { opacity: 0.9; }
.rv-db-nextup__arrow svg { stroke: var(--rv-brand-primary); }

/* ═══════════════════════════════════════════
   META FOOTER
   ═══════════════════════════════════════════ */
.rv-db-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-db-metafoot__inner a {
    color: var(--rv-brand-primary);
    text-decoration: none;
}
.rv-db-metafoot__inner a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════ */
/* New navy hero needs no dark-mode override — it uses var(--rv-brand-fill)
   which stays navy in both modes by design. The chart panel uses --rv-cream
   which becomes dark-slate in dark mode (cream-line / ink / autonomy ramp
   tokens flip in base.css), so the panel still reads cleanly without overrides. */

html[data-theme="dark"] .rv-db-controls__bar,
html[data-theme="dark"] .rv-db-empty,
html[data-theme="dark"] .rv-db-rpill {
    background: var(--rv-surface-secondary);
}
html[data-theme="dark"] .rv-db-catcard--c2 {
    background: var(--rv-surface-secondary);
    border-color: var(--rv-border-primary);
}

html[data-theme="dark"] .rv-db-compare__select {
    background: var(--rv-surface-secondary);
    color: var(--rv-text-primary);
    border-color: var(--rv-border-primary);
}

html[data-theme="dark"] .rv-db-distro,
html[data-theme="dark"] .rv-db-readiness,
html[data-theme="dark"] .rv-db-compare {
    background: var(--rv-surface-tertiary) !important;
    border-color: var(--rv-border-primary) !important;
}
html[data-theme="dark"] .rv-db-nextup__inner {
    background: #1e3a5f;
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .rv-db-controls__bar,
    html:not([data-theme="light"]) .rv-db-empty,
    html:not([data-theme="light"]) .rv-db-rpill {
        background: var(--rv-surface-secondary);
    }
    html:not([data-theme="light"]) .rv-db-catcard--c2 {
        background: var(--rv-surface-secondary);
        border-color: var(--rv-border-primary);
    }
    html:not([data-theme="light"]) .rv-db-compare__select {
        background: var(--rv-surface-secondary);
        color: var(--rv-text-primary);
        border-color: var(--rv-border-primary);
    }
    html:not([data-theme="light"]) .rv-db-distro,
    html:not([data-theme="light"]) .rv-db-readiness {
        background: var(--rv-surface-tertiary) !important;
    }
    html:not([data-theme="light"]) .rv-db-nextup__inner {
        background: #1e3a5f;
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 960px) {
    .rv-db-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .rv-db-compare__inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .rv-db-distro__head {
        flex-direction: column;
        gap: 0.5rem;
    }
    .rv-db-distro__bar {
        height: 40px;
    }
    .rv-db-distro__legend {
        gap: 0.75rem;
    }

    .rv-db-showcase__grid--c2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .rv-db-readiness__row {
        gap: 0.625rem;
    }

    .rv-db-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rv-db-controls__bar {
        flex-direction: column;
        align-items: stretch;
    }
    .rv-db-controls__group {
        flex-direction: column;
        align-items: flex-start;
    }
    .rv-db-controls__chips {
        width: 100%;
    }
    .rv-db-controls__divider {
        width: 100%;
        height: 1px;
    }
    .rv-db-controls__search {
        min-width: 100%;
    }

    .rv-db-compare__selects {
        flex-direction: column;
    }

    .rv-db-nextup__inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .rv-db-showcase__grid--c2 {
        grid-template-columns: 1fr;
    }
    .rv-db-grid {
        grid-template-columns: 1fr;
    }
    .rv-db-readiness__row {
        flex-direction: column;
        align-items: flex-start;
    }
    .rv-db-metafoot__inner {
        flex-direction: column;
        text-align: center;
    }
}
