.teacher-filter-card .teacher-form { margin-top: 14px; }
.teacher-result-heading { align-items: end; }
.teacher-result-heading .export-panel { align-items: end; }
.teacher-result-heading .export-panel .button { min-height: 43px; }

.teacher-table { max-height: 59vh; max-height: 59svh; }
.teacher-table table { font-variant-numeric: tabular-nums; }
.teacher-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #eff3eb;
  color: var(--ink);
  font-size: .79rem;
}
.teacher-table tr:focus-within { background: #f1f6ed; }
.teacher-table td:first-child {
  max-width: 18rem;
  overflow-wrap: anywhere;
  white-space: normal;
}
.teacher-table td:first-child a {
  display: inline-block;
  min-height: 32px;
  padding-block: 4px;
  text-decoration: underline;
  text-underline-offset: .17em;
}
.teacher-table td:first-child a:focus-visible { outline-offset: 1px; }

.teacher-account-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}
.teacher-template {
  margin-block-start: 10px;
  max-width: 100%;
  white-space: normal;
}
.teacher-account-tools input[type="file"] {
  padding: 6px;
  background: #f8faf7;
}
.teacher-account-tools input[type="file"]::file-selector-button {
  margin-inline-end: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.teacher-detail .history-head {
  margin-block-end: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8faf7;
}
.teacher-targets .target-days { margin-top: 16px; }
.teacher-targets .target-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 42px;
}
.teacher-targets .target-days { grid-template-columns: repeat(auto-fill, minmax(134px, 1fr)); }
.teacher-season {
  padding-block: 12px;
  border-block-start: 1px solid var(--border);
}

@media (min-width: 935px) {
  .teacher-detail {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 34%);
    grid-template-areas: "entries dates" "entries week";
    align-items: start;
    align-content: start;
    grid-auto-rows: min-content;
  }
  .teacher-detail:has(> .phase-banner) {
    grid-template-areas: "phase phase" "entries dates" "entries week";
  }
  .teacher-detail > .phase-banner { grid-area: phase; }
  .teacher-day-entries { grid-area: entries; }
  .teacher-day-picker { grid-area: dates; }
  .teacher-week { grid-area: week; }
  .teacher-week .day-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .teacher-week .day-chip { min-height: 62px; }
}

@media (max-width: 760px) {
  .teacher-account-tools { grid-template-columns: minmax(0, 1fr); gap: inherit; }
  .teacher-table table { min-width: 37rem; }
  .teacher-accounts .teacher-table table { min-width: 31rem; }
}

@media (max-width: 460px) {
  .teacher-form label { flex: 1 1 calc(50% - 12px); }
  .teacher-form .search-label { flex-basis: 100%; }
  .teacher-roster .teacher-form button[type="submit"] { width: 100%; }
  .teacher-detail .entry-row { flex-wrap: wrap; }
}
