/* ==========================================================
   RELVRO Phase 1 platform layer
   Builds on assets/css/screen.css. It introduces discovery hubs,
   decision tools, evidence, diagrams, and service pathways without
   changing the approved palette or the Source foundation.
   ========================================================== */

/* 1. Shared section rhythm
   ---------------------------------------------------------- */

.rv-section {
    padding-block: clamp(64px, 7vw, 92px);
    background: var(--rv-ivory);
    border-bottom: 1px solid var(--rv-border);
}

.rv-section-alt {
    background: var(--rv-white);
}

.rv-section .rv-section-head,
.rv-section-alt .rv-section-head {
    margin-bottom: clamp(28px, 4vw, 44px);
}

.rv-section :where(h2, h3),
.rv-section-alt :where(h2, h3) {
    text-wrap: balance;
}

.rv-section p,
.rv-section-alt p {
    text-wrap: pretty;
}

/* 2. Discovery bar
   ---------------------------------------------------------- */

.rv-discovery-bar {
    border-top: 1px solid var(--rv-border);
    background: var(--rv-white);
}

.rv-discovery-bar-inner {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
}

.rv-discovery-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 26px;
    align-items: center;
}

.rv-discovery-nav a {
    position: relative;
    padding: 12px 0;
    font-family: var(--font-mono);
    font-size: 1.03rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rv-charcoal);
}

.rv-discovery-nav a::after {
    position: absolute;
    right: 0;
    bottom: 7px;
    left: 0;
    height: 1px;
    content: "";
    background: var(--rv-copper);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s ease;
}

.rv-discovery-nav a:hover {
    color: var(--rv-copper);
}

.rv-discovery-nav a:hover::after,
.rv-discovery-nav a:focus-visible::after {
    transform: scaleX(1);
}

.rv-discovery-bar-note {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rv-muted);
    white-space: nowrap;
}

/* 3. Prominent search panel
   ---------------------------------------------------------- */

.rv-search-panel {
    padding-block: clamp(48px, 6vw, 76px);
    background: var(--rv-sand);
    border-bottom: 1px solid var(--rv-border);
}

.rv-search-card {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding: clamp(28px, 4vw, 48px);
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-top: 3px solid var(--rv-copper);
    box-shadow: var(--rv-shadow);
}

.rv-search-copy h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(3rem, 4vw, 4.6rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.025em;
    color: var(--rv-charcoal);
}

.rv-search-copy > p:last-child {
    max-width: 46ch;
    margin: 16px 0 0;
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

.rv-search-trigger {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 64px;
    padding: 14px 20px;
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    color: var(--rv-white);
    cursor: pointer;
    background: var(--rv-charcoal);
    border: 1px solid var(--rv-charcoal);
    border-radius: var(--rv-radius);
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.rv-search-trigger:hover {
    background: var(--rv-copper);
    border-color: var(--rv-copper);
    transform: translateY(-1px);
}

.rv-search-trigger-icon {
    flex: 0 0 auto;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--rv-copper-light);
}

.rv-search-hint {
    margin: 16px 0 0;
    font-size: 1.22rem;
    line-height: 1.5;
    color: var(--rv-muted);
}

.rv-search-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 14px 0 0;
    list-style: none;
}

.rv-search-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--rv-teal);
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border);
    border-radius: 999px;
}

.rv-search-links a:hover {
    color: var(--rv-white);
    background: var(--rv-teal);
    border-color: var(--rv-teal);
}

/* 4. Problem and task cards
   ---------------------------------------------------------- */

.rv-entry-grid,
.rv-task-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.rv-entry-card,
.rv-task-card {
    display: flex;
    flex-direction: column;
    min-height: 270px;
    padding: 24px;
    color: var(--rv-charcoal);
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-top: 2px solid var(--rv-copper);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.rv-entry-card:hover,
.rv-task-card:hover {
    color: var(--rv-charcoal);
    border-color: var(--rv-border-strong);
    border-top-color: var(--rv-copper-dark);
    box-shadow: var(--rv-shadow);
    transform: translateY(-2px);
}

.rv-entry-kicker,
.rv-task-index {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rv-copper);
}

.rv-entry-card h3,
.rv-task-card h3 {
    margin: 14px 0 0;
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: var(--rv-charcoal);
}

.rv-entry-card p,
.rv-task-card p {
    margin: 10px 0 0;
    font-size: 1.3rem;
    line-height: 1.55;
    color: var(--rv-muted);
}

.rv-entry-link,
.rv-task-link {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    margin-top: auto;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rv-copper);
}

.rv-entry-card:hover .rv-entry-link,
.rv-task-card:hover .rv-task-link {
    color: var(--rv-copper-dark);
}

/* 5. Category cards
   ---------------------------------------------------------- */

.rv-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.rv-category-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 20px;
    gap: 16px;
    align-items: center;
    min-height: 96px;
    padding: 20px 22px;
    color: var(--rv-charcoal);
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border);
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.rv-category-card:hover {
    color: var(--rv-charcoal);
    background: var(--rv-white);
    border-color: var(--rv-copper);
    transform: translateX(3px);
}

.rv-category-mark {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    color: var(--rv-copper);
}

.rv-category-body strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--rv-charcoal);
}

.rv-category-body small {
    display: block;
    margin-top: 4px;
    font-size: 1.18rem;
    line-height: 1.45;
    color: var(--rv-muted);
}

.rv-category-arrow {
    font-size: 1.5rem;
    color: var(--rv-copper);
}

/* 6. Feature section heading
   ---------------------------------------------------------- */

.rv-feature-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 48px;
    align-items: end;
    padding-bottom: 36px;
}

.rv-feature-section-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 4.6vw, 5.4rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.02em;
    /* The featured-comparison section sits on the charcoal background. */
    color: var(--rv-ivory);
}

.rv-feature-section-head .rv-eyebrow {
    color: var(--rv-copper-light);
}

.rv-feature-section-head > p {
    margin: 0 0 6px;
    font-size: 1.5rem;
    line-height: 1.65;
    color: var(--rv-muted-light);
}

.rv-feature-note {
    margin: 18px 0 0;
    font-size: 1.25rem;
    line-height: 1.55;
    /* Rendered inside the charcoal featured-comparison panel. */
    color: var(--rv-muted-light);
}

/* 7. Decision orientation
   ---------------------------------------------------------- */

.rv-orient {
    padding: clamp(26px, 4vw, 44px);
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-top: 3px solid var(--rv-copper);
}

.rv-orient-intro {
    max-width: 760px;
}

.rv-orient-intro h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(3rem, 4.2vw, 4.8rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.025em;
    color: var(--rv-charcoal);
}

.rv-orient-intro > p:last-child {
    margin: 16px 0 0;
    font-size: 1.45rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

.rv-orient-questions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.rv-orient-fieldset {
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

.rv-orient-fieldset legend {
    padding: 0;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rv-copper);
}

.rv-orient-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rv-orient-option {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    cursor: pointer;
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border);
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.rv-orient-option:hover {
    border-color: var(--rv-border-strong);
}

.rv-orient-option:has(input:checked) {
    background: var(--rv-sand);
    border-color: var(--rv-copper);
}

.rv-orient-option input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--rv-copper);
}

.rv-orient-option strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 650;
    line-height: 1.25;
    color: var(--rv-charcoal);
}

.rv-orient-option small {
    display: block;
    margin-top: 3px;
    font-size: 1.15rem;
    line-height: 1.45;
    color: var(--rv-muted);
}

.rv-orient-status {
    min-height: 48px;
    padding: 14px 16px;
    margin-top: 24px;
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--rv-teal-dark);
    background: #EAF2F2;
    border-left: 3px solid var(--rv-teal);
}

.rv-orient-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.rv-orient-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.rv-orient-card h3 {
    margin: 8px 0 0;
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.05;
    color: var(--rv-charcoal);
}

.rv-orient-kicker {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rv-copper);
}

.rv-orient-card > p:not(.rv-orient-kicker) {
    margin: 10px 0 0;
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--rv-muted);
}

.rv-orient-card dl {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--rv-border);
}

.rv-orient-card dt {
    font-family: var(--font-mono);
    font-size: 0.98rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rv-teal);
}

.rv-orient-card dd {
    margin: 4px 0 0;
    font-size: 1.2rem;
    line-height: 1.45;
    color: var(--rv-charcoal);
}

.rv-orient-card .rv-text-link {
    margin-top: auto;
    padding-top: 18px;
}

/* Selected state. The JavaScript adds .is-fit; the :has() fallback keeps the
   marker working when scripts are unavailable, but is kept in a separate rule
   so a browser without :has() support never invalidates the whole block. */
.rv-orient-card.is-fit {
    background-color: var(--rv-sand);
    border-color: var(--rv-copper);
    box-shadow: inset 0 0 0 1px var(--rv-copper), 0 10px 24px rgb(138 63 0 / 0.08);
}

.rv-orient-card.is-fit .rv-orient-kicker {
    color: var(--rv-copper-dark);
}

@supports selector(:has(*)) {
    .rv-orient:has(#rv-prio-speed:checked):has(#rv-ops-provider:checked) #rv-orient-make,
    .rv-orient:has(#rv-prio-speed:checked):has(#rv-ops-provider:checked) #rv-orient-cloud,
    .rv-orient:has(#rv-prio-speed:checked):has(#rv-ops-self:checked) #rv-orient-make,
    .rv-orient:has(#rv-prio-speed:checked):has(#rv-ops-self:checked) #rv-orient-self,
    .rv-orient:has(#rv-prio-speed:checked):has(#rv-ops-open:checked) #rv-orient-make,
    .rv-orient:has(#rv-prio-speed:checked):has(#rv-ops-open:checked) #rv-orient-cloud,
    .rv-orient:has(#rv-prio-flex:checked):has(#rv-ops-provider:checked) #rv-orient-cloud,
    .rv-orient:has(#rv-prio-flex:checked):has(#rv-ops-self:checked) #rv-orient-cloud,
    .rv-orient:has(#rv-prio-flex:checked):has(#rv-ops-self:checked) #rv-orient-self,
    .rv-orient:has(#rv-prio-flex:checked):has(#rv-ops-open:checked) #rv-orient-cloud,
    .rv-orient:has(#rv-prio-control:checked):has(#rv-ops-provider:checked) #rv-orient-cloud,
    .rv-orient:has(#rv-prio-control:checked):has(#rv-ops-self:checked) #rv-orient-self,
    .rv-orient:has(#rv-prio-control:checked):has(#rv-ops-open:checked) #rv-orient-cloud,
    .rv-orient:has(#rv-prio-control:checked):has(#rv-ops-open:checked) #rv-orient-self {
        background-color: var(--rv-sand);
        border-color: var(--rv-copper);
        box-shadow: inset 0 0 0 1px var(--rv-copper), 0 10px 24px rgb(138 63 0 / 0.08);
    }
}

.rv-orient-note {
    max-width: 980px;
    margin: 22px 0 0;
    font-size: 1.18rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

/* 8. Tools: fields, outputs, details
   ---------------------------------------------------------- */

.rv-tool {
    padding: clamp(26px, 4vw, 44px);
    margin-top: clamp(32px, 5vw, 56px);
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-top: 3px solid var(--rv-teal);
}

.rv-tool-head {
    max-width: 820px;
}

.rv-tool-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 4vw, 4.4rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--rv-charcoal);
}

.rv-tool-head > p:last-child {
    margin: 14px 0 0;
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

.rv-tco-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.rv-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.rv-field span {
    font-size: 1.16rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--rv-charcoal);
}

.rv-field input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    font-size: 1.4rem;
    color: var(--rv-charcoal);
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border-strong);
    border-radius: 3px;
}

.rv-field input::placeholder {
    color: #8A8078;
}

.rv-field input:focus {
    background: var(--rv-white);
    border-color: var(--rv-copper);
    outline: 2px solid var(--rv-copper);
    outline-offset: 1px;
}

.rv-tco-actions,
.rv-readiness-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.rv-tco-output,
.rv-readiness-output {
    margin-top: 20px;
}

.rv-tool-placeholder {
    padding: 16px;
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--rv-muted);
    background: var(--rv-ivory);
    border: 1px dashed var(--rv-border-strong);
}

.rv-tco-result,
.rv-readiness-result {
    padding: 20px;
    background: var(--rv-sand);
    border-left: 3px solid var(--rv-copper);
}

.rv-tco-total {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    align-items: baseline;
    margin: 0;
}

.rv-tco-total span {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rv-copper);
}

.rv-tco-total strong {
    font-family: var(--font-display);
    font-size: clamp(3rem, 4vw, 4.4rem);
    font-weight: 600;
    line-height: 1;
    color: var(--rv-charcoal);
}

.rv-tco-result dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--rv-border-strong);
}

.rv-tco-result dl div {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 1px dotted var(--rv-border-strong);
}

.rv-tco-result dt,
.rv-tco-result dd {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.5;
}

.rv-tco-result dt {
    color: var(--rv-muted);
}

.rv-tco-result dd {
    font-weight: 650;
    color: var(--rv-charcoal);
    text-align: right;
}

.rv-tco-result-note,
.rv-readiness-result > p:last-child {
    margin: 16px 0 0;
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--rv-muted);
}

.rv-tool-details {
    margin-top: 22px;
    border-top: 1px solid var(--rv-border);
}

.rv-tool-details summary {
    padding: 16px 0 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--rv-teal);
    cursor: pointer;
}

.rv-tool-details > div {
    padding-top: 12px;
}

.rv-tool-details p {
    margin: 0 0 10px;
    font-size: 1.18rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

.rv-tool-note {
    margin: 18px 0 0;
    font-size: 1.18rem;
    line-height: 1.55;
    color: var(--rv-muted);
}

/* Readiness */

.rv-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 26px 0 0;
    border: 0;
}

.rv-checklist label {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 14px 15px;
    font-size: 1.25rem;
    line-height: 1.45;
    color: var(--rv-charcoal);
    cursor: pointer;
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border);
}

.rv-checklist label:has(input:checked) {
    background: var(--rv-sand);
    border-color: var(--rv-copper);
}

.rv-checklist input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--rv-copper);
}

.rv-readiness-score {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.4;
    color: var(--rv-charcoal);
}

.rv-readiness-score strong {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--rv-copper);
}

.rv-readiness-result ul {
    padding: 0;
    margin: 12px 0 0;
    list-style: none;
}

.rv-readiness-result li {
    display: flex;
    gap: 9px;
    padding: 6px 0;
    font-size: 1.18rem;
    line-height: 1.45;
    color: var(--rv-charcoal);
    border-bottom: 1px dotted var(--rv-border-strong);
}

.rv-readiness-result li::before {
    content: "○";
    color: var(--rv-copper);
}

.rv-readiness-result.is-high {
    border-left-color: var(--rv-teal);
}

.rv-readiness-result.is-high .rv-readiness-score strong {
    color: var(--rv-teal);
}

/* 9. Evidence panel and legend
   ---------------------------------------------------------- */

.rv-evidence-panel {
    padding: 18px;
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border);
    border-left: 3px solid var(--rv-teal);
}

.rv-evidence-panel-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
    justify-content: space-between;
}

.rv-evidence-panel-head .rv-aside-kicker {
    margin: 0;
}

.rv-evidence-help {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--rv-teal);
}

.rv-evidence-facts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 0;
}

.rv-evidence-facts > div {
    display: flex;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 7px;
    border-bottom: 1px dotted var(--rv-border-strong);
}

.rv-evidence-facts dt {
    font-family: var(--font-mono);
    font-size: 0.98rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rv-muted);
}

.rv-evidence-facts dd {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 650;
    line-height: 1.35;
    color: var(--rv-charcoal);
    text-align: right;
}

.rv-evidence-scope {
    margin: 12px 0 0;
    font-size: 1.08rem;
    line-height: 1.5;
    color: var(--rv-muted);
}

.rv-evidence-legend {
    padding-block: clamp(12px, 2vw, 20px);
}

.rv-evidence-legend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.rv-evidence-legend-card {
    padding: 26px;
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-top: 3px solid var(--rv-copper);
}

.rv-evidence-legend-kicker {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--rv-copper);
}

.rv-evidence-legend-card h3 {
    margin: 10px 0 0;
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 600;
    line-height: 1.05;
    color: var(--rv-charcoal);
}

.rv-evidence-legend-card > p:not(.rv-evidence-legend-kicker) {
    margin: 10px 0 0;
    font-size: 1.3rem;
    line-height: 1.55;
    color: var(--rv-muted);
}

.rv-evidence-legend-card ul {
    padding: 0;
    margin: 16px 0 0;
    list-style: none;
}

.rv-evidence-legend-card li {
    padding: 9px 0;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--rv-muted);
    border-top: 1px solid var(--rv-border);
}

.rv-evidence-legend-card strong {
    color: var(--rv-charcoal);
}

.rv-evidence-legend-note {
    max-width: 980px;
    margin: 22px 0 0;
    font-size: 1.18rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

/* 10. Flow diagram
   ---------------------------------------------------------- */

.rv-flow {
    margin-top: 8px;
}

.rv-flow-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 42px;
    align-items: end;
    margin-bottom: 28px;
}

.rv-flow-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 3.8vw, 4.4rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--rv-charcoal);
}

.rv-flow-head > p {
    margin: 0 0 4px;
    font-size: 1.35rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

.rv-flow-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rv-flow-step {
    min-width: 0;
}

.rv-flow-step details {
    height: 100%;
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-top: 3px solid var(--rv-copper);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.rv-flow-step details[open] {
    border-color: var(--rv-border-strong);
    border-top-color: var(--rv-copper-dark);
    box-shadow: var(--rv-shadow);
}

.rv-flow-step summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 22px;
    gap: 10px;
    align-items: center;
    padding: 18px 18px 16px;
    cursor: pointer;
    list-style: none;
}

.rv-flow-step summary::-webkit-details-marker {
    display: none;
}

.rv-flow-step summary:focus-visible {
    outline: 2px solid var(--rv-copper);
    outline-offset: -2px;
}

.rv-flow-num {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--rv-copper);
}

.rv-flow-stage {
    font-family: var(--font-display);
    font-size: 2.05rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--rv-charcoal);
}

.rv-flow-toggle {
    position: relative;
    width: 22px;
    height: 22px;
    border: 1px solid var(--rv-border-strong);
    border-radius: 50%;
}

.rv-flow-toggle::before,
.rv-flow-toggle::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 1px;
    content: "";
    background: var(--rv-copper);
    transform: translate(-50%, -50%);
}

.rv-flow-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: transform 0.16s ease;
}

.rv-flow-step details[open] .rv-flow-toggle::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.rv-flow-body {
    padding: 0 18px 20px;
    border-top: 1px solid var(--rv-border);
}

.rv-flow-lead {
    margin: 14px 0 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--rv-charcoal);
}

.rv-flow-body dl {
    margin: 14px 0 0;
}

.rv-flow-body dl div {
    padding: 9px 0;
    border-top: 1px solid var(--rv-border);
}

.rv-flow-body dt {
    font-family: var(--font-mono);
    font-size: 0.94rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--rv-teal);
}

.rv-flow-body dd {
    margin: 4px 0 0;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--rv-muted);
}

.rv-flow-note {
    max-width: 980px;
    margin: 20px 0 0;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

.rv-method-evidence {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    padding: 28px;
    margin-top: 36px;
    color: var(--rv-ivory);
    background: var(--rv-charcoal);
}

.rv-method-evidence > div {
    max-width: 720px;
}

.rv-method-evidence h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.08;
    color: var(--rv-ivory);
}

.rv-method-evidence p:not(.rv-eyebrow) {
    margin: 10px 0 0;
    font-size: 1.25rem;
    line-height: 1.6;
    color: #D6CDC5;
}

.rv-method-evidence .rv-button-ghost {
    color: var(--rv-ivory);
    border-color: rgb(255 255 255 / 0.4);
}

.rv-method-evidence .rv-button-ghost:hover {
    color: var(--rv-charcoal);
    background: var(--rv-ivory);
    border-color: var(--rv-ivory);
}

.rv-method-page-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

/* 11. Comparison summary and matrix
   ---------------------------------------------------------- */

.rv-compare-summary {
    padding: 26px;
    margin: 0 0 32px;
    background: var(--rv-sand);
    border: 1px solid var(--rv-border);
    border-top: 3px solid var(--rv-copper);
}

.rv-compare-summary h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 3.4vw, 3.8rem);
    font-weight: 600;
    line-height: 1.04;
    color: var(--rv-charcoal);
}

.rv-compare-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.rv-compare-summary-grid article {
    padding: 18px;
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
}

.rv-compare-summary-grid h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 600;
    color: var(--rv-charcoal);
}

.rv-compare-summary-grid p {
    margin: 8px 0 0;
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--rv-muted);
}

.rv-compare-summary-note {
    margin: 14px 0 0;
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--rv-muted);
}

.rv-compare-matrix {
    margin-top: clamp(36px, 5vw, 56px);
}

.rv-table-wrap {
    overflow-x: auto;
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    -webkit-overflow-scrolling: touch;
}

.rv-compare-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
    font-size: 1.25rem;
    line-height: 1.5;
}

.rv-compare-table th,
.rv-compare-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--rv-border);
}

.rv-compare-table thead th {
    font-family: var(--font-mono);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rv-ivory);
    background: var(--rv-charcoal);
    border-bottom-color: var(--rv-charcoal);
}

.rv-compare-table tbody th {
    width: 17%;
    font-weight: 650;
    color: var(--rv-charcoal);
    background: var(--rv-ivory);
}

.rv-compare-table tbody td {
    width: 24%;
    color: var(--rv-muted);
}

.rv-compare-table tbody td:last-child {
    color: var(--rv-charcoal);
    background: #FBF5EF;
}

.rv-compare-table tbody tr:last-child th,
.rv-compare-table tbody tr:last-child td {
    border-bottom: 0;
}

.rv-compare-source {
    margin: 12px 0 0;
    font-size: 1.12rem;
    line-height: 1.5;
    color: var(--rv-muted);
}

/* Links inside running text must be distinguishable without relying on
   colour alone (WCAG 1.4.1). */
.rv-compare-source a {
    text-decoration: underline;
}

.rv-compare-focus {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    padding: 12px 0 14px;
}

.rv-compare-focus-label {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.98rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rv-teal);
}

.rv-compare-focus ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rv-compare-focus a {
    display: inline-block;
    padding: 5px 10px;
    font-size: 1.08rem;
    line-height: 1.3;
    color: var(--rv-charcoal);
    background: var(--rv-white);
    border: 1px solid var(--rv-border-strong);
    text-decoration: none;
}

.rv-compare-focus a:hover {
    color: var(--rv-white);
    background: var(--rv-charcoal);
    border-color: var(--rv-charcoal);
}

.rv-compare-focus a:focus-visible {
    outline: 2px solid var(--rv-copper);
    outline-offset: 2px;
}

.rv-compare-focus a[aria-current="true"] {
    color: var(--rv-white);
    background: var(--rv-copper-dark);
    border-color: var(--rv-copper-dark);
}

.rv-compare-focus-note {
    flex-basis: 100%;
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.45;
    color: var(--rv-muted);
}

.rv-compare-table tbody tr {
    scroll-margin-top: 96px;
}

.rv-compare-table tbody tr:target th,
.rv-compare-table tbody tr.is-focused th {
    box-shadow: inset 3px 0 0 var(--rv-copper);
    background: #F4E8DC;
}

.rv-compare-table tbody tr:target td,
.rv-compare-table tbody tr.is-focused td {
    background: #FDF8F3;
}

.rv-compare-table tbody tr:target td:last-child,
.rv-compare-table tbody tr.is-focused td:last-child {
    background: #F4E8DC;
}

/* 12. Service pathways
   ---------------------------------------------------------- */

.rv-service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.rv-service-card {
    padding: 22px;
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border);
    border-top: 2px solid var(--rv-teal);
}

.rv-service-index {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--rv-teal);
}

.rv-service-card h3 {
    margin: 10px 0 0;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--rv-charcoal);
}

.rv-service-card p {
    margin: 8px 0 0;
    font-size: 1.22rem;
    line-height: 1.55;
    color: var(--rv-muted);
}

.rv-service-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
}

.rv-service-actions p {
    max-width: 560px;
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--rv-muted);
}

.rv-service-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 14px 0 20px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--rv-border);
}

.rv-service-strip span {
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-size: 0.98rem;
    letter-spacing: 0.04em;
    color: var(--rv-teal-dark);
    background: #EAF2F2;
    border: 1px solid #C9DEDE;
}

.rv-aside-service p:not(.rv-aside-kicker) {
    margin: 8px 0 12px;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--rv-muted);
}

/* 13. Topic and tag hubs
   ---------------------------------------------------------- */

.rv-hub-after {
    padding-block: clamp(36px, 5vw, 56px);
    background: var(--rv-ivory);
    border-top: 1px solid var(--rv-border);
}

.rv-hub-after-last {
    padding-bottom: clamp(64px, 7vw, 92px);
    background: var(--rv-white);
}

.rv-topic-hub,
.rv-tag-hub {
    padding: clamp(24px, 3.4vw, 36px);
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-top: 3px solid var(--rv-copper);
}

.rv-topic-grid,
.rv-tag-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.rv-topic-col,
.rv-tag-hub-grid > div {
    padding-top: 14px;
    border-top: 1px solid var(--rv-border);
}

.rv-topic-kicker {
    margin: 0 0 10px;
    font-family: var(--font-mono);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rv-copper);
}

.rv-topic-col ul,
.rv-tag-hub-grid ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rv-topic-col a,
.rv-tag-hub-grid a {
    font-size: 1.25rem;
    line-height: 1.45;
    color: var(--rv-charcoal);
    text-decoration: underline;
    text-decoration-color: var(--rv-border-strong);
    text-underline-offset: 0.2em;
}

.rv-topic-col a:hover,
.rv-tag-hub-grid a:hover {
    color: var(--rv-copper);
    text-decoration-color: var(--rv-copper);
}

.rv-topic-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid var(--rv-border);
}

.rv-tag-hub-wrap {
    padding-bottom: clamp(36px, 5vw, 56px);
    background: var(--rv-ivory);
}

.rv-tag-hub {
    border-top-width: 3px;
}

.rv-tag-hub-head {
    max-width: 760px;
    margin-bottom: 22px;
}

.rv-tag-hub-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 3.4vw, 3.8rem);
    font-weight: 600;
    line-height: 1.04;
    color: var(--rv-charcoal);
}

.rv-tag-hub-head > p:last-child {
    margin: 10px 0 0;
    font-size: 1.3rem;
    line-height: 1.55;
    color: var(--rv-muted);
}

.rv-tag-hub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    align-items: center;
    padding-top: 18px;
    margin-top: 22px;
    border-top: 1px solid var(--rv-border);
}

.rv-tag-hub-links span {
    font-family: var(--font-mono);
    font-size: 0.96rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rv-muted);
}

.rv-tag-hub-links a {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--rv-teal);
}

.rv-tag-hub-links a:hover {
    color: var(--rv-copper);
}

/* 13b. Journey map, comparison guardrails, cooperation process
   ---------------------------------------------------------- */

.rv-journey {
    padding: clamp(24px, 3.4vw, 36px);
    margin-top: 8px;
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border);
    border-top: 3px solid var(--rv-teal);
}

.rv-journey-head h3 {
    margin: 4px 0 0;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 2.6vw, 2.9rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--rv-charcoal);
}

.rv-journey-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 22px 0 0;
    list-style: none;
}

.rv-journey-list a {
    display: grid;
    gap: 2px;
    height: 100%;
    padding: 16px;
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    text-decoration: none;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.rv-journey-list a:hover {
    border-color: var(--rv-copper);
    transform: translateY(-2px);
}

.rv-journey-list a:focus-visible {
    outline: 2px solid var(--rv-copper);
    outline-offset: 2px;
}

.rv-journey-list span {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--rv-copper);
}

.rv-journey-list strong {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--rv-charcoal);
}

.rv-journey-list small {
    font-size: 1.08rem;
    line-height: 1.4;
    color: var(--rv-muted);
}

.rv-compare-limits {
    padding: clamp(24px, 3.4vw, 36px);
    margin-top: clamp(24px, 3vw, 36px);
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-left: 3px solid var(--rv-teal);
}

.rv-compare-limits-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 32px;
    align-items: start;
}

.rv-compare-limits-grid h2 {
    margin: 4px 0 12px;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 2.8vw, 3rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--rv-charcoal);
}

.rv-compare-limits-grid > div > p:last-child {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

.rv-compare-limits-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rv-compare-limits-list li {
    padding: 12px 0 0;
    border-top: 1px solid var(--rv-border);
}

.rv-compare-limits-list strong {
    display: block;
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--rv-charcoal);
}

.rv-compare-limits-list span {
    display: block;
    margin-top: 4px;
    font-size: 1.12rem;
    line-height: 1.5;
    color: var(--rv-muted);
}

.rv-compare-limits-note {
    padding-top: 16px;
    margin: 24px 0 0;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--rv-muted);
    border-top: 1px solid var(--rv-border);
}

.rv-service-process {
    padding-top: 4px;
}

.rv-process-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
    margin: 24px 0 0;
    list-style: none;
}

.rv-process-list li {
    padding: 18px;
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-top: 2px solid var(--rv-copper);
}

.rv-process-num {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--rv-copper);
}

.rv-process-list h3 {
    margin: 10px 0 0;
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.12;
    color: var(--rv-charcoal);
}

.rv-process-list p {
    margin: 8px 0 0;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--rv-muted);
}

.rv-evidence-claims {
    margin-top: 20px;
}

.rv-evidence-claims-wrap {
    overflow-x: auto;
    border: 1px solid var(--rv-border);
}

.rv-evidence-claims table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: var(--rv-white);
}

.rv-evidence-claims caption {
    padding: 12px 16px;
    font-size: 1.1rem;
    text-align: left;
    color: var(--rv-muted);
}

.rv-evidence-claims th,
.rv-evidence-claims td {
    padding: 10px 14px;
    font-size: 1.1rem;
    line-height: 1.45;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--rv-border);
}

.rv-evidence-claims thead th {
    font-family: var(--font-mono);
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rv-teal);
    background: var(--rv-ivory);
}

.rv-evidence-claims tbody th {
    font-weight: 600;
    color: var(--rv-charcoal);
}

.rv-evidence-claims td {
    color: var(--rv-muted);
}

/* 14. Responsive
   ---------------------------------------------------------- */

@media (max-width: 1120px) {
    .rv-entry-grid,
    .rv-task-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .rv-journey-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rv-tco-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .rv-discovery-bar-inner {
        flex-direction: column;
        gap: 0;
        align-items: flex-start;
        padding-block: 4px;
    }

    .rv-discovery-nav {
        flex-wrap: nowrap;
        width: 100%;
        padding-bottom: 4px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .rv-discovery-nav a {
        flex: 0 0 auto;
    }

    .rv-discovery-bar-note {
        display: none;
    }

    .rv-search-card,
    .rv-hero-inner,
    .rv-section-head,
    .rv-feature-section-head,
    .rv-method-head,
    .rv-flow-head {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .rv-search-card {
        gap: 24px;
    }

    .rv-category-grid,
    .rv-orient-results,
    .rv-topic-grid,
    .rv-tag-hub-grid,
    .rv-evidence-legend-grid,
    .rv-compare-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rv-orient-questions {
        grid-template-columns: minmax(0, 1fr);
    }

    .rv-checklist {
        grid-template-columns: minmax(0, 1fr);
    }

    .rv-tco-result dl {
        grid-template-columns: minmax(0, 1fr);
    }

}

@media (max-width: 700px) {
    .rv-section,
    .rv-search-panel,
    .rv-pathways {
        padding-block: 52px;
    }

    .rv-entry-grid,
    .rv-task-grid,
    .rv-category-grid,
    .rv-orient-results,
    .rv-topic-grid,
    .rv-tag-hub-grid,
    .rv-evidence-legend-grid,
    .rv-compare-summary-grid,
    .rv-service-grid,
    .rv-tco-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .rv-flow-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rv-compare-limits-grid,
    .rv-process-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rv-tag-hub-links {
        gap: 8px 12px;
    }

    .rv-method-evidence {
        padding: 22px;
    }

    .rv-compare-table {
        min-width: 760px;
    }

    .rv-search-trigger {
        font-size: 1.35rem;
    }
}

@media (max-width: 520px) {
    .rv-search-card,
    .rv-orient,
    .rv-tool,
    .rv-topic-hub,
    .rv-tag-hub,
    .rv-compare-summary,
    .rv-journey,
    .rv-compare-limits {
        padding: 20px;
    }

    .rv-journey-list,
    .rv-flow-steps,
    .rv-compare-limits-grid,
    .rv-process-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .rv-orient-option {
        padding: 12px;
    }

    .rv-tco-total strong {
        font-size: 3.2rem;
    }
}

/* 15. Tool instances: weighted decision, build/buy, shortlist, ROI,
    triage, data readiness, migration, failure library, diagram
   ---------------------------------------------------------- */

.rv-tool-body {
    margin-top: 26px;
}

.rv-tool-body > label,
.rv-wd-controls label,
.rv-wd-alt-controls label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 1.16rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--rv-charcoal);
}

.rv-wd-controls label,
.rv-wd-alt-controls label {
    margin-bottom: 0;
}

.rv-tool-body input[type="text"],
.rv-tool-body input[type="number"],
.rv-tool-body select,
.rv-tool-body textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    font: inherit;
    font-size: 1.4rem;
    color: var(--rv-charcoal);
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border-strong);
    border-radius: 3px;
}

.rv-tool-body textarea {
    min-height: 130px;
    resize: vertical;
}

.rv-tool-body input:focus,
.rv-tool-body select:focus,
.rv-tool-body textarea:focus {
    background: var(--rv-white);
    border-color: var(--rv-copper);
    outline: 2px solid var(--rv-copper);
    outline-offset: 1px;
}

.rv-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.rv-tool-result {
    margin-top: 20px;
}

.rv-tool-result:empty {
    display: none;
}

.rv-tool-result:not(:empty) {
    padding: 18px 20px;
    background: var(--rv-sand);
    border-left: 3px solid var(--rv-teal);
}

.rv-tool-result p,
.rv-tool-result li {
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--rv-charcoal);
}

.rv-tool-result > p:last-child,
.rv-tool-result li:last-child {
    color: var(--rv-muted);
}

.rv-tool-result ol,
.rv-tool-result ul {
    margin: 8px 0 12px;
    padding-left: 22px;
}

.rv-tool-method {
    margin-top: 18px;
    border-top: 1px solid var(--rv-border);
}

.rv-tool-method summary {
    padding-top: 14px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rv-teal);
    cursor: pointer;
}

.rv-tool-method p {
    margin: 10px 0 0;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

/* Weighted decision */

.rv-wd-controls,
.rv-wd-alt-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.rv-wd-criteria {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.rv-wd-crit-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 1.2rem;
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border);
}

.rv-wd-crit-row button {
    padding: 0;
    font: inherit;
    font-size: 1.1rem;
    color: var(--rv-teal);
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
}

.rv-wd-matrix {
    margin-top: 18px;
    overflow-x: auto;
}

.rv-wd-matrix table {
    width: 100%;
    font-size: 1.2rem;
    border-collapse: collapse;
}

.rv-wd-matrix th,
.rv-wd-matrix td {
    padding: 8px;
    text-align: left;
    vertical-align: middle;
    border: 1px solid var(--rv-border);
}

.rv-wd-matrix thead th {
    font-family: var(--font-mono);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--rv-ivory);
}

.rv-wd-matrix td input {
    width: 100%;
    min-height: 38px;
}

/* Failure library */

.rv-fl-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.rv-fl-entry {
    padding: 16px 18px;
    background: var(--rv-ivory);
    border-left: 3px solid var(--rv-copper);
}

.rv-fl-entry h3 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    line-height: 1.2;
}

.rv-fl-entry p {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--rv-muted);
}

/* Solution diagram */

.rv-diagram-nodes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.rv-diagram-node {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    font: inherit;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--rv-charcoal);
    text-align: left;
    background: var(--rv-ivory);
    border: 1px solid var(--rv-border-strong);
    cursor: pointer;
}

.rv-diagram-node:hover {
    border-color: var(--rv-teal);
}

.rv-diagram-node:focus-visible {
    outline: 2px solid var(--rv-copper);
    outline-offset: 2px;
}

.rv-diagram-node.is-active,
.rv-diagram-node[aria-pressed="true"] {
    color: var(--rv-white);
    background: var(--rv-teal);
    border-color: var(--rv-teal);
}

.rv-diagram-index {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: var(--rv-copper);
}

.rv-diagram-node.is-active .rv-diagram-index,
.rv-diagram-node[aria-pressed="true"] .rv-diagram-index {
    color: var(--rv-white);
}

.rv-diagram-detail {
    min-height: 90px;
}

.rv-diagram-tag {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rv-copper);
}

/* Evidence conflict + honest empty states */

.rv-evidence-conflict {
    padding: 12px 14px;
    margin: 0 0 14px;
    font-size: 1.12rem;
    line-height: 1.5;
    color: #7A3B12;
    background: #FFF2E4;
    border-left: 3px solid var(--rv-copper);
}

.rv-evidence.is-conflict {
    color: #7A3B12;
    border-color: rgb(138 63 0 / 0.4);
}

.rv-feature-empty {
    padding: clamp(26px, 4vw, 44px);
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-top: 3px solid var(--rv-copper);
}

.rv-feature-empty p {
    max-width: 760px;
    margin: 0 0 14px;
    font-size: 1.35rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

.rv-tag-hub-empty {
    margin: 18px 0 0;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--rv-muted);
}

/* Article share block (replaces the former dead #/share link) */

.rv-share {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--rv-border);
}

.rv-share summary {
    font-family: var(--font-mono);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rv-copper);
    cursor: pointer;
}

.rv-share ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 0;
    margin: 12px 0 0;
    list-style: none;
}

.rv-share a {
    font-size: 1.2rem;
    color: var(--rv-teal);
    text-decoration: underline;
}

.rv-share a:hover {
    color: var(--rv-copper);
}

@media (max-width: 767px) {
    .rv-wd-controls,
    .rv-wd-alt-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .rv-diagram-nodes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 16. Motion and print
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .rv-discovery-nav a::after,
    .rv-entry-card,
    .rv-task-card,
    .rv-category-card,
    .rv-search-trigger,
    .rv-orient-card,
    .rv-journey-list a {
        transition: none;
    }

    .rv-entry-card:hover,
    .rv-task-card:hover,
    .rv-category-card:hover,
    .rv-search-trigger:hover,
    .rv-journey-list a:hover {
        transform: none;
    }
}

@media print {
    .rv-discovery-bar,
    .rv-search-panel,
    .rv-orient,
    .rv-tool,
    .rv-topic-actions,
    .rv-tag-hub-links,
    .rv-method-page-cta {
        display: none !important;
    }
}
