/* A four-scene product walkthrough. The illustration is not a live login form. */
.demo-stage.tour { height: 626px; }
.tour-visual { position: relative; height: 532px; }
.tour .article-window { top: 16px; height: 445px; transition: opacity .45s, transform .6s; }
.tour .tour-popup { top: 22px; height: 500px; min-height: 0; overflow: hidden; transition: opacity .35s, transform .5s; }
.tour-scene { display: none; }
.tour[data-step="0"] .tour-connect, .tour[data-step="1"] .tour-code, .tour[data-step="2"] .tour-save { display: block; animation: tour-appear .4s ease both; }
.tour-connect { padding-top: 20px; }
.tour-mark { width: 44px; height: 49px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; margin-bottom: 18px; color: var(--accent); }
.tour-mark svg { width: 23px; height: 28px; }
.tour-connect .eyebrow, .tour-code .eyebrow { font-size: 7px; letter-spacing: 1.2px; }
.tour-connect > h3 { font-size: 28px; letter-spacing: -.9px; line-height: 1.12; margin: 10px 0 12px; }
.tour-connect > p:not(.tour-private) { font-size: 10px; line-height: 1.7; color: var(--muted); }
.tour-action { display: flex; justify-content: center; align-items: center; position: relative; gap: 7px; min-height: 43px; width: 100%; border-radius: 9px; background: var(--button); color: var(--button-ink); font-size: 11px; font-weight: 550; transition: opacity .2s, transform .2s, box-shadow .2s; }
.connect-action { margin-top: 23px; }
.connect-action > svg { width: 15px; height: 15px; position: absolute; right: 13px; }
.tour-helper { text-align: center; margin-top: 15px; font-size: 9px; line-height: 1.8; color: var(--muted); }
.tour-connect > .tour-helper { font-size: 9px !important; }
.tour-private { display: flex; gap: 5px; justify-content: center; align-items: center; font-size: 7px; letter-spacing: .4px; margin-top: 18px; color: var(--muted); }
.tour-private svg { width: 10px; height: 10px; }
.tour-code { text-align: center; }
.tour-back { display: block; text-align: left; font-size: 17px; color: var(--muted); padding-top: 14px; margin-bottom: 35px; }
.tour-code > h3 { font-size: 24px; letter-spacing: -.6px; margin-top: 12px; }
.tour-code > p { font-size: 10px; line-height: 1.7; color: var(--muted); margin-top: 12px; }
.entry-code { display: flex; justify-content: center; gap: 7px; margin: 25px 0 23px; }
.entry-code > span { width: 43px; height: 49px; display: grid; place-items: center; border: 1px solid transparent; background: var(--surface); border-radius: 14px; font-size: 24px; font-weight: 550; transition: border-color .2s; }
.entry-code i { font-style: normal; opacity: 0; transform: translateY(5px); transition: opacity .15s, transform .15s; }
.tour[data-digits="0"] .entry-code span:nth-child(1), .tour[data-digits="1"] .entry-code span:nth-child(2), .tour[data-digits="2"] .entry-code span:nth-child(3), .tour[data-digits="3"] .entry-code span:nth-child(4) { border-color: var(--muted); }
.tour[data-digits="1"] .entry-code span:nth-child(-n+1) i, .tour[data-digits="2"] .entry-code span:nth-child(-n+2) i, .tour[data-digits="3"] .entry-code span:nth-child(-n+3) i, .tour[data-digits="4"] .entry-code i { opacity: 1; transform: none; }
.code-action { opacity: .42; }
.tour[data-digits="4"] .code-action { opacity: 1; }
.tour-code .code-new { font-size: 9px; margin-top: 13px; }
.tour-code .tour-helper { margin-top: 28px; font-size: 9px; }
.tour-save .popup-cover { height: 90px; }
.tour-save .popup-title { font-size: 17px; }
.tour-save .popup-space { font-size: 10px; color: var(--muted); }
.illustrated-space { color: var(--ink); }
.tour-note { height: 44px; border-radius: 7px; background: var(--surface); padding: 9px; font-size: 10px; line-height: 1.5; overflow: hidden; }
.tour-note i { display: inline-block; width: 1px; height: 11px; background: var(--ink); vertical-align: middle; margin-left: 2px; opacity: 0; }
.tour[data-beat="typing"] .tour-note i { opacity: 1; animation: caret .8s steps(1) infinite; }
.save-action { margin-top: 13px; }
.save-action > svg { width: 14px; height: 17px; }
.save-action > kbd { color: inherit; position: absolute; right: 9px; padding: 1px 4px; opacity: .55; border-color: currentColor; }
.permission-window, .grant-window { position: absolute; z-index: 3; opacity: 0; pointer-events: none; transform: translateY(12px) scale(.97); transition: opacity .3s, transform .4s cubic-bezier(.22,1,.36,1); }
.permission-window { left: 8px; top: 215px; width: 290px; padding: 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.permission-browser { display: block; font-size: 9px; color: var(--muted); margin-bottom: 12px; }
.permission-window > strong { display: block; font-size: 13px; font-weight: 600; }
.permission-window > p { font-size: 10px; line-height: 1.6; color: var(--muted); margin-top: 8px; max-width: 240px; }
.permission-allow { display: block; width: max-content; padding: 8px 16px; border-radius: 7px; margin: 15px 0 0 auto; color: var(--button-ink); background: var(--button); font-size: 10px; }
.tour[data-step="0"][data-beat="permission"] .permission-window, .tour[data-step="0"][data-beat="allow"] .permission-window { opacity: 1; transform: none; }
.grant-window { top: 334px; left: 0; width: 315px; padding: 16px 18px 22px; border-radius: 17px; background: #fff; color: #292929; box-shadow: 0 18px 48px #0002, 0 2px 6px #0001; text-align: center; }
.grant-app { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 9px; color: #777; margin-bottom: 9px; }
.grant-app img, .anytype-brand img { display: block; width: 20px; height: 20px; object-fit: contain; }
.anytype-brand { display: flex; align-items: center; gap: 6px; }
.grant-window h3 { font-size: 16px; line-height: 1.3; letter-spacing: -.3px; }
.grant-window > p { font-size: 10px; line-height: 1.6; margin-top: 8px; }
.grant-code { display: flex; justify-content: center; gap: 6px; margin-top: 19px; }
.grant-code span { display: grid; place-items: center; width: 37px; height: 48px; background: #f3f3f3; border-radius: 11px; font-size: 27px; font-weight: 700; }
.tour[data-step="1"] .grant-window { opacity: 1; transform: none; }
.tour[data-step="1"][data-beat="confirm"] .grant-window { opacity: 0; transform: translateY(8px); }
.tour-cursor { position: absolute; z-index: 4; width: 22px; height: 26px; right: 69px; top: 373px; fill: var(--ink); stroke: var(--paper); stroke-width: 1.5; opacity: 0; filter: drop-shadow(0 2px 3px #0003); transition: opacity .2s, transform .3s, top .5s, right .5s; }
.tour[data-beat="connect"] .tour-cursor { opacity: 1; transform: translate(-10px,-8px); }
.tour[data-beat="connect"] .connect-action, .tour[data-beat="confirm"] .code-action, .tour[data-beat="save"] .save-action { opacity: .75; transform: scale(.985); }
.tour[data-beat="allow"] .tour-cursor { opacity: 1; right: calc(100% - 256px); top: 352px; transform: translate(-5px,-4px); }
.tour[data-beat="allow"] .permission-allow { opacity: .7; }
.tour[data-beat="confirm"] .tour-cursor { opacity: 1; top: 335px; right: 57px; }
.tour[data-beat="save"] .tour-cursor { opacity: 1; top: 453px; right: 46px; }
.tour[data-step="3"] .article-window { opacity: 0; transform: translateY(10px) rotate(-3deg); }
.tour[data-step="3"] .tour-popup { opacity: 0; transform: translate(18px,10px) scale(.96); }
.anytype-window { position: absolute; top: 71px; left: 0; width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; min-height: 366px; box-shadow: var(--shadow); opacity: 0; transform: translateY(15px); transition: opacity .5s, transform .5s; pointer-events: none; }
.tour[data-step="3"] .anytype-window { opacity: 1; transform: none; }
.anytype-bar { height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 0 17px; font-size: 10px; }
.anytype-bar > span:nth-child(2) { font-weight: 650; letter-spacing: -.3px; }
.anytype-bar > span:last-child { color: var(--muted); font-size: 9px; }
.anytype-content { padding: 25px 23px; }
.anytype-content > h3 { font-size: 24px; display: flex; gap: 8px; align-items: center; margin-bottom: 28px; }
.anytype-content h3 svg { width: 22px; height: 27px; }
.collection-columns { display: grid; grid-template-columns: 1fr 85px; font-size: 9px; color: var(--muted); padding: 9px 4px; border-bottom: 1px solid var(--line); }
.collection-row { display: flex; align-items: center; gap: 8px; padding: 13px 4px; border-bottom: 1px solid var(--line); background: var(--surface); }
.collection-row svg { width: 13px; height: 17px; }
.collection-row strong { font-size: 11px; font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collection-row > span { font-size: 10px; width: 85px; flex: none; }
.collection-note { padding: 20px 5px; }
.collection-note > span { font-size: 8px; color: var(--muted); }
.collection-note > p { font-size: 11px; margin-top: 7px; }
.collection-saved { color: var(--muted); font-size: 9px; display: flex; align-items: center; gap: 6px; margin-top: 13px; }
.collection-saved svg { width: 15px; height: 15px; color: var(--accent); }
.tour[data-step="3"] .collection-row { animation: bookmark-arrive .55s .3s both; }
.tour-toolbar { display: flex; align-items: center; gap: 2px; min-height: 36px; }
.tour-caption { font-size: 10px; line-height: 1.5; color: var(--muted); flex: 1; padding-right: 7px; }
.tour-toggle, .tour-restart { display: grid; place-items: center; width: 32px; height: 36px; background: none; border-radius: 6px; color: var(--muted); flex: none; }
.tour-toggle:hover, .tour-restart:hover { color: var(--ink); background: var(--surface); }
.tour-toggle svg, .tour-restart svg { width: 15px; height: 15px; }
.tour-toggle .play-icon { fill: currentColor; stroke: none; }
.tour-toggle .pause-icon { stroke-width: 2; }
.tour[data-playing="true"] .play-icon, .tour:not([data-playing="true"]) .pause-icon { display: none; }
.tour-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tour-steps > button { background: none; color: var(--muted); position: relative; text-align: left; font-size: 10px; min-height: 42px; padding: 8px 0 13px; white-space: nowrap; }
.tour-steps > button > span { font-size: 8px; margin-right: 5px; color: var(--muted); }
.tour-steps > button[aria-current] { color: var(--ink); }
.tour-steps > button[aria-current] > span { color: var(--accent); }
.tour-steps progress { appearance: none; border: 0; display: block; position: absolute; bottom: 4px; height: 2px; width: 100%; background: var(--line); border-radius: 2px; overflow: hidden; color: var(--accent); }
.tour-steps progress::-webkit-progress-bar { background: var(--line); }
.tour-steps progress::-webkit-progress-value { background: var(--accent); }
.tour-steps progress::-moz-progress-bar { background: var(--accent); }
.tour-disclaimer { text-align: center; color: var(--muted); font-size: 8px; line-height: 1.5; margin-top: 9px; }
.tour[data-running="false"] .tour-scene, .tour[data-running="false"] .collection-row, .tour[data-running="false"] .tour-note i { animation-play-state: paused; }
/* Paused/manual scenes must be readable; entrance effects are decorative. */
.tour[data-running="false"] .tour-scene, .tour[data-running="false"] .collection-row { animation: none; }
@keyframes tour-appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes bookmark-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes caret { 50% { opacity: 0; } }
@media (max-width: 1100px) {
  .grant-window { width: 290px; }
  .tour-steps { gap: 7px; }
  .tour-steps > button { font-size: 9px; }
  .tour-steps > button > span { margin-right: 3px; }
  .anytype-content { padding-inline: 17px; }
}
@media (max-width: 850px) {
  .tour-caption { font-size: 9px; }
  .tour-steps > button { font-size: 8px; }
  .tour-steps > button > span { display: none; }
  .grant-window { width: 280px; left: -5px; }
  .permission-window { left: -5px; width: 275px; }
  .tour-connect > h3 { font-size: 26px; }
  .tour-code > p { font-size: 9px; }
  .collection-columns { grid-template-columns: 1fr 65px; }
  .collection-row > span { width: 65px; font-size: 9px; }
}
@media (max-width: 680px) {
  .demo-stage.tour { height: 639px; }
  .tour-visual { height: 535px; }
  .tour .tour-popup { top: 22px; }
  .grant-window { left: 0; width: min(300px, 100%); }
  .permission-window { left: 0; width: min(290px, 100%); }
  .tour-steps > button { font-size: 9px; }
  .tour-steps > button > span { display: inline; font-size: 7px; }
  .tour-caption { font-size: 9px; }
  .tour-disclaimer { font-size: 7px; }
  .anytype-content { padding-inline: 15px; }
  .collection-row strong { font-size: 10px; }
  .tour-connect > h3 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .tour *, .tour *::before, .tour *::after { animation: none !important; transition: none !important; }
}
