/* ==========================================================================
   Reviews — five-axis star ratings (Overall / Style / Plot / Grammar /
   Characters). Own file by design: site.css was under concurrent edit,
   and these styles are self-contained anyway. Uses the shared tokens.
   ========================================================================== */

/* ---------- star display (fractional averages) ---------- */

.stars {
  position: relative;
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: .1em;
  vertical-align: -1px;
}
.stars-track { color: var(--rule); }
.stars-fill {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--accent);
}
.stars-none { color: var(--ink-faint); letter-spacing: 0; }

/* ---------- score summary block on the work page ---------- */

.score-block {
  background: var(--sheet);
  border: 1px solid var(--sheet-border);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.25rem;
  align-items: center;
}
.score-overall { display: flex; flex-direction: column; gap: .15rem; }
.score-overall .stars { font-size: 1.35rem; }
.score-number {
  font-family: var(--font-prose);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1;
}
.score-count { font-size: .75rem; color: var(--ink-faint); }

.score-axes {
  display: grid;
  grid-template-columns: repeat(2, minmax(9rem, 1fr));
  gap: .3rem 1.75rem;
  font-size: .8rem;
}
@media (max-width: 34rem) { .score-axes { grid-template-columns: 1fr; } }
.score-axis { display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; }
.score-axis-label { color: var(--ink-soft); }

/* ---------- review cards ---------- */

.review-list { display: flex; flex-direction: column; gap: .8rem; }

.review {
  background: var(--sheet);
  border: 1px solid var(--sheet-border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
}
.review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .9rem;
  margin-bottom: .35rem;
}
.review-title { font-family: var(--font-prose); font-weight: 600; font-size: 1.05rem; margin: 0; }
.review-byline { font-size: .78rem; color: var(--ink-faint); }
.review-byline a { color: var(--accent); }
.review-body { font-size: .92rem; color: var(--ink-soft); margin: .35rem 0 0; overflow-wrap: anywhere; }
.review-axes {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.4rem;
  margin-top: .6rem;
  font-size: .72rem;
  color: var(--ink-faint);
}
.review-axes .stars { font-size: .8rem; }
.review-tools { margin-top: .6rem; display: flex; gap: .9rem; font-size: .75rem; }
.review-tools a, .review-tools button {
  font: inherit; background: none; border: 0; padding: 0;
  color: var(--ink-faint); cursor: pointer;
}
.review-tools a:hover, .review-tools button:hover { color: var(--cta); text-decoration: none; }

/* ---------- the review form's star inputs ---------- */

.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.rate-row:last-of-type { border-bottom: 0; }
.rate-label { font-size: .9rem; color: var(--ink); }
.rate-label .rate-optional { font-size: .72rem; color: var(--ink-faint); margin-left: .4rem; }

/* Radios styled as stars: inputs stay in the DOM (focusable, form-
   correct); their labels paint. Reversed row + ~ selector = classic
   no-JS fill-to-the-left. */
.rate-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: .1rem;
}
.rate-stars input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.rate-stars label {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--rule);
  cursor: pointer;
  padding: 0 .05rem;
}
.rate-stars input:checked ~ label { color: var(--accent); }
.rate-stars label:hover, .rate-stars label:hover ~ label { color: var(--accent); }
.rate-stars input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.review-form-sheet {
  background: var(--sheet);
  border: 1px solid var(--sheet-border);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  max-width: 40rem;
}
.review-form-sheet .field { margin-top: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.review-form-sheet input[type="text"], .review-form-sheet textarea {
  font: inherit;
  padding: .5rem .8rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
.review-form-actions { display: flex; gap: .6rem; margin-top: 1.25rem; }
