/* Animated scenes. Each scene is driven by scenes.js, which toggles .is-on on its parts;
   the motion itself lives here as transitions so every scene shares one feel. */

.scene-wrap {
    position: relative;
    margin: 0;
}

.scene {
    position: relative;
}

.scene__replay,
.scene__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 2px;
    border: 0;
    background: none;
    color: var(--muted);
    font: 500 0.82rem/1.2 var(--font-mono);
    cursor: pointer;
    text-decoration: none;
}

.scene__replay:hover,
.scene__link:hover {
    color: var(--accent);
}

.scene__replay .icon,
.scene__link .icon {
    width: 15px;
    height: 15px;
}

/* The hero stack: three real demo screens fanned out, with notes that come and go.
   scenes.js deals the screens in once and cycles the notes; site.js tilts the
   whole stack towards the pointer through --px and --py. */

.stack-wrap {
    margin-top: clamp(44px, 6vw, 76px);
    perspective: 2000px;
    perspective-origin: 50% 20%;
}

.scene-stack {
    --px: 0;
    --py: 0;
    aspect-ratio: 43 / 20;
    transform-style: preserve-3d;
    transform: rotateX(calc(7deg - var(--py) * 3deg)) rotateY(calc(var(--px) * 5deg));
    transition: transform 0.9s var(--ease);
}

.ss-screen {
    position: absolute;
    top: 9%;
    width: 46%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: 0 2px 6px rgba(11, 18, 32, 0.05), 0 40px 80px -40px rgba(11, 18, 32, 0.55);
    transition: opacity 0.9s ease, translate 1.1s var(--ease);
}

.ss-screen .browser-frame__bar {
    height: 30px;
    gap: 5px;
    padding: 0 10px;
    border-radius: 13px 13px 0 0;
}

.ss-screen .browser-frame__bar i {
    width: 7px;
    height: 7px;
}

.ss-screen .browser-frame__url {
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.66rem;
}

.ss-screen > img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top center;
    border-radius: 0 0 13px 13px;
}

/* Front and centre, with the other two fanned out behind it, outer edges forward. */
.ss-screen--1 {
    left: 20%;
    top: 0;
    width: 60%;
}

.ss-screen--2 {
    left: 0;
    transform: translateZ(-140px) rotateY(16deg);
}

.ss-screen--3 {
    right: 0;
    transform: translateZ(-140px) rotateY(-16deg);
}

.js .ss-screen:not(.is-on) {
    opacity: 0;
}

.js .ss-screen--1:not(.is-on) {
    translate: 0 70px;
}

.js .ss-screen--2:not(.is-on) {
    translate: 40% 30px;
}

.js .ss-screen--3:not(.is-on) {
    translate: -40% 30px;
}

/* A dimension line under the front screen, the way a drawing gives a measurement. */
.ss-dim {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 18px);
    height: 12px;
    border-inline: 1.5px solid var(--accent-600);
    background: linear-gradient(var(--accent-600), var(--accent-600)) center / 100% 1.5px no-repeat;
    transform-origin: left center;
    transition: transform 1.1s var(--ease);
}

.ss-dim-label {
    position: absolute;
    left: 50%;
    top: calc(100% + 14px);
    translate: -50% 0;
    padding: 0 10px;
    border: 1px dashed rgba(194, 65, 12, 0.5);
    border-radius: 999px;
    background: var(--paper);
    color: var(--accent-700);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 18px;
    white-space: nowrap;
    transition: opacity 0.5s ease 0.5s;
}

.js .ss-dim:not(.is-on) {
    transform: scaleX(0);
}

.js .ss-dim-label:not(.is-on) {
    opacity: 0;
    transition-delay: 0s;
}

.ss-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: 270px;
    padding: 10px 16px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 6px rgba(11, 18, 32, 0.06), 0 24px 48px -20px rgba(11, 18, 32, 0.45);
    font-size: 0.76rem;
    line-height: 1.35;
    color: var(--muted);
    text-align: left;
    transform: translateZ(90px);
    transition: opacity 0.5s ease, transform 0.6s var(--ease);
    animation: ss-bob 6s ease-in-out infinite;
}

.js .ss-chip:not(.is-on) {
    opacity: 0;
    transform: translateZ(90px) scale(0.88);
}

.ss-chip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ss-chip__icon .icon {
    width: 20px;
    height: 20px;
}

.ss-chip__text b {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink);
}

.ss-chip__text > span {
    display: block;
}

.ss-chip--fit .ss-chip__icon {
    background: linear-gradient(180deg, #f97316, #c2410c);
}

.ss-chip--rule .ss-chip__icon {
    background: linear-gradient(180deg, #10b981, #047857);
}

.ss-chip--ai .ss-chip__icon {
    background: linear-gradient(180deg, #6366f1, #4338ca);
}

.ss-chip--fit {
    left: 1%;
    top: 16%;
}

.ss-chip--rule {
    left: 6%;
    top: 68%;
    animation-delay: -2s;
}

.ss-chip--ai {
    right: 1%;
    top: 38%;
    animation-delay: -4s;
}

@keyframes ss-bob {
    50% {
        translate: 0 -7px;
    }
}

@media (max-width: 720px) {
    .scene-stack {
        aspect-ratio: 50 / 43;
        transform: rotateX(calc(5deg - var(--py) * 3deg));
    }

    .ss-screen {
        top: 2%;
        width: 64%;
    }

    .ss-screen--1 {
        left: 7%;
        top: 17%;
        width: 86%;
    }

    .ss-screen--2 {
        transform: translateZ(-120px) rotateY(12deg);
    }

    .ss-screen--3 {
        transform: translateZ(-120px) rotateY(-12deg);
    }

    .ss-screen .browser-frame__bar {
        height: 24px;
    }

    .ss-screen .browser-frame__url {
        font-size: 0.6rem;
    }

    .ss-chip {
        gap: 8px;
        padding: 6px 12px 6px 6px;
        border-radius: 12px;
    }

    .ss-chip__icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .ss-chip__icon .icon {
        width: 16px;
        height: 16px;
    }

    .ss-chip__text b {
        font-size: 0.74rem;
    }

    .ss-chip__text > span,
    .ss-chip--fit {
        display: none;
    }

    .ss-chip--rule {
        left: -1%;
        top: 66%;
    }

    .ss-chip--ai {
        right: -1%;
        top: 22%;
    }
}

/* Measured, then made */

.scene-measure {
    height: clamp(330px, 34vw, 440px);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background:
        linear-gradient(rgba(11, 18, 32, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
        linear-gradient(90deg, rgba(11, 18, 32, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
        linear-gradient(160deg, #ffffff, var(--soft));
    box-shadow: var(--shadow-lg);
}

.sm-tool {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 20px -12px rgba(11, 18, 32, 0.4);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    transition: transform 0.9s var(--ease), opacity 0.7s ease;
    animation: sm-bob 3.4s ease-in-out infinite;
}

.sm-tool .icon {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.sm-tool--1 { left: 4%; top: 9%; }
.sm-tool--2 { left: 21%; top: 27%; animation-delay: -0.8s; }
.sm-tool--3 { left: 5%; top: 46%; animation-delay: -1.6s; }
.sm-tool--4 { left: 19%; top: 64%; animation-delay: -2.2s; }
.sm-tool--5 { left: 6%; top: 82%; animation-delay: -1.2s; }

@keyframes sm-bob {
    50% { translate: 0 -5px; }
}

.sm-measure {
    position: absolute;
    padding: 2px 7px;
    border: 1px dashed rgba(194, 65, 12, 0.45);
    border-radius: 5px;
    background: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sm-measure--1 { left: 20%; top: 3%; }
.sm-measure--2 { left: 29%; top: 51%; }
.sm-measure--3 { left: 29%; top: 87%; }

.sm-window {
    position: absolute;
    left: 52%;
    top: 7%;
    width: 44%;
    height: 86%;
    background: var(--paper);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.sm-seam {
    position: absolute;
    left: -7px;
    top: -7px;
    width: calc(100% + 14px);
    height: calc(100% + 14px);
    overflow: visible;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.sm-seam rect {
    fill: none;
    stroke: var(--accent-bright);
    stroke-width: 1.5;
    stroke-dasharray: 7 6;
    animation: sm-march 1.4s linear infinite;
}

@keyframes sm-march {
    to { stroke-dashoffset: -26; }
}

.sm-window__bar {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    padding: 0 9px;
    border-bottom: 1px solid var(--line);
}

.sm-window__bar i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #dde3ea;
}

.sm-window__bar span {
    margin-left: 6px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-window__side {
    position: absolute;
    left: 0;
    top: 26px;
    bottom: 0;
    width: 17%;
    padding: 8px 7px;
    border-right: 1px solid var(--line);
}

.sm-window__side b,
.sm-panel b {
    display: block;
    height: 5px;
    margin: 0 0 8px;
    border-radius: 3px;
    background: #e9edf2;
}

.sm-panel {
    position: absolute;
    padding: 7px 9px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s var(--ease);
}

.sm-panel b {
    height: 4px;
    margin: 6px 0 0;
}

.sm-panel b + b {
    width: 60%;
}

.sm-panel--1 { left: 22%; top: 15%; width: 36%; height: 22%; }
.sm-panel--2 { left: 61%; top: 15%; width: 35%; height: 22%; }
.sm-panel--3 { left: 22%; top: 40%; width: 36%; height: 22%; }
.sm-panel--4 { left: 61%; top: 40%; width: 35%; height: 22%; }
.sm-panel--5 { left: 22%; top: 65%; width: 74%; height: 25%; }

.sm-badge {
    position: absolute;
    left: 4%;
    top: 11%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(7, 120, 83, 0.25);
    border-radius: 999px;
    background: var(--scrs-soft);
    color: var(--scrs);
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.5s ease, transform 0.5s var(--ease);
}

.sm-badge .icon {
    width: 15px;
    height: 15px;
}

.sm-note {
    position: absolute;
    left: 4%;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.55;
    color: var(--ink-2);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sm-note--rule { top: 37%; }
.sm-note--count { top: 72%; color: var(--muted); }

.sm-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--accent);
    pointer-events: none;
}

.sm-lines path {
    fill: none;
    stroke: currentColor;
    stroke-width: 0.35;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 0.8s ease;
}

@media (max-width: 640px) {
    .sm-tool {
        padding: 6px 8px;
        font-size: 0.7rem;
    }

    .sm-tool .icon {
        width: 13px;
        height: 13px;
    }

    .sm-tool--2 { left: 14%; }
    .sm-tool--4 { left: 12%; }
    .sm-window { left: 53%; width: 44%; }
    .sm-panel { padding: 5px 6px; font-size: 0.6rem; }
    .sm-measure, .sm-note { font-size: 0.64rem; }
}

/* The rule moment */

.scene-rule {
    background: var(--paper);
}

.sr-body {
    position: relative;
    padding: 22px 22px 18px;
    min-height: 290px;
}

.sr-chip {
    display: inline-block;
    margin: 0 0 14px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--scrs-soft);
    color: var(--scrs);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.sr-form {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.sr-form__title {
    margin: 0;
    font-weight: 600;
}

.sr-form__meta {
    margin: 2px 0 14px;
    font-size: 0.8rem;
    color: var(--muted);
}

.sr-button {
    display: block;
    padding: 11px;
    border-radius: 10px;
    background: var(--scrs);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.sr-button.is-on {
    transform: scale(0.97);
    filter: brightness(0.9);
}

.sr-refusal {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #fecdca;
    border-radius: 12px;
    background: var(--danger-soft);
    color: #7a271a;
    font-size: 0.86rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.45s ease, transform 0.45s var(--ease);
}

.sr-refusal p {
    margin: 0;
}

.sr-refusal__title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px !important;
    font-weight: 600;
    color: var(--danger);
}

.sr-refusal__title .icon {
    width: 16px;
    height: 16px;
}

.sr-refusal__why {
    margin-top: 6px !important;
    font-size: 0.8rem;
    color: #912018;
}

.sr-note {
    position: absolute;
    right: 22px;
    top: 22px;
    padding: 3px 8px;
    border: 1px dashed rgba(194, 65, 12, 0.5);
    border-radius: 6px;
    background: var(--paper);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sr-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 12px 22px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--muted);
}

.sr-foot span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sr-foot .icon {
    width: 15px;
    height: 15px;
    color: var(--scrs);
}

.sr-cursor {
    position: absolute;
    right: 12%;
    bottom: 14%;
    width: 28px;
    height: 28px;
    color: var(--ink);
    opacity: 0;
    filter: drop-shadow(0 2px 3px rgba(11, 18, 32, 0.3));
    transition: transform 1.1s var(--ease), opacity 0.3s ease;
}

.sr-cursor .icon {
    width: 28px;
    height: 28px;
    fill: #fff;
}

@media (max-width: 520px) {
    .sr-note {
        position: static;
        display: inline-block;
        margin-top: 12px;
    }
}

/* What the AI sees */

.scene-tokens {
    display: grid;
    gap: 14px;
    align-items: stretch;
}

@media (min-width: 960px) {
    .scene-tokens {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    }
}

.st-col {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent-500);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.st-col--model {
    background: linear-gradient(160deg, #f8f9ff, #eef2ff);
    border: 1px dashed rgba(79, 70, 229, 0.4);
    border-top: 3px solid #6366f1;
}

.st-col--answer {
    border-top-color: #10b981;
}

.st-label {
    margin: 0 0 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.st-text {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.7;
}

.st-col mark {
    padding: 0 2px;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.st-col--source mark.is-on {
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px rgba(194, 65, 12, 0.35);
}

.st-col--answer mark {
    background: var(--scrs-soft);
    color: var(--scrs);
}

.st-scan {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--accent-bright);
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.65);
    opacity: 0;
    transition: transform 2.4s linear, opacity 0.3s ease;
}

/* The name shrinks away as its token grows in, so the sentence reflows like the real thing. */
.st-token > span {
    display: inline-block;
    vertical-align: bottom;
    white-space: nowrap;
    overflow: hidden;
    transition: max-width 0.55s var(--ease), opacity 0.4s ease, padding 0.55s var(--ease);
}

.st-token > span:first-child {
    max-width: 14em;
}

.st-token > span:last-child {
    max-width: 0;
    padding: 0;
    border-radius: 5px;
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(194, 65, 12, 0.3);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    opacity: 0;
}

.st-token.is-on > span:first-child {
    max-width: 0;
    opacity: 0;
}

.st-token.is-on > span:last-child {
    max-width: 10em;
    padding: 0 5px;
    opacity: 1;
}

.st-arrow {
    align-self: center;
    justify-self: center;
    color: var(--muted);
}

.st-arrow .icon {
    width: 22px;
    height: 22px;
}

@media (max-width: 959px) {
    .st-arrow {
        transform: rotate(90deg);
    }
}

.js .st-word {
    opacity: 0.12;
    transition: opacity 0.25s ease;
}

/* An AI assistant running the system: the request, what the model sees through SCRS,
   the proposed steps with their checks, and a person approving. */

.scene-assistant {
    background: var(--paper);
}

.sa-body {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.sa-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.sa-label .icon {
    width: 14px;
    height: 14px;
}

.sa-ask {
    justify-self: end;
    max-width: 88%;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid rgba(234, 88, 12, 0.22);
    border-radius: 14px 14px 4px 14px;
    background: var(--accent-50);
    color: var(--ink);
    font-size: 0.9rem;
}

.sa-ask .sa-label {
    color: var(--accent-700);
}

.sa-seen {
    padding: 10px 14px;
    border: 1px dashed rgba(79, 70, 229, 0.45);
    border-radius: 12px;
    background: linear-gradient(160deg, #f8f9ff, #eef2ff);
    color: var(--ink-2);
    font-size: 0.86rem;
}

.sa-seen .sa-label {
    color: #4338ca;
}

.sa-seen p {
    margin: 0;
}

.sa-seen b {
    padding: 0 5px;
    border-radius: 5px;
    background: #e0e7ff;
    color: #3730a3;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
}

.sa-plan {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--soft);
}

.sa-plan > .sa-label {
    margin-bottom: 0;
}

.sa-step {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    font-size: 0.82rem;
}

.sa-step__what {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.sa-step__what .icon {
    width: 18px;
    height: 18px;
    color: var(--accent-600);
}

.sa-step__what b {
    display: block;
    font-weight: 600;
    color: var(--ink);
}

.sa-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.sa-check .icon {
    width: 13px;
    height: 13px;
}

.sa-check--ok {
    background: var(--scrs-soft);
    color: var(--scrs);
}

.sa-check--no {
    background: var(--danger-soft);
    color: var(--danger);
}

.sa-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 2px;
}

.sa-button {
    display: inline-flex;
    padding: 9px 16px;
    border-radius: 10px;
    background: var(--accent-fill);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: var(--glow);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.sa-button.is-on {
    transform: scale(0.96);
    filter: brightness(0.9);
}

.sa-hint {
    font-size: 0.76rem;
    color: var(--muted);
}

.sa-done {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--scrs-soft);
    color: var(--scrs);
    font-size: 0.8rem;
    font-weight: 600;
}

.sa-done .icon {
    width: 16px;
    height: 16px;
}

.sa-cursor {
    position: absolute;
    right: 10%;
    bottom: 8%;
    width: 28px;
    height: 28px;
    color: var(--ink);
    opacity: 0;
    filter: drop-shadow(0 2px 3px rgba(11, 18, 32, 0.3));
    transition: transform 1.1s var(--ease), opacity 0.3s ease;
}

.sa-cursor .icon {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.sa-cursor.is-on {
    opacity: 1;
}

/* With scripts, each part waits for the scene to turn it on. */
.js .scene-assistant :is([data-ask], [data-seen], [data-step], [data-check], [data-done]) {
    transition: opacity 0.45s ease, translate 0.45s var(--ease);
}

.js .scene-assistant :is([data-ask], [data-seen], [data-step], [data-check], [data-done]):not(.is-on) {
    opacity: 0;
    translate: 0 6px;
}

/* One team, three clocks */

.scene-clocks {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px 16px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--paper);
    box-shadow: var(--shadow-lg);
}

.sc-labels {
    display: grid;
    gap: 10px;
}

.sc-labels p {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 38px;
    margin: 0;
    line-height: 1.2;
}

.sc-labels span {
    font-size: 0.75rem;
    color: var(--muted);
}

.sc-labels time {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--ink);
}

.sc-tracks {
    position: relative;
    display: grid;
    gap: 10px;
}

.sc-track {
    position: relative;
    height: 38px;
    border-radius: 8px;
    background:
        repeating-linear-gradient(90deg, rgba(11, 18, 32, 0.07) 0 1px, transparent 1px 4.1667%),
        var(--soft);
}

.sc-shift {
    position: absolute;
    top: 7px;
    bottom: 7px;
    border: 1px solid rgba(194, 65, 12, 0.45);
    border-radius: 6px;
    background: rgba(249, 115, 22, 0.16);
}

.sc-now {
    position: absolute;
    top: -8px;
    bottom: -8px;
    width: 0;
    border-left: 1.5px dashed var(--ink-2);
}

.sc-now span {
    position: absolute;
    top: -16px;
    left: -12px;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    color: var(--ink-2);
}

.sc-packet {
    position: absolute;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--accent-bright);
    box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.22);
    opacity: 0;
    transition: left 1.3s var(--ease), top 0.6s var(--ease), opacity 0.4s ease;
}

.sc-axis {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    color: var(--muted);
}

.sc-caption {
    grid-column: 1 / -1;
    margin: 6px 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

/* Shared switch: whatever a scene turns on becomes visible. */

.sm-measure.is-on,
.sm-panel.is-on,
.sm-seam.is-on,
.sm-badge.is-on,
.sm-note.is-on,
.sr-refusal.is-on,
.sr-note.is-on,
.sr-cursor.is-on,
.st-scan.is-on,
.sc-packet.is-on,
.js .st-word.is-on {
    opacity: 1;
}

.sm-panel.is-on,
.sm-badge.is-on,
.sr-refusal.is-on {
    transform: none;
}

.sm-lines path.is-on {
    stroke-dashoffset: 0;
}
