/* Review stars. Aggregate ratings fill to the exact score: each star takes its own
   share of --rating (4.8 -> four full stars and 80% of the fifth), remainder gray.
   --rating is kept in sync with data/reviews.json by tools/sync_reviews.py.
   Gold matches the Google-yellow stars already used on the homepage review cards. */
:root {
  --cc-star-on: #FBBC04;
  --cc-star-off: #D3D8D5;
}

.cc-stars {
  display: inline-flex;
  gap: 0.14em;
  letter-spacing: 0 !important;
  white-space: nowrap;
  vertical-align: baseline;
}

.cc-stars i {
  --f: clamp(0%, (var(--rating, 5) - var(--n)) * 100%, 100%);
  display: inline-block;
  font-style: normal;
  line-height: 1;
  background: linear-gradient(90deg, var(--cc-star-on) var(--f), var(--cc-star-off) var(--f));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.cc-stars i:nth-child(1) { --n: 0; }
.cc-stars i:nth-child(2) { --n: 1; }
.cc-stars i:nth-child(3) { --n: 2; }
.cc-stars i:nth-child(4) { --n: 3; }
.cc-stars i:nth-child(5) { --n: 4; }

/* Single stars and individual five-star reviews: solid gold. */
.cc-star,
.cc-star-5,
.authority-item .aic {
  color: var(--cc-star-on) !important;
}
