.person-photo-trigger,.person-name-trigger { padding:0; border:0; background:none; color:inherit; font:inherit; cursor:pointer; }
.person-photo-trigger { display:block; margin:0 auto; border-radius:50%; }
.person-name-trigger { appearance:none; line-height:1.4; border:0; border-radius:0; background:transparent; box-shadow:none; outline:none; }
.person-name-trigger:hover { color:var(--teal); }
.person .person-summary { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:5; line-clamp:5; overflow:hidden; max-height:8em; line-height:1.6; }
.person[role="button"] { cursor:pointer; }
.person[role="button"]:focus-visible { outline:3px solid #75bfaf; outline-offset:6px; border-radius:8px; }
.person-photo-trigger:focus-visible { outline:3px solid #75bfaf; outline-offset:5px; }
.person-name-trigger:focus,.person-name-trigger:focus-visible { outline:none; box-shadow:none; text-decoration:underline; text-underline-offset:5px; text-decoration-thickness:2px; }
.teacher-panel { width:min(740px,calc(100vw - 32px)); }
.teacher-panel .modal-head h2 { font-size:26px; }
.teacher-panel #teacher-dialog-photo { width:112px; height:112px; margin:0 auto 24px; display:block; }
.teacher-panel .live-copy { font-size:15px; }
.teacher-panel .live-copy p { text-align:justify; }
.chat-panel { width:min(520px,calc(100vw - 32px)); height:min(680px,calc(100dvh - 40px)); max-height:calc(100dvh - 40px); display:flex; flex-direction:column; overflow:hidden; border-radius:16px; background:#fff; }
.chat-head { flex-shrink:0; padding:18px 20px; background:#fff; border-bottom:1px solid #e7ecee; }
.chat-colleague { display:flex; align-items:center; gap:12px; }
.chat-avatar { width:52px; height:52px; flex:none; object-fit:cover; border-radius:50%; background:#e5eeef; }
.chat-head h2 { margin:0; font-size:20px; line-height:1.25; }
.chat-colleague p { margin:4px 0 0; font-size:12px; color:#6b7c89; }
.chat-transcript { flex:1; min-height:0; overflow:auto; padding:22px 20px; background:#f6f8f9; overscroll-behavior:contain; }
.chat-message { width:fit-content; max-width:90%; margin:0 0 14px; padding:12px 15px; border-radius:14px 14px 14px 4px; background:white; color:#254258; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.chat-message p { margin:0; white-space:pre-line; text-align:left; }
.chat-message--user { margin-left:auto; background:#0b526f; color:white; border-radius:14px 14px 4px 14px; }
.chat-message--loading { color:#75858c; }
.chat-sources { margin-top:8px; border:0; }
.chat-sources > summary { padding:0; font-size:11px; font-weight:500; color:#66808b; text-decoration:underline; text-underline-offset:3px; }
.chat-sources > summary::after { display:none; }
.chat-result { margin-top:8px; }
.chat-result a { display:block; font-size:11px; font-weight:600; text-decoration:underline; }
.chat-result small { display:block; margin-top:2px; color:#718591; font-size:10px; }
.chat-message .chat-human-note { margin-top:8px; color:#667e8a; font-size:12px; }
.chat-form { display:flex; flex-shrink:0; align-items:flex-end; gap:10px; padding:14px 16px 10px; border-top:1px solid #e7ecee; background:#fff; }
.chat-form .sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.chat-form textarea { min-width:0; width:100%; min-height:44px; max-height:110px; resize:none; padding:12px 14px; border:0; border-radius:11px; background:#f0f4f5; font:inherit; font-size:14px; line-height:20px; }
.chat-send { display:grid; place-items:center; width:44px; height:44px; flex:none; padding:0; border:0; border-radius:11px; background:#118c7a; color:white; cursor:pointer; }
.chat-send:hover { background:#0c7566; }
.chat-send:disabled { opacity:.45; cursor:wait; }
.chat-bottom { position:relative; display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:0 18px 14px; background:#fff; }
.chat-human { border:0; padding:0; background:none; color:#607987; font-size:11px; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.chat-privacy { border:0; position:relative; }
.chat-privacy > summary { padding:0; font-size:10px; font-weight:400; color:#84939b; }
.chat-privacy > summary::after { display:none; }
.chat-privacy[open] { position:absolute; z-index:2; right:14px; bottom:10px; width:min(300px,calc(100vw - 60px)); padding:12px; background:#fff; border:1px solid #dce7e8; border-radius:8px; box-shadow:0 6px 24px #17324e1a; }
.chat-privacy p { margin:8px 0 0; font-size:11px; color:#617783; line-height:1.5; }
@media(max-width:480px) { .chat-message { max-width:93%; } .chat-form { padding:12px 12px 10px; gap:8px; } .chat-bottom { padding:0 14px 13px; } .teacher-panel .modal-head h2 { font-size:21px; } }
.chat-panel { width:min(360px,calc(100vw - 24px)); height:min(430px,calc(100dvh - 32px)); max-height:calc(100dvh - 32px); }
.chat-head { position:relative; padding:18px 18px 16px; }
.chat-colleague { display:flow-root; width:100%; padding-right:16px; }
.chat-avatar { float:left; width:112px; height:112px; margin:0 12px 8px 0; }
.chat-introduction { display:contents; }
.chat-head h2 { font-size:16px; line-height:1.35; text-align:left; }
.chat-colleague .chat-role { margin:3px 0 7px; font-size:11px; }
.chat-colleague .chat-welcome { margin:8px 0 0; font-size:12px; line-height:1.5; color:#405d6f; text-align:left; }
.chat-head .modal-close { position:absolute; top:10px; right:10px; }
.chat-transcript { padding:16px; }
.chat-privacy > summary { font-size:8px; line-height:1.5; }
@media(max-width:360px) { .chat-head { padding:16px 14px; } .chat-avatar { width:96px; height:96px; margin-right:12px; } }

/* Portrait and full biography share the same inset and top alignment. */
#teacher-modal .teacher-dialog-body{display:flow-root;padding:24px 26px 26px}
#teacher-modal .teacher-dialog-body #teacher-dialog-photo{float:left;display:block;width:112px;height:112px;object-fit:cover;border-radius:50%;margin:0 20px 12px 0}
#teacher-modal .teacher-dialog-body #teacher-dialog-bio{padding:0;margin:0;border:0;border-radius:0;background:none}
#teacher-modal #teacher-dialog-bio>:first-child{margin-top:0}
#teacher-modal .teacher-panel{margin-inline:auto}
@media(max-width:480px){#teacher-modal .teacher-dialog-body{padding:20px}#teacher-modal .teacher-dialog-body #teacher-dialog-photo{width:88px;height:88px;margin:0 16px 10px 0}}
