/* Shared coach component styling, centralized for every workshop phase. */
.coach-welcome { display: grid; grid-template-columns: minmax(0,1fr) 88px; gap: .75rem; align-items: center; padding: 1rem; margin-bottom: .85rem; border: 1px solid #258dac; border-radius: 1rem; background: radial-gradient(ellipse at 85% 55%,#10507988,transparent 65%),#091d3d; }
.coach-welcome-copy { min-width: 0; }
.coach-welcome h3 { margin: 0 0 .4rem; color: #effcff; font-size: 1.45rem; line-height: 1.25; }
.coach-welcome p { margin: 0; color: #d2e5f8; font-size: .88rem; line-height: 1.5; }
.coach-welcome .coach-presence { display: inline-block; margin-top: .65rem; padding: .3rem .55rem; border: 1px solid #148a91; border-radius: 1rem; color: #6af3dc; font-size: .7rem; }
.coach-portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 4px 12px #00b8ff30); }
.coach-quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin: 0 0 1rem; }
.coach-quick-actions button { display: flex; align-items: center; justify-content: center; gap: .6rem; min-width: 0; min-height: 54px; padding: .7rem .65rem; margin: 0; border: 1px solid #207bb2; border-radius: .85rem; background: linear-gradient(150deg,#0d345b,#082346); color: #edf6ff; white-space: normal; line-height: 1.4; text-align: left; }
.coach-quick-actions button:last-child { grid-column: 1 / -1; }
.coach-quick-actions button > span { flex: 0 0 1.6rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; color: #ffdc59; font-size: 1.4rem; }
.coach-quick-actions button:nth-child(4) > span { background: #ba7be4; color: #13213c; font-size: 1rem; font-weight: 800; }
.coach-quick-actions button:hover:not(:disabled) { border-color: #56e8f7; background: #12456a; }
.coach-compare { padding: 1rem; margin-bottom: 1rem; border: 1px solid #2b718e; border-radius: .85rem; background: #0c2946; }
.coach-compare h4 { margin: 0 0 .7rem; }
.coach-compare label { display: block; margin: .5rem 0 .3rem; }
.coach-compare select { width: 100%; max-width: 100%; box-sizing: border-box; }
coach-transcript { display: block; }
.coach-history { list-style: none; padding: .15rem .3rem .15rem 0; margin: .75rem 0 1rem; height: 30rem; max-height: none; overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; scrollbar-color: #316684 transparent; scrollbar-width: thin; }
.coach-history > li { margin: 0 0 .85rem; }
.coach-assistant, .coach-user { padding: .9rem; border-radius: .9rem; margin: .5rem 0; overflow-wrap: anywhere; }
.coach-assistant { background: #0b304b; border: 1px solid #167a98; color: #edf6ff; }
.coach-user { background: #282857; color: #e4edff; margin-left: 1rem; border: 1px solid #6865b5; }
.coach-message-heading { display: flex; align-items: center; gap: .6rem; }
.coach-message-heading strong { color: #f0f7ff; font-size: .85rem; }
.coach-message-avatar, .coach-team-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; border: 1px solid #31c8e3; background: #155379; }
.coach-message-avatar img { display: block; width: 30px; height: 30px; object-fit: contain; }
.coach-team-avatar { background: #49429a; border-color: #8f86e2; color: #e7deff; }
.coach-team-avatar .icon { width: 20px; height: 20px; }
.coach-answer > p, .coach-user > p { margin: .65rem 0 0; color: inherit; font-size: .9rem; line-height: 1.65; white-space: pre-wrap; }
.coach-assistant .action-links { margin-top: .5rem; }
.coach-assistant button { white-space: normal; text-align: left; max-width: 100%; }
.coach-compose { display: grid; grid-template-columns: minmax(0,1fr) 48px; gap: .65rem; align-items: end; margin-top: 1rem; }
.coach-compose textarea { min-width: 0; width: 100%; box-sizing: border-box; margin: 0; padding: .85rem 1rem; border: 1px solid #14739e; border-radius: 1rem; background: #071d3b; color: #edf6ff; resize: vertical; }
.coach-compose textarea::placeholder { color: #a3bed5; }
.coach-compose #coach-ask { width: 48px; height: 48px; margin: 0; padding: 0; border-radius: 50%; color: #08244c; background: #ffdc45; font-size: 1.4rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 500px) { .coach-welcome { grid-template-columns: minmax(0,1fr) 68px; padding: .8rem; } .coach-welcome h3 { font-size: 1.2rem; } .coach-quick-actions button { font-size: .8rem; gap: .3rem; } }
.research-coach-actions button:last-child { grid-column: auto; }
coach-composer { display: block; }
form.coach-compose { padding: 0; margin: 1rem 0 0; max-width: none; border: 0; background: transparent; box-shadow: none; }
.coach-keyboard-help { margin: .4rem 0 0; color: #a3bed5; font-size: .7rem; }
.coach-budget-notice { padding: 1rem; margin-block: .75rem; border: 2px solid #ad6500; border-radius: .75rem; background: #fff6df; color: #593600; }
.workshop-coach .coach-budget-notice p { margin: .4rem 0 0; color: #593600; }
/* Complete the sidebar rules in the component scope, after the shared coach styles. */
.solution-coach-actions { grid-template-columns: minmax(0,1fr); gap: .55rem; }
.solution-coach-actions button { justify-content: flex-start; text-align:left; }
.solution-coach-actions button:last-child { grid-column: auto; }
.solution-coach-actions button > span { margin-left:auto; background:transparent; color:#8dc7f8; }
.solution-coach-actions button strong { font-size:.8rem; }
.solution-coach-actions .solution-icon { width:25px; height:25px; flex:0 0 25px; }
.solution-followups button { border:1px solid #237ba6; border-radius:.7rem; background:#0b3152; color:#e4f3ff; }
.coach-welcome h3 { font-weight:750; }

/* The transcript owns the remaining viewport space in every participant phase. */
coach-viewport { display:block; min-width:0; }
.participant-page .participant-desk #phase-history .phase-work-support:has(coach-viewport) { padding:10px; top:16px; }
.participant-page #team-coach { display:flex; flex-direction:column; box-sizing:border-box; height:var(--coach-height,calc(100dvh - 240px)); min-height:0; margin:0; padding:0; border:0; background:transparent; }
.participant-page #team-coach > * { flex-shrink:0; }
.participant-page #team-coach .coach-welcome { grid-template-columns:minmax(0,1fr) 48px; gap:8px; min-height:0; margin:0 0 8px; padding:0 2px 8px; border:0; border-bottom:1px solid #156184; border-radius:0; background:transparent; }
.participant-page #team-coach .coach-welcome h3 { width:auto; margin:0 0 4px; font-family:var(--workshop-body); font-size:1.15rem; line-height:1.2; }
.participant-page #team-coach .coach-welcome-copy > p:not(.coach-presence) { display:none; }
.participant-page #team-coach .coach-presence { display:block; margin:0; padding:0; border:0; font-size:.7rem; line-height:1.4; background:transparent; }
.participant-page #team-coach .coach-presence > span:last-child { display:none; }
.participant-page #team-coach .coach-portrait { width:40px; height:40px; align-self:center; }
.participant-page #team-coach .coach-portrait img { width:100%; height:100%; object-fit:contain; }
.participant-page #team-coach > coach-transcript { display:flex; flex:1 1 0; min-height:0; overflow:hidden; }
.participant-page #team-coach .coach-history { box-sizing:border-box; flex:1; width:100%; height:100%; min-height:0; max-height:none; margin:0; padding:4px 5px 4px 0; border:0; background:transparent; }
.participant-page #team-coach .coach-assistant,.participant-page #team-coach .coach-user { padding:10px; }
.participant-page #team-coach .coach-answer > p,.participant-page #team-coach .coach-user > p { font-size:.9rem; line-height:1.55; }
.participant-page #team-coach form.coach-compose { grid-template-columns:minmax(0,1fr) 40px; gap:6px; align-items:center; margin:8px 0 0; }
.participant-page #team-coach .coach-compose textarea { height:52px; min-height:52px; max-height:104px; padding:8px 10px; resize:none; font-size:.85rem; line-height:1.4; border-radius:12px; }
.participant-page #team-coach #coach-ask { width:40px; height:40px; min-width:40px; }
.participant-page #team-coach .coach-keyboard-help { margin:4px 0 0; font-size:.65rem; line-height:1.2; }
.participant-page #team-coach > :is(#coach-feedback,#coach-unavailable,.field-help) { margin:4px 0; font-size:.75rem; }
.participant-page #team-coach .coach-budget-notice { max-height:20%; overflow:auto; margin:0 0 6px; padding:8px; font-size:.75rem; }
.coach-tools { position:relative; margin:0 0 8px; }
.coach-tools > summary { display:flex; align-items:center; justify-content:space-between; cursor:pointer; list-style:none; min-height:36px; box-sizing:border-box; padding:6px 10px; border:1px solid #207bb2; border-radius:9px; background:#082b4b; color:#edf6ff; font-size:.8rem; }
.coach-tools > summary::-webkit-details-marker { display:none; }
.coach-tools[open] > summary { margin-bottom:0; }
.coach-tools > summary:focus-visible { outline:2px solid #ffdc45; outline-offset:2px; }
.coach-tools[open] > summary > span { transform:rotate(180deg); }
.coach-tools-content { position:absolute; z-index:5; top:calc(100% + 4px); inset-inline:0; box-sizing:border-box; max-height:min(360px,calc(var(--coach-height,100dvh) - 150px)); overflow:auto; padding:10px; border:1px solid #258dac; border-radius:12px; background:#082346; box-shadow:0 12px 30px #0008; }
.participant-page #team-coach .coach-quick-actions { display:grid; grid-template-columns:1fr; gap:6px; margin:0; }
.participant-page #team-coach .coach-quick-actions button { justify-content:flex-start; min-height:40px; padding:7px 9px; border-radius:8px; }
.participant-page #team-coach .coach-quick-actions button:last-child { grid-column:auto; }
.participant-page #team-coach .coach-quick-actions button strong { font-family:inherit; font-size:.8rem; }
@media(max-width:1050px) {
 .participant-page #team-coach { height:var(--coach-height,calc(100dvh - 32px)); }
 .participant-page .participant-desk #team-coach { scroll-margin-top:16px; }
}
