/* The homepage hero: the shared replay frame (replay.css) filling the hero's stage column, edge to edge. */
.hero > .session { grid-area: stage; border: 0; border-left: 1px solid var(--line); border-radius: 0; scroll-margin-top: 1rem;
  --rp-min: clamp(350px,calc(100svh - 368px),560px); --rp-label: 2.04rem; --rp-ratio-narrow: 592 / 608; --rp-label-narrow: 3.06rem }
.hero > .session :is(.rp-bar, .rp-foot) { padding-inline: clamp(.7rem,1.3vw,1.15rem) }
@media (max-width: 800px) {
  .hero > .session { border-left: 0; border-top: 1px solid var(--line); --rp-bar: 2.5rem }
  .hero > .session :is(.rp-bar, .rp-foot, .rp-chat) { padding-inline: var(--pad) }
}
/* The narrowest phones: the conversation row a little lower, so the drawing ends above the fold. */
@media (max-width: 380px) {
  .hero > .session .rp-chat { height: 3.25rem }
  .hero > .session.replay:not([data-built])::before { margin-top: calc(var(--rp-bar) + 3.25rem) }
}
/* The stage keeps the height the step list beside it used to give it (483px at 1280 wide, 545 at 1440), so the film's
   smallest words stay 12px or more; on phones the stage takes its height from its width (replay.css). */
@media (min-width: 801px) { .hero > .session { --rp-min: clamp(480px,calc(100svh - 355px),560px) } }
/* The hero's one control: Pause / Play, at the right of the line under the stage (assets/home/hero-film.js). */
.hero > .session > .rp-foot { position: relative; padding-right: 6.2rem }
.hero-toggle { position: absolute; top: .5rem; right: clamp(.7rem,1.3vw,1.15rem); min-width: 4.6rem; height: 2.25rem; padding: 0 .85rem;
  border: 1px solid var(--ink, #21392f); border-radius: 99px; background: var(--rp-paper, #fffdf4); color: var(--ink, #21392f);
  font: 600 .8rem/1 "Helvetica Neue", Arial, sans-serif; cursor: pointer }
.hero-toggle:hover { background: var(--ink, #21392f); color: #fff }
.hero-toggle:focus-visible { outline: 2px solid #a2541a; outline-offset: 2px }
/* Phones: the status line keeps the stage's full width (its height is reserved, so the hero never changes height), and
   Pause / Play sits beside the honesty label below it. */
@media (max-width: 800px) {
  .hero > .session > .rp-foot { grid-template-columns: minmax(0,1fr) auto; column-gap: .75rem; padding-right: var(--pad) }
  .hero > .session > .rp-foot > .rp-status { grid-column: 1 / -1 }
  .hero-toggle { position: static; align-self: start; min-width: 4.2rem; height: 2.1rem }
}
@media (scripting: none) { .hero-toggle { display: none } }

/* A still session on a product page: a quiet replica of the editor's frame around a read-only slate. */
.session.still { min-width: 0; margin: 0; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto; background: #f3f1e4; border-left: 1px solid var(--line); scroll-margin-top: 1rem }
.session-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem clamp(.7rem,1.3vw,1.15rem); background: #fffdf4; border-bottom: 1px solid #cfd5c4; font: 600 .78rem/1 "Helvetica Neue",Arial,sans-serif; white-space: nowrap }
.session-title, .session-tools { display: inline-flex; align-items: center; gap: .5rem; min-width: 0 }
.session-tools, .tool { flex: none }
.session-title img { width: 1.4rem; padding: .22rem; border-radius: 3px; background: var(--ink) }
.session-title b { overflow: hidden; text-overflow: ellipsis; font-size: .9rem }
.session-title em { padding: .16rem .5rem; border: 1px solid #b9c2b3; border-radius: 99px; font: 500 .66rem/1.3 ui-monospace,Menlo,monospace }
.tool { padding: .42rem .68rem; border: 1px solid #c3cabb; border-radius: 4px }
.tool.present { background: var(--ink); border-color: var(--ink); color: #fff }

.session-body { display: grid; grid-template-columns: minmax(0,1fr) clamp(214px,20.5vw,296px); min-height: 0 }
.session-board { position: relative; min-width: 0; height: 100%; min-height: clamp(350px,calc(100svh - 356px),560px); overflow: hidden; pointer-events: none; user-select: none; touch-action: pan-y }
.session-chat { display: flex; flex-direction: column; gap: .85rem; min-width: 0; padding: .95rem 1rem 1rem; overflow: hidden; background: #fffdf4; border-left: 1px solid #cfd5c4; font-size: .84rem; line-height: 1.42 }
.chat-head { font: 700 1.12rem/1 "Archivo Narrow",Arial,sans-serif }
.chat-turn small { display: block; margin-bottom: .2rem; color: #5a6a5e; font-size: .68rem }
.chat-turn.you p { padding: .6rem .7rem; border-radius: 8px 8px 8px 2px; background: #eef1e4 }

.session-foot { display: grid; align-content: start; gap: .3rem; margin: 0; padding: .6rem clamp(.7rem,1.3vw,1.15rem) .65rem; background: #fffdf4; border-top: 1px solid #cfd5c4; color: var(--ink); font: 500 .86rem/1.35 "Helvetica Neue",Arial,sans-serif }
.session-status::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .5rem; border-radius: 50%; background: #a84d25 }
.session-meta { display: inline-flex; align-items: center; gap: .6rem }
.session-label { color: #5a6a5e; font: 500 .7rem/1.35 ui-monospace,Menlo,monospace }
.session.still .session-foot { grid-template-columns: minmax(0,1fr) auto; align-items: center }
.session.still .session-status { grid-column: 1 / -1 }

@media (max-width: 1080px) and (min-width: 801px) {
  .session-tools .tool:not(.present) { display: none }
}
@media (max-width: 800px) {
  .session.still { border-left: 0; border-top: 1px solid var(--line) }
  .session-body { grid-template-columns: minmax(0,1fr) }
  .session-bar { padding-inline: var(--pad) }
  .session-tools .tool:not(.present) { display: none }
  .session-foot { padding-inline: var(--pad) }
}
@media (max-width: 430px) {
  .session-title em { display: none }
  .session-title b { font-size: .82rem }
}

/* A still session on a product page: the same frame, with the source and the request shown in full. */
.session.still { align-self: stretch }
.session.still .session-body { grid-template-columns: minmax(0,1fr) clamp(220px,22vw,310px) }
.session.still .session-board { display: grid; align-items: center; height: auto; min-height: 0; max-height: none; aspect-ratio: auto; padding: clamp(.6rem,1.6vw,1.6rem) }
.session-board [inert], .session-board [inert] > svg { background: transparent !important }
.session.still .session-board > [inert] { position: relative; inset: auto; width: 100%; aspect-ratio: var(--ratio,1.5); max-height: 430px }
.session.still .session-board > p { margin: 0; padding: 1rem }
.session.still .session-board[data-drawn] > p { display: none }
.session.still .session-chat { overflow: visible }
.chat-turn.source blockquote { margin: 0; padding-left: .7rem; border-left: 3px solid #f0cd7f; font: 500 1rem/1.4 Georgia,serif; color: #263c2e }
.chat-turn.source small a { color: inherit }
.chat-turn.you p { font: 500 .78rem/1.5 ui-monospace,Menlo,monospace }
.session-foot a { font-weight: 600 }
@media (max-width: 800px) {
  .session.still .session-body { grid-template-columns: minmax(0,1fr) }
  .session.still .session-chat { padding: .9rem var(--pad) 1rem; border-left: 0; border-top: 1px solid #cfd5c4 }
  .session.still .session-board { padding: .5rem var(--pad) }
}
