/* Nexa reviews wall — the testimonial grid.
   The write panel and its form live in reviews-compose.css (line-cap split).

   Shape: a score panel that shows the whole rating breakdown, then equal-height cards in a grid.
   Cards, not full-width rows: a row of body text 120 characters wide reads as a forum post, and a
   stack of rows at different heights reads as a dump. A card clamps to six lines and expands in
   place, so no card is ever taller than its neighbours and the section keeps a fixed rhythm.
   Blur is deliberately off on every surface here — a wall of live backdrop filters is the one
   thing on this page that would cost real frames while scrolling. */

/* Reza-approved design exception: this section runs a gold accent family alongside the platform
   glass tokens. Asked for directly - gold stars ("star color golden", 2026-07-21) and a paid badge
   that "feels special", not the product blue. Everything else here stays on the standard tokens.
   A rating star is gold everywhere people already trust ratings, and blue stays the product's, not
   the score's. --rv-star is also used by the picker in reviews-compose.css. */
:root, [data-theme="light"] {
  --rv-star: #f0a91c; --rv-star-off: rgba(12,19,34,0.14);
  --rv-gold: #e9b949; --rv-gold-ink: #ffd98a;
  --rv-seal-1: #232b3e; --rv-seal-2: #0d1220;
}
[data-theme="dark"] {
  --rv-star: #ffc247; --rv-star-off: rgba(255,255,255,0.14);
  --rv-gold: #ffc247; --rv-gold-ink: #ffdf9e;
  /* lifted off the near-black card so the seal reads as an object, not a hole */
  --rv-seal-1: #2b3346; --rv-seal-2: #191f2c;
}

.rv { margin-top: clamp(28px, 4.5vh, 44px); display: flex; flex-direction: column; gap: 14px; }
/* the layout rules below out-specify the UA [hidden] rule, so restate it */
.rv [hidden] { display: none !important; }

/* ---------- summary: score, breakdown, one call to action ---------- */
.rv-summary.glass {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: clamp(20px, 4vw, 40px);
  padding: 20px 24px;
  border-radius: 20px;
  background:
    linear-gradient(112deg, color-mix(in srgb, var(--rv-star) 7%, transparent), transparent 46%),
    var(--field-sheen);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.rv-score { display: flex; flex-direction: column; gap: 5px; }
.rv-score-top { display: flex; align-items: baseline; gap: 7px; }
.rv-score-top b { font-size: 44px; font-weight: 600; letter-spacing: -0.04em; line-height: 0.9; }
.rv-score-top small { font-size: var(--fs-lead); color: var(--ink-40); }
.rv-score-sub { font-size: var(--fs-body); color: var(--ink-40); letter-spacing: 0.02em; }

.rv-dist { display: flex; flex-direction: column; gap: 5px; max-width: 340px; }
.rv-dist-row { display: grid; grid-template-columns: 28px 1fr 20px; align-items: center; gap: 10px; }
.rv-dist-n, .rv-dist-c { font-size: var(--fs-small); color: var(--ink-40); }
.rv-dist-c { text-align: right; font-variant-numeric: tabular-nums; }
.rv-bar { height: 5px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.rv-bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--rv-star); }

.rv-cta {
  flex: none;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--blue) 26%, var(--hairline));
  background: color-mix(in srgb, var(--blue) 10%, var(--field-sheen));
  color: var(--blue);
  font: inherit; font-size: var(--fs-small); font-weight: 650;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.rv-cta:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--blue) 16%, var(--field-sheen)); }

/* ---------- sort / filter bar ---------- */
.rv-bar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 2px; }
.rv-sort { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.rv-chipbtn {
  border: 0; background: none; cursor: pointer;
  padding: 6px 13px; border-radius: var(--r-pill);
  color: var(--ink-40); font: inherit; font-size: var(--fs-small); font-weight: 600;
  letter-spacing: 0.05em; white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.rv-chipbtn:hover { color: var(--ink); }
.rv-sort .rv-chipbtn.is-on { background: var(--field-sheen); color: var(--ink); box-shadow: 0 1px 2px var(--field-depth); }
.rv-bar-row > .rv-chipbtn { border: 1px solid var(--hairline); }
.rv-bar-row > .rv-chipbtn.is-on { border-color: color-mix(in srgb, var(--blue) 32%, var(--hairline)); color: var(--blue); background: color-mix(in srgb, var(--blue) 8%, transparent); }

/* ---------- stars ---------- */
.rv-stars { display: inline-flex; align-items: center; gap: 2.5px; flex: none; }
.rv-stars svg { width: 14px; height: 14px; display: block; fill: var(--rv-star-off); transition: fill 0.2s ease; }
.rv-stars svg.on { fill: var(--rv-star); }
/* Fractional star: an empty glyph with the filled one clipped over it to --p of its width. */
.rv-stars .rv-star-part { position: relative; display: block; flex: none; line-height: 0; }
.rv-stars .rv-star-part svg.on {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0);
}
.rv-summary .rv-stars svg { width: 18px; height: 18px; }

/* ---------- the wall ---------- */
.rv-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.rv-list.is-empty { display: block; }

.rv-card.glass {
  display: flex; flex-direction: column; gap: 13px;
  padding: 19px 20px 16px;
  border-radius: 20px;
  background: var(--field-sheen);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: inset 0 1px 0 var(--glass-spec), inset 0 -1px 0 var(--glass-spec-2);
  /* entrance state */
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease;
  will-change: transform, opacity;
}
.rv-card.glass.in { opacity: 1; transform: translate3d(0, 0, 0); }
/* hover only once the card has landed, so it never fights the entrance transform */
.rv-card.glass.in:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow:
    inset 0 1px 0 var(--glass-spec),
    inset 0 -1px 0 var(--glass-spec-2),
    0 0 0 1px var(--blue-soft);
}
.rv-card.is-own { box-shadow: inset 0 1px 0 var(--glass-spec), inset 0 -1px 0 var(--glass-spec-2), 0 0 0 1px var(--blue-soft); }

.rv-card-top { display: flex; align-items: center; gap: 8px; }
/* Tier badge — paid carries the product accent and a tick, the free tiers stay deliberately quiet.
   The weighting is the point: a reader should be able to tell at a glance what a review cost the
   person who wrote it. */
.rv-badge {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--ink-40);
  font-size: var(--fs-micro); font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase;
}
.rv-badge svg { width: 10px; height: 10px; fill: currentColor; }
/* The paid seal — the only struck, solid object on the wall. A free tier is a quiet outline; the
   one badge someone paid for gets weight: dark seal, gold rule, gold type, a soft gold halo. */
.rv-badge.is-paid {
  padding: 3px 9px 3px 7px;
  background: linear-gradient(140deg, var(--rv-seal-1), var(--rv-seal-2));
  border-color: color-mix(in srgb, var(--rv-gold) 45%, transparent);
  color: var(--rv-gold-ink);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--rv-gold) 22%, transparent),
    0 1px 7px color-mix(in srgb, var(--rv-gold) 20%, transparent);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.rv-badge.is-paid svg { fill: var(--rv-gold); }
.rv-chip {
  flex: none;
  padding: 2px 7px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px solid var(--hairline);
  color: var(--ink-60);
  font-size: var(--fs-micro); font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase;
}
.rv-card-top .rv-chip + .rv-badge { margin-left: 0; }
.rv-card-top .rv-chip { margin-left: auto; }

/* quote — clamped to six lines until Read more opens it */
.rv-quote { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.rv-text {
  font-size: var(--fs-copy); line-height: 1.62; color: var(--ink-60);
  text-wrap: pretty; white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.rv-card.is-open .rv-text { -webkit-line-clamp: none; overflow: visible; }
.rv-more {
  margin-top: 7px; border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--blue); font: inherit; font-size: var(--fs-body); letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}
.rv-more::after { content: " →"; }
.rv-more:hover { opacity: 0.75; }
.rv-card.is-open .rv-more::after { content: " ↑"; }

/* footer — the identity block: who, on what, since when */
.rv-foot { display: flex; align-items: center; gap: 10px; padding-top: 13px; border-top: 1px solid var(--hairline); }
.rv-ava {
  width: 34px; height: 34px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  font-size: var(--fs-lead); font-weight: 600; letter-spacing: -0.01em; color: #fff;
}
.rv-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rv-who { font-size: var(--fs-lead); font-weight: 600; letter-spacing: -0.01em; }
.rv-meta { display: flex; align-items: center; gap: 5px; font-size: var(--fs-small); color: var(--ink-40); letter-spacing: 0.01em; }
.rv-os { display: inline-flex; align-items: center; gap: 3.5px; white-space: nowrap; }
.rv-os svg { width: 9px; height: 9px; fill: currentColor; opacity: 0.85; }
.rv-dot { opacity: 0.7; }
.rv-side { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rv-when { display: inline-flex; align-items: baseline; gap: 7px; font-size: var(--fs-small); color: var(--ink-40); white-space: nowrap; }
/* edit transparency: quieter than the original date, but always visible */
.rv-edited { font-style: italic; opacity: 0.78; }
.rv-edited::before { content: "·"; margin-right: 7px; font-style: normal; }
.rv-rowacts { display: inline-flex; gap: 8px; }
.rv-rowbtn {
  border: 0; background: none; cursor: pointer; padding: 0;
  color: var(--ink-40); font: inherit; font-size: var(--fs-tiny); letter-spacing: 0.06em; text-transform: uppercase;
  transition: color 0.2s ease;
}
.rv-rowbtn:hover { color: var(--blue); }

.rv-empty {
  padding: 24px 20px;
  border-radius: 16px;
  border: 1px dashed var(--hairline);
  font-size: var(--fs-copy); color: var(--ink-40);
  text-align: center;
}
.rv-note { margin-top: 18px; font-size: var(--fs-lead); color: var(--ink-40); }
.rv-note em { color: var(--ink-60); }
.rv-note a { color: var(--blue); text-underline-offset: 3px; }

@media (max-width: 920px) {
  /* the breakdown is the first thing to go: the score and the CTA carry the panel on their own */
  .rv-summary.glass { grid-template-columns: auto auto; justify-content: space-between; }
  .rv-dist { display: none; }
}
@media (max-width: 620px) {
  .rv-summary.glass { grid-template-columns: 1fr; justify-content: stretch; gap: 16px; }
  .rv-cta { width: 100%; text-align: center; }
  .rv-card.glass, .rv-summary.glass { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-card.glass { opacity: 1; transform: none; transition: box-shadow 0.35s ease; }
  .rv-card.glass.in:hover { transform: none; }
}
