/* ==========================================================================
   Reader reviews and star ratings (27 Nov 2026): the reviews page (/ek-reviews/, .ek-reviews-page on
   the Simple pages' layout), the star display, the summary, the one form, and the "Read all reviews" /
   "Leave a review" buttons on About the book and Reading community. Cards keep About the book's look.

   Stars: one SVG star as a mask, repeated; the colour is the element's background. Filled stars use
   gold ink (#8A6A1F, 4.9:1 on sand) so a chosen rating reads as a state (WCAG 1.4.11, 3:1); empty
   stars are a quiet outline tone. Every star display carries its number as text (role="img").
   ========================================================================== */

.ek-stars {
	--ek-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6 6.6.8-4.9 4.6 1.3 6.5L12 17.3l-5.9 3.2 1.3-6.5L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E");
	position: relative;
	display: inline-block;
	width: 5.5em;
	height: 1.1em;
	font-size: 18px;
	vertical-align: -0.15em;
	background: var(--ek-line-dark);
	-webkit-mask: var(--ek-star) left center / 1.1em 1.1em repeat-x;
	mask: var(--ek-star) left center / 1.1em 1.1em repeat-x;
}
.ek-stars__fill {
	position: absolute;
	inset: 0 auto 0 0;
	background: var(--ek-gold-ink);
}
.ek-stars--lg { font-size: 26px; }

/* --- Reviews page ------------------------------------------------------- */
.ek-reviews-page .ek-rv-roman { color: var(--ek-gold-ink); }
.ek-reviews-page .ek-rv-hero { padding-bottom: 44px; }

.ek-rv-summary { padding: 48px 0; border-bottom: 1px solid var(--ek-line); background: var(--ek-paper); }
.ek-rv-summary__inner { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 520px); gap: 56px; align-items: center; }
.ek-rv-score { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ek-rv-score__value { margin: 0; font-family: var(--ek-font-serif); font-size: 56px; line-height: 1; color: var(--ek-ink); }
.ek-rv-score__of { font-size: 24px; color: var(--ek-muted-strong); }
.ek-rv-score__none { margin: 0; font-family: var(--ek-font-serif); font-size: 24px; color: var(--ek-ink); }
.ek-rv-score__counts { margin: 0; font-size: 15px; color: var(--ek-muted-strong); }
.ek-rv-score__cta { margin-top: 12px; }

.ek-rv-bars { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--ek-ink-soft); }
.ek-rv-bars th { width: 5.5em; padding: 6px 14px 6px 0; font-weight: 500; text-align: left; white-space: nowrap; }
.ek-rv-bars td { padding: 6px 0; }
.ek-rv-bars__track { display: block; height: 12px; background: var(--ek-linen-shade); border: 1px solid var(--ek-line); }
.ek-rv-bars__fill { display: block; height: 100%; background: var(--ek-gold-ink); }
.ek-rv-bars td.ek-rv-bars__pct { width: 4em; padding-left: 14px; text-align: right; font-variant-numeric: tabular-nums; }

.ek-rv-list { padding: 64px 0 24px; }
.ek-rv-list .container-wide,
.ek-rv-form .container-wide { max-width: 880px; }
.ek-skye .ek-rv-list__title { margin: 0 0 26px; font-family: var(--ek-font-serif); font-size: 32px; font-weight: 500; color: var(--ek-ink); }
.ek-rv-items { margin: 0; padding: 0; list-style: none; }
.ek-rv-empty { color: var(--ek-muted-strong); }
.ek-rv-pages { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.ek-rv-pages a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--ek-line-dark); color: var(--ek-ink); text-decoration: none; }
.ek-rv-pages a[aria-current="page"] { background: var(--ek-earth-dark); border-color: var(--ek-earth-dark); color: var(--ek-on-dark); }

/* Review cards: About the book's look, shared by both places. */
.ek-reviews-page .reader-review { margin: 0 0 22px; padding: 26px 30px; background: var(--ek-paper); border: 1px solid var(--ek-line); border-left: 4px solid var(--ek-veld-gold); }
.ek-reviews-page .reader-review .ek-stars { display: block; margin: 0 0 12px; }
.ek-reviews-page .reader-review__text { margin: 0; font-family: var(--ek-font-serif); font-size: 19px; font-style: italic; line-height: 1.75; color: var(--ek-ink); }
.ek-reviews-page .reader-review__text p { margin: 0 0 10px; }
.ek-reviews-page .reader-review__name { margin-top: 12px; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ek-muted-strong); }
.reader-review__lang { text-transform: none; letter-spacing: 0.3px; }

/* --- Buttons --------------------------------------------------------------
   The clone pages reset every element (.ek-skye :where(*) { all: revert }), which also undoes the
   shared .ek-button, so the review buttons carry the site's .btn-main look here: dark, gold on hover. */
.ek-skye .ek-rv-actions .ek-button,
.ek-skye .ek-rv-score .ek-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 14px 28px;
	border: 1px solid var(--ek-earth-dark);
	background: var(--ek-earth-dark);
	color: var(--ek-white);
	font-family: var(--ek-font-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2px;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
}
.ek-skye .ek-rv-actions .ek-button--outline { background: transparent; border-color: var(--ek-line-dark); color: var(--ek-ink); }
.ek-skye .ek-rv-actions .ek-button:hover,
.ek-skye .ek-rv-score .ek-button:hover { background: var(--ek-veld-gold); border-color: var(--ek-veld-gold); color: var(--ek-earth-dark); }
.ek-skye .ek-rv-actions .ek-button--outline:hover { background: var(--ek-earth-dark); border-color: var(--ek-earth-dark); color: var(--ek-on-dark); }
.ek-skye .ek-rv-actions .ek-button:focus-visible,
.ek-skye .ek-rv-score .ek-button:focus-visible { outline: 2px solid var(--ek-gold-ink); outline-offset: 3px; }

/* --- About the book and Reading community: summary line and buttons ---- */
.ek-rv-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -8px 0 22px; font-size: 15px; color: var(--ek-muted-strong); }
.ek-rv-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.reader-review-link { margin: 26px 0 0; }
.reader-review-link__lead { margin: 0 0 12px; font-size: 16px; color: var(--ek-muted-strong); }

/* --- The form ------------------------------------------------------------ */
.ek-rv-form { padding: 24px 0 80px; }
.reader-review-form { padding: 36px 40px; background: var(--ek-white); border: 1px solid var(--ek-line); scroll-margin-top: 90px; } /* clear of the sticky Books bar when linked to */
#reader-reviews { scroll-margin-top: 90px; }
.reader-review-form__title { margin: 0 0 8px; font-family: var(--ek-font-serif); font-size: 30px; color: var(--ek-ink); }
.reader-review-form__intro { margin: 0 0 22px; font-size: 16px; color: var(--ek-muted-strong); }
.reader-review-form form { display: flex; flex-direction: column; gap: 20px; }
.reader-review-form .ek-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* honeypot */
.reader-review-form .form-notice { margin: 0 0 18px; padding: 12px 14px; border-left: 3px solid var(--ek-sage-ink); background: var(--ek-paper); font-size: 15px; color: var(--ek-ink); }
.reader-review-form .form-notice--error { border-left-color: var(--ek-brick); }
.rr-optional { text-transform: none; letter-spacing: 0; color: var(--ek-muted-strong); }
.rr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rr-field label,
.rr-stars legend { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--ek-muted-strong); }
.rr-field input,
.rr-field textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; font-family: var(--ek-font-sans); font-size: 16px; color: var(--ek-ink); background: var(--ek-white); border: 1px solid var(--ek-field-border); border-radius: 0; }
.rr-field textarea { min-height: 140px; resize: vertical; }
.rr-help { margin: 6px 0 0; font-size: 14px; color: var(--ek-muted-strong); }
.rr-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--ek-ink-soft); }
.rr-consent input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ek-earth-dark); }
.rr-submit { align-self: flex-start; min-height: 48px; padding: 14px 30px; background: var(--ek-earth-dark); color: var(--ek-on-dark); border: none; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; cursor: pointer; }
.rr-submit:hover { background: var(--ek-earth-mid); }

/* Star input: five radios (keyboard: Tab into the group, arrows to choose), each label a 44px target. */
.rr-stars { margin: 0; padding: 0; border: 0; min-width: 0; }
.rr-stars__row { display: flex; align-items: center; gap: 2px; }
.rr-stars__input,
.rr-stars__none { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.rr-stars__star { position: relative; display: inline-flex; width: 44px; height: 44px; cursor: pointer; }
.rr-stars__star::before {
	content: "";
	position: absolute;
	inset: 6px;
	background: var(--ek-field-border);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round' d='M12 2.6l2.9 6 6.6.8-4.9 4.6 1.3 6.5L12 17.3l-5.9 3.2 1.3-6.5L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round' d='M12 2.6l2.9 6 6.6.8-4.9 4.6 1.3 6.5L12 17.3l-5.9 3.2 1.3-6.5L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Filled: the chosen star and every star before it; while pointing, the pointed star and those before it. */
.rr-stars__input:checked + .rr-stars__star::before,
.rr-stars__star:has(~ .rr-stars__input:checked)::before,
.rr-stars__row:hover .rr-stars__star:hover::before,
.rr-stars__row:hover .rr-stars__star:has(~ .rr-stars__star:hover)::before {
	background: var(--ek-gold-ink);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6 6.6.8-4.9 4.6 1.3 6.5L12 17.3l-5.9 3.2 1.3-6.5L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6 6.6.8-4.9 4.6 1.3 6.5L12 17.3l-5.9 3.2 1.3-6.5L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E");
}
.rr-stars__row:hover .rr-stars__star:hover ~ .rr-stars__star::before {
	background: var(--ek-field-border);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round' d='M12 2.6l2.9 6 6.6.8-4.9 4.6 1.3 6.5L12 17.3l-5.9 3.2 1.3-6.5L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round' d='M12 2.6l2.9 6 6.6.8-4.9 4.6 1.3 6.5L12 17.3l-5.9 3.2 1.3-6.5L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E");
}
.rr-stars__input:focus-visible + .rr-stars__star,
.rr-stars__none:focus-visible + .rr-stars__none-label { outline: 2px solid var(--ek-gold-ink); outline-offset: 2px; }
.rr-stars__none-label { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; font-size: 14px; color: var(--ek-muted-strong); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rr-stars__none:checked + .rr-stars__none-label { text-decoration: none; color: var(--ek-ink); }
.rr-stars__none:checked + .rr-stars__none-label::before { content: "✓"; margin-right: 0.4em; }

@media (prefers-reduced-motion: no-preference) {
	.rr-stars__star::before { transition: background-color 120ms ease; }
}

@media (max-width: 850px) {
	.ek-rv-summary { padding: 36px 0; }
	.ek-rv-summary__inner { grid-template-columns: 1fr; gap: 28px; }
	.ek-rv-score__value { font-size: 46px; }
	.ek-rv-list { padding-top: 44px; }
	.ek-skye .ek-rv-list__title { font-size: 28px; }
	.ek-reviews-page .reader-review { padding: 20px 18px; }
	.ek-reviews-page .reader-review__text { font-size: 17px; }
	.reader-review-form { padding: 24px 18px; }
	.reader-review-form__title { font-size: 26px; }
	.rr-row { grid-template-columns: 1fr; }
	.rr-submit { width: 100%; align-self: stretch; }
	.ek-rv-actions .ek-button { flex: 1 1 100%; }
}
