/* Try it with your own video, at the top of the landing page
   (templates/core/landing_page/_try_it.html). Colours come from the landing
   page's tokens, so both themes follow. */

.ti { margin-top: -40px; margin-bottom: 72px; text-align: left; }
.ti [hidden] { display: none !important; }

.ti-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 48px;
  padding: 44px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 40px 90px -40px rgba(var(--shadow-ink), 0.45), 0 1px 0 rgba(255, 255, 255, 0.4) inset;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
}
.ti-glow {
  position: absolute;
  inset: -40% -10% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 107, 90, 0.20), rgba(201, 59, 214, 0.10) 55%, transparent);
  z-index: -1;
  pointer-events: none;
}

/* ---------- intro ---------- */
.ti-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand);
}
.ti-title {
  margin-top: 14px;
  font-family: "Outfit", "Geist", sans-serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink);
}
.ti-accent { background: var(--grad-bold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ti-lead { margin-top: 16px; font-size: 16.5px; line-height: 1.6; color: var(--ink-muted); max-width: 30rem; }
.ti-how { margin-top: 26px; display: grid; gap: 12px; list-style: none; padding: 0; }
.ti-how li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.ti-how strong { color: var(--ink); font-weight: 600; }
.ti-how-n {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}

/* ---------- panel and form ---------- */
.ti-panel { align-self: center; }
.ti-state { display: grid; gap: 12px; }

.ti-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1.5px dashed var(--line-strong);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.ti-drop:hover, .ti-drop-over { border-color: var(--ink-faint); transform: translateY(-1px); }
.ti-drop:focus-within { border-color: var(--ink-faint); }
.ti-drop-ok { border-style: solid; border-color: color-mix(in srgb, var(--success) 60%, var(--line)); }
.ti-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ti-drop-icon {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #fff;
  background: var(--grad-bold);
  box-shadow: 0 12px 26px -12px rgba(229, 70, 111, 0.8);
}
.ti-drop-ok .ti-drop-icon { background: var(--success); box-shadow: none; }
.ti-drop-empty, .ti-drop-chosen { display: grid; gap: 3px; min-width: 0; }
.ti-drop-title { font-size: 16px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti-drop-hint { font-size: 13.5px; color: var(--ink-muted); }
.ti-drop-change { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; }

.ti-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--ink-faint);
  transition: border-color 0.2s ease;
}
.ti-field:focus-within { border-color: var(--line-strong); }
.ti-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.ti-field input::placeholder { color: var(--ink-faint); }

.ti-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); cursor: pointer; }
.ti-consent input { flex: none; margin-top: 2px; width: 17px; height: 17px; accent-color: var(--brand); }
.ti-consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.ti-error {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.ti-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
form .ti-go { width: 100%; margin-top: 4px; }
.ti-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
.ti-left { text-align: center; font-size: 12.5px; color: var(--ink-faint); min-height: 1em; }

/* ---------- working ---------- */
.ti-work-head { display: flex; align-items: center; gap: 14px; }
.ti-work-title { display: block; font-size: 18px; font-weight: 600; color: var(--ink); }
.ti-work-hint { display: block; margin-top: 2px; font-size: 13.5px; color: var(--ink-muted); }
.ti-hint-leave { display: none; }
.ti-can-leave .ti-hint-stay { display: none; }
.ti-can-leave .ti-hint-leave { display: block; }
.ti-spinner {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 25%, #C93BD6 55%, #FF6B5A 100%);
  -webkit-mask: radial-gradient(closest-side, transparent 72%, #000 74%);
  mask: radial-gradient(closest-side, transparent 72%, #000 74%);
  animation: ti-spin 1s linear infinite;
}
@keyframes ti-spin { to { transform: rotate(360deg); } }

.ti-eta { min-height: 16px; margin: -2px 0 2px; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.ti-bar { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; margin: 8px 0 4px; }
.ti-bar span {
  display: block;
  height: 100%;
  width: 4%;
  border-radius: inherit;
  background: var(--grad-bold);
  background-size: 200% 100%;
  animation: ti-flow 2.2s linear infinite;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes ti-flow { from { background-position: 0 0; } to { background-position: -200% 0; } }

.ti-stages { list-style: none; padding: 0; display: grid; gap: 9px; margin-top: 6px; }
.ti-stages li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; color: var(--ink-faint); transition: color 0.3s ease; }
.ti-dot {
  flex: none;
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  transition: all 0.3s ease;
}
.ti-stages li.ti-now { color: var(--ink); font-weight: 500; }
.ti-stages li.ti-now .ti-dot { border-color: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 16%, transparent); animation: ti-pulse 1.4s ease-in-out infinite; }
.ti-stages li.ti-done { color: var(--ink-muted); }
.ti-stages li.ti-done .ti-dot { border-color: var(--success); background: var(--success); }
.ti-stages li.ti-done .ti-dot::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
@keyframes ti-pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--brand) 6%, transparent); } }

/* ---------- how cleer works, while it works ---------- */
.ti-tips { margin-top: 6px; display: grid; gap: 12px; }
.ti-tips-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.ti-tip { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 18px; background: var(--sunken); border: 1px solid var(--line); animation: ti-tip-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ti-tip-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; color: var(--brand); background: var(--surface); border: 1px solid var(--line); }
.ti-tip-copy { display: grid; gap: 5px; min-width: 0; }
.ti-tip-title { font-family: "Outfit", "Geist", sans-serif; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.ti-tip-body { font-size: 14px; line-height: 1.55; color: var(--ink-muted); }
.ti-tip-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--brand); text-decoration: none; }
.ti-tip-link:hover { text-decoration: underline; }
.ti-tip-dots { display: flex; justify-content: center; gap: 4px; }
.ti-tip-dot { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.ti-tip-dot::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--line-strong, var(--line)); transition: width 0.3s ease, background-color 0.3s ease; }
.ti-tip-dot[aria-current="true"]::before { width: 24px; background: var(--brand); }
@keyframes ti-tip-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- the final pass, as the agents' log ---------- */
.ti-chat { margin: 0 0 16px; transition: opacity 0.5s ease; }
.ti-chat-out { opacity: 0; }
.ti-chat-head { display: flex; gap: 12px; align-items: flex-start; }
.ti-chat-avatars { display: flex; flex: none; padding-top: 1px; }
.ti-chat-avatars i, .ti-log-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 11px/1 "Geist", Inter, sans-serif; font-style: normal; color: #fff; border: 2px solid var(--surface); }
.ti-chat-avatars i + i { margin-left: -8px; }
.ti-av-review, .ti-log-review .ti-log-avatar { background: #8e2fa8; }
.ti-av-writer, .ti-log-writer .ti-log-avatar { background: #e8573a; }
.ti-av-check, .ti-log-check .ti-log-avatar { background: #3d5a73; }
.ti-chat-title { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.ti-chat-sub { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); }
.ti-chat-feed { display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; height: 196px; overflow: hidden; margin-top: 12px; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ti-log { display: grid; grid-template-columns: 38px 22px 84px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 2px; animation: ti-log-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards; transition: opacity 0.45s ease, transform 0.45s ease; }
.ti-log .ti-log-avatar { width: 20px; height: 20px; font-size: 9.5px; border: 0; }
.ti-log-at { font: 400 11px/1 "Geist Mono", monospace; color: var(--ink-muted); }
.ti-log-who { font: 500 11px/1.2 "Geist Mono", monospace; }
.ti-log-review .ti-log-who { color: #8e2fa8; }
.ti-log-writer .ti-log-who { color: #c9452b; }
.ti-log-check .ti-log-who { color: #3d5a73; }
.dark .ti-log-review .ti-log-who { color: #d18ae6; }
.dark .ti-log-writer .ti-log-who { color: #ff9a7f; }
.dark .ti-log-check .ti-log-who { color: #9cc0dc; }
.ti-log-text { font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.ti-log[data-age="1"] { opacity: 0.85; }
.ti-log[data-age="2"] { opacity: 0.6; }
.ti-log[data-age="3"] { opacity: 0.4; }
.ti-log[data-age="4"] { opacity: 0.2; }
.ti-log-gone { opacity: 0; transform: translateY(-8px); }
@keyframes ti-log-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .ti-log { grid-template-columns: 20px minmax(0, 1fr); row-gap: 2px; }
  .ti-log-at { display: none; }
  .ti-log-who { grid-column: 2; grid-row: 1; }
  .ti-log-text { grid-column: 2; }
  .ti-log .ti-log-avatar { grid-row: 1 / span 2; align-self: start; }
  .ti-chat-feed { height: 250px; }
}

/* ---------- messages ---------- */
.ti-note { justify-items: center; text-align: center; gap: 14px; padding: 8px 0; }
.ti-note-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 30px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.ti-note-title { font-family: "Outfit", "Geist", sans-serif; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.ti-note-text { font-size: 15.5px; line-height: 1.6; color: var(--ink-muted); max-width: 26rem; }
.ti-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

@keyframes ti-sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- result: a copy of the app's process page ---------- */
.ti-card { transition: padding 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.ti-has-result .ti-card { display: block; padding: 32px; }
.ti-has-result .ti-intro { display: none; }

.ti-crumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); }
.ti-crumb b { color: var(--ink); font-weight: 500; }
.ti-phead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 10px; }
.ti-ptitle { font-family: "Outfit", "Geist", sans-serif; font-weight: 600; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); text-wrap: balance; }
.ti-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13.5px; color: var(--ink-muted); }
.ti-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.ti-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--brand);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}
.ti-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(255, 107, 90, 0.9); }
.ti-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%); transform: translateX(-120%); }
.ti-shine::after { animation: ti-shine 1s 0.1s ease-out; }
@keyframes ti-shine { to { transform: translateX(120%); } }
.ti-cut { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; color: var(--ink); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.ti-cut ion-icon { flex: none; color: var(--brand); margin-top: 2px; }

/* lineage, as in the app */
.ti-lineage { position: relative; margin-top: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--raised); overflow: hidden; }
.ti-ldots { position: absolute; inset: 0; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 16px 16px; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%); }
.ti-lhead { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--line); }
.ti-lhead p { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.ti-lhead p ion-icon { color: var(--brand); font-size: 13px; }
.ti-lhead > span { font-family: "Geist Mono", monospace; font-size: 10px; color: var(--ink-muted); }
.ti-lscroll { position: relative; overflow-x: auto; scrollbar-width: none; }
.ti-lscroll::-webkit-scrollbar { display: none; }
.ti-lrow { display: flex; align-items: flex-start; padding: 28px 24px; min-width: min-content; }
.ti-lstep { display: flex; flex-direction: column; align-items: center; width: 108px; flex: none; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.ti-node { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--canvas); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-muted); transition: transform 0.25s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; }
.ti-lstep:hover .ti-node { transform: scale(1.05); }
.ti-lstep.ti-on .ti-node { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.ti-lstep.ti-past .ti-node { color: var(--ink); }
.ti-lname { margin-top: 12px; font-size: 12px; line-height: 1.25; text-align: center; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ti-ltime { margin-top: 4px; font-family: "Geist Mono", monospace; font-size: 10px; color: var(--ink-muted); }
.ti-conn { flex: 1; min-width: 24px; height: 2px; margin: 21px 6px 0; border-radius: 99px; background: var(--line); position: relative; overflow: hidden; }
.ti-conn i { position: absolute; inset: 0; background: var(--grad-bold); transform-origin: left; transform: scaleX(1); }

/* steps next to the video */
.ti-pbody { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; margin-top: 24px; align-items: start; }
.ti-pbody.ti-no-video { grid-template-columns: minmax(0, 1fr) 300px; }
.ti-sec h4 { font-size: 15px; font-weight: 600; color: var(--ink); }
.ti-sec p { margin: 2px 0 12px; font-size: 12.5px; color: var(--ink-muted); }
.ti-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ti-step { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); padding: 16px; cursor: pointer; outline: none; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.ti-step:hover { border-color: var(--line-strong); }
.ti-step:focus-visible { border-color: var(--brand); }
.ti-step.ti-on { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 9%, transparent); }
.ti-num { margin-top: 1px; width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: 11px; font-weight: 500; color: var(--ink-muted); font-variant-numeric: tabular-nums; transition: all 0.3s ease; }
.ti-step.ti-on .ti-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.ti-step-body { min-width: 0; flex: 1; }
.ti-step-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.ti-step-title { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.4; }
.ti-step-time { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.ti-step-text { margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--ink-muted); }
.ti-notes { margin-top: 8px; display: grid; gap: 4px; font-size: 12px; line-height: 1.55; color: var(--ink-muted); }
.ti-notes:not(:has(p:not([hidden]))) { display: none; }
.ti-notes p { display: flex; gap: 6px; align-items: flex-start; }
.ti-notes ion-icon { flex: none; margin-top: 3px; }
.ti-notes b { font-weight: 500; color: var(--ink); }
.ti-note-safety ion-icon { color: var(--warning); }
.ti-note-check ion-icon { color: var(--success); }
.ti-skel { display: none; }
.ti-writing .ti-step-text, .ti-writing .ti-notes { opacity: 0; }
.ti-writing .ti-skel { display: grid; gap: 6px; margin-top: 8px; }
.ti-skel i { display: block; height: 9px; border-radius: 5px; background: var(--sunken); position: relative; overflow: hidden; }
.ti-skel i:first-child { width: 94%; }
.ti-skel i:last-child { width: 78%; }
.ti-skel i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 80%, transparent), transparent); animation: ti-sheen 1s infinite; }
.ti-typed .ti-step-text, .ti-typed .ti-notes { animation: ti-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* the visitor's own video */
.ti-vcard { position: sticky; top: 96px; border-radius: 16px; border: 1px solid var(--line); background: var(--raised); overflow: hidden; }
.ti-vtop { padding: 14px 16px 10px; }
.ti-vtop h4 { font-size: 15px; font-weight: 600; color: var(--ink); }
.ti-vtop p { margin-top: 2px; font-size: 12.5px; color: var(--ink-muted); }
.ti-player { position: relative; background: #141217; aspect-ratio: 9 / 13; max-height: 460px; width: 100%; overflow: hidden; cursor: pointer; }
.dark .ti-player { background: #050407; }
.ti-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.ti-badge { position: absolute; left: 12px; top: 12px; right: 12px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(10, 9, 12, 0.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-size: 12.5px; line-height: 1.35; transition: opacity 0.3s ease, transform 0.3s ease; }
.ti-badge b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); font-size: 11px; flex: none; }
.ti-badge.ti-swap { opacity: 0; transform: translateY(-4px); }
.ti-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(255, 255, 255, 0.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 26px; transition: opacity 0.3s ease, transform 0.3s ease; }
.ti-play ion-icon { margin-left: 3px; }
.ti-play::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); animation: ti-ping 1.8s ease-out 2; }
@keyframes ti-ping { from { transform: scale(0.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.ti-playing .ti-play { opacity: 0; pointer-events: none; transform: scale(0.85); }
.ti-reload { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; color: #fff; cursor: pointer; }
.ti-reload-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; background: var(--grad-bold); box-shadow: 0 12px 26px -12px rgba(229, 70, 111, 0.8); margin-bottom: 4px; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.ti-reload:hover .ti-reload-icon { transform: translateY(-2px); }
.ti-reload-title { font-size: 15px; font-weight: 600; }
.ti-reload-hint { font-size: 12.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.62); max-width: 15rem; }
.ti-no-video .ti-play, .ti-no-video .ti-scrub { display: none; }
.ti-no-video .ti-player { aspect-ratio: 4 / 3; }
.ti-scrub { height: 34px; padding: 0 16px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); font-family: "Geist Mono", monospace; font-size: 11px; color: var(--ink-muted); }
.ti-track { position: relative; flex: 1; height: 6px; border-radius: 99px; background: var(--sunken); cursor: pointer; }
.ti-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: var(--brand); }
.ti-tick { position: absolute; top: -3px; width: 2px; height: 12px; border-radius: 2px; background: var(--line-strong); }
.ti-vnote { display: flex; gap: 6px; padding: 10px 16px 14px; font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
.ti-vnote ion-icon { flex: none; margin-top: 2px; color: var(--success); }

/* the small line under the whole section */
.ti-below { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; margin-top: 18px; font-size: 13.5px; color: var(--ink-muted); animation: ti-fade 0.6s ease both; animation-delay: var(--below-delay, 0s); }
.ti-below a, .ti-below button { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.ti-below a:hover, .ti-below button:hover { text-decoration-color: var(--ink); }
.ti-sep { color: var(--ink-faint); }
@keyframes ti-fade { from { opacity: 0; } }

/* ---------- the reveal ---------- */
.ti-reveal .ti-r { opacity: 0; animation: ti-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: var(--t, 0s); }
@keyframes ti-rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.ti-reveal .ti-ptitle.ti-r { animation-name: ti-title-in; }
@keyframes ti-title-in { from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(18px); } to { opacity: 1; clip-path: inset(0 0 0 0); transform: none; } }
.ti-reveal .ti-lstep.ti-r { animation-name: ti-pop; animation-duration: 0.55s; animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes ti-pop { from { opacity: 0; transform: scale(0.6) translateY(8px); } to { opacity: 1; transform: none; } }
.ti-reveal .ti-conn i { transform: scaleX(0); animation: ti-draw 0.45s cubic-bezier(0.65, 0, 0.35, 1) forwards; animation-delay: var(--t, 0s); }
@keyframes ti-draw { to { transform: scaleX(1); } }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .ti-card { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px; }
  .ti-has-result .ti-card { padding: 24px; }
  .ti-pbody, .ti-pbody.ti-no-video { grid-template-columns: minmax(0, 1fr); }
  .ti-vcard { position: relative; top: 0; order: -1; }
  .ti-player { aspect-ratio: 16 / 11; }
}
@media (max-width: 640px) {
  .ti { margin-top: -140px; }
  .ti-card { padding: 22px 18px; border-radius: 26px; gap: 22px; }
  .ti-has-result .ti-card { padding: 18px 14px; }
  .ti-how { display: none; }
  .ti-lead { font-size: 15.5px; margin-top: 12px; }
  .ti-drop { min-height: 96px; padding: 16px; }
  .ti-drop-icon { width: 48px; height: 48px; font-size: 22px; border-radius: 14px; }
  .ti-lrow { padding: 22px 14px; }
  .ti-lstep { width: 88px; }
  .ti-phead .ti-btn { width: 100%; }
  .ti-step { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ti-spinner, .ti-bar span, .ti-stages li.ti-now .ti-dot, .ti-play::before, .ti-below { animation: none; }
  .ti-reveal .ti-r, .ti-reveal .ti-conn i { animation: none; opacity: 1; transform: none; }
}

/* ---------- the live draft and the final check ---------- */
.ti-btn-waiting { background: var(--sunken); color: var(--ink-muted); pointer-events: none; }
.ti-btn-waiting:hover { transform: none; box-shadow: none; }
.ti-live { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 12px; border-radius: 12px; font-size: 13px; color: var(--ink); background: color-mix(in srgb, var(--brand) 8%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent); animation: ti-fade 0.4s ease both; }
.ti-live-count { margin-left: auto; font-family: "Geist Mono", monospace; font-size: 11px; color: var(--ink-muted); }
.ti-live-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 50%, transparent); animation: ti-breathe 1.4s ease-out infinite; }
@keyframes ti-breathe { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.ti-live-tick { display: none; color: var(--success); font-size: 16px; }
.ti-live-done { background: color-mix(in srgb, var(--success) 10%, transparent); border-color: color-mix(in srgb, var(--success) 28%, transparent); }
.ti-live-done .ti-live-dot { display: none; }
.ti-live-done .ti-live-tick { display: inline-block; }

/* a part still being read: a frame from their video, scanned */
.ti-ph { display: flex; gap: 14px; align-items: stretch; padding: 12px; border-radius: 12px; border: 1px dashed var(--line-strong); background: color-mix(in srgb, var(--raised) 60%, transparent); animation: ti-fade 0.5s ease both; }
.ti-ph-frame { position: relative; flex: none; width: 112px; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; background: var(--sunken); }
.ti-ph-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: saturate(0.85); transition: opacity 0.6s ease; }
.ti-ph-frame canvas.ti-drawn { opacity: 1; }
.ti-ph-scan { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--brand) 35%, transparent) 48%, rgba(255, 255, 255, 0.55) 50%, transparent 52%); background-size: 100% 220%; animation: ti-scan 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite; mix-blend-mode: screen; }
@keyframes ti-scan { from { background-position: 0 120%; } to { background-position: 0 -120%; } }
.ti-ph-body { flex: 1; min-width: 0; display: grid; align-content: center; gap: 7px; }
.ti-ph-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-muted); }
.ti-ph-label span[data-ph] { font-family: "Geist Mono", monospace; font-size: 11px; }
.ti-ph-body i { display: block; height: 9px; border-radius: 5px; background: var(--sunken); position: relative; overflow: hidden; }
.ti-ph-body i:nth-of-type(1) { width: 58%; height: 11px; }
.ti-ph-body i:nth-of-type(2) { width: 92%; }
.ti-ph-body i:nth-of-type(3) { width: 74%; }
.ti-ph-body i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 80%, transparent), transparent); animation: ti-sheen 1.2s infinite; }
.ti-lpending { cursor: default; }
.ti-lpending .ti-node { border-style: dashed; border-color: var(--line-strong); background: transparent; animation: ti-wait 1.6s ease-in-out infinite; }
.ti-lpending .ti-lname { color: var(--ink-faint); }
@keyframes ti-wait { 50% { border-color: var(--brand); } }
.ti-pop { animation: ti-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.ti-arrive { animation: ti-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ti-leaving .ti-step-title, .ti-leaving .ti-step-text { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 60%, transparent); }

/* the final check: a quiet scan over the draft, then edits in place */
.ti-joining .ti-steps { position: relative; }
.ti-joining .ti-steps::after { content: ""; position: absolute; left: -6px; right: -6px; height: 90px; top: 0; pointer-events: none; border-radius: 12px; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--brand) 9%, transparent) 50%, transparent); animation: ti-pass 2.6s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes ti-pass { from { transform: translateY(-90px); } to { transform: translateY(calc(var(--ti-steps-h, 600px))); } }
.ti-step.ti-editing { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent); }
.ti-edit { border-radius: 3px; transition: background-color 0.2s ease; }
.ti-selected { background: color-mix(in srgb, var(--brand) 24%, transparent); color: var(--ink); }
.ti-added { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.ti-caret { position: relative; display: inline-block; width: 2px; height: 1.15em; margin: 0 1px -0.2em; background: var(--brand); border-radius: 1px; animation: ti-blink 1s steps(1) infinite; }
.ti-caret-flag { position: absolute; left: -1px; bottom: 100%; margin-bottom: 2px; padding: 1px 6px 2px; border-radius: 5px 5px 5px 0; font-size: 10px; font-weight: 600; line-height: 1.4; letter-spacing: 0.02em; color: #fff; background: var(--brand); white-space: nowrap; animation: none; }
@keyframes ti-blink { 50% { background: transparent; } }
.ti-blink-off { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .ti-ph-scan, .ti-joining .ti-steps::after, .ti-live-dot, .ti-lpending .ti-node, .ti-caret { animation: none; }
}
.ti-conn-pending i { background: none; }
.ti-conn-pending { background: repeating-linear-gradient(90deg, var(--line-strong) 0 5px, transparent 5px 10px); }
.ti-step.ti-leaving { background: color-mix(in srgb, var(--danger) 6%, var(--raised)); }
.ti-caret-flag { font-size: 9.5px; padding: 0 5px 1px; opacity: 0.95; }
.ti-ph-enter { animation: ti-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: var(--ti-delay, 0s); }
