/* The guided tour (/try/): layout around the replicas (assets/try/try.js,
   drawn in the apps' frame by assets/frame/).
   Every selector is .try-* / .tour* / .tr-* scoped. The replicas live in
   shadow roots and carry their own CSS. Small text on white uses #0f6f55
   (6:1), not the brand green (4.3:1). */
.try-hero { padding: 18px 0 8px; }
.try-hero .lead { max-width: 780px; margin-top: 14px; }
.try-hero .lead b { color: var(--ink); }

.try-tour { padding: 26px 0 96px; background: linear-gradient(180deg, var(--bg) 0, var(--bg-soft) 140px); scroll-margin-top: 72px; }
.try-tour .wrap { max-width: 1280px; }
.tour-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; align-items: start; }

.tour-rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 92px; }
.tour-rail a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; color: var(--ink-2); text-decoration: none; transition: background .2s, border-color .2s, box-shadow .2s; }
.tour-rail a:hover { background: var(--surface, #fff); border-color: var(--line); }
.tour-rail a:focus-visible { outline: 2px solid #0b57d0; outline-offset: 2px; }
.tour-rail a[aria-current] { background: var(--surface, #fff); border-color: var(--green); box-shadow: 0 8px 20px -10px rgba(28,162,126,.45); }
.tr-n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong, #b9c9c3); display: grid; place-items: center; font: 600 .74rem/1 var(--ff-mono); color: var(--muted); flex: none; background: var(--surface, #fff); }
.tour-rail a.is-done .tr-n { background: var(--green-soft, #e6f5ef); border-color: #1ca27e; color: var(--accent-text, #0f6f55); }
.tour-rail a[aria-current] .tr-n { background: #178669; border-color: #178669; color: #fff; }
.tr-ic { width: 28px; height: 28px; border-radius: 7px; flex: none; display: block; }
.tr-ic-end { display: grid; place-items: center; background: var(--green-soft, #e6f5ef); color: var(--accent-text, #0f6f55); }
.tr-ic-end svg { width: 18px; height: 18px; }
.tr-t { min-width: 0; }
.tr-t b { display: block; font-family: var(--ff-display); font-size: .92rem; font-weight: 600; color: var(--ink); line-height: 1.25; white-space: nowrap; }
.tr-t i { display: block; font-style: normal; font-size: .8rem; color: var(--muted); line-height: 1.3; }

.tour-main { min-width: 0; }
.tour-step[hidden] { display: none; }
.tour-kick { display: inline-block; font: 600 .74rem/1.2 var(--ff-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text, #0f6f55); }
.tour-cap h2 { font-size: clamp(1.4rem, 2.4vw, 1.95rem); margin: 10px 0 10px; line-height: 1.15; }
.tour-cap h2:focus { outline: none; }
.tour-cap h2:focus-visible { outline: 2px solid #0b57d0; outline-offset: 4px; border-radius: 4px; }
.tour-cap p { color: var(--ink-2); font-size: 1.02rem; line-height: 1.6; max-width: 780px; }
.tour-fig { margin: 20px 0 0; }
/* on a desktop the replica is sized so caption, replica, hint and Back/Next fit one screen */
@media (min-width: 901px) { .tour-main { max-width: max(560px, calc((100vh - 400px) * 1.6)); } }
.tour-rep { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 24px 50px -24px rgba(13,23,20,.28), 0 4px 14px rgba(13,23,20,.06);
  background: linear-gradient(90deg, #0f1a17 0, #0f1a17 5%, #eef3f1 5%, #eef3f1 22%, #f5f8f7 22%); }
/* live: the replica is the apps' frame (assets/frame/frame.js) and sizes itself — 16:10 on a desktop, the phone layout on a phone */
.tour-rep.is-live { aspect-ratio: auto; background: #0f1a17; }

.tour-task { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; min-height: 60px;
  background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; transition: border-color .25s, background .25s; }
.tour-task[data-state="gate"] { border-color: #1ca27e; background: var(--green-soft, #f3fbf8); }
.tour-task[data-state="done"] { border-color: #9fd8c6; }
.tour-hint { margin: 0; flex: 1 1 320px; font-size: .97rem; line-height: 1.5; color: var(--ink); }
.tour-hint b { font: 600 .72rem/1 var(--ff-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text, #0f6f55); margin-right: 6px; }
.tour-task-b { display: flex; gap: 8px; flex: none; }
.tour-task-b .btn[hidden] { display: none; }

.tour-nav { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-nav .btn[hidden] { display: none; }
.tour-nav .btn:disabled { opacity: .45; cursor: default; transform: none; }
.tour-count { font: 600 .82rem/1 var(--ff-mono); color: var(--muted); }
.tour-nav .btn-primary { background: #178669; }
.tour-nav .btn-primary:hover { background: #127058; }
.tour-nav .btn.is-ready { animation: tr-ready 1.8s ease-in-out infinite; }
@keyframes tr-ready { 0%, 100% { box-shadow: 0 6px 18px rgba(28,162,126,.28), 0 0 0 0 rgba(28,162,126,.45); } 50% { box-shadow: 0 6px 18px rgba(28,162,126,.28), 0 0 0 8px rgba(28,162,126,0); } }

.tour-recap { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.tour-recap li { display: flex; align-items: center; gap: 12px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink-2); line-height: 1.45; }
.tour-recap img { width: 30px; height: 30px; flex: none; border-radius: 8px; }
.tour-cta { margin-top: 22px; background: var(--surface, #fff); border: 1px solid var(--line-strong, #cfe9df); border-radius: 16px; padding: 22px 22px 20px; box-shadow: 0 16px 40px -28px rgba(13,23,20,.35); }
.tour-cta > p:first-child { font-size: 1.05rem; color: var(--ink); max-width: 640px; }
.tour-cta .hero-actions { margin-top: 16px; justify-content: flex-start; }
.tour-cta-fine { font-size: .9rem; color: var(--muted); margin-top: 14px; }
.tour-cta-fine a { color: var(--accent-text, #0f6f55); text-decoration: underline; text-underline-offset: 2px; }

/* no script: every step's caption stays readable as a list */
.try-tour:not(.is-live) .tour-step + .tour-step { margin-top: 36px; }
.try-tour:not(.is-live) .tour-fig { display: none; }

@media (max-width: 900px) {
  .try-tour { padding-top: 14px; }
  .tour-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .tour-rail { margin: 0 -16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tour-rail::-webkit-scrollbar { display: none; }
  .tour-rail ol { flex-direction: row; position: static; padding: 2px 16px 6px; width: max-content; }
  .tour-rail a { padding: 8px 10px; background: rgba(255,255,255,.7); border-color: var(--line); }
  .tr-t i { display: none; }
  .tr-ic { width: 22px; height: 22px; }
  .tr-t b { font-size: .86rem; }
}
@media (max-width: 560px) {
  .tour-count { display: none; }
  .tour-nav .btn { padding-left: 16px; padding-right: 16px; }
  .tour-rep { border-radius: 10px; }
  .tour-cap p { font-size: .98rem; }
  .tour-task { padding: 10px 12px; }
  .tour-task-b { width: 100%; }
  .tour-task-b .btn { flex: 1; justify-content: center; }
  .tour-cta { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-nav .btn.is-ready { animation: none; box-shadow: 0 0 0 3px rgba(28,162,126,.45); }
  .tour-rail a, .tour-task { transition: none; }
}
