/* SlateRoom case study (css/sr-studies.css): animated studies of the product's interface.
   Product pieces sit under .sx and use SlateRoom's own tokens (dark, Apple-like system type),
   so they read as the product rather than as the portfolio. Motion lives in js/sr-studies.js. */

.sx {
    --page: #000;
    --tile: #1d1d1f;
    --inner: #2a2a2d;
    --line: rgba(255, 255, 255, 0.09);
    --text: #f5f5f7;
    --sec: #a1a1a6;
    --ter: #7c7c82;
    --blue: #0071e3;
    --link: #2997ff;
    --green: #30d158;
    --red: #ff453a;
    --amber: #ffb340;
    --violet: #bf5af2;
    --lilac: #d4a5ff;
    --e: cubic-bezier(0.22, 1, 0.36, 1);
    font-family: -apple-system, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.01em;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}
.sx *, .sx *::before, .sx *::after { box-sizing: border-box; }
.sx p { margin: 0; }

/* ---------- Stages ---------- */
.sx-stage { position: relative; display: grid; place-items: center; padding: clamp(48px, 6vw, 88px) clamp(16px, 5vw, 72px); overflow: hidden; background: var(--stage); }
.sx-stage--sand { --stage: #ece4d6; }
.sx-stage--lilac { --stage: #e6e0f3; }
.sx-stage--mist { --stage: #e4e7ec; }
.sx-stage--night { --stage: #07101f; background: radial-gradient(900px 520px at 85% -10%, rgba(0, 113, 227, 0.4), transparent 62%), radial-gradient(700px 500px at 0% 110%, rgba(191, 90, 242, 0.22), transparent 60%), #07101f; }
.sx-stage--ink { --stage: #0c0c0e; background: radial-gradient(800px 480px at 100% 0%, rgba(48, 209, 88, 0.14), transparent 60%), #0c0c0e; }
.sx-stage__tag { position: absolute; top: 18px; left: 20px; font: 500 12px/1 -apple-system, system-ui, sans-serif; letter-spacing: 0.02em; color: rgba(0, 0, 0, 0.6); }
.sx-stage--night .sx-stage__tag, .sx-stage--ink .sx-stage__tag { color: rgba(255, 255, 255, 0.66); }
.sx-replay { position: absolute; right: 16px; bottom: 16px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; font: 600 12.5px/1 -apple-system, system-ui, sans-serif; color: #111; border: 0; border-radius: 999px; cursor: pointer; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.12); opacity: 0; transition: opacity 0.4s; }
.sx-replay svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sx-stage.is-done .sx-replay { opacity: 1; }
.sx-replay:focus-visible { opacity: 1; outline: 2px solid var(--link); outline-offset: 2px; }

/* Side-by-side studies share a height */
.gallery > figure > .sx-stage { flex: 1; }

/* ---------- Shared product pieces ---------- */
.sx-card { width: 100%; border-radius: 24px; background: var(--tile); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 40px 80px -30px rgba(0, 0, 0, 0.55); }
.sx-kicker { font-size: 13px; font-weight: 600; color: var(--text); }
.sx-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-style: normal; font-weight: 500; white-space: nowrap; vertical-align: 1px; }
.sx-pill--blue { background: rgba(0, 113, 227, 0.2); color: #64b5ff; }
.sx-pill--green { background: rgba(48, 209, 88, 0.16); color: #4ee07a; }
.sx-pill--amber { background: rgba(255, 179, 64, 0.16); color: var(--amber); }
.sx-pill--violet { background: rgba(191, 90, 242, 0.2); color: var(--lilac); }
.sx-tc { display: inline-block; padding: 0 7px; border: 1px solid rgba(41, 151, 255, 0.45); border-radius: 7px; background: rgba(41, 151, 255, 0.08); color: var(--link); font-variant-numeric: tabular-nums; font-weight: 600; }
.sx-link { color: var(--link); }
.sx-n { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; }
.sx-n--ring { background: transparent; box-shadow: inset 0 0 0 1.5px #3d8bff; color: #cfe3ff; }
.sx-spin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: var(--link); animation: sx-spin 0.8s linear infinite; }
.sx-spin--w { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
@keyframes sx-spin { to { transform: rotate(360deg); } }

.sx-swap { position: relative; display: inline-grid; }
.sx-swap > * { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px; transition: opacity 0.35s, transform 0.5s var(--e); }
.sx-swap > :not(.is-on) { opacity: 0; transform: translateY(6px); pointer-events: none; }

.sx-cursor { position: absolute; left: 0; top: 0; z-index: 6; width: 22px; height: 22px; pointer-events: none; opacity: 0; transform: translate(var(--x, 80%), var(--y, 110%)); transition: transform 0.8s var(--e), opacity 0.3s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }
.sx-cursor.is-on { opacity: 1; }
.sx-cursor svg { display: block; width: 100%; height: 100%; transition: transform 0.12s; transform-origin: 20% 15%; }
.sx-cursor.is-down svg { transform: scale(0.86); }
.is-press { transform: scale(0.97); }

/* Reveal helper: items start lowered and faded until the study turns them on */
.sx [data-item], .sx [data-evrow], .sx [data-get], .sx [data-file] { transition: opacity 0.5s, transform 0.7s var(--e); }
.sx .is-off { opacity: 0; transform: translateY(10px); }

/* ---------- 1. Verdict ---------- */
.sx-verdict { max-width: 920px; padding: clamp(24px, 3.4vw, 40px); }
.sx-verdict__top { position: relative; min-height: 132px; }
.sx-bar { height: 3px; margin-top: 14px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, 0.08); transition: opacity 0.4s; }
.sx-bar i { display: block; width: 100%; height: 100%; background: var(--link); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.sx-verdict__word { margin-top: 6px; font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif; font-size: clamp(44px, 6vw, 72px); font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; color: var(--amber); transition: opacity 0.6s, transform 0.8s var(--e); }
.sx-verdict__sum { margin-top: 10px; font-size: clamp(16px, 1.7vw, 21px); font-weight: 600; letter-spacing: -0.02em; color: var(--sec); transition: opacity 0.6s 0.15s; }
.sx-verdict.is-reading .sx-verdict__word { opacity: 0; transform: translateY(14px); }
.sx-verdict.is-reading .sx-verdict__sum { opacity: 0; }
.sx-verdict:not(.is-reading) .sx-bar { opacity: 0; }
.sx-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.sx-col { padding: 20px 20px 8px; border-radius: 20px; }
.sx-col--fix { background: linear-gradient(180deg, rgba(255, 179, 64, 0.12), rgba(255, 179, 64, 0.05)); box-shadow: inset 0 0 0 1px rgba(255, 179, 64, 0.22); }
.sx-col--keep { background: linear-gradient(180deg, rgba(48, 209, 88, 0.11), rgba(48, 209, 88, 0.04)); box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.2); }
.sx-col__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px !important; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.sx-ico { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 14px; font-weight: 800; color: #1d1d1f; }
.sx-ico--fix { background: var(--amber); }
.sx-ico--keep { background: var(--green); }
.sx-ico svg, .sx-tick svg, .sx-box svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sx-tick { display: grid; place-items: center; width: 22px; height: 22px; color: var(--green); }
.sx-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; }
.sx-item + .sx-item { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.sx-item b { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.sx-item small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--sec); }
.sx-time { padding-top: 1px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--sec); }
.sx-verdict__foot { margin-top: 20px !important; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ter); transition: opacity 0.6s; }

/* ---------- 2. Suggested change + player ---------- */
.sx-change { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; width: 100%; max-width: 1080px; }
.sx-chg { padding: 14px; border-radius: 22px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px -30px rgba(0, 0, 0, 0.6); transition: box-shadow 0.4s; }
.sx-chg.is-on { box-shadow: inset 0 0 0 1px rgba(41, 151, 255, 0.55), 0 0 0 4px rgba(0, 113, 227, 0.12), 0 40px 80px -30px rgba(0, 0, 0, 0.6); }
.sx-inc { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 14px; font-size: 15px; font-weight: 500; background: rgba(41, 151, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(41, 151, 255, 0.5); transition: background 0.35s, box-shadow 0.35s, transform 0.15s; }
.sx-box { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #3a3a3c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); color: transparent; transition: background 0.3s, color 0.3s; }
.sx-inc__label { flex: 1; }
.sx-inc__state { font-size: 12px; font-weight: 500; }
.sx-inc__state > * { justify-self: end; height: 24px; padding: 0 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); color: var(--text); }
.sx-chg.is-on .sx-inc { background: var(--blue); box-shadow: none; }
.sx-chg.is-on .sx-box { background: transparent; box-shadow: none; color: #fff; }
.sx-chg.is-on .sx-inc__state > * { background: rgba(255, 255, 255, 0.2); }
.sx-chg__title { display: flex; align-items: flex-start; gap: 10px; margin: 16px 6px 0 !important; font-size: clamp(16px, 1.6vw, 19px); font-weight: 650; line-height: 1.3; letter-spacing: -0.02em; }
.sx-chg__title > span:nth-child(2) { flex: 1; }
.sx-chg__title em { padding-top: 3px; font-size: 11px; font-style: normal; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sec); }
.sx-chg__do { margin: 10px 6px 0 !important; font-size: 15px; }
.sx-chg__why { margin: 6px 6px 0 !important; font-size: 13.5px; color: var(--sec); }
.sx-ev { display: grid; grid-template-rows: 0fr; margin: 0 6px; transition: grid-template-rows 0.7s var(--e), margin 0.7s var(--e); }
.sx-ev.is-open { grid-template-rows: 1fr; margin: 14px 6px 0; }
.sx-ev__in { overflow: hidden; border-radius: 14px; background: #161618; box-shadow: inset 0 0 0 1px var(--line); }
.sx-ev__row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 13px 14px; font-size: 13.5px; line-height: 1.4; }
.sx-ev__row + .sx-ev__row { border-top: 1px solid var(--line); }
.sx-ev__row > span { font-size: 12px; color: var(--ter); }
.sx-ev__row q { font-style: italic; }
.sx-ev__row small { display: block; margin-top: 4px; font-size: 12px; color: var(--sec); }
.sx-chg__actions { display: flex; align-items: center; justify-content: space-between; margin: 14px 6px 4px; font-size: 13px; }
.sx-ghost { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 99px; background: #2c2c2e; }

.sx-player { padding: 12px; border-radius: 22px; }
.sx-seg { display: inline-flex; padding: 3px; border-radius: 99px; background: #2c2c2e; font-size: 12.5px; font-weight: 500; }
.sx-seg span { padding: 6px 12px; border-radius: 99px; color: var(--sec); transition: background 0.35s, color 0.35s; }
.sx-seg .is-on { background: #fff; color: #111; }
.sx-video { position: relative; margin-top: 10px; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 14px; background: #000; }
.sx-video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 0.6s, transform 1.6s var(--e); }
.sx-video img.is-on { opacity: 1; transform: none; }
.sx-video__cap { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(20, 20, 22, 0.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 12.5px; font-weight: 600; opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.6s var(--e); }
.sx-video__cap.is-on { opacity: 1; transform: none; }
.sx-play { width: 22px; height: 22px; flex: none; border-radius: 50%; background: #fff; -webkit-mask: radial-gradient(circle, #000 99%, transparent); position: relative; }
.sx-play::after { content: ''; position: absolute; left: 8px; top: 6px; border-left: 8px solid #111; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.sx-scrub { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--sec); }
.sx-scrub__btn { width: 26px; height: 26px; flex: none; border-radius: 50%; background: #2c2c2e; position: relative; }
.sx-scrub__btn::after { content: ''; position: absolute; left: 10px; top: 8px; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.sx-scrub__bar { position: relative; flex: 1; height: 4px; border-radius: 4px; background: #3a3a3c; }
.sx-scrub__bar i { position: absolute; left: 0; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -2px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.25); transform: translateX(var(--h, 0px)); transition: transform 0.4s linear; }
.sx-strips { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sx-strip { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 11.5px; color: var(--sec); }
.sx-track { position: relative; height: 22px; border-radius: 6px; background: linear-gradient(90deg, #3a3a3c, #2f2f31); overflow: hidden; }
.sx-track__moment { position: absolute; top: 0; bottom: 0; left: 0; display: grid; place-items: center; width: 16%; border-radius: 6px; background: var(--blue); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 600; transform: translateX(var(--tx, 0)); transition: transform 1.1s var(--e); }

/* ---------- 3. Viewership chart ---------- */
.sx-chart { position: relative; max-width: 600px; padding: 20px 20px 16px; }
.sx-chart__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sx-chart__head b { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; }
.sx-legend { display: inline-flex; gap: 6px; }
.sx-legend .sx-pill { transition: opacity 0.4s, transform 0.5s var(--e); }
.sx-legend .sx-pill.is-off { opacity: 0.25; transform: none; }
.sx-plot { display: block; width: 100%; height: auto; overflow: visible; }
.sx-grid line { stroke: rgba(255, 255, 255, 0.06); }
.sx-bands rect { transition: opacity 0.5s; }
.sx-bands rect.cut { fill: rgba(255, 69, 58, 0.32); }
.sx-bands rect.keep { fill: rgba(48, 209, 88, 0.3); }
.sx-bands text { font: 600 10px -apple-system, system-ui, sans-serif; text-anchor: middle; fill: var(--sec); }
.sx-bands.is-off { opacity: 0; }
.sx-bands { transition: opacity 0.6s; }
.sx-area { fill: url(#sx-fill); }
.sx-line { fill: none; stroke: var(--green); stroke-width: 2.4; filter: drop-shadow(0 0 6px rgba(48, 209, 88, 0.5)); }
.sx-exp { fill: none; stroke: #a8c8ff; stroke-width: 1.8; stroke-dasharray: 2 4; stroke-linecap: round; }
.sx-talk rect { fill: var(--lilac); transform-box: fill-box; transform-origin: bottom; transition: transform 0.6s var(--e); }
.sx-talk.is-off rect { transform: scaleY(0); }
.sx-lane { stroke: rgba(212, 165, 255, 0.25); }
.sx-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--ter); }
.sx-chart__note { margin-top: 12px; font-size: 12px; line-height: 1.4; color: var(--sec); }
.sx-tip { position: absolute; left: 29%; top: 30%; width: 168px; padding: 6px; border-radius: 14px; background: rgba(28, 28, 30, 0.92); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 20px 40px -10px rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transform: translateY(8px) scale(0.96); transition: opacity 0.4s, transform 0.6s var(--e); }
.sx-tip.is-on { opacity: 1; transform: none; }
.sx-tip img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; }
.sx-tip p { padding: 7px 4px 3px; font-size: 11.5px; line-height: 1.35; color: var(--sec); }
.sx-tip b { color: var(--text); }

/* ---------- 4. Clips ---------- */
.sx-clips { max-width: 600px; padding: 20px; }
.sx-clips__title { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.sx-clips__sub { margin-top: 4px !important; font-size: 12.5px; color: var(--sec); }
.sx-formats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.sx-fmt { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; font-weight: 500; color: var(--sec); background: #2a2a2d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); transition: color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.15s; }
.sx-fmt.is-on { color: var(--text); background: rgba(41, 151, 255, 0.12); box-shadow: inset 0 0 0 1.5px var(--link); }
.sx-frame-wrap { display: grid; place-items: center; height: 280px; margin-top: 14px; border-radius: 14px; background: #121214; }
.sx-frame { position: relative; height: 252px; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; border-radius: 10px; background: #000; transition: aspect-ratio 1s var(--e); }
.sx-frame.is-v { aspect-ratio: 9 / 16; }
.sx-frame__wide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s 0.3s; }
.sx-frame__stack { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s 0.5s; }
/* Each crop is placed as an explicit half: Safari let grid-row images grow to the full frame height */
.sx-frame__stack img { position: absolute; left: 0; top: 0; width: 100%; height: 50%; object-fit: cover; }
.sx-frame__stack img + img { top: 50%; }
.sx-frame.is-v .sx-frame__wide { opacity: 0; transition-delay: 0s; }
.sx-frame.is-v .sx-frame__stack { opacity: 1; }
.sx-clips__note { margin-top: 12px !important; font-size: 12.5px; color: var(--sec); transition: opacity 0.5s; }

/* ---------- 5. Editor handoff ---------- */
.sx-prev { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 10px; border-radius: 16px; background: #222225; }
.sx-prev__img { position: relative; flex: none; display: grid; place-items: center; width: 132px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; }
.sx-prev__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sx-prev__img .sx-play { position: relative; }
.sx-prev p { font-size: 12.5px; line-height: 1.4; color: var(--sec); }
.sx-prev b { display: block; margin-bottom: 2px; font-size: 14px; font-weight: 600; color: var(--text); }
.sx-hand { max-width: 1080px; padding: clamp(20px, 3vw, 32px); }
.sx-hand__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sx-hand__head .sx-kicker { font-weight: 500; color: var(--sec); }
.sx-hand__title { margin-top: 6px !important; font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif; font-size: clamp(26px, 3vw, 38px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.sx-hand__sub { margin-top: 8px !important; font-size: 14px; color: var(--sec); }
.sx-btn { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 14.5px; font-weight: 600; transition: transform 0.15s, background 0.3s; }
.sx-btn.is-done { background: #1f7a3a; }
.sx-hand__body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; margin-top: 24px; }
.sx-gets, .sx-tl { padding: 20px; border-radius: 20px; background: #161618; box-shadow: inset 0 0 0 1px var(--line); }
.sx-gets__h { margin-top: 18px !important; font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.sx-gets__h:first-child { margin-top: 0 !important; }
.sx-gets__h--done { color: var(--green); }
.sx-gets__h--todo { color: var(--amber); }
.sx-gets__h--dec { color: #ff8a80; }
.sx-gets__i { margin-top: 8px !important; font-size: 14px; line-height: 1.4; }
.sx-gets__i code { display: block; margin-top: 3px; font: 11.5px/1.4 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ter); }
.sx-tl__ruler { display: flex; justify-content: space-between; margin-left: 64px; font: 10.5px ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ter); }
.sx-tl__row { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 8px; font-size: 11.5px; color: var(--sec); }
.sx-tl__track { position: relative; height: 30px; border-radius: 6px; background: #0e0e10; }
.sx-tl__track i { position: absolute; top: 2px; bottom: 2px; left: var(--l); width: var(--w); border-radius: 4px; background: #48484c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); transform-origin: left; transition: transform 0.7s var(--e), opacity 0.4s; }
.sx-tl__track i.hl { background: var(--blue); }
.sx-tl__track--m { height: 24px; }
.sx-tl__track b { position: absolute; top: 2px; bottom: 2px; left: var(--l); display: flex; align-items: center; padding: 0 10px; border-radius: 4px; font-size: 10.5px; font-weight: 600; color: #08120b; transition: opacity 0.4s, transform 0.6s var(--e); }
.sx-tl__track b.keep { background: var(--green); }
.sx-tl__track b.rec { background: var(--amber); color: #2a1a00; }
.sx-hand .sx-tl__track i.is-off { transform: scaleX(0); opacity: 1; }
.sx-hand .sx-tl__track b.is-off { opacity: 0; transform: translateY(4px); }
.sx-files { margin: 16px 0 0; padding: 0; list-style: none; }
.sx-files li { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13px; border-top: 1px solid var(--line); }
.sx-files li span { display: grid; place-items: center; flex: none; width: 36px; height: 24px; border-radius: 6px; background: #2c2c2e; font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--sec); }
.sx-files li em { margin-left: auto; padding-left: 10px; font-style: normal; font-size: 12px; color: var(--ter); text-align: right; }

/* ---------- Narrow screens ---------- */
@media (max-width: 991px) {
    .sx-change { grid-template-columns: 1fr; }
    .sx-hand__body { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .sx-stage { padding: 52px 12px 60px; }
    .sx-cols { grid-template-columns: 1fr; }
    .sx-ev__row { grid-template-columns: 1fr; gap: 4px; }
    .sx-inc__state { display: none; }
    .sx-legend .sx-pill { padding: 0 7px; font-size: 10.5px; }
    .sx-tip { display: none; }
    .sx-prev { flex-direction: column; align-items: stretch; }
    .sx-prev__img { width: 100%; }
    .sx-clips { padding: 16px 14px; }
    .sx-frame-wrap { height: auto; padding: 10px; }
    .sx-frame { width: 100%; height: auto; }
    .sx-frame.is-v { width: min(300px, 70vw); height: auto; } /* explicit width: Safari stretches width:auto boxes to the container */
    .sx-files li em { display: none; }
    .sx-tl__ruler { margin-left: 0; }
    .sx-tl__row { grid-template-columns: 1fr; gap: 4px; }
}
