/* Educator-specific details; shared student profile styling stays independent. */
.tw-profile-details { margin: 0; }
.tw-profile-details > div { display: flex; justify-content: space-between; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line-subtle); }
.tw-profile-details > div:last-child { border-bottom: 0; padding-bottom: 0; }
.tw-profile-details dt { color: var(--text-secondary); font-size: 13px; }
.tw-profile-details dd { margin: 0; font-size: 14px; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.tw-profile-details a { color: var(--accent-primary); text-decoration: none; }
.tw-profile-details svg { width: 14px; height: 14px; vertical-align: middle; }
.tw-profile-status { color: var(--accent-primary); font-weight: 600; }
.tw-profile-evidence { border-top: 1px solid var(--line-subtle); margin-top: 24px; padding-top: 18px; }
.tw-profile-evidence summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 10px 0; }
/* Phone layout for the educator profile and its editor. */
@media (max-width: 640px) {
  .tw-social-profile .social-header { padding: 20px 16px; border-radius: 14px; }
  .tw-social-profile .social-top-row { gap: 20px; }
  .tw-social-profile .social-identity-lead { flex-direction: column; gap: 14px; width: 100%; padding: 0; }
  .tw-social-profile .social-identity { width: 100%; }
  .tw-social-profile .social-name { font-size: 25px; line-height: 1.2; }
  .tw-social-profile .social-meta-inline { align-items: flex-start; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
  .tw-social-profile .social-meta-sep { display: none; }
  .tw-social-profile .social-bio { font-size: 14px; line-height: 1.65; margin-top: 14px; }
  .tw-social-profile .social-actions { display: flex; flex-wrap: nowrap; gap: 8px; }
  .tw-social-profile .social-actions .social-btn { min-height: 44px; }
  .tw-social-profile .social-stats-bar { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; margin-bottom: 20px; }
  .tw-social-profile .social-stat-item { padding: 16px; }
  .tw-social-profile .social-stat-value { font-size: 23px; }
  .tw-social-profile .social-stat-label { font-size: 12px; }
  .tw-social-profile .profile-sections { gap: 16px; }
  .tw-social-profile .social-section { padding: 18px 16px; border-radius: 14px; min-width: 0; }
  .tw-social-profile .social-section__title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 17px; }
  .tw-social-profile .social-section__link { font-size: 12px; min-height: 44px; }
  .tw-social-profile .social-spotlight-card { display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding: 18px; }
  .tw-social-profile .social-spotlight-badge { text-align: center; min-height: 44px; }
  .tw-social-profile .social-combo-grid,
  .tw-social-profile .social-badges-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .tw-social-profile .social-combo-pill { min-height: 0; padding: 16px; }
  .tw-social-profile .social-badge-card { min-width: 0; padding: 14px; }
  .tw-social-profile .social-badge-info { min-width: 0; overflow-wrap: anywhere; }
  .tw-social-profile .social-modal-overlay { padding: 0; z-index: 2000; align-items: stretch; }
  .tw-social-profile .social-modal { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .tw-social-profile .profile-editor-main { height: 100%; min-height: 0; }
  .tw-social-profile .profile-editor-main .social-modal__header { padding: max(18px, env(safe-area-inset-top)) 16px 16px; flex-shrink: 0; }
  .tw-social-profile .social-modal__title { font-size: 21px; }
  .tw-social-profile .social-modal__intro { max-width: 30ch; }
  .tw-social-profile .profile-editor-main .social-modal__close { width: 44px; height: 44px; }
  .tw-social-profile .profile-editor-nav { gap: 0; padding: 0 12px; }
  .tw-social-profile .profile-editor-nav button { flex: 1; min-height: 48px; font-size: 13px; }
  .tw-social-profile .profile-editor-main .social-modal__body { padding: 0 16px; overscroll-behavior: contain; scroll-padding-block: 20px; }
  .tw-social-profile .social-form-row,
  .tw-social-profile .tw-application-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
  .tw-social-profile .profile-editor-label-line { flex-wrap: wrap; gap: 4px; }
  .tw-social-profile .social-input,
  .tw-social-profile .social-textarea,
  .tw-social-profile .tw-input { width: 100%; min-width: 0; font-size: 16px; }
  .tw-social-profile .social-textarea { min-height: 150px; }
  .tw-social-profile .profile-editor-section .tw-checks { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .tw-social-profile .profile-editor-section .tw-check { min-height: 48px; padding: 12px; margin: 0; }
  .tw-social-profile .profile-editor-main .social-modal__footer { display: flex; gap: 10px; padding: 12px 16px max(16px, env(safe-area-inset-bottom)); }
  .tw-social-profile .profile-editor-main .social-modal__footer .social-btn { min-height: 48px; min-width: 0; }
}

@media (max-width: 640px) {
  .tw-social-profile .social-card { background: var(--surface-bg); border: 1px solid var(--line-subtle); border-radius: 20px; padding: 0 20px; overflow: hidden; box-shadow: none; }
  .tw-social-profile .social-header { padding: 28px 0 24px; margin: 0; border: 0; border-radius: 0; background: transparent; }
  .tw-social-profile .social-top-row { flex-direction: column; gap: 20px; }
  .tw-social-profile .social-identity-lead { gap: 20px; }
  .tw-social-profile .social-avatar { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-primary); color: white; border: 0; font-size: 27px; }
  .tw-social-profile .social-avatar__badge { display: none; }
  .tw-social-profile .social-name { font-size: 28px; letter-spacing: -.8px; line-height: 1.18; overflow-wrap: anywhere; }
  .tw-social-profile .social-meta-inline { flex-direction: row; gap: 8px 12px; font-size: 12px; margin-top: 10px; }
  .tw-social-profile .social-bio { margin-top: 18px; color: var(--text-secondary); line-height: 1.75; }
  .tw-social-profile .social-actions { width: 100%; }
  .tw-social-profile .social-btn--edit { flex: 1; justify-content: center; background: var(--text-primary); color: var(--surface-bg); border-color: var(--text-primary); }
  .tw-social-profile .social-stats-bar { margin: 0; border: 0; border-top: 1px solid var(--line-subtle); border-bottom: 1px solid var(--line-subtle); border-radius: 0; background: transparent; }
  .tw-social-profile .social-stat-item { padding: 20px 8px 20px 0; border-right: 0; gap: 7px; }
  .tw-social-profile .social-stat-item:nth-child(even) { padding-left: 16px; }
  .tw-social-profile .social-stat-value { font-size: 24px; letter-spacing: -.6px; font-weight: 600; }
  .tw-social-profile .social-stat-label { font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--text-secondary); }
  .tw-social-profile .profile-sections { gap: 0; }
  .tw-social-profile .social-section { padding: 24px 0; border: 0; border-bottom: 1px solid var(--line-subtle); border-radius: 0; background: transparent; }
  .tw-social-profile .social-section:last-child { border-bottom: 0; }
  .tw-social-profile .social-section__title { font-size: 16px; letter-spacing: -.2px; margin-bottom: 16px; }
  .tw-social-profile .social-section__link { min-height: 44px; font-size: 12px; }
  .tw-social-profile .social-combo-grid { gap: 0; }
  .tw-social-profile .social-combo-pill { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; border: 0; border-bottom: 1px solid var(--line-subtle); background: transparent; border-radius: 0; padding: 16px 0; }
  .tw-social-profile .social-combo-pill:last-child { border-bottom: 0; }
  .tw-social-profile .social-combo-pill__top { grid-column: 1; grid-row: 2; margin: 0; }
  .tw-social-profile .social-combo-pill__top > span:first-child { display: none; }
  .tw-social-profile .social-combo-pill__badge { padding: 0; background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 400; border: 0; }
  .tw-social-profile .social-combo-pill__name { grid-row: 1; margin: 0; font-size: 15px; }
  .tw-social-profile .social-combo-pill__name i { display: none; }
  .tw-social-profile .social-combo-pill__btn { grid-column: 2; grid-row: 1 / 3; margin: 0; min-height: 44px; background: transparent; border: 0; padding: 8px 0 8px 8px; font-size: 12px; }
  .tw-profile-details > div { flex-direction: column; gap: 7px; padding: 15px 0; }
  .tw-profile-details dd { text-align: left; }
  .tw-social-profile .profile-editor-main .social-modal__header { padding: max(24px, env(safe-area-inset-top)) 24px 20px; }
  .tw-social-profile .social-modal__title { font-size: 26px; letter-spacing: -.7px; }
  .tw-social-profile .social-modal__intro { font-size: 13px; line-height: 1.6; margin-top: 8px; }
  .tw-social-profile .profile-editor-nav { margin: 0 24px 8px; padding: 4px; gap: 4px; border: 1px solid var(--line-subtle); border-radius: 12px; background: var(--surface-subtle); }
  .tw-social-profile .profile-editor-nav button { min-height: 40px; border: 0; border-radius: 8px; font-size: 12px; padding: 8px 4px; }
  .tw-social-profile .profile-editor-nav button.is-active { background: var(--surface-bg); color: var(--text-primary); box-shadow: 0 1px 3px #00000012; }
  .tw-social-profile .profile-editor-main .social-modal__body { padding: 0 24px; }
  .tw-social-profile .social-form-label { font-size: 13px; }
  .tw-social-profile .social-form-label span { font-size: 11px; font-weight: 400; }
  .tw-social-profile .social-input, .tw-social-profile .social-textarea { border-radius: 10px; padding: 14px; background: var(--surface-bg); box-shadow: none; }
  .tw-social-profile .social-input:focus, .tw-social-profile .social-textarea:focus { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
  .tw-social-profile .profile-editor-main .social-modal__footer { padding-inline: 24px; }
  .tw-social-profile .profile-editor-section .tw-check:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-primary); }
}
