/* HowVPS — Review Detail, evidence-based layout (see docs/REVIEW-LAYOUT.md).
   Scoped to .rv. Uses the shared tokens, so dark mode follows automatically.

   Rules this file enforces:
   - one reading column, lines capped near 70 characters;
   - every tap target (buttons, in-page links, FAQ rows) at least 48px high;
   - one thin opaque sticky bar, no animation, no overlays;
   - wide tables scroll inside their own region with the first column locked. */

:root:has(.rv) { scroll-padding-top: 72px; } /* a focused / targeted element is never hidden under the bar */

.rv-wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); }

/* ── 1. Verdict header ─────────────────────────────────────────────── */
.rv-head { padding: 24px 0 28px; border-bottom: 1px solid var(--divider); background: var(--parchment); }
.rv-head .crumbs { margin-bottom: 18px; }
.rv-head__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
/* A review without a score (nothing was measured) has no score card. */
.rv-head__grid--solo { grid-template-columns: minmax(0, 1fr); }
.rv-title { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); }
.rv-title .avatar--lg { flex: none; width: 56px; height: 56px; font-size: 17px; }
.rv-lead { max-width: 60ch; margin-top: 14px; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.rv-byline { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.rv-byline__photo { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.rv-byline a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

.rv-score { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
.rv-score__label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rv-score__value { margin-top: 2px; font-family: var(--font-display); font-size: 46px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); }
.rv-score__value small { margin-left: 2px; font-size: 18px; font-weight: 500; color: var(--ink-3); }
.rv-score__parts { display: grid; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.rv-score__parts li { display: grid; grid-template-columns: 84px minmax(0, 1fr) 30px; gap: 10px; align-items: center; }
.rv-score__parts .score-bar { width: 100%; height: 6px; }
.rv-score__parts b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }

/* Call to action: styled as page content, never as a banner. */
.rv-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--divider); }
.rv-cta__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 16px; color: var(--ink-2); }
.rv-cta__price strong { font-size: 22px; font-weight: 700; color: var(--ink); }
.rv-cta__renew { font-size: 14px; color: var(--ink-3); }
.rv-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.rv-btn { min-height: 48px; height: auto; padding: 12px 22px; font-size: 16px; font-weight: 600; }
.rv-disclosure { grid-column: 1 / -1; font-size: 13px; line-height: 1.5; color: var(--ink-3); }

/* ── 2. Slim sticky bar ────────────────────────────────────────────── */
.rv-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; border-bottom: 1px solid var(--border); background: var(--canvas); }
.rv-bar[hidden] { display: none; }
.rv-bar__in { display: flex; align-items: center; gap: 20px; min-height: 52px; }
.rv-bar__name { display: flex; flex: none; align-items: baseline; gap: 8px; font-size: 14.5px; color: var(--ink); }
.rv-bar__name span { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.rv-bar__nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rv-bar__nav::-webkit-scrollbar { display: none; }
.rv-bar__nav ul { display: flex; gap: 4px; white-space: nowrap; }
.rv-bar__nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 10px; font-size: 13.5px; color: var(--ink-2); }
.rv-bar__nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.rv-bar__cta { flex: none; min-height: 40px; height: auto; padding: 8px 16px; font-weight: 600; }

/* ── 3–9. Reading column ───────────────────────────────────────────── */
.rv-body { padding-top: 36px; padding-bottom: 24px; }
.rv-section { margin-top: 44px; }
.rv-body > .rv-section:first-child { margin-top: 0; }
.rv-section > h2 { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); }

.rv-fit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.rv-fit__col { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
.rv-fit__col h3 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.rv-fit__col h3 .icon { flex: none; width: 20px; height: 20px; stroke-width: 2; }
.rv-fit__col--yes h3 { color: var(--up); }
.rv-fit__col--no h3 { color: var(--red); }
.rv-fit__col p { margin-top: 6px; font-size: 16px; line-height: 1.55; color: var(--ink); }

.rv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 18px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
.rv-facts > div { margin: 0 -1px -1px 0; padding: 12px 16px; border-right: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.rv-facts dt { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); }
.rv-facts dt .icon { flex: none; width: 17px; height: 17px; color: var(--primary); }
.rv-facts dd { margin-top: 2px; font-size: 15.5px; font-weight: 600; line-height: 1.4; color: var(--ink); }

.rv-proscons { margin-top: 22px; }
.rv-proscons .pc__title { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rv-proscons .pc__title .icon { flex: none; width: 20px; height: 20px; stroke-width: 2; }
.rv-proscons .pc--pro .pc__title { color: var(--up); }
.rv-proscons .pc--con .pc__title { color: var(--red); }
.rv-proscons .pc__list { gap: 9px; font-size: 16px; line-height: 1.5; color: var(--ink); }
.rv-method { margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--border); background: var(--card-hover); font-size: 15px; line-height: 1.6; color: var(--ink-2); }

.rv-toc { margin-top: 36px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
.rv-toc__title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rv-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin-top: 6px; counter-reset: toc; }
.rv-toc li { counter-increment: toc; }
/* In-page links: plain text with a section number, not the blue of outbound links. */
.rv-toc a { display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: 15.5px; color: var(--ink); }
.rv-toc a::before { content: counter(toc); flex: none; width: 22px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.rv-toc a:hover { text-decoration: underline; text-underline-offset: 3px; }

.rv-written .prose { margin-top: 0; font-size: 17px; line-height: 1.7; }
.rv-written .prose > p, .rv-written .prose > ul, .rv-written .prose > ol, .rv-written .prose > blockquote { max-width: 70ch; }
.rv-written .prose h2, .rv-written .prose h3:first-child { scroll-margin-top: 72px; }
.rv-written .prose > h3 { margin-top: 1.9em; padding-bottom: .4em; border-bottom: 1px solid var(--divider); font-size: 24px; line-height: 1.3; scroll-margin-top: 72px; }
.rv-written .prose > :first-child { margin-top: 0; }
.rv-written .prose img { height: auto; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* Tables: own scroll region, locked first column, edge shadow as the "more →" cue. */
.rv-table { position: relative; margin-top: 1.2em; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background:
    linear-gradient(to right, var(--card) 30%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--card) 30%, transparent) right / 40px 100% no-repeat local,
    linear-gradient(to right, rgba(0, 0, 0, .12), transparent) left / 12px 100% no-repeat scroll,
    linear-gradient(to left, rgba(0, 0, 0, .12), transparent) right / 12px 100% no-repeat scroll,
    var(--card); }
.rv-table table { min-width: 520px; font-size: 15.5px; }
.rv-table th, .rv-table td { padding: 13px 16px; white-space: nowrap; background: transparent; }
.rv-table thead th { font-size: 13px; color: var(--ink-3); background: transparent; }
.rv-table tbody tr:last-child td, .rv-table tbody tr:last-child th { border-bottom: 0; }
.rv-table th:first-child, .rv-table td:first-child { position: sticky; left: 0; z-index: 1; font-weight: 600; background: var(--card); }

.rv-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; margin-top: 44px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
.rv-offer h2 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rv-offer p { margin-top: 4px; font-size: 16px; color: var(--ink); }
.rv-offer a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

.rv-faq { margin-top: 12px; border-top: 1px solid var(--divider); }
.rv-faq details { border-bottom: 1px solid var(--divider); }
.rv-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 0; font-size: 17px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; }
.rv-faq summary::-webkit-details-marker { display: none; }
.rv-faq summary::after { content: "+"; flex: none; font-size: 22px; font-weight: 400; line-height: 1; color: var(--ink-3); }
.rv-faq details[open] summary::after { content: "−"; }
.rv-faq details p { max-width: 70ch; padding: 0 0 18px; font-size: 16.5px; line-height: 1.65; color: var(--ink-2); }

.rv-final { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--parchment); }
.rv-final__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; margin-top: 12px; }
.rv-final__text { max-width: 60ch; font-size: 18px; line-height: 1.55; color: var(--ink); }
.rv-final__fit { max-width: 60ch; margin-top: 10px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.rv-final__score { margin: 0; }
.rv-cta--final { margin-top: 20px; }

.rv-author { display: flex; gap: 16px; align-items: flex-start; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--divider); }
.rv-author img { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.rv-author h2 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rv-author__name { margin-top: 4px; font-size: 18px; font-weight: 600; color: var(--ink); }
.rv-author p { max-width: 70ch; margin-top: 6px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.rv-author__dates { font-size: 13.5px !important; color: var(--ink-3) !important; }

.rv-awards ul { display: grid; gap: 4px; margin-top: 10px; }
.rv-awards li { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 16px; }
.rv-awards li span { flex: none; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--gold-soft); font-size: 13px; font-weight: 600; color: var(--ink); }
.rv-awards a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.rv-tags { margin-top: 32px; }
.rv .more { margin-top: 48px; }

/* ── Small screens ─────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .rv-wrap { padding: 0 20px; }
  .rv-head { padding: 12px 0 18px; }
  .rv-head .rv-wrap { display: flex; flex-direction: column; }
  .rv-head__grid, .rv-head__main { display: contents; }
  .rv-head .crumbs { margin-bottom: 12px; }
  .rv-score { order: 2; margin-top: 14px; }
  .rv-cta { order: 3; }
  .rv-byline { order: 4; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--divider); }
  .rv-title { font-size: 26px; }
  .rv-title .avatar--lg { width: 44px; height: 44px; font-size: 14px; }
  .rv-lead { margin-top: 10px; font-size: 16.5px; line-height: 1.5; }
  .rv-score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 20px; align-items: center; padding: 14px 16px; }
  .rv-score__label { grid-column: 1; }
  .rv-score__value { grid-column: 1; font-size: 40px; }
  .rv-score__parts { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .rv-score__parts li { grid-template-columns: 64px minmax(0, 1fr) 28px; }
  .rv-cta { grid-template-columns: minmax(0, 1fr); margin-top: 14px; padding-top: 0; border-top: 0; }
  .rv-cta__actions { justify-content: stretch; }
  .rv-cta__actions .rv-btn { flex: 1 1 100%; }
  .rv-bar__nav { display: none; }       /* the bar stays one thin row: name, score, button */
  .rv-bar__in { justify-content: space-between; }
  .rv-section { margin-top: 36px; }
  .rv-section > h2 { font-size: 22px; }
  .rv-fit, .rv-toc ol, .rv-proscons { grid-template-columns: minmax(0, 1fr); }
  .rv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-offer, .rv-final__grid { grid-template-columns: minmax(0, 1fr); }
  .rv-final { padding: 20px 18px; }
  .rv-final__score { display: none; }
}

/* Phones: the disclosure sits directly above the buttons, inside the first screen. */
@media (max-width: 760px) {
  .rv-cta__price { order: 1; }
  .rv-disclosure { order: 2; }
  .rv-cta__actions { order: 3; }
}
