/*
 * Catalog style "demo9" — rating + comments add-on (loaded instead of _rate.css when
 * index.php?style=demo9 is shown). Mirrors /demo9/ like demo9.css.
 */
/* rating + comments: museum labels in the charcoal room — the score on a mat-white plaque, the visitors' book beneath */
.post__stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; margin: 0 0 8px; color: var(--soft); font-size: 13px; }
.post__rating { font-family: var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.post__rating-avg { font-size: 17px; }
.post__rating-max { margin-left: 1px; color: var(--soft); }
.post__comments { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post__comments:hover { color: var(--ink); text-decoration-color: var(--brand); }

.post--full .post__flash { grid-column: 2; grid-row: 4; margin: 40px 0 0; }
.post--full .rating { grid-column: 2; grid-row: 5; }
.post--full .comments { grid-column: 2; grid-row: 6; }
.post--full .post__shot { grid-row: 2 / span 5; }
.post--full .post__nav { grid-row: 7; }
.post__flash { padding: 18px 24px; font-family: var(--sans); font-size: 16px; line-height: 1.5; }
.notice--ok { color: var(--ink); border-left: 4px solid var(--brand); }

.rating { margin-top: clamp(48px, 6vw, 80px); padding: clamp(24px, 3vw, 40px); background: var(--mat); color: var(--ink); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7); }
.rating :focus-visible { outline-color: var(--brand); }
.rating__title, .comments__title { margin: 0 0 14px; font-family: var(--serif); font-weight: 300; font-variation-settings: "opsz" 72; font-size: clamp(30px, 2.8vw, 44px); line-height: 1.05; letter-spacing: -0.015em; }
.rating__score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--stone-2); }
.rating__avg { font-family: var(--serif); font-weight: 300; font-variation-settings: "opsz" 72; font-size: clamp(76px, 7vw, 112px); line-height: 0.85; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rating__max { font-family: var(--serif); font-size: 24px; color: var(--soft); }
.rating__count { margin-left: auto; color: var(--soft); font-size: 14px; }
.rating__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 20px; }
.rating__scale { display: grid; grid-template-columns: repeat(10, minmax(40px, 1fr)); gap: 4px; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; }
.rating__legend { margin-bottom: 10px; padding: 0; color: var(--soft); font-size: 14px; }
.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; height: 52px; background: var(--stone); color: var(--ink);
    font-family: var(--serif); font-size: 22px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background 300ms var(--ease), color 300ms var(--ease);
}
.rating__opt:hover .rating__num { background: var(--stone-2); }
.rating__opt.is-mine .rating__num { box-shadow: inset 0 -3px 0 var(--brand); }
.rating__input:checked + .rating__num { background: var(--green); color: var(--green-ink); box-shadow: inset 0 -4px 0 var(--yellow); }
.rating__input:focus-visible + .rating__num { outline: 3px solid var(--ink); outline-offset: 3px; }
.rating__submit { padding: 0 28px; border: 0; border-radius: 999px; background: var(--ink); color: var(--mat); text-decoration: none; cursor: pointer; }
.catalog--post .rating__submit:hover { background: var(--brand); color: #fff; }

.comments { margin-top: clamp(48px, 6vw, 80px); padding-top: 16px; border-top: 1px solid rgb(230 229 227 / 0.2); }
.comments__count { font-family: var(--sans); font-size: 0.4em; font-weight: 500; vertical-align: super; color: var(--charcoal-soft); }
.comments__list { margin: 0 0 40px; padding: 0; list-style: none; }
.comment { padding: 18px 0 20px; border-bottom: 1px solid rgb(230 229 227 / 0.16); }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 6px; color: var(--charcoal-soft); font-size: 13px; }
.comment__author { font-family: var(--serif); font-size: 20px; color: var(--charcoal-ink); }
.comment__body { overflow-wrap: anywhere; white-space: pre-line; font-size: 16px; line-height: 1.6; }
.comments__empty { margin: 0 0 32px; font-family: var(--serif); font-size: 20px; color: var(--charcoal-soft); }
.comment-form { display: grid; gap: 18px; padding: clamp(22px, 3vw, 36px); background: var(--mat); color: var(--ink); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7); }
.comment-form :focus-visible { outline-color: var(--brand); }
.comment-form__field { display: grid; gap: 6px; margin: 0; }
.comment-form__label { font-family: var(--serif); font-size: 19px; }
.comment-form__input, .comment-form__text {
    width: 100%; padding: 11px 14px; border: 1px solid #a9a39a; border-radius: 0; background: #fff; color: var(--ink); font: 400 16px/1.5 var(--sans);
    transition: border-color 200ms ease;
}
.comment-form__input { max-width: 360px; min-height: 48px; }
.comment-form__text { min-height: 130px; resize: vertical; }
.comment-form__input:hover, .comment-form__text:hover { border-color: var(--ink); }
.comment-form__input:focus, .comment-form__text:focus { border-color: var(--ink); outline: 2px solid var(--brand); outline-offset: 2px; }
.comment-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0; }
.comment-form__submit { border: 0; cursor: pointer; }
.catalog--post .comment-form .btn--primary { background: var(--ink); color: var(--mat); }
.catalog--post .comment-form .btn--primary:hover { background: var(--brand); color: #fff; }
.comment-form__note { color: var(--soft); font-size: 13px; }
@media (max-width: 1100px) {
    .post--full .post__flash, .post--full .rating, .post--full .comments, .post--full .post__shot, .post--full .post__nav { grid-column: 1; grid-row: auto; }
}
@media (max-width: 520px) {
    .rating__scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .rating__num { height: 48px; }
    .rating__count { flex-basis: 100%; margin-left: 0; }
    .rating__submit, .comment-form__submit { flex: 1 0 100%; justify-content: center; }
}
.post--card .post__stats { margin-top: -4px; }

/* 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; }
