/* A visitor's preview, before they sign up (templates/preview.html, preview.js). The page is the app's own: style.css
   draws its header, board and answer, profile.css the report. This adds the cards round them (the box for a name, the
   wait, the sign-up) and the form the front page shares (.pvform: landing.css places it there). Only the look's tokens. */

body.pv main { max-width: 75rem; display: grid; gap: 28px; padding-bottom: 48px; }
/* signing in is for those with an account: quiet, so the page's own button stands out */
body.pv header .pv-signin { padding: 6px 14px; background: var(--ctl-bg); color: var(--text); border: 1px solid var(--ctl-line); box-shadow: none; }
body.pv #profile, body.pv #drill { scroll-margin-top: 16px; }
/* the drill sits in a page that scrolls, under the report: a board as big as the screen would hide its own words */
body.pv #drill { --bs: min(calc(100vh - 200px), calc(100vw - 32px - var(--cg)), 560px); }
@media (min-width: 900px) { body.pv #drill { --bs: min(calc(100vh - 160px), 560px); } }
body.pv #drill aside { align-self: center; }
body.pv #pv-prompt { font-weight: 600; margin: 6px 0 10px; }

.pv-card {
  max-width: 44rem; width: 100%; margin: 0 auto; padding: clamp(20px, 4vw, 36px);
  background: var(--card-bg); border: 1px solid var(--card-line); border-radius: var(--card-radius);
  box-shadow: var(--card-shadow); backdrop-filter: var(--card-blur);
}
.pv-card h2 { font: var(--display-weight) clamp(1.625rem, 4vw, 2.25rem)/1.12 var(--font-display); margin: 0 0 10px; }
.pv-lede { font-size: 1.0625rem; margin: 0 0 18px; }
.pv-problem { margin: 0 0 14px; padding: 10px 14px; border-left: 4px solid var(--c2); border-radius: 8px; background: var(--ctl-bg); font-weight: 600; }
.pv-problem a { margin-left: 4px; }
.pv-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 8px; }
.pv-big { padding: 12px 22px; font-size: 1.125rem; }

/* the box for a name: where they play, the name, the button */
.pvform { display: grid; gap: 10px; }
.pvform-sites { display: inline-flex; gap: 6px; padding: 4px; width: fit-content; border: 1px solid var(--ctl-line); border-radius: 999px; background: var(--ctl-bg); }
.pvform-site { position: relative; cursor: pointer; }
.pvform-site input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pvform-site span { display: block; padding: 6px 16px; border-radius: 999px; font-weight: var(--ctl-weight); color: var(--muted); transition: background 0.15s, color 0.15s; }
.pvform-site input:checked + span { background: var(--accent); color: var(--on-accent); }
.pvform-site input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pvform-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pvform-row input[type="text"] {
  flex: 1 1 14rem; min-width: 0; padding: 12px 14px; font: inherit; font-size: 1.0625rem; color: var(--text);
  background: var(--ctl-bg); border: 1px solid var(--ctl-line); border-radius: var(--ctl-radius);
}
.pvform-row input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pvform-row button { flex: 0 0 auto; padding: 12px 20px; font-size: 1.0625rem; cursor: pointer; }
.pvform .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) { .pvform-row button { flex: 1 1 100%; } }

/* waiting: the mark breathes, and the three steps light up as they pass */
.pv-wait { text-align: center; }
.pv-knight img { filter: drop-shadow(0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent)); }
.pv-steps { list-style: none; display: grid; gap: 8px; margin: 18px auto; padding: 0; max-width: 24rem; text-align: left; }
.pv-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--ctl-line); border-radius: var(--ctl-radius); color: var(--muted); transition: color 0.2s, border-color 0.2s, background 0.2s; }
.pv-steps .num { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid currentColor; font-weight: 700; font-size: 0.875rem; }
.pv-steps li.on { color: var(--text); border-color: var(--accent); background: var(--ctl-bg); }
.pv-steps li.on .num { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.pv-steps li.done { color: var(--win); }
.pv-steps li.done .num { background: var(--win); color: var(--on-accent); border-color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .pv-knight img { animation: pv-breathe 2.4s ease-in-out infinite; }
  .pv-steps li.on .num { animation: pv-pulse 1.2s ease-in-out infinite; }
}
@keyframes pv-breathe { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes pv-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }

/* keeping it: the sign-up, which steps forward once they've tried their drills */
.pv-keep { text-align: center; transition: box-shadow 0.4s, border-color 0.4s; }
.pv-keep.wall { border-color: var(--accent); box-shadow: var(--card-shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.pv-keep .pv-actions { justify-content: center; }
.pv-gets { list-style: none; margin: 14px auto; padding: 0; max-width: 32rem; display: grid; gap: 8px; text-align: left; }
.pv-gets li { position: relative; padding-left: 28px; }
.pv-gets li::before { content: "✓"; position: absolute; left: 4px; color: var(--win); font-weight: 700; }
.pv-providers { max-width: 22rem; margin: 0 auto; }  /* the other sites' buttons: sitebtn.css */
.pv-fine { margin-top: 14px; }
.pv-none { text-align: center; }
.pv-none .pv-actions { justify-content: center; }
