/* Present hub: what the shared sheets (/style.css, /assets/hub.css, /assets/product/replay.css) do not have.
   Loaded after them by /product/presentations/ and the pages under it. */

/* ---- Replays on this hub ---- */
/* The board is landscape, so a narrow stage stays landscape instead of going square. */
.hub-page .replay { --rp-ratio-narrow: 16 / 10 }
.hub-hero-stage > .replay { box-shadow: 0 18px 34px -24px #17281f8c }
/* One scene means no row of step chips. */
.replay.one { --rp-controls-tall: calc(4rem + 1px) }
#card-views { --rp-ratio: 2 / 1; --rp-ratio-narrow: 16 / 9 }
#card-together { --rp-ratio: 16 / 9; --rp-ratio-narrow: 16 / 9 }
/* A replay inside a card whose heading link covers the whole card: its buttons stay in reach, above the link. */
.hub-card-media > .replay { width: 100% }
.hub-card .replay { border-radius: 8px }
.hub-card .rp-controls { position: relative; z-index: 1 }
/* hub.css styles every paragraph in a split or a tab panel as body copy. A replay's own lines are not body copy. */
:is(.hub-split, .hub-tabpanel) .replay p:not(.kicker):not(.plan-chip) { max-width: none; margin-top: 0; color: inherit }
:is(.hub-split, .hub-tabpanel) .replay p.rp-label:not(.kicker):not(.plan-chip) { color: var(--rp-soft) }

/* The view in front: every other note steps back, as in the published player. */
@media (prefers-reduced-motion: no-preference) {
  .rp-canvas [data-node-id], [data-still] [data-node-id] { transition: opacity .32s }
}
/* The line the app shows someone who is presenting or following, and the state of a published presentation.
   It sits opposite the readout. A label, not a control. */
.pr-state { position: absolute; top: .6rem; right: .6rem; max-width: calc(100% - 1.2rem); padding: .3rem .65rem; overflow: hidden; border: 1px solid #c98f78; border-radius: 99px; background: #fbe3d8; color: var(--ink); font: 600 .75rem/1.2 "Helvetica Neue",Arial,sans-serif; text-overflow: ellipsis; white-space: nowrap }
.pr-state[hidden] { display: none }
/* With both chips up on a narrow stage the state goes under the readout. */
/* On a narrow stage it takes the readout's corner, and gives way to the readout while a view is in front:
   the status line under the canvas says the same thing. */
@container replay (max-width: 719px) {
  .pr-state { right: auto; left: .6rem }
  .replay[data-shown] .pr-state { display: none }
}
@media (prefers-reduced-motion: no-preference) { .pr-state { animation: pr-in .28s ease-out both } }
@keyframes pr-in { from { opacity: 0; transform: translateY(-4px) } }

/* ---- Still stages ---- */
/* The readout a presentation shows for the view in front, on a still stage. A label, not a control. */
.pr-chip { position: absolute; inset: .55rem auto auto .55rem; z-index: 1; max-width: calc(100% - 1.1rem); margin: 0; padding: .28rem .62rem; overflow: hidden; border-radius: 99px; background: var(--ink); color: #fff; font: 600 .75rem/1.25 "Helvetica Neue",Arial,sans-serif; text-overflow: ellipsis; white-space: nowrap }
.stage-body > .pr-chip { inset: .55rem auto auto .55rem; padding: .28rem .62rem; font-size: .75rem }
.stage-body[data-drawn] > .pr-chip { display: block }
.stage-note { display: block; margin: 0; padding: .55rem .7rem .6rem; background: #fffdf4; border-top: 1px solid #cfd5c4; color: var(--ink); font: 500 .86rem/1.4 "Helvetica Neue",Arial,sans-serif }
.stage-title em.open { border-color: #c98f78; background: #fbe3d8 }
/* The second half of a long badge is dropped where there is no room for it. */
@media (max-width: 800px) { .pr-more { display: none } }
.stage.mini .stage-foot { padding: .45rem .6rem .5rem }
.stage.mini .stage-title em { font-size: .75rem }
/* A card whose canvas takes the height its row gives it. */
@media (min-width: 801px) {
  .hub-card.fill .hub-card-media { flex: 1; display: grid; align-items: stretch }
  .hub-card.fill .stage.mini { display: flex; flex-direction: column }
  .hub-card.fill .stage.mini .stage-body { flex: 1; aspect-ratio: auto; min-height: 240px }
}
.hub-card-copy .plan-chips, .hub-actions .plan-chips { display: flex; flex-wrap: wrap; gap: .4rem }
.hub-split .hub-more, .hub-statement .hub-more { display: inline-block; margin-top: 1.4rem; font-weight: 600 }
.hub-statement .hub-more { margin-top: clamp(1.6rem,3vw,2.6rem) }
.hub-split > div > .plan-chip:first-child { margin: 0 0 1rem }

/* ---- A page someone else owns, with the published player inside it. The page is a drawing; the canvas inside is real. ---- */
.pr-doc { margin: 0; overflow: hidden; border: 1px solid #b9c2b3; border-radius: 10px; background: #fff; color: #26332c }
.pr-doc-bar { display: flex; align-items: center; gap: .4rem; padding: .5rem .75rem; background: #eceae0; border-bottom: 1px solid #cfd5c4; font: 500 .75rem/1.3 ui-monospace,Menlo,monospace; white-space: nowrap }
.pr-doc-bar i { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: #c3cabb }
.pr-doc-bar span { min-width: 0; margin-left: .35rem; padding: .18rem .6rem; overflow: hidden; border-radius: 99px; background: #fff; text-overflow: ellipsis }
.pr-doc-page { padding: clamp(.8rem,1.6vw,1.4rem) clamp(.9rem,2vw,1.8rem) clamp(.9rem,1.8vw,1.5rem) }
.pr-doc-page > b { display: block; font: 700 clamp(1.15rem,1.6vw,1.5rem)/1.1 Georgia,"Times New Roman",serif }
.pr-doc-page > span { display: block; margin: .35rem 0 .8rem; color: #5a665e; font: 400 .86rem/1.45 Georgia,"Times New Roman",serif }
.pr-doc-page .stage { border-radius: 6px; box-shadow: none }
.pr-doc-lines { display: grid; gap: .45rem; margin-top: .85rem }
.pr-doc-lines i { height: .5rem; border-radius: 99px; background: #e4e6dc }
.pr-doc-lines i:last-child { width: 62% }
.hub-card .pr-doc { border-radius: 8px }
.pr-doc figcaption { margin: 0; padding: .6rem .9rem .65rem; border-top: 1px solid #cfd5c4; background: #fffdf4; color: #5a6a5e; font: 500 .75rem/1.4 ui-monospace,Menlo,monospace }

/* ---- The app's own player, in a frame. It is the one canvas on these pages a visitor drives. ---- */
.pr-screen { max-width: 1100px; margin: 0 auto; overflow: hidden; border: 1px solid #4d6759; border-radius: 10px; background: #fffdf4; color: var(--ink); box-shadow: 0 24px 44px -28px #0009 }
.pr-screen-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem clamp(.7rem,1.2vw,1rem); border-bottom: 1px solid #cfd5c4; font: 600 .78rem/1.2 "Helvetica Neue",Arial,sans-serif; white-space: nowrap }
.pr-screen-bar b { overflow: hidden; font-size: .9rem; text-overflow: ellipsis }
.pr-screen-bar em { flex: none; padding: .16rem .5rem; border: 1px solid #c98f78; border-radius: 99px; background: #fbe3d8; font: 500 .75rem/1.3 ui-monospace,Menlo,monospace }
.pr-player { position: relative; aspect-ratio: var(--stage-ratio,16/9); background: #f8f7ef }
.pr-player > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0 }
.pr-poster { position: absolute; inset: 0; display: grid; place-items: center }
.pr-poster .stage-body { position: absolute; inset: 0; aspect-ratio: auto }
.pr-poster .stage-body [inert] { opacity: .45 }
/* The button sits in the corner of the slate that has no notes. */
.pr-poster .button { position: absolute; left: 34%; top: 80%; transform: translate(-50%,-50%); padding: .95rem 1.4rem; font-size: 1.05rem; white-space: nowrap; box-shadow: 0 0 0 6px #fffdf4cc }
.hub-section[data-tone="ink"] .pr-poster .button { background: var(--ink); border-color: var(--ink); color: #fff }
.hub-section[data-tone="ink"] .pr-poster .button:hover { background: #375548 }
.pr-screen figcaption { margin: 0; padding: .6rem .9rem .65rem; border-top: 1px solid #cfd5c4; color: #5a6a5e; font: 500 .75rem/1.4 ui-monospace,Menlo,monospace }
.pr-screen + .hub-steps { max-width: 1100px; margin: clamp(1.8rem,3.4vw,3.2rem) auto 0 }
.pr-doc .pr-player { aspect-ratio: 16 / 9 }
.pr-doc .pr-poster .button { box-shadow: 0 0 0 6px #fffc }

/* ---- A presenter and a follower the visitor steps. ---- */
.pr-duo { display: grid; gap: clamp(.8rem,1.4vw,1.2rem); max-width: 1180px; margin-inline: auto }
.pr-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(10px,1.4vw,22px) }
.pr-pair .stage-body { aspect-ratio: 16 / 10 }
.pr-pair .stage-title em { font-size: .75rem }
.pr-duo-foot { display: block; margin: 0; padding: .55rem .7rem .6rem; overflow: hidden; background: #fffdf4; border-top: 1px solid #cfd5c4; font: 600 .82rem/1.3 "Helvetica Neue",Arial,sans-serif; text-overflow: ellipsis; white-space: nowrap }
.pr-duo-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem .9rem }
.pr-duo-controls button { min-width: 44px; min-height: 44px; padding: .55rem 1.1rem; border: 1px solid var(--s-ink,var(--ink)); border-radius: 5px; background: var(--s-ink,var(--ink)); color: var(--s-bg,#fff); font: 600 .95rem/1.2 "Helvetica Neue",Arial,sans-serif; cursor: pointer }
.pr-duo-controls button:disabled { background: none; color: var(--s-soft,#5a6a5e); border-color: var(--s-line,#b9c2b3); cursor: default }
.pr-duo-controls button:focus-visible { outline: 3px solid #b36919; outline-offset: 2px }
.pr-duo-controls span { color: var(--s-soft,#44574b); font: 500 .78rem/1.4 ui-monospace,Menlo,monospace }
.pr-duo-controls { min-height: 44px }

/* ---- The embed code, as the app hands it over. ---- */
.pr-code { max-width: 100%; margin: 1.2rem 0 0; padding: .9rem 1rem; overflow-x: auto; border: 1px solid var(--s-line,#b9c2b3); border-radius: 8px; background: var(--s-card,#fffdf4); color: var(--s-ink,var(--ink)); font: 500 .8rem/1.55 ui-monospace,Menlo,monospace; white-space: pre-wrap; word-break: break-word }

/* ---- Who can open what: one row per audience. ---- */
.pr-access { display: grid; gap: 0; margin: 0 }
.pr-access > div { display: grid; grid-template-columns: minmax(9rem,.55fr) minmax(0,1fr) minmax(0,1fr); gap: .4rem clamp(1rem,3vw,3rem); padding: 1.05rem 0; border-top: 1px solid var(--s-line) }
.pr-access > div:last-child { border-bottom: 1px solid var(--s-line) }
.pr-access dt { font: 700 clamp(1.3rem,1.8vw,1.7rem)/1.08 "Archivo Narrow","Arial Narrow",sans-serif; letter-spacing: -.025em }
.pr-access dd { margin: 0; color: var(--s-soft); font-size: .97rem }
.pr-access dd b { display: block; margin-bottom: .15rem; color: var(--s-ink); font: 600 .75rem/1.6 ui-monospace,Menlo,monospace }

/* Published presentations from the app's public feed. Hidden until the feed has one. */
#featured-presentations .related-actions { display: flex; flex-wrap: wrap; gap: .6rem 1rem }
#featured-presentations .related-actions a { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--ink); border-radius: 5px; font-weight: 600; text-decoration: none }

/* A caveat under a list. */
.pr-after { max-width: 60ch; margin-top: 1.4rem; color: var(--s-soft); font-size: .95rem }

@media (max-width: 800px) {
  /* A workshop lane is tall: on a phone its canvas is tall too, so the cards in front can be read. */
  .stage.mini .stage-body.pr-lane { aspect-ratio: 4 / 5 }
  .stage.mini .stage-body.pr-whole { aspect-ratio: 16 / 10 }
  .pr-access > div { grid-template-columns: minmax(0,1fr) }
  .pr-pair { grid-template-columns: minmax(0,1fr) }
  .pr-player { aspect-ratio: 4 / 5 }
  .pr-doc .pr-player { aspect-ratio: 4 / 5 }
  .pr-poster .button { left: 50%; top: auto; bottom: 7%; transform: translateX(-50%) }
}

/* The staged call strip sits over the bottom of the canvas. While a view is in front the neighbouring notes run
   under it, so on these pages it is opaque: no note text shows through the tiles. */
.hub-page[data-hub="presentations"] .rp-call { background: #fffdf4 }

/* ---- The presentation editor, staged over a replay (editor.js). A picture of the app's editor, not a control. ---- */
.pe-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; font: 500 .78rem/1.3 "Helvetica Neue",Arial,sans-serif; color: var(--ink) }
.pe-layer[hidden], .pe-layer [hidden] { display: none !important }
.pe-bar { position: absolute; top: .5rem; left: .5rem; right: .5rem; display: flex; align-items: center; gap: .5rem; padding: .3rem .35rem .3rem .45rem; border: 1px solid #b9c2b3; border-radius: 8px; background: #fffdf4; box-shadow: 0 6px 14px -10px #0006; font-weight: 600; white-space: nowrap }
.pe-bar::before { content: "Presentation editor"; color: #5a6a5e; font: 500 .75rem/1.2 ui-monospace,Menlo,monospace }
.pe-version { padding: .2rem .5rem; border: 1px solid #6f8f7d; border-radius: 4px; font-weight: 500 }
.pe-publish { margin-left: auto; padding: .28rem .6rem; overflow: hidden; border: 1px solid #b9c2b3; border-radius: 4px; color: #285b46; text-overflow: ellipsis }
.pe-publish::before { content: "↑ "; font-weight: 700 }
.pe-publish[data-on] { background: #fbe3d8; box-shadow: 0 0 0 3px #f0cd7f }
.pe-publish[data-done] { border-color: #73c49f; background: #e3f3ea; color: #1f5a3b }
.pe-publish[data-done]::before { content: "✓ " }
.pe-mark { position: absolute; box-sizing: border-box; border: 2px dashed #b36919; border-radius: 12px }
.pe-mark::before { content: attr(data-n); position: absolute; left: -12px; top: -12px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #b36919; color: #fff; font: 700 .78rem/1 "Helvetica Neue",Arial,sans-serif }
.pe-mark[data-picked]::before { background: #6e3509; box-shadow: 0 0 0 4px #f0cd7f }
.pe-menu { position: absolute; top: .4rem; right: .5rem; padding: .3rem; border: 1px solid #b9c2b3; border-radius: 6px; background: #fff; box-shadow: 0 12px 24px -14px #0008 }
.pe-menu span { display: block; padding: .45rem .7rem; border-radius: 4px; background: #eef1e4; font-weight: 600 }
.rp-present:has(+ .pe-caret) { border-radius: 4px 0 0 4px }
.pe-caret { margin-left: -.45rem; padding-inline: .4rem; border-color: var(--rp-ink); border-left-color: #ffffff59; border-radius: 0 4px 4px 0; background: var(--rp-ink); color: #fff }
.pe-caret[data-on] { box-shadow: 0 0 0 3px #f0cd7f }
.pe-pop { position: absolute; top: 3.2rem; right: .7rem; display: grid; gap: .4rem; width: min(18rem, 44%); padding: .65rem .75rem; border: 1px solid #b9c2b3; border-radius: 8px; background: #fff; box-shadow: 0 16px 30px -16px #0008 }
.pe-pop[data-side="left"] { right: auto; left: .7rem }
.pe-pop-head { font: 700 .95rem/1.1 "Archivo Narrow","Arial Narrow",sans-serif }
.pe-about { margin-top: -.2rem; color: #5a6a5e; font-size: .75rem }
.pe-field { display: grid; gap: .12rem; padding: .3rem .5rem .35rem; border: 1px solid #c3cabb; border-radius: 4px }
.pe-field small { color: #5a6a5e; font-size: .75rem }
.pe-value { min-height: 1.3em }
.pe-narrative .pe-value { min-height: 3.9em }
.pe-field[data-focus] { border-color: #285b46; box-shadow: 0 0 0 1px #285b46 }
.pe-actions { display: flex; gap: .4rem; justify-content: flex-end; margin-top: .1rem }
.pe-actions span { padding: .26rem .55rem; border-radius: 4px; font-weight: 600 }
.pe-delete { margin-right: auto; background: #b23b2a; color: #fff }
.pe-save { color: #285b46 }
.pe-save[data-on] { background: #e3f3ea; box-shadow: 0 0 0 3px #f0cd7f }
.pe-player { position: absolute; left: .7rem; bottom: .7rem; display: grid; gap: .3rem; max-width: min(19rem, 52%); padding: .6rem .7rem; border: 1px solid #4d6759; border-radius: 8px; background: #fffdf4; box-shadow: 0 16px 30px -16px #0008 }
.pe-player small { color: #5a6a5e; font: 500 .75rem/1.2 ui-monospace,Menlo,monospace }
.pe-readout { padding: .25rem .55rem; border-radius: 99px; background: var(--ink); color: #fff; font: 600 .75rem/1.25 "Helvetica Neue",Arial,sans-serif; justify-self: start }
.pe-note { font-weight: 600 }
.pe-player[data-flip] .pe-readout, .pe-player[data-flip] .pe-note { animation: pe-flip .5s ease-out }
@keyframes pe-flip { from { background-color: #f0cd7f; color: var(--ink) } }
@media (prefers-reduced-motion: no-preference) {
  .pe-mark[data-new] { animation: pe-in .3s ease-out both }
  .pe-pop:not([hidden]), .pe-menu:not([hidden]) { animation: pe-in .22s ease-out both }
  .pe-field[data-flash] { animation: pe-flash .7s ease-out }
}
@keyframes pe-in { from { opacity: 0; transform: translateY(-4px) } }
@keyframes pe-flash { from { background: #fbe9b8 } }
/* A small stage: the settings and the player take the band under the board, and show only the field being changed. */
#authoring, #publish { --rp-ratio-narrow: 1 / 1 }
@container replay (max-width: 719px) {
  .pe-bar::before, .pe-version { display: none }
  .pe-bar { justify-content: flex-end }
  .pe-pop, .pe-pop[data-side="left"] { top: auto; bottom: .5rem; left: .5rem; right: .5rem; width: auto }
  .pe-field:not([data-focus]), .pe-about, .pe-delete { display: none }
  .pe-narrative .pe-value { min-height: 2.6em }
  .pe-player { left: .5rem; right: .5rem; bottom: .5rem; max-width: none }
}
