.assessment-section { margin-top: 84px; }
.team-section { margin-top: 42px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.team-section .result-section-heading { align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 16px; }
.team-section .result-section-heading h2 { margin: 0; }
.team-limit { color: var(--muted); }
.team-feedback { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--success-bg); color: var(--success); font-size: 13px; line-height: 1.5; }
.team-feedback.is-error { background: var(--danger-bg); color: var(--danger); }
.team-summary { padding: 15px 17px; border-radius: 12px; background: var(--subtle); }
.team-summary > strong { font-size: 13px; }
.team-summary ul { margin: 8px 0 0; padding: 0; list-style: none; }
.team-summary li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; }
.team-summary li span { color: var(--muted); font-size: 11px; }
.team-editor { display: grid; gap: 10px; }
.team-summary + .team-editor { margin-top: 16px; }
.team-editor > label { font-size: 12px; font-weight: 800; }
.team-picker-row { display: flex; align-items: stretch; gap: 8px; }
.team-picker-row select { min-width: 0; min-height: 44px; flex: 1; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font: 12px "Manrope", sans-serif; }
.team-picker-row button { flex: 0 0 auto; }
.team-picker-row .secondary-button { background: var(--subtle); color: var(--ink); }
.team-member-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.team-member-chips:empty { display: none; }
.team-chip { max-width: 100%; min-height: 34px; padding: 4px 6px 4px 10px; display: inline-flex; align-items: center; gap: 7px; border-radius: 20px; background: var(--selected); color: var(--link); font-size: 11px; font-weight: 700; }
.team-chip-name { min-width: 0; overflow-wrap: anywhere; }
.team-chip button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; min-height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgb(48 79 130 / 10%); color: inherit; font: 18px/1 "Manrope", sans-serif; cursor: pointer; }
.team-helper { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.team-editor > button[type="submit"] { justify-self: start; }
.team-editor button:disabled { opacity: .5; cursor: not-allowed; }
.result-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.result-section-heading h2 { margin: 3px 0 26px; }
.result-section-heading p:not(.section-kicker) { margin: -16px 0 28px; color: var(--muted); font-size: 13px; }
.section-kicker { margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: normal; text-transform: none; }
.grade-comment { color: var(--muted); font-size: 12px; line-height: 1.5; }

.checkpoint-cards,
.practical-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.final-work-cards { grid-template-columns: minmax(280px, 640px); }
.result-card { min-width: 0; }
.result-card h3 { min-height: 40px; overflow-wrap: anywhere; }
.result-card > strong { min-height: 42px; display: flex; align-items: baseline; }

.submission-area {
  margin: 20px -21px -21px;
  padding: 16px 21px 20px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 15px 15px;
  background: var(--subtle);
}

.submitted-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.submitted-links a { padding: 7px 9px; border-radius: 7px; background: var(--selected); font-size: 11px; font-weight: 800; text-decoration: none; }
.submitted-links small { flex-basis: 100%; font-size: 10px; }
.submission-success { margin: 0 0 10px; color: var(--success); font-size: 12px; font-weight: 800; }
.submission-state { min-height: 50px; display: flex; align-items: flex-start; }
.submission-missing { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.submission-form { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.submission-form > summary { min-height: 44px; align-content: center; cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 600; }
.submission-form > summary + form { margin-top: 8px; }
.submission-form form { display: grid; gap: 10px; }
.submission-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.submission-form input, .submission-form select, .submission-form textarea { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font: 12px "Manrope", sans-serif; }
.submission-form .errorlist { margin: 0; padding: 8px 10px; list-style: none; border-radius: 7px; background: var(--danger-bg); color: var(--danger); font-size: 10px; }
.submission-form button { justify-self: start; }
.submission-delete { margin-top: 16px; }
.submission-delete summary { width: fit-content; min-height: 44px; padding: 12px 0; cursor: pointer; color: var(--danger); font-size: 12px; font-weight: 800; }
.submission-delete summary:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.submission-delete p { font-size: 12px; line-height: 1.5; }
.submission-delete button { min-height: 44px; background: var(--danger); color:var(--on-primary); }

.attendance-section { margin-top: 92px; }
.student-table-hint { display: none; color: var(--muted); font-size: 12px; }
.student-attendance-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.student-attendance-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.student-attendance-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 12px; }
.student-attendance-table th,
.student-attendance-table td { min-width: 72px; padding: 12px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.student-attendance-table tr:last-child > * { border-bottom: 0; }
.student-attendance-table tr > *:last-child { border-right: 0; }
.student-attendance-table th:first-child { min-width: 220px; position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; }
.student-attendance-table thead th { background: var(--subtle); font-size: 11px; }
.student-attendance-table thead th:first-child { z-index: 3; background: var(--subtle); }
.student-attendance-table th small { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; }
.student-attendance-status { width: 42px; min-height: 42px; margin: 0 auto; display: grid; place-content: center; gap: 2px; border: 1px solid var(--line-strong); border-radius: 9px; }
.student-attendance-status b { font-size: 15px; line-height: 1; }
.student-attendance-status small { color: inherit; font-size: 8px; }
.student-attendance-status.attendance-present { border-color: var(--ink); background: var(--ink); color:var(--on-primary); }
.student-attendance-status.attendance-absent { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger); }
.student-attendance-status.attendance-late { border-color: var(--warning-border); background: var(--warning-bg); color: var(--warning); }
.student-attendance-status.attendance-excused { border-color: var(--selected-border); background: var(--selected); color: var(--link); }
.student-attendance-status.attendance-unmarked { color: var(--muted); }
.student-attendance-total { min-width: 86px; font: 500 18px "Manrope", sans-serif; }
.attendance-legend { margin: 12px 0 0; color: var(--muted); font-size: 11px; }

@media (max-width: 900px) {
  .checkpoint-cards,
  .practical-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .team-section { margin-inline: -4px; padding: 18px; }
  .team-summary li { align-items: flex-start; flex-direction: column; gap: 2px; }
  .team-picker-row { align-items: stretch; flex-direction: column; }
  .team-picker-row select { min-height: 46px; font-size: 14px; }
  .team-picker-row button { min-height: 42px; }
  .assessment-section { margin-top: 64px; }
  .checkpoint-cards,
  .practical-cards,
  .final-work-cards { grid-template-columns: 1fr; }
  .result-card h3 { min-height: 0; }
  .student-table-hint { display: block; }
  .student-attendance-wrap { width: calc(100% + 36px); max-width: none; margin-inline: -18px; border-right: 0; border-left: 0; border-radius: 0; }
  .student-attendance-table th:first-child { min-width: 180px; }
}

.result-card .completion-label { font-size: 24px; overflow-wrap: anywhere; }

.submission-form textarea { min-height: 84px; padding: 10px; resize: vertical; line-height: 1.5; }
.team-chip button:hover { background: rgb(48 79 130 / 20%); }
.team-chip button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
