/* One Talibon: styles for the presenter module (guide panel, collapsed tab, pill menu). Everything is prefixed pg-.
   Hidden unless the guide is opened, so ordinary visitors and other modules' screenshots never see it. */

/* The shell's sample-data pill becomes the entry point to the presenter menu. */
.poc-pill[data-pg] { pointer-events: auto; cursor: pointer; transition: background .15s, box-shadow .15s; }
.poc-pill[data-pg]:hover { background: var(--sea-700); }
.poc-pill[data-pg]:focus-visible { outline: 3px solid var(--focus-dark); outline-offset: 2px; border-radius: 999px; }

/* ------------------------------------------------------------------ panel */
.pg-panel {
  position: fixed; z-index: 95; bottom: 16px; left: calc(var(--rail-w) + 16px); width: 408px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; max-height: calc(100vh - 32px);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); animation: pg-in .2s ease-out both;
}
body[data-layout="public"] .pg-panel, body:not([data-layout]) .pg-panel { left: 16px; }
@keyframes pg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.pg-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 16px; min-height: 48px; background: var(--sea-900); color: #fff; flex: none; position: sticky; top: 0; z-index: 2; }
.pg-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9fc3cf; }
.pg-count { font-size: var(--fs-sm); font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.pg-spacer { flex: 1; }
.pg-ibtn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-md); background: transparent; color: var(--deep-text); }
.pg-ibtn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.pg-ibtn:focus-visible { outline: 3px solid var(--focus-dark); outline-offset: -2px; }

.pg-bar { display: flex; gap: 3px; padding: 0; height: 4px; background: var(--sea-900); }
.pg-bar i { flex: 1; background: rgba(255, 255, 255, .16); }
.pg-bar i.done { background: var(--gold); }
.pg-bar i.now { background: #fff; }

.pg-body { padding: 16px 18px 12px; }
.pg-title { margin: 0; font-size: 19.5px; line-height: 1.2; font-weight: 700; color: var(--head); letter-spacing: -.01em; }
.pg-say { margin: 8px 0 14px; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.pg-body .btn-block { min-height: 52px; font-size: 16.5px; }
.pg-body .btn.is-busy { opacity: .75; cursor: progress; }
.pg-note { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; min-height: 0; font-size: var(--fs-sm); line-height: 1.4; color: var(--muted); }
.pg-note:empty { display: none; }
.pg-note.ok { color: var(--ok-ink); }
.pg-note.err { color: var(--overdue-ink); }
.pg-note .icon { flex: none; margin-top: 1px; }

.pg-nav { display: flex; justify-content: space-between; gap: 8px; padding: 0 12px 12px; }
.pg-nav .btn { min-width: 112px; }
.pg-nav .btn:disabled { opacity: .4; }

.pg-foot { display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 6px 10px 8px; background: var(--sand); border-top: 1px solid var(--line); }
.pg-foot .btn { color: var(--link); font-size: 13px; padding-left: 8px; padding-right: 10px; }
.pg-foot .btn.is-on { background: var(--gold-100); color: var(--gold-ink); }

/* ------------------------------------------------------------------ the fifteen-step story: header chip and clock, act line, target time */
.pg-chip { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; color: var(--deep-text); background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.pg-chip[data-chip="live"] { color: #0b2e3c; background: #86f6f1; box-shadow: none; }
.pg-clock { flex: none; min-width: 78px; padding: 3px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; color: rgba(205, 222, 234, .82); }
.pg-clock.is-late { color: #2a1a00; background: #f2b441; font-weight: 700; }
.pg-act { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--gold-ink, #7a5600); }
.pg-titlerow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pg-target { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--sand); border: 1px solid var(--line); }
.pg-say::before { content: "“"; }
.pg-say::after { content: "”"; }
.pg-second { margin-top: 10px; }
.pg-second .btn-block { min-height: 46px; }
.pg-line2 { margin: 8px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); font-style: italic; }
.pg-line2::before { content: "“"; } .pg-line2::after { content: "”"; }
.pg-note.work { color: var(--link); }
.pg-body [hidden], .pg-nav[hidden], .pg-qs[hidden] { display: none !important; }

/* before the call */
.pg-cks { display: grid; gap: 2px; margin: 12px 0 14px; padding: 0; list-style: none; }
.pg-ck { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.pg-ck:last-child { border-bottom: 0; }
.pg-ck-ic { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; color: var(--overdue-ink, #a8321f); }
.pg-ck[data-ok="1"] .pg-ck-ic { color: var(--ok-ink, #1f6b41); }
.pg-ck-ic.is-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.pg-ck-t { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.pg-ck-t b { font-size: 14.5px; font-weight: 650; color: var(--head); }
.pg-ck-s { font-size: 13px; line-height: 1.4; color: var(--muted); }
.pg-ck[data-ok="1"] .pg-ck-s { color: var(--ok-ink, #1f6b41); }
.pg-cmd { display: inline-block; max-width: 100%; padding: 4px 8px; border-radius: 6px; font: 600 12.5px/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace; color: #e7f1f7; background: var(--sea-900); user-select: all; overflow-wrap: anywhere; }
.pg-ck.is-action .btn { margin-top: 2px; }
.pg-ck.is-tick { grid-template-columns: minmax(0, 1fr); padding: 4px; }
.pg-ck.is-tick label { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.pg-ck.is-tick input { width: 20px; height: 20px; flex: none; accent-color: var(--sea-700); }
.pg-check .btn-block { min-height: 52px; font-size: 16.5px; }

/* questions they may ask */
.pg-qs { padding: 4px 10px 8px; border-top: 1px solid var(--line); background: var(--surface); max-height: 46vh; overflow-y: auto; }
.pg-q { border-bottom: 1px solid var(--line); }
.pg-q:last-child { border-bottom: 0; }
.pg-q summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 4px; font-size: 14px; font-weight: 650; color: var(--head); cursor: pointer; list-style: none; }
.pg-q summary::-webkit-details-marker { display: none; }
.pg-q summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.pg-q[open] summary::after { transform: rotate(-135deg); }
.pg-q summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -2px; border-radius: 6px; }
.pg-qa, .pg-qnote, .pg-mine { margin: 0 4px 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.pg-qnote { font-style: italic; color: var(--muted); }
.pg-mine { display: flex; align-items: baseline; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--gold-100); color: var(--gold-ink); }
.pg-mine-l { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.pg-mine-t { min-width: 0; }
.pg-foot .btn.is-on { background: var(--gold-100); color: var(--gold-ink); }

/* ------------------------------------------------------------------ collapsed tab */
.pg-tab {
  position: fixed; z-index: 95; bottom: 16px; left: calc(var(--rail-w) + 16px); display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px 0 12px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
  background: rgba(4, 10, 18, .94); color: #fff; font-size: var(--fs-sm); font-weight: 650; box-shadow: var(--shadow-md); animation: pg-in .2s ease-out both;
}
body[data-layout="public"] .pg-tab, body:not([data-layout]) .pg-tab { left: 16px; }
.pg-tab:hover { background: var(--sea-700); }
.pg-tab:focus-visible { outline: 3px solid var(--focus-dark); outline-offset: 2px; }
.pg-tab-n { font-variant-numeric: tabular-nums; color: var(--gold); }

/* ------------------------------------------------------------------ pill menu */
.pg-menu { position: fixed; z-index: 96; width: 300px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: pg-in .16s ease-out both; }
.pg-menu-h { padding: 6px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pg-mitem { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border: 0; border-radius: var(--r-md); background: transparent; text-align: left; color: var(--head); }
.pg-mitem:hover { background: var(--sea-50); }
.pg-mitem:focus-visible { outline: 3px solid var(--focus); outline-offset: -2px; }
.pg-mitem .icon { flex: none; color: var(--sea-600); }
.pg-mitem span { display: flex; flex-direction: column; line-height: 1.25; }
.pg-mitem b { font-size: var(--fs-base); font-weight: 650; }
.pg-mitem small { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------ phones: a bottom sheet above the tab bar */
@media (max-width: 860px) {
  .pg-panel, body[data-layout="public"] .pg-panel, body:not([data-layout]) .pg-panel {
    left: 0; right: 0; width: auto; max-width: none; bottom: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; border-width: 1px 0 0;
    max-height: calc(100vh - 24px); overflow-y: auto;
  }
  body[data-layout="app"] .pg-panel { bottom: calc(var(--tabbar-h) + var(--safe-b)); max-height: calc(100vh - var(--tabbar-h) - var(--safe-b) - 16px); }
  .pg-head { min-height: 52px; padding-left: 18px; }
  .pg-ibtn { width: 44px; height: 44px; }
  .pg-body { padding: 14px 16px 10px; }
  .pg-title { font-size: 19px; }
  .pg-say { font-size: 15px; margin-bottom: 12px; }
  .pg-nav { padding: 0 12px 10px; }
  .pg-nav .btn { flex: 1; }
  .pg-foot { padding: 4px 6px 6px; }
  .pg-foot .btn { min-height: 44px; }
  .pg-clock { min-width: 0; padding: 2px 4px; }
  .pg-qs { max-height: 40vh; }
  .pg-tab, body[data-layout="public"] .pg-tab, body:not([data-layout]) .pg-tab { left: 10px; bottom: 10px; min-height: 44px; }
  body[data-layout="app"] .pg-tab { bottom: calc(var(--tabbar-h) + 10px + var(--safe-b)); }
  .pg-menu { width: min(300px, calc(100vw - 20px)); }
}

/* ------------------------------------------------------------------ the detached guide: its own small window (?remote=1), about 420 px wide
   Only the guide shows: no site header, no app chrome. Larger type than the panel, because it is read at a glance from the side. */
body.pg-remote { margin: 0; overflow: hidden; background: #050c15; }
body.pg-remote > *:not(.pgr-page) { display: none !important; }
.pgr-page { position: fixed; inset: 0; }
.pgr-embed { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; z-index: 210; box-shadow: var(--shadow-lg); }   /* selftests mount the remote inside the page */
.pgr { display: flex; flex-direction: column; height: 100%; max-width: 560px; margin: 0 auto; background: linear-gradient(180deg, #0a1827, #050c15); color: var(--deep-text, #cde0ea); font-size: 18px; }
.pgr-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; min-height: 52px; border-bottom: 1px solid var(--deep-line, rgba(108, 207, 230, .18)); flex: none; }
.pgr-link { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 650; color: var(--deep-text, #cde0ea); }
.pgr-conn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pgr-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #8aa0ad; box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.pgr[data-conn="ok"] .pgr-dot { background: #3ddc97; }
.pgr[data-conn="lost"] .pgr-dot { background: #f2b441; }
.pgr .pg-chip { font-size: 12px; }
.pgr .pg-clock { min-width: 0; font-size: 14px; padding: 3px 6px; }
.pgr-lost { flex: none; padding: 12px 16px 14px; background: rgba(242, 180, 65, .14); color: #ffe3a6; border-bottom: 1px solid rgba(242, 180, 65, .4); }
.pgr-lost[hidden] { display: none; }
.pgr-lost p { margin: 0 0 10px; font-size: 16px; line-height: 1.4; }
.pgr-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-bottom: 8px; }
.pgr-count { padding: 14px 20px 0; }
.pgr[data-view="check"] .pgr-count { display: none; }
.pgr-main { scrollbar-color: rgba(255, 255, 255, .28) transparent; }
.pgr .pg-count { font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--deep-muted, #8fa8b8); }
.pgr .pg-body { padding: 6px 20px 12px; }
.pgr .pg-act { font-size: 13px; margin-bottom: 8px; }
.pgr .pg-titlerow { flex-direction: column; align-items: flex-start; gap: 6px; }
.pgr .pg-title { font-size: 31px; line-height: 1.12; letter-spacing: -.015em; }
.pgr .pg-target { order: -1; font-size: 13px; }
.pgr .pg-titlerow { flex-direction: column-reverse; }
.pgr .pg-say { margin: 12px 0 18px; font-size: 21px; line-height: 1.4; color: #e9f3f8; }
.pgr .pg-body .btn-block { min-height: 68px; font-size: 21px; font-weight: 700; border-radius: var(--r-lg); }
.pgr .pg-second { margin-top: 14px; }
.pgr .pg-second .btn-block { min-height: 60px; font-size: 19px; }
.pgr .pg-line2 { font-size: 16px; }
.pgr .pg-note { margin-top: 14px; font-size: 16px; line-height: 1.4; }
.pgr .pg-note.work { font-weight: 600; }
.pgr .pg-bar { height: 6px; }
.pgr .pg-nav { flex: none; padding: 10px 14px; border-top: 1px solid var(--deep-line, rgba(108, 207, 230, .18)); }
.pgr .btn:not(.btn-primary):not(.btn-gold) { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: #e7f1f7; box-shadow: none; }
.pgr .btn:not(.btn-primary):not(.btn-gold):hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .32); color: #fff; }
.pgr .btn:focus-visible { outline: 3px solid var(--aqua, #37e0e6); outline-offset: 2px; }
.pgr .pg-second .btn { background: rgba(242, 180, 65, .14); border-color: rgba(242, 180, 65, .55); color: #ffe3a6; }
.pgr .pg-second .btn:hover { background: rgba(242, 180, 65, .26); border-color: var(--gold); color: #fff; }
.pgr .pgr-lost .btn { background: var(--gold); border-color: var(--gold); color: #2a1a00; }
.pgr .pg-nav .btn { flex: 1; min-height: 56px; font-size: 18px; font-weight: 650; }
.pgr .pg-nav[hidden] { display: none; }
.pgr .pg-foot { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 6px; padding: 8px 10px 10px; }
.pgr .pg-foot { border-top: 1px solid var(--deep-line, rgba(108, 207, 230, .18)); }
.pgr .pg-foot .btn { justify-content: flex-start; min-height: 46px; font-size: 14.5px; line-height: 1.2; text-align: left; white-space: normal; background: transparent; border-color: transparent; color: #a6eef2; }
.pgr .pg-foot .btn.is-on { background: rgba(242, 180, 65, .16); color: #ffe3a6; }
.pgr .pg-foot .btn.is-armed { background: rgba(255, 120, 100, .2); border-color: rgba(255, 150, 130, .5); color: #ffb9ab; font-weight: 700; }
.pgr .pg-qs { max-height: none; border-top: 1px solid var(--deep-line, rgba(108, 207, 230, .18)); margin: 8px 20px 0; padding: 4px 0 8px; }
.pgr .pg-q summary { min-height: 52px; font-size: 17px; }
.pgr .pg-qa, .pgr .pg-qnote, .pgr .pg-mine { font-size: 16px; }
.pgr .pg-ck-t b { font-size: 17px; }
.pgr .pg-ck-s { font-size: 15px; }
.pgr .pg-ck.is-tick label { font-size: 17px; min-height: 48px; }
.pgr .pg-check .pg-title { font-size: 26px; }
.pgr .pg-cmd { font-size: 14px; }
/* no stage to talk to: show the last known state, but nothing can be pressed */
.pgr[data-conn="lost"] .pgr-main, .pgr[data-conn="lost"] .pg-nav, .pgr[data-conn="lost"] .pg-foot,
.pgr[data-conn="wait"] .pgr-main, .pgr[data-conn="wait"] .pg-nav, .pgr[data-conn="wait"] .pg-foot { opacity: .45; pointer-events: none; }
@media (max-height: 640px) {
  .pgr .pg-title { font-size: 26px; } .pgr .pg-say { font-size: 18px; margin-bottom: 12px; }
  .pgr .pg-body .btn-block { min-height: 56px; font-size: 19px; } .pgr .pg-foot .btn { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) { .pg-panel, .pg-tab, .pg-menu { animation: none; } }
@media print { .pg-panel, .pg-tab, .pg-menu { display: none !important; } }
.pg-foot .btn[hidden], .pg-ck .btn[hidden] { display: none; }
