/* Inbox Studio: the 2-minute animated walkthrough, opened from "See how it works". */
.tour { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px;
        background: rgba(5, 4, 10, 0.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-family: Inter, system-ui, sans-serif; color: #F4F2FA; }
.tour[hidden] { display: none; }
.tour-box { width: min(1040px, 100%); display: flex; flex-direction: column; gap: 12px; }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-top h2 { margin: 0; font: 600 18px Sora, Inter, sans-serif; }
.tour-close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #3A3556; background: #13111F; color: #F4F2FA; font-size: 22px; cursor: pointer; }
.tour-close:hover { border-color: #FF6B84; }

.tour-wrap { position: relative; width: 100%; border-radius: 18px; overflow: hidden; border: 1px solid #2B2742; background: #0B0915;
             box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6); }
.tour-stage { position: absolute; left: 0; top: 0; width: 960px; height: 540px; transform-origin: 0 0; overflow: hidden;
              background: radial-gradient(ellipse at 85% 0%, rgba(139, 31, 143, 0.32), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(210, 28, 54, 0.18), transparent 55%), #0B0915; }
.tour-chip { position: absolute; left: 28px; top: 22px; z-index: 5; display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px;
             background: rgba(23, 20, 42, 0.9); border: 1px solid #2E2A45; font-size: 13px; color: #D9D5EA; }
.tour-chip b { color: #FF8FA3; }
.tour-sample { position: absolute; right: 24px; top: 24px; z-index: 5; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #8A85A0; }

.tour-caption { min-height: 52px; font-size: 16px; line-height: 1.55; color: #D9D5EA; padding: 0 4px; }
.tour-controls { display: flex; align-items: center; gap: 14px; }
.tour-play { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; display: grid; place-items: center;
             background: linear-gradient(120deg, #D21C36, #8B1F8F 60%, #6B1B83); box-shadow: 0 8px 24px rgba(210, 28, 54, 0.35); }
.tour-bar { flex: 1; display: flex; gap: 4px; height: 26px; align-items: center; }
.tour-seg { position: relative; height: 6px; border-radius: 3px; background: #2A2640; cursor: pointer; border: 0; padding: 0; overflow: hidden; }
.tour-seg:hover { background: #3A3556; }
.tour-seg span { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, #FF5C78, #C774FF); }
.tour-time { flex: none; font-size: 13px; color: #A39FB8; font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
.tour-chapters { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: #8A85A0; }
.tour-chapters button { background: none; border: 0; padding: 4px 0; color: inherit; font: inherit; cursor: pointer; }
.tour-chapters button[aria-current="true"] { color: #FF8FA3; }

/* Scenes */
.tscene { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.tscene.on { opacity: 1; visibility: visible; }
.tscene .an { animation: none; }
.tscene.run .an { animation: var(--a); }
.tour.paused .tscene * { animation-play-state: paused !important; }
.tcard { position: absolute; background: #13111F; border: 1px solid #2B2742; border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); }
.tbig { position: absolute; font: 700 44px/1.08 Sora, Inter, sans-serif; letter-spacing: -0.02em; }
.tgrad { background: linear-gradient(100deg, #FF5C78, #C774FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tsub { position: absolute; font-size: 18px; color: #B7B2CC; line-height: 1.5; }
.tlabel { font-size: 12px; color: #A39FB8; margin-bottom: 6px; }
.tfield { height: 40px; border-radius: 10px; border: 1px solid #3A3556; background: #0E0C18; display: flex; align-items: center; padding: 0 12px; font-size: 15px; margin-bottom: 14px; }
.ttype { display: inline-block; white-space: nowrap; }
.tbtn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; color: #fff;
        background: linear-gradient(120deg, #D21C36, #8B1F8F 60%, #6B1B83); }
.tpill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.tpill.warm { color: #FFC266; background: rgba(255, 181, 71, 0.13); }
.tpill.ready { color: #4ADE9B; background: rgba(52, 211, 153, 0.13); }
.trow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #221F35; font-size: 14px; }
.trow small { display: block; color: #A39FB8; font-size: 12px; }
.tbar { height: 8px; border-radius: 4px; background: #221F35; overflow: hidden; }
.tbar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #5B8CFF, #A77BFF 40%, #FFB547 75%, #FF4D6D); }
.ttoast { position: absolute; padding: 10px 14px; border-radius: 12px; background: #181530; border: 1px solid #332E52; font-size: 13px; display: flex; gap: 10px; align-items: center; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); }
.tdot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 10px #34D399; }
.tnum { font: 700 30px Sora, Inter, sans-serif; font-variant-numeric: tabular-nums; }

/* Scene 1: the problem */
.tfolder { display: flex; justify-content: space-between; padding: 12px 16px; border-radius: 10px; font-size: 15px; margin: 6px 0; background: #17142A; }
.tfolder.spam { color: #FF8FA3; }
.tmail { position: absolute; left: 24px; right: 24px; padding: 12px 14px; border-radius: 12px; background: #1E1A33; border: 1px solid #3A3556; font-size: 13px; }

/* Scene 3: network */
.tnode { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.tnode.you { background: linear-gradient(135deg, #D21C36, #6B1B83); box-shadow: 0 0 24px rgba(210, 28, 54, 0.5); }
.tnode.net { background: #2A2445; border: 1px solid #4B3F7A; color: #C9C5DA; }
.tfly { position: absolute; left: 0; top: 0; width: 18px; height: 13px; margin: -6px 0 0 -9px; border-radius: 3px; background: #F4F2FA; opacity: 0;
        box-shadow: 0 0 12px rgba(255, 255, 255, 0.6); }
.tfly::after { content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 6px; border-left: 1.5px solid #6B1B83; border-bottom: 1.5px solid #6B1B83; transform: skewY(25deg); }
.tlegend { position: absolute; display: flex; gap: 16px; font-size: 12px; color: #A39FB8; }
.tlegend span { display: inline-flex; align-items: center; gap: 6px; }
.tlegend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* Scene 4: AI content */
.tsubject { padding: 10px 12px; border-radius: 10px; background: #17142A; border: 1px solid #2B2742; font-size: 14px; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 10px; }
.ttick { color: #4ADE9B; font-weight: 700; }
.temail { position: absolute; border-radius: 14px; overflow: hidden; background: #0D0A14; border: 1px solid #2B2238; font-family: Poppins, Inter, sans-serif; }
.tstamp { position: absolute; padding: 8px 16px; border: 3px solid #4ADE9B; color: #4ADE9B; border-radius: 10px; font: 800 22px Sora, Inter, sans-serif; letter-spacing: 0.06em; transform: rotate(-12deg); }

/* Scene 6: tracking */
.ttile { position: absolute; width: 160px; padding: 14px; border-radius: 14px; background: #13111F; border: 1px solid #2B2742; }
.ttile span { font-size: 12px; color: #A39FB8; }
.tfeed { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #221F35; font-size: 13.5px; }
.tfeed b { flex: none; width: 92px; font-weight: 600; }
.theat { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.theat i { height: 22px; border-radius: 4px; background: #E0284B; opacity: 0.07; }

/* Keyframes */
@keyframes tFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes tFadeOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }
@keyframes tPop { 0% { opacity: 0; transform: scale(0.8); } 70% { opacity: 1; transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }
@keyframes tType { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes tPress { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 92, 120, 0); } 40% { transform: scale(0.94); } 60% { box-shadow: 0 0 0 10px rgba(255, 92, 120, 0.25); } }
@keyframes tGrow { from { width: 0; } to { width: var(--w); } }
@keyframes tDrop { 0% { opacity: 0; transform: translateY(-150px); } 25% { opacity: 1; } 100% { opacity: 1; transform: translateY(0); } }
@keyframes tFlashRed { 0%, 100% { background: #17142A; } 50% { background: rgba(255, 77, 109, 0.35); } }
@keyframes tRescue { 0% { transform: translateY(0); } 100% { transform: translateY(-58px); } }
@keyframes tFly { 0% { opacity: 0; transform: translate(var(--x1), var(--y1)) scale(0.6); } 15% { opacity: 1; } 85% { opacity: 1; }
                  100% { opacity: 0; transform: translate(var(--x2), var(--y2)) scale(1); } }
@keyframes tGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } 50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.25); } }
@keyframes tHeat { from { opacity: 0.07; } to { opacity: var(--o); } }
@keyframes tStamp { 0% { opacity: 0; transform: rotate(-12deg) scale(1.8); } 100% { opacity: 1; transform: rotate(-12deg) scale(1); } }
@keyframes tSend { 0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }

@media (prefers-reduced-motion: reduce) {
  .tscene.run .an { animation-duration: 0.01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
  .tfly { display: none; }
}
@media (max-width: 640px) { .tour { padding: 10px; } .tour-caption { font-size: 14.5px; } .tour-chapters { display: none; } }
