/* Catalog style "demo45" — rating + comments add-on: the average as the big yellow counter, the scale as a row of serif numerals with a yellow tick, comments as a numbered column. Mirrors /demo45/. */
.post__stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: -4px 0 12px; color: var(--muted); font: 500 11px/1.3 var(--label); letter-spacing: 0.12em; text-transform: uppercase; }
.post__rating { color: var(--white); }
.post__rating-avg { font: 400 26px/1 var(--serif); color: var(--yellow); letter-spacing: 0; }
.post__rating-max { margin-left: 2px; }
.post__comments { text-decoration: none; }
.post__comments:hover { color: var(--white); text-decoration: underline; }

.post__flash { margin: 40px 0 0; }
.notice--ok { border-color: var(--yellow); color: var(--yellow); }

.rating { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 40px; margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--hair); }
.rating__title, .comments__title { margin: 0 0 12px; font: 400 48px/0.95 var(--serif); }
.rating__title { grid-column: 1 / -1; }
.rating__score { display: grid; justify-items: start; align-content: start; gap: 6px; margin: 0; }
.rating__avg { font: 400 128px/0.78 var(--serif); color: var(--yellow); letter-spacing: -0.03em; }
.rating__max { font: 500 12px/1 var(--label); letter-spacing: 0.16em; color: var(--muted); }
.rating__count { color: var(--muted); font: 400 italic 18px/1.2 var(--serif); }
.rating__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; align-self: end; }
.rating__scale { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; border: 0; }
.rating__legend { width: 100%; margin-bottom: 10px; padding: 0; color: var(--muted); font: 500 11px/1.4 var(--label); letter-spacing: 0.14em; text-transform: uppercase; }
.rating__opt { position: relative; }
.rating__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating__num { display: grid; place-items: center; width: 48px; height: 56px; border-bottom: 3px solid var(--hair); font: 400 32px/1 var(--serif); color: var(--muted); cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.rating__opt:hover .rating__num { color: var(--white); border-color: var(--white); }
.rating__input:checked + .rating__num { color: var(--yellow); border-color: var(--yellow); }
.rating__input:focus-visible + .rating__num { outline: 2px solid var(--yellow); outline-offset: 2px; }
.rating__submit { cursor: pointer; font-family: var(--label); }
.rating__mine { margin: 0; align-self: end; line-height: 1.5; }
.rating__mine-score { font: 400 2em/1 var(--serif); color: var(--yellow); }

.comments { margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--hair); }
.comments__count { color: var(--yellow); }
.comments__list { counter-reset: c; display: grid; gap: 0; margin: 0 0 30px; padding: 0; list-style: none; }
.comment { counter-increment: c; display: grid; grid-template-columns: 56px minmax(0, 1fr); padding: 18px 0; border-bottom: 1px solid var(--hair); }
.comment::before { content: counter(c, decimal-leading-zero); grid-row: 1 / span 2; font: 400 30px/1 var(--serif); color: var(--yellow); }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 6px; color: var(--muted); font: 500 11px/1.3 var(--label); letter-spacing: 0.12em; text-transform: uppercase; }
.comment__author { color: var(--white); font: 400 24px/1 var(--serif); letter-spacing: 0; text-transform: none; }
.comment__body { overflow-wrap: anywhere; }
.comments__empty { color: var(--muted); font: 400 italic 22px/1.4 var(--serif); }
.comment-form { display: grid; gap: 16px; padding: 24px; border: 1px solid var(--hair); border-radius: 10px; background: var(--glass); }
.comment-form__field { display: grid; gap: 6px; margin: 0; }
.comment-form__label { font: 500 11px/1.3 var(--label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--yellow); }
.comment-form__input, .comment-form__text { width: 100%; padding: 11px 14px; border: 1px solid var(--hair); border-radius: 6px; background: rgb(0 0 0 / 0.35); color: var(--white); font: inherit; }
.comment-form__input { max-width: 380px; }
.comment-form__text { resize: vertical; min-height: 120px; }
.comment-form__input:focus, .comment-form__text:focus { border-color: var(--yellow); outline: none; box-shadow: 0 0 0 3px rgb(255 181 0 / 0.3); }
.comment-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }
.comment-form__submit { cursor: pointer; font-family: var(--label); }
.comment-form__note { color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
    .rating { grid-template-columns: 1fr; }
    .rating__num { width: 40px; }
}
