/* demo-review-widgets.css — the hero demo's own furniture (render.mjs's landingDemo,
 * static/demo-review-widgets.js's tour). The kit draws the stage, the fit box and the cursor
 * (landing.css, packages/ui/DESIGN.md "Product demos"); everything below is this product's own
 * simplified browser window, snippet card and widget slot. Classes read by the tour: is-pasted,
 * is-dark, is-badge, is-open (on .rwd-stage), is-placed (on .rwd-snippet), is-shown (on
 * .rwd-look), and the `hidden` attribute (on .rwd-slot__empty) - never anything the tour adds and
 * this sheet does not draw a state for. */

.rwd-stage {
  width: 1160px;
  height: 700px;
  color: var(--c-ink);
}
::where(.rwd-stage) svg { width: 14px; height: 14px; flex: none; }

/* ── the snippet card: the owner's own copy-paste source ─────────────────────────────────── */
.rwd-snippet {
  position: absolute;
  z-index: 2;
  left: 70px;
  top: 0;
  width: 460px;
  border-radius: 10px;
  background: var(--c-surface);
  box-shadow: var(--lp-demo-shadow);
  transform: rotate(-1.5deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
  overflow: hidden;
}
.rwd-snippet__bar { display: flex; gap: 5px; height: 26px; align-items: center; padding: 0 10px; background: var(--c-surface-2); }
.rwd-snippet__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-line-strong); }
.rwd-snippet__code {
  margin: 0;
  padding: 12px 14px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--c-ink-muted);
  white-space: pre-wrap;
  word-break: break-all;
}
/* Once "pasted", the card settles back and dims - it has done its job. */
.rwd-stage.is-pasted .rwd-snippet,
.rwd-snippet.is-placed {
  transform: rotate(-1.5deg) scale(0.92) translate(-10px, -6px);
  opacity: 0.55;
}

/* ── the browser window: a plain shop page ────────────────────────────────────────────────── */
.rwd-win {
  position: absolute;
  left: 40px;
  top: 88px;
  width: 1080px;
  height: 572px;
  border: 1px solid var(--c-line-strong);
  border-radius: 14px;
  background: var(--c-canvas);
  box-shadow: var(--lp-demo-shadow);
  overflow: hidden;
}
.rwd-win__chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-surface-2);
}
.rwd-dots { display: flex; gap: 6px; }
.rwd-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c-line-strong); }
.rwd-url {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--c-canvas);
  color: var(--c-ink-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.rwd-url svg { color: var(--c-ok); }

/* The page's own viewport: a `transform` here (not the stage) makes THIS box the containing
 * block for the widget's floating badge and its modal overlay (both `position: fixed` in
 * static/w.js, same as a real host page's own viewport) - escaping the real page's viewport, the
 * same trap the kit's own ghost elements avoid by living inside the scaled stage, is exactly what
 * would happen here without it. `overflow: hidden` then keeps both confined to this mock window,
 * never spilling past its rounded corners onto the rest of the landing page. */
.rwd-page {
  position: relative;
  transform: translateZ(0);
  overflow: hidden;
  height: calc(100% - 44px);
  padding: 28px;
}

/* A plain shop page's own content - decorative only, never a feature of this product. */
.rwd-shop { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--c-line); }
.rwd-shop__img { flex: none; width: 64px; height: 56px; border-radius: 8px; background: var(--c-surface-2); }
.rwd-shop__lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.rwd-shop__lines span { display: block; height: 10px; border-radius: 5px; background: var(--c-surface-2); }
.rwd-shop__lines span:first-child { width: 55%; }
.rwd-shop__lines span:last-child { width: 30%; }
.rwd-shop__cta { flex: none; width: 96px; height: 30px; border-radius: 8px; background: var(--c-accent); opacity: 0.85; }

/* ── the widget slot: where the owner pasted the snippet ──────────────────────────────────── */
.rwd-slot { position: relative; min-height: 300px; }
.rwd-slot__empty {
  position: absolute;
  inset: 0;
  border: 2px dashed var(--c-line-strong);
  border-radius: 12px;
}
.rwd-host {
  display: block;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.rwd-stage.is-pasted .rwd-host { opacity: 1; transform: none; }

/* ── the Look panel: a simplified recreation of the editor's own Look section, the same
 * autosave-on-change interaction, never a real <select> (DESIGN.md: "a real <select> cannot be
 * animated open") - two theme swatches and two accent dots, nothing the real editor lacks. ── */
.rwd-look {
  position: absolute;
  right: 28px;
  top: 28px;
  z-index: 3;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--c-surface);
  box-shadow: var(--lp-demo-shadow);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.rwd-look.is-shown { opacity: 1; transform: none; }
.rwd-swatch, .rwd-look__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--c-line-strong);
  padding: 0;
  cursor: default;
}
.rwd-swatch--light { background: #fff; }
.rwd-swatch--dark { background: #1b1b1b; }
.rwd-look__dot { background: var(--rwd-dot); border-color: transparent; }

/* ── the tour's own beats, read off .rwd-stage's classes ──────────────────────────────────── */
.rwd-stage.is-dark .rwd-win { background: #15151a; }
.rwd-stage.is-dark .rwd-win__chrome { background: #1d1d23; border-color: #2c2c33; }
.rwd-stage.is-dark .rwd-url { background: #15151a; color: #9a9aa3; }
.rwd-stage.is-dark .rwd-shop__img,
.rwd-stage.is-dark .rwd-shop__lines span { background: #26262d; }
.rwd-stage.is-dark .rwd-shop { border-color: #2c2c33; }
.rwd-stage.is-dark .rwd-slot__empty { border-color: #35353d; }

/* The "who uses it" block inside the how-it-works band (render.mjs howBand, task #4304): a gap above its heading
 * and one above the plans sentence; the kit's own band, card and lead classes do everything else. */
.rw-uses { margin-top: 4rem; }
.rw-uses__plans { margin: 2rem auto 0; text-align: center; }

/* ── The pictures on the landing's cards (src/render.mjs FEATURE_VIZ, STEP_VIZ, PRIVACY_VIZ) ────────────────────
   Each is a miniature of its own feature or step, in the product's tokens (accent, dark and light follow). */
.lp-viz--scene { height: 8.25rem; }
.rwv { direction: ltr; color: var(--c-ink); font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.6875rem; display: flex; align-items: center; justify-content: center; gap: 0.8rem; position: relative; }
.rwv, .rwv * { box-sizing: border-box; }
.rwv i, .rwv u, .rwv b, .rwv em, .rwv s { font-style: normal; text-decoration: none; }
.rwv i, .rwv u { display: block; }
.rwv em { color: var(--c-accent); letter-spacing: 1px; }
.rwv em > s { color: var(--c-line-strong); }

/* the same reviews in each layout in turn */
.rwv-layouts { width: 10rem; height: 5rem; }
.rwv-layouts > div { position: absolute; inset: 0; display: grid; gap: 5px; opacity: 0; animation: rwv-layout 8s infinite; }
.rwv-layouts > div:nth-child(2) { animation-delay: -6s; } .rwv-layouts > div:nth-child(3) { animation-delay: -4s; } .rwv-layouts > div:nth-child(4) { animation-delay: -2s; }
@keyframes rwv-layout { 0%, 22% { opacity: 1; transform: none; } 25%, 97% { opacity: 0; transform: scale(0.96); } 100% { opacity: 0; } }
.rwv-layouts i { border-radius: 6px; background: var(--c-surface); border: 1px solid var(--c-line-strong); position: relative; }
.rwv-layouts i::after { content: ''; position: absolute; left: 6px; top: 6px; width: 45%; height: 4px; border-radius: 2px; background: var(--c-accent); }
.rwv-layouts__a { grid-template-columns: repeat(3, 1fr); align-items: center; }
.rwv-layouts__a > i { height: 3.4rem; } .rwv-layouts__a > i:nth-child(2) { height: 4.2rem; border-color: var(--c-accent); }
.rwv-layouts__b { grid-template-columns: 1fr 1fr; }
.rwv-layouts__c { grid-template-columns: 1fr; }
.rwv-layouts__d { place-content: center; grid-auto-flow: column; align-items: center; gap: 8px !important; }
.rwv-layouts__d > b { font-size: 1.25rem; font-weight: 700; } .rwv-layouts__d > em { font-size: 0.875rem; }
.rwv-layouts__d { }
.rwv-layouts__d::before { content: ''; position: absolute; left: 12%; right: 12%; top: 22%; bottom: 22%; border-radius: 999px; background: var(--c-surface); border: 1px solid var(--c-accent); z-index: -1; }

/* a minimum of four stars: the low ones drop out, one is pinned */
.rwv-filter { flex-direction: column; gap: 4px; width: 10.5rem; align-items: stretch; }
.rwv-filter > span { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 9px; border-radius: 7px; background: var(--c-surface); border: 1px solid var(--c-line); }
.rwv-filter > span > u { flex: 1; height: 4px; border-radius: 2px; background: var(--c-line-strong); }
.rwv-filter > span.is-low { animation: rwv-drop 6s infinite; }
@keyframes rwv-drop { 0%, 25% { opacity: 1; } 38%, 88% { opacity: 0.22; } 100% { opacity: 1; } }
.rwv-filter > span.is-pinned { border-color: var(--c-accent); }
.rwv-filter > span.is-pinned > i { width: 9px; height: 9px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 6px 0 -3px var(--c-accent); animation: rwv-pin 6s infinite; }
@keyframes rwv-pin { 0%, 25% { transform: translateY(-6px); opacity: 0; } 34%, 100% { transform: none; opacity: 1; } }

/* one review card wearing the site's look in turn */
.rwv-fit__card { width: 8.6rem; padding: 11px 12px; display: grid; gap: 6px; background: var(--c-surface); border: 1px solid var(--c-line-strong); border-radius: 4px; animation: rwv-wear 9s infinite; position: relative; }
.rwv-fit__card > u { height: 4px; border-radius: 2px; background: currentColor; opacity: 0.45; } .rwv-fit__card > u:nth-of-type(2) { width: 62%; }
.rwv-fit__card > b { position: absolute; top: 8px; inset-inline-end: 10px; font-size: 0.9375rem; font-weight: 700; font-family: var(--font-sans, system-ui, sans-serif); animation: rwv-font 9s infinite; }
@keyframes rwv-wear { 0%, 30% { border-radius: 4px; background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line-strong); } 34%, 63% { border-radius: 16px; background: var(--c-ink); color: var(--c-surface); border-color: var(--c-ink); } 67%, 96% { border-radius: 9px 9px 9px 0; background: color-mix(in srgb, var(--c-accent) 18%, var(--c-surface)); color: var(--c-ink); border-color: var(--c-accent); } 100% { border-radius: 4px; background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line-strong); } }
@keyframes rwv-font { 0%, 30% { font-family: var(--font-sans, system-ui, sans-serif); } 34%, 63% { font-family: Georgia, 'Times New Roman', serif; } 67%, 100% { font-family: var(--font-mono, ui-monospace, monospace); } }

/* a source is plugged in */
.rwv-connect { gap: 0; }
.rwv-connect__src { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-ink); display: grid; place-items: center; font-weight: 700; font-size: 1rem; }
.rwv-connect__wire { width: 3.2rem; height: 2px; background: var(--c-line-strong); position: relative; }
.rwv-connect__wire > i { position: absolute; left: 0; top: 0; height: 2px; background: var(--c-accent); animation: rwv-wire 5s infinite; }
@keyframes rwv-wire { 0%, 10% { width: 0; } 40%, 100% { width: 100%; } }
.rwv-connect__box { padding: 9px 10px; border-radius: 9px; background: var(--c-surface); border: 1px solid var(--c-line-strong); animation: rwv-live 5s infinite; }
.rwv-connect__box > em { display: block; clip-path: inset(0 100% 0 0); animation: rwv-fillstars 5s infinite; font-size: 0.875rem; }
@keyframes rwv-live { 0%, 40% { border-color: var(--c-line-strong); } 46%, 100% { border-color: var(--c-accent); } }
@keyframes rwv-fillstars { 0%, 42% { clip-path: inset(0 100% 0 0); } 70%, 100% { clip-path: inset(0 0 0 0); } }

/* layout, colour, font: three choices */
.rwv-style { flex-direction: column; gap: 7px; }
.rwv-style__row { display: flex; gap: 7px; }
.rwv-style__row > * { width: 2rem; height: 1.45rem; border-radius: 6px; background: var(--c-surface); border: 1px solid var(--c-line-strong); display: grid; place-items: center; font-weight: 700; animation: rwv-choose 6s infinite; }
.rwv-style__row > :nth-child(2) { animation-delay: 2s; } .rwv-style__row > :nth-child(3) { animation-delay: 4s; }
@keyframes rwv-choose { 0%, 30% { box-shadow: 0 0 0 2px var(--c-accent); } 34%, 100% { box-shadow: none; } }
.rwv-style__row:not(.is-colour):not(.is-font) > i { position: relative; }
.rwv-style__row:not(.is-colour):not(.is-font) > i::after { content: ''; position: absolute; inset: 4px; background: var(--c-line-strong); border-radius: 2px; }
.rwv-style__row:not(.is-colour):not(.is-font) > i:nth-child(2)::after { inset: 4px 4px 4px 55%; box-shadow: -11px 0 0 var(--c-line-strong); }
.rwv-style__row:not(.is-colour):not(.is-font) > i:nth-child(3)::after { inset: 4px 4px 60% 4px; box-shadow: 0 8px 0 var(--c-line-strong); }
.rwv-style__row.is-colour > i:nth-child(1) { background: var(--c-accent); } .rwv-style__row.is-colour > i:nth-child(2) { background: var(--c-ink); } .rwv-style__row.is-colour > i:nth-child(3) { background: color-mix(in srgb, var(--c-accent) 35%, var(--c-surface)); }
.rwv-style__row.is-font > b:nth-child(1) { font-family: var(--font-sans, system-ui, sans-serif); } .rwv-style__row.is-font > b:nth-child(2) { font-family: Georgia, serif; }

/* one line pasted, and the reviews are on the page */
.rwv-paste { flex-direction: column; gap: 9px; width: 10rem; align-items: stretch; }
.rwv-paste__code { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 7px; background: var(--c-ink); color: var(--c-surface); }
.rwv-paste__code > b { font-weight: 700; }
.rwv-paste__code > u { height: 4px; border-radius: 2px; background: var(--c-surface); width: 0; animation: rwv-type 5s steps(8) infinite; }
@keyframes rwv-type { 0%, 5% { width: 0; } 35%, 100% { width: 60%; } }
.rwv-paste__out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.rwv-paste__out > i { height: 2rem; border-radius: 6px; background: var(--c-surface); border: 1px solid var(--c-accent); position: relative; opacity: 0; animation: rwv-appear 5s infinite; }
.rwv-paste__out > i::after { content: ''; position: absolute; left: 6px; top: 6px; width: 50%; height: 4px; border-radius: 2px; background: var(--c-accent); }
.rwv-paste__out > i:nth-child(2) { animation-delay: 0.25s; } .rwv-paste__out > i:nth-child(3) { animation-delay: 0.5s; }
@keyframes rwv-appear { 0%, 40% { opacity: 0; transform: translateY(6px); } 50%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* no cookie is set */
.rwv-cookie__c { position: relative; width: 3.3rem; height: 3.3rem; border-radius: 50%; background: color-mix(in srgb, var(--c-accent) 22%, var(--c-surface)); border: 2px solid var(--c-ink); }
.rwv-cookie__c > i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--c-ink); }
.rwv-cookie__c > i:nth-child(1) { left: 26%; top: 28%; } .rwv-cookie__c > i:nth-child(2) { left: 58%; top: 44%; } .rwv-cookie__c > i:nth-child(3) { left: 32%; top: 62%; }
.rwv-cookie__c::after { content: ''; position: absolute; left: -8px; right: -8px; top: 50%; height: 3px; margin-top: -1.5px; background: var(--c-ink); border-radius: 2px; transform: rotate(-45deg) scaleX(0); animation: rwv-strike 4.5s infinite; box-shadow: 0 0 0 2px var(--lp-tile, var(--c-surface-2)); }
@keyframes rwv-strike { 0%, 18% { transform: rotate(-45deg) scaleX(0); } 36%, 100% { transform: rotate(-45deg) scaleX(1); } }
.rwv-cookie > b { font-size: 1.6rem; font-weight: 700; padding: 0 0.6rem; border-radius: 8px; background: var(--c-surface); border: 1px solid var(--c-line-strong); line-height: 2.3rem; }

/* the page talks to one address and no other */
.rwv-one { gap: 0; }
.rwv-one__page { width: 2.6rem; height: 3.3rem; border-radius: 6px; background: var(--c-surface); border: 2px solid var(--c-ink); position: relative; }
.rwv-one__page::after { content: ''; position: absolute; left: 6px; right: 6px; top: 8px; height: 4px; border-radius: 2px; background: var(--c-line-strong); box-shadow: 0 8px 0 var(--c-line-strong), 0 16px 0 var(--c-line-strong); }
.rwv-one__wires { width: 3.4rem; height: 3.3rem; display: grid; align-content: space-between; }
.rwv-one__wires > i { height: 2px; background: var(--c-line-strong); opacity: 0.4; }
.rwv-one__wires > i:nth-child(2) { opacity: 1; background: linear-gradient(90deg, var(--c-accent) 50%, transparent 0) 0 0 / 12px 2px; animation: rwv-flow 0.9s linear infinite; }
@keyframes rwv-flow { to { background-position: 12px 0; } }
.rwv-one__hosts { height: 3.9rem; display: grid; align-content: space-between; }
.rwv-one__hosts > b { width: 16px; height: 16px; border-radius: 4px; border: 2px dashed var(--c-line-strong); display: block; }
.rwv-one__hosts > b.is-ours { border: 0; background: var(--c-accent); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-accent) 25%, transparent); }

/* nothing about the visitor is read: the eye is struck through */
.rwv-blind__eye { position: relative; width: 3.8rem; height: 2.7rem; display: grid; place-items: center; }
.rwv-blind__eye::before { content: ''; width: 2.3rem; height: 2.3rem; border-radius: 78% 12%; border: 2px solid var(--c-ink); background: var(--c-surface); transform: rotate(45deg); }
.rwv-blind__eye > i { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--c-ink); }
.rwv-blind__eye::after { content: ''; position: absolute; left: -6px; right: -6px; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--c-accent); transform: rotate(-28deg) scaleX(0); box-shadow: 0 0 0 2px var(--lp-tile, var(--c-surface-2)); animation: rwv-noeye 4.5s infinite; }
@keyframes rwv-noeye { 0%, 18% { transform: rotate(-28deg) scaleX(0); } 36%, 100% { transform: rotate(-28deg) scaleX(1); } }
.rwv-blind__who { position: relative; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-accent); overflow: hidden; }
.rwv-blind__who::before { content: ''; position: absolute; left: 50%; top: 20%; width: 34%; height: 34%; margin-left: -17%; border-radius: 50%; background: var(--c-ink); }
.rwv-blind__who::after { content: ''; position: absolute; left: 16%; right: 16%; top: 62%; height: 60%; border-radius: 50% 50% 0 0; background: var(--c-ink); }
