/* ZemGuru modular styles 07/16. Original cascade order preserved. */
/* Step 53: calls filters arrows and calls stats spacing */
.filters .filter,
.tabs button,
.category-pills button,
.course-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.15;
  white-space: nowrap;
  vertical-align: middle;
}

.filters .filter {
  min-height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

.calls-sidebar .calls-stats-card {
  text-align: center;
}

.calls-sidebar .calls-stats-card .ring {
  margin-bottom: 18px;
}

.calls-stats-list {
  display: grid;
  gap: 10px;
  margin: 4px 0 16px;
  width: 100%;
}

.calls-stats-list span {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  min-height: 28px;
  padding: 0 2px;
  color: var(--muted);
  border: 0;
}

.calls-stats-list i {
  font-style: normal;
  line-height: 1;
  color: var(--muted);
}

.calls-stats-list em {
  font-style: normal;
  text-align: left;
  line-height: 1.25;
  min-width: 0;
}

.calls-stats-list b {
  color: var(--ink);
  font-weight: 800;
  line-height: 1;
  min-width: 24px;
  text-align: right;
}

.calls-sidebar .calls-stats-card .btn.full {
  margin-top: 8px;
}

/* Step 54: useful calls statistics card */
.calls-sidebar .calls-summary-card {
  display: grid;
  gap: 16px;
  text-align: left;
}

.calls-sidebar .calls-summary-card h2 {
  text-align: left;
  margin-bottom: 0;
}

.calls-summary-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.calls-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 34px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfb;
}

.calls-summary-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
}

.calls-summary-row b {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.calls-summary-list.compact .calls-summary-row {
  min-height: 28px;
  padding: 8px 10px;
}

.call-stats-modal {
  display: grid;
  gap: 18px;
}

.call-stats-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.call-stats-modal-grid span {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbf8;
}

.call-stats-modal-grid b {
  font-size: 26px;
  line-height: 1;
}

.call-stats-modal-grid small {
  color: var(--muted);
  line-height: 1.25;
}

.call-stats-detail-block {
  display: grid;
  gap: 10px;
}

.call-stats-detail-block h3 {
  margin: 0;
}

@media (max-width: 720px) {
  .call-stats-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .call-stats-modal-grid {
    grid-template-columns: 1fr;
  }
}

/* Step 55: linked calls statistics modal */
.call-stats-modal .section-title {
  align-items: flex-start;
}

.call-stats-modal-grid {
  align-items: stretch;
}

.call-stats-chip {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbf8;
  text-align: left;
  cursor: pointer;
}

.call-stats-chip:hover,
.call-stats-chip.active {
  border-color: rgba(31, 125, 61, .42);
  background: #eef8f0;
  box-shadow: 0 8px 18px rgba(14, 79, 45, .08);
}

.call-stats-chip b {
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
}

.call-stats-chip small {
  color: var(--muted);
  line-height: 1.25;
}

.call-stats-result-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.compact-title {
  margin-bottom: 0;
}

.call-stats-results {
  display: grid;
  gap: 10px;
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}

.call-stats-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.call-stats-result-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.call-stats-result-main > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.call-stats-result-main strong,
.call-stats-result-main span,
.call-stats-result-main small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.call-stats-result-main span,
.call-stats-result-main small {
  color: var(--muted);
  line-height: 1.28;
}

.call-stats-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.call-stats-result-actions .btn {
  min-height: 38px;
  white-space: nowrap;
}

.next-call-block .compact-row {
  align-items: center;
}

@media (max-width: 760px) {
  .call-stats-result-row,
  .call-stats-result-main {
    grid-template-columns: 1fr;
  }

  .call-stats-result-actions {
    justify-content: stretch;
  }

  .call-stats-result-actions .btn {
    flex: 1 1 150px;
  }
}

/* Step 56: linked call statistics modal and synchronized relation rows */
.call-stats-modal .call-stats-chip {
  appearance: none;
}
.call-stats-modal .call-stats-chip.active::after {
  content: "Показано ниже";
  font-size: 11px;
  font-weight: 800;
  color: var(--green);
}
.call-stats-result-row {
  grid-template-columns: 1fr;
  align-items: stretch;
}
.call-stats-result-main {
  grid-template-columns: minmax(112px, auto) minmax(0, 1fr);
  align-items: start;
}
.call-stats-result-main .badge {
  justify-self: start;
  white-space: normal;
  max-width: 132px;
  text-align: left;
}
.call-stats-result-actions {
  justify-content: flex-start;
  padding-top: 4px;
}
.call-stats-result-actions .btn {
  flex: 0 1 auto;
  min-width: 150px;
}
@media (max-width: 760px) {
  .call-stats-result-main {
    grid-template-columns: 1fr;
  }
  .call-stats-result-main .badge {
    max-width: none;
  }
}

/* Step 57: cleaner profile photo controls, centered security stats and dynamic teacher workload */
.profile-photo-actions.compact-photo-actions {
  min-width: 188px;
  gap: 10px;
  padding: 14px 16px;
}
.profile-photo-actions.compact-photo-actions > .profile-avatar-upload {
  min-height: 44px;
  border-color: #1f7a3d;
  background: linear-gradient(180deg, #2f914c, #1f7a3d);
  color: #fff;
}
.profile-photo-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.profile-photo-secondary-actions .btn {
  min-height: 40px;
  padding: 9px 10px;
  font-size: 13px;
  white-space: nowrap;
}
.profile-photo-secondary-actions .btn:disabled,
.profile-photo-actions .btn:disabled {
  opacity: .48;
  cursor: not-allowed;
}
.profile-security-panel .profile-security-stats span,
.teacher-load-card .stats-mini span {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 4px;
}
.profile-security-panel .profile-security-stats b,
.teacher-load-card .stats-mini b {
  line-height: 1.05;
  text-align: center;
}
.teacher-load-card {
  text-align: left;
}
.teacher-load-card h2 {
  text-align: left;
}
.teacher-load-card .teacher-load-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}
.teacher-load-card .teacher-load-stats span {
  min-width: 0;
  min-height: 74px;
  line-height: 1.25;
}
.teacher-load-card .teacher-load-stats b {
  font-size: 19px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.teacher-load-extra {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.teacher-load-extra span {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.teacher-load-extra b {
  color: var(--ink);
}
.small-note,
.mentor-response-note {
  font-size: 12px;
  line-height: 1.45;
}
.teacher-load-card .badge {
  margin-top: 10px;
}
.mentor-response-note {
  margin-top: -4px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .profile-photo-secondary-actions,
  .teacher-load-card .teacher-load-stats,
  .teacher-load-extra {
    grid-template-columns: 1fr;
  }
}

/* Step fix 2026-06-14: teacher student drawer close and progress spacing */
.student-drawer-overlay {
  cursor: pointer;
}
.student-drawer {
  cursor: default;
}
.student-drawer .drawer-close[data-close-student-drawer] {
  cursor: pointer;
  z-index: 4;
}
.student-drawer-body {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.student-drawer-progress-panel {
  display: grid;
  gap: 18px;
}
.student-drawer-stats {
  margin: 0;
}
.student-drawer-progress-block {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}
.student-drawer-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--green);
  font-weight: 800;
}
.student-drawer-progress-block .progress {
  width: 100%;
  margin: 0;
}
.student-drawer-actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  align-items: center;
  gap: 12px;
}
.student-drawer-actions .btn {
  flex: 0 1 150px;
  min-height: 44px;
}
@media (max-width: 760px) {
  .student-drawer-actions {
    grid-template-columns: 1fr;
    display: grid;
  }
  .student-drawer-actions .btn {
    width: 100%;
    flex-basis: auto;
  }
}

/* Step 121: student drawer info cards — long email/course text wrap */
.student-drawer .ticket-detail,
.student-drawer .student-drawer-body {
  min-width: 0;
  max-width: 100%;
}
.student-drawer .ticket-summary {
  width: 100%;
  max-width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.student-drawer .ticket-summary > span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
  height: auto;
  min-height: 78px;
}
.student-drawer .ticket-summary > span > b {
  overflow-wrap: normal;
  word-break: normal;
}
.student-drawer-progress-head strong {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 760px) {
  .student-drawer .ticket-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .student-drawer .ticket-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Step 59: admin teacher creation without group binding + teacher profile card editing */
.user-modal-note {
  border: 1px dashed #cfdad3;
  background: #f5fbf6;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  padding: 12px 14px;
}

.profile-photo-panel {
  align-items: center;
}

.profile-photo-actions.compact-photo-actions {
  min-width: 210px;
  max-width: 230px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.profile-photo-actions.compact-photo-actions > .profile-avatar-upload {
  width: 100%;
  min-height: 42px;
}

.profile-photo-secondary-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-photo-secondary-actions .btn {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}

.teacher-form .field.full-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.teacher-public-card-preview .preview-row {
  margin: 10px 0 12px;
}

.teacher-public-card-preview p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.mentor-card-description {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .profile-photo-actions.compact-photo-actions {
    max-width: none;
    width: 100%;
    justify-self: stretch;
  }
}

/* Step 60: admin users open card, archive and delete actions */
.user-archive-tabs {
  margin-top: -6px;
  margin-bottom: 0;
}
.user-modal-actions {
  align-items: center;
  gap: 10px;
}
.user-modal-actions .push-right {
  margin-left: auto;
}
.danger-note {
  border-color: #f1c5c0;
  background: #fff7f6;
  color: #8f1e18;
}
.admin-user-drawer {
  width: min(680px, 52vw);
}
.admin-user-drawer .ticket-detail {
  display: grid;
  gap: 16px;
}
.admin-user-drawer-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbf8;
}
.admin-user-drawer-top strong,
.admin-user-drawer-top span {
  display: block;
}
.admin-user-drawer-top span {
  margin-top: 4px;
  color: var(--muted);
}
.admin-user-drawer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-user-drawer-detail .user-detail-card {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.admin-user-drawer-detail .user-detail-card > .section-title {
  display: none;
}
.admin-user-drawer-detail .user-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 980px) {
  .admin-user-drawer { width: 100vw; }
  .admin-user-drawer-grid,
  .admin-user-drawer-detail .user-detail-grid {
    grid-template-columns: 1fr;
  }
  .user-modal-actions .push-right {
    margin-left: 0;
  }
}

/* Step 61: admin users roles, student level/access separation and recent changes cleanup */
body[data-role="admin"] .admin-user-row.all {
  grid-template-columns: minmax(140px, 1fr) minmax(155px, 1fr) 118px minmax(120px, .9fr) 140px 108px minmax(220px, 1fr);
}
body[data-role="admin"] .admin-user-row.teacher {
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(120px, .9fr) 64px 64px 70px 96px minmax(260px, 1.1fr);
}
body[data-role="admin"] .admin-user-row.admin {
  grid-template-columns: minmax(135px, 1fr) minmax(150px, 1fr) 118px minmax(130px, 1fr) 108px 96px minmax(220px, 1fr);
}
.role-badge,
.student-level-badge,
.access-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}
.role-badge {
  color: #17542b;
  background: #edf8ef;
  border: 1px solid #cbe8d2;
}
.role-badge.role-teacher {
  color: #174a73;
  background: #eef6ff;
  border-color: #cfe2f6;
}
.role-badge.role-admin {
  color: #6b4a12;
  background: #fff7df;
  border-color: #f1dfac;
}
.student-level-badge {
  color: #543f9b;
  background: #f1edff;
  border: 1px solid #ddd3ff;
}
.access-badge.active {
  color: #1f7a3a;
  background: #e8f7ec;
  border: 1px solid #c9e8d0;
}
.access-badge.blocked {
  color: #9a271f;
  background: #fff1ef;
  border: 1px solid #f0c3bd;
}
.user-status-stack {
  display: grid;
  gap: 6px;
  justify-items: start;
  align-content: center;
  min-width: 0;
}
.user-status-stack small {
  margin: 0;
  color: var(--muted);
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}
.admin-user-row .badge,
.admin-user-row .role-badge,
.admin-user-row .student-level-badge,
.admin-user-row .access-badge {
  overflow-wrap: normal;
  word-break: keep-all;
}
.admin-audit-card {
  max-height: 290px;
  overflow: hidden;
}
.admin-audit-list {
  display: grid;
  gap: 8px;
  max-height: 218px;
  overflow: auto;
  padding-right: 4px;
}
.admin-audit-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid #eef1ee;
}
.admin-audit-item:last-child {
  border-bottom: 0;
}
.admin-audit-item span {
  color: var(--green);
  font-weight: 900;
}
.admin-audit-item p {
  margin: 0;
  line-height: 1.28;
  color: #202820;
  font-size: 14px;
}
@media (max-width: 1500px) {
  body[data-role="admin"] .admin-user-row.all,
  body[data-role="admin"] .admin-user-row.teacher,
  body[data-role="admin"] .admin-user-row.admin {
    min-width: 0;
    grid-template-columns: 1fr;
  }
  body[data-role="admin"] .admin-user-row.student {
    min-width: 0;
    grid-template-columns: 1fr;
  }
  body[data-role="admin"] .admin-user-row .user-actions {
    justify-content: flex-start;
  }
  .user-status-stack {
    justify-items: start;
  }
}

/* Step 62: student progress is tied to course modules and lessons */
.next-status span.done {
  background: #e8f5ec;
  color: var(--green);
}
.achievement small {
  display: block;
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
.progress-module-row .module-title span {
  overflow-wrap: anywhere;
}

/* Step 63: student statuses modal tied to modules/lessons/progress */
/* Step 114: student statuses modal readability and course scope */
.student-statuses-backdrop {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.student-statuses-modal {
  width: min(960px, calc(100% - 40px));
  max-height: calc(100vh - 80px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  color: var(--ink);
}

.student-status-course-label {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--green);
}

.student-status-lead {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}

.student-statuses-modal .modal-x {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--green);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.student-statuses-modal .modal-x:hover {
  background: rgba(34, 122, 55, .08);
}

.modal-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-right: 42px;
  margin-bottom: 18px;
}

.modal-headline h2 {
  margin: 0 0 6px;
}

.modal-headline p {
  margin: 0;
  color: var(--muted);
}

.status-progress-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.status-progress-summary span {
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.status-progress-summary b {
  font-size: 24px;
  color: var(--green);
  line-height: 1;
}

.status-progress-summary small {
  color: var(--muted);
  line-height: 1.25;
}

.student-status-list {
  display: grid;
  gap: 12px;
}

.student-status-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.student-status-card.current {
  border-color: rgba(34, 122, 55, .45);
  background: #f3fbf5;
  box-shadow: 0 0 0 1px rgba(34, 122, 55, .08);
}

.student-status-card.passed {
  background: #f8fcf9;
}

.student-status-card.locked {
  background: #fafbfb;
  opacity: 1;
}

.student-status-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.student-status-card-head strong {
  display: block;
  font-size: 20px;
}

.student-status-card-head small,
.student-status-card .module-hint {
  color: var(--muted);
}

.student-status-card p {
  margin: 0;
  color: var(--ink);
}

.status-state {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef7ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.student-status-card.locked .status-state {
  background: #f3f4f4;
  color: var(--muted);
}

.student-status-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.status-check {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.status-check span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #f0f3f0;
  color: var(--muted);
  font-weight: 800;
}

.status-check.done span {
  background: #e8f6ea;
  color: var(--green);
}

.status-check strong {
  min-width: 0;
  font-size: 14px;
}

.status-check em {
  font-style: normal;
  color: var(--green);
  font-weight: 800;
  white-space: nowrap;
}

.status-modal-actions {
  margin-top: 16px;
  justify-content: flex-end;
}

body[data-theme="dark"] .student-statuses-backdrop {
  background: rgba(0, 0, 0, 0.65);
}

body[data-theme="dark"] .student-statuses-modal {
  background: #17221d;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

body[data-theme="dark"] .student-statuses-modal .status-progress-summary span,
body[data-theme="dark"] .student-statuses-modal .student-status-card,
body[data-theme="dark"] .student-statuses-modal .status-check {
  background: #1e2b24;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

body[data-theme="dark"] .student-statuses-modal .student-status-card.current {
  background: linear-gradient(135deg, rgba(79, 186, 105, 0.12), #1e2b24 58%);
  border-color: rgba(88, 185, 108, 0.34);
}

body[data-theme="dark"] .student-statuses-modal .student-status-card.passed {
  background: #1a2620;
}

body[data-theme="dark"] .student-status-course-label {
  color: #7fd792;
}

@media (max-width: 900px) {
  .status-progress-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .student-status-checks {
    grid-template-columns: 1fr;
  }
  .student-status-card-head,
  .modal-headline {
    align-items: stretch;
    flex-direction: column;
  }
  .status-check {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .status-check em {
    grid-column: 2;
  }
}

/* Step 64: student homework right rail fixes */
body[data-role="student"][data-active="homework"] .homework-module-progress {
  overflow: hidden;
}
body[data-role="student"][data-active="homework"] .homework-progress-legend {
  gap: 12px;
  margin: 12px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
body[data-role="student"][data-active="homework"] .homework-progress-legend span {
  min-height: 26px;
  align-items: center;
  padding: 2px 0;
}
body[data-role="student"][data-active="homework"] .homework-module-progress .btn.full {
  margin-top: 4px;
}
.homework-hints-card {
  display: grid;
  gap: 10px;
}
.homework-hints-card h2 {
  margin-bottom: 2px;
}
.hint-action {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  line-height: 1.35;
}
.hint-action:hover {
  border-color: rgba(39, 127, 62, .35);
  background: #f6fbf7;
}
.hint-action span {
  min-width: 0;
}
body[data-role="student"][data-active="homework"] .ask-card .ask-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}
body[data-role="student"][data-active="homework"] .ask-card .ask-card-actions .btn {
  width: 100%;
  min-width: 0;
  white-space: normal;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}
.homework-hint-backdrop {
  place-items: start center;
  padding: 72px 18px;
}
.homework-hint-modal {
  position: relative;
  width: min(680px, calc(100vw - 36px));
  max-width: 680px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(7, 20, 15, .28);
  overflow: hidden;
}
.homework-hint-modal .modal-x {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}
.homework-hint-modal .modal-x:hover {
  background: #f3f8f4;
  color: var(--green);
}
.homework-hint-modal .modal-headline {
  padding-right: 48px;
  margin-bottom: 16px;
}
.homework-hint-modal .modal-headline h2 {
  margin: 0 0 8px;
  line-height: 1.15;
}
.homework-hint-modal .modal-headline p {
  max-width: 560px;
  line-height: 1.45;
}
.hint-modal-text {
  margin: 14px 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(36, 115, 56, .12);
  border-radius: 14px;
  background: #f6fbf7;
  color: var(--ink);
  line-height: 1.55;
}
.hint-modal-steps {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.hint-modal-steps div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf8;
}
.hint-modal-steps span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}
.hint-modal-steps strong {
  min-width: 0;
  font-size: 14px;
}
@media (max-width: 900px) {
  .homework-hint-backdrop {
    padding: 48px 12px;
  }
  .homework-hint-modal {
    width: min(680px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    padding: 20px;
  }
}

