/* Student subject detail and explicit communication recipients. */
.portal-subject-workspace, .portal-student-communication { min-width: 0; }
.portal-person { align-items: center; display: inline-flex; gap: .5rem; min-width: 0; text-align: left; }
.portal-person__avatar { align-items: center; background: #e6f2fa; border: 1px solid #b8d7ec; border-radius: 50%; color: #07517d; display: flex; flex: 0 0 2.25rem; height: 2.25rem; justify-content: center; overflow: hidden; width: 2.25rem; }
.portal-person__avatar img { height: 100%; object-fit: cover; width: 100%; }
.portal-person__avatar [hidden] { display: none; }
.portal-person__copy { display: grid; gap: .1rem; min-width: 0; }
.portal-person__copy strong { font-size: .8rem; overflow-wrap: anywhere; }
.portal-person__copy small { color: #50687c; font-size: .72rem; }
.portal-subject-heading { align-items: center; display: flex; flex-wrap: wrap; gap: .7rem; justify-content: space-between; }
.portal-subject-heading > div { min-width: 0; }
.portal-subject-heading .shell-section__eyebrow { margin: .5rem 0 .2rem; }
.portal-subject-summary { align-items: center; color: #50687c; display: flex; font-size: .8rem; gap: .5rem; }
.portal-subject-help { position: relative; }
.portal-subject-help summary { align-items: center; background: #e7f3fb; border: 1px solid #a8cfe7; border-radius: 50%; color: #07517d; cursor: pointer; display: flex; font-size: .75rem; height: 1.35rem; justify-content: center; list-style: none; width: 1.35rem; }
.portal-subject-help summary::-webkit-details-marker { display: none; }
.portal-subject-help p { background: #f4faff; border: 1px solid #b8d7ec; border-radius: .6rem; box-shadow: 0 8px 20px #073b6314; font-size: .78rem; left: 0; line-height: 1.45; margin: .35rem 0 0; padding: .7rem; position: absolute; width: min(17rem, 65vw); z-index: 4; }
.portal-subject-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)); }
.portal-subject-card { background: linear-gradient(145deg, #fff, #f6fbff); border: 1px solid #cfe0f2; border-radius: .85rem; color: #073b63; cursor: pointer; display: grid; font: inherit; gap: .65rem; min-width: 0; padding: .8rem; text-align: left; transition: border-color .15s, box-shadow .15s; }
.portal-subject-card:hover { border-color: #5b9fc9; box-shadow: 0 5px 15px #07517d12; }
.portal-subject-card__top { align-items: start; display: flex; font-size: .94rem; gap: .5rem; justify-content: space-between; }
.portal-subject-card__top strong { overflow-wrap: anywhere; }
.portal-subject-card__arrow { color: #297aaa; font-size: 1.3rem; line-height: 1; }
.portal-subject-card__grade { align-items: baseline; border-top: 1px solid #e1edf5; display: flex; gap: .5rem; padding-top: .6rem; }
.portal-subject-card__grade strong { color: #07517d; font-size: 1.3rem; }
.portal-subject-card__grade small { color: #50687c; font-size: .7rem; }
.portal-subject-card__counts { display: flex; flex-wrap: wrap; font-size: .71rem; gap: .35rem; }
.portal-subject-card__counts > span { background: #edf5fa; border-radius: .35rem; color: #45637b; padding: .15rem .35rem; }
.portal-subject-card__counts > .is-warning { background: #fff4df; color: #875b13; }
.portal-subject-card__link { color: #086da7; font-size: .75rem; }
.portal-subject-pagination { align-items: center; border-top: 1px solid #e1edf5; color: #50687c; display: flex; flex-wrap: wrap; font-size: .74rem; gap: .5rem; justify-content: space-between; margin-top: .4rem; padding-top: .65rem; }
.portal-subject-pagination > div { display: flex; gap: .4rem; }
.portal-subject-pagination button, .portal-subject-heading > div > button { font-size: .76rem; min-height: 34px; padding: .35rem .55rem; }
.portal-subject-workspace button:disabled, .portal-student-communication button:disabled { cursor: default; opacity: .55; }
.portal-subject-workspace :focus-visible, .portal-student-communication :focus-visible { outline: 3px solid #1688bc; outline-offset: 3px; }
.portal-subject-status { color: #50687c; font-size: .8rem; line-height: 1.45; margin: .4rem 0; }
.portal-subject-status.is-error { background: #fff3f0; border: 1px solid #f2c6bd; border-radius: .55rem; color: #8a3c2b; padding: .65rem; }
.portal-subject-toolbar { align-items: center; background: #f5faff; border: 1px solid #d9e8f3; border-radius: .7rem; display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; padding: .65rem; }
.portal-subject-toolbar label { max-width: 100%; min-width: min(100%, 190px); }
.portal-subject-results { display: flex; flex-wrap: wrap; gap: .5rem; }
.portal-subject-results > div { background: #edf8f3; border: 1px solid #c7e7d7; border-radius: .65rem; display: grid; font-size: .76rem; gap: .2rem; padding: .6rem; }
.portal-subject-results strong { color: #23654b; font-size: 1.05rem; }
.portal-subject-results small { color: #50687c; }
.portal-subject-section { display: grid; gap: .6rem; margin-top: .6rem; min-width: 0; }
.portal-subject-section h4 { color: #073b63; font-size: .94rem; margin: 0; }
.portal-subject-component { border: 1px solid #dbe8f2; border-radius: .7rem; overflow: hidden; }
.portal-subject-component__head { align-items: center; background: #eff6fb; display: flex; flex-wrap: wrap; gap: .3rem; justify-content: space-between; padding: .55rem .65rem; }
.portal-subject-component h5 { color: #134c70; font-size: .8rem; margin: 0; }
.portal-subject-component__head > span { color: #50687c; font-size: .72rem; }
.portal-subject-activity { align-items: start; border-top: 1px solid #e1edf5; display: grid; gap: .65rem; grid-template-columns: minmax(0, 1fr) auto; padding: .65rem; }
.portal-subject-activity > div:first-child { display: grid; gap: .3rem; min-width: 0; }
.portal-subject-activity strong { color: #134c70; font-size: .8rem; overflow-wrap: anywhere; }
.portal-subject-activity small, .portal-subject-feedback__item > small { color: #50687c; font-size: .72rem; line-height: 1.45; }
.portal-subject-activity details { font-size: .76rem; }
.portal-subject-activity details summary, .portal-subject-evidence summary { color: #086da7; cursor: pointer; }
.portal-subject-activity details p { white-space: pre-wrap; }
.portal-subject-activity__note { align-content: center; background: #edf6fc; border-radius: .5rem; display: grid; gap: .15rem; min-width: 6rem; padding: .4rem; text-align: center; }
.portal-subject-activity__note strong { font-size: 1rem; }
.portal-subject-activity__note.is-pending { background: #fff6e5; }
.portal-subject-activity__note.is-pending strong { color: #875b13; font-size: .78rem; }
.portal-subject-feedback { display: grid; gap: .5rem; }
.portal-subject-feedback__item { background: #f8fbfe; border: 1px solid #dbe8f2; border-left: 3px solid #83b0d0; border-radius: .65rem; display: grid; gap: .5rem; padding: .65rem; }
.portal-subject-feedback__item.is-congratulation { background: #f1faf5; border-left-color: #59a57d; }
.portal-subject-feedback__item p { font-size: .8rem; line-height: 1.5; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.portal-subject-feedback__item .portal-subject-heading > strong { font-size: .8rem; }
.portal-subject-evidence { font-size: .76rem; overflow-wrap: anywhere; }
.portal-subject-evidence > div { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .4rem; }
.portal-subject-evidence a { color: #086da7; display: inline-block; padding: .35rem 0; }
.portal-recipient-fieldset { border: 1px solid #d5e5f1; border-radius: .7rem; margin: 0; min-width: 0; padding: .65rem; }
.portal-recipient-fieldset legend { color: #134c70; font-size: .82rem; padding: 0 .3rem; }
.portal-recipient-grid { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)); }
.portal-recipient-choice { align-items: center; background: #f8fbfe; border: 1px solid #d5e5f1; border-radius: .6rem; cursor: pointer; display: grid; gap: .3rem .5rem; grid-template-columns: auto minmax(0, 1fr); padding: .55rem; }
.portal-recipient-choice:has(input:checked) { background: #eaf6fe; border-color: #4f9cc9; }
.portal-recipient-choice > input { accent-color: #086da7; height: 1.1rem; width: 1.1rem; }
.portal-recipient-choice > small { color: #50687c; font-size: .71rem; grid-column: 2; line-height: 1.4; }
.portal-selected-recipients { background: #f1f8fd; border-radius: .6rem; color: #45637b; display: grid; font-size: .78rem; gap: .5rem; margin-top: .6rem; padding: .6rem; }
.portal-selected-recipients > div { display: flex; flex-wrap: wrap; gap: .45rem; }
.portal-selected-recipient { align-items: center; background: #fff; border: 1px solid #c9deed; border-radius: .6rem; display: inline-flex; gap: .6rem; max-width: 100%; padding: .45rem; }
.portal-selected-recipient > button { font-size: .7rem; min-height: 32px; padding: .3rem .4rem; }
.portal-student-communication form { display: grid; gap: .6rem; min-width: 0; }
.portal-student-message-fields { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
.portal-student-thread-grid { align-items: start; display: grid; gap: .65rem; grid-template-columns: minmax(210px, .7fr) minmax(0, 1.3fr); }
.portal-student-conversations, .portal-student-messages { display: grid; gap: .5rem; }
.portal-student-conversation { background: #f8fbfe; border: 1px solid #d5e5f1; border-radius: .6rem; color: #134c70; cursor: pointer; display: grid; font: inherit; gap: .3rem; padding: .65rem; text-align: left; }
.portal-student-conversation strong { font-size: .8rem; overflow-wrap: anywhere; }
.portal-student-conversation small { color: #50687c; display: -webkit-box; font-size: .72rem; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.portal-student-conversation.is-active { background: #eaf6fe; border-color: #4f9cc9; }
.portal-thread-recipients { background: #f1f8fd; border: 1px solid #d5e5f1; border-radius: .6rem; display: flex; flex-wrap: wrap; gap: .6rem; padding: .6rem; }
.portal-thread-recipients > strong { color: #45637b; flex-basis: 100%; font-size: .75rem; }
.portal-thread-recipients > span:not(.portal-person) { color: #50687c; font-size: .75rem; }
.portal-student-message { background: #fbfdff; border: 1px solid #dbe8f2; border-radius: .6rem; display: grid; gap: .4rem; min-width: 0; padding: .65rem; }
.portal-student-message > small { color: #50687c; font-size: .7rem; }
.portal-student-message p { font-size: .8rem; line-height: 1.5; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 700px) {
    .portal-subject-grid, .portal-recipient-grid, .portal-student-thread-grid { grid-template-columns: minmax(0, 1fr); }
    .portal-subject-heading { align-items: start; }
    .portal-subject-heading > .portal-person { flex-basis: 100%; }
    .portal-subject-card { gap: .55rem; padding: .7rem; }
    .portal-subject-activity { gap: .45rem; grid-template-columns: minmax(0, 1fr) 5.5rem; }
    .portal-subject-activity__note { min-width: 0; }
    .portal-subject-help p { left: auto; right: 0; }
    .portal-student-message-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .portal-subject-card { transition: none; }
}
