/* coach (v2.4.0): the coaching layer. Talk first on the decision cards (lib/coach.js), the full-window phase transition,
   "Our decisions" (the drawer), "Finished early?" (in the ready bar, and in the top bar in the debrief) and the intro slides on
   the big screen (views/screen-intro.js). Colour follows the palette rules in app.css: talk is neutral ink on a soft tint,
   never a status colour; the phase transition and the slides are the dark stage. */

/* ---------- talk first ---------- */
.coach-talk { margin: 6px 0 0; padding: 6px 10px 6px 14px; border-radius: 10px; background: var(--tint); box-shadow: inset 3px 0 0 var(--ink); display: flex; flex-direction: column; gap: 3px; }
.coach-talk-top { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.coach-talk-k { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.coach-talk-k svg { color: var(--ink); }
.coach-talk-q { flex: 1 1 320px; min-width: 0; margin: 0; font-size: var(--fs-md); line-height: 1.35; font-weight: var(--fw-bold); color: var(--ink); }
.coach-talk-voices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.coach-voice { margin: 0; display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.coach-voice .role-chip { flex: none; color: var(--ink); }
.coach-voice > span:last-child { font-style: italic; }
.coach-voice.is-it { padding-left: 14px; border-left: 1px solid var(--border); }
@media (max-width: 760px) {
  .coach-talk-voices { grid-template-columns: 1fr; }
  .coach-voice.is-it { padding-left: 0; border-left: 0; }
}

/* The two-minute timer: quiet until it runs; when the time is up it asks the table to agree. */
.coach-timer { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-bold); cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.coach-timer:hover { border-color: var(--border-strong); }
.coach-timer.is-running { border-color: var(--ink); }
.coach-timer.is-running svg:last-child { color: var(--muted); }
.coach-timer.is-low { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber-ink); }
.coach-timer.is-done { background: var(--ink); border-color: var(--ink); color: #fff; }
.build-guide-head .coach-talk { margin-top: 10px; }

/* ---------- the top bar: "Our decisions" (and "Finished early?" in the debrief) ---------- */
.coach-top-btn { gap: 6px; white-space: nowrap; }
.coach-top-btn.is-open { background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (max-width: 900px) { .coach-top-l { display: none; } }

/* ---------- the phase transition: the dark stage, one moment per phase ---------- */
.coach-intro { position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; padding: 24px var(--gutter); overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(1200px 600px at 50% 0%, #0B4A75 0%, rgba(11, 74, 117, 0) 70%), var(--navy); color: #fff; animation: fadeIn .25s var(--ease) both; }
.coach-intro-inner { width: min(760px, 100%); display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.coach-intro-step { font-size: var(--fs-sm); font-weight: var(--fw-bold); letter-spacing: .14em; text-transform: uppercase; color: #9FC3DD; }
.coach-intro-mark { margin-top: 10px; font-size: clamp(88px, 14vh, 140px); line-height: .9; font-weight: var(--fw-heavy); letter-spacing: -.04em; color: #fff; font-variant-numeric: tabular-nums; animation: rise .45s var(--ease) both; }
.coach-intro-name { margin: 6px 0 0; font-size: clamp(36px, 6vh, 56px); line-height: 1.05; letter-spacing: -.02em; font-weight: var(--fw-heavy); color: #fff; }
.coach-intro-sub { margin-top: 8px; font-size: var(--fs-xl); font-weight: var(--fw-bold); color: #CFE2F0; }
.coach-intro-text { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .18); display: flex; flex-direction: column; gap: 12px; width: 100%; }
.coach-intro-what { margin: 0; font-size: clamp(20px, 2.4vh, 26px); line-height: 1.35; font-weight: var(--fw-bold); color: #fff; }
.coach-intro-how { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-lg); line-height: 1.4; color: #DCE9F3; }
.coach-intro-how svg { flex: none; margin-top: 2px; color: #7FD9C8; }
.coach-intro-foot { margin-top: 28px; width: 100%; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.coach-intro-min { display: inline-flex; gap: 8px; align-items: center; font-size: var(--fs-md); font-weight: var(--fw-bold); color: #CFE2F0; }
.coach-intro-go { margin-left: auto; min-height: 52px; padding: 12px 26px; font-size: var(--fs-lg); background: #fff; border-color: #fff; color: var(--navy); }
.coach-intro-go:hover { background: #E6F6F3; border-color: #E6F6F3; color: var(--navy); }
.coach-intro-go:focus-visible { outline: 3px solid #7FD9C8; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .coach-intro, .coach-intro-mark { animation: none; } }

/* ---------- the drawer ---------- */
.coach-drawer-wrap { position: fixed; inset: 0; z-index: 85; }
.coach-drawer-scrim { position: absolute; inset: 0; background: rgba(16, 38, 56, .32); animation: fadeIn .2s both; }
.coach-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--surface); box-shadow: -12px 0 32px rgba(16, 38, 56, .18); display: flex; flex-direction: column; animation: coachSlide .28s var(--ease) both; }
@keyframes coachSlide { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .coach-drawer, .coach-drawer-scrim { animation: none; } }
.coach-drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 4px 20px; }
.coach-drawer-t { margin: 0; flex: 1; display: flex; align-items: center; gap: 10px; font-size: var(--fs-xl); line-height: 1.2; color: var(--ink); font-weight: var(--fw-heavy); }
.coach-drawer-lede { margin: 0; padding: 0 20px 10px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; border-bottom: 1px solid var(--hairline); }
.coach-drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 20px 28px; }
.coach-h-sec { padding: 12px 0 10px; border-bottom: 1px solid var(--hairline); }
.coach-h-sec:last-child { border-bottom: 0; }
.coach-h-title { margin: 0 0 6px; display: flex; align-items: baseline; gap: 10px; font-size: var(--fs-md); color: var(--ink); font-weight: var(--fw-heavy); }
.coach-h-title > span:first-child { flex: 1; }
.coach-h-status { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--muted); }
.coach-h-status.is-open { color: var(--ink); background: var(--tint); padding: 2px 8px; border-radius: var(--radius-pill); }
.coach-h-rows { margin: 0; display: flex; flex-direction: column; }
.coach-h-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 2px 12px; padding: 5px 0; font-size: var(--fs-sm); line-height: 1.4; }
.coach-h-row + .coach-h-row { border-top: 1px dashed var(--hairline); }
.coach-h-row dt { color: var(--muted); }
.coach-h-row dd { margin: 0; color: var(--ink); font-weight: var(--fw-medium); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; }
.coach-h-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1px; }
.coach-h-items li { position: relative; padding-left: 12px; }
.coach-h-items li::before { content: ''; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--steel); }
.coach-h-row.is-wide { grid-template-columns: 1fr; }
.coach-h-items.is-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; }
.coach-h-go { font-size: var(--fs-xs); white-space: nowrap; }
.coach-h-none { margin: 4px 0; font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 480px) { .coach-h-row { grid-template-columns: 1fr; } }

/* ---------- "Finished early?" ---------- */
.coach-early { border-bottom: 1px solid var(--hairline); background: var(--band); animation: fadeIn .25s both; }
.coach-early-in { padding-block: 10px 10px; }
.coach-early-head { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.coach-early-t { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-md); color: var(--ink); font-weight: var(--fw-heavy); }
.coach-early-t svg { color: var(--steel); }
.coach-early-lede { flex: 1 1 200px; font-size: var(--fs-xs); color: var(--muted-on-tint); }
.coach-early-hide { font-size: var(--fs-sm); }
.coach-early-list { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: early; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; }
.coach-early-list li { counter-increment: early; display: flex; gap: 8px; font-size: var(--fs-sm); line-height: 1.4; color: var(--ink); font-weight: var(--fw-medium); }
.coach-early-list li::before { content: counter(early); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink); }
.coach-early-list.is-drawer { grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
.coach-early-list.is-drawer li { font-size: var(--fs-md); }
@media (max-width: 900px) { .coach-early-list { grid-template-columns: 1fr; } }
.coach-early-people { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); }
.coach-early-k { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-on-tint); }
.coach-early-note { letter-spacing: 0; text-transform: none; font-weight: 400; }
.coach-early-pq { margin: 4px 0 6px; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink); }
.coach-early-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.coach-early-opt { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); border: 1.5px solid var(--hairline); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.coach-early-opt:hover { border-color: var(--border-strong); }
.coach-early-opt.is-selected { border-color: var(--ink); background: var(--tint); color: var(--ink); font-weight: var(--fw-bold); }
.coach-early-show { gap: 6px; }

/* ---------- the control room's intro slides card (views/admin/intro-slides.js) ---------- */
.admin-intro-list { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.admin-intro-pick { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; }
.admin-intro-pick:hover:not([disabled]) { border-color: var(--border-strong); }
.admin-intro-list li.is-current .admin-intro-pick { background: var(--tint); border-color: var(--ink); color: var(--ink); font-weight: var(--fw-bold); }
.admin-intro-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--band-2); color: var(--ink); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.admin-intro-list li.is-current .admin-intro-n { background: var(--ink); color: #fff; }
.admin-intro-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- the intro slides on the big screen (views/screen-intro.js; sized in the projector's --u, readable from 10 m) ---------- */
.screen-intro { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: calc(var(--u) * 80); padding-bottom: calc(var(--u) * 2); animation: rise .5s var(--ease) both; }
.screen-intro .screen-kicker { gap: calc(var(--u) * 1); }
.screen-intro-n { font-variant-numeric: tabular-nums; color: #fff; }
.screen-intro-t { font-size: calc(var(--u) * 4.4); margin-top: calc(var(--u) * .8); }
.screen-intro-lines { list-style: none; margin: calc(var(--u) * 2.6) 0 0; padding: 0; display: flex; flex-direction: column; gap: calc(var(--u) * 1.3); }
.screen-intro-lines li { position: relative; padding-left: calc(var(--u) * 2.4); font-size: calc(var(--u) * 2.2); line-height: 1.3; color: #fff; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 120ms); }
.screen-intro-lines li::before { content: ''; position: absolute; left: 0; top: .55em; width: calc(var(--u) * 1); height: calc(var(--u) * .3); border-radius: 99px; background: #7FD9C8; }
.screen-intro-steps { list-style: none; margin: calc(var(--u) * 3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(var(--u) * 1.4); }
.screen-intro-steps li { display: flex; flex-direction: column; gap: calc(var(--u) * 1); padding: calc(var(--u) * 1.6) calc(var(--u) * 1.5); background: var(--panel); border: 1px solid var(--panel-line); border-radius: calc(var(--u) * 1.2); font-size: calc(var(--u) * 1.9); line-height: 1.25; font-weight: 700; color: #fff; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 140ms); }
.screen-intro-sn { width: calc(var(--u) * 3.4); height: calc(var(--u) * 3.4); border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--navy); font-size: calc(var(--u) * 1.8); font-weight: 800; }
.screen-intro-chip { align-self: flex-start; margin-top: calc(var(--u) * 2.4); padding: calc(var(--u) * .5) calc(var(--u) * 1.3); border-radius: 99px; border: 1px solid var(--panel-line); background: var(--panel); font-size: calc(var(--u) * 1.6); font-weight: 700; color: #fff; }
.screen-intro-foot { margin-top: calc(var(--u) * 3.2); display: flex; align-items: center; gap: calc(var(--u) * 2); }
.screen-intro-dots { display: inline-flex; gap: calc(var(--u) * .6); }
.screen-intro-dots i { width: calc(var(--u) * .9); height: calc(var(--u) * .9); border-radius: 99px; background: rgba(255, 255, 255, .3); }
.screen-intro-dots i.is-on { width: calc(var(--u) * 2.6); background: #fff; }
.screen-intro-keys { font-size: var(--t-min); color: var(--on-dark-2); }
.screen-idle .screen-intro-keys { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .screen-intro, .screen-intro-lines li, .screen-intro-steps li { animation: none; } }
