/* ==========================================================================
   OpenVids landing — c4 Feature tour: #agents (Chat) + #motion (Motion Designer).
   Prefixes: ag- (chat tour), mo- (motion templates). Tokens only; accent = playheads.
   ========================================================================== */

/* ==========================================================================
   #agents — task tabs + live chat panel
   ========================================================================== */
.ag-grid {
  margin-top: clamp(48px, 7vw, 88px);
  display: grid; grid-template-columns: minmax(270px, 380px) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 52px); align-items: start;
}

/* ---- Tabs ---- */
.ag-tabs { position: relative; display: grid; gap: 4px; min-width: 0; }
.ag-tab {
  position: relative; display: grid; gap: 7px; width: 100%; min-height: 44px; padding: 14px 16px 15px;
  text-align: left; background: none; border: 1px solid transparent; border-radius: var(--r-md);
  color: var(--fg-2); cursor: pointer; overflow: hidden;
  transition: background-color .3s, border-color .3s, color .3s;
}
.ag-tab:hover { background: color-mix(in oklab, var(--fg) 5%, transparent); color: var(--fg); }
.ag-tab[aria-selected="true"] { background: var(--surface); border-color: var(--border-strong); color: var(--fg); }
.ag-tab:focus-visible { outline-offset: 2px; }
.ag-tab-top { display: flex; align-items: center; gap: 10px; min-width: 0; font: 600 14px/1.3 var(--font-body); letter-spacing: -.005em; }
.ag-tab-n { flex: none; font-size: 11px; font-weight: 500; color: var(--muted); }
.ag-tab-title { flex: 1; min-width: 0; }
.ag-chip { flex: none; height: 22px; padding: 0 8px; font-size: 11px; }
.ag-chip .ic { font-size: 12px; }
.ag-tab-sum { padding-left: 27px; font: 500 11.5px/1.45 var(--font-mono); color: var(--muted); }
.ag-tab:hover .ag-tab-sum, .ag-tab[aria-selected="true"] .ag-tab-sum { color: var(--fg-2); }
.ag-tab-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--fg); transform-origin: left; transform: scaleX(0); opacity: 0; }
.ag-tab[aria-selected="true"] .ag-tab-prog { opacity: .85; }

/* ---- Chat panel ---- */
.ag-chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; }
.ag-bar { gap: 12px; }
.ag-who { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--fg); }
.ag-agent { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-av {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-3); border: 1px solid var(--border-strong);
  font: 600 9px/1 var(--font-mono); letter-spacing: .02em; color: var(--fg);
}
.ag-proj { font: 500 11.5px/1 var(--font-mono); color: var(--muted); white-space: nowrap; }
.ag-modes {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); flex: none; margin-left: auto; padding: 2px;
  border-radius: 7px; background: color-mix(in oklab, var(--fg) 6%, transparent); border: 1px solid var(--hair);
}
.ag-modes i {
  position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / 3); border-radius: 5px;
  background: var(--fg); transform: translate3d(calc(var(--mi, 2) * 100%), 0, 0); transition: transform .6s var(--ease-spring);
}
.ag-modes span { position: relative; padding: 0 10px; font: 500 11.5px/22px var(--font-body); text-align: center; color: var(--fg-2); transition: color .35s; }
.ag-modes span.on { color: var(--bg); }

.ag-thread { display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 492px; padding: 22px 22px 10px; }

/* user bubble springs up from the composer */
.ag-u {
  align-self: flex-end; max-width: min(84%, 520px); padding: 10px 14px; border-radius: 14px 14px 4px 14px;
  background: var(--surface-3); border: 1px solid var(--hair); color: var(--fg); font-size: 14px; line-height: 1.5;
  opacity: 0; transform: translate3d(0, 36px, 0) scale(.94); transform-origin: 100% 100%;
  transition: opacity .3s, transform .7s var(--ease-spring);
}
.ag-u.on { opacity: 1; transform: none; }

.ag-a { display: grid; gap: 8px; min-width: 0; opacity: 0; transform: translate3d(0, 10px, 0); transition: opacity .4s, transform .6s var(--ease-out); }
.ag-a.on { opacity: 1; transform: none; }
.ag-a-head { display: flex; align-items: center; gap: 8px; font: 600 13px/1 var(--font-body); color: var(--fg); }
.ag-a-head time { font: 500 11px/1 var(--font-mono); color: var(--muted); }
.ag-think { display: inline-flex; align-items: center; gap: 6px; justify-self: start; font: 500 12.5px/1.2 var(--font-body); color: var(--muted); }
.ag-think .ic { font-size: 13px; }
.ag-think .ic:last-child { font-size: 11px; opacity: .7; }
.ag-think.live span {
  background: linear-gradient(90deg, var(--muted) 0 38%, var(--fg) 50%, var(--muted) 62% 100%) 0 0 / 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: ag-shim 1.25s linear infinite;
}
.ag-grid:not(.ag-live) .ag-think.live span { animation-play-state: paused; }
@keyframes ag-shim { from { background-position: 100% 0; } to { background-position: 0 0; } }
.ag-reply { margin: 0; font-size: 14px; line-height: 1.55; color: var(--fg-2); }
.ag-reply .rw { opacity: 0; transition: opacity .38s var(--ease-out); }
.ag-reply .rw.on { opacity: 1; }

/* result card */
.ag-res {
  container-type: inline-size; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden;
  opacity: 0; transform: translate3d(0, 22px, 0) scale(.96); transform-origin: 50% 0;
  transition: opacity .35s, transform .85s var(--ease-spring);
}
.ag-res.on { opacity: 1; transform: none; }
.ag-res-head { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-bottom: 1px solid var(--border); font: 600 13px/1.3 var(--font-body); color: var(--fg); }
.ag-res-head b { flex: 1; min-width: 0; font-weight: 600; }
.ag-res-head .chip { height: 22px; font-size: 11px; }
.ag-res-ic { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--ok); background: color-mix(in oklab, var(--ok) 15%, transparent); }
.ag-res-ic.is-warn { color: var(--warn); background: color-mix(in oklab, var(--warn) 15%, transparent); }
.ag-res-ic.is-stop { color: var(--fg-2); background: color-mix(in oklab, var(--fg) 10%, transparent); }
.ag-res-ic .ic { font-size: 13px; }
.ag-res-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--border); font: 500 11.5px/1.2 var(--font-mono); color: var(--muted); }
.ag-res-foot span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); }
.ag-viz { position: relative; height: 138px; padding: 12px 14px; min-width: 0; font: 500 11px/1.2 var(--font-mono); color: var(--muted); }

/* composer */
.ag-comp {
  display: flex; align-items: flex-end; gap: 10px; margin: 6px 16px 16px; padding: 10px 10px 10px 14px;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-2);
}
.ag-comp-txt { flex: 1; min-width: 0; min-height: 4.5em; margin: 0; font-size: 14px; line-height: 1.5; color: var(--fg); }
.ag-caret { display: none; width: 1.5px; height: 1.15em; margin-left: 1px; vertical-align: -.2em; background: var(--fg); }
.ag-comp.typing .ag-caret { display: inline-block; }
.ag-grid.ag-live .ag-comp.typing .ag-caret { animation: ag-caret 1s steps(1) infinite; }
@keyframes ag-caret { 50% { opacity: 0; } }
.ag-comp-ph { color: var(--muted); }
.ag-comp.typing .ag-comp-ph { display: none; }
.ag-send {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: color-mix(in oklab, var(--fg) 12%, transparent); color: var(--fg-2);
  transition: background-color .25s, color .25s, transform .5s var(--ease-spring);
}
.ag-comp.typing .ag-send { background: var(--fg); color: var(--bg); }
.ag-send.fire { transform: scale(.82); background: var(--fg); color: var(--bg); transition-duration: .12s; }
.ag-send .ic { font-size: 15px; }

/* ---- viz: rough cut ---- */
.ag-rc { display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.ag-rc-head, .ag-mu-head { display: flex; justify-content: space-between; gap: 12px; color: var(--fg-2); }
.ag-rc-head .tc, .ag-mu-head .tc { color: var(--fg); font-size: 12px; }
.ag-rc-body { --lab: 26px; position: relative; display: grid; gap: 5px; align-content: start; }
.ag-rc-lane { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); align-items: center; gap: 0; }
.ag-rc-lab { font-size: 10px; color: var(--muted); }
.ag-rc-track { position: relative; height: 22px; border-radius: 4px; background: color-mix(in oklab, var(--fg) 4%, transparent); }
.ag-rc-lane:first-child .ag-rc-track { height: 28px; }
.ag-rc-clip {
  position: absolute; top: 0; bottom: 0; display: flex; align-items: center; min-width: 0; padding: 0 5px; overflow: hidden;
  border-radius: 4px; border: 1px solid; opacity: 0; will-change: transform;
}
.ag-rc-clip b { font: 500 9.5px/1 var(--font-mono); color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-rc-clip.is-video { background: var(--k-video-h); border-color: var(--k-video-l); }
.ag-rc-clip.is-audio { background: var(--k-audio-b); border-color: var(--k-audio-l); }
.ag-rc-phw { position: absolute; top: -6px; bottom: -3px; left: var(--lab); right: 0; pointer-events: none; opacity: 0; }
.ag-rc-ph { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); }
.ag-rc-ph::before { content: ''; position: absolute; top: -4px; left: 50%; width: 10px; height: 8px; transform: translateX(-50%); background: var(--accent); clip-path: polygon(0 0, 100% 0, 50% 100%); }

/* ---- viz: title sting ---- */
.ag-ts { display: flex; align-items: center; gap: 16px; }
.ag-ts-frame {
  position: relative; flex: none; width: min(58%, 200px); aspect-ratio: 16 / 9; display: grid; place-items: center; align-content: center; gap: 7px;
  border-radius: 6px; background: oklch(0% 0 0); border: 1px solid var(--border); overflow: hidden;
}
.ag-ts-t { font: 400 clamp(14px, 6.2cqw, 21px)/1 var(--font-display); letter-spacing: -.02em; color: var(--fg); white-space: nowrap; }
.ag-ts-c { display: inline-block; opacity: 0; }
.ag-ts-rule { width: 38%; height: 1px; background: color-mix(in oklab, var(--fg) 50%, transparent); transform: scaleX(0); }
.ag-ts-meta { flex: 1; min-width: 0; display: grid; gap: 8px; margin: 0; }
.ag-ts-meta div { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 7px; border-bottom: 1px solid var(--hair); }
.ag-ts-meta div:last-child { border-bottom: 0; padding-bottom: 0; }
.ag-ts-meta dt { color: var(--muted); }
.ag-ts-meta dd { margin: 0; color: var(--fg); white-space: nowrap; }

/* ---- viz: dialogue loudness ---- */
.ag-ld { display: grid; grid-template-rows: 40px auto auto; gap: 9px; }
.ag-ld-wave { display: flex; align-items: center; gap: 2px; height: 40px; }
.ag-ld-wave i { flex: 1; height: 100%; border-radius: 2px; background: var(--wave); opacity: .85; transform-origin: 50% 50%; }
.ag-ld-meter { display: grid; gap: 5px; }
.ag-ld-scale { position: relative; height: 8px; border-radius: 4px; background: color-mix(in oklab, var(--fg) 8%, transparent); }
.ag-ld-fill { position: absolute; inset: 0; border-radius: 4px; background: var(--fg-2); transform-origin: left; transform: scaleX(0); }
.ag-ld-tgt { position: absolute; top: -3px; bottom: -3px; left: calc(14 / 30 * 100%); width: 1px; background: var(--fg); }
.ag-ld-pk { position: absolute; top: -3px; bottom: -3px; left: 0; right: 0; pointer-events: none; }
.ag-ld-pk::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--warn); }
.ag-ld-ticks { display: flex; justify-content: space-between; font-size: 9.5px; }
.ag-ld-read { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; }
.ag-ld-read b { font-weight: 500; color: var(--fg); }

/* ---- viz: captions ---- */
.ag-cp { display: grid; grid-template-rows: auto 40px auto; gap: 9px; align-content: start; }
.ag-cp-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ag-cp-num { font-size: 22px; line-height: 1; color: var(--fg); min-width: 3ch; }
.ag-cp-axis { margin-left: auto; font-size: 10px; white-space: nowrap; }
.ag-cp-lane { border-radius: 4px; background: color-mix(in oklab, var(--k-caption-b) 30%, transparent); padding: 0 2px; }
.ag-cp-lane svg { width: 100%; height: 40px; }
.ag-cp-cues rect { fill: color-mix(in oklab, var(--k-caption-l) 80%, var(--fg)); }
.ag-cp-flags rect { fill: var(--warn); }
.ag-cp-flags { opacity: 0; }
.ag-cp-warn { justify-self: start; max-width: 100%; opacity: 0; }
.ag-cp-warn .ic { font-size: 12px; }

/* ---- viz: B-roll contact sheet ---- */
.ag-br { display: flex; align-items: center; gap: 18px; }
.ag-br-sheet { flex: none; display: grid; grid-template-columns: repeat(3, auto); gap: 6px; }
.ag-br-t { position: relative; display: block; height: 51px; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: var(--surface-3); box-shadow: 0 6px 16px oklch(0% 0 0 / .45); opacity: 0; will-change: transform; }
.ag-br-t img { width: 100%; height: 100%; object-fit: cover; }
.ag-br-list { flex: 1; min-width: 0; display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; font-size: 10.5px; color: var(--fg-2); }
.ag-br-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; }

/* ---- viz: colour match ---- */
.ag-cm { display: grid; grid-template-rows: 1fr auto; gap: 10px; }
.ag-cm-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; align-content: center; }
.ag-cm-s { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: var(--surface-3); }
.ag-cm-s img { width: 100%; height: 100%; object-fit: cover; }
.ag-cm-b { position: absolute; right: 3px; bottom: 3px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--fg); color: var(--bg); opacity: 0; }
.ag-cm-b .ic { font-size: 10px; stroke-width: 2.4; }
.ag-cm-s.is-held { outline: 1px dashed color-mix(in oklab, var(--fg) 40%, transparent); outline-offset: -1px; }
.ag-cm-s.is-held .ag-cm-b { inset: 0; width: auto; height: auto; border-radius: 0; background: color-mix(in oklab, var(--bg) 58%, transparent); color: var(--fg); }
.ag-cm-b b { font: 600 9.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.ag-cm-foot { display: flex; justify-content: space-between; gap: 12px; }
.ag-cm-foot .tc { color: var(--fg-2); }
.ag-cm-foot b { font-weight: 500; color: var(--fg); }

/* ---- viz: music bed ---- */
.ag-mu { display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.ag-mu-wave { position: relative; height: 72px; border-radius: 4px; background: var(--k-audio-b); border: 1px solid color-mix(in oklab, var(--k-audio-l) 60%, transparent); }
.ag-mu-wave svg { width: 100%; height: 100%; }
.ag-mu-bars rect { fill: var(--wave); opacity: .82; }
.ag-mu-cut { fill: color-mix(in oklab, var(--bg) 72%, transparent); }
.ag-mu-fade { fill: none; stroke: var(--fg); stroke-width: 1.5; opacity: 0; }
.ag-mu-hw { position: absolute; inset: -3px 0; pointer-events: none; }
.ag-mu-h { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--fg); }

/* ---- narrow result cards ---- */
@container (max-width: 400px) {
  .ag-br-list { display: none; }
  .ag-br { justify-content: center; }
  .ag-br-t { height: 47px; }
  .ag-cm-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .ag-ts { gap: 12px; }
  .ag-ts-frame { width: 52%; }
  .ag-ts-meta { gap: 6px; }
  .ag-ts-meta div { display: grid; gap: 2px; padding-bottom: 5px; }
  .ag-ts-meta div:nth-child(2) { display: none; }
}

/* ==========================================================================
   #motion — four scrubbable templates
   ========================================================================== */
.mo-hint { margin: 28px 0 0; font: 500 12px/1.6 var(--font-mono); letter-spacing: .02em; color: var(--muted); max-width: 70ch; }
.mo-grid {
  margin-top: clamp(36px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 4vw, 56px) clamp(20px, 2.6vw, 36px);
}
.mo-card { display: grid; gap: 12px; min-width: 0; }

.mo-view {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-md);
  background: oklch(0% 0 0); border: 1px solid var(--border); box-shadow: var(--shadow);
  container-type: inline-size; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none;
}
.mo-stage { position: absolute; inset: 0; }
.mo-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2; padding: 5px 7px; border-radius: var(--r-xs);
  background: var(--glass); border: 1px solid var(--hair); font: 500 10px/1 var(--font-mono); letter-spacing: .14em; color: var(--fg-2);
}
.mo-card.is-scrub .mo-badge { color: var(--fg); border-color: color-mix(in oklab, var(--fg) 40%, transparent); }

/* controls: play · ruler (slider) · timecode */
.mo-ctl { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mo-play {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: var(--r-sm);
  background: none; border: 1px solid var(--border-strong); color: var(--fg); cursor: pointer; transition: background-color .25s, border-color .25s;
}
.mo-play:hover { background: color-mix(in oklab, var(--fg) 9%, transparent); border-color: color-mix(in oklab, var(--fg) 45%, transparent); }
.mo-play .ic { font-size: 14px; }
.mo-ruler { position: relative; flex: 1; min-width: 0; height: 44px; border-radius: var(--r-sm); cursor: ew-resize; touch-action: none; }
.mo-ruler:focus-visible { outline-offset: 2px; }
.mo-ticks {
  position: absolute; left: 0; right: 0; top: 13px; height: 18px; border-right: 1px solid var(--border-strong);
  background:
    repeating-linear-gradient(90deg, var(--border-strong) 0 1px, transparent 1px calc(100% / var(--n))) 0 0 / 100% 100% no-repeat,
    repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px calc(100% / (var(--n) * 4))) 0 100% / 100% 40% no-repeat;
}
.mo-ticks::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--border-strong); }
.mo-fill { position: absolute; left: 0; right: 0; bottom: 13px; height: 2px; background: color-mix(in oklab, var(--fg) 50%, transparent); transform-origin: left; transform: scaleX(0); }
.mo-phw { position: absolute; left: 0; right: 0; top: 8px; bottom: 8px; pointer-events: none; }
.mo-ph { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--fg); }
.mo-ph::before { content: ''; position: absolute; top: -3px; left: 50%; width: 10px; height: 8px; transform: translateX(-50%); background: var(--fg); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.mo-card.is-scrub .mo-ph { width: 3px; margin-left: -1.5px; }
.mo-tc { flex: none; font-size: 12px; color: var(--fg); min-width: 11ch; text-align: right; }

.mo-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 16px; padding-top: 4px; }
.mo-h3 { margin: 0; font: 400 clamp(22px, 1.9vw, 28px)/1.1 var(--font-display); letter-spacing: -.02em; }
.mo-file { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; margin: 0; font: 500 11.5px/1.3 var(--font-mono); color: var(--fg-2); }
.mo-file span + span { color: var(--muted); }
.mo-prompt { grid-column: 1 / -1; margin: 0; font: 500 12.5px/1.55 var(--font-mono); color: var(--fg-2); }
.mo-by { display: block; margin-bottom: 2px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* shared backdrop (decorative crops) */
.mo-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.4) saturate(.7); transform-origin: 50% 50%; }
.mo-bg.is-thumb { filter: brightness(.55) saturate(.85); }

/* 1 · Title Reveal */
.mo-t { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 2.4cqw; }
.mo-t-mask { padding: 0 2cqw; }
.mo-t-txt { display: block; font: 400 8cqw/1.05 var(--font-display); letter-spacing: -.025em; color: var(--fg); white-space: nowrap; transform-origin: 50% 50%; }
.mo-c { display: inline-block; }
.mo-t-rule { display: block; width: 26cqw; height: 1px; background: color-mix(in oklab, var(--fg) 55%, transparent); }
.mo-t-sub { font: 500 max(9px, 1.35cqw)/1 var(--font-mono); letter-spacing: .34em; text-transform: uppercase; color: var(--muted); }

/* 2 · Lower Third A */
.mo-lt-vig { position: absolute; inset: 0; background: radial-gradient(120% 95% at 20% 100%, oklch(0% 0 0 / .6), transparent 62%); }
.mo-lt { position: absolute; left: 7cqw; bottom: 10cqw; display: grid; grid-template-columns: auto auto; column-gap: 1.8cqw; row-gap: .5cqw; }
.mo-lt-line { grid-row: 1 / span 2; width: max(2px, .3cqw); background: var(--fg); transform-origin: 50% 100%; }
.mo-lt-m { display: block; overflow: hidden; }
.mo-lt-name { display: block; font: 600 4.4cqw/1.15 var(--font-body); letter-spacing: -.015em; color: var(--fg); }
.mo-lt-role { display: block; font: 500 max(9px, 1.7cqw)/1.4 var(--font-mono); letter-spacing: .26em; text-transform: uppercase; color: var(--fg-2); }

/* 3 · Logo Sting */
.mo-mark { position: absolute; left: 50%; top: 50%; width: 38cqw; height: auto; overflow: visible; color: var(--fg); transform: translate(-50%, -46%); }
.mo-mark * { transform-box: fill-box; transform-origin: 50% 50%; }
.mo-ring { fill: none; stroke: currentColor; stroke-width: 6.2; stroke-dasharray: 100; }
.mo-shock { fill: none; stroke: currentColor; stroke-width: 1; opacity: 0; }
.mo-dot, .mo-bar, .mo-tail { fill: currentColor; }
.mo-bar { transform-origin: 0 50%; }
.mo-tail { fill-opacity: .3; }
.mo-ph-line { fill: none; stroke: var(--accent); stroke-width: 3.4; stroke-linecap: round; }
.mo-ph-head { fill: var(--accent); stroke: var(--accent); stroke-width: 4.2; stroke-linejoin: round; }
.mo-rec { position: absolute; left: 3.4cqw; top: 3.4cqw; display: flex; align-items: center; gap: max(6px, 1cqw); font: 500 max(9px, 1.45cqw)/1 var(--font-mono); letter-spacing: .16em; color: var(--fg-2); }
.mo-rec-dot { position: relative; display: block; width: max(7px, 1.25cqw); aspect-ratio: 1; border-radius: 50%; background: color-mix(in oklab, var(--fg) 26%, transparent); }
.mo-rec-on { position: absolute; inset: 0; border-radius: 50%; background: var(--rec); opacity: 0; }

/* 4 · Caption Style A */
.mo-safe { position: absolute; inset: 5% 5%; border: 1px dashed var(--hair); border-radius: 2px; pointer-events: none; }
.mo-cp {
  position: absolute; left: 13cqw; right: 13cqw; bottom: 8.5cqw; margin: 0; text-align: center; text-wrap: balance;
  font: 600 3.9cqw/1.32 var(--font-body); letter-spacing: -.01em; color: var(--fg);
  text-shadow: 0 .08em .5em oklch(0% 0 0 / .75);
}
.mo-w { display: inline-block; transform-origin: 50% 80%; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 920px) {
  .ag-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ag-tabs {
    display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scroll-padding-inline: var(--gutter);
  }
  .ag-tabs::-webkit-scrollbar { display: none; }
  .ag-tab { flex: 0 0 min(76vw, 300px); scroll-snap-align: start; border-color: var(--border); }
  .ag-thread { min-height: 500px; padding: 18px 16px 8px; }
  .ag-comp { margin: 6px 12px 12px; }
  .mo-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ag-bar .ui-lights, .ag-proj { display: none; }
  .ag-modes span { padding: 0 7px; }
  .ag-u { max-width: 92%; }
  .ag-thread { min-height: 560px; }
  .mo-info { grid-template-columns: minmax(0, 1fr); }
  .mo-file { justify-content: flex-start; }
}

/* ==========================================================================
   Reduced motion: final states, no loops (scrubbing still works)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .ag-u, .ag-a, .ag-res, .ag-reply .rw, .ag-modes i, .ag-send { transition: none !important; }
  .ag-think.live span, .ag-caret { animation: none !important; }
  .ag-tab-prog { display: none; }
}
