/* Peermigo guided learning strengths and subject suggestion styles */
.pm-subject-source{min-width:0}.pm-subject-input-wrap{position:relative;min-width:0}
.pm-subject-suggestions{position:absolute;left:0;right:0;top:100%;z-index:30;margin-top:5px;border:1px solid #dce4ee;border-radius:12px;box-shadow:0 16px 32px #13263e24;background:#fff;max-height:255px;overflow-y:auto;padding:5px}
.pm-subject-suggestions[hidden]{display:none!important}
.pm-subject-suggestions button{display:block;text-align:left;width:100%;border:0;background:transparent;color:#24344e;padding:10px 12px;border-radius:8px;cursor:pointer;font:inherit;font-size:13px}
.pm-subject-suggestions button:hover,.pm-subject-suggestions button[aria-selected=true]{background:#eaf7f1;color:#087f58}
.pm-learning-selector{border:1px solid #e5ebf2;border-radius:15px;padding:17px;background:#fbfcff;margin-top:18px;min-width:0}
.pm-learning-head{margin-bottom:14px}.pm-learning-head h4{font-size:15px;color:#18304a;margin:0 0 5px}.pm-learning-head p{color:#73809a;font-size:12px;line-height:1.6;margin:0}
.pm-learning-choices{display:grid;gap:10px}.pm-learning-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #e9edf5;border-radius:11px;background:#fff;padding:10px 12px;min-width:0}
.pm-learning-subject{font-weight:650;color:#223450;font-size:13px;min-width:0;overflow-wrap:anywhere}.pm-learning-actions{display:flex;gap:6px;flex:none;flex-wrap:wrap}
.pm-learning-chip{border:1px solid #d4dae5;background:#fff;border-radius:20px;font-size:11px;font-weight:700;padding:7px 10px;color:#63718b;cursor:pointer;transition:background .12s,border-color .12s}
.pm-learning-chip:hover{border-color:#8bbda8}.pm-learning-chip:focus-visible{outline:3px solid #62bd9a;outline-offset:2px}
.pm-learning-chip.confident.is-selected{background:#def7eb;border-color:#56b48b;color:#086a46}.pm-learning-chip.help.is-selected{background:#e7f1ff;border-color:#7ca8e5;color:#185aa2}
.pm-learning-empty,.pm-learning-footnote{font-size:11px;line-height:1.6;color:#8791a4;margin:0}.pm-learning-footnote{margin:12px 0 0}
.pm-support-badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:1.5;font-weight:700;border-radius:8px;padding:5px 8px;background:#def7eb;color:#116948;max-width:100%}
.pm-support-badge.is-mutual{background:#e8f1ff;color:#30589f}
.pm-learning-profile-details{margin:14px 0;display:grid;gap:11px}.pm-learning-profile-details .pm-fact-tags{display:flex;flex-wrap:wrap;gap:7px}
.pm-support-label{display:block;color:#697993;font-weight:800;font-size:10px;letter-spacing:.08em;text-transform:uppercase;margin-bottom:7px}
@media(max-width:550px){.pm-learning-selector{padding:13px}.pm-learning-row{align-items:stretch;flex-direction:column;gap:8px}.pm-learning-actions{width:100%}.pm-learning-chip{flex:1}.pm-support-badge{font-size:10px}}
html[data-theme=dark] .pm-subject-suggestions{background:#202c40;border-color:#41536c;box-shadow:0 18px 34px #050b1590}
html[data-theme=dark] .pm-subject-suggestions button{color:#eaf0fb}
html[data-theme=dark] .pm-subject-suggestions button:hover,html[data-theme=dark] .pm-subject-suggestions button[aria-selected=true]{background:#1b433d;color:#adf4d3}
html[data-theme=dark] .pm-learning-selector{background:#182337;border-color:#354359}
html[data-theme=dark] .pm-learning-head h4,html[data-theme=dark] .pm-learning-subject{color:#f2f6ff}
html[data-theme=dark] .pm-learning-head p,html[data-theme=dark] .pm-learning-footnote,html[data-theme=dark] .pm-learning-empty{color:#aab8ce}
html[data-theme=dark] .pm-learning-row{background:#1d2a40;border-color:#354359}
html[data-theme=dark] .pm-learning-chip{background:#243449;border-color:#58657a;color:#ced9e6}
html[data-theme=dark] .pm-learning-chip.confident.is-selected{background:#17543d;border-color:#5ac69a;color:#c6ffe3}
html[data-theme=dark] .pm-learning-chip.help.is-selected{background:#173d60;border-color:#699fdb;color:#d9eeff}
html[data-theme=dark] .pm-support-badge{background:#15513b;color:#bdf4d5}
html[data-theme=dark] .pm-support-badge.is-mutual{background:#24466a;color:#d7e9ff}

/* Compact student cards show an academic-support badge only when relevant to the viewer.
   Full self-reported strengths/needs remain inside the expanded details. */
.directory-card > .pm-support-badge{align-self:flex-start;margin:2px 0 14px;min-width:0;max-width:100%;overflow-wrap:anywhere}
.directory-card .pm-card-learning-expanded{display:grid;gap:12px;padding:13px 0 14px;margin:0 0 12px;border-top:1px solid #edf0f7}
.directory-card .pm-card-learning-detail{min-width:0}
.directory-card .pm-card-learning-tags{display:flex;gap:6px;flex-wrap:wrap}
.directory-card .pm-card-learning-tags span{display:inline-flex;max-width:100%;padding:6px 9px;border-radius:8px;font-size:10px;font-weight:650;line-height:1.4;overflow-wrap:anywhere;background:#def7eb;color:#0b6b4a}
.directory-card .pm-card-learning-detail.is-help .pm-card-learning-tags span{background:#e7f1ff;color:#215fa6}
html[data-theme=dark] .directory-card .pm-card-learning-expanded{border-color:#3d4b65}
html[data-theme=dark] .directory-card .pm-card-learning-tags span{background:#17543d;color:#c6ffe3}
html[data-theme=dark] .directory-card .pm-card-learning-detail.is-help .pm-card-learning-tags span{background:#173d60;color:#d9eeff}
@media(max-width:720px){
  .directory-card.has-support-match > .pm-support-badge{grid-column:1/-1;grid-row:2;justify-self:start;align-self:start;margin:10px 0 0;max-width:100%}
  .directory-card.has-support-match .peer-card-actions{grid-row:3}
  .directory-card.has-support-match .directory-expandable{grid-row:4}
}
@media(max-width:720px){
  /* Preserve the name / match badge grid when names are long. */
  .directory-card .directory-main h3 .profile-name-link{display:block;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
}

/* Optional, self-reported module codes under each learning subject */
.pm-learning-row{flex-wrap:wrap}
.pm-module-code-field{display:flex;align-items:center;gap:10px;flex-basis:100%;font-size:11px;font-weight:650;color:#63718b;min-width:0}
.pm-module-code-input{width:min(220px,100%);min-width:0;border:1px solid #dce3ef;border-radius:9px;padding:9px 11px;background:#fff;color:#24344e;font:inherit;font-size:12px}
.pm-module-code-input:focus-visible{outline:2px solid #7162e3;outline-offset:2px}
html[data-theme=dark] .pm-module-code-field{color:#bbc8df}
html[data-theme=dark] .pm-module-code-input{background:#182337;border-color:#40516a;color:#f4f6ff}
@media(max-width:550px){.pm-module-code-field{align-items:stretch;flex-direction:column;gap:5px}.pm-module-code-input{width:100%}}
/* Allow subject rows and optional code inputs to shrink within narrow phones. */
.pm-learning-selector{width:100%;max-width:100%;box-sizing:border-box}
.pm-learning-choices{min-width:0;grid-template-columns:minmax(0,1fr)}
.pm-learning-row{min-width:0;max-width:100%;box-sizing:border-box}
.pm-learning-actions{min-width:0;max-width:100%}
.pm-module-code-field{min-width:0;max-width:100%;box-sizing:border-box}
.pm-module-code-input{box-sizing:border-box;max-width:100%}
@media(max-width:550px){.pm-module-code-field{flex-basis:auto;width:100%;align-self:stretch}.pm-module-code-field > span{width:100%}}
