/* 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 hero's controls beside the stage: six steps in two columns, one caption, then one row that holds
   the presentation views, Pause and Replay. The column must stay shorter than the stage, or it would
   push the drawing below the fold. */
@media (min-width: 801px) {
  .hero > .session-controls .rp-steps { gap: 0 .9rem; padding-bottom: 3.5rem }
  .hero > .session-controls .rp-steps button { grid-template-columns: 1.5rem 1fr }
  .hero > .session-controls .rp-steps b { font-size: clamp(1.1rem,1.5vw,1.36rem) }
  .hero > .session-controls .rp-steps button[aria-pressed="true"] { padding-left: .55rem }
  .hero > .session-controls .rp-steps button[aria-pressed="true"] .rp-what { bottom: .6rem; height: 2.3rem; font-size: .86rem; line-height: 1.3 }
  .hero > .session-controls .rp-transport { flex-wrap: nowrap; gap: .4rem }
  .hero > .session-controls .rp-views { flex: 1 1 0; gap: .4rem }
  .hero > .session-controls .rp-transport button { min-width: 2.6rem; height: 2.6rem; padding: 0 .85rem }
  .hero > .session-controls .rp-views button { padding: 0 }
}

/* 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) }
}
