/* AI Twin "try it" page (/temp/features/ai-twin/try): the page the QR code on the AI Twin page opens. Mobile first:
   one column, a dark phone-camera viewfinder (no camera access), the lines to read on a card, and a pulsing record button
   that plays a short demo (twin-try.js sets data-state: ready, rec, done). Same burgundy and rose as the AI Twin page. */
.rb-twt-page { background: #101116; color: #f3f1f2; }
.twt { --rose: #f2a7b8; --wine: #8e1b3a; --ink: #1b1d24; display: grid; gap: 22px; width: min(100% - 32px, 460px); margin: 0 auto; padding: 22px 0 48px; font-family: "DM Sans", system-ui, sans-serif; }
.twt *, .twt *::before, .twt *::after { box-sizing: border-box; }
.twt :where(h1, h2, p) { margin: 0; }
.twt h1, .twt h2, .twt-brand { font-family: "Space Grotesk", sans-serif; font-weight: 700; letter-spacing: -0.015em; }
.twt-head { display: grid; gap: 10px; }
.twt-brand { display: flex; align-items: center; gap: 8px; color: var(--rose); font-size: 17px; }
.twt-brand svg { width: 26px; height: 23px; }
.twt h1 { color: #fff; font-size: clamp(28px, 8vw, 36px); line-height: 1.06; text-wrap: balance; }
.twt-sub { color: #c9c3c7; font-size: 17px; line-height: 1.45; }

/* The viewfinder */
.twt-cam { display: grid; gap: 16px; }
.twt-view { position: relative; overflow: hidden; aspect-ratio: 9 / 14; border-radius: 24px; background: radial-gradient(ellipse 70% 55% at 50% 58%, #3a3f4b 0%, #1d2027 62%, #111317 100%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 50px -20px rgba(0, 0, 0, .8); }
.twt-view::before { content: ""; position: absolute; inset: 14px; border-radius: 14px; background:
  linear-gradient(#fff, #fff) left top / 22px 2px no-repeat, linear-gradient(#fff, #fff) left top / 2px 22px no-repeat,
  linear-gradient(#fff, #fff) right top / 22px 2px no-repeat, linear-gradient(#fff, #fff) right top / 2px 22px no-repeat,
  linear-gradient(#fff, #fff) left bottom / 22px 2px no-repeat, linear-gradient(#fff, #fff) left bottom / 2px 22px no-repeat,
  linear-gradient(#fff, #fff) right bottom / 22px 2px no-repeat, linear-gradient(#fff, #fff) right bottom / 2px 22px no-repeat; opacity: .55; pointer-events: none; }
.twt-top { position: absolute; z-index: 3; top: 24px; left: 26px; right: 26px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; }
.twt-rec { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); letter-spacing: .04em; opacity: .45; }
.twt-rec i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; }
.twt-rec b { font-variant-numeric: tabular-nums; }
.twt-front { color: #b9bcc4; }
.twt-card { position: absolute; z-index: 3; top: 62px; left: 22px; right: 22px; display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px; background: rgba(8, 9, 12, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.twt-card small { color: var(--rose); font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.twt-line { color: #fff; font-size: 17px; font-weight: 600; line-height: 1.35; transition: opacity .3s ease, color .3s ease; }
.twt-line em { color: var(--rose); font-style: normal; }
.twt-oval { position: absolute; z-index: 1; left: 50%; bottom: 9%; display: grid; place-items: center; width: 42%; aspect-ratio: 3 / 4; border: 2.5px dashed rgba(255, 255, 255, .55); border-radius: 50%; transform: translateX(-50%); }
.twt-oval span { max-width: 70%; color: #d9dbe0; font-size: 14px; font-weight: 700; text-align: center; }
.twt-wave { position: absolute; z-index: 3; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; align-items: center; gap: 4px; height: 26px; opacity: 0; }
.twt-wave i { width: 4px; height: 45%; border-radius: 2px; background: #fff; }
.twt-wave i:nth-child(3n) { height: 95%; }
.twt-wave i:nth-child(4n+1) { height: 70%; }
.twt-done { position: absolute; z-index: 4; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; background: #131419; text-align: center; opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s ease; }
.twt-done__tick { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #22c55e; color: #fff; }
.twt-done__tick svg { width: 34px; height: 34px; }
.twt-done b { color: #fff; font: 700 24px/1.15 "Space Grotesk", sans-serif; }
.twt-done span { max-width: 300px; color: #d6d2d5; font-size: 16px; line-height: 1.45; }

/* Record button */
.twt-controls { display: grid; justify-items: center; gap: 10px; }
.twt-shutter { position: relative; display: grid; place-items: center; width: 84px; height: 84px; padding: 0; border: 5px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.twt-shutter i { width: 62px; height: 62px; border-radius: 50%; background: #ff3b30; transition: width .25s ease, height .25s ease, border-radius .25s ease; }
.twt-shutter::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 3px solid rgba(255, 59, 48, .7); animation: twt-pulse 1.8s ease-out infinite; pointer-events: none; }
@keyframes twt-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.twt-shutter:focus-visible { outline: 3px solid var(--rose); outline-offset: 6px; }
.twt-hint { color: #c9c3c7; font-size: 15px; font-weight: 700; }

/* Demo states */
.twt-cam[data-state="rec"] .twt-rec { opacity: 1; }
.twt-cam[data-state="rec"] .twt-rec i { animation: twt-blink 1s steps(2, jump-none) infinite; }
@keyframes twt-blink { 50% { opacity: .2; } }
.twt-cam[data-state="rec"] .twt-line { opacity: .45; }
.twt-cam[data-state="rec"] .twt-line.is-now { opacity: 1; color: #fff; }
.twt-cam[data-state="rec"] .twt-wave { opacity: 1; }
.twt-cam[data-state="rec"] .twt-wave i { animation: twt-wave .45s ease-in-out infinite alternate; }
.twt-wave i:nth-child(2n) { animation-delay: -.22s !important; }
.twt-wave i:nth-child(3n) { animation-delay: -.12s !important; }
@keyframes twt-wave { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.twt-cam[data-state="rec"] .twt-shutter i { width: 30px; height: 30px; border-radius: 7px; }
.twt-cam:not([data-state="ready"]) .twt-shutter::after { animation: none; opacity: 0; }
.twt-cam[data-state="done"] .twt-done { opacity: 1; visibility: visible; }

/* Next steps */
.twt-next { display: grid; gap: 12px; padding: 22px 20px; border-radius: 20px; background: linear-gradient(160deg, #33161f 0%, #1e0f15 100%); box-shadow: 0 0 0 1px rgba(242, 167, 184, .15); }
.twt-next h2 { color: #fff; font-size: 24px; line-height: 1.15; }
.twt-next p { color: #e2d7db; font-size: 16px; line-height: 1.5; }
.twt-actions { display: grid; gap: 10px; margin-top: 4px; }
.twt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 22px; border: 1px solid transparent; border-radius: 12px; background: var(--rose); color: var(--ink); font: 700 17px/1.1 "DM Sans", sans-serif; text-decoration: none; }
.twt-btn svg { width: 18px; height: 18px; }
.twt-btn:hover { color: var(--ink); background: #f7c0cd; }
.twt-btn--ghost { border-color: rgba(255, 255, 255, .45); background: transparent; color: #fff; }
.twt-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.twt-btn:focus-visible, .twt-back:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
.twt-back { justify-self: center; margin-top: 4px; color: var(--rose); font-size: 15px; font-weight: 700; }

@media (min-width: 700px) {
  .twt { padding-top: 36px; }
  .twt-actions { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .twt-shutter::after, .twt-rec i, .twt-wave i { animation: none !important; }
  .twt-done, .twt-line, .twt-shutter i { transition: none !important; }
}
