/* TodPlayer Broadcast Live: layouts and motion layer (theme 3.0).
   Loaded after site.css. Motion uses transform and opacity only; all
   hidden states are gated behind html.js and prefers-reduced-motion. */

:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-io: cubic-bezier(.65, 0, .35, 1); }

/* ---------------------------------------------------------- scroll progress + header */
.scroll-bar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); background: linear-gradient(90deg, var(--accent), var(--accent-light)); box-shadow: 0 0 12px rgba(255, 90, 31, .6); }
.site-head { transition: background-color .3s ease, border-color .3s ease; }
.site-head .head-row { transition: height .3s var(--ease-out); }
.site-head.scrolled { background: rgba(5, 7, 13, .88); border-bottom-color: rgba(34, 43, 69, .9); }
.site-head.scrolled .head-row { height: 58px; }
.brand .tile { transition: transform .5s var(--ease-out); }
.brand:hover .tile { transform: rotate(-8deg) scale(1.06); }
.brand .tile svg path:first-child { transform-origin: 50% 90%; animation: flicker 3.2s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scaleY(1); } 40% { transform: scaleY(1.05) skewX(-1.5deg); } 70% { transform: scaleY(.97) skewX(1deg); } }

/* nav underline that slides in */
.nav > a:not(.btn) { position: relative; }
.nav > a:not(.btn)::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease-out); }
.nav > a:not(.btn):hover::after, .nav > a[aria-current="page"]::after { transform: scaleX(1); }
.drop-menu a { transition: background-color .2s ease, transform .25s var(--ease-out); }
.drop-menu a:hover { transform: translateX(3px); }
.drop-menu .ic { transition: transform .35s var(--ease-out), background-color .2s; }
.drop-menu a:hover .ic { transform: scale(1.08) rotate(-6deg); background: rgba(255, 90, 31, .14); }

/* ---------------------------------------------------------- buttons */
.btn { position: relative; overflow: hidden; isolation: isolate; transition: transform .35s var(--ease-out), background-color .2s ease, border-color .2s ease, box-shadow .3s ease; }
.btn-primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease-out); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 18px 40px -14px rgba(255, 90, 31, .85); }
.magnetic { will-change: transform; }

/* ---------------------------------------------------------- hero */
.hero-live { padding: 64px 0 150px; }
.hero-live::before { display: none; }
.hero-glow { position: absolute; inset: -30% -20% auto 30%; height: 1000px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 90, 31, .20), rgba(255, 90, 31, 0) 70%); }
.kinetic .line, .kinetic-scroll .line { overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.kinetic .line > span, .kinetic-scroll .line > span { display: inline-block; }
.live-stage { perspective: 1800px; }
.live-stage .layer { translate: calc(var(--mx, 0) * var(--d, 0) * 1px) calc((var(--my, 0) * var(--d, 0) + var(--sy, 0) * var(--d, 0) * -.08) * 1px); transition: translate .9s var(--ease-out); will-change: transform, translate; }
.live-stage .screen.tv { transform-style: preserve-3d; }

/* light sweep across the TV */
.sweep { position: relative; }
.sweep::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .10) 48%, rgba(255, 123, 58, .10) 52%, transparent 65%);
  transform: translateX(-110%); }

/* ---------------------------------------------------------- device marquee */
.marquee { overflow: hidden; padding: 0; position: relative; }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 1; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg-raise), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--bg-raise), transparent); }
.marquee-track { display: flex; width: max-content; }
.marquee-set { display: flex; gap: 56px; list-style: none; margin: 0; padding: 24px 28px; color: var(--ink-soft); font-size: 15.5px; font-weight: 500; }
.marquee-set li { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.marquee-set svg { width: 19px; height: 19px; color: var(--accent); }
.marquee-set .soon { color: var(--muted); }
.marquee-set .soon svg { color: var(--muted); }

/* ---------------------------------------------------------- sticky story */
.story-title { max-width: 720px; margin-bottom: 56px; }
.story-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 72px; align-items: start; }
.story-stage { position: sticky; top: 110px; }
.story-frame { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-lg); background: radial-gradient(80% 80% at 50% 40%, rgba(255, 90, 31, .12), transparent 70%), var(--bg-raise); border: 1px solid var(--line-soft); overflow: hidden; }
.story-shot { position: absolute; left: 6%; top: 8%; width: 88%; border-radius: 14px; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9), 0 0 0 6px #0E1427, 0 0 0 7px #283357;
  opacity: 0; transform: translateY(24px) scale(.96); transition: opacity .6s var(--ease-out), transform .8s var(--ease-out); }
.story-shot.phone-shot { width: auto; height: 84%; left: 50%; top: 8%; border-radius: 22px; transform: translate(-50%, 24px) scale(.96); }
.story-shot.on { opacity: 1; transform: none; }
.story-shot.phone-shot.on { transform: translate(-50%, 0); }
.story-meter { height: 3px; background: var(--line-soft); border-radius: 3px; margin-top: 18px; overflow: hidden; }
.story-meter i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--story, .33)); transition: transform .6s var(--ease-out); }
.story-steps { list-style: none; margin: 0; padding: 0; }
.story-step { min-height: 62vh; padding: 8vh 0; border-top: 1px solid var(--line-soft); opacity: .35; transition: opacity .5s ease; }
.story-step:first-child { padding-top: 0; min-height: 52vh; border-top: 0; }
.story-step:last-child { min-height: 48vh; }
.story-step.is-on { opacity: 1; }
.story-step .num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font: 650 15px/1 var(--mono); background: var(--surface-high); border: 1px solid var(--line); color: var(--ink); transition: background-color .4s, border-color .4s, transform .5s var(--ease-out); }
.story-step.is-on .num { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.08); }
.story-step h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin: 20px 0 10px; }
.story-step p { color: var(--ink-soft); font-size: 17px; max-width: 30em; }
.step-img { display: none !important; }

/* ---------------------------------------------------------- bento + spotlight */
.lit { --mx: 50%; --my: 50%; }
.lit::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 90, 31, .12), transparent 45%); }
.lit:hover::before { opacity: 1; }
.lit { position: relative; }
.cell, .panel, .tool, .tip, .hub-grid a, .dev-grid a, .link-grid a { transition: border-color .3s ease, transform .45s var(--ease-out), box-shadow .45s ease; }
a.cell:hover, .hub-grid a:hover, .dev-grid a:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(255, 90, 31, .35); }
.link-grid a:hover { transform: translateY(-2px); border-color: #3A4566; }

/* ---------------------------------------------------------- sofa */
.sofa-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 80px; align-items: center; }
.sofa-stack { position: relative; padding: 9% 0 12% 0; margin-left: -120px; }
.sofa-stack .screen { will-change: translate; translate: 0 calc(var(--sd, 0) * 1px); }
.sofa-back { width: 78%; opacity: .7; }
.sofa-front { position: absolute; width: 78%; right: 0; bottom: 0; }
.feature-grid { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.feature-grid li { padding: 22px 0; border-top: 1px solid var(--line-soft); color: var(--ink-soft); font-size: 15.5px; line-height: 1.55; position: relative; }
.feature-grid li::before { content: ""; position: absolute; top: -1px; left: 0; width: 36px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .8s var(--ease-out) calc(var(--d, 0ms) + 200ms); }
.feature-grid li.in::before { transform: scaleX(1); }
.feature-grid strong { display: block; color: var(--ink); font-weight: 650; font-size: 17px; margin-bottom: 4px; }

/* ---------------------------------------------------------- odometer */
.odometer { display: flex; overflow: hidden; height: .95em; line-height: .95; }
.odometer .dg { position: relative; display: inline-block; width: .62em; height: .95em; overflow: hidden; }
.odometer .reel { display: none; }
.odometer .static { display: block; }

/* ---------------------------------------------------------- faq */
.faq summary { transition: color .2s ease; }
.faq summary:hover { color: var(--accent-light); }
.faq details { transition: border-color .3s ease; }
.faq details[open] { border-bottom-color: rgba(255, 90, 31, .45); }

/* ---------------------------------------------------------- closer */
.closer-glow { position: absolute; right: -10%; bottom: -70%; width: 1000px; height: 1000px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 90, 31, .18), transparent 70%); }
.closer::before { display: none; }

/* ---------------------------------------------------------- page hero words */
.page-hero .h1 .w { display: inline-block; }

/* ==========================================================
   Motion (only when the visitor allows it and JS runs)
   ========================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js .kinetic .line > span { transform: translateY(105%); animation: lineUp 1s var(--ease-out) forwards; animation-delay: calc(var(--i) * 130ms + 120ms); }
  .js .intro { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease-out) forwards; animation-delay: calc(var(--i) * 110ms + 250ms); }
  .js .live-stage .screen.tv { animation: screenIn 1.4s var(--ease-out) .35s both; }
  .js .live-stage .screen.phone { animation: phoneIn 1.3s var(--ease-out) .8s both; }
  .js .sweep::after { animation: sweep 7s var(--ease-io) 2.2s infinite; }
  .js .hero-glow { animation: breathe 9s ease-in-out infinite; }
  .js .closer-glow { animation: breathe 11s ease-in-out infinite; }

  .js .marquee-track { animation: marquee 38s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }

  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0ms); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal-l { opacity: 0; transform: translateX(-40px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
  .js .reveal-l.in { opacity: 1; transform: none; }
  .js .reveal-s { opacity: 0; transform: translateY(30px) scale(.96); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
  .js .reveal-s.in { opacity: 1; transform: none; }

  .js .kinetic-scroll .line > span { transform: translateY(105%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i) * 140ms); }
  .js .kinetic-scroll.in .line > span { transform: none; }

  .js .page-hero .h1 .w { opacity: 0; transform: translateY(.5em); animation: rise .8s var(--ease-out) forwards; animation-delay: calc(var(--i) * 55ms + 80ms); }
  .js .page-hero .lead, .js .page-hero .crumbs, .js .page-hero .updated { opacity: 0; animation: rise .8s var(--ease-out) .35s forwards; }
  .js .page-hero .crumbs { animation-delay: 0s; }

  .js .odometer.ready .reel { display: block; position: absolute; left: 0; top: 0; width: 100%; transform: translateY(0); transition: transform 1.6s var(--ease-out); transition-delay: calc(var(--n) * 120ms); }
  .js .odometer.ready .reel span { display: block; height: .95em; text-align: center; }
  .js .odometer.ready .static { visibility: hidden; }
  .js .odometer.ready.in .reel { transform: translateY(calc(var(--v) * -.95em)); }

  .js .faq details[open] > p, .js .faq details[open] > div { animation: rise .45s var(--ease-out); }
  .js .state.ok, .js .state.warn, .js .state.bad { animation: pulse 2.2s ease-out infinite; }
}

@keyframes lineUp { to { transform: translateY(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes screenIn { from { opacity: 0; transform: translate3d(60px, 30px, 0) rotateY(-14deg) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes phoneIn { from { opacity: 0; transform: translate3d(-30px, 80px, 0) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes sweep { 0% { transform: translateX(-110%); } 35%, 100% { transform: translateX(110%); } }
@keyframes breathe { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 10px transparent; } }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { flex-wrap: wrap; width: auto; }
  .marquee-set[aria-hidden] { display: none; }
  .marquee::before, .marquee::after { display: none; }
  .live-stage .layer, .sofa-stack .screen { translate: none !important; }
  .story-shot { transition: none; }
}

/* ---------------------------------------------------------- responsive */
@media (max-width: 1240px) { .sofa-stack { margin-left: -24px; } }
@media (max-width: 860px) {
  .hero-live { padding: 32px 0 96px; }
  .story-grid, .sofa-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .story-stage { display: none; }
  .story-step, .story-step:first-child, .story-step:last-child { min-height: 0; padding: 32px 0; opacity: 1; }
  .story-step:first-child { padding-top: 0; }
  .step-img { display: block !important; margin-top: 20px; border-radius: 14px; box-shadow: 0 0 0 5px #0E1427, 0 0 0 6px #283357; }
  .step-img.phone-shot { width: 46%; margin-left: auto; margin-right: auto; border-radius: 18px; }
  .story-title { margin-bottom: 24px; }
  .sofa-stack { margin-left: 0; order: 2; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .marquee-set { gap: 36px; padding: 18px 20px; }
  .marquee::before, .marquee::after { width: 48px; }
}

/* ==========================================================
   3.1: tools hub, tools button
   ========================================================== */
.hub-grid > br, .dev-grid > br, .link-grid > br { display: none; }

.btn-tools svg { width: 18px; height: 18px; color: var(--accent); transition: transform .5s var(--ease-out); }
.btn-tools:hover svg { transform: rotate(90deg) scale(1.1); }
.tools-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: rgba(255, 90, 31, .16); color: var(--accent-light); font: 700 12px/1 var(--mono); }
.btn-tools { border-color: rgba(255, 90, 31, .35); }
.btn-tools:hover { border-color: var(--accent); background: rgba(255, 90, 31, .06); }
.tools-more { justify-content: center; margin-top: 36px; }

.tools-hero { position: relative; overflow: hidden; padding: 56px 0 40px; }
.tools-hero .crumbs { margin-bottom: 26px; }
.tools-title { font-size: clamp(38px, 5vw, 68px); }
.tools-title .line { white-space: normal; }
.tools-hero .lead { max-width: 36em; }
.tools-grid-wrap { padding: 24px 0 72px; }

.tools-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.tool-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 28px; min-height: 250px; border-radius: var(--r-lg); border: 1px solid var(--line-soft); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .3s ease, transform .45s var(--ease-out), box-shadow .45s ease; }
.tool-card:hover { transform: translateY(-5px); border-color: #33406A; box-shadow: 0 28px 60px -32px rgba(255, 90, 31, .45); }
.tool-card h2 { margin: 6px 0 0; font-size: 23px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.tool-card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.55; max-width: 30em; }
.tool-card .go { margin-top: auto; padding-top: 18px; font-weight: 600; font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }
.tool-card .go::after { content: "\2192"; color: var(--accent); transition: transform .3s var(--ease-out); }
.tool-card:hover .go::after { transform: translateX(5px); }
.t-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-high); border: 1px solid var(--line); color: var(--accent); transition: transform .5s var(--ease-out), background-color .3s; }
.t-ic svg { width: 22px; height: 22px; }
.tool-card:hover .t-ic { transform: rotate(-8deg) scale(1.08); background: rgba(255, 90, 31, .14); }

.t-checker { grid-column: span 4; grid-row: span 2; background: radial-gradient(120% 120% at 100% 0%, rgba(255, 90, 31, .20), rgba(255, 90, 31, 0) 55%), var(--surface); }
.t-speed, .t-solver { grid-column: span 2; }
.t-errors, .t-setup, .t-fire { grid-column: span 2; }
.t-checker h2 { font-size: 30px; }

.t-demo { display: grid; gap: 12px; margin-top: 18px; max-width: 560px; }
.t-field { height: 50px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); display: flex; align-items: center; padding: 0 14px; overflow: hidden; font: 500 14px var(--mono); color: var(--muted); }
.t-typed { white-space: nowrap; overflow: hidden; display: inline-block; border-right: 2px solid var(--accent); }
.t-status { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; color: var(--ok); }
.t-status i { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); }
.t-keys { display: flex; gap: 8px; flex-wrap: wrap; }
.t-keys b { font-weight: 500; font-size: 13px; color: var(--ink-soft); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }

.t-bars { display: flex; align-items: flex-end; gap: 5px; height: 54px; margin-top: 8px; }
.t-bars i { flex: 1; height: 40%; border-radius: 3px; background: var(--surface-high); transform-origin: 50% 100%; }
.t-bars i:nth-child(3n) { background: var(--accent); }

.t-steps { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.t-steps i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 650 13px/1 var(--mono); font-style: normal; background: var(--surface-high); border: 1px solid var(--line); }
.t-steps i.ok { background: var(--accent); border-color: var(--accent); color: #fff; }
.t-steps i.ok svg { width: 16px; height: 16px; }

.t-codes { height: 1.15em; overflow: hidden; font: 700 40px/1.15 var(--mono); color: var(--code); margin-top: 6px; }
.t-reel { display: flex; flex-direction: column; }
.t-reel b { font-weight: 700; height: 1.15em; }

.t-devices { display: flex; gap: 14px; margin-top: 8px; color: var(--muted); }
.t-devices svg { width: 24px; height: 24px; transition: color .3s, transform .4s var(--ease-out); }
.tool-card:hover .t-devices svg { color: var(--accent); }
.tool-card:hover .t-devices svg:nth-child(2) { transform: translateY(-3px); transition-delay: .05s; }
.tool-card:hover .t-devices svg:nth-child(3) { transform: translateY(-3px); transition-delay: .1s; }
.tool-card:hover .t-devices svg:nth-child(4) { transform: translateY(-3px); transition-delay: .15s; }
.tool-card:hover .t-devices svg:nth-child(5) { transform: translateY(-3px); transition-delay: .2s; }

.t-path { margin-top: 8px; font: 500 13px/1.5 var(--mono); color: var(--code); }
.t-path span { color: var(--muted); }

.tools-why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.tools-why .prose h2 { margin-top: 0; font-size: 26px; }

@media (prefers-reduced-motion: no-preference) {
  .js .t-typed { width: 0; animation: typing 2.6s steps(40, end) .9s forwards, caret .8s step-end infinite; }
  .js .t-status { opacity: 0; animation: rise .6s var(--ease-out) 3.6s forwards; }
  .js .t-status i { animation: ping 2s ease-out 4.2s infinite; }
  .js .t-keys b { opacity: 0; animation: rise .5s var(--ease-out) forwards; }
  .js .t-keys b:nth-child(1) { animation-delay: 3.9s; } .js .t-keys b:nth-child(2) { animation-delay: 4.05s; } .js .t-keys b:nth-child(3) { animation-delay: 4.2s; }
  .js .t-bars i { animation: eq 1.4s ease-in-out infinite; }
  .js .t-bars i:nth-child(2) { animation-delay: -.2s; } .js .t-bars i:nth-child(3) { animation-delay: -.5s; } .js .t-bars i:nth-child(4) { animation-delay: -.8s; } .js .t-bars i:nth-child(5) { animation-delay: -.3s; } .js .t-bars i:nth-child(6) { animation-delay: -1s; } .js .t-bars i:nth-child(7) { animation-delay: -.6s; } .js .t-bars i:nth-child(8) { animation-delay: -1.2s; } .js .t-bars i:nth-child(9) { animation-delay: -.4s; }
  .js .t-steps i { animation: stepOn 4s ease-in-out infinite; }
  .js .t-steps i:nth-child(2) { animation-delay: .5s; } .js .t-steps i:nth-child(3) { animation-delay: 1s; } .js .t-steps i:nth-child(4) { animation-delay: 1.5s; }
  .js .t-reel { animation: reel 7.5s cubic-bezier(.7, 0, .3, 1) infinite; }
  .js .tool-card { animation: cardIn .9s var(--ease-out) backwards; animation-delay: calc(var(--n, 0) * 90ms + 350ms); }
}
@keyframes typing { to { width: 100%; } }
@keyframes caret { 50% { border-color: transparent; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); } 100% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); } }
@keyframes eq { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1.25); } }
@keyframes stepOn { 0%, 20%, 100% { transform: none; border-color: var(--line); } 10% { transform: scale(1.12); border-color: var(--accent); } }
@keyframes reel { 0%, 15% { transform: translateY(0); } 20%, 35% { transform: translateY(-1.15em); } 40%, 55% { transform: translateY(-2.3em); } 60%, 75% { transform: translateY(-3.45em); } 80%, 95% { transform: translateY(-4.6em); } 100% { transform: translateY(-5.75em); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(.97); } }
.tools-bento .tool-card:nth-child(1) { --n: 0; } .tools-bento .tool-card:nth-child(2) { --n: 1; } .tools-bento .tool-card:nth-child(3) { --n: 2; } .tools-bento .tool-card:nth-child(4) { --n: 3; } .tools-bento .tool-card:nth-child(5) { --n: 4; } .tools-bento .tool-card:nth-child(6) { --n: 5; }

@media (max-width: 960px) {
  .tools-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-checker { grid-column: 1 / -1; grid-row: auto; }
  .t-speed, .t-solver, .t-errors, .t-setup, .t-fire { grid-column: auto; }
}
@media (max-width: 600px) {
  .tools-bento { grid-template-columns: minmax(0, 1fr); }
  .tools-why { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tool-card { min-height: 0; }
}
/* 3.1.1: Windows download */
.btn-win svg { width: 18px; height: 18px; color: var(--ink-soft); transition: transform .4s var(--ease-out), color .2s; }
.btn-win:hover svg { color: var(--accent); transform: translateY(-2px); }
.hero-copy .actions { gap: 10px; }
.win-strip { margin-top: 28px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-size: 15px; color: var(--ink-soft); max-width: 640px; }
.win-strip > svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.win-strip strong { color: var(--ink); font-weight: 600; }
.win-strip .btn { margin-left: auto; }
@media (max-width: 480px) { .win-strip .btn { margin-left: 0; width: 100%; } }

/* 3.2: tools bar in the header */
.tools-bar { border-top: 1px solid rgba(34, 43, 69, .55); }
.tools-bar-row { display: flex; align-items: center; gap: 4px; height: 46px; overflow-x: auto; scrollbar-width: none; }
.tools-bar-row::-webkit-scrollbar { display: none; }
.tb-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 8px; white-space: nowrap; }
.tools-bar a { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color .2s, color .2s; }
.tools-bar a .ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-high); color: var(--accent); transition: transform .35s var(--ease-out), background-color .2s; }
.tools-bar a .ic svg { width: 14px; height: 14px; }
.tools-bar a:hover, .tools-bar a[aria-current="page"] { background: rgba(255, 255, 255, .05); color: var(--ink); }
.tools-bar a:hover .ic, .tools-bar a[aria-current="page"] .ic { transform: rotate(-8deg) scale(1.08); background: rgba(255, 90, 31, .16); }
.tools-bar a.tb-all { margin-left: auto; padding: 0 12px; color: var(--accent-light); font-weight: 600; }
.tools-bar a.tb-all::after { content: "\2192"; transition: transform .3s var(--ease-out); }
.tools-bar a.tb-all:hover::after { transform: translateX(3px); }
.site-head.scrolled .tools-bar-row { height: 40px; }
.tools-bar-row { transition: height .3s var(--ease-out); }
html { scroll-padding-top: 130px; }
.story-stage { top: 140px; }
@media (max-width: 960px) {
  .nav { top: 114px; max-height: calc(100vh - 114px); }
  .tools-bar a.tb-all { margin-left: 0; }
  .tb-label { display: none; }
}
/* free IPTV player eyebrow */
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid rgba(255,90,31,.35); background: rgba(255,90,31,.08); color: var(--ink); font-size: 14px; font-weight: 600; }
.hero-eyebrow svg { width: 16px; height: 16px; padding: 3px; border-radius: 50%; background: var(--accent); color: #fff; box-sizing: content-box; }

/* M3U playlist editor */
.m3u-ed textarea.input { height: auto; padding: 12px 16px; line-height: 1.5; resize: vertical; }
.m3u-ed input[type="file"].input { padding: 12px; height: auto; }
.me-work { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 24px; }
.me-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.me-stats div { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; background: var(--bg-raise); }
.me-stats b { display: block; font: 700 28px/1.1 var(--sans); letter-spacing: -.02em; color: var(--ink); }
.me-stats span { font-size: 13px; color: var(--muted); }
.me-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 18px 0 10px; }
.me-bar .input { flex: 1 1 260px; height: 46px; }
.me-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.me-opt { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }
.me-groups { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); max-height: 520px; overflow: auto; }
.me-g { display: grid; grid-template-columns: 44px 1fr; border-bottom: 1px solid var(--line-soft); }
.me-g:last-child { border-bottom: 0; }
.me-g.off .me-name strong { color: var(--muted); text-decoration: line-through; }
.me-check { display: grid; place-items: center; }
.me-check input, .me-items input, .me-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.me-name { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px 12px 0; background: none; border: 0; color: var(--ink); text-align: left; cursor: pointer; font: 500 15px var(--sans); }
.me-name strong { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-type { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.me-type.t-live { color: var(--accent-light); border-color: rgba(255, 90, 31, .35); }
.me-count { font: 600 13px var(--mono); color: var(--ink-soft); min-width: 64px; text-align: right; }
.me-items { grid-column: 1 / -1; list-style: none; margin: 0; padding: 4px 14px 12px 44px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.me-items label { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-more, .me-empty { color: var(--muted); font-size: 14px; padding: 8px 0; grid-column: 1 / -1; }
.me-empty { padding: 18px; }
.me-foot { margin-top: 18px; }
@media (max-width: 600px) { .me-stats { grid-template-columns: minmax(0, 1fr); } .me-items { padding-left: 14px; } }
/* M3U card on tools hub */
.t-m3u { grid-column: 1 / -1; min-height: 0; }
.t-new { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.t-groups { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.t-groups i { font-style: normal; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: line-through; }
.t-groups i.on { color: var(--ink); text-decoration: none; border-color: rgba(255,90,31,.4); background: rgba(255,90,31,.08); }
@media (prefers-reduced-motion: no-preference) { .js .t-groups i:not(.on) { animation: strike 3s ease-in-out infinite; } .js .t-groups i:nth-child(5) { animation-delay: 1.5s; } }
@keyframes strike { 0%, 30% { opacity: 1; } 50% { opacity: .35; } 100% { opacity: 1; } }
.tools-bento .tool-card:nth-child(7) { --n: 6; }

/* copy Downloader code */
.odometer { user-select: none; -webkit-user-select: none; cursor: copy; }
.code-actions { margin: 4px 0 14px; }
.copy-code svg { width: 16px; height: 16px; }
.copy-code.copied { border-color: var(--ok); color: var(--ok); }
.code-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 8px; border: 1px dashed rgba(255,181,71,.45); background: rgba(255,181,71,.06); font: 600 16px var(--mono); color: var(--code); cursor: copy; }
.code-chip svg { width: 14px; height: 14px; opacity: .8; }
.code-chip:hover { background: rgba(255,181,71,.12); }
.code-chip.copied { border-color: var(--ok); color: var(--ok); }
.code-chip.copied svg { display: none; }
.code-chip.copied::after { content: "Copied"; font: 600 12px var(--sans); }
.odometer.copied { opacity: .7; }
.code-box .copy-code { flex: none; }

.copy-manual, .copy-manual span { user-select: text; -webkit-user-select: text; }
.copy-code.copy-manual span { font-family: var(--mono); color: var(--code); }

/* 3.4: Upload playlist buttons */
.btn-upload { background: rgba(255,90,31,.10); color: var(--ink); border-color: rgba(255,90,31,.55); }
.btn-upload:hover { background: rgba(255,90,31,.18); border-color: var(--accent); }
.btn-upload svg { width: 18px; height: 18px; color: var(--accent); transition: transform .4s var(--ease-out); }
.btn-upload:hover svg { transform: translateY(-3px); }
.sub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sub-actions .btn svg { width: 16px; height: 16px; }
.head-row { gap: 12px; }
.head-upload { order: 2; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid rgba(255,90,31,.5); background: rgba(255,90,31,.08); color: var(--ink); text-decoration: none; font: 600 14px/1 var(--sans); white-space: nowrap; transition: background-color .2s, border-color .2s; }
.head-upload:hover, .head-upload[aria-current="page"] { background: rgba(255,90,31,.18); border-color: var(--accent); }
.head-upload svg { width: 17px; height: 17px; color: var(--accent); }
.head-row .brand { order: 1; }
.head-row .nav { order: 3; }
.head-row .nav-toggle { order: 4; }
@media (min-width: 961px) { .head-upload { margin-left: auto; } .head-row .nav { margin-left: 0; } }
@media (max-width: 960px) { .head-upload { height: 44px; } }
@media (max-width: 400px) { .head-upload span { display: none; } .head-upload { width: 44px; padding: 0; justify-content: center; } }
/* panel button (signed-in managers only) */
.head-panel { order: 2; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--r-md); background: var(--accent); color: #fff; text-decoration: none; font: 600 14px/1 var(--sans); white-space: nowrap; }
.head-panel:hover { background: var(--accent-light); }
.head-panel svg { width: 17px; height: 17px; }
.head-panel + .head-upload { margin-left: 0; }
.head-row:has(.head-panel) .head-panel { margin-left: auto; }
@media (max-width: 960px) { .head-panel { height: 44px; } }
@media (max-width: 480px) { .head-panel span, .head-panel + .head-upload span { display: none; } .head-panel, .head-panel + .head-upload { width: 44px; padding: 0; justify-content: center; } }
