/* Features ▸ Training Videos — interactive demo (/features/training-videos).
   Themed on the site-wide Cohort Pulsefield design system: every --tvd-*
   token below aliases the global tokens from colors_and_type.css (violet
   brand, warm-white surfaces, Sora/Inter type, restrained shadows), so this
   page always matches the rest of the marketing site. Fallback literals
   mirror the global values. Scoped to .tvd. */

.tvd {
  --tvd-primary: var(--color-violet-600, #6D28D9);        /* brand */
  --tvd-primary-hover: var(--color-violet-500, #8B5CF6);  /* .btn-primary:hover */
  --tvd-primary-deep: var(--color-violet-700, #5B21B6);
  --tvd-primary-soft: var(--color-violet-100, #F3E8FF);
  --tvd-bg: var(--bg, #FFFBFE);
  --tvd-card: var(--bg-card, #FFFFFF);
  --tvd-head: var(--fg, #111827);
  --tvd-body: var(--fg-body, #334155);
  --tvd-muted: var(--fg-muted, #64748B);
  --tvd-border: var(--border-strong, #E2E8F0);
  --tvd-dark: var(--bg-dark, #081220);                    /* dark sections: midnight */
  --tvd-r: var(--radius-lg, 16px);
  --tvd-r-lg: var(--radius-xl, 20px);
  --tvd-shadow: var(--shadow-md, 0 4px 12px rgba(15,23,42,.05), 0 2px 4px rgba(15,23,42,.04));
  --tvd-shadow-lg: var(--shadow-xl, 0 24px 56px rgba(15,23,42,.12), 0 8px 16px rgba(15,23,42,.06));
  --tvd-fast: var(--dur-fast, 150ms);
  --tvd-slow: var(--dur-slow, 360ms);
  background: var(--tvd-bg);
  color: var(--tvd-body);
  overflow-x: clip;
  font-size: 15px;
}
.tvd h1, .tvd h2, .tvd h3 { color: var(--tvd-head); font-family: var(--font-display); letter-spacing: var(--tracking-tight, -0.02em); }
.tvd :focus-visible { outline: 3px solid var(--color-violet-500, #8B5CF6); outline-offset: 2px; border-radius: 8px; }
.tvd .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- shared bits ---------- */
.tvd-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-eyebrow, .12em); text-transform: uppercase;
  color: var(--tvd-primary);
}
.tvd-eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tvd-primary); }
.tvd-grad {
  background: var(--gradient-ai-primary, linear-gradient(135deg, #6D28D9 0%, #8B5CF6 50%, #A78BFA 100%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tvd-grad-dark {
  background: linear-gradient(135deg, #A78BFA 0%, #67E8F9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tvd-section { padding: clamp(44px, 6vw, 84px) 0; }
.tvd-alt { background: var(--tvd-card); border-block: 1px solid var(--tvd-border); }
.tvd-section-head { max-width: 820px; margin: 0 auto clamp(26px, 3.4vw, 44px); text-align: center; }
.tvd-section-head h2 { font-size: var(--fs-h2, clamp(23px, 4.2vw, 36px)); margin: 10px 0 0; text-wrap: balance; }
.tvd-mt { margin-top: 16px; }
/* A card stacked under another block must size to its content — the shared
   height:100% is for cards that alone fill a grid cell. */
.tvd-rolecard.tvd-mt { height: auto; }
.tvd-center { text-align: center; max-width: 760px; margin: 22px auto 0; }

/* Buttons mirror site.css .btn / .btn-primary / .btn-secondary exactly. */
.tvd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  height: 44px; padding: 0 18px; border-radius: var(--radius-md, 12px);
  transition: background var(--tvd-fast) ease, border-color var(--tvd-fast) ease,
              transform var(--tvd-fast) ease, box-shadow var(--tvd-fast) ease;
}
.tvd-btn svg { width: 16px; height: 16px; }
.tvd-btn-sm { height: 38px; padding: 0 14px; font-size: 13px; }
.tvd-btn-primary { background: var(--tvd-primary); color: #fff; box-shadow: var(--shadow-violet-soft, 0 8px 24px rgba(139,92,246,.15)); }
.tvd-btn-primary:hover { background: var(--tvd-primary-hover); box-shadow: var(--shadow-violet, 0 12px 32px rgba(109,40,217,.22), 0 2px 6px rgba(109,40,217,.12)); }
.tvd-btn-secondary { background: #fff; color: var(--tvd-primary-deep); border: 1px solid var(--color-violet-200, #E9D5FF); }
.tvd-btn-secondary:hover { background: var(--color-violet-50, #FAF5FF); border-color: var(--color-violet-300, #D8B4FE); }
.tvd-btn-ghost { background: transparent; color: var(--tvd-muted); }
.tvd-btn-on-dark { background: #fff; color: var(--tvd-head); box-shadow: 0 12px 32px rgba(0,0,0,.18); }
.tvd-btn-on-dark:hover { background: var(--color-violet-100, #F3E8FF); color: var(--tvd-primary-deep); }
.tvd-btn-ghost-dark { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.tvd-btn-ghost-dark:hover { background: rgba(255,255,255,.12); }
.tvd-btn:active { transform: translateY(1px); }

.tvd-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: var(--radius-pill, 999px); font-size: 11px; font-weight: 700; letter-spacing: .02em;
  white-space: nowrap; vertical-align: middle;
}
.tvd-badge-production  { background: var(--color-emerald-50, #ECFDF5); color: var(--color-emerald-700, #047857); }
.tvd-badge-demo        { background: var(--color-amber-100, #FEF3C7); color: #92400E; }
.tvd-badge-interactive { background: var(--color-violet-100, #F3E8FF); color: var(--tvd-primary-deep); }
.tvd-badge-concept     { background: var(--color-blue-100, #DBEAFE); color: var(--color-blue-700, #1D4ED8); }

.tvd-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--radius-pill, 999px); font-size: 12px; font-weight: 700; }
.tvd-chip-ok   { background: var(--color-emerald-50, #ECFDF5); color: var(--color-emerald-700, #047857); }
.tvd-chip-warn { background: var(--color-rose-50, #FFF1F2); color: var(--color-rose-600, #E11D48); }

.tvd-linkbtn { background: none; border: none; cursor: pointer; padding: 4px 2px; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--tvd-primary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- hero + mini player (R1/§12) ---------- */
.tvd-hero { padding: clamp(40px, 5.4vw, 72px) 0 clamp(28px, 3.6vw, 52px); background: linear-gradient(180deg, var(--color-violet-100, #F3E8FF) 0%, var(--tvd-bg) 82%); }
.tvd-hero h1 { font-size: var(--fs-display-lg, clamp(29px, 6vw, 52px)); line-height: var(--lh-tight, 1.06); margin: 14px 0 16px; text-wrap: balance; }
.tvd-lede { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; max-width: 620px; margin: 0 0 24px; }
.tvd-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.tvd-micro { display: inline-flex; align-items: center; gap: 7px; margin: 16px 0 0; font-size: 13px; font-weight: 600; color: var(--tvd-muted); }
.tvd-micro svg { width: 15px; height: 15px; }

.tvd-mini-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; font-size: 12.5px; font-weight: 650; color: var(--tvd-muted); }
.tvd-mini-head svg { width: 15px; height: 15px; flex: none; color: var(--tvd-primary); }
.tvd-mini-note { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.55; color: var(--tvd-muted); }
.tvd-mini-note .tvd-badge { vertical-align: 1px; }
.tvd-player-mini .tvd-bigplay { width: 64px; height: 64px; }
.tvd-player-mini .tvd-bigplay svg { width: 26px; height: 26px; }
.tvd-player-mini .tvd-slide h3 { font-size: clamp(17px, 1.8vw, 24px); }
.tvd-player-mini .tvd-slide p { font-size: clamp(11.5px, 1.1vw, 13px); max-width: 420px; }
.tvd-player-mini .tvd-captionbar { bottom: 56px; }

/* ---------- lesson workspace ---------- */
.tvd-lesson { padding: clamp(44px, 6vw, 84px) 0; scroll-margin-top: 84px; }
.tvd-lesson-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.tvd-crumb { margin: 0 0 4px; font-size: 12.5px; font-weight: 650; color: var(--tvd-muted); }
.tvd-lesson-head h2 { font-size: var(--fs-h3, clamp(21px, 3.2vw, 28px)); margin: 0; }
.tvd-lesson-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 650; color: var(--tvd-muted); flex-wrap: wrap; }
.tvd-lesson-meta svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.tvd-lesson-pct { color: var(--tvd-primary); }

.tvd-resume {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  background: var(--tvd-primary-soft); border: 1px solid var(--color-violet-200, #E9D5FF); border-radius: var(--radius-md, 12px);
  padding: 10px 16px; margin-bottom: 16px; font-size: 14px;
}
.tvd-resume svg { width: 17px; height: 17px; color: var(--tvd-primary); flex: none; }
.tvd-resume strong { color: var(--tvd-head); }
.tvd-resume .tvd-btn { margin-left: auto; }

.tvd-player {
  position: relative; border-radius: var(--tvd-r-lg); overflow: hidden;
  background: var(--tvd-dark); box-shadow: var(--tvd-shadow-lg); aspect-ratio: 16 / 9;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.tvd-stage { position: absolute; inset: 0; }
.tvd-slide {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px; text-align: center; opacity: 0;
  transition: opacity var(--tvd-slow) ease;
}
.tvd-slide.is-on { opacity: 1; }
.tvd-slide .tvd-slide-kicker { font-size: clamp(10px, 1.1vw, 12px); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--color-violet-400, #A78BFA); }
.tvd-slide h3 { color: #fff; font-size: clamp(20px, 2.6vw, 34px); margin: 0; }
.tvd-slide .tvd-slide-art { display: flex; gap: 10px; align-items: center; }
.tvd-slide .tvd-slide-art i { display: block; border-radius: 8px; background: rgba(167,139,250,.2); border: 1px solid rgba(167,139,250,.4); }
.tvd-slide p { color: var(--fg-on-dark-muted, #C7C9D9); font-size: clamp(12px, 1.3vw, 14.5px); max-width: 520px; margin: 0; }

.tvd-captionbar {
  position: absolute; left: 0; right: 0; bottom: 64px; display: flex; justify-content: center; pointer-events: none;
}
.tvd-captionbar[hidden] { display: none; }
.tvd-captionbar span {
  max-width: 80%; background: rgba(8,18,32,.8); color: #fff; border-radius: 8px;
  padding: 6px 12px; font-size: clamp(12px, 1.3vw, 15px); line-height: 1.45; text-align: center;
}

.tvd-bigplay {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%;
  border: none; cursor: pointer; background: rgba(255,255,255,.94); color: var(--tvd-primary);
  display: grid; place-items: center; box-shadow: 0 12px 40px rgba(8,18,32,.45);
  transition: transform var(--tvd-fast) ease, opacity var(--tvd-fast) ease;
}
.tvd-bigplay svg { width: 34px; height: 34px; margin-left: 4px; }
.tvd-bigplay:hover { transform: scale(1.05); }
.tvd-bigplay[hidden] { display: none; }

.tvd-controls {
  position: relative; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: linear-gradient(180deg, rgba(8,18,32,0), rgba(8,18,32,.72) 40%);
}
.tvd-ctl {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: none; border-radius: 10px; cursor: pointer; background: transparent; color: #E9E5F7;
}
.tvd-ctl:hover { background: rgba(255,255,255,.14); }
.tvd-ctl svg { width: 19px; height: 19px; }
.tvd-ctl-text { width: auto; padding: 0 10px; font: inherit; font-size: 13px; font-weight: 700; }
.tvd-ctl[aria-pressed="true"] { background: rgba(255,255,255,.2); color: #fff; }
.tvd-time { font-size: 12.5px; font-weight: 650; color: #C7C9D9; font-variant-numeric: tabular-nums; flex: none; }
.tvd-seek-wrap { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.tvd-seek { width: 100%; accent-color: var(--color-violet-500, #8B5CF6); height: 22px; cursor: pointer; background: transparent; }
.tvd-chapter-ticks { position: absolute; left: 8px; right: 8px; top: 50%; height: 0; pointer-events: none; }
.tvd-chapter-ticks i { position: absolute; top: -5px; width: 2px; height: 10px; border-radius: 2px; background: rgba(255,255,255,.75); }

/* overlays inside the player */
.tvd-check, .tvd-done {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; justify-content: center;
  gap: 10px; padding: clamp(16px, 3.2vw, 40px); background: rgba(8, 12, 30, .93); color: #DFDAF0;
}
.tvd-check[hidden], .tvd-done[hidden] { display: none; }
@media (max-width: 767.98px) {
  /* On phones the quick check is taller than the 16:9 player — let it flow
     and grow the player instead of clipping inside the overlay. */
  .tvd-check:not([hidden]) { position: static; }
  .tvd-player:has(.tvd-check:not([hidden])) { aspect-ratio: auto; }
}
.tvd-check-eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: var(--tracking-eyebrow, .12em); text-transform: uppercase; color: var(--color-violet-300, #D8B4FE); display: flex; gap: 10px; align-items: center; }
.tvd-check-q { margin: 0; color: #fff; font-size: clamp(15px, 1.8vw, 20px); font-weight: 700; }
.tvd-check-opts { display: flex; flex-direction: column; gap: 8px; }
.tvd-check-opts label {
  display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); cursor: pointer; font-size: clamp(13px, 1.4vw, 15px);
}
.tvd-check-opts label:hover { border-color: var(--color-violet-400, #A78BFA); }
.tvd-check-opts input { accent-color: var(--color-violet-500, #8B5CF6); }
.tvd-check-opts label.is-right { border-color: #34D399; background: rgba(52,211,153,.12); }
.tvd-check-opts label.is-wrong { border-color: #F87171; background: rgba(248,113,113,.12); }
.tvd-check-feedback { margin: 0; min-height: 1.3em; font-size: 14px; font-weight: 650; }
.tvd-check-feedback.is-right { color: #6EE7B7; }
.tvd-check-feedback.is-wrong { color: #FCA5A5; }
.tvd-check-actions { display: flex; gap: 10px; }
.tvd-check-note { margin: 2px 0 0; font-size: 12px; color: #9A93B8; }

.tvd-done { align-items: center; text-align: center; }
.tvd-done-seal { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--color-emerald-500, #10B981); color: #fff; }
.tvd-done-seal svg { width: 30px; height: 30px; }
.tvd-done h3 { color: #fff; margin: 0; font-size: clamp(20px, 2.4vw, 28px); }
.tvd-done-lesson, .tvd-done-check { margin: 0; font-size: 14px; }

.tvd-player-note { margin: 12px 2px 0; font-size: 13px; line-height: 1.6; color: var(--tvd-muted); }
.tvd-player-note .tvd-badge { vertical-align: 1px; }

/* ---------- side panel ---------- */
.tvd-panel { background: var(--tvd-card); border: 1px solid var(--tvd-border); border-radius: var(--tvd-r); box-shadow: var(--tvd-shadow); padding: 16px 18px 18px; height: 100%; }
.tvd-paneltabs { display: flex; gap: 4px; border-bottom: 1px solid var(--tvd-border); margin-bottom: 14px; overflow-x: auto; }
.tvd-paneltabs [role="tab"] {
  border: none; background: none; cursor: pointer; flex: none;
  font: inherit; font-size: 13.5px; font-weight: 650; color: var(--tvd-muted);
  padding: 9px 11px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tvd-paneltabs [role="tab"][aria-selected="true"] { color: var(--tvd-primary); border-bottom-color: var(--tvd-primary); }
.tvd-panel-h { font-size: 15.5px; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tvd-panel [role="tabpanel"] p { font-size: 13.5px; line-height: 1.6; margin: 0 0 10px; }
.tvd-panel-sub { font-size: 12.5px !important; color: var(--tvd-muted); margin-top: 10px !important; }
.tvd-obj { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.tvd-obj li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.tvd-obj svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--color-emerald-600, #059669); }

.tvd-chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tvd-chapters button {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
  border: 1px solid var(--tvd-border); background: #fff; border-radius: 10px;
  padding: 9px 12px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--tvd-body);
  transition: border-color var(--tvd-fast) ease, background var(--tvd-fast) ease;
}
.tvd-chapters button:hover { border-color: var(--color-violet-300, #D8B4FE); }
.tvd-chapters li.is-active button { background: var(--tvd-primary-soft); border-color: var(--tvd-primary); color: var(--tvd-head); }
.tvd-ch-t { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--tvd-primary); flex: none; }

.tvd-note-add { display: flex; gap: 8px; margin-bottom: 10px; }
.tvd-note-add input {
  flex: 1; min-width: 0; height: 38px; border: 1px solid var(--tvd-border); border-radius: 10px;
  padding: 0 12px; font: inherit; font-size: 13.5px; color: var(--tvd-head);
}
.tvd-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tvd-notes li { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; }
.tvd-notes .tvd-note-ts { font-variant-numeric: tabular-nums; }

/* AI Mentor — brand-violet AI treatment, matching the site's AI surfaces */
.tvd-mentor-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.tvd-mentor-chips button {
  border: 1px solid var(--tvd-border); background: #fff; border-radius: var(--radius-pill, 999px); cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 650; color: var(--tvd-body); padding: 7px 12px;
}
.tvd-mentor-chips button:hover { border-color: var(--color-violet-400, #A78BFA); color: var(--tvd-primary); }
.tvd-mentor-out:empty { display: none; }
.tvd-mentor-out { border: 1px solid var(--color-violet-200, #E9D5FF); background: var(--gradient-ai-soft, linear-gradient(135deg, #F3E8FF 0%, #FAF5FF 100%)); border-radius: var(--radius-md, 12px); padding: 12px 14px; font-size: 13.5px; line-height: 1.6; }
.tvd-mentor-out b { color: var(--tvd-head); }
.tvd-mentor-follow { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- next action ---------- */
.tvd-nextcard {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--tvd-card); border: 1px solid var(--tvd-border); border-left: 4px solid var(--color-emerald-500, #10B981);
  border-radius: var(--tvd-r); box-shadow: var(--tvd-shadow); padding: 22px 26px;
}
.tvd-eyebrow2 { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--color-emerald-600, #059669); }
.tvd-nextcard h2 { font-size: clamp(19px, 2.2vw, 24px); margin: 0 0 6px; }
.tvd-nextcard p { margin: 0; max-width: 640px; }
.tvd-nextcard-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- learning loop / flow ---------- */
.tvd-loop { list-style: none; margin: 0 auto; padding: 0; max-width: 1000px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: loop; }
.tvd-loop button {
  width: 100%; height: 100%; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left;
  border: 1px solid var(--tvd-border); background: var(--tvd-card); border-radius: var(--tvd-r);
  padding: 16px; cursor: pointer; font: inherit; color: var(--tvd-body);
  transition: border-color var(--tvd-fast) ease, box-shadow var(--tvd-fast) ease, transform var(--tvd-fast) ease;
}
.tvd-loop button:hover { transform: translateY(-2px); box-shadow: var(--tvd-shadow); }
.tvd-loop button[aria-pressed="true"] { border-color: var(--tvd-primary); box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
.tvd-loop svg { width: 22px; height: 22px; color: var(--tvd-primary); }
.tvd-loop b { color: var(--tvd-head); font-size: 15.5px; }
.tvd-loop span { font-size: 12.5px; line-height: 1.5; }
.tvd-loop-detail { max-width: 760px; margin: 18px auto 0; text-align: center; font-size: 14.5px; }

.tvd-flow { list-style: none; margin: 0 auto; padding: 0; max-width: 980px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tvd-flow li {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-pill, 999px);
  background: var(--tvd-card); border: 1px solid var(--tvd-border); font-weight: 700; color: var(--tvd-head); font-size: 14px;
  opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease;
}
.tvd-flow li.is-in { opacity: 1; transform: none; }
.tvd-flow li:not(:last-child)::after { content: "→"; margin-left: 8px; color: var(--tvd-muted); font-weight: 400; }
.tvd-flow svg { width: 17px; height: 17px; color: var(--tvd-primary); }

/* ---------- week queue ---------- */
.tvd-wkcard {
  height: 100%; display: flex; flex-direction: column; gap: 7px; align-items: flex-start;
  background: var(--tvd-card); border: 1px solid var(--tvd-border); border-radius: var(--tvd-r);
  box-shadow: var(--tvd-shadow); padding: 18px;
}
.tvd-wkcard.is-current { border-color: var(--tvd-primary); box-shadow: 0 0 0 3px rgba(139,92,246,.16), var(--tvd-shadow); }
.tvd-wk-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--tvd-primary-soft); color: var(--tvd-primary); }
.tvd-wk-ico svg { width: 19px; height: 19px; }
.tvd-wkcard b { color: var(--tvd-head); font-size: 15px; }
.tvd-wkcard span { font-size: 12.5px; color: var(--tvd-muted); }
.tvd-wkcard .tvd-btn { margin-top: auto; }
.tvd-wk-state { font-size: 12px; font-style: normal; font-weight: 650; color: var(--tvd-muted); margin-top: auto; }
.tvd-wk-bar { width: 100%; height: 7px; border-radius: 999px; background: var(--color-violet-100, #F3E8FF); overflow: hidden; }
.tvd-wk-bar i { display: block; height: 100%; border-radius: 999px; background: var(--tvd-primary); transition: width .5s ease; }

/* ---------- roles ---------- */
.tvd-roletabs { display: flex; justify-content: center; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.tvd-roletabs [role="tab"] {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--tvd-border); background: var(--tvd-card);
  cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; color: var(--tvd-body);
  height: 44px; padding: 0 18px; border-radius: var(--radius-pill, 999px); transition: all var(--tvd-fast) ease;
}
.tvd-roletabs [role="tab"] svg { width: 17px; height: 17px; }
.tvd-roletabs [role="tab"][aria-selected="true"] { background: var(--tvd-primary); border-color: var(--tvd-primary); color: #fff; }
.tvd-rolepanel { max-width: 980px; margin: 0 auto; }
.tvd-rolepanel.is-entering { animation: tvd-in .32s ease both; }
@keyframes tvd-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tvd-role-q { text-align: center; font-size: 15px; margin: 0 0 16px; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.tvd-rolelist { list-style: none; margin: 0 auto 18px; padding: 0; max-width: 640px; display: flex; flex-direction: column; gap: 10px; }
.tvd-rolelist li { display: flex; gap: 11px; align-items: flex-start; background: var(--tvd-card); border: 1px solid var(--tvd-border); border-radius: var(--radius-md, 12px); padding: 12px 15px; font-size: 14.5px; }
.tvd-rolelist svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--tvd-primary); }
.tvd-rolepanel > .tvd-btn { display: flex; margin: 0 auto; }
.tvd-statrow { margin-bottom: 6px; }
.tvd-stat { height: 100%; background: var(--tvd-card); border: 1px solid var(--tvd-border); border-radius: var(--tvd-r); padding: 15px 17px; display: flex; flex-direction: column; gap: 3px; }
.tvd-stat b { font-size: 21px; color: var(--tvd-head); letter-spacing: -.01em; }
.tvd-stat span { font-size: 12.5px; color: var(--tvd-muted); }
.tvd-stat-warn b { color: var(--color-rose-600, #E11D48); }
.tvd-rolecard { height: 100%; background: var(--tvd-card); border: 1px solid var(--tvd-border); border-radius: var(--tvd-r); box-shadow: var(--tvd-shadow); padding: 18px 20px; }
.tvd-rolecard h3 { font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tvd-insights { list-style: none; margin: 0; padding: 0; }
.tvd-insights li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--color-slate-100, #F1F5F9); font-size: 13.5px; }
.tvd-insights li:first-child { border-top: 0; padding-top: 0; }
.tvd-insights b { color: var(--tvd-head); text-align: right; }
.tvd-attn { list-style: none; margin: 0; padding: 0; }
.tvd-attn li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 6px; border-top: 1px solid var(--color-slate-100, #F1F5F9); }
.tvd-attn li:first-child { border-top: 0; padding-top: 0; }
.tvd-attn li.is-flash { animation: tvd-flash 1.6s ease 1; border-radius: 10px; }
@keyframes tvd-flash { 0% { background: var(--color-violet-100, #F3E8FF); } 100% { background: transparent; } }
.tvd-attn-who { display: flex; flex-direction: column; min-width: 0; }
.tvd-attn-who b { color: var(--tvd-head); font-size: 14px; }
.tvd-attn-who em { font-style: normal; font-size: 12.5px; color: var(--tvd-muted); }
.tvd-programs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tvd-programs li { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 44px; align-items: center; gap: 12px; font-size: 13.5px; }
.tvd-programs b { text-align: right; color: var(--tvd-head); }

/* ---------- management / AI setup / recovery shared ---------- */
.tvd-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tvd-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tvd-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--tvd-muted); }
.tvd-form input { height: 38px; border: 1px solid var(--tvd-border); border-radius: 10px; padding: 0 11px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--tvd-head); background: var(--bg-elevated, #FDFCFB); }
.tvd-proc { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tvd-proc[hidden] { display: none; }
.tvd-proc li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; opacity: .3; transition: opacity var(--tvd-fast) ease; }
.tvd-proc li.is-done { opacity: 1; }
.tvd-proc li.is-done svg { color: var(--color-emerald-600, #059669); }
.tvd-proc svg { width: 16px; height: 16px; flex: none; color: var(--tvd-muted); }
.tvd-ai-out { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.tvd-ai-out[hidden] { display: none; }
.tvd-ai-block { border: 1px solid var(--color-violet-200, #E9D5FF); background: var(--color-violet-50, #FAF5FF); border-radius: var(--radius-md, 12px); padding: 11px 13px; font-size: 13.5px; }
.tvd-ai-block b { display: block; color: var(--tvd-head); margin-bottom: 3px; }
.tvd-ai-block p { margin: 0; line-height: 1.55; }
.tvd-ai-actions { display: flex; gap: 8px; }
.tvd-recovery-ctas { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.tvd-insight-line { display: flex; gap: 9px; align-items: flex-start; background: var(--color-amber-50, #FFFBEB); border: 1px solid #FDE68A; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 12px 0 14px; }
.tvd-insight-line svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: #B45309; }

/* ---------- intelligence ---------- */
.tvd-trend { width: 100%; height: auto; color: var(--tvd-muted); }
.tvd-trend-bars rect { fill: var(--tvd-primary); opacity: .85; }
.tvd-trend-bars rect:nth-of-type(4) { fill: var(--color-amber-500, #F59E0B); }
.tvd-trend text { fill: var(--tvd-muted); font-size: 12px; text-anchor: middle; font-family: var(--font-sans); }
.tvd-trend text.v { fill: var(--tvd-head); font-weight: 700; }
.tvd-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.tvd-timeline li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.tvd-timeline svg { width: 16px; height: 16px; flex: none; color: var(--tvd-primary); }

.tvd-browser { max-width: 1000px; margin: 0 auto; border-radius: 18px; overflow: hidden; border: 1px solid var(--tvd-border); background: #0F172A; box-shadow: 0 30px 70px rgba(15, 23, 42, .22); }
.tvd-browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #1E293B; }
.tvd-browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #475569; }
.tvd-browser-bar em { margin: 0 auto; padding: 3px 14px; border-radius: 8px; background: #0F172A; color: #94A3B8; font-size: 12px; font-style: normal; }
.tvd-walk-frame { position: relative; aspect-ratio: 1280 / 800; background: #0F172A; } /* the recording's own ratio, so it fills with no side bars */
.tvd-walk-video { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Fullscreen displays are mostly 16:9; the 16:10 recording would letterbox with
   side bars. Fill the width instead, pushing the crop upward (75%) because the
   burned-in captions sit near the bottom edge and must stay visible. */
@media (min-aspect-ratio: 5/4) and (max-aspect-ratio: 2/1) {
  .tvd-walk-video:fullscreen { object-fit: cover; object-position: 50% 75%; }
  .tvd-walk-video:-webkit-full-screen { object-fit: cover; object-position: 50% 75%; }
}
.tvd-walk-play {
  position: absolute; inset: 0; margin: auto; width: max-content; height: max-content;
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border: 0; border-radius: 999px;
  background: #fff; color: var(--tvd-head, #0F172A); font: 700 16px/1 var(--font-sans, inherit); cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.tvd-walk-play[hidden] { display: none !important; }
.tvd-walk-play svg { width: 20px; height: 20px; color: var(--tvd-primary); }
.tvd-walk-play-time { padding: 3px 10px; border-radius: 999px; background: var(--tvd-primary-soft, #F3E8FF); color: var(--tvd-primary); font-size: 13px; font-variant-numeric: tabular-nums; }
.tvd-walk-chapters { list-style: none; margin: 16px auto 0; padding: 10px; max-width: 1000px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tvd-walk-chapter {
  display: inline-flex; gap: 6px; align-items: center; min-height: 36px; padding: 0 12px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--tvd-border); background: #fff;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--tvd-head);
  transition: border-color var(--tvd-fast) ease, background var(--tvd-fast) ease;
}
.tvd-walk-chapter:hover { border-color: var(--color-violet-300, #D8B4FE); }
.tvd-walk-chapter.is-current { border-color: var(--tvd-primary); background: var(--tvd-primary); color: #fff; }
.tvd-walk-chapter.is-current .tvd-walk-ch-n { color: inherit; }
.tvd-walk-ch-n { font-size: 12px; font-weight: 600; color: var(--tvd-muted); font-variant-numeric: tabular-nums; }
.tvd-transcript { max-width: 760px; margin: 18px auto 0; padding: 14px 18px; border-radius: 16px; background: var(--tvd-card, #fff); border: 1px solid var(--tvd-border); }
.tvd-transcript summary { font-weight: 700; font-size: 15px; color: var(--tvd-head); cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.tvd-transcript ol { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.6; }
.tvd-transcript-t { color: var(--tvd-muted); font-variant-numeric: tabular-nums; }

/* ---------- use cases ---------- */
.tvd-uses { list-style: none; margin: 0; padding: 0; }
.tvd-usecard { height: 100%; display: flex; flex-direction: column; gap: 8px; background: var(--tvd-card); border: 1px solid var(--tvd-border); border-radius: var(--tvd-r); box-shadow: var(--tvd-shadow); padding: 20px; }
.tvd-usecard svg { width: 22px; height: 22px; color: var(--tvd-primary); }
.tvd-usecard b { color: var(--tvd-head); font-size: 16px; }
.tvd-usecard span { font-size: 13.5px; line-height: 1.6; }

/* ---------- final CTA ---------- */
.tvd-final { padding: clamp(56px, 7vw, 100px) 0; background: var(--gradient-dark-intel, linear-gradient(135deg, #081220 0%, #2E1065 60%, #4C1D95 100%)); }
.tvd-final-inner { text-align: center; max-width: 860px; }
.tvd-final h2 { color: #fff; font-size: clamp(26px, 3.4vw, 42px); margin: 0 0 26px; text-wrap: balance; }
.tvd-final .tvd-hero-ctas { justify-content: center; }
.tvd-final-talk { margin: 18px 0 0; }
.tvd-final-talk a { color: var(--color-violet-300, #D8B4FE); font-size: 14.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- toast ---------- */
.tvd-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90;
  background: var(--tvd-head); color: #fff; border-radius: var(--radius-md, 12px); padding: 11px 18px;
  font-size: 14px; font-weight: 600; box-shadow: var(--tvd-shadow-lg); max-width: min(92vw, 480px); text-align: center;
}
.tvd-toast[hidden] { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
  .tvd-loop { grid-template-columns: repeat(2, 1fr); }
  .tvd-resume .tvd-btn { margin-left: 0; }
}
@media (max-width: 575.98px) {
  .tvd-loop { grid-template-columns: 1fr; }
  .tvd-flow li:not(:last-child)::after { content: ""; margin: 0; }
  .tvd-captionbar { bottom: 58px; }
  .tvd-bigplay { width: 64px; height: 64px; }
  .tvd-time { display: none; }
  .tvd-form-2col { grid-template-columns: 1fr; }
  .tvd-programs li { grid-template-columns: 1fr; gap: 4px; }
  .tvd-programs b { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .tvd * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .tvd-flow li { opacity: 1; transform: none; }
}
