/* ============================================
   Review page — editorial layout
   Loaded after article.css on single posts.
   ============================================ */

/* Reading column: ~70 characters per line */
.single-article .entry-header,
.single-article .entry-content,
.single-article .entry-footer,
.single-article .breadcrumbs {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.single-article .entry-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.single-article .entry-content {
    font-size: 1.125rem;
    line-height: 1.75;
}

.single-article .entry-content p { margin: 0 0 1.1em; }

/* One type scale for every review: all section headings, all sub-headings and
   all body text share a size (site tokens, which step down on small screens). */
.single-article .entry-content h2 { font-size: var(--font-size-xl); }
.single-article .entry-content h3 { font-size: var(--font-size-lg); }
.single-article .entry-content li { font-size: inherit; }

/* Byline */
.rv-byline {
    margin: 0.75rem 0 1rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}
.rv-byline a { color: var(--color-text-headline); font-weight: 600; text-decoration: none; }
.rv-byline a:hover { text-decoration: underline; }
.rv-byline span { margin: 0 0.35em; }

/* Affiliate notice: present but quiet */
.single-article .affiliate-disclosure {
    background: var(--color-bg-alt);
    border: 0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0 0 1.5rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}
.single-article .affiliate-disclosure p { margin: 0; }

/* The verdict box shows the product image, so drop the floated hero image on review layouts */
.single-article .entry-content:has(.rv-glance) > .entry-thumbnail { display: none; }

/* ---------- At a glance ---------- */
.rv-glance {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    margin: 1.75rem 0 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}
.rv-glance-media { display: flex; align-items: center; justify-content: center; }
.rv-glance-media img,
.rv-glance-img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    border-radius: 8px;
    float: none !important;
    margin: 0 !important;
}
.rv-eyebrow {
    margin: 0 0 0.25rem !important;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-caps);
    text-transform: uppercase;
    color: var(--color-primary-dark);
}
.rv-glance-name {
    margin: 0 0 0.5rem !important;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-headline);
}
.rv-bestfor { margin: 0 0 0.75rem !important; font-size: 0.95rem; line-height: 1.5; }
.rv-glance-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}
.entry-content .rv-glance-lists ul { margin: 0; padding: 0; list-style: none; }
.entry-content .rv-glance-lists li {
    position: relative;
    margin: 0 0 0.4rem;
    padding-left: 1.4rem;
    font-size: 0.9rem;
    line-height: 1.45;
}
.rv-pros li::before,
.rv-cons li::before {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
}
.rv-pros li::before { content: "+"; color: var(--color-pros); }
.rv-cons li::before { content: "−"; color: var(--color-cons); }

.rv-buy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}
.rv-price { font-size: 1.05rem; font-weight: 700; color: var(--color-text-headline); }
.rv-note {
    margin: 0.5rem 0 0 !important;
    font-size: 0.78rem !important;
    line-height: 1.4;
    color: var(--color-text-muted);
}

/* Buy button */
.rv-cta,
.entry-content a.rv-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-target);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    background: var(--color-primary);
    color: #fff !important;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.rv-cta:hover { background: var(--color-primary-dark); transform: translateY(-1px); }
.rv-cta::after { content: "→"; margin-left: 0.5em; }

/* ---------- Contents list ---------- */
.single-article .table-of-contents {
    background: var(--color-bg-alt);
    border: 0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin: 0 0 2rem;
    box-shadow: none;
}
.single-article .table-of-contents .toc-title {
    font-family: var(--font-body);
    font-size: 0.8rem !important;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-caps);
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 0.5rem !important;
    padding: 0 !important;
    border: 0 !important;
}
.single-article .table-of-contents ol {
    margin: 0;
    padding-left: 1.2rem;
    columns: 2;
    column-gap: 2rem;
    font-size: 0.95rem;
}
.single-article .table-of-contents li { margin: 0 0 0.3rem; break-inside: avoid; }
.single-article .table-of-contents ol { counter-reset: toc; list-style: none; padding-left: 0; }
.single-article .table-of-contents li:not(.toc-sub) { counter-increment: toc; }
.single-article .table-of-contents li:not(.toc-sub)::before {
    content: counter(toc) ". ";
    color: var(--color-primary);
    font-weight: 700;
}
.single-article .table-of-contents li.toc-sub { margin-left: 1.4rem; }
.single-article .table-of-contents li.toc-sub::before { content: "– "; color: var(--color-text-muted); }

/* ---------- Sections: calm cards instead of coloured blocks ---------- */
.single-article .entry-content .product-pick-section {
    background: #fff;
    border: 1px solid var(--color-border);
    border-left-width: 1px;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 0 0 1.5rem;
    box-shadow: none;
}
.single-article .entry-content .product-pick-section > h2,
.single-article .entry-content .product-pick-section > h3 {
    font-size: var(--font-size-xl);
    margin: 0 0 0.75rem;
    padding: 0;
    border: 0;
    color: var(--color-text-headline);
}
.single-article .entry-content .product-pick-section > h2::before,
.single-article .entry-content .product-pick-section > h3::before { content: none; display: none; }
.single-article .entry-content .product-pick-section::before,
.single-article .entry-content .product-pick-section::after { display: none; }
.single-article .entry-content .product-pick-section p:last-child,
.single-article .entry-content .product-pick-section ul:last-child { margin-bottom: 0; }

/* Pros and cons side by side */
.rv-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0 0 1.5rem;
}
.rv-proscons .product-pick-section { margin: 0 !important; }
.single-article .rv-proscons .our-pick { border-top: 4px solid var(--color-pros); }
.single-article .rv-proscons .v2-cons { border-top: 4px solid var(--color-cons); }
.single-article .entry-content .our-pick ul,
.single-article .entry-content .v2-cons ul,
.single-article .entry-content .v2-buying-tips ul { list-style: none; margin: 0; padding: 0; }
.single-article .entry-content .our-pick li,
.single-article .entry-content .v2-cons li,
.single-article .entry-content .v2-buying-tips li {
    position: relative;
    padding-left: 1.5rem;
    margin: 0 0 0.6rem;
    line-height: 1.55;
}
.single-article .entry-content .our-pick li::before,
.single-article .entry-content .v2-cons li::before,
.single-article .entry-content .v2-buying-tips li::before {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    background: none;
    width: auto;
    height: auto;
}
.single-article .entry-content .our-pick li::before { content: "+"; color: var(--color-pros); }
.single-article .entry-content .v2-cons li::before { content: "−"; color: var(--color-cons); }
.single-article .entry-content .v2-buying-tips li::before { content: counter(tip); color: var(--color-primary-dark); }
.single-article .entry-content .v2-buying-tips ul { counter-reset: tip; }
.single-article .entry-content .v2-buying-tips li { counter-increment: tip; }

/* Research notes read as a footnote-style aside */
.single-article .entry-content .product-pick-section.how-tested {
    background: var(--color-bg-alt);
    border: 0;
}

/* ---------- Also consider ---------- */
.rv-alts { margin: 2rem 0; }
.single-article .entry-content .rv-alts h2 { border: 0; padding: 0; margin: 0 0 1rem; font-size: var(--font-size-xl); }
.rv-alts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.entry-content a.rv-alt {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-headline);
    text-decoration: none;
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.entry-content a.rv-alt:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); }
.rv-alt-img {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
}
.rv-alt-img img { width: 100%; height: 100%; object-fit: contain; margin: 0 !important; float: none !important; }
.rv-alt-title { font-size: 0.92rem; font-weight: 600; line-height: 1.35; }
.rv-alt-more { margin-top: auto; font-size: 0.8rem; font-weight: 700; color: var(--color-primary-dark); }
.rv-alt-more::after { content: " →"; }
.rv-alts-all { margin: 0.75rem 0 0 !important; font-size: 0.95rem; font-weight: 600; }

/* ---------- Where to buy ---------- */
.rv-where {
    margin: 2.5rem 0 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--color-primary-light);
}
.single-article .entry-content .rv-where h2 { border: 0; padding: 0; margin: 0 0 0.5rem; font-size: var(--font-size-xl); }
.rv-where-lede { font-size: inherit; }
.rv-where .product-card-container { margin: 1rem 0 0; }

/* ---------- Related guides under the article ---------- */
.single-article ~ .container .related-posts { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---------- Sticky mobile buy bar ---------- */
.rv-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}
.rv-sticky[hidden] { display: none; }
.rv-sticky-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    font-weight: 600;
}
.rv-cta-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; white-space: nowrap; }
@media (min-width: 900px) {
    .rv-sticky { display: none !important; }
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    .rv-glance { grid-template-columns: 1fr; padding: 1.1rem; gap: 1rem; }
    .rv-glance-media img, .rv-glance-img { max-height: 180px; }
    .rv-glance-lists, .rv-proscons, .rv-alts-grid { grid-template-columns: 1fr; }
    .rv-buy .rv-cta { width: 100%; }
    .single-article .table-of-contents ol { columns: 1; }
    .entry-content a.rv-alt { flex-direction: row; align-items: center; }
    .rv-alt-img { flex: 0 0 96px; }
}

/* Keep the back-to-top button clear of the sticky buy bar */
body:has(.rv-sticky:not([hidden])) .back-to-top { bottom: 84px; }

/* In depth, use cases, FAQ and verdict: plain editorial prose with clear sub-headings */
.rv-indepth, .rv-usecases, .rv-faq { margin: 2.25rem 0; }
.rv-indepth h3, .rv-usecases h3, .rv-faq h3 {
    margin: 1.5rem 0 0.5rem;
    color: var(--color-text-headline);
}
.rv-usecases h3::before { content: "→ "; color: var(--color-primary); }
.rv-verdict {
    margin: 2.25rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--color-primary);
    background: var(--color-bg-alt, #f8f9fa);
    border-radius: 0 8px 8px 0;
}
.rv-verdict h2 { margin-top: 0; }
.rv-verdict p:last-child { margin-bottom: 0; }

/* Buying guides: picks / specs table */
.guide-at-a-glance { margin: 2rem 0; overflow-x: auto; }
.guide-picks-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.guide-picks-table th,
.guide-picks-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.guide-picks-table thead th { background: var(--color-bg-alt, #f8f9fa); color: var(--color-text-headline); }
.guide-picks-table td:first-child { font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) {
    .guide-picks-table td:first-child { white-space: normal; }
    .guide-picks-table th, .guide-picks-table td { padding: 8px; font-size: 0.875rem; }
}

/* Reviews: the buying guides a product appears in */
.rv-guides { margin: 2.25rem 0; padding: 1.25rem 1.5rem; border: 1px solid var(--color-border); border-radius: 8px; }
.rv-guides h2 { margin-top: 0; font-size: 1.15rem; }
.rv-guides ul { margin: 0; padding-left: 1.2rem; }
.rv-guides li { margin: 0.35rem 0; }
.guide-review-link { font-weight: 600; }

/* Buying guides: a photo for every product */
.guide-product-image { margin: 1rem auto; max-width: 300px; text-align: center; }
.guide-product-image img { width: 100%; height: auto; max-height: 300px; object-fit: contain; background: #fff; border-radius: 8px; }
.guide-vs-cards { display: grid; gap: 1.25rem; margin: 1.5rem 0; }
@media (min-width: 640px) { .guide-vs-cards { grid-template-columns: 1fr 1fr; } }
.guide-vs-item .guide-product-image { max-width: 220px; }

/* How-to articles */
.howto-answer {
    margin: 1.5rem 0 2rem;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--color-primary);
    background: var(--color-bg-alt, #f8f9fa);
    border-radius: 0 8px 8px 0;
}
.howto-answer p:last-child { margin-bottom: 0; }
.howto-products { margin: 2.25rem 0; }
.howto-parent { font-weight: 600; margin: 2rem 0; }
