/**
 * Loom page "How it works": from an idea to a film (js/loom-tour.js).
 *
 * Six scripted scenes in one paper-look Loom window. Every scene is in the
 * HTML; the script only sets .is-active on the scene on screen, .is-on on
 * elements whose cue has come, --p on progress bars, and types text.
 * Without the script (or under reduced motion) each scene shows its last
 * frame, which is also how the markup reads.
 */

.lt {
    --lt-h: 28rem;
    --lt-ease: cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* ── Step tabs ── */
.lt-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}

.lt-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.65rem 0.75rem 0.75rem;
    border: 1px solid var(--lm-rule);
    border-radius: 10px;
    background: var(--lm-paper);
    color: var(--lm-muted);
    font: 600 0.9rem/1.2 var(--lm-f-body);
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.lt-tab:hover {
    color: var(--lm-ink);
    border-color: var(--lm-muted);
}

.lt-tab:focus-visible {
    outline: 2px solid var(--lm-accent);
    outline-offset: 3px;
}

.lt-tab[aria-selected="true"] {
    color: var(--lm-ink);
    border-color: var(--lm-accent);
    background: var(--lm-accent-soft);
}

.lt-tab__top {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    width: 100%;
}

.lt-tab__num {
    flex: none;
    font-family: var(--lm-f-mono);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--lm-accent);
}

.lt-tab__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lt-tab__plan {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--lm-accent);
    background: var(--lm-paper);
    color: var(--lm-accent-ink);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lt-tab__plan--paid {
    border-color: var(--lm-ink);
    background: var(--lm-ink);
    color: var(--lm-paper);
}

.lt-tab__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--lm-accent);
    transform: scaleX(0);
    transform-origin: left center;
}

.lt-tab[aria-selected="true"] .lt-tab__bar {
    transform: scaleX(var(--p, 0));
}

.lt.is-static .lt-tab__bar {
    display: none;
}

/* ── The window ── */
.lt-win {
    position: relative;
}

.lt-win .lm-window__bar {
    gap: 0.5rem;
}

.lt-crumb {
    color: var(--lm-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.lt-body {
    position: relative;
    height: var(--lt-h);
    background: var(--lm-desk);
    overflow: hidden;
}

.lt-scene {
    position: absolute;
    inset: 0;
    display: none;
    min-width: 0;
}

.lt-scene.is-active,
.lt:not(.is-ready) .lt-scene[data-scene="1"] {
    display: flex;
    animation: lt-fade 0.4s ease both;
}

/* Things that appear on cue. Before the script runs, everything is shown. */
.lt.is-ready [data-at] {
    transition: opacity 0.35s ease, transform 0.45s var(--lt-ease), max-height 0.45s var(--lt-ease), background-color 0.3s ease, color 0.3s ease;
}

.lt.is-ready .lt-cue:not(.is-on) {
    opacity: 0;
    transform: translateY(6px);
}

.lt.is-ready .lt-cue--pop:not(.is-on) {
    transform: scale(0.94);
}

.lt.is-ready .lt-cue--drop:not(.is-on) {
    transform: translateY(-1.6rem);
}

/* data-until: shown for a while, then gone */
.lt.is-ready .lt-gone.is-on {
    display: none;
}

.lt.is-ready .lt-only:not(.is-on) {
    display: none;
}

/* Typed text: a caret while it types. A hidden copy holds the space. */
.lt-typebox {
    display: grid;
}

.lt-typebox > * {
    grid-area: 1 / 1;
}

.lt-ghost {
    visibility: hidden;
}

.lt-type.is-typing::after {
    content: '';
    display: inline-block;
    width: 1.5px;
    height: 1.05em;
    margin-left: 1px;
    vertical-align: -0.15em;
    background: var(--lm-accent);
    animation: lt-caret 0.9s steps(1) infinite;
}

/* A pressed button: a ring, then the pressed look. */
.lt-press.is-on {
    animation: lt-press 0.5s ease both;
}

@keyframes lt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lt-caret { 50% { opacity: 0; } }
@keyframes lt-press {
    0% { box-shadow: 0 0 0 0 rgba(8, 127, 119, 0.45); transform: scale(1); }
    35% { transform: scale(0.94); }
    100% { box-shadow: 0 0 0 10px rgba(8, 127, 119, 0); transform: scale(1); }
}
@keyframes lt-shimmer { to { background-position: -200% 0; } }
@keyframes lt-spin { to { transform: rotate(360deg); } }

/* ── Captions ── */
.lt-captions {
    display: grid;
    margin: 1.25rem auto 0;
    max-width: 44rem;
    text-align: center;
}

.lt-caption {
    grid-area: 1 / 1;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--lm-ink-2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.lt-caption.is-active,
.lt:not(.is-ready) .lt-caption[data-caption="1"] {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0s;
}

.lt-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 1.5rem;
}

.lt-foot .lm-note {
    text-align: center;
}

/* ── Shared scene parts ── */
.lt-scene {
    flex-direction: column;
}

.lt-scene > .lm-window__bar {
    flex: none;
    background: var(--lm-paper);
}

.lt-path {
    display: inline-flex;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.15rem;
    border-radius: 8px;
    background: var(--lm-desk);
}

.lt-path span {
    padding: 0.18rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--lm-muted);
    white-space: nowrap;
}

.lt-path span.is-active {
    background: var(--lm-ink);
    color: var(--lm-paper);
}

.lt-cols {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 17rem;
}

.lt-cols--binder {
    grid-template-columns: 12rem minmax(0, 1fr);
}

.lt-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.lt-desk {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 1.1rem 1.25rem;
    overflow: hidden;
}

.lt-sheet {
    max-width: 34rem;
    margin: 0 auto;
}

.lm-sheet.lt-sheet ins,
.lm-sheet.lt-sheet del {
    display: block;
}

.lt-hint {
    font-size: 0.75rem;
    color: var(--lm-muted);
}

.lt-busy,
.lt-done {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--lm-accent-ink);
    white-space: nowrap;
}

.lt-busy i {
    animation: lt-spin 0.9s linear infinite;
}

.lt-done i {
    color: var(--lm-accent);
}

/* ── Co-author chat (scenes 1–2) ── */
.lt-chat {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
    min-height: 0;
    padding: 0.85rem;
    border-left: 1px solid var(--lm-rule);
    background: var(--lm-paper);
}

.lt-chat__h {
    flex: none;
    font-family: var(--lm-f-display);
    font-weight: 700;
    font-size: 0.8rem;
}

.lt-chat__h span:first-child {
    color: var(--lm-accent);
}

.lt-msgs {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.5rem;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 1.5rem);
    mask-image: linear-gradient(to bottom, transparent, #000 1.5rem);
}

.lt-msg {
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-size: 0.74rem;
    line-height: 1.45;
}

.lt-msg--me {
    align-self: flex-end;
    max-width: 90%;
    background: var(--lm-ink);
    color: var(--lm-paper);
    border-bottom-right-radius: 3px;
}

.lt-msg--ai {
    align-self: flex-start;
    max-width: 95%;
    background: var(--lm-desk);
    color: var(--lm-ink-2);
    border-bottom-left-radius: 3px;
}

.lt-msg--ai b {
    display: block;
    font-family: var(--lm-f-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lm-accent);
}

.lt-input {
    position: relative;
    flex: none;
    min-height: 4.2rem;
    padding: 0.55rem 2.4rem 0.55rem 0.65rem;
    border: 1px solid var(--lm-rule);
    border-radius: 10px;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--lm-ink);
    background: var(--lm-paper);
}

.lt-input__ph {
    color: var(--lm-muted);
}

.lt-send {
    position: absolute;
    right: 0.45rem;
    bottom: 0.45rem;
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 7px;
    background: var(--lm-accent);
    color: #fff;
    font-size: 0.7rem;
}

/* ── 1 · Idea: the outline fills in ── */
.lt-outline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 0.75rem;
}

.lt-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    color: var(--lm-muted);
}

.lt-lane {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.lt-lane__h,
.lt-binder__act {
    font-family: var(--lm-f-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lm-muted);
}

.lt-card {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--lm-rule);
    border-top: 3px solid var(--lm-accent);
    border-radius: 6px;
    background: var(--lm-paper);
    font-size: 0.78rem;
    min-width: 0;
}

.lt-card i {
    font-style: normal;
    font-size: 0.72rem;
    color: var(--lm-muted);
}

.lt-card em {
    align-self: flex-start;
    margin-top: 0.25rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: var(--lm-accent-soft);
    color: var(--lm-accent-ink);
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 700;
}

/* ── 2 · Co-author: review ── */
.lt-review {
    flex: none;
}

.lt-review__count {
    color: var(--lm-muted);
    white-space: nowrap;
}

.lt-sheet .lt-del.is-on {
    color: var(--lm-del);
    background: var(--lm-del-bg);
    text-decoration: line-through;
}

.lm-sheet.lt-sheet .lt-del:not(.is-on) {
    color: inherit;
    background: none;
    text-decoration: none;
    padding: 0;
}

.lt-kept.is-on ins {
    color: inherit;
    background: none;
    padding: 0;
}

.lt.is-ready .lt-fold {
    max-height: 9rem;
    overflow: hidden;
    transition: max-height 0.5s var(--lt-ease), opacity 0.35s ease;
}

.lt.is-ready .lt-fold.is-on {
    max-height: 0;
    opacity: 0;
}

.lt-sheet .lm-acts {
    margin-top: 0.4rem;
}

.lt-press.lm-acts__btn--ok.is-on,
.lt-press.lm-acts__btn--no.is-on {
    border-color: currentColor;
}

/* ── 3 · Script ── */
.lt-binder {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.9rem 0.75rem;
    border-right: 1px solid var(--lm-rule);
    background: var(--lm-paper);
}

.lt-binder__act {
    margin-top: 0.35rem;
}

.lt-bnode {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--lm-ink-2);
    min-width: 0;
}

.lt-bnode span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lt-bnode i {
    font-size: 0.62rem;
    color: var(--lm-accent);
}

.lt-bnode.is-active {
    background: var(--lm-accent-soft);
    color: var(--lm-accent-ink);
    font-weight: 600;
}

.lt-edbar {
    flex: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.6rem;
    padding: 0.45rem 1.25rem;
    border-bottom: 1px solid var(--lm-rule);
    background: var(--lm-paper);
}

.lt-elsel {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 8.5rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--lm-rule);
    border-radius: 7px;
    font-size: 0.74rem;
    font-weight: 600;
}

.lt-elsel i {
    margin-left: auto;
    font-size: 0.55rem;
    color: var(--lm-muted);
}

.lt-key {
    padding: 0.12rem 0.45rem;
    border: 1px solid var(--lm-rule);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--lm-desk);
    font: 600 0.68rem/1.4 var(--lm-f-mono);
    color: var(--lm-ink);
    animation: lt-key 0.6s ease both;
}

@keyframes lt-key {
    0% { opacity: 0; transform: translateY(3px); }
    25% { opacity: 1; transform: translateY(1px); border-bottom-width: 1px; }
    100% { opacity: 1; transform: none; }
}

/* ── 4–5 · Storyboard ── */
.lt-sb {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    overflow: hidden;
}

.lt-sb__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    min-height: 2.6rem;
}

.lt-cast {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.lt-cast i {
    font-size: 0.6rem;
    color: var(--lm-accent);
}

.lt-shots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.lt-shot,
.lt-frame {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.5rem;
    border: 1px solid var(--lm-rule);
    border-radius: 8px;
    background: var(--lm-paper);
}

.lt-shot__ph {
    display: grid;
    place-items: center;
    aspect-ratio: 2.39 / 1;
    border: 1px dashed var(--lm-rule);
    border-radius: 6px;
    background: var(--lm-desk);
    color: var(--lm-muted);
    font-size: 0.9rem;
}

.lt-shot__label {
    font-size: 0.74rem;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lt-shot__act {
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--lm-ink-2);
}

.lt-shot__foot {
    margin-top: auto;
    font-family: var(--lm-f-mono);
    font-size: 0.62rem;
    color: var(--lm-muted);
}

.lt-frame__img {
    position: relative;
    aspect-ratio: 2.39 / 1;
    border-radius: 6px;
    overflow: hidden;
}

.lt-frame__img > * {
    position: absolute;
    inset: 0;
}

.lt-frame .temp-asset,
.lt-preview .temp-asset {
    min-height: 0;
    height: 100%;
    padding: 0.45rem 0.55rem;
    gap: 0.1rem;
    border-radius: 6px;
}

.lt-frame .temp-asset__tag {
    top: 0.3rem;
    left: 0.3rem;
    font-size: 0.5rem;
    padding: 0.05rem 0.35rem;
}

.lt-frame .temp-asset__title {
    font-size: 0.6rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lt-frame .temp-asset__spec {
    display: none;
}

/* A frame being drawn: dimmed, a spinner, the AI hairline. */
.lt-drawing {
    display: grid;
    place-items: center;
    background: rgba(22, 32, 31, 0.55);
    color: #fff;
    font-size: 0.95rem;
}

.lt-drawing > .fa-circle-notch {
    animation: lt-spin 0.9s linear infinite;
}

.lt-drawing__bar {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #296cfd, #1c91ff, #05c7bb, #38ffc7);
    transform: scaleX(var(--p, 0));
    transform-origin: left center;
}

.lt.is-ready .lt-develop {
    transition: opacity 0.6s ease, filter 0.8s ease;
}

.lt.is-ready .lt-develop:not(.is-on) {
    opacity: 0;
    filter: blur(6px);
}

.lt-frame__img > .lt-castag {
    inset: auto 0.3rem 0.3rem auto;
    padding: 0.05rem 0.4rem;
    border-radius: 4px;
    background: var(--lm-accent);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.lt-next {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--lm-rule);
    opacity: 0.7;
}

/* ── 6 · Film ── */
.lt-film {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.9rem 1.15rem 1rem;
}

.lt-film__top {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 0.9rem;
}

/* The preview takes the height it has and keeps 2.39:1. */
.lt-preview {
    position: relative;
    flex: none;
    height: 100%;
    max-width: 60%;
    aspect-ratio: 2.39 / 1;
    border-radius: 8px;
    overflow: hidden;
}

.lt-preview .temp-asset {
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
}

.lt-preview .temp-asset__title {
    font-size: 0.72rem;
}

.lt-preview .temp-asset__spec {
    font-size: 0.6rem;
}

.lt-preview .temp-asset__tag {
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.55rem;
}

.lt-preview__shot,
.lt-preview__time {
    position: absolute;
    top: 0.5rem;
    padding: 0.12rem 0.45rem;
    border-radius: 5px;
    background: rgba(22, 32, 31, 0.8);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 600;
}

.lt-preview__shot {
    right: 0.5rem;
}

.lt-preview__time {
    right: 0.5rem;
    top: auto;
    bottom: 0.5rem;
    font-family: var(--lm-f-mono);
}

.lt-preview__time i {
    font-size: 0.5rem;
    margin-right: 0.2rem;
}

.lt-clips {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.lt-clips > .lt-only,
.lt-clips > .lt-busy,
.lt-clips > .lt-done {
    align-self: flex-start;
}

.lt-cliplist {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lt-cliplist li {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.45rem;
    border: 1px solid var(--lm-rule);
    border-radius: 7px;
    background: var(--lm-paper);
    font-size: 0.7rem;
}

.lt-cliplist b {
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lt-state {
    font-family: var(--lm-f-mono);
    font-size: 0.62rem;
    color: var(--lm-accent-ink);
}

.lt-state i {
    color: var(--lm-muted);
    animation: lt-spin 0.9s linear infinite;
}

/* Shot colours: a thumbnail of the frame and its clip on the timeline. */
.lt-thumb,
.lt-clip {
    background:
        repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 255, 255, 0.14) 22px 23px),
        var(--lt-tone);
}

.lt-thumb {
    aspect-ratio: 2.39 / 1;
    border-radius: 3px;
}

.lt-thumb--1, .lt-clip--1 { --lt-tone: #2c4a5a; }
.lt-thumb--2, .lt-clip--2 { --lt-tone: #4b5a46; }
.lt-thumb--3, .lt-clip--3 { --lt-tone: #6b5a3a; }
.lt-thumb--4, .lt-clip--4 { --lt-tone: #5a3f4d; }

.lt-tl {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem 0.7rem 0.7rem;
    border: 1px solid var(--lm-rule);
    border-radius: 8px;
    background: var(--lm-paper);
}

.lt-tl__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.7rem;
}

.lt-tl__name {
    font-weight: 700;
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lt-tl__ruler {
    position: relative;
    height: 0.9rem;
    font-family: var(--lm-f-mono);
    font-size: 0.56rem;
    color: var(--lm-muted);
}

.lt-tl__ruler span {
    position: absolute;
    top: 0;
}

.lt-tl__ruler span:nth-child(1) { left: 0; }
.lt-tl__ruler span:nth-child(2) { left: 20%; }
.lt-tl__ruler span:nth-child(3) { left: 46.667%; }
.lt-tl__ruler span:nth-child(4) { left: 66.667%; }
.lt-tl__ruler span:nth-child(5) { right: 0; }

.lt-tl__lane {
    position: relative;
    display: flex;
    gap: 2px;
    height: 2.4rem;
    padding: 0;
    border-radius: 6px;
    background: var(--lm-desk);
}

.lt-clip {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 0.2rem 0.35rem;
    border-radius: 5px;
    color: #fff;
    font: 700 0.6rem/1 var(--lm-f-mono);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.lt-clip--1 { flex: 3 1 0; }
.lt-clip--2 { flex: 4 1 0; }
.lt-clip--3 { flex: 3 1 0; }
.lt-clip--4 { flex: 5 1 0; }

.lt-playhead {
    position: absolute;
    top: -0.35rem;
    bottom: -0.35rem;
    left: calc(var(--p, 0) * (100% - 2px));
    width: 2px;
    background: var(--lm-del);
    pointer-events: none;
}

.lt-playhead::before {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    width: 10px;
    height: 7px;
    border-radius: 2px 2px 5px 5px;
    background: var(--lm-del);
}

/* The next section is also on the darker desk: a rule between them. */
#how-it-works + .lm-sec--alt {
    border-top: 1px solid var(--lm-rule);
}

/* ── Narrow windows ── */
@container (max-width: 760px) {
    .lt-path span:not(.is-active) {
        display: none;
    }

    .lt-cols,
    .lt-cols--binder {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    .lt-chat {
        order: -1;
        height: 9.75rem;
        border-left: 0;
        border-bottom: 1px solid var(--lm-rule);
        padding: 0.65rem 0.75rem;
        gap: 0.45rem;
    }

    .lt-chat__h {
        display: none;
    }

    .lt-input {
        min-height: 3.1rem;
    }

    .lt-desk {
        padding: 0.85rem;
    }

    .lt-binder {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.5rem 0.65rem;
        border-right: 0;
        border-bottom: 1px solid var(--lm-rule);
    }

    .lt-next,
    .lt-binder__act,
    .lt-bnode:nth-of-type(n + 4) {
        display: none;
    }

    .lt-bnode {
        padding: 0.2rem 0.45rem;
        font-size: 0.68rem;
    }

    .lt-edbar {
        padding: 0.4rem 0.85rem;
    }

    .lt-shots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .lt-sb {
        padding: 0.8rem;
        gap: 0.6rem;
    }

    .lt-film {
        padding: 0.8rem;
        gap: 0.6rem;
    }

    .lt-film__top {
        flex: none;
        flex-direction: column;
        gap: 0.6rem;
    }

    .lt-preview {
        width: 100%;
        height: auto;
        max-width: none;
    }

    .lt-cliplist {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lt-cliplist li {
        grid-template-columns: 1.8rem minmax(0, 1fr) auto;
        gap: 0.35rem;
    }

    .lt-review .lm-review__label {
        white-space: normal;
    }
}

@media (max-width: 960px) {
    .lt-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .lt {
        --lt-h: 35rem;
    }

    .lt-tab {
        padding: 0.55rem 0.6rem 0.65rem;
        font-size: 0.82rem;
    }

    .lt-caption {
        font-size: 0.95rem;
    }
}

/* Reduced motion: the last frame of each scene, no caret, no spinners. */
.lt.is-static .lt-busy i,
.lt.is-static .lt-state i,
.lt.is-static .lt-drawing > .fa-circle-notch {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .lt *,
    .lt *::before,
    .lt *::after {
        animation: none !important;
        transition: none !important;
    }
}
