/* A coding-agent session beside the recording; shared type and palette with the teaser. */
.pl-body.pl-body--coding { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 12px; }
.pl-body--coding .pl-media { min-width: 0; }
.pl-body--coding .pl-caption-track { padding: 12px 0 0; min-height: 4rem; }
.cw { --cw-green: #397356; --cw-blue: #4b7095; --cw-agent: #b26d4b; position: relative; min-width: 0; min-height: 25rem; color: var(--ink); }
:root[data-theme="dark"] .cw { --cw-green: #8bcca8; --cw-blue: #9fbfdf; --cw-agent: #dfa283; }
.cw-desktop { position: absolute; inset: 0; display: flex; flex-direction: column; border: 1px solid var(--hairline); border-radius: 7px; overflow: hidden; background: var(--surface); font-family: var(--font-mono); }
.cw-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--hairline); }
.cw-brand { display: flex; align-items: center; gap: 7px; font-size: .67rem; }
.cw-brand strong { font-weight: 500; letter-spacing: .06em; }
.cw-agent-icon { color: var(--cw-agent); font-size: .88rem; line-height: 1; }
.cw-modes, .cw-views { display: flex; gap: 3px; }
.cw-library { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 12px; border-bottom: 1px solid var(--hairline); color: var(--muted); font-size: .57rem; }
.cw-library > span { flex-shrink: 0; }
.cw-skill-select { min-width: 0; width: 100%; padding: 5px; color: var(--ink); background: var(--surface); border: 1px solid var(--hairline); border-radius: 3px; font: inherit; }
.pl-btn--tempo { width: auto; min-width: 0; padding-inline: 9px; white-space: nowrap; font-size: .6rem; }
.pl-btn--tempo[aria-pressed="true"] { color: var(--cw-green, var(--accent-text)); }
.pl-btn--tempo.is-reading { background: var(--surface-2); }
.cw button { font: inherit; cursor: pointer; }
.cw-modes button, .cw-views button { border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: .56rem; padding: 4px 6px; }
.cw-modes button[aria-pressed="true"], .cw-views button[aria-pressed="true"] { color: var(--cw-green); background: color-mix(in srgb, var(--cw-green) 10%, transparent); }
.cw button:focus-visible, .cw-reconstruction:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cw-history { padding: 8px 13px 0; color: var(--muted); opacity: .72; }
.cw-history-line { display: flex; align-items: center; gap: 7px; font-size: .57rem; line-height: 1.75; }
.cw-history-line strong { font-weight: 500; }
.cw-history-line span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-activity { display: flex; gap: 9px; align-items: baseline; padding: 10px 12px; }
.cw-prompt { color: var(--cw-agent); font-size: .95rem; flex: none; line-height: 1; }
.cw-title { margin: 0; font-size: .72rem; line-height: 1.6; }
.cw-call { display: flex; flex-direction: column; flex: 1; min-height: 110px; margin: 0 11px; border-left: 1px solid var(--hairline); }
.cw-call-head { display: flex; align-items: baseline; gap: 7px; padding: 0 8px 7px; }
.cw-tool-dot { font-size: .5rem; color: var(--cw-green); }
.cw-tool { font-size: .67rem; font-weight: 500; color: var(--cw-green); }
.cw-filename { color: var(--ink); font-size: .59rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.cw-action { font-size: .49rem; color: var(--muted); flex-shrink: 0; }
.cw-tabs { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 3px 8px; background: var(--surface-2); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.cw-source-label { font-size: .53rem; color: var(--cw-green); }
.cw-views { flex-shrink: 0; }
.cw-content { position: relative; flex: 1; min-height: 0; display: flex; }
.cw-code { position: relative; flex: 1; min-width: 0; margin: 0; padding: 8px; overflow: auto; list-style: none; scrollbar-width: thin; }
.cw-code.is-diff { background: color-mix(in srgb, var(--cw-green) 4%, transparent); }
.cw-code li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; min-height: 1.7em; font-size: .66rem; line-height: 1.7; }
.cw-code li::before { content: attr(data-line); color: var(--muted); opacity: .55; font-size: .52rem; text-align: right; }
.cw-code.is-diff li::before { content: '+'; color: var(--cw-green); opacity: .8; }
.cw-code code { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.cw-code li.is-writing { background: color-mix(in srgb, var(--cw-green) 8%, transparent); }
.cw-code li.is-writing code::after { content: '▏'; color: var(--cw-green); }
.cw-syn-keyword { color: var(--cw-blue); }
.cw-syn-string { color: var(--cw-green); }
.cw-syn-number { color: var(--accent-text); }
.cw-syn-comment { color: var(--muted); }
.cw-image-view { flex: 1; display: flex; min-width: 0; min-height: 0; gap: 7px; padding: 8px; background: var(--surface-2); }
.cw-image { margin: 0; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.cw-image img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.cw-image-crop { display: block; width: 100%; min-height: 0; flex: 1; overflow: hidden; }
.cw-image-open { display: block; position: relative; flex: 1; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: var(--surface); cursor: zoom-in !important; }
.cw-image-open .cw-image-crop { height: 100%; }
.cw-image-expand { position: absolute; right: 6px; bottom: 6px; padding: 5px 7px; border: 1px solid var(--hairline); border-radius: 3px; background: var(--surface); color: var(--ink-2); font-size: .5rem; }
.cw.is-observing .cw-history, .cw.is-observing .cw-action { display: none; }
.cw.is-observing .cw-call { border-left: 0; }
.cw.is-observing .cw-image-view { padding: 6px; }
.cw-lightbox { width: min(960px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--hairline); border-radius: 8px; color: var(--ink); background: var(--surface); font-family: var(--font-mono); }
.cw-lightbox::backdrop { background: rgb(10 14 12 / .72); }
.cw-lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--hairline); font-size: .72rem; }
.cw-lightbox-head > span { min-width: 0; overflow-wrap: anywhere; }
.cw-lightbox-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cw-lightbox-head button { flex-shrink: 0; padding: 7px; border: 0; border-radius: 3px; background: var(--surface-2); color: var(--ink); }
.cw-lightbox-content { height: min(68vh, 640px); padding: 12px; }
.cw-lightbox-content > img, .cw-lightbox-content > svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.cw-image figcaption { text-align: center; font-size: .53rem; color: var(--muted); overflow-wrap: anywhere; }
.cw-terminal { flex: none; padding: 9px 12px 11px; }
.cw-terminal-head { display: flex; align-items: baseline; gap: 8px; }
.cw-return { color: var(--muted); font-size: .7rem; }
.cw-terminal-status { color: var(--muted); font-size: .5rem; margin-left: auto; flex-shrink: 0; }
.cw-command { display: block; min-width: 0; font: .62rem/1.6 var(--font-mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 3.2em; overflow-y: auto; scrollbar-width: thin; }
.cw-result { margin: 5px 0 0 17px; min-height: 1.5em; font-size: .59rem; line-height: 1.5; color: var(--cw-green); }
.cw-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; background: var(--surface-2); border-top: 1px solid var(--hairline); padding: 7px 10px; color: var(--muted); font-size: .49rem; }
.cw-reconstruction { cursor: help; text-decoration: none; }
.cw-chapter { color: var(--cw-green); }
.cw-simulation { flex: 1; min-height: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 90px; grid-template-rows: auto minmax(0, 1fr) auto; gap: 5px; }
.cw-simulation-label { grid-column: 1 / -1; text-align: center; color: var(--cw-blue); font-size: .57rem; }
.cw-motion-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.cw-checks { display: flex; flex-direction: column; justify-content: center; gap: 7px; color: var(--cw-green); font-size: .56rem; line-height: 1.5; }
.cw-simulation-note { grid-column: 1 / -1; text-align: center; font-size: .48rem; margin: 0; color: var(--muted); }
.cw-simulation > * { min-width: 0; overflow-wrap: anywhere; }
.cw [hidden] { display: none !important; }

/* Two older recordings are permanently mounted below the featured workspace. */
#demos .clips-block { margin-top: 20px; }
#video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.recorded-mission { min-width: 0; scroll-margin-top: 90px; }
.recorded-mission-caption { color: var(--muted); font-size: .8rem; line-height: 1.65; margin: 12px 3px 0; }
.pl-compact { min-width: 0; padding: 12px 12px 10px; scroll-margin-top: 90px; }
.pl-compact .pl-title { font-size: .88rem; }
.pl-compact .pl-inst-text { font-size: .78rem; }
.pl-compact .pl-instruction { padding: 8px 10px; min-height: 66px; }
.pl-compact .pl-badge { font-size: .5rem; padding: 3px 6px; }
.pl-compact .pl-highlights { margin-bottom: 12px; }
.pl-compact .pl-highlight-title { font-size: .69rem; }
.pl-compact .pl-highlight-detail { font-size: .75rem; }
.pl-compact .pl-highlight-description { min-height: 2.8em; }
.pl-compact .pl-plan { display: none; }
.pl-compact .pl-body { display: block; }
.pl-compact .pl-lane-label { font-size: .46rem; }
.pl-compact .pl-source { display: none; }

/* A brief mission introduction, then a quiet strip of jump points. */
.pl-editorial { padding: 20px; }
.pl-editorial .pl-titlewrap { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; width: 100%; }
.pl-editorial .pl-header { margin-bottom: 16px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--hairline)); border-left: 3px solid var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.pl-editorial .pl-title { display: flex; flex-direction: column; gap: 6px; font-size: 1.08rem; font-weight: 400; line-height: 1.5; flex: 1; min-width: min(100%, 16rem); }
.pl-task-label { color: var(--accent-text); font: .53rem/1.1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.pl-task-text { color: var(--ink); font-family: var(--font-sans); font-style: italic; font-synthesis: none; text-wrap: pretty; }
/* One context-card treatment across authored events and recorded milestones. */
.pl-editorial .pl-media { min-width: 0; }
.pl-editorial .pl-toast { inset: 40px auto auto 14px; width: min(340px, calc(60% - 28px)); display: block; padding: 0; background: none; }
.pl-editorial .pl-toast[data-position="top-right"] { left: auto; right: 14px; }
.pl-editorial .pl-toast-card { max-width: none; gap: 10px; padding: 11px 13px; border-radius: 8px; border-left: 3px solid var(--event-color, var(--tool-memory)); background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: 0 8px 24px rgb(0 0 0 / .16); transform: translateY(4px); }
.pl-editorial .pl-toast.is-on .pl-toast-card { transform: none; }
.pl-editorial .pl-toast-mark { width: 24px; height: 24px; font-size: .8rem; background: var(--event-color, var(--tool-memory)); }
.pl-editorial .pl-toast-kicker { font-size: .52rem; color: var(--event-color, var(--tool-memory)); }
.pl-editorial .pl-toast-text { font-size: .83rem; line-height: 1.35; overflow-wrap: anywhere; }
.pl-editorial .pl-toast-note { font-size: .72rem; line-height: 1.4; overflow-wrap: anywhere; }
.pl-editorial .pl-popup-dock > .pl-toast { position: relative; inset: auto; width: auto; margin-top: 8px; }
.pl-popup-dock > .pl-toast:not(.is-on) { display: none; }
.pl-popup-dock .pl-toast-card { transform: none; box-shadow: none; }
.pl-popup-dock .pl-speech { position: static; inset: auto; transform: none; width: auto; max-width: none; margin-top: 8px; }
.pl-popup-dock .pl-speech:not(:has(.is-on)) { display: none; }
.pl-popup-dock .pl-speech-item { width: 100%; box-sizing: border-box; flex-wrap: wrap; border-radius: 8px; box-shadow: none; background: var(--surface); font-size: .83rem; line-height: 1.4; }
.pl-popup-dock .pl-speech-text { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.pl-editorial .pl-stage .pl-speech--in-frame { top: 34px; bottom: auto; left: 12px; right: 12px; transform: none; width: auto; max-width: none; }
.pl-speech--in-frame .pl-speech-item { align-self: flex-start; max-width: 100%; padding: 7px 10px; border-radius: 8px; font-size: .78rem; line-height: 1.35; }
.pl-editorial .pl-map-tag::before { animation: none; opacity: var(--mapping-opacity, 1); }
.pl-evidence-source { display: block; margin-top: 3px; font-size: .9em; letter-spacing: 0; }
.demo-map-note { display: flex; align-items: baseline; gap: 10px; margin-top: 20px; font-size: .88rem; color: var(--ink-2); }
.demo-map-note::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pl-media:has(.pl-stage.has-card) .pl-popup-dock { display: none; }
@media (prefers-reduced-motion: reduce) {
  .pl-editorial .pl-toast, .pl-editorial .pl-toast-card { transition: none; transform: none; }
  .pl-editorial .pl-toast-mark { animation: none !important; }
}
.pl-editorial .pl-badges { margin: 0; gap: 10px; align-items: center; }
.pl-editorial .pl-badge { background: none; border: 0; padding: 0; border-radius: 0; font-size: .55rem; letter-spacing: .04em; }
.pl-editorial .pl-badge--real { color: var(--muted); }
.pl-editorial .pl-badge--success { color: var(--good-text); }
.pl-editorial .pl-instruction { margin: 8px 0 18px; padding: 0; background: none; border: 0; border-radius: 0; min-height: 0; }
.pl-editorial .pl-inst-text { color: var(--ink-2); font-size: .84rem; line-height: 1.6; }
.pl-followup-instruction { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; margin: -4px 0 16px; padding: 9px 12px; border-left: 2px solid var(--accent); border-radius: 0 4px 4px 0; background: var(--accent-soft); }
.pl-followup-label { flex-shrink: 0; color: var(--accent-text); font: .56rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.pl-followup-text { color: var(--ink); font-size: .84rem; line-height: 1.5; overflow-wrap: anywhere; }
.pl-followup-instruction.is-arriving { animation: pl-instruction-arrive 220ms ease-out; }
@keyframes pl-instruction-arrive { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .pl-followup-instruction.is-arriving { animation: none; } }
.pl-speech-who.has-voice { display: inline-flex; align-items: center; gap: 6px; }
.pl-speech-who.has-voice::before { display: none; }
.pl-voice-wave { display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: 20px; height: 14px; flex: none; vertical-align: middle; }
.pl-voice-wave > span { width: 2px; height: 12px; border-radius: 2px; background: currentColor; transform-origin: center; }
.pl-speed { display: inline-flex; align-items: center; height: 30px; color: var(--muted); cursor: default; user-select: none; }
.pl-speed::before { content: '»'; margin-right: 4px; color: var(--muted); }
.pl-editorial .pl-highlights { margin: 0 0 16px; }
.pl-editorial .pl-highlights-header { margin-bottom: 5px; gap: 8px; }
.pl-editorial .pl-highlights-heading { color: var(--muted); font: .57rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.pl-editorial .pl-share { border: 0; border-radius: 3px; min-height: 28px; padding: 4px 0 4px 8px; font-size: .56rem; color: var(--muted); }
.pl-editorial .pl-highlight-list { gap: 0 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pl-editorial .pl-highlight { min-height: 0; gap: 4px; padding: 9px 0; border: 0; border-top: 2px solid var(--hairline); border-radius: 0; background: transparent; }
.pl-editorial .pl-highlight:hover { border-color: var(--muted); color: var(--ink); }
.pl-editorial .pl-highlight[aria-current] { border-color: var(--accent); background: none; color: var(--accent-text); }
.pl-editorial .pl-highlight-marker { font-size: .55rem; width: auto; }
.pl-editorial .pl-highlight-title { font-size: .76rem; font-weight: 400; }
.pl-editorial .pl-share-status { font-size: .65rem; }
.pl-editorial.pl-compact { padding: 16px; }
.pl-editorial.pl-compact .pl-titlewrap { gap: 8px; flex-direction: column-reverse; }
.pl-editorial.pl-compact .pl-title { font-size: .95rem; min-width: 0; }
.pl-editorial.pl-compact .pl-inst-text { font-size: .76rem; }
.pl-editorial.pl-compact .pl-instruction { min-height: 0; margin-bottom: 12px; }
.pl-editorial.pl-compact .pl-highlight-list { gap: 0 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pl-editorial.pl-compact .pl-highlight { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 6px; align-items: baseline; border-top-width: 1px; padding: 8px 0; }
.pl-editorial.pl-compact .pl-highlight-title { font-size: .67rem; }
.pl-editorial.pl-compact .pl-highlights { margin-bottom: 10px; }

/* Authored moments sit on the same condensed clock as the progress bar. */
.pl-timeline--highlighted { padding-inline: 14px; }
.pl-timeline--highlighted .pl-tl-cut { display: none; }
.pl-tl-highlights { position: relative; margin: 10px 14px 0; }
.pl-tl-highlight { position: absolute; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; transform: translateX(-50%); border: 0; background: transparent; color: var(--accent-text); font: .62rem/1 var(--font-mono); cursor: pointer; touch-action: manipulation; }
.pl-tl-highlight-number { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--hairline)); border-radius: 50%; background: var(--surface); }
.pl-tl-highlight[aria-current] .pl-tl-highlight-number { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pl-tl-highlight:is(:hover, :focus-visible) { z-index: 3; }
.pl-tl-highlight:is(:hover, :focus-visible) .pl-tl-highlight-number { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pl-tl-highlight:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 50%; }
.pl-tl-highlight-stem { position: absolute; z-index: 1; width: 1px; background: var(--accent); opacity: .45; pointer-events: none; }
.pl-tl-highlight-preview { position: absolute; bottom: calc(100% + 7px); display: flex; flex-direction: column; gap: 5px; padding: 9px 11px; border: 1px solid var(--hairline); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow-card); color: var(--ink); font: .78rem/1.4 var(--font-sans); text-align: left; white-space: normal; overflow-wrap: anywhere; visibility: hidden; opacity: 0; pointer-events: none; }
.pl-tl-highlight-time { color: var(--accent-text); font: .57rem/1.2 var(--font-mono); }
.pl-tl-highlight:not(.is-preview-dismissed):is(:hover, :focus-visible) .pl-tl-highlight-preview { visibility: visible; opacity: 1; }

@media (max-width: 759px) {
  .pl-editorial, .pl-editorial.pl-compact { padding: 12px; }
  .pl-editorial .pl-header { padding: 10px 11px; }
  .pl-editorial .pl-titlewrap { flex-direction: column-reverse; gap: 7px; }
  .pl-editorial .pl-title { min-width: 0; font-size: 1rem; }
  .pl-editorial .pl-highlight-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .pl-editorial .pl-highlight-title { font-size: .72rem; }
  .pl-speech--in-frame .pl-speech-item { font-size: .72rem; padding: 6px 8px; gap: 6px; }
}

@media (max-width: 1099px) {
  .pl-body.pl-body--coding { grid-template-columns: minmax(0, 1fr); }
  .cw { height: max(430px, 27rem); }
  .cw-code li { font-size: .7rem; }
  .cw-title { font-size: .76rem; }
}
@media (min-width: 1100px) { .pl-editorial .cw { min-height: 0; } }
@media (max-width: 759px) {
  #video-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .cw { height: auto; min-height: 0; }
  .cw-desktop { position: relative; inset: auto; display: block; }
  .cw-call { height: 18rem; min-height: 0; }
  .cw-code li { font-size: .65rem; }
  .cw-brand { font-size: .62rem; }
  .cw-modes button { min-height: 30px; }
  .cw-title { font-size: .69rem; }
  .cw-top { padding: 7px 8px; gap: 5px; flex-wrap: wrap; }
  .cw-action { display: none; }
  .cw-result { font-size: .58rem; }
  .cw-simulation { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(4rem, 1fr) auto auto; }
  .cw-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
  .cw-motion-image { min-height: 4rem; }
}
