/* =====================================================================
   The public review form (Part R, R2). Everything is scoped under rw-* classes; nothing leaks to other pages.
   Same look as "My stats" (stats-v2.css, db-*): the saved site theme arrives as --hv-* tokens on <body> (home-v2.css), so Gold,
   Crimson and Glitch all work. Every radius is calc(N * var(--rw-k)); --rw-k is 1, or 0 in Glitch (square corners).
   ===================================================================== */

.rw-page { --rw-k: 1; --rw-danger: #ff7b72; }
body[data-home-theme="glitch"] .rw-page { --rw-k: 0; }
body:has(.rw-page) { background: var(--hv-bg); }

.rw-page { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; padding: 38px 14px 120px; color: var(--hv-ink); font: 400 14px/1.55 var(--hv-body); }
.rw-page *, .rw-page *::before, .rw-page *::after { box-sizing: border-box; }
.rw-page :where(h1, p, form, fieldset, legend) { margin: 0; padding: 0; }
.rw-page :where(button, input, select, textarea) { font: inherit; color: inherit; }
.rw-page :is(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--hv-acc); outline-offset: 2px; }
.rw-page [hidden] { display: none !important; }

.rw-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rw-sm { font: 700 11px var(--hv-body); letter-spacing: .16em; text-transform: uppercase; color: var(--hv-mut); }
.rw-top { margin-bottom: 18px; }
.rw-title { font: 400 clamp(36px, 5vw, 62px)/.95 var(--hv-disp); text-transform: uppercase; margin-top: 6px; }
.rw-title em { font-style: normal; color: var(--hv-acc); }
body[data-home-theme="glitch"] .rw-title { text-shadow: -2px 0 color-mix(in srgb, var(--hv-acc) 45%, transparent), 2px 0 rgba(255,255,255,.1); }
.rw-lead { color: var(--hv-mut); margin-top: 8px; }
.rw-link { color: var(--hv-ink); text-decoration: underline; text-decoration-color: var(--hv-line); text-underline-offset: 3px; }
.rw-link:hover { color: var(--hv-acc); text-decoration-color: var(--hv-acc); }

/* banners (status = dashed, error = red left edge) */
.rw-banner { display: flex; gap: 10px; align-items: flex-start; border: 1px dashed var(--hv-line); border-radius: calc(14px * var(--rw-k)); padding: 10px 14px; color: var(--hv-mut); margin-bottom: 14px; font-size: 13px; }
.rw-banner i { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--hv-acc); box-shadow: 0 0 10px var(--hv-acc); flex: none; }
.rw-banner--err { border: 0; border-left: 4px solid var(--rw-danger); background: rgba(255,123,114,.08); border-radius: 0 calc(12px * var(--rw-k)) calc(12px * var(--rw-k)) 0; color: var(--hv-ink); }
.rw-banner--err i { background: var(--rw-danger); box-shadow: none; }

/* the card */
.rw-card { border: 1px solid var(--hv-line); border-radius: calc(20px * var(--rw-k)); padding: 22px; background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.015)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.rw-as { color: var(--hv-mut); margin-bottom: 16px; }
.rw-as b { color: var(--hv-ink); }
.rw-field { display: block; border: 0; margin: 0 0 16px; min-width: 0; }
.rw-lbl { display: block; font: 700 11px var(--hv-body); letter-spacing: .14em; text-transform: uppercase; color: var(--hv-mut); margin-bottom: 6px; }
.rw-input { width: 100%; background: var(--hv-card); border: 1px solid var(--hv-line); border-radius: calc(12px * var(--rw-k)); padding: 11px 13px; font-size: 14px; min-height: 40px; }
.rw-input:focus { border-color: var(--hv-acc); }
.rw-input[aria-invalid="true"] { border-color: var(--rw-danger); }
.rw-input option { background: var(--hv-bg2); color: var(--hv-ink); }
.rw-area { resize: vertical; min-height: 130px; line-height: 1.5; }
.rw-help { font-size: 12px; color: var(--hv-mut); margin-top: 6px; }
.rw-err { font-size: 12px; font-weight: 700; color: var(--rw-danger); margin-top: 6px; }
.rw-count { float: right; font-variant-numeric: tabular-nums; }
.rw-count--over { color: var(--rw-danger); font-weight: 700; }
.rw-mt { margin-top: 12px; text-align: center; }

/* stars: the radios come in the order 5 to 1 and are shown reversed, so "later sibling" means "fewer stars" */
.rw-stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rw-stars input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.rw-stars label { cursor: pointer; font-size: 34px; line-height: 1; padding: 2px 3px; color: var(--hv-line); transition: color .15s; }
.rw-stars input:checked ~ label,
.rw-stars label:hover,
.rw-stars label:hover ~ label { color: var(--hv-acc); }
.rw-stars input:focus-visible + label { outline: 2px solid var(--hv-acc); outline-offset: 2px; border-radius: calc(8px * var(--rw-k)); }
.rw-readout { min-height: 18px; font-size: 12px; color: var(--hv-mut); margin-top: 4px; }

/* the honeypot: out of sight for people, still in the page for bots */
.rw-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* buttons */
.rw-btn { border: 1px solid var(--hv-line); background: transparent; border-radius: calc(30px * var(--rw-k)); padding: 9px 18px; font: 700 12px var(--hv-body); cursor: pointer; transition: .2s; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--hv-ink); text-decoration: none; }
.rw-btn:hover { border-color: var(--hv-acc); color: var(--hv-acc); }
.rw-btn--p { background: var(--hv-acc); border-color: var(--hv-acc); color: var(--hv-bg); }
.rw-btn--p:hover { opacity: .9; color: var(--hv-bg); }
.rw-btn--wide { width: 100%; padding: 13px 18px; }

.rw-done { font-size: 16px; line-height: 1.6; margin-bottom: 18px; }

@media (max-width: 560px) {
    .rw-page { padding: 24px 12px 100px; }
    .rw-card { padding: 16px; }
    .rw-stars label { font-size: 38px; }
}
