/* reviews.css — /reviews/ archive + /reviews/<slug>/ pages.
   Brand: primary #2b3990 · secondary #ce2329 · accent #06315c */

:root {
  --rv-primary: #2b3990;
  --rv-secondary: #ce2329;
  --rv-accent: #06315c;
  --rv-star: #f0a500;
  --rv-track: #e3e6ef;
}

/* Stars — drawn by CSS from --n (0–5). No unicode glyphs in the markup:
   a repeating star-shaped mask over a partial-fill gradient. */
.stars {
  --n: 5;
  display: inline-block;
  width: 5.5em;
  height: 1.1em;
  vertical-align: -0.15em;
  background: linear-gradient(90deg, var(--rv-star) calc(var(--n) / 5 * 100%), var(--rv-track) 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.5l2.6 6.1 6.6.5-5 4.3 1.5 6.4L10 15.3l-5.7 3.5 1.5-6.4-5-4.3 6.6-.5z'/%3E%3C/svg%3E") left center / 1.1em 1.1em repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.5l2.6 6.1 6.6.5-5 4.3 1.5 6.4L10 15.3l-5.7 3.5 1.5-6.4-5-4.3 6.6-.5z'/%3E%3C/svg%3E") left center / 1.1em 1.1em repeat-x;
}

/* Visually hidden (screen-reader text beside each star row). */
.rv-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Summary header: big aggregate + distribution bars. */
.rv-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}
.rv-agg { text-align: center; min-width: 180px; }
.rv-agg-value {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  margin: 0 0 6px;
  color: var(--rv-primary);
}
.rv-agg-stars { margin: 0 0 4px; font-size: 18px; }
.rv-agg-count { margin: 0; color: var(--rv-accent); font-weight: 600; }

.rv-dist { flex: 1; min-width: 260px; max-width: 520px; }
.rv-dist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-size: 14px;
}
.rv-dist-label { width: 52px; text-align: right; color: var(--rv-accent); }
.rv-dist-track {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: var(--rv-track);
  overflow: hidden;
}
.rv-dist-bar {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--rv-star);
  min-width: 2px;
}
.rv-dist-row:last-child .rv-dist-bar { background: var(--rv-secondary); }
.rv-dist-count { width: 28px; color: var(--rv-accent); }

/* Cards */
.rv-card .rv-rating { margin: 0 0 8px; }
.rv-body { white-space: pre-line; }
/* item 53: the reviewer-name link is the only way into a review page, so it
   gets a real 24px target (WCAG 2.5.8) instead of leaning on the inline
   exception. */
.rv-meta a { color: var(--rv-primary); text-decoration: none; display: inline-block; padding: 4px 0; line-height: 16px; }
.rv-meta a:hover { text-decoration: underline; }
.rv-muted { color: #6b7280; font-weight: 400; }

/* Owner reply — nested quote block. */
.rv-reply {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--rv-primary);
  background: rgba(43, 57, 144, 0.05);
  border-radius: 0 6px 6px 0;
  font-size: 14.5px;
}
.rv-reply-label {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--rv-primary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rv-reply p:last-child { margin-bottom: 0; }

/* Single-review page */
.rv-single .rv-full { max-width: 760px; }
.rv-single .rv-full .rv-body { font-size: 17px; line-height: 1.65; }
.rv-cta { margin-top: 20px; }
.rv-badge {
  display: inline-block;
  background: var(--rv-primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 4px;
  padding: 1px 7px;
  vertical-align: 0.1em;
}

@media (max-width: 560px) {
  .rv-summary { gap: 18px; }
  .rv-agg { min-width: 0; margin: 0 auto; }
  .rv-agg-value { font-size: 48px; }
}
