/*
 * Catalog style "demo16" — rating + comments add-on (loaded instead of _rate.css when
 * index.php?style=demo16 is shown). Mirrors /demo16/ like demo16.css.
 */
/* rating + comments ──────────────────────────────────────────────────────────────────────────
   cards: a reader's line under the meta; post: the score as a cover numeral on the green,
   the comments as "letters" printed on a paper page */
.post__stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin: -8px 0 18px; font-size: 14px; color: var(--soft); }
.post__rating { font: 400 italic 15px/1 var(--serif); color: var(--soft); }
.post__rating-avg { margin-right: 2px; font: 500 26px/1 var(--serif); font-style: normal; font-variant-numeric: lining-nums; color: var(--field); }
.post__comments { font: 400 italic 16px/1.2 var(--serif); color: var(--field); text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 4px; }
.post__comments:hover { text-decoration-thickness: 2px; }
.post--card .post__comments:focus-visible { outline-color: var(--field); }

.post__flash { max-width: 640px; margin: 48px auto 0; }
.notice--ok { border-top: 4px solid var(--green); color: var(--field); }

.rating { max-width: 860px; margin: 64px auto 0; padding-top: 34px; border-top: 1px solid rgb(238 238 234 / 0.24); text-align: center; }
.rating__title, .comments__title { margin: 0; font: 500 clamp(34px, 4vw, 52px)/1 var(--serif); letter-spacing: -0.02em; }
.rating__score { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 10px; margin: 18px 0 28px; }
.rating__avg { font: 900 clamp(88px, 12vw, 152px)/0.82 var(--serif); font-variant-numeric: lining-nums; letter-spacing: -0.035em; color: var(--yellow); }
.rating__max { font: 400 italic 26px/1 var(--serif); color: var(--on-deep); }
.rating__count { flex-basis: 100%; margin-top: 10px; font: 400 italic 17px/1.3 var(--serif); color: var(--on-deep); }
.rating__form { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.rating__scale { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-width: 0; max-width: 100%; margin: 0; padding: 0; border: 0; }
.rating__legend { width: 100%; margin: 0 0 14px; padding: 0; font: 400 italic 18px/1.3 var(--serif); color: var(--on-deep); text-align: center; }
.rating__opt { position: relative; }
.rating__input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.rating__num {
    display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid rgb(238 238 234 / 0.32); border-radius: 50%;
    font: 500 22px/1 var(--serif); font-variant-numeric: lining-nums; color: var(--paper); cursor: pointer; transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.rating__opt:hover .rating__num { border-color: var(--yellow); }
.rating__opt.is-mine .rating__num { border: 2px solid var(--yellow); font-style: italic; }
.rating__input:checked + .rating__num { background: var(--yellow); border-color: var(--yellow); color: var(--ink); font-weight: 700; font-style: normal; }
.rating__input:focus-visible + .rating__num { outline: 3px solid var(--paper); outline-offset: 4px; }
.rating__submit { cursor: pointer; background: var(--yellow); color: var(--ink); }
.rating__submit:hover { background: var(--paper); }

.comments {
    max-width: 860px; margin: 64px auto 0; padding: clamp(28px, 5vw, 60px) clamp(20px, 6vw, 72px);
    background: linear-gradient(var(--paper-2), var(--paper) 40px); color: var(--ink); border-radius: 3px;
    box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.45);
}
.comments :focus-visible { outline-color: var(--field); }
.comments__title { margin-bottom: 26px; text-align: center; }
.comments__count { font-style: italic; color: var(--field); }
.comments__list { margin: 0 0 40px; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.comment { padding: 22px 0; border-bottom: 1px solid #cfd1c9; }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 8px; font-size: 14px; color: var(--soft); }
.comment__author { font: 500 italic 21px/1.2 var(--serif); color: var(--ink); }
.comment__body { font: 400 18px/1.6 var(--serif); color: #2a3530; overflow-wrap: anywhere; }
.comments__empty { margin: 0 0 36px; font: 400 italic 18px/1.5 var(--serif); color: var(--soft); text-align: center; }
.comment-form { display: grid; gap: 18px; padding-top: 28px; border-top: 1px solid var(--ink); }
.comments__list + .comment-form { padding-top: 0; border-top: 0; }
.comment-form__field { display: grid; gap: 6px; margin: 0; }
.comment-form__label { font: 400 italic 18px/1.3 var(--serif); color: var(--ink); }
.comment-form__input, .comment-form__text {
    width: 100%; padding: 12px 14px; border: 0; border-bottom: 2px solid var(--ink); border-radius: 3px 3px 0 0;
    background: #fbfbf8; color: var(--ink); font: 400 17px/1.5 var(--sans); transition: border-color 200ms ease, box-shadow 200ms ease;
}
.comment-form__input { max-width: 380px; }
.comment-form__text { min-height: 140px; resize: vertical; }
.comment-form__input:focus, .comment-form__text:focus { outline: none; border-bottom-color: var(--green); box-shadow: 0 0 0 3px var(--field); }
.comment-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 6px 0 0; }
.comment-form__submit { cursor: pointer; }
.comment-form__note { font: 400 italic 15px/1.4 var(--serif); color: var(--soft); }
@media (max-width: 760px) {
    .rating__num { width: 48px; height: 48px; font-size: 20px; }
    .rating__scale { max-width: 300px; }
}

/* the visitor's own (final) vote, shown instead of the scale */
.rating__mine { margin: 0; line-height: 1.5; }
.rating__mine-score { font-size: 1.6em; font-weight: 700; }
