/* Synacl walkthrough — a Supademo-style step-through, progressively enhanced over an <ol> of
   figures that scripts/gen-landing-docs.js bakes from landing/assets/demos/<slug>/steps.json.
   Self-contained: every colour token has a fallback, so it renders identically inside the
   docs.css pages and inside landing/index.html (which does not load docs.css). Light-only. */
.wt {
  --wt-iris: var(--iris, #6F5FC3); --wt-night: var(--night, #1E1B2A); --wt-hair: var(--hairline, #E4E2DD);
  --wt-ink: var(--ink, #34302B); --wt-soft: var(--ink-soft, #6B655C); --wt-faint: var(--ink-faint, #9A938A);
  --wt-card: var(--card, #FFFFFF); --wt-r: 14px;
  margin: 28px 0 32px;
}
.wt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.wt-eyebrow { font-family: 'Space Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--wt-faint); }
.wt-hint { font-size: 12.5px; color: var(--wt-faint); display: none; }
.wt-on .wt-hint { display: inline; }

/* ── fallback list: what crawlers, readers without JS and the printed page see ── */
.wt-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.wt-step figure { margin: 0; background: var(--wt-card); border: 1px solid var(--wt-hair); border-radius: var(--wt-r); overflow: hidden; }
.wt-step img { display: block; width: 100%; height: auto; border-radius: 0; }
.wt-step figcaption { padding: 12px 16px; font-size: 14.5px; color: var(--wt-soft); line-height: 1.5; }
.wt-step figcaption b { color: var(--wt-ink); font-weight: 600; display: block; margin-bottom: 2px; }
.wt-on .wt-steps { display: none; }

/* ── stage (built by walkthrough.js) ── */
.wt-stage { background: var(--wt-card); border: 1px solid var(--wt-hair); border-radius: var(--wt-r); overflow: hidden; outline: none; }
.wt-stage:focus-visible { box-shadow: 0 0 0 3px rgba(111, 95, 195, .35); }
.wt-viewport { position: relative; overflow: hidden; background: #EFEDF7; cursor: pointer; aspect-ratio: var(--wt-ar, 16 / 10); }
.wt-canvas { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.wt-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.wt-frame.is-on { opacity: 1; }
.wt-hot { position: absolute; border: 2px solid var(--wt-iris); border-radius: 8px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 4px rgba(111, 95, 195, .22), 0 0 0 9999px rgba(30, 27, 42, .10);
  transition: opacity .35s ease .25s, left .4s ease, top .4s ease, width .4s ease, height .4s ease; }
.wt-hot.is-on { opacity: 1; }
.wt-hot::after { content: ''; position: absolute; inset: -6px; border-radius: 12px; border: 2px solid var(--wt-iris); opacity: .6; animation: wt-pulse 1.6s ease-out infinite; }
@keyframes wt-pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(1.12); opacity: 0; } }
.wt-cap { padding: 14px 18px 4px; min-height: 78px; }
.wt-cap b { display: block; font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 600; color: var(--wt-night); font-size: 15.5px; margin-bottom: 3px; }
.wt-cap span { font-size: 14.5px; color: var(--wt-soft); line-height: 1.5; }
.wt-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 12px; }
.wt-btn { appearance: none; border: 1px solid var(--wt-hair); background: var(--wt-card); color: var(--wt-ink); width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; font: inherit; flex: none; }
.wt-btn:hover { border-color: var(--wt-iris); color: var(--wt-iris); }
.wt-btn:disabled { opacity: .35; cursor: default; }
.wt-btn svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.wt-dots { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: wrap; }
.wt-dot { appearance: none; border: 0; padding: 0; width: 22px; height: 6px; border-radius: 3px; background: var(--wt-hair); cursor: pointer; position: relative; overflow: hidden; }
.wt-dot.is-done { background: rgba(111, 95, 195, .45); }
.wt-dot.is-on { background: rgba(111, 95, 195, .25); }
.wt-dot.is-on::after { content: ''; position: absolute; inset: 0; background: var(--wt-iris); transform-origin: left; transform: scaleX(0); }
.wt-playing .wt-dot.is-on::after { animation: wt-fill var(--wt-dwell, 4.5s) linear forwards; }
@keyframes wt-fill { to { transform: scaleX(1); } }
.wt-count { font-family: 'Space Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--wt-faint); min-width: 44px; text-align: center; }

/* ── video facade: a local poster + a real link; the iframe is injected only on click ── */
.wt-video { position: relative; margin: 22px 0 8px; border-radius: var(--wt-r); overflow: hidden; background: var(--wt-night); aspect-ratio: 16 / 9; }
.wt-video a { position: absolute; inset: 0; display: block; color: #fff; text-decoration: none; }
.wt-video img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.wt-video .wt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 12px;
  background: rgba(30, 27, 42, .82); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 10px 20px 10px 12px;
  font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 600; font-size: 15px; white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.wt-video .wt-play i { width: 34px; height: 34px; border-radius: 50%; background: var(--wt-iris); display: inline-grid; place-items: center; flex: none; }
.wt-video .wt-play i::after { content: ''; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; margin-left: 3px; }
.wt-video a:hover .wt-play { background: rgba(30, 27, 42, .95); }
.wt-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wt-video-note { font-size: 12.5px; color: var(--wt-faint); margin: 0 0 26px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .wt-canvas, .wt-frame, .wt-hot { transition: none; }
  .wt-hot::after { animation: none; }
  .wt-playing .wt-dot.is-on::after { animation: none; transform: scaleX(1); }
}
@media (max-width: 560px) {
  .wt-cap { padding: 12px 14px 2px; min-height: 0; }
  .wt-cap span { font-size: 13.5px; }
  .wt-dots { gap: 4px; }
  .wt-dot { width: 12px; }
  .wt-count { display: none; }
}
