/* YouTube transcript tool (/tools/youtube-transcript/, assets/js/tools/yt-transcript.js). Loaded after v2-pages.css.
   Result card, blurred lock block, notices, QR (desktop only), loading steps, "web vs app" cards. Prefix: ytt. */

/* hero: tighter on phones so the field + button sit above the fold at 360x640 */
.ytt-hero .tl-intro__h .h1 { max-width: 20ch; }
.ytt .lp-load .btn { white-space: nowrap; }
.ytt-ts:empty { display: none; }
.ytt-ts { margin: 0.75rem 0.4rem 0; }
.ytt-note { margin: 0.7rem 0.4rem 0; font-size: 0.8125rem; line-height: 1.45; color: var(--v2-muted, #8D93A3); }
.ytt-note a { color: inherit; }
.ytt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ytt-out { scroll-margin-top: 5.5rem; outline: none; }
.ytt-out:empty { display: none; }

/* cards */
.ytt-card { margin-top: 1rem; padding: clamp(1.1rem, 2.6vw, 1.75rem); border-radius: 22px; background: #12141B; box-shadow: inset 0 0 0 1px var(--v2-line, rgba(255,255,255,.08)); color: #DCE0E8; min-width: 0; }
.ytt-card h2:focus { outline: none; }
.ytt-card h2:focus-visible { outline: 2px solid #3C8FE6; outline-offset: 4px; }
.ytt-kicker { margin: 0 0 0.35rem; font: 600 0.75rem/1 var(--sc-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #7CC4F7; }
.ytt-title { margin: 0; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); line-height: 1.2; font-weight: 600; color: var(--sc-ink); text-wrap: balance; overflow-wrap: anywhere; }
.ytt-meta { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; font-size: 0.875rem; color: #A5ABBA; }
.ytt-meta a { color: #DCE0E8; }
.ytt-sum { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--v2-line, rgba(255,255,255,.08)); display: grid; gap: 0.6rem; }
.ytt-sum p { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.ytt-sum b { color: #7CC4F7; font-weight: 600; margin-right: 0.25rem; }
.ytt-sum__tldr { font-size: 1.0625rem; color: var(--sc-ink); }
.ytt-sec { margin: 1.25rem 0 0.6rem; padding-top: 1rem; border-top: 1px solid var(--v2-line, rgba(255,255,255,.08)); font-size: 1rem; font-weight: 600; color: var(--sc-ink); }
.ytt-sec small { margin-left: 0.4rem; font: 400 0.75rem/1 var(--sc-font-mono); color: #8D93A3; }
.ytt-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.ytt-lines li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0.5rem; line-height: 1.5; }
.ytt-lines span { overflow-wrap: anywhere; }
.ytt-t { font: 500 0.8125rem/1.9 var(--sc-font-mono); color: #7CC4F7; font-variant-numeric: tabular-nums; text-decoration: none; }
.ytt-t:hover, .ytt-t:focus-visible { text-decoration: underline; }
.ytt-small { margin: 0; font-size: 0.8125rem; color: #A5ABBA; }
.ytt-credit { margin-top: 1rem; }

/* lock: generated grey bars (never real text) under an overlay */
.ytt-lock { display: grid; margin-top: 0.75rem; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--v2-line, rgba(255,255,255,.08)); }
.ytt-lock > * { grid-area: 1 / 1; min-width: 0; }
.ytt-lock__fake { padding: 0.9rem 1rem; display: grid; gap: 0.75rem; filter: blur(3px); opacity: 0.55; user-select: none; pointer-events: none; }
.ytt-lock__fake p { margin: 0; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0.9rem; align-items: center; }
.ytt-lock__fake b { display: block; height: 0.7rem; border-radius: 4px; background: #2C4A66; }
.ytt-lock__fake i { display: block; height: 0.8rem; border-radius: 5px; background: #3A3E4B; }
.ytt-lock__panel { position: relative; display: grid; justify-items: center; align-content: center; gap: 0.7rem; padding: 1.5rem 1rem; text-align: center;
  background: linear-gradient(180deg, rgba(18, 20, 27, 0.55) 0%, rgba(18, 20, 27, 0.92) 40%); }
.ytt-lock__icon svg { width: 22px; height: 22px; fill: #7CC4F7; }
.ytt-lock__title { margin: 0; max-width: 30ch; font-size: 1.0625rem; font-weight: 600; line-height: 1.35; color: var(--sc-ink); text-wrap: balance; }
.ytt-lock__more { margin: 0; font-size: 0.875rem; color: #A5ABBA; }
.ytt-lock__cta { display: flex; align-items: center; justify-content: center; gap: 1.25rem; flex-wrap: wrap; }

/* notices */
.ytt-notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; }
.ytt-notice__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in oklab, #F2F3F7 7%, transparent); }
.ytt-notice__icon svg { width: 24px; height: 24px; fill: #7CC4F7; }
.ytt-notice--warn .ytt-notice__icon svg { fill: #F5B85A; }
.ytt-notice__icon.is-tiktok svg, .ytt-notice__icon.is-x svg { fill: var(--sc-ink); }
.ytt-notice__icon.is-instagram svg { fill: #E1306C; }
.ytt-notice__icon.is-facebook svg { fill: #1877F2; }
.ytt-notice__icon.is-linkedin svg { fill: #0A66C2; }
.ytt-notice__body p { margin: 0.5rem 0 0; color: #A5ABBA; max-width: 58ch; line-height: 1.5; }
.ytt-note__cta { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.ytt-runline { color: var(--sc-ink); font-size: 0.9375rem; text-decoration: underline; text-decoration-color: #3C8FE6; text-underline-offset: 0.25em; }
.ytt .btn--wrap { white-space: normal; text-align: center; line-height: 1.25; }
.ytt .btn--ghost { background: transparent; color: var(--sc-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }
.ytt .btn--sm { min-height: 44px; padding: 0.6rem 1.2rem; font-size: 0.9375rem; }

/* QR: desktop only (phones get the button) */
.ytt-qr { display: none; margin: 0; text-align: center; }
.ytt-qr img { display: block; width: 132px; height: 132px; margin: 0 auto; padding: 6px; border-radius: 12px; background: #fff; image-rendering: pixelated; }
.ytt-qr figcaption { margin-top: 0.4rem; font-size: 0.75rem; color: #A5ABBA; }

/* loading */
.ytt-steps { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.ytt-steps li { display: flex; align-items: center; gap: 0.6rem; color: #8D93A3; }
.ytt-steps [data-s="active"], .ytt-steps [data-s="done"] { color: var(--sc-ink); }
.ytt-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px #3A3E4B; }
.ytt-steps [data-s="done"] .ytt-dot { background: var(--v2-good, #4ADE80); box-shadow: none; }
.ytt-steps [data-s="active"] .ytt-dot { box-shadow: none; border: 2.5px solid #3C8FE6; border-right-color: transparent; animation: ytt-spin 0.9s linear infinite; }
.ytt-skel { margin-top: 1.1rem; display: grid; gap: 0.6rem; }
.ytt-skel i { display: block; height: 0.75rem; border-radius: 6px; background: linear-gradient(90deg, #1E2029, #2A2D38, #1E2029); background-size: 200% 100%; animation: ytt-shimmer 1.4s ease-in-out infinite; }
.ytt-skel i:nth-child(2) { width: 82%; } .ytt-skel i:nth-child(3) { width: 90%; } .ytt-skel i:nth-child(4) { width: 64%; }
@keyframes ytt-spin { to { rotate: 360deg; } }
@keyframes ytt-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* "how it works" step 3 visual */
.ytt-mini p { margin: 0 0 0.35rem; font-size: 0.8125rem; color: #DCE0E8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ytt-mini b { margin-right: 0.5rem; font: 500 0.75rem var(--sc-font-mono); color: #7CC4F7; }
.ytt-mini__blur { display: flex; align-items: center; filter: blur(2px); opacity: 0.6; }
.ytt-mini__blur i { display: inline-block; width: 70%; height: 0.7rem; border-radius: 4px; background: #3A3E4B; }

/* web vs app */
.ytt-vs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sc-5, 1.5rem); margin-top: var(--sc-6, 2rem); }
.ytt-vs .card { min-width: 0; }
.ytt-vs ul { margin: 0.75rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.5rem; color: #C3C8D3; line-height: 1.5; }
.ytt-vs .card__ico svg { fill: #FF0033; }
.ytt-vs__ico { display: block; width: 44px; height: 44px; border-radius: 11px; }
.ytt-vs .note { margin: 1rem 0 0; }
.ytt-shot { display: block; width: 100%; height: auto; border-radius: 22px; }

@media (min-width: 1024px) {
  .ytt-qr { display: block; }
  .ytt-notice--qr { grid-template-columns: auto minmax(0, 1fr) auto; }
}
@media (max-width: 860px) {
  .ytt-vs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .ytt-hero { padding-bottom: 1.5rem; }
  .ytt-hero .tl-intro__h .h1 { font-size: 1.75rem; line-height: 1.08; }
  .ytt-hero .tl-intro__p .lede { font-size: 1rem; }
  .ytt-hero .tl-intro { row-gap: 0.6rem; }
  .ytt-notice { grid-template-columns: minmax(0, 1fr); }
  .ytt-note__cta .btn, .ytt-lock__cta .btn { width: 100%; }
  .ytt-lines li { grid-template-columns: 3rem minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .ytt-skel i, .ytt-steps [data-s="active"] .ytt-dot { animation: none; }
}
.ytt-notice__sub { color: var(--sc-ink) !important; font-weight: 500; overflow-wrap: anywhere; }
