/* Web rating (bet 1108-1, 2026-11-08). Loaded by instructor.html and rate.html only.
   Design round (3 rendered variants: masthead line, class slip, studio arch; the class slip won,
   the masthead's sign-in sheet was grafted on): docs/verification/web-rate/README.md.
   The slip is a studio class slip: what you took, a perforation, then your rating. Tokens are the
   site's own (styles.css :root); nothing here forks a hex except the star outline, which needs
   3:1 against white as a control (WCAG 1.4.11), so empty stars are drawn in forest, not --mist. */

.rate-slip[hidden], .rate-done[hidden], .rate-sheet [hidden] { display: none; }
.rate-slip {
  max-width: 460px; margin: 34px auto 0; text-align: left; position: relative;
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow-soft); overflow: hidden;
}
.from-instructor .rate-slip { margin-top: 24px; }
/* The arch already asks for the rating; the slip's question stays only as the stars' accessible name. */
.from-instructor:not(.rated) .rate-q { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.from-instructor:not(.rated) .rate-stars { margin-top: 0; }
.rate-slip-top { padding: 22px 24px 18px; padding-right: 96px; }
.rate-slip-eyebrow {
  font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pine); margin: 0; line-height: 1.4;
}
.rate-slip-meta { font-size: 1rem; color: var(--stone); margin: 6px 0 0; line-height: 1.4; }
.rate-slip-tag {
  position: absolute; top: 20px; right: 20px; font-family: var(--sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: var(--blush);
  padding: 6px 10px; border-radius: 999px;
}
.rate-slip-perf { position: relative; height: 0; margin: 0 22px; border-top: 2px dashed var(--hairline); }
.rate-slip-perf::before, .rate-slip-perf::after {
  content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--cream);
}
.from-instructor .rate-slip-perf::before, .from-instructor .rate-slip-perf::after { background: var(--blush); }
.rate-slip-perf::before { left: -33px; }
.rate-slip-perf::after { right: -33px; }
.rate-slip-body { padding: 18px 24px 24px; }
.rate-q { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--ink); line-height: 1.3; }

.rate-stars { display: flex; gap: 2px; margin: 10px 0 0 -6px; }
.rate-star {
  width: 52px; height: 52px; display: inline-grid; place-items: center; padding: 0; border: 0;
  background: none; border-radius: 12px; cursor: pointer; transition: transform .12s;
}
.rate-star svg { width: 40px; height: 40px; fill: transparent; stroke: var(--pine); stroke-width: 1.5; stroke-linejoin: round; }
.rate-star.on svg { fill: var(--star); stroke: #8A5F17; }
.rate-star:hover { transform: scale(1.08); }
.rate-star:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .rate-star { transition: none; } .rate-star:hover { transform: none; } }
.rate-status:empty { margin: 0; }
.rate-status { margin: 8px 0 0; font-size: 1rem; color: var(--ink); line-height: 1.5; }

.rated .share-panel > .nf-actions { display: none; }
.rate-done { margin-top: 18px; border-top: 1px solid var(--hairline); padding-top: 18px; }
.rate-review label { display: block; font-weight: 600; font-size: 1rem; color: var(--ink); }
.rate-review textarea {
  display: block; width: 100%; box-sizing: border-box; margin-top: 8px; resize: vertical; min-height: 84px;
  font: 400 16px/1.5 var(--sans); color: var(--ink); background: var(--cream);
  border: 1px solid #A39A92; border-radius: 14px; padding: 12px 14px;
}
.rate-review textarea:focus-visible, .rate-sheet input:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
.rate-fine { margin: 6px 0 0; font-size: .92rem; color: var(--stone); }
.rate-secondary, .rate-account button {
  font: 600 1rem var(--sans); color: var(--pine); background: none; border: 0; padding: 10px 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; min-height: 44px;
}
.rate-next { margin: 16px 0 0; font-size: 1rem; color: var(--ink); line-height: 1.5; }
.rate-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 14px; }
.rate-account { margin: 14px 0 0; font-size: .95rem; color: var(--stone); }
.rate-account button { font-size: .95rem; color: var(--stone); font-weight: 500; }

/* Sign-in sheet: same family as the desktop install panel (.qr-panel). The global margin reset pins a
   <dialog> to the top-left corner, so margin:auto is load-bearing. On a phone it rises from the bottom. */
.rate-sheet {
  position: fixed; inset: 0; margin: auto; width: 400px; max-width: calc(100vw - 32px); height: fit-content;
  max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; padding: 40px 28px 24px; border: 0;
  border-radius: 24px; background: var(--card); color: var(--ink); text-align: center;
  box-shadow: 0 30px 80px -24px rgba(43, 36, 34, .45);
}
.rate-sheet::backdrop { background: rgba(43, 36, 34, .42); }
.rate-sheet[open] { animation: rate-sheet-in .18s ease-out; }
@keyframes rate-sheet-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rate-sheet[open] { animation: none; } }
@media (max-width: 520px) {
  .rate-sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 24px 24px 0 0; padding-bottom: 28px; }
}
.rate-sheet-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer;
}
.rate-sheet-close:hover { background: var(--linen); }
.rate-sheet-close:focus-visible, .rate-google:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.rate-sheet-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.2; color: var(--pine); }
.rate-sheet-lede { margin: 8px auto 0; max-width: 30ch; font-size: 1rem; line-height: 1.45; color: var(--stone); }
.rate-sheet-lede:empty { display: none; }
.rate-google {
  display: flex; width: 100%; min-height: 50px; justify-content: center; align-items: center; gap: 10px; margin-top: 22px;
  border-radius: 999px; border: 1px solid #A39A92; background: #fff; font: 600 1rem var(--sans); color: var(--ink); cursor: pointer;
}
.rate-google:hover { background: var(--cream); }
.rate-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; font-size: .95rem; color: var(--stone); }
.rate-or::before, .rate-or::after { content: ""; flex: 1; border-top: 1px solid var(--hairline); }
.rate-email { text-align: left; }
.rate-email label { display: block; font-weight: 600; font-size: 1rem; color: var(--ink); margin-bottom: 8px; }
.rate-sheet input {
  display: block; width: 100%; box-sizing: border-box; font: 400 16px var(--sans); color: var(--ink);
  padding: 13px 16px; border-radius: 14px; border: 1px solid #A39A92; background: var(--cream);
}
.rate-email .btn { width: 100%; justify-content: center; margin-top: 10px; }
.rate-email .btn:disabled { opacity: .7; cursor: wait; }
.rate-sheet-sent { margin: 18px 0 0; font-size: 1.02rem; line-height: 1.5; color: var(--ink); }
.rate-sheet-error { margin: 10px 0 0; font-size: .95rem; color: #9B2C1F; min-height: 0; }
.rate-sheet-error:empty { display: none; }
.rate-sheet-legal { margin: 16px 0 0; font-size: .88rem; line-height: 1.45; color: var(--stone); }
.rate-sheet-legal a { color: var(--pine); text-decoration: underline; text-underline-offset: 2px; }

/* /rate.html: find someone to rate. */
.rate-find { max-width: 640px; margin: 0 auto; padding: clamp(40px, 9vh, 96px) 16px 72px; }
.rate-find h1 { font-size: clamp(2.1rem, 6vw, 3.1rem); font-weight: 500; letter-spacing: -.02em; color: var(--pine); line-height: 1.08; margin: 0; }
.rate-find-lede { color: var(--stone); font-size: 1.06rem; line-height: 1.55; margin: 14px 0 0; max-width: 46ch; }
.rate-search { margin-top: 28px; }
.rate-search label { display: block; font-weight: 600; font-size: 1rem; color: var(--ink); margin-bottom: 8px; }
.rate-search input {
  display: block; width: 100%; box-sizing: border-box; font: 400 16px var(--sans); color: var(--ink);
  padding: 15px 18px; border-radius: 16px; border: 1px solid #A39A92; background: var(--card); box-shadow: var(--shadow-soft);
}
.rate-search input:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
.rate-count { margin: 12px 0 0; font-size: .95rem; color: var(--stone); min-height: 1.4em; }
.rate-results { list-style: none; margin: 8px 0 0; padding: 0; }
.rate-results li + li { border-top: 1px solid var(--hairline); }
.rate-results a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 4px; min-height: 44px;
  color: var(--ink); text-decoration: none;
}
.rate-results a:hover .rate-r-name, .rate-results a:focus-visible .rate-r-name { color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }
.rate-results a:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 8px; }
.rate-r-name { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; line-height: 1.25; }
.rate-r-meta { display: block; font-size: .95rem; color: var(--stone); margin-top: 2px; line-height: 1.4; }
.rate-r-go { flex: none; font-size: .95rem; font-weight: 600; color: var(--pine); }
.rate-find-note { margin: 28px 0 0; font-size: .95rem; color: var(--stone); line-height: 1.5; }
.rate-find-note a { color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }
