/* Weekly schedule grid (schedule.html) */
.schedule-week-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 0.75rem;
}

/* =========================================================================
   STUDENT TIMETABLE STRUCTURE (migrated 2026-07 from style.css, where it
   lived under body.clinician-page--timetable — a class the student page
   carried only to borrow these rules. Rescoped so schedule.html owns its
   own grid/detail/QR structure; the clinician timetable is standalone on
   clinician-app.css and never used the style.css copy.
   ========================================================================= */
body.student-schedule-page .timetable-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 1.5rem;
}

body.student-schedule-page .clinician-side {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

body.student-schedule-page .clinician-tabs {
  display: none;
}

body.student-schedule-page .clinician-header {
  margin-bottom: 1.4rem;
}

body.student-schedule-page .clinician-header h1 {
  font-size: 1.65rem;
}

body.student-schedule-page .timetable-panel {
  padding: 1.35rem 1.4rem 1.6rem;
}

body.student-schedule-page .timetable-detail-card {
  padding: 1.25rem 1.3rem 1.35rem;
}

body.student-schedule-page .timetable-detail-empty {
  color: #94a3b8;
  font-size: 0.9rem;
  background: #f8fafc;
  border-radius: 14px;
  padding: 1.1rem 1rem;
  text-align: center;
}

body.student-schedule-page .timetable-detail-body.is-hidden {
  display: none;
}

body.student-schedule-page .timetable-detail-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

body.student-schedule-page .timetable-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

body.student-schedule-page .timetable-detail-header h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

body.student-schedule-page .timetable-detail-meta {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

body.student-schedule-page .timetable-detail-actions {
  position: relative;
}

body.student-schedule-page .timetable-detail-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
  padding: 0.35rem;
  min-width: 140px;
  z-index: 20;
}

body.student-schedule-page .timetable-detail-menu.is-hidden {
  display: none;
}

body.student-schedule-page .timetable-detail-menu-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #1f2937;
  cursor: pointer;
}

body.student-schedule-page .timetable-detail-menu-item:hover {
  background: #f1f5f9;
}

body.student-schedule-page .timetable-detail-menu-item.is-danger {
  color: #b91c1c;
}

body.student-schedule-page .timetable-detail-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 0.8rem;
}

body.student-schedule-page .timetable-detail-mandatory {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #f6e7d7;
  color: #b45309;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.student-schedule-page .timetable-detail-status-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
}

body.student-schedule-page .timetable-detail-description {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

body.student-schedule-page .timetable-detail-counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
}

body.student-schedule-page .timetable-detail-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

body.student-schedule-page .timetable-detail-counter-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.student-schedule-page .timetable-qr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

body.student-schedule-page .timetable-qr-overlay.is-hidden {
  display: none;
}

body.student-schedule-page .timetable-qr-modal {
  width: min(520px, 92vw);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  padding: 1.5rem;
}

body.student-schedule-page .timetable-qr-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

body.student-schedule-page .timetable-qr-meta {
  color: #6b7280;
  margin-top: 0.15rem;
  font-size: 0.9rem;
}

body.student-schedule-page .timetable-qr-body {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

body.student-schedule-page .timetable-qr-code {
  width: 240px;
  height: 240px;
  border-radius: 16px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.student-schedule-page .timetable-qr-code img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.student-schedule-page .timetable-qr-status {
  font-size: 0.9rem;
  color: #6b7280;
}

body.student-schedule-page .timetable-qr-status.is-error {
  color: #b91c1c;
}

body.student-schedule-page .timetable-qr-status.is-success {
  color: #15803d;
}

body.student-schedule-page .timetable-qr-count {
  font-size: 0.85rem;
  color: #475569;
}

body.student-schedule-page .timetable-qr-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

body.student-schedule-page .timetable-attendance h4 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  color: #1f2937;
}

body.student-schedule-page .timetable-attendance-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 360px;
  overflow-y: auto;
}

body.student-schedule-page .timetable-attendance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

body.student-schedule-page .timetable-attendance-student {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

body.student-schedule-page .timetable-attendance-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  overflow: hidden;
}

body.student-schedule-page .timetable-attendance-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.student-schedule-page .timetable-attendance-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.student-schedule-page .timetable-attendance-select {
  border: none;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
  appearance: none;
  cursor: pointer;
}

body.student-schedule-page .timetable-attendance-select--checked_in {
  background: #dcfce7;
  color: #15803d;
}

body.student-schedule-page .timetable-attendance-select--excused {
  background: #ffedd5;
  color: #c2410c;
}

body.student-schedule-page .timetable-attendance-select--absent {
  background: #fee2e2;
  color: #b91c1c;
}

body.student-schedule-page .timetable-attendance-select--not_yet {
  background: #e2e8f0;
  color: #475569;
}

body.student-schedule-page .timetable-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.student-schedule-page .timetable-header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

body.student-schedule-page .timetable-context {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
  display: none;
}

body.student-schedule-page .timetable-header h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1f2937;
}

body.student-schedule-page .timetable-week-row {
  display: none;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  color: #64748b;
  font-size: 0.85rem;
}

body.student-schedule-page .timetable-week-label {
  font-weight: 500;
  color: #1f2937;
}

body.student-schedule-page .timetable-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

body.student-schedule-page .timetable-week-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body.student-schedule-page .timetable-filter-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid #edf1ff;
  padding-top: 0.85rem;
}

body.student-schedule-page .timetable-view-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

body.student-schedule-page .timetable-view-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
}

body.student-schedule-page .timetable-student-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.student-schedule-page .timetable-student-filter label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
}

body.student-schedule-page .timetable-student-filter select {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  min-width: 210px;
  background: #ffffff;
}

body.student-schedule-page .timetable-student-filter.is-hidden {
  display: none;
}

body.student-schedule-page .timetable-export {
  margin-left: auto;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #1d4ed8;
}

body.student-schedule-page .timetable-list-view {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

body.student-schedule-page .timetable-day-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

body.student-schedule-page .timetable-day-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

body.student-schedule-page .timetable-day-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

body.student-schedule-page .timetable-day-tab {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 12px;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  align-items: center;
  min-width: 64px;
  cursor: pointer;
}

body.student-schedule-page .timetable-day-tab.is-active {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #1d4ed8;
  font-weight: 500;
}

body.student-schedule-page .timetable-day-tab-label {
  font-weight: 500;
}

body.student-schedule-page .timetable-day-tab-date {
  font-size: 0.7rem;
}

body.student-schedule-page .timetable-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

body.student-schedule-page .timetable-event-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

body.student-schedule-page .timetable-event-card.is-selected {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

body.student-schedule-page .timetable-event-time {
  font-weight: 500;
  font-size: 0.9rem;
  color: #1f2937;
  min-width: 90px;
}

body.student-schedule-page .timetable-event-body {
  flex: 1;
}

body.student-schedule-page .timetable-event-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body.student-schedule-page .timetable-event-title {
  font-weight: 600;
  color: #1f2937;
}

body.student-schedule-page .timetable-event-meta {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.82rem;
}

body.student-schedule-page .timetable-event-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

body.student-schedule-page .timetable-event-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.student-schedule-page .timetable-empty {
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 0.6rem 0.2rem;
}

body.student-schedule-page .timetable-viewing {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 600;
}

body.student-schedule-page .timetable-viewing.is-hidden {
  display: none;
}

/* Week grid + time axis layout */
body.student-schedule-page .timetable-week-grid {
  margin-top: 1rem;
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid #e7ebff;
  background: linear-gradient(180deg, #f6f8ff 0%, #ffffff 100%);
  overflow-x: auto;
  position: relative;
}

body.student-schedule-page .timetable-week-header {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
  min-width: 900px;
}

body.student-schedule-page .timetable-week-header-spacer {
  width: 76px;
}

body.student-schedule-page .timetable-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 0.6rem;
}

body.student-schedule-page .timetable-weekday {
  padding: 0.4rem 0.5rem;
  text-align: center;
  border-radius: 12px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid transparent;
}

body.student-schedule-page .timetable-weekday.is-today {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1d4ed8;
}

body.student-schedule-page .timetable-weekday-name {
  display: block;
  font-size: 0.85rem;
}

body.student-schedule-page .timetable-weekday-date {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
}

body.student-schedule-page .timetable-week-body {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0.75rem;
  min-width: 900px;
}

body.student-schedule-page .timetable-time-axis {
  display: grid;
  grid-template-rows: repeat(var(--timetable-hour-count, 12), var(--timetable-hour-height, 64px));
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: right;
  padding-right: 0.45rem;
}

body.student-schedule-page .timetable-time-label {
  align-self: start;
  transform: translateY(-0.35rem);
}

body.student-schedule-page .timetable-week-columns {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 0.6rem;
}

body.student-schedule-page .timetable-day-column {
  position: relative;
  height: calc(var(--timetable-hour-count, 12) * var(--timetable-hour-height, 64px));
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #edf1ff;
  overflow: hidden;
}

body.student-schedule-page .timetable-day-column::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(148, 163, 184, 0.2) 0,
    rgba(148, 163, 184, 0.2) 1px,
    transparent 1px,
    transparent var(--timetable-hour-height, 64px)
  );
  pointer-events: none;
}

/* Event blocks inside timetable grid */
body.student-schedule-page .timetable-event-block {
  position: absolute;
  left: 8px;
  right: 8px;
  background: #dbe7ff;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 0.45rem 0.55rem;
  box-shadow: 0 8px 18px rgba(59, 96, 246, 0.2);
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: #1f2937;
  cursor: pointer;
  overflow: hidden;
}

body.student-schedule-page .timetable-event-block--mandatory {
  background: #f7e8d9;
  border-color: #f1d3b3;
  box-shadow: 0 8px 18px rgba(180, 83, 9, 0.2);
}

body.student-schedule-page .timetable-event-block.is-selected {
  outline: 2px solid #2563eb;
}

body.student-schedule-page .timetable-event-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

body.student-schedule-page .timetable-event-block-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

body.student-schedule-page .timetable-event-block-title {
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.student-schedule-page .timetable-event-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #f6e7d7;
  color: #b45309;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.student-schedule-page .timetable-event-block-time {
  font-size: 0.72rem;
  font-weight: 500;
  color: #1d4ed8;
}

body.student-schedule-page .timetable-event-block-meta {
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.student-schedule-page .timetable-event-delete {
  border: none;
  background: rgba(255, 255, 255, 0.75);
  color: #475569;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

body.student-schedule-page .timetable-event-block:hover .timetable-event-delete {
  opacity: 1;
}

body.student-schedule-page .timetable-event-delete:hover {
  background: #fee2e2;
  color: #b91c1c;
}

body.student-schedule-page .timetable-week-empty {
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px dashed #c7d2fe;
  color: #94a3b8;
  background: #f5f7ff;
  font-size: 0.85rem;
}

body.student-schedule-page .timetable-week-empty.is-hidden {
  display: none;
}

body.student-schedule-page .timetable-status {
  margin-top: 0.75rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

body.student-schedule-page .schedule-form-modal {
  background: #fbfcff;
  border: 1px solid #e2e8f0;
}

body.student-schedule-page #schedule-form-overlay {
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(6px);
  padding: 1.5rem;
}

body.student-schedule-page .timetable-event-modal {
  width: min(700px, 92vw);
  background: linear-gradient(135deg, #f6f8ff 0%, #ffffff 100%);
  border: 1px solid #dfe7ff;
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
  padding: 1.4rem 1.6rem 1.2rem;
}

body.student-schedule-page .timetable-event-modal-header {
  margin-bottom: 0.8rem;
}

body.student-schedule-page .timetable-event-modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1f2937;
}

body.student-schedule-page .timetable-event-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

body.student-schedule-page .timetable-event-section {
  border-top: 1px solid #edf1ff;
  padding-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

body.student-schedule-page .timetable-event-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

body.student-schedule-page .timetable-event-row--attendance {
  align-items: center;
}

body.student-schedule-page .timetable-event-control--toggle {
  display: flex;
  align-items: center;
}

body.student-schedule-page .timetable-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
}

body.student-schedule-page .timetable-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

body.student-schedule-page .timetable-switch-slider {
  position: absolute;
  inset: 0;
  background: #e2e8f0;
  border-radius: 999px;
  transition: background 0.2s ease;
  cursor: pointer;
}

body.student-schedule-page .timetable-switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease;
}

body.student-schedule-page .timetable-switch input:checked + .timetable-switch-slider {
  background: #2563eb;
}

body.student-schedule-page .timetable-switch input:checked + .timetable-switch-slider::before {
  transform: translateX(20px);
}

body.student-schedule-page .timetable-event-window {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

body.student-schedule-page .timetable-event-window input {
  max-width: 90px;
}

body.student-schedule-page .timetable-event-window-sep {
  font-size: 0.85rem;
  color: #94a3b8;
}

body.student-schedule-page .timetable-event-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.85rem;
  align-items: center;
}

body.student-schedule-page .timetable-event-row--student {
  align-items: flex-start;
}

body.student-schedule-page .timetable-event-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
}

body.student-schedule-page .timetable-event-control > input,
body.student-schedule-page .timetable-event-control > select,
body.student-schedule-page .timetable-event-control > textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #d6e0f5;
  background: #f9fbff;
  font-size: 0.95rem;
  color: #1f2937;
}

body.student-schedule-page .timetable-event-control > textarea {
  resize: vertical;
  min-height: 92px;
}

body.student-schedule-page .timetable-event-time-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 0.6rem;
}

body.student-schedule-page .timetable-event-segmented {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #eff4ff;
}

body.student-schedule-page .timetable-event-segmented-btn {
  border: 1px solid #c7d2fe;
  background: #ffffff;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

body.student-schedule-page .timetable-event-segmented-btn.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
}

body.student-schedule-page .student-single-select {
  background: #f9fbff;
  border-color: #d6e0f5;
}

body.student-schedule-page .student-single-select .student-chip {
  background: #e0ebff;
  color: #1d4ed8;
}

body.student-schedule-page .student-single-select .student-chip-placeholder {
  color: #94a3b8;
}

body.student-schedule-page .student-single-select .student-multi-control input {
  background: transparent;
}

body.student-schedule-page .timetable-event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.2rem;
}

body.student-schedule-page .timetable-event-footer .schedule-status-text {
  margin-left: 0;
}

body.student-schedule-page .timetable-event-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

@media (max-width: 1100px) {
  body.student-schedule-page .timetable-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  body.student-schedule-page .timetable-header-main {
    flex-direction: column;
    align-items: flex-start;
  }

  body.student-schedule-page .timetable-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body.student-schedule-page .timetable-export {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  body.student-schedule-page .timetable-event-modal {
    padding: 1.2rem 1.1rem 1rem;
  }

  body.student-schedule-page .timetable-event-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body.student-schedule-page .timetable-event-time-row {
    grid-template-columns: 1fr;
  }

  body.student-schedule-page .timetable-event-footer {
    flex-direction: column;
    align-items: stretch;
  }

  body.student-schedule-page .timetable-event-actions {
    justify-content: flex-end;
  }
  body.student-schedule-page .timetable-panel {
    padding: 1.1rem;
  }

  body.student-schedule-page .timetable-week-grid {
    padding: 0.75rem;
  }

  body.student-schedule-page .timetable-export {
    display: none;
  }
}

body.student-schedule-page {
  --schedule-border: #dbe3ef;
  --schedule-border-strong: #c8d4e5;
  --schedule-surface: #ffffff;
  --schedule-surface-muted: #f6f8fc;
  --schedule-text-primary: #10213f;
  --schedule-text-secondary: #41546f;
  --schedule-text-muted: #667992;
  --schedule-accent: #2f62d9;
  --schedule-radius-panel: 14px;
}

body.student-schedule-page #schedule-page-title {
  margin-bottom: 0.25rem;
  font-size: clamp(2rem, 3.6vw, 2.65rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--schedule-text-primary);
}

body.student-schedule-page #schedule-placement-label {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  color: var(--schedule-text-secondary);
}

body.student-schedule-page #schedule-card {
  border-radius: var(--schedule-radius-panel);
  border: 1px solid var(--schedule-border);
  background: var(--schedule-surface);
  box-shadow: 0 1px 2px rgba(16, 33, 63, 0.06);
}

body.student-schedule-page #schedule-card h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--schedule-text-primary);
}

body.student-schedule-page #schedule-card .card-subtitle {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--schedule-text-muted);
}

.schedule-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e6ebf3;
}

.schedule-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.schedule-week-nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.schedule-view-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.schedule-view-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #6b7d95;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.student-schedule-page .roster-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.14rem;
  border-radius: 999px;
  border: 1px solid var(--schedule-border);
  background: #f4f7fc;
}

body.student-schedule-page .roster-toggle-btn {
  border: none;
  background: transparent;
  min-height: 32px;
  padding: 0.32rem 0.86rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4f6280;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body.student-schedule-page .roster-toggle-btn.is-active {
  background: #ffffff;
  color: #16335e;
  box-shadow: 0 1px 3px rgba(16, 33, 63, 0.18);
}

body.student-schedule-page .schedule-week-nav .btn {
  min-height: 34px;
  padding: 0.36rem 0.78rem;
  border-radius: 9px;
  border-color: var(--schedule-border-strong);
  font-size: 0.82rem;
  font-weight: 600;
  color: #36506f;
  background: #fbfcff;
}

body.student-schedule-page .schedule-week-nav .btn:hover,
body.student-schedule-page .schedule-week-nav .btn:focus-visible {
  border-color: #abc0df;
  background: #f5f8fd;
}

.schedule-day-card {
  border-radius: 12px;
  border: 1px solid var(--schedule-border);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 33, 63, 0.06);
}

.schedule-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e7edf6;
}

.schedule-day-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.schedule-day-label {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--schedule-text-primary);
}

.schedule-day-count {
  font-size: 0.8rem;
  color: #7589a2;
}

.schedule-day-events {
  display: flex;
  flex-direction: column;
}

.schedule-day-empty {
  color: #6f8199;
  padding: 0.8rem 1rem;
  font-size: 0.86rem;
}

.schedule-event + .schedule-event {
  border-top: 1px solid #e7edf6;
}

.schedule-event {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 28px;
  gap: 1rem;
  padding: 0.72rem 1rem;
  align-items: start;
}

.schedule-event-left {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.schedule-event-start {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--schedule-text-primary);
}

.schedule-event-end {
  font-size: 0.78rem;
  color: #70839d;
}

.schedule-event-checkin {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
}

.schedule-event-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.schedule-event-title {
  display: block;
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.28;
  color: var(--schedule-text-primary);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.schedule-event-meta {
  font-size: 0.78rem;
  color: #5f738e;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.32;
}

.schedule-event-title-row {
  min-width: 0;
}

.schedule-event-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.28rem;
  margin-top: 0.18rem;
}

.schedule-event-chips:empty {
  display: none;
}

.schedule-chip {
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  background: #edf2fb;
  color: #33527f;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.schedule-chip--mandatory {
  background: #f7ecdd;
  color: #8f5f1f;
}

.schedule-chip--type {
  background: #eef2f7;
  color: #556a86;
}

.schedule-event-actions {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.schedule-event-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #90a1b7;
  font-size: 1.05rem;
}

.schedule-event-chevron {
  line-height: 1;
}

.schedule-event-actions .btn {
  padding: 0.25rem 0.6rem;
}

.schedule-loading-stack {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.schedule-loading-card {
  padding: 1rem 1rem 1.05rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(221, 228, 246, 0.95);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(104, 118, 167, 0.08);
}

.schedule-loading-line,
.schedule-loading-chip {
  position: relative;
  overflow: hidden;
  background: rgba(226, 232, 247, 0.9);
}

.schedule-loading-line::after,
.schedule-loading-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.72) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: scheduleLoadingShimmer 1.4s ease-in-out infinite;
}

.schedule-loading-line {
  height: 14px;
  border-radius: 999px;
}

.schedule-loading-line--time {
  width: 42%;
  height: 18px;
  margin-bottom: 0.55rem;
}

.schedule-loading-line--status {
  width: 34%;
  height: 14px;
  margin-left: auto;
  margin-top: -1.55rem;
  margin-bottom: 0.85rem;
}

.schedule-loading-line--title {
  width: 58%;
  height: 20px;
  margin-bottom: 0.55rem;
}

.schedule-loading-line--meta {
  width: 48%;
  margin-bottom: 0.8rem;
}

.schedule-loading-line--button {
  width: 100%;
  height: 44px;
  margin-top: 0.7rem;
  border-radius: 0.95rem;
}

.schedule-loading-chips {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.schedule-loading-chip {
  width: 94px;
  height: 30px;
  border-radius: 999px;
}

.schedule-loading-chip--short {
  width: 72px;
}

body.student-schedule-page .schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

body.student-schedule-page .schedule-layout.has-detail {
  grid-template-columns: minmax(0, 1fr) 380px;
}

body.student-schedule-page .schedule-detail-panel {
  position: sticky;
  top: 1rem;
  align-self: start;
  border-radius: var(--schedule-radius-panel);
  border: 1px solid var(--schedule-border);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 33, 63, 0.06);
  overflow: hidden;
}

body.student-schedule-page .schedule-detail-panel.is-hidden {
  display: none;
}

body.student-schedule-page .schedule-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid #e7edf6;
}

body.student-schedule-page .schedule-detail-label {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7387a1;
}

body.student-schedule-page .schedule-detail-header h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.32;
  color: var(--schedule-text-primary);
}

body.student-schedule-page .schedule-detail-body {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding: 0.9rem 1rem 1rem;
}

body.student-schedule-page .schedule-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

body.student-schedule-page .schedule-detail-section {
  margin-bottom: 0.9rem;
}

body.student-schedule-page .schedule-detail-section-title {
  margin: 0 0 0.45rem;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #607690;
}

body.student-schedule-page .schedule-detail-meta {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

body.student-schedule-page .schedule-detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #e9eef6;
}

body.student-schedule-page .schedule-detail-row:last-child {
  border-bottom: none;
}

body.student-schedule-page .schedule-detail-key {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #70849e;
}

body.student-schedule-page .schedule-detail-value {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: #1a2f4f;
  text-align: right;
}

body.student-schedule-page .schedule-detail-signals {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.student-schedule-page .schedule-detail-signals li {
  position: relative;
  padding-left: 0.9rem;
  font-size: 0.82rem;
  color: #506680;
  line-height: 1.35;
}

body.student-schedule-page .schedule-detail-signals li::before {
  content: "";
  position: absolute;
  top: 0.48em;
  left: 0;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #8ca4c3;
}

body.student-schedule-page .schedule-detail-notes {
  margin-top: 0.15rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid #e5ebf4;
  background: #f8fafd;
}

body.student-schedule-page .schedule-detail-notes h3 {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5e728c;
}

body.student-schedule-page .schedule-detail-notes p {
  margin: 0;
  color: #445b75;
  font-size: 0.84rem;
  line-height: 1.45;
}

body.student-schedule-page .schedule-detail-empty {
  margin: 0.3rem 0 0;
  color: #6e839f;
  font-size: 0.84rem;
  line-height: 1.45;
}

body.student-schedule-page .schedule-detail-actions {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.8rem;
  border-top: 1px solid #e7edf6;
}

body.student-schedule-page .schedule-detail-actions .btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  font-size: 0.84rem;
  border-radius: 8px;
}

body.student-schedule-page .schedule-agenda {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.student-schedule-page .schedule-agenda-day {
  padding: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

body.student-schedule-page .schedule-agenda-date {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 0.6rem;
}

body.student-schedule-page .schedule-agenda-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

body.student-schedule-page .schedule-agenda-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  line-height: inherit;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.student-schedule-page .schedule-agenda-item:hover,
body.student-schedule-page .schedule-agenda-item:focus {
  border-color: #c7d2fe;
  box-shadow: 0 6px 14px rgba(59, 96, 246, 0.15);
}

body.student-schedule-page .schedule-agenda-time {
  min-width: 72px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1d4ed8;
}

body.student-schedule-page .schedule-agenda-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

body.student-schedule-page .schedule-agenda-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
}

body.student-schedule-page .schedule-agenda-meta {
  font-size: 0.75rem;
  color: #64748b;
}

body.student-schedule-page .schedule-agenda-empty {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

body.student-schedule-page .timetable-weekday {
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

body.student-schedule-page .timetable-week-grid {
  margin-top: 0;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--schedule-border);
  background: #f8fafd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.student-schedule-page .timetable-week-header {
  margin-bottom: 0.55rem;
}

body.student-schedule-page .timetable-weekday {
  padding: 0.34rem 0.42rem;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
  color: #475f7f;
  background: #ffffff;
  border: 1px solid #dde5f2;
  box-shadow: none;
}

body.student-schedule-page .timetable-weekday.is-today {
  background: #eef4ff;
  border-color: #b8caea;
  color: #234880;
}

body.student-schedule-page .timetable-weekday.is-weekend {
  background: #f2f5fa;
  color: #5b6f88;
  border-color: #d7e0ee;
}

body.student-schedule-page .timetable-weekday.is-selected {
  background: #e9f1ff;
  border-color: #9db7df;
  color: #16335e;
  box-shadow: inset 0 0 0 1px rgba(47, 98, 217, 0.28);
}

body.student-schedule-page .timetable-weekday.is-selected .timetable-weekday-date {
  color: #3f628f;
}

body.student-schedule-page .timetable-time-axis {
  color: #8092ab;
  padding-right: 0.45rem;
  font-size: 0.72rem;
  font-weight: 500;
}

body.student-schedule-page .timetable-time-label {
  transform: translateY(-0.36rem);
}

body.student-schedule-page .timetable-week-columns {
  gap: 0.42rem;
}

body.student-schedule-page .timetable-day-column {
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid #dde5f2;
  box-shadow: none;
}

body.student-schedule-page .timetable-day-column.is-weekend {
  background: #f6f8fc;
}

body.student-schedule-page .timetable-day-column::before {
  background: repeating-linear-gradient(
    to bottom,
    rgba(151, 167, 191, 0.26) 0,
    rgba(151, 167, 191, 0.26) 1px,
    transparent 1px,
    transparent var(--timetable-hour-height, 64px)
  );
}

body.student-schedule-page .timetable-day-column.is-selected {
  border-color: #a3b9d7;
  box-shadow:
    0 0 0 1px rgba(47, 98, 217, 0.28),
    0 4px 12px rgba(58, 84, 124, 0.1);
}

body.student-schedule-page .schedule-event {
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

body.student-schedule-page .schedule-event:hover {
  background: #f5f8fd;
}

body.student-schedule-page .schedule-event.is-selected {
  background: #edf4ff;
  box-shadow: inset 3px 0 0 var(--schedule-accent);
}

@media (max-width: 1024px) {
  .schedule-event {
    grid-template-columns: 80px minmax(0, 1fr) 24px;
  }
}

body.student-schedule-page .timetable-event-block {
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid #c6d5ea;
  background: #eef4ff;
  color: #1b2f4d;
  box-shadow: 0 1px 2px rgba(24, 45, 75, 0.08);
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

body.student-schedule-page .timetable-event-block--mandatory {
  background: #f7f0e7;
  border-color: #e8d8c4;
  color: #523f27;
}

body.student-schedule-page .timetable-event-block:hover {
  border-color: #9fb6d6;
  box-shadow: 0 2px 7px rgba(31, 58, 92, 0.14);
}

body.student-schedule-page .timetable-event-block.is-selected {
  border-color: #4f80d4;
  box-shadow:
    inset 4px 0 0 #2f62d9,
    0 0 0 1px rgba(47, 98, 217, 0.22),
    0 8px 18px rgba(44, 82, 136, 0.16);
}

body.student-schedule-page .timetable-event-badge {
  background: #f6ebdd;
  color: #8b5e24;
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.08rem 0.34rem;
  border-radius: 999px;
}

body.student-schedule-page .timetable-event-block-time {
  color: #31557f;
  font-size: 0.72rem;
  font-weight: 500;
}

body.student-schedule-page .timetable-event-block-title-row {
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.28rem;
  justify-content: space-between;
}

body.student-schedule-page .timetable-event-block-title {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.86rem;
  line-height: 1.24;
  font-weight: 600;
  color: var(--schedule-text-primary);
}

body.student-schedule-page .timetable-event-block-meta {
  color: #5f748f;
  font-size: 0.7rem;
  line-height: 1.32;
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.student-schedule-page .timetable-week-empty {
  margin-top: 0.75rem;
  padding: 0.8rem 0.95rem;
  border-radius: 9px;
  border: 1px dashed #c3d1e4;
  background: #f3f7fc;
  color: #698097;
  font-size: 0.84rem;
}

@media (max-width: 900px) {
  body.student-schedule-page .schedule-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  body.student-schedule-page .schedule-controls {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  body.student-schedule-page .timetable-week-grid {
    -webkit-overflow-scrolling: touch;
    padding: 0.85rem;
  }

  body.student-schedule-page .timetable-week-header,
  body.student-schedule-page .timetable-week-body {
    grid-template-columns: 56px 1fr;
    min-width: 720px;
  }

  body.student-schedule-page .timetable-week-header-spacer {
    width: 56px;
  }

  body.student-schedule-page .timetable-week-days,
  body.student-schedule-page .timetable-week-columns {
    grid-template-columns: repeat(7, minmax(90px, 1fr));
    gap: 0.45rem;
  }

  body.student-schedule-page .timetable-weekday {
    padding: 0.34rem 0.42rem;
  }

  body.student-schedule-page .timetable-weekday-name {
    font-size: 0.75rem;
  }

  body.student-schedule-page .timetable-weekday-date {
    font-size: 0.65rem;
  }

  body.student-schedule-page .timetable-time-axis {
    font-size: 0.7rem;
    padding-right: 0.3rem;
  }

  body.student-schedule-page .timetable-day-column {
    border-radius: 0.9rem;
  }

  body.student-schedule-page .timetable-event-block {
    left: 6px;
    right: 6px;
    padding: 0.35rem 0.45rem;
    font-size: 0.72rem;
  }

  body.student-schedule-page .timetable-event-block-title {
    font-size: 0.76rem;
  }

  body.student-schedule-page .timetable-event-block-meta {
    font-size: 0.65rem;
  }
}

@media (max-width: 1100px) {
  body.student-schedule-page .schedule-layout.has-detail {
    grid-template-columns: 1fr;
  }

  body.student-schedule-page .schedule-detail-panel {
    position: static;
  }

  body.student-schedule-page .schedule-detail-body {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 820px) {
  body.student-schedule-page.schedule-detail-open {
    overflow: hidden;
  }

  body.student-schedule-page .schedule-detail-panel {
    position: fixed;
    inset: 0;
    top: 0;
    z-index: 2100;
    width: 100%;
    max-width: none;
    height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    padding:
      calc(env(safe-area-inset-top, 0px) + 1rem)
      1rem
      calc(env(safe-area-inset-bottom, 0px) + 1rem);
    border-radius: 0;
    border: none;
    background:
      linear-gradient(180deg, rgba(243, 245, 255, 0.98) 0%, rgba(255, 255, 255, 0.985) 28%, rgba(247, 250, 255, 0.985) 100%);
    box-shadow: none;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
      opacity 0.24s ease,
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear;
    will-change: opacity, transform;
  }

  body.student-schedule-page .schedule-detail-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(241, 244, 255, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
    pointer-events: none;
  }

  body.student-schedule-page .schedule-detail-panel.is-hidden {
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    pointer-events: none;
    transition:
      opacity 0.18s ease,
      transform 0.22s ease,
      visibility 0s linear 0.22s;
  }

  body.student-schedule-page .schedule-detail-header {
    z-index: 1;
    position: relative;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(214, 225, 255, 0.9);
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity 0.22s ease 0.04s,
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1) 0.04s;
  }

  body.student-schedule-page .schedule-detail-label {
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
  }

  body.student-schedule-page .schedule-detail-header h2 {
    font-size: 1.5rem;
    line-height: 1.15;
  }

  body.student-schedule-page .schedule-detail-close {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
  }

  body.student-schedule-page .schedule-detail-body {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    max-height: none;
    overflow-y: auto;
    padding-right: 0;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity 0.24s ease 0.06s,
      transform 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.06s;
  }

  body.student-schedule-page .schedule-detail-panel.is-hidden .schedule-detail-header,
  body.student-schedule-page .schedule-detail-panel.is-hidden .schedule-detail-body {
    opacity: 0;
    transform: translateY(14px);
    transition-delay: 0s;
  }

  body.student-schedule-page .schedule-detail-badges {
    margin-bottom: 1rem;
  }

  body.student-schedule-page .schedule-detail-section {
    margin-bottom: 1.05rem;
  }

  body.student-schedule-page .schedule-detail-section-title {
    margin-bottom: 0.5rem;
    font-size: 0.76rem;
  }

  body.student-schedule-page .schedule-detail-meta {
    gap: 0.85rem;
  }

  body.student-schedule-page .schedule-detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding-bottom: 0.7rem;
  }

  body.student-schedule-page .schedule-detail-key {
    font-size: 0.72rem;
  }

  body.student-schedule-page .schedule-detail-value {
    text-align: left;
    font-size: 1rem;
    line-height: 1.45;
  }

  body.student-schedule-page .schedule-detail-notes {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
  }

  body.student-schedule-page .schedule-detail-notes h3 {
    font-size: 0.9rem;
  }

  body.student-schedule-page .schedule-detail-notes p,
  body.student-schedule-page .schedule-detail-empty {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  body.student-schedule-page .schedule-detail-signals li {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  body.student-schedule-page .schedule-detail-actions {
    margin-top: 1rem;
    padding-top: 0.85rem;
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0) 0%, rgba(247, 250, 255, 0.98) 30%);
  }

  body.student-schedule-page .schedule-detail-actions .btn {
    width: 100%;
    min-height: 48px;
  }
}

.qr-checkin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.qr-checkin-overlay.is-hidden {
  display: none;
}

.qr-checkin-modal {
  width: min(520px, 92vw);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  padding: 1.5rem;
}

.qr-checkin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.qr-checkin-subtitle {
  color: #6b7280;
  margin-top: 0.15rem;
  font-size: 0.9rem;
}

.qr-checkin-reader {
  margin-top: 1rem;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f4f6;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-checkin-status {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.qr-checkin-status.is-success {
  color: #15803d;
}

.qr-checkin-status.is-error {
  color: #b91c1c;
}

.qr-checkin-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* =========================================================================
   SCHEDULE RESKIN (folded 2026-07 from styles/timetable-redesign.css so the
   page has one stylesheet generation; !important here still targets legacy
   style.css rules. The week-spine section below stays the final word on
   event blocks and day-column state.
   ========================================================================= */
/* =========================================================================
   PlacementFlow — Timetable redesign. Scoped to body.student-schedule-page.
   Loaded AFTER style.css, timetable.css and today-redesign.css (which provides
   the shell reskin + the --pf-* tokens). Restyles the List/week view + controls.
   ========================================================================= */

/* ---- page canvas (schedule uses .app-content directly, no .app-inner) ---- */
/* keep the base margin-left:230px (fixed sidebar offset); only restyle bg + padding */
body.student-schedule-page .app-content{background:var(--pf-canvas,#fff) !important;padding:24px 32px 48px !important}
body.student-schedule-page #schedule-page-title{color:var(--pf-brand-ink) !important;font-size:30px !important;font-weight:600 !important;letter-spacing:-0.03em;margin:0 0 4px !important}
body.student-schedule-page #schedule-placement-label{color:var(--pf-ink-2) !important;font-size:14.5px !important;margin-bottom:18px !important}

/* ---- dissolve the big card wrapper so the day-cards are the cards ---- */
body.student-schedule-page #schedule-card{background:transparent !important;border:0 !important;box-shadow:none !important;padding:0 !important}
body.student-schedule-page #schedule-layout{display:block !important}

/* ---- header row: week label + controls ---- */
body.student-schedule-page .schedule-header-row{display:flex !important;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px !important;border:0 !important;background:transparent !important;padding:0 !important}
body.student-schedule-page #schedule-week-label{font-size:17px !important;font-weight:500 !important;color:var(--pf-brand-ink) !important}
body.student-schedule-page .card-subtitle{color:var(--pf-ink-3) !important;font-size:13px !important;margin-top:2px}
body.student-schedule-page .schedule-controls{display:flex !important;align-items:center;gap:12px;flex-wrap:wrap}

/* view toggle as pills */
body.student-schedule-page .schedule-view-toggle{display:flex !important;align-items:center;gap:8px}
body.student-schedule-page .schedule-view-label{font-size:12.5px !important;color:var(--pf-ink-3) !important;font-weight:500 !important}
body.student-schedule-page .roster-toggle{display:flex !important;background:var(--pf-bg) !important;border:1px solid var(--pf-line) !important;border-radius:var(--pf-r-pill) !important;padding:3px !important;gap:0 !important}
body.student-schedule-page .roster-toggle-btn{border:0 !important;background:none !important;font: inherit;font-size:13px !important;font-weight:600 !important;color:var(--pf-ink-2) !important;padding:7px 14px !important;border-radius:var(--pf-r-pill) !important;cursor:pointer}
body.student-schedule-page .roster-toggle-btn.is-active,
body.student-schedule-page .roster-toggle-btn[aria-pressed="true"]{background:var(--pf-surface) !important;color:var(--pf-brand) !important;box-shadow:var(--pf-sh) !important}

/* week nav as a pill cluster */
body.student-schedule-page .schedule-week-nav{display:flex !important;align-items:center;gap:2px;background:var(--pf-surface) !important;border:1px solid var(--pf-line) !important;border-radius:var(--pf-r-pill) !important;padding:3px !important;box-shadow:var(--pf-sh) !important}
body.student-schedule-page .schedule-week-nav .btn{background:none !important;border:0 !important;color:var(--pf-ink-2) !important;font-weight:600 !important;font-size:13px !important;padding:7px 13px !important;border-radius:var(--pf-r-pill) !important;box-shadow:none !important;min-width:0 !important}
body.student-schedule-page .schedule-week-nav .btn:hover{background:var(--pf-bg) !important}
body.student-schedule-page #schedule-today-week{color:var(--pf-brand) !important;font-weight:600 !important}

/* ---- legend ---- */
body.student-schedule-page .tt-legend{display:flex;gap:18px;margin-bottom:14px;flex-wrap:wrap}
body.student-schedule-page .tt-legend-item{display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:500;color:var(--pf-ink-2)}
body.student-schedule-page .tt-legend-item::before{content:"";width:10px;height:10px;border-radius:3px;display:inline-block}
body.student-schedule-page .tt-lg-mand::before{background:var(--pf-amber)}
body.student-schedule-page .tt-lg-teach::before{background:var(--pf-brand)}
body.student-schedule-page .tt-lg-clin::before{background:var(--pf-teal)}

/* ---- week list: one full-width row per day, sessions flow horizontally ---- */
body.student-schedule-page #schedule-week-grid:not(.is-hidden){display:flex !important;flex-direction:column !important;gap:12px !important;align-items:stretch !important}

/* day row */
body.student-schedule-page .schedule-day-card{background:var(--pf-surface) !important;border:1px solid var(--pf-line) !important;border-radius:var(--pf-r) !important;box-shadow:var(--pf-sh) !important;overflow:hidden !important;min-height:0 !important;display:flex !important;flex-direction:row !important;align-items:stretch !important;padding:0 !important;margin:0 !important}
body.student-schedule-page .schedule-day-card.is-today{border-color:var(--pf-brand) !important;box-shadow:0 0 0 1px var(--pf-brand), var(--pf-sh) !important}
/* left day-label column */
body.student-schedule-page .schedule-day-header{flex:0 0 160px !important;padding:14px 16px !important;border-right:1px solid var(--pf-line) !important;border-bottom:0 !important;background:transparent !important;margin:0 !important;display:flex !important;flex-direction:column;justify-content:center;gap:2px}
body.student-schedule-page .schedule-day-card.is-today .schedule-day-header{background:var(--pf-brand-tint) !important}
body.student-schedule-page .schedule-day-title{display:flex !important;flex-direction:column;gap:1px}
body.student-schedule-page .schedule-day-label{font-size:14px !important;font-weight:500 !important;color:var(--pf-brand-ink) !important}
body.student-schedule-page .schedule-day-card.is-today .schedule-day-label{color:var(--pf-brand) !important}
body.student-schedule-page .schedule-day-count{font-size:11.5px !important;color:var(--pf-ink-3) !important;font-weight:600 !important}
/* sessions area: horizontal, wrapping */
body.student-schedule-page .schedule-day-events{padding:12px !important;display:flex !important;flex-direction:row !important;flex-wrap:wrap !important;gap:10px !important;align-content:flex-start;align-items:stretch;flex:1;min-width:0}
body.student-schedule-page .schedule-day-events .schedule-event{flex:1 1 210px !important;max-width:280px !important;align-self:stretch}
body.student-schedule-page .schedule-day-empty{flex:1;display:flex;align-items:center;justify-content:flex-start;color:var(--pf-ink-3) !important;font-size:12.5px !important;text-align:left;padding:4px 6px !important;margin:0 !important;border:0 !important;background:transparent !important}

/* ---- session card ---- */
body.student-schedule-page .schedule-event{display:block !important;border:1px solid var(--pf-line) !important;border-left:3px solid var(--pf-brand) !important;border-radius:var(--pf-r-sm) !important;padding:10px 11px !important;background:var(--pf-surface) !important;box-shadow:none !important;cursor:pointer;transition:transform .12s, box-shadow .12s}
body.student-schedule-page .schedule-event:hover{box-shadow:var(--pf-sh) !important;transform:translateY(-1px)}
body.student-schedule-page .schedule-event-left{display:flex !important;flex-direction:row !important;gap:6px;align-items:baseline;margin:0 0 3px !important;padding:0 !important;border:0 !important;background:transparent !important}
body.student-schedule-page .schedule-event-start{font-size:12px !important;font-weight:600 !important;color:var(--pf-brand) !important}
body.student-schedule-page .schedule-event-end{font-size:12px !important;color:var(--pf-ink-3) !important;font-weight:600 !important}
body.student-schedule-page .schedule-event-end::before{content:"– "}
body.student-schedule-page .schedule-event-content{padding:0 !important}
body.student-schedule-page .schedule-event-title-row{margin:0 !important}
body.student-schedule-page .schedule-event-title{font-size:13.5px !important;font-weight:600 !important;color:var(--pf-ink) !important;line-height:1.25}
body.student-schedule-page .schedule-event-meta{font-size:11.5px !important;color:var(--pf-ink-3) !important;margin-top:3px !important}
body.student-schedule-page .schedule-event-right{display:none !important}
body.student-schedule-page .schedule-event-chips{display:flex !important;gap:5px;flex-wrap:wrap;margin-top:7px !important}
body.student-schedule-page .schedule-chip{font-size:10px !important;font-weight:500 !important;text-transform:uppercase;letter-spacing:.03em;border-radius:5px !important;padding:2px 6px !important;border:0 !important}
body.student-schedule-page .schedule-chip--mandatory{background:var(--pf-amber-tint) !important;color:#8a5200 !important}
body.student-schedule-page .schedule-chip--type{background:var(--pf-brand-tint) !important;color:var(--pf-brand-2) !important}
body.student-schedule-page .schedule-chip--audience{background:#eef1f6 !important;color:var(--pf-ink-2) !important}

/* type-based accent */
body.student-schedule-page .schedule-event--mandatory{border-left-color:var(--pf-amber) !important}
body.student-schedule-page .schedule-event--mandatory .schedule-event-start{color:#8a5200 !important}
body.student-schedule-page .schedule-event--teaching{border-left-color:var(--pf-brand) !important}
body.student-schedule-page .schedule-event--clinical{border-left-color:var(--pf-teal) !important}
body.student-schedule-page .schedule-event--clinical .schedule-event-start{color:var(--pf-teal) !important}
body.student-schedule-page .schedule-event--default{border-left-color:var(--pf-brand) !important}

/* check-in button + badge */
body.student-schedule-page .schedule-event-actions{margin-top:8px !important}
body.student-schedule-page .schedule-checkin-btn{background:var(--pf-brand) !important;border:0 !important;color:#fff !important;border-radius:var(--pf-r-sm) !important;font-size:12px !important;font-weight:600 !important;padding:7px 11px !important;box-shadow:none !important}
body.student-schedule-page .schedule-checkin-btn:hover{background:var(--pf-brand-2) !important}
body.student-schedule-page .schedule-event-checkin{background:var(--pf-teal-tint) !important;color:var(--pf-teal) !important;border:0 !important}

/* ---- responsive ---- */
@media (max-width:1100px){
  body.student-schedule-page .schedule-day-header{flex-basis:124px !important;padding:12px 13px !important}
  body.student-schedule-page .schedule-day-events .schedule-event{flex-basis:180px !important}
}
/* ---- full-width message mode (loading text / error / upcoming notices) ---- */
/* messages span the page, not trapped in one 1/7 grid cell. :not(.is-hidden)
   so the list-grid message can never show over the Calendar view. */
body.student-schedule-page #schedule-week-grid.schedule-week-grid--message:not(.is-hidden){display:block !important}
body.student-schedule-page #schedule-week-grid.schedule-week-grid--message > p{margin:8px auto;max-width:560px;text-align:center;color:var(--pf-ink-2);font-size:14.5px;background:var(--pf-surface);border:1px solid var(--pf-line);border-radius:var(--pf-r);box-shadow:var(--pf-sh);padding:28px 20px}

/* ---- recoverable load-error state (with Retry) ---- */
body.student-schedule-page .schedule-load-error{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;background:var(--pf-surface);border:1px solid var(--pf-line);border-radius:var(--pf-r);box-shadow:var(--pf-sh);padding:34px 20px;max-width:460px;margin:8px auto}
body.student-schedule-page .schedule-load-error p{margin:0;color:var(--pf-ink-2);font-size:14.5px;line-height:1.45}
body.student-schedule-page .schedule-load-error .schedule-retry-btn{min-width:120px}

/* =========================================================================
   Calendar (time-grid) view reskin — scoped to body.student-schedule-page
   ========================================================================= */
body.student-schedule-page .timetable-week-grid{background:var(--pf-surface) !important;border:1px solid var(--pf-line) !important;border-radius:var(--pf-r) !important;box-shadow:var(--pf-sh) !important;overflow:hidden}
body.student-schedule-page .timetable-week-header{border-bottom:1px solid var(--pf-line) !important;background:var(--pf-surface) !important}
body.student-schedule-page .timetable-week-header-spacer{border-right:1px solid var(--pf-line) !important;background:transparent !important}
body.student-schedule-page .timetable-weekday{border-right:1px solid var(--pf-line) !important;padding:10px 8px !important;background:transparent !important;cursor:pointer}
body.student-schedule-page .timetable-weekday-name{font-size:11.5px !important;font-weight:600 !important;text-transform:uppercase;letter-spacing:.05em;color:var(--pf-ink-3) !important}
body.student-schedule-page .timetable-weekday-date{font-size:15px !important;font-weight:500 !important;color:var(--pf-brand-ink) !important}
body.student-schedule-page .timetable-weekday.is-today{background:var(--pf-brand-tint) !important}
body.student-schedule-page .timetable-weekday.is-today .timetable-weekday-name,
body.student-schedule-page .timetable-weekday.is-today .timetable-weekday-date{color:var(--pf-brand) !important}
body.student-schedule-page .timetable-weekday.is-weekend{background:var(--pf-bg) !important}
body.student-schedule-page .timetable-time-axis{border-right:1px solid var(--pf-line) !important;background:var(--pf-surface) !important}
body.student-schedule-page .timetable-time-label{font-size:11px !important;color:var(--pf-ink-3) !important;font-weight:500 !important}
body.student-schedule-page .timetable-day-column{border-right:1px solid var(--pf-line) !important;background:transparent}
body.student-schedule-page .timetable-day-column.is-weekend{background:var(--pf-bg) !important}
body.student-schedule-page .timetable-week-empty{color:var(--pf-ink-3) !important;font-size:13px !important}

/* event blocks: superseded by the week-spine skin at the end of
   styles/timetable.css (five session colours + amber mandatory hatch) */

/* =========================================================================
   EVENT DETAIL PANEL — pf-styled right-side slide-in overlay (+ backdrop),
   matching the Sign-offs redesign panel. Desktop = slide from right;
   mobile (<=768px) = bottom sheet. Overrides legacy styles/timetable.css.
   ========================================================================= */
body.student-schedule-page .schedule-detail-backdrop{position:fixed !important;inset:0 !important;background:rgba(20,33,64,.30) !important;opacity:0;visibility:hidden;transition:opacity .22s ease, visibility .22s ease;z-index:1190}
body.student-schedule-page .schedule-detail-backdrop.is-open{opacity:1;visibility:visible}

body.student-schedule-page .schedule-detail-panel{position:fixed !important;top:0 !important;right:0 !important;left:auto !important;bottom:auto !important;height:100vh !important;height:100dvh !important;width:430px !important;max-width:92vw !important;margin:0 !important;z-index:1200 !important;display:flex !important;flex-direction:column !important;gap:0 !important;background:var(--pf-surface) !important;border:0 !important;border-left:1px solid var(--pf-line) !important;border-radius:0 !important;box-shadow:-10px 0 36px rgba(20,33,64,.12) !important;padding:0 !important;overflow:hidden !important;opacity:1 !important;visibility:visible !important;transform:translateX(100%) !important;transition:transform .26s cubic-bezier(.4,0,.2,1), visibility 0s linear 0s !important}
body.student-schedule-page .schedule-detail-panel:not(.is-hidden){transform:translateX(0) !important;visibility:visible !important}
body.student-schedule-page .schedule-detail-panel.is-hidden{transform:translateX(100%) !important;visibility:hidden !important;pointer-events:none !important;transition:transform .26s cubic-bezier(.4,0,.2,1), visibility 0s linear .26s !important}
body.student-schedule-page .schedule-detail-panel::before{display:none !important}

/* header */
body.student-schedule-page .schedule-detail-header{display:block !important;position:relative !important;padding:20px 22px 16px !important;margin:0 !important;border-bottom:1px solid var(--pf-line) !important;background:transparent !important}
body.student-schedule-page .schedule-detail-label{display:inline-block !important;font-size:10.5px !important;font-weight:500 !important;text-transform:uppercase;letter-spacing:.03em;color:var(--pf-brand-2) !important;background:var(--pf-brand-tint) !important;border-radius:6px !important;padding:3px 8px !important;margin:0 0 10px !important}
body.student-schedule-page .schedule-detail--mandatory .schedule-detail-label{background:var(--pf-amber-tint) !important;color:#8a5200 !important}
body.student-schedule-page .schedule-detail--teaching .schedule-detail-label{background:var(--pf-brand-tint) !important;color:var(--pf-brand-2) !important}
body.student-schedule-page .schedule-detail--clinical .schedule-detail-label{background:var(--pf-teal-tint) !important;color:var(--pf-teal) !important}
body.student-schedule-page .schedule-detail-header h2{font-size:19px !important;font-weight:600 !important;color:var(--pf-brand-ink) !important;letter-spacing:-0.02em;line-height:1.25;margin:0 !important;padding-right:38px !important}
body.student-schedule-page .schedule-detail-sub{font-size:13px !important;color:var(--pf-ink-2) !important;margin:5px 0 0 !important}
body.student-schedule-page .schedule-detail-close{position:absolute !important;top:16px !important;right:16px !important;width:32px !important;height:32px !important;border-radius:var(--pf-r-pill) !important;border:1px solid var(--pf-line) !important;background:var(--pf-surface) !important;color:var(--pf-ink-2) !important;font-size:14px !important;display:grid !important;place-items:center !important;box-shadow:none !important;padding:0 !important}
body.student-schedule-page .schedule-detail-close:hover{background:var(--pf-bg) !important}

/* body */
body.student-schedule-page .schedule-detail-body{flex:1 !important;overflow-y:auto !important;max-height:none !important;padding:18px 22px 22px !important;background:transparent !important}
body.student-schedule-page .schedule-detail-badges{display:flex !important;flex-wrap:wrap;gap:6px;margin:0 0 18px !important}
body.student-schedule-page .schedule-detail-badges .badge{font-size:11px !important;font-weight:500 !important;border:0 !important;border-radius:var(--pf-r-pill) !important;padding:4px 10px !important}
body.student-schedule-page .schedule-detail-badges .badge-warning{background:var(--pf-amber-tint) !important;color:#8a5200 !important}
body.student-schedule-page .schedule-detail-badges .badge-neutral{background:#eef1f6 !important;color:var(--pf-ink-2) !important}
body.student-schedule-page .schedule-detail-badges .badge-success{background:#e6f6ee !important;color:#137a43 !important}

body.student-schedule-page .schedule-detail-section{margin:0 0 22px !important;padding:0 !important;border:0 !important;background:transparent !important}
body.student-schedule-page .schedule-detail-section-title{font-size:11.5px !important;font-weight:600 !important;text-transform:uppercase;letter-spacing:.05em;color:var(--pf-ink-3) !important;margin:0 0 10px !important}
body.student-schedule-page .schedule-detail-meta{display:flex !important;flex-direction:column !important;gap:0 !important;margin:0 !important}
body.student-schedule-page .schedule-detail-row{display:flex !important;justify-content:space-between;align-items:baseline;gap:14px;padding:9px 0 !important;margin:0 !important;border-bottom:1px solid var(--pf-line) !important}
body.student-schedule-page .schedule-detail-row:last-child{border-bottom:0 !important}
body.student-schedule-page .schedule-detail-key{font-size:13px !important;color:var(--pf-ink-3) !important;font-weight:600 !important}
body.student-schedule-page .schedule-detail-value{font-size:13.5px !important;color:var(--pf-ink) !important;font-weight:600 !important;text-align:right}

/* "workflow signals" -> highlighted info box like the mockup's how-to box */
body.student-schedule-page .schedule-detail-signals{list-style:none !important;display:flex !important;flex-direction:column;gap:9px;margin:0 !important;padding:14px 16px !important;background:var(--pf-brand-tint) !important;border:1px solid #d4e6fb !important;border-radius:var(--pf-r) !important}
body.student-schedule-page .schedule-detail-signals li{position:relative;margin:0 !important;padding:0 0 0 24px !important;font-size:13px !important;color:var(--pf-ink) !important;line-height:1.45}
body.student-schedule-page .schedule-detail-signals li::before{content:"" !important;position:absolute;left:0;top:3px;width:14px;height:14px;border-radius:50%;background:var(--pf-brand) !important}
body.student-schedule-page .schedule-detail-signals li::after{content:"" !important;position:absolute;left:4px;top:7px;width:5px;height:2.5px;border-left:1.6px solid #fff;border-bottom:1.6px solid #fff;transform:rotate(-45deg)}

body.student-schedule-page .schedule-detail-notes{margin:18px 0 0 !important;padding:14px 16px !important;background:var(--pf-bg) !important;border:1px solid var(--pf-line) !important;border-radius:var(--pf-r) !important}
body.student-schedule-page .schedule-detail-notes h3{font-size:11.5px !important;font-weight:600 !important;text-transform:uppercase;letter-spacing:.05em;color:var(--pf-ink-3) !important;margin:0 0 6px !important}
body.student-schedule-page .schedule-detail-notes p{font-size:13.5px !important;color:var(--pf-ink) !important;line-height:1.5;margin:0 !important}
body.student-schedule-page .schedule-detail-empty{font-size:13px !important;color:var(--pf-ink-3) !important;margin:0 !important}

/* pinned footer action */
body.student-schedule-page .schedule-detail-actions{position:sticky !important;bottom:0 !important;margin:18px -22px -22px !important;padding:14px 22px !important;border-top:1px solid var(--pf-line) !important;background:var(--pf-surface) !important;display:flex !important;gap:10px}
body.student-schedule-page .schedule-detail-actions .btn{flex:1 !important;background:var(--pf-brand) !important;border:0 !important;color:#fff !important;border-radius:var(--pf-r-sm) !important;font-weight:600 !important;box-shadow:none !important}
body.student-schedule-page .schedule-detail-actions .btn:hover{background:var(--pf-brand-2) !important}

/* mobile: bottom sheet */
@media (max-width:768px){
  body.student-schedule-page .schedule-detail-panel{top:auto !important;right:0 !important;left:0 !important;bottom:0 !important;width:100% !important;max-width:none !important;height:90vh !important;border-left:0 !important;border-top:1px solid var(--pf-line) !important;border-radius:18px 18px 0 0 !important;box-shadow:0 -12px 36px rgba(20,33,64,.18) !important;transform:translateY(100%) !important}
  body.student-schedule-page .schedule-detail-panel:not(.is-hidden){transform:translateY(0) !important}
  body.student-schedule-page .schedule-detail-panel.is-hidden{transform:translateY(100%) !important}
}

/* =========================================================================
   Week spine (2026-07): the student week grid re-speaks the five session
   colours (ward violet / clinic teal / theatre red / teaching blue) with the
   amber hatch reserved for mandatory — matching the Today Dayline and the
   brand ticker. Includes check-in ticks, past-day desaturation, the live
   now-line, the weekend rail and the week summary bar.
   Approved mockup: docs/student-timetable-week.html
   ========================================================================= */
body.app-dashboard.student-schedule-page .timetable-event-block {
  --tt-c: #1f6fd6;
  --tt-t: #eaf2fd;
  position: absolute;
  overflow: hidden;
  background: var(--tt-t);
  border: 0;
  border-radius: 8px;
  padding: 0.34rem 0.5rem 0.34rem 0.85rem;
  box-shadow: none;
}
body.app-dashboard.student-schedule-page .timetable-event-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3.5px;
  background: var(--tt-c);
}
body.app-dashboard.student-schedule-page .timetable-event-block--ward { --tt-c: #7c5cff; --tt-t: #efe9ff; }
body.app-dashboard.student-schedule-page .timetable-event-block--clinic { --tt-c: #0d9488; --tt-t: #e3f5f2; }
body.app-dashboard.student-schedule-page .timetable-event-block--theatre { --tt-c: #e0493b; --tt-t: #fdecea; }
body.app-dashboard.student-schedule-page .timetable-event-block--teaching { --tt-c: #1f6fd6; --tt-t: #eaf2fd; }
body.app-dashboard.student-schedule-page .timetable-event-block--mandatory {
  background: var(--tt-t);
  border: 0;
  color: inherit;
}
body.app-dashboard.student-schedule-page .timetable-event-block--mandatory::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: repeating-linear-gradient(45deg, #e8a54b 0 1.5px, #fff 1.5px 3.5px);
}
body.app-dashboard.student-schedule-page .timetable-event-block:hover {
  border: 0;
  box-shadow: 0 3px 10px rgba(24, 45, 75, 0.16);
}
body.app-dashboard.student-schedule-page .timetable-event-block.is-selected {
  border: 0;
  box-shadow:
    0 0 0 2px var(--tt-c),
    0 8px 18px rgba(44, 82, 136, 0.16);
}
body.app-dashboard.student-schedule-page .timetable-event-block-time {
  color: var(--tt-c);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
body.app-dashboard.student-schedule-page .timetable-event-block-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: #16233f;
  letter-spacing: -0.01em;
}
body.app-dashboard.student-schedule-page .timetable-event-block-meta {
  font-size: 0.66rem;
  color: #5d6b84;
  font-weight: 500;
}
body.app-dashboard.student-schedule-page .timetable-event-tick {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #e4f5eb;
  color: #1a9e54;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.app-dashboard.student-schedule-page .timetable-event-tick--miss {
  background: #fdecea;
  color: #e0493b;
}

/* day state */
body.app-dashboard.student-schedule-page .timetable-day-column.is-past {
  background: #f7f9fc;
}
body.app-dashboard.student-schedule-page .timetable-day-column.is-past .timetable-event-block {
  opacity: 0.55;
}
body.app-dashboard.student-schedule-page .timetable-day-column.is-today {
  background: #fff;
  border-color: #bcd6f5;
  box-shadow: 0 4px 18px rgba(31, 111, 214, 0.09);
}
body.app-dashboard.student-schedule-page .timetable-weekday.is-past {
  opacity: 0.6;
}

/* live now-line */
body.app-dashboard.student-schedule-page .timetable-nowline {
  position: absolute;
  left: -2px;
  right: -2px;
  height: 2px;
  background: #1f6fd6;
  z-index: 5;
  box-shadow: 0 1px 4px rgba(31, 111, 214, 0.4);
  pointer-events: none;
}
body.app-dashboard.student-schedule-page .timetable-nowline i {
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f6fd6;
}
body.app-dashboard.student-schedule-page .timetable-nowline span {
  position: absolute;
  right: 4px;
  top: -20px;
  background: #16233f;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
body.app-dashboard.student-schedule-page .timetable-nowline.is-hidden {
  display: none;
}

/* weekend rail */
body.app-dashboard.student-schedule-page .timetable-weekend-rail {
  border: 1px dashed #c9d4e6;
  border-radius: 9px;
  padding: 14px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
body.app-dashboard.student-schedule-page .timetable-weekend-rail b {
  font-size: 11px;
  font-weight: 700;
  color: #5d6b84;
}
body.app-dashboard.student-schedule-page .timetable-weekend-rail span {
  font-size: 10.5px;
  color: #8a97ad;
  font-weight: 600;
  line-height: 1.5;
}
body.app-dashboard.student-schedule-page .timetable-weekend-railhead {
  visibility: hidden;
}

/* week summary bar + five-colour legend */
body.app-dashboard.student-schedule-page .tt-weekbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 2px 0 10px;
}
body.app-dashboard.student-schedule-page .tt-week-summary {
  font-size: 12.5px;
  color: #5d6b84;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
body.app-dashboard.student-schedule-page .tt-week-summary b {
  color: #16233f;
  font-weight: 700;
}
body.app-dashboard.student-schedule-page .tt-ws-sep {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c3cfe2;
  margin: 0 8px;
  vertical-align: 2px;
}
body.app-dashboard.student-schedule-page .tt-legend {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 11.5px;
  font-weight: 500;
  color: #5d6b84;
}
body.app-dashboard.student-schedule-page .tt-legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: -1px;
}
body.app-dashboard.student-schedule-page .tt-legend-swatch--hatch {
  width: 12px;
  background: repeating-linear-gradient(45deg, #e08a1e 0 2px, #fff 2px 4px);
}
@media (max-width: 720px) {
  body.app-dashboard.student-schedule-page .tt-weekbar {
    display: none;
  }
}

/* Student attendance + QR hardening */
body.student-schedule-page .schedule-checkin-guidance {
  margin: 0;
  color: var(--pf-ink-2, #5d6b84);
  font-size: 0.86rem;
  line-height: 1.45;
}

body.student-schedule-page .schedule-detail-attendance-issue {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--pf-line, #e6ebf3);
}

body.student-schedule-page .schedule-detail-attendance-issue .btn {
  text-decoration: none;
}

body.student-schedule-page .timetable-event-block--overlap {
  left: calc(
    4px + var(--schedule-lane-left, 0%) +
      var(--schedule-lane-gap-offset, 0px)
  ) !important;
  right: auto !important;
  width: calc(var(--schedule-lane-width, 100%) - 7px) !important;
  padding-inline: 0.35rem;
}

body.student-schedule-page .timetable-event-tick--neutral {
  background: #eef1f6;
  color: #4b5f7a;
}

.qr-checkin-overlay .is-hidden {
  display: none !important;
}

.qr-checkin-modal {
  max-height: min(760px, calc(100dvh - 2rem));
  overflow-y: auto;
}

.qr-checkin-status {
  min-height: 1.35rem;
  line-height: 1.45;
}

@media (max-width: 560px) {
  .qr-checkin-overlay {
    align-items: flex-end;
  }

  .qr-checkin-modal {
    width: 100%;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 0.75rem);
    border-radius: 22px 22px 0 0;
    padding: 1.2rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .qr-checkin-actions .btn {
    min-height: 46px;
  }
}

/* ==========================================================================
   NATIVE SHELL · YEAR 6 PROGRAMME DATES
   The third timetable view is emitted only when the selected year resolves to
   Year 6. These selectors intentionally do not target the canonical web page's
   .schedule-key-dates surface.
   ========================================================================== */
body.app-dashboard.has-external-shell-view.student-schedule-page
  .schedule-layout--key-dates {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-view-toggle--year6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-dates {
  margin: 0 0 1.5rem;
  overflow: hidden;
  border: 1px solid #e2e8f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 33, 64, 0.04),
    0 10px 30px rgba(20, 33, 64, 0.06);
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-hero {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 1.35rem 1.15rem;
  color: #fff;
  background: radial-gradient(
      circle at 88% 20%,
      rgba(66, 177, 255, 0.25),
      transparent 28%
    ),
    linear-gradient(145deg, #081f47, #0c306e 70%, #1556ad);
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-hero::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -5rem;
  width: 16rem;
  height: 10rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: rotate(-12deg);
  pointer-events: none;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-kicker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-kicker > span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #3fc1b4;
  box-shadow: 0 0 0 3px rgba(63, 193, 180, 0.2);
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-title-row h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-title-row p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.84rem;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-delivery {
  flex: none;
  padding: 0.3rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.69rem;
  font-weight: 600;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-range {
  position: relative;
  z-index: 1;
  margin: 0.9rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-periods {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-item {
  margin: 0;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-item
  + .shell-timetable-key-period-item {
  border-top: 1px solid #e8edf4;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-card {
  margin: 0;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  details.shell-timetable-key-period-card
  > summary {
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  details.shell-timetable-key-period-card
  > summary::-webkit-details-marker {
  display: none;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  details.shell-timetable-key-period-card
  > summary:focus-visible {
  outline: 3px solid rgba(31, 111, 214, 0.3);
  outline-offset: -3px;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, auto) 1.25rem;
  align-items: center;
  gap: 1rem;
  min-height: 4.75rem;
  padding: 0.8rem 1.25rem;
  background: #fff;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  details.shell-timetable-key-period-card
  > .shell-timetable-key-period-row {
  transition: background 160ms ease;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  details.shell-timetable-key-period-card
  > .shell-timetable-key-period-row:hover,
body.app-dashboard.has-external-shell-view.student-schedule-page
  details.shell-timetable-key-period-card[open]
  > .shell-timetable-key-period-row {
  background: #f8faff;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-copy {
  min-width: 0;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-title strong {
  color: #172542;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-copy small {
  display: block;
  margin-top: 0.22rem;
  color: #7a879d;
  font-size: 0.72rem;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-tag {
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  color: #34517c;
  background: #edf3fb;
  font-size: 0.64rem;
  font-weight: 500;
  line-height: 1.1;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-range {
  color: #263b61;
  font-size: 0.79rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-period-chevron {
  display: inline-grid;
  place-items: center;
  color: #7a879d;
  font-size: 1.1rem;
  transition: transform 160ms ease;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  details.shell-timetable-key-period-card[open]
  > summary
  .shell-timetable-key-period-chevron {
  transform: rotate(180deg);
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-introduction {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #e8edf4;
  background: #f5f8fd;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-introduction-head {
  margin-bottom: 0.8rem;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-introduction-head h3 {
  margin: 0;
  color: #172542;
  font-size: 0.86rem;
  font-weight: 600;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-introduction-head p {
  margin: 0.25rem 0 0;
  color: #7a879d;
  font-size: 0.72rem;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-days {
  display: grid;
  gap: 0.7rem;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-day {
  overflow: hidden;
  border: 1px solid #e2e8f2;
  border-radius: 12px;
  background: #fff;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-day + .shell-timetable-key-day {
  border-top-color: #e2e8f2;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0.7rem;
  background: #f8faff;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-day-head h3 {
  margin: 0;
  color: #172542;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-day-head > span {
  flex: none;
  color: #7a879d;
  font-size: 0.7rem;
  font-weight: 600;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-sessions {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-session {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid #eef2f7;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-session-time {
  color: #34517c;
  font-size: 0.78rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-session-copy h4 {
  margin: 0;
  color: #172542;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-session-copy p {
  display: flex;
  gap: 0.45rem;
  margin: 0.3rem 0 0;
  color: #637089;
  font-size: 0.75rem;
  line-height: 1.35;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-session-copy p span {
  color: #8a96aa;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-session--break {
  padding-block: 0.58rem;
  background: #fbfcfe;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-session--break
  .shell-timetable-key-session-time,
body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-session--break
  .shell-timetable-key-session-copy h4 {
  color: #8490a3;
  font-weight: 600;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-key-session--self-directed {
  background: #f7f4ff;
}

@media (max-width: 820px) {
  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-controls--year6 {
    flex-direction: column;
    align-items: stretch;
    gap: 8px !important;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-controls--year6
    .shell-timetable-month-control {
    width: 100%;
    max-width: none;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-view-toggle--year6 {
    display: grid !important;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-view-toggle--year6
    .shell-timetable-view-btn {
    min-width: 0;
    padding-inline: 0.45rem;
    font-size: 0.78rem;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-dates {
    margin: 0.5rem 0.85rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    border-radius: 16px;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-hero {
    padding: 1.1rem 1rem 1rem;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-period-row {
    grid-template-columns: minmax(0, 1fr) 1.25rem;
    gap: 0.35rem 0.75rem;
    min-height: 0;
    padding: 0.85rem 1rem;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-period-copy {
    grid-column: 1;
    grid-row: 1;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-period-range {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0.15rem;
    text-align: left;
    white-space: normal;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-period-chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-introduction {
    padding: 0.9rem 0.85rem 1rem;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-session {
    grid-template-columns: 5.25rem minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.78rem 0.9rem;
  }

  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-day-head {
    padding: 0.9rem 0.9rem 0.65rem;
  }
}

@media (max-width: 380px) {
  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-session {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.app-dashboard.has-external-shell-view.student-schedule-page
    details.shell-timetable-key-period-card
    > .shell-timetable-key-period-row,
  body.app-dashboard.has-external-shell-view.student-schedule-page
    .shell-timetable-key-period-chevron {
    transition: none;
  }
}

/* ==========================================================================
   WEB YEAR 6 KEY DATES
   Timetable -> Key dates. The programme is rendered from the shared Year 6
   timetable object; this block owns only the signed-in web presentation.
   ========================================================================== */
body.student-schedule-page .schedule-week-nav[hidden],
body.student-schedule-page .tt-weekbar[hidden] {
  display: none !important;
}

body.student-schedule-page .schedule-key-dates {
  overflow: hidden;
  border: 1px solid var(--pf-line, #e6ebf3);
  border-radius: var(--pf-r, 14px);
  background: var(--pf-surface, #fff);
  box-shadow: var(--pf-sh, 0 1px 2px rgba(20, 33, 64, 0.06));
}

body.student-schedule-page .schedule-key-dates-intro {
  padding: 22px 24px 20px;
  border-bottom: 1px solid var(--pf-line, #e6ebf3);
  background:
    radial-gradient(circle at 92% -40%, rgba(31, 111, 214, 0.13), transparent 48%),
    var(--pf-surface, #fff);
}

body.student-schedule-page .schedule-key-dates-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  color: var(--pf-brand, #1f6fd6);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.student-schedule-page .schedule-key-dates-kicker > span {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--pf-brand, #1f6fd6);
  box-shadow: 0 0 0 4px var(--pf-brand-tint, #eaf2fd);
}

body.student-schedule-page .schedule-key-dates-intro h2 {
  margin: 0;
  color: var(--pf-brand-ink, #16233f);
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 600;
  letter-spacing: -0.025em;
}

body.student-schedule-page .schedule-key-dates-intro > p:last-child {
  margin: 6px 0 0;
  color: var(--pf-ink-2, #5d6b84);
  font-size: 13.5px;
}

body.student-schedule-page .schedule-key-date-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.student-schedule-page .schedule-key-date-item {
  margin: 0;
  padding: 0;
}

body.student-schedule-page .schedule-key-date-item + .schedule-key-date-item {
  border-top: 1px solid var(--pf-line, #e6ebf3);
}

body.student-schedule-page .schedule-key-date-item.is-current {
  box-shadow: inset 4px 0 0 #0d9488;
}

body.student-schedule-page .schedule-key-date-item.is-next {
  box-shadow: inset 4px 0 0 var(--pf-brand, #1f6fd6);
}

body.student-schedule-page .schedule-key-date-card,
body.student-schedule-page .schedule-key-date-day {
  margin: 0;
}

body.student-schedule-page .schedule-key-date-status {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.student-schedule-page .schedule-key-date-status--current {
  color: #08766d;
  background: #d7f1ed;
}

body.student-schedule-page .schedule-key-date-status--next {
  color: var(--pf-brand-2, #1559b0);
  background: var(--pf-brand-tint, #eaf2fd);
}

body.student-schedule-page .schedule-key-date-card > summary,
body.student-schedule-page .schedule-key-date-day > summary {
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.student-schedule-page .schedule-key-date-card > summary::-webkit-details-marker,
body.student-schedule-page .schedule-key-date-day > summary::-webkit-details-marker {
  display: none;
}

body.student-schedule-page .schedule-key-date-card > summary:focus-visible,
body.student-schedule-page .schedule-key-date-day > summary:focus-visible {
  outline: 3px solid rgba(31, 111, 214, 0.3);
  outline-offset: -3px;
}

body.student-schedule-page .schedule-key-date-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) minmax(150px, auto) 24px;
  align-items: center;
  gap: 18px;
  min-height: 96px;
  padding: 18px 24px;
  transition: background 160ms ease;
}

body.student-schedule-page .schedule-key-date-row:hover {
  background: var(--pf-bg, #f6f8fc);
}

body.student-schedule-page .schedule-key-date-type {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--pf-ink-2, #5d6b84);
  font-size: 12px;
  font-weight: 500;
}

body.student-schedule-page .schedule-key-date-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 11px;
  color: var(--pf-brand, #1f6fd6);
  background: var(--pf-brand-tint, #eaf2fd);
}

body.student-schedule-page .schedule-key-date-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.student-schedule-page .schedule-key-date-event {
  min-width: 0;
}

body.student-schedule-page .schedule-key-date-event-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.student-schedule-page .schedule-key-date-event strong {
  color: var(--pf-ink, #1b2740);
  font-size: 14.5px;
  line-height: 1.35;
}

body.student-schedule-page .schedule-key-date-event small {
  display: block;
  margin-top: 4px;
  color: var(--pf-ink-3, #8a97ad);
  font-size: 12.5px;
}

/* The one authoritative page an admin published with a key date. It sits
   outside the row's card (a link cannot nest in the elective row's link),
   aligned under the event column. */
body.student-schedule-page .schedule-key-date-link {
  display: inline-block;
  margin: -8px 0 16px 174px;
  color: var(--pf-brand-2, #1559b0);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
}

body.student-schedule-page .schedule-key-date-link:hover,
body.student-schedule-page .schedule-key-date-link:focus-visible {
  text-decoration: underline;
}

body.student-schedule-page .schedule-key-date-tag {
  padding: 3px 9px;
  border: 1px solid #cfe0f7;
  border-radius: 999px;
  color: var(--pf-brand-2, #1559b0);
  background: var(--pf-brand-tint, #eaf2fd);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.student-schedule-page .schedule-key-date-range {
  color: var(--pf-brand-ink, #16233f);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

body.student-schedule-page .schedule-key-date-chevron,
body.student-schedule-page .schedule-key-date-day-chevron {
  display: inline-grid;
  place-items: center;
  color: var(--pf-ink-3, #8a97ad);
  font-size: 18px;
  transition: transform 160ms ease;
}

body.student-schedule-page .schedule-key-date-card[open] > summary .schedule-key-date-chevron,
body.student-schedule-page .schedule-key-date-day[open] > summary .schedule-key-date-day-chevron {
  transform: rotate(180deg);
}

body.student-schedule-page .schedule-key-date-programme {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--pf-line, #e6ebf3);
  background: var(--pf-bg, #f6f8fc);
}

body.student-schedule-page .schedule-key-date-programme-heading h3 {
  margin: 0;
  color: var(--pf-ink, #1b2740);
  font-size: 15px;
  font-weight: 600;
}

body.student-schedule-page .schedule-key-date-programme-heading p {
  margin: 4px 0 0;
  color: var(--pf-ink-3, #8a97ad);
  font-size: 12.5px;
}

body.student-schedule-page .schedule-key-date-days {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

body.student-schedule-page .schedule-key-date-day {
  overflow: hidden;
  border: 1px solid var(--pf-line, #e6ebf3);
  border-radius: 12px;
  background: var(--pf-surface, #fff);
}

body.student-schedule-page .schedule-key-date-day > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 15px;
  color: var(--pf-ink, #1b2740);
  font-size: 13.5px;
  font-weight: 500;
}

body.student-schedule-page .schedule-key-date-day > summary:hover {
  background: var(--pf-brand-tint, #eaf2fd);
}

body.student-schedule-page .schedule-key-date-day > summary small {
  color: var(--pf-ink-3, #8a97ad);
  font-size: 11.5px;
  font-weight: 500;
}

body.student-schedule-page .schedule-key-date-sessions {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--pf-line, #e6ebf3);
}

body.student-schedule-page .schedule-key-date-session {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 11px 15px;
}

body.student-schedule-page .schedule-key-date-session + .schedule-key-date-session {
  border-top: 1px solid var(--pf-line, #e6ebf3);
}

body.student-schedule-page .schedule-key-date-session time {
  color: var(--pf-brand-2, #1559b0);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

body.student-schedule-page .schedule-key-date-session-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body.student-schedule-page .schedule-key-date-session-copy strong {
  color: var(--pf-ink, #1b2740);
  font-size: 12.8px;
  line-height: 1.4;
}

body.student-schedule-page .schedule-key-date-presenter {
  color: var(--pf-ink-2, #5d6b84);
  font-size: 12px;
  line-height: 1.4;
}

body.student-schedule-page .schedule-key-date-session--break {
  background: #fbfcfe;
}

body.student-schedule-page .schedule-key-date-session--break time,
body.student-schedule-page .schedule-key-date-session--break strong {
  color: var(--pf-ink-3, #8a97ad);
  font-weight: 700;
}

/* Year 6 programme resources are shared by the web timetable and the native
   in-app timetable. Session-level links stay compact; the complete catalogue
   is grouped into collapsed, scannable panels. */
body.student-schedule-page span.schedule-session-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

body.student-schedule-page
  span.schedule-session-resources
  > .schedule-resource-link {
  display: inline-flex;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #cfe0f7;
  border-radius: 999px;
  color: var(--pf-brand-2, #1559b0);
  background: var(--pf-brand-tint, #eaf2fd);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
}

body.student-schedule-page section.schedule-session-resources {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--pf-line, #e6ebf3);
}

body.student-schedule-page section.schedule-session-resources > h3,
body.student-schedule-page section.schedule-session-resources > h5 {
  margin: 0 0 9px;
  color: var(--pf-ink, #1b2740);
  font-size: 12px;
  font-weight: 600;
}

body.student-schedule-page .schedule-session-resources--compact {
  margin-top: 9px;
  padding-top: 9px;
}

body.student-schedule-page .schedule-session-resources--compact > h5 {
  margin-bottom: 7px;
  color: var(--pf-ink-3, #8a97ad);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.student-schedule-page .schedule-resource-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.student-schedule-page .schedule-resource-list > li {
  min-width: 0;
  margin: 0;
}

body.student-schedule-page .schedule-resource-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--pf-line, #e6ebf3);
  border-radius: 10px;
  color: var(--pf-brand-2, #1559b0);
  background: var(--pf-surface, #fff);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease,
    transform 150ms ease;
}

body.student-schedule-page .schedule-resource-link:hover {
  border-color: #b6cff1;
  background: var(--pf-brand-tint, #eaf2fd);
  transform: translateY(-1px);
}

body.student-schedule-page .schedule-resource-link:focus-visible {
  outline: 3px solid rgba(31, 111, 214, 0.28);
  outline-offset: 2px;
}

body.student-schedule-page .schedule-resource-link::after {
  content: "↗";
  flex: none;
  margin-left: auto;
  color: var(--pf-ink-3, #8a97ad);
  font-size: 12px;
}

body.student-schedule-page .schedule-resource-link-type {
  flex: none;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--pf-brand-2, #1559b0);
  background: var(--pf-brand-tint, #eaf2fd);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.student-schedule-page .schedule-resource-link-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.student-schedule-page .schedule-resource-link-open {
  display: none;
}

body.student-schedule-page .schedule-resource-link--compact {
  padding: 6px 8px;
  font-size: 10.5px;
}

body.student-schedule-page .schedule-key-date-resources,
body.student-schedule-page .schedule-course-resources {
  border-top: 1px solid var(--pf-line, #e6ebf3);
  background: #f1f5fb;
}

body.student-schedule-page .schedule-course-resources {
  margin-top: 16px;
  padding: 17px;
  border: 1px solid #dfe7f2;
  border-radius: 14px;
}

body.student-schedule-page .schedule-course-resources-head {
  margin-bottom: 12px;
}

body.student-schedule-page .schedule-course-resources-head h3 {
  margin: 0;
  color: var(--pf-ink, #1b2740);
  font-size: 15px;
  font-weight: 600;
}

body.student-schedule-page .schedule-course-resources-head p {
  margin: 4px 0 0;
  color: var(--pf-ink-3, #8a97ad);
  font-size: 12px;
  line-height: 1.45;
}

body.student-schedule-page .schedule-resource-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

body.student-schedule-page .schedule-resource-group {
  overflow: hidden;
  margin: 0;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  background: var(--pf-surface, #fff);
}

body.student-schedule-page .schedule-course-resources > .schedule-resource-group +
  .schedule-resource-group {
  margin-top: 9px;
}

body.student-schedule-page .schedule-resource-group > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--pf-ink, #1b2740);
  font-size: 12.5px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

body.student-schedule-page .schedule-resource-group > summary::-webkit-details-marker {
  display: none;
}

body.student-schedule-page .schedule-resource-group > summary:hover {
  background: var(--pf-brand-tint, #eaf2fd);
}

body.student-schedule-page .schedule-resource-group > summary small {
  margin-left: auto;
  color: var(--pf-ink-3, #8a97ad);
  font-size: 10.5px;
  font-weight: 600;
}

body.student-schedule-page .schedule-resource-group > summary::after {
  content: "⌄";
  color: var(--pf-ink-3, #8a97ad);
  font-size: 15px;
  transition: transform 150ms ease;
}

body.student-schedule-page .schedule-resource-group[open] > summary::after {
  transform: rotate(180deg);
}

body.student-schedule-page
  .schedule-resource-group
  > .schedule-resource-list {
  padding: 10px;
  border-top: 1px solid var(--pf-line, #e6ebf3);
  background: #f8faff;
}

body.student-schedule-page .schedule-detail-resources .schedule-resource-list {
  margin-top: 9px;
}

/* Rich attachment cards in the event-detail drawer. Key-date rows keep the
   compact link treatment above; these cards are intentionally detail-only. */
body.student-schedule-page .schedule-detail-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

body.student-schedule-page
  .schedule-detail-section-heading
  .schedule-detail-section-title {
  margin: 0 !important;
}

body.student-schedule-page .schedule-detail-section-heading > span {
  flex: none;
  color: var(--pf-ink-3, #8a97ad);
  font-size: 10.5px;
  font-weight: 600;
}

body.student-schedule-page .schedule-resource-cards {
  display: grid;
  gap: 10px;
}

body.student-schedule-page .schedule-resource-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--pf-line, #e9edf4);
  border-radius: 12px;
  background: var(--pf-surface, #fff);
  box-shadow: 0 3px 11px rgba(20, 43, 77, 0.04);
}

body.student-schedule-page .schedule-resource-card-icon {
  width: 44px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #a94a21;
  background: #fff2e9;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.student-schedule-page
  .schedule-resource-card--pdf
  .schedule-resource-card-icon {
  color: #b93838;
  background: #fff0f0;
}

body.student-schedule-page
  .schedule-resource-card--recording
  .schedule-resource-card-icon {
  color: #6843c7;
  background: #f1edff;
  font-size: 16px;
}

body.student-schedule-page .schedule-resource-card-copy {
  min-width: 0;
}

body.student-schedule-page .schedule-resource-card-copy h4 {
  margin: 1px 0 5px;
  color: var(--pf-ink, #1b2740);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.student-schedule-page .schedule-resource-card-copy > p {
  margin: 0;
  color: var(--pf-ink-3, #8a97ad);
  font-size: 11px;
  line-height: 1.4;
}

body.student-schedule-page .schedule-resource-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

body.student-schedule-page .schedule-resource-action,
body.student-schedule-page .schedule-resource-preview-close {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 11px;
  border: 1px solid #b9d3f5;
  border-radius: 8px;
  color: var(--pf-brand, #1f6fd6);
  background: #f2f7ff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

body.student-schedule-page .schedule-resource-action--primary {
  border-color: var(--pf-brand, #1f6fd6);
  color: #fff;
  background: var(--pf-brand, #1f6fd6);
}

body.student-schedule-page .schedule-resource-action:hover,
body.student-schedule-page .schedule-resource-preview-close:hover {
  border-color: var(--pf-brand-2, #1559b0);
  background: #e8f1ff;
}

body.student-schedule-page .schedule-resource-action--primary:hover {
  color: #fff;
  background: var(--pf-brand-2, #1559b0);
}

body.student-schedule-page .schedule-resource-action:focus-visible,
body.student-schedule-page .schedule-resource-preview-close:focus-visible {
  outline: 3px solid rgba(31, 111, 214, 0.28);
  outline-offset: 2px;
}

body.student-schedule-page .schedule-detail-takeaways strong,
body.student-schedule-page .schedule-detail-takeaways span {
  display: block;
}

body.student-schedule-page .schedule-detail-takeaways strong {
  margin-bottom: 2px;
  font-size: 13px;
}

body.student-schedule-page .schedule-detail-takeaways span {
  color: var(--pf-ink-2, #5d6b84);
  font-size: 12.5px;
}

/* First-page PDF preview. Production never embeds the cross-origin source PDF:
   only an explicit same-origin raster thumbnail is rendered here. */
body.student-schedule-page.schedule-resource-preview-open {
  overflow: hidden;
}

body.student-schedule-page .schedule-resource-preview-backdrop[hidden],
body.student-schedule-page .schedule-resource-preview-dialog[hidden] {
  display: none !important;
}

body.student-schedule-page .schedule-resource-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1390;
  background: rgba(14, 30, 55, 0.42);
}

body.student-schedule-page .schedule-resource-preview-dialog {
  position: fixed;
  inset: 28px 454px 28px 28px;
  z-index: 1400;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cfd8e5;
  border-radius: 16px;
  background: #eef2f7;
  box-shadow: 0 22px 70px rgba(12, 30, 58, 0.28);
}

body.student-schedule-page .schedule-resource-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid #d6dee9;
  background: var(--pf-surface, #fff);
}

body.student-schedule-page .schedule-resource-preview-title {
  min-width: 0;
}

body.student-schedule-page .schedule-resource-preview-title strong,
body.student-schedule-page .schedule-resource-preview-title small {
  display: block;
}

body.student-schedule-page .schedule-resource-preview-title strong {
  overflow: hidden;
  color: var(--pf-ink, #1b2740);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.student-schedule-page .schedule-resource-preview-title small {
  margin-top: 2px;
  color: var(--pf-ink-3, #8a97ad);
  font-size: 10px;
}

body.student-schedule-page .schedule-resource-preview-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
}

body.student-schedule-page .schedule-resource-preview-close {
  color: var(--pf-ink-2, #5d6b84);
  border-color: var(--pf-line, #e9edf4);
  background: var(--pf-surface, #fff);
}

body.student-schedule-page .schedule-resource-preview-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 28px;
}

body.student-schedule-page .schedule-resource-preview-figure {
  width: min(920px, 100%);
  margin: auto;
}

body.student-schedule-page .schedule-resource-preview-figure img {
  width: 100%;
  max-height: calc(100vh - 160px);
  display: block;
  object-fit: contain;
  border: 1px solid #d9dee7;
  background: #fff;
  box-shadow: 0 5px 20px rgba(20, 36, 60, 0.13);
}

body.student-schedule-page .schedule-resource-preview-figure figcaption {
  margin-top: 10px;
  color: var(--pf-ink-2, #5d6b84);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

body.student-schedule-page .schedule-resource-preview-fallback {
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid #d9dee7;
  border-radius: 14px;
  background: var(--pf-surface, #fff);
  box-shadow: 0 5px 20px rgba(20, 36, 60, 0.1);
  text-align: center;
}

body.student-schedule-page .schedule-resource-preview-fallback-icon {
  width: 54px;
  height: 60px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 10px;
  color: #b93838;
  background: #fff0f0;
  font-size: 11px;
  font-weight: 600;
}

body.student-schedule-page .schedule-resource-preview-fallback h3 {
  margin: 0 0 7px;
  color: var(--pf-ink, #1b2740);
  font-size: 17px;
}

body.student-schedule-page .schedule-resource-preview-fallback p {
  margin: 0 auto 16px;
  color: var(--pf-ink-2, #5d6b84);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  body.student-schedule-page .schedule-resource-preview-dialog {
    inset: 22px;
  }
}

@media (max-width: 768px) {
  body.student-schedule-page .schedule-resource-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
  }

  body.student-schedule-page .schedule-resource-card-icon {
    width: 40px;
    height: 44px;
  }

  body.student-schedule-page .schedule-resource-preview-dialog {
    inset: 0;
    border: 0;
    border-radius: 0;
  }

  body.student-schedule-page .schedule-resource-preview-toolbar {
    align-items: flex-start;
    padding: 10px 12px;
  }

  body.student-schedule-page .schedule-resource-preview-body {
    padding: 18px 10px 56px;
  }

  body.student-schedule-page .schedule-resource-preview-figure img {
    max-height: calc(100vh - 145px);
  }
}

body.student-schedule-page .schedule-all-day-events {
  margin: 0 0 12px;
}

body.student-schedule-page .timetable-event-block--all-day {
  border-style: dashed;
  background: #edf4ff;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-all-day {
  margin: 0 16px 14px;
  overflow: hidden;
  border: 1px solid #cfe0f7;
  border-radius: 13px;
  background: #f3f7fd;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-all-day-label {
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid #dce8f8;
  color: #34517c;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-agenda--all-day {
  padding: 0 !important;
}

body.app-dashboard.has-external-shell-view.student-schedule-page
  .shell-timetable-agenda--all-day
  .shell-timetable-agenda-item:first-child {
  border-top: 0;
}

@media (max-width: 820px) {
  body.student-schedule-page .tt-ctl.has-key-dates {
    flex-wrap: wrap;
  }

  body.student-schedule-page .tt-ctl.has-key-dates .tt-seg {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  body.student-schedule-page .tt-ctl.has-key-dates .tt-seg button {
    padding-inline: 8px;
    white-space: nowrap;
  }

  body.student-schedule-page .tt-ctl.has-key-dates .tt-wknav {
    margin-left: auto;
  }

  body.student-schedule-page .schedule-key-dates {
    margin: 14px;
    border-radius: 16px;
  }

  body.student-schedule-page .schedule-key-dates-intro {
    padding: 19px 17px 17px;
  }

  body.student-schedule-page .schedule-key-date-row {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 10px 12px;
    padding: 16px 17px;
  }

  body.student-schedule-page .schedule-key-date-link {
    margin: -6px 0 14px 17px;
  }

  body.student-schedule-page .schedule-key-date-type,
  body.student-schedule-page .schedule-key-date-event,
  body.student-schedule-page .schedule-key-date-range {
    grid-column: 1;
    text-align: left;
  }

  body.student-schedule-page .schedule-key-date-chevron {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  body.student-schedule-page .schedule-key-date-programme {
    padding: 18px 14px 16px;
  }

  body.student-schedule-page .schedule-key-date-day > summary {
    grid-template-columns: minmax(0, 1fr) auto 18px;
    padding-inline: 13px;
  }

  body.student-schedule-page .schedule-key-date-session {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding-inline: 13px;
  }

  body.student-schedule-page .schedule-resource-groups {
    grid-template-columns: 1fr;
  }

  body.student-schedule-page .schedule-course-resources {
    padding: 14px;
  }
}

@media (max-width: 420px) {
  body.student-schedule-page .schedule-key-date-day > summary {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  body.student-schedule-page .schedule-key-date-day > summary small {
    display: none;
  }

  body.student-schedule-page .schedule-key-date-session {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.student-schedule-page .schedule-key-date-row,
  body.student-schedule-page .schedule-key-date-chevron,
  body.student-schedule-page .schedule-key-date-day-chevron,
  body.student-schedule-page .schedule-resource-link,
  body.student-schedule-page .schedule-resource-group > summary::after {
    transition: none;
  }
}

/* ==========================================================================
   MOBILE TIMETABLE · NATIVE V1
   One compact rule set for the approved standalone timetable workflow.
   Desktop list/calendar/key-date presentation remains owned by the rules
   above; these components are intentionally inert outside the phone layout.
   ========================================================================== */
body.student-schedule-page {
  --pt-brand: #1f6fd6;
  --pt-brand-2: #1559b0;
  --pt-brand-tint: #eaf2fd;
  --pt-brand-ink: #16233f;
  --pt-amber: #e08a1e;
  --pt-amber-tint: #fdf1df;
  --pt-green: #0d8a5f;
  --pt-green-tint: #e6f5ee;
  --pt-ink: #1b2740;
  --pt-ink-2: #5d6b84;
  --pt-ink-3: #8a97ad;
  --pt-line: #e9edf4;
  --pt-bg: var(--pf-canvas, #ffffff);
  --pt-surface: #ffffff;
  --pt-radius: 14px;
  --pt-radius-sm: 10px;
  --pt-pill: 999px;
  --pt-shadow: 0 1px 2px rgba(20, 33, 64, 0.04),
    0 2px 8px rgba(20, 33, 64, 0.05);
  --pt-safe-bottom: env(safe-area-inset-bottom, 0px);
  --pt-gutter: 14px;
  --pt-fast: 150ms;
  --pt-base: 190ms;
  --pt-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --pt-ward: #7c5cff;
  --pt-clinic: #0d9488;
  --pt-theatre: #e0493b;
  --pt-teaching: #1f6fd6;
  --pt-default: #8a97ad;
}

body.student-schedule-page .pt-weekbar,
body.student-schedule-page .pt-strip,
body.student-schedule-page .pt-att-slot,
body.student-schedule-page .pt-sheet,
body.student-schedule-page .pt-sheet-scrim {
  display: none;
}

body.student-schedule-page .pt-weekbar[hidden],
body.student-schedule-page .pt-strip[hidden],
body.student-schedule-page .pt-sheet[hidden],
body.student-schedule-page .pt-sheet-scrim[hidden] {
  display: none;
}

@media (max-width: 768px) {
  body.student-schedule-page {
    max-width: 100vw;
    overflow-x: clip;
    overflow-y: visible;
    background: var(--pt-bg);
    color: var(--pt-ink);
    -webkit-tap-highlight-color: transparent;
  }

  body.app-dashboard.student-shell-unified.student-schedule-page {
    --student-mobile-nav-height: 60px;
  }

  body.app-dashboard.student-shell-unified.student-schedule-page:not(:has(#section-dashboard))
    .app-content,
  body.app-dashboard.student-shell-unified.student-schedule-page .app-content,
  body.app-dashboard.student-schedule-page .app-content {
    width: 100% !important;
    max-width: 100%;
    margin-left: 0 !important;
    padding: 0 0
      calc(
        var(--student-mobile-nav-height) + var(--pt-safe-bottom) + 12px
      ) !important;
    overflow-x: clip;
    background: var(--pt-bg) !important;
  }

  body.student-schedule-page .app-content > #schedule-page-title,
  body.student-schedule-page .app-content > #schedule-placement-label,
  body.student-schedule-page .schedule-header-row,
  body.student-schedule-page .tt-weekbar {
    display: none !important;
  }

  body.student-schedule-page #schedule-card {
    width: 100%;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.student-schedule-page #schedule-layout {
    display: block !important;
    width: 100%;
    min-width: 0;
  }

  /* Compact in-flow title/context; shared/student-sidebar.js owns quick actions. */
  body.student-schedule-page .pp-mobhead {
    align-items: flex-end;
    gap: 8px;
    min-width: 0;
    padding:
      calc(env(safe-area-inset-top, 0px) + 12px)
      max(var(--pt-gutter), env(safe-area-inset-right, 0px))
      10px
      max(var(--pt-gutter), env(safe-area-inset-left, 0px)) !important;
    margin: 0;
    background: var(--pt-bg);
  }

  body.student-schedule-page .pp-mobhead-main {
    min-width: 0;
  }

  body.student-schedule-page .pp-mobhead-eyebrow {
    margin: 0;
    color: var(--pt-ink-3);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.11em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.student-schedule-page .pp-mobhead .pp-mobhead-title {
    margin: 3px 0 0;
    color: var(--pt-brand-ink) !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.05 !important;
  }

  /* Connected previous/range/next control with a separate, visible Today. */
  body.student-schedule-page .pt-weekbar:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px var(--pt-gutter) 8px;
  }

  body.student-schedule-page .pt-weekgroup {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius);
    background: var(--pt-surface);
    box-shadow: var(--pt-shadow);
  }

  body.student-schedule-page .pt-weeknav {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    display: grid;
    place-items: center;
    color: var(--pt-ink-2);
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition:
      background var(--pt-fast) var(--pt-ease),
      color var(--pt-fast) var(--pt-ease);
  }

  body.student-schedule-page .pt-weeknav svg {
    width: 17px;
    height: 17px;
  }

  body.student-schedule-page .pt-weeknav:active {
    color: var(--pt-brand-2);
    background: var(--pt-brand-tint);
  }

  body.student-schedule-page .pt-weeklabel {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    padding: 0 2px;
    border: 0;
    border-inline: 1px solid var(--pt-line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    overflow: hidden;
    color: var(--pt-ink);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
  }

  body.student-schedule-page .pt-weeklabel span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.student-schedule-page .pt-weeklabel:active {
    background: var(--pt-brand-tint);
  }

  body.student-schedule-page .pt-caret {
    width: 12px;
    height: 12px;
    flex: none;
    color: var(--pt-ink-3);
  }

  body.student-schedule-page .pt-today {
    flex: none;
    height: 46px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius);
    color: var(--pt-brand-2);
    background: var(--pt-surface);
    box-shadow: var(--pt-shadow);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
      background var(--pt-fast) var(--pt-ease),
      transform var(--pt-fast) var(--pt-ease);
  }

  body.student-schedule-page .pt-today:active {
    background: var(--pt-brand-tint);
    transform: scale(0.97);
  }

  body.student-schedule-page .pt-today.is-current {
    color: var(--pt-ink-3);
  }

  /* Seven equal columns: (320px - 8px inline padding) / 7 = 44.57px. */
  body.student-schedule-page .pt-strip:not([hidden]) {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    padding: 4px 4px 8px;
    overflow: visible;
    background: var(--pt-bg);
  }

  body.student-schedule-page .pt-daycell {
    min-width: 0;
    min-height: 60px;
    padding: 4px 0 5px;
    border: 0;
    border-radius: var(--pt-radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: inherit;
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: background var(--pt-fast) var(--pt-ease);
  }

  body.student-schedule-page .pt-daycell:active {
    background: rgba(31, 111, 214, 0.07);
  }

  body.student-schedule-page .pt-dow {
    color: var(--pt-ink-3);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
  }

  body.student-schedule-page .pt-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--pt-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    transition:
      background var(--pt-base) var(--pt-ease),
      color var(--pt-base) var(--pt-ease),
      box-shadow var(--pt-base) var(--pt-ease);
  }

  body.student-schedule-page .pt-daycell.is-today .pt-dow {
    color: var(--pt-brand-2);
  }

  body.student-schedule-page .pt-daycell.is-today .pt-num {
    color: var(--pt-brand-2);
    box-shadow: inset 0 0 0 1.5px var(--pt-brand);
  }

  body.student-schedule-page .pt-daycell.is-selected .pt-dow {
    color: var(--pt-ink);
  }

  body.student-schedule-page .pt-daycell.is-selected .pt-num {
    color: #ffffff;
    background: var(--pt-brand);
    box-shadow: 0 2px 8px rgba(31, 111, 214, 0.32);
    font-weight: 600;
  }

  body.student-schedule-page .pt-daycell.is-out .pt-dow,
  body.student-schedule-page .pt-daycell.is-out .pt-num {
    opacity: 0.38;
  }

  body.student-schedule-page .pt-dots {
    height: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
  }

  body.student-schedule-page .pt-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: block;
    flex: none;
    background: var(--pt-default);
  }

  body.student-schedule-page .pt-dot--ward {
    background: var(--pt-ward);
  }

  body.student-schedule-page .pt-dot--clinic {
    background: var(--pt-clinic);
  }

  body.student-schedule-page .pt-dot--theatre {
    background: var(--pt-theatre);
  }

  body.student-schedule-page .pt-dot--teaching {
    background: var(--pt-teaching);
  }

  /* Contextual attendance collapses completely when no session qualifies. */
  body.student-schedule-page .pt-att-slot {
    display: block;
    padding: 4px var(--pt-gutter) 0;
  }

  body.student-schedule-page .pt-att-slot:empty {
    display: none;
  }

  body.student-schedule-page .pt-att {
    padding: 12px 13px 13px;
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius);
    background: var(--pt-surface);
    box-shadow: var(--pt-shadow);
  }

  body.student-schedule-page .pt-att-top {
    margin-bottom: 7px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  body.student-schedule-page .pt-att-mand {
    height: 21px;
    padding: 0 8px 0 5px;
    border-radius: var(--pt-pill);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #9a5f0d;
    background: var(--pt-amber-tint);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  body.student-schedule-page .pt-att-mand svg {
    width: 13px;
    height: 13px;
  }

  body.student-schedule-page .pt-att-title {
    margin: 0;
    color: var(--pt-ink);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.3;
  }

  body.student-schedule-page .pt-att-meta {
    margin: 3px 0 0;
    color: var(--pt-ink-2);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
  }

  body.student-schedule-page .pt-att-foot {
    margin: 8px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--pt-ink-3);
    font-size: 12px;
    font-weight: 600;
  }

  body.student-schedule-page .pt-att-foot svg {
    width: 13px;
    height: 13px;
    flex: none;
  }

  body.student-schedule-page .pt-att-more {
    margin: 6px 2px 0;
    color: var(--pt-ink-3);
    font-size: 11.5px;
    font-weight: 600;
  }

  body.student-schedule-page .pt-att--pending .pt-att-top {
    margin-bottom: 6px;
  }

  body.student-schedule-page .pt-att--open {
    border-color: #b9d4f5;
    background: var(--pt-brand-tint);
    box-shadow:
      0 1px 2px rgba(20, 33, 64, 0.05),
      0 4px 14px rgba(31, 111, 214, 0.13);
  }

  body.student-schedule-page .pt-att-status {
    height: 21px;
    padding: 0 9px 0 6px;
    border-radius: var(--pt-pill);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ffffff;
    background: var(--pt-brand);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
  }

  body.student-schedule-page .pt-att-status svg {
    width: 8px;
    height: 8px;
  }

  body.student-schedule-page .pt-att--open .pt-att-mand {
    color: #8a5410;
    background: rgba(255, 255, 255, 0.82);
  }

  body.student-schedule-page .pt-att-say {
    margin: 7px 0 0;
    color: var(--pt-ink-2);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
  }

  body.student-schedule-page .pt-att-btn {
    width: 100%;
    min-height: 46px;
    margin-top: 10px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #ffffff;
    background: var(--pt-brand);
    box-shadow: 0 2px 8px rgba(31, 111, 214, 0.3);
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition:
      transform var(--pt-fast) var(--pt-ease),
      background var(--pt-fast) var(--pt-ease);
  }

  body.student-schedule-page .pt-att-btn svg {
    width: 17px;
    height: 17px;
    flex: none;
  }

  body.student-schedule-page .pt-att-btn:active {
    background: var(--pt-brand-2);
    transform: scale(0.98);
  }

  body.student-schedule-page .pt-att--done {
    padding: 10px 13px;
    border-color: #c6e5d6;
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--pt-green-tint);
    box-shadow: none;
  }

  body.student-schedule-page .pt-att-tick {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
    color: #ffffff;
    background: var(--pt-green);
  }

  body.student-schedule-page .pt-att-tick svg {
    width: 12px;
    height: 12px;
  }

  body.student-schedule-page .pt-att-body {
    min-width: 0;
  }

  body.student-schedule-page .pt-att-status-done {
    margin: 0;
    color: #0a6b4a;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  body.student-schedule-page .pt-att--done .pt-att-meta {
    margin-top: 1px;
    color: #4a6a5d;
    font-size: 12px;
  }

  /* Selected day and its compact session stack. */
  body.student-schedule-page #schedule-week-grid.pt-day:not(.is-hidden) {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 4px var(--pt-gutter) 0 !important;
    display: block !important;
  }

  body.student-schedule-page .pt-dayhead {
    padding: 6px 2px 10px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }

  body.student-schedule-page #schedule-card .pt-dayhead h2 {
    margin: 0;
    color: var(--pt-brand-ink);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
  }

  body.student-schedule-page .pt-daycount {
    color: var(--pt-ink-3);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
  }

  body.student-schedule-page .pt-daybody {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  body.student-schedule-page .schedule-week-grid--day-enter .pt-daybody {
    animation: pt-day-swap var(--pt-base) var(--pt-ease);
  }

  @keyframes pt-day-swap {
    from {
      opacity: 0;
      transform: translateY(3px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  body.student-schedule-page .pt-card {
    width: 100%;
    min-width: 0;
    padding: 12px 10px 12px 12px;
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius);
    display: grid;
    grid-template-columns: 52px 3px minmax(0, 1fr) 12px;
    align-items: stretch;
    gap: 0 10px;
    color: inherit;
    background: var(--pt-surface);
    box-shadow: var(--pt-shadow);
    text-align: left;
    cursor: pointer;
    transition:
      transform var(--pt-fast) var(--pt-ease),
      background var(--pt-fast) var(--pt-ease);
  }

  body.student-schedule-page .pt-card:active {
    background: #fbfcfe;
    transform: scale(0.985);
  }

  body.student-schedule-page .pt-card-time {
    padding-top: 1px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  body.student-schedule-page .pt-card-start {
    color: var(--pt-ink);
    font-size: 14.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
  }

  body.student-schedule-page .pt-card-end {
    color: var(--pt-ink-3);
    font-size: 11.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  body.student-schedule-page .pt-card-spine {
    border-radius: var(--pt-pill);
    background: var(--pt-default);
  }

  body.student-schedule-page .pt-card--ward .pt-card-spine {
    background: var(--pt-ward);
  }

  body.student-schedule-page .pt-card--clinic .pt-card-spine {
    background: var(--pt-clinic);
  }

  body.student-schedule-page .pt-card--theatre .pt-card-spine {
    background: var(--pt-theatre);
  }

  body.student-schedule-page .pt-card--teaching .pt-card-spine {
    background: var(--pt-teaching);
  }

  body.student-schedule-page .pt-card-body {
    min-width: 0;
  }

  body.student-schedule-page .pt-card-title {
    color: var(--pt-ink);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: -0.012em;
    line-height: 1.3;
  }

  body.student-schedule-page .pt-card-loc {
    min-width: 0;
    margin: 3px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--pt-ink-2);
    font-size: 12.5px;
    font-weight: 500;
  }

  body.student-schedule-page .pt-card-loc svg {
    width: 12px;
    height: 12px;
    flex: none;
    color: var(--pt-ink-3);
  }

  body.student-schedule-page .pt-card-loc span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.student-schedule-page .pt-chips {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }

  body.student-schedule-page .pt-chip {
    height: 21px;
    padding: 0 8px;
    border-radius: var(--pt-pill);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--pt-ink-2);
    background: #f2f5fa;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.01em;
  }

  body.student-schedule-page .pt-chip svg {
    width: 11px;
    height: 11px;
  }

  body.student-schedule-page .pt-chip--ward {
    color: #5a42c9;
    background: #f1eeff;
  }

  body.student-schedule-page .pt-chip--clinic {
    color: #0a6d64;
    background: #e6f5f2;
  }

  body.student-schedule-page .pt-chip--theatre {
    color: #b93b30;
    background: #fdecea;
  }

  body.student-schedule-page .pt-chip--teaching {
    color: var(--pt-brand-2);
    background: var(--pt-brand-tint);
  }

  body.student-schedule-page .pt-chip--done {
    color: var(--pt-green);
    background: var(--pt-green-tint);
  }

  body.student-schedule-page .pt-chip--qr {
    color: #9a5f0d;
    background: var(--pt-amber-tint);
  }

  body.student-schedule-page .pt-chip--live {
    color: #ffffff;
    background: var(--pt-green);
  }

  body.student-schedule-page .pt-chip--live i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: block;
    background: #ffffff;
  }

  body.student-schedule-page .pt-card-chev {
    align-self: center;
    display: grid;
    place-items: center;
    color: #c3ccdb;
  }

  body.student-schedule-page .pt-card-chev svg {
    width: 12px;
    height: 12px;
  }

  body.student-schedule-page .pt-card.is-live {
    border-color: rgba(13, 138, 95, 0.4);
  }

  body.student-schedule-page .pt-card-scan {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 0 12px;
    border: 1px solid #b9d4f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--pt-brand-2);
    background: var(--pt-brand-tint);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }

  body.student-schedule-page .pt-card-scan svg {
    width: 16px;
    height: 16px;
  }

  body.student-schedule-page .pt-empty {
    margin: 4px 0 0;
    padding: 18px 20px 20px;
    border: 1px dashed #dde4ef;
    border-radius: var(--pt-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.6);
    text-align: center;
  }

  body.student-schedule-page .pt-empty-ic {
    width: 34px;
    height: 34px;
    margin-bottom: 2px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--pt-brand);
    background: var(--pt-brand-tint);
  }

  body.student-schedule-page .pt-empty-ic svg {
    width: 17px;
    height: 17px;
  }

  body.student-schedule-page .pt-empty b {
    color: var(--pt-ink);
    font-size: 14px;
    font-weight: 700;
  }

  body.student-schedule-page .pt-empty > span:last-child {
    max-width: 24ch;
    color: var(--pt-ink-2);
    font-size: 12.5px;
  }

  body.student-schedule-page .schedule-loading-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* Session and scanner sheets must cover the fixed tab bar, not sit below it. */
  body.student-schedule-page .schedule-detail-backdrop {
    z-index: 1390 !important;
  }

  body.student-schedule-page .schedule-detail-panel {
    z-index: 1400 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  body.student-schedule-page .schedule-detail-close {
    top: 10px !important;
    right: 10px !important;
    width: 44px !important;
    height: 44px !important;
  }

  body.student-schedule-page .schedule-detail-header h2 {
    padding-right: 48px !important;
  }

  body.student-schedule-page .qr-checkin-overlay {
    z-index: 2300;
  }

  /* Month picker is the same date model unfolded into a modal sheet. */
  body.student-schedule-page .pt-sheet-scrim:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: block;
    background: rgba(15, 23, 41, 0.32);
    animation: pt-sheet-fade var(--pt-base) var(--pt-ease);
  }

  body.student-schedule-page .pt-sheet:not([hidden]) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1301;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 12px);
    padding-top: 8px;
    padding-right: max(4px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(16px + var(--pt-safe-bottom));
    padding-left: max(4px, env(safe-area-inset-left, 0px));
    border-radius: 20px 20px 0 0;
    display: block;
    overflow-y: auto;
    background: var(--pt-surface);
    box-shadow: 0 -8px 30px rgba(20, 33, 64, 0.16);
    animation: pt-sheet-rise var(--pt-base) var(--pt-ease);
  }

  @keyframes pt-sheet-fade {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes pt-sheet-rise {
    from {
      opacity: 0.6;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  body.student-schedule-page.schedule-month-open {
    overflow: hidden;
  }

  body.student-schedule-page .pt-sheet-grab {
    width: 36px;
    height: 4px;
    margin: 0 auto 10px;
    border-radius: var(--pt-pill);
    background: #dfe5ee;
  }

  body.student-schedule-page .pt-sheet-head {
    padding: 0 10px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  body.student-schedule-page .pt-sheet-head > b {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--pt-brand-ink);
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  body.student-schedule-page .pt-sheet-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
  }

  body.student-schedule-page .pt-weeknav--bare {
    flex-basis: 44px;
    height: 44px;
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius-sm);
  }

  body.student-schedule-page .pt-sheet-nav .pt-today {
    height: 44px;
    padding: 0 12px;
  }

  body.student-schedule-page .pt-sheet-dow,
  body.student-schedule-page .pt-sheet-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  body.student-schedule-page .pt-sheet-dow {
    padding-bottom: 4px;
  }

  body.student-schedule-page .pt-sheet-dow span {
    color: var(--pt-ink-3);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-align: center;
  }

  body.student-schedule-page .pt-sheet-grid {
    gap: 0;
  }

  body.student-schedule-page .pt-mcell {
    min-width: 0;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--pt-radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--pt-ink);
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
  }

  body.student-schedule-page .pt-mcell:active {
    background: var(--pt-brand-tint);
  }

  body.student-schedule-page .pt-mcell.is-dim {
    color: #c1c9d6;
  }

  body.student-schedule-page .pt-mcell.is-out {
    opacity: 0.45;
  }

  body.student-schedule-page .pt-mcell.is-today {
    color: var(--pt-brand-2);
    font-weight: 600;
  }

  body.student-schedule-page .pt-mcell.is-selected {
    color: #ffffff;
    background: var(--pt-brand);
    font-weight: 600;
  }

  body.student-schedule-page .pt-mdots {
    height: 4px;
    display: flex;
    gap: 2px;
  }

  body.student-schedule-page .pt-mdots .pt-dot {
    width: 4px;
    height: 4px;
  }

  body.student-schedule-page .pt-mcell.is-selected .pt-mdots .pt-dot {
    background: rgba(255, 255, 255, 0.85);
  }

  body.student-schedule-page .pt-sheet-foot {
    margin: 12px 2px 0;
    color: var(--pt-ink-3);
    font-size: 11.5px;
    font-weight: 600;
    text-align: center;
  }

  /* Approved 60px tab bar; reserve the same height above it. */
  body.app-dashboard.student-shell-unified.student-schedule-page
    .student-mobile-nav {
    min-height: calc(
      var(--student-mobile-nav-height) + var(--pt-safe-bottom)
    );
    padding: 4px 4px calc(4px + var(--pt-safe-bottom));
    gap: 2px;
  }

  body.app-dashboard.student-shell-unified.student-schedule-page
    .student-mobile-nav-item {
    min-height: 52px;
    gap: 3px;
    transition:
      color var(--pt-fast) var(--pt-ease),
      transform var(--pt-fast) var(--pt-ease);
  }

  body.app-dashboard.student-shell-unified.student-schedule-page
    .student-mobile-nav-item:active {
    transform: scale(0.92);
  }

  body.app-dashboard.student-shell-unified.student-schedule-page
    .student-mobile-nav-item.is-active {
    color: var(--pt-brand-2);
    font-weight: 500;
  }

  body.app-dashboard.student-shell-unified.student-schedule-page
    .student-mobile-nav-item.is-active
    .student-mobile-nav-icon {
    transform: translateY(-1px);
  }

  body.student-schedule-page
    :where(
      .pt-weeknav,
      .pt-weeklabel,
      .pt-today,
      .pt-daycell,
      .pt-att-btn,
      .pt-card,
      .pt-card-scan,
      .pt-mcell
    ):focus-visible {
    outline: 2px solid var(--pt-brand);
    outline-offset: 2px;
  }

  body.student-schedule-page .pt-weekgroup button:focus-visible {
    outline-offset: -3px;
  }
}

@media (max-width: 344px) {
  body.student-schedule-page {
    --pt-gutter: 12px;
  }

  body.student-schedule-page .pp-mobhead {
    gap: 4px;
  }

  body.student-schedule-page .pp-mobhead-eyebrow {
    font-size: 9.5px;
    letter-spacing: 0.05em;
  }

  body.student-schedule-page .pp-mobhead .pp-mobhead-title {
    font-size: 22px !important;
  }

  body.student-schedule-page .pt-weekbar {
    gap: 6px;
  }

  body.student-schedule-page .pt-weeklabel {
    gap: 3px;
    font-size: 12px;
  }

  body.student-schedule-page .pt-today {
    padding: 0 11px;
    font-size: 12.5px;
  }

  body.student-schedule-page .pt-num {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  body.student-schedule-page .pt-card {
    grid-template-columns: 48px 3px minmax(0, 1fr) 10px;
    padding-left: 10px;
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  body.student-schedule-page *,
  body.student-schedule-page *::before,
  body.student-schedule-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* PlacementFlow-admin lifecycle signals shared by list, week, mobile and detail. */
body.student-schedule-page :where(.schedule-chip--source, .pt-chip--source),
body.student-schedule-page .schedule-badge--source {
  color: #3d4c91 !important;
  background: #eeefff !important;
}

body.student-schedule-page :where(.schedule-chip--published, .pt-chip--published),
body.student-schedule-page .schedule-badge--published {
  color: #176b43 !important;
  background: #e8f6ee !important;
}

body.student-schedule-page :where(.schedule-chip--rescheduled, .pt-chip--rescheduled),
body.student-schedule-page .schedule-badge--rescheduled {
  color: #6b4ab0 !important;
  background: #f1edff !important;
}

body.student-schedule-page :where(.schedule-chip--cancelled, .pt-chip--cancelled),
body.student-schedule-page .schedule-badge--cancelled {
  color: #a23b49 !important;
  background: #fcecef !important;
}

body.student-schedule-page :where(.schedule-chip--optional, .pt-chip--optional),
body.student-schedule-page .schedule-badge--optional {
  color: #56647a !important;
  background: #eef1f5 !important;
}

body.student-schedule-page .schedule-event.is-cancelled,
body.student-schedule-page .pt-card.is-cancelled,
body.student-schedule-page .schedule-agenda-item.is-cancelled {
  border-color: #d6dbe3 !important;
  background: #f7f8fa !important;
  box-shadow: none !important;
}

body.student-schedule-page .schedule-event.is-cancelled,
body.student-schedule-page .pt-card.is-cancelled,
body.student-schedule-page .timetable-event-block.is-cancelled,
body.student-schedule-page .schedule-agenda-item.is-cancelled {
  opacity: 0.72;
}

body.student-schedule-page .schedule-event.is-cancelled .schedule-event-title,
body.student-schedule-page .pt-card.is-cancelled .pt-card-title,
body.student-schedule-page .timetable-event-block.is-cancelled .timetable-event-block-title,
body.student-schedule-page .schedule-agenda-item.is-cancelled .schedule-agenda-title,
body.student-schedule-page .schedule-detail--cancelled .schedule-detail-header h2 {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

body.student-schedule-page .pt-card.is-cancelled .pt-card-spine,
body.student-schedule-page .timetable-event-block.is-cancelled::before {
  background: #8e99a9 !important;
}

body.student-schedule-page .timetable-event-block.is-cancelled {
  --tt-c: #7b8695;
  --tt-t: #f0f2f5;
}

body.student-schedule-page .schedule-detail--cancelled .schedule-detail-label {
  color: #a23b49 !important;
  background: #fcecef !important;
}

body.student-schedule-page .schedule-detail-online-link {
  color: #075ff0;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Protected session feedback: native dialog owns modal focus and inertness. */
dialog.schedule-protected-feedback{box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #dbe3ef;border-radius:16px;color:#24334e;background:#fff;font:inherit;overflow:auto}
dialog.schedule-protected-feedback::backdrop{background:rgba(16,24,40,.48)}
.schedule-protected-feedback header{padding:20px 24px 12px;border-bottom:1px solid #e4e9f2}
.schedule-protected-feedback h2{margin:0;font-size:22px;line-height:1.3;overflow-wrap:anywhere}
.schedule-protected-feedback p{line-height:1.5}
.schedule-feedback-form-body{padding:16px 24px}
.schedule-feedback-form-body fieldset{min-width:0;border:0;border-top:1px solid #e4e9f2;padding:16px 0;margin:12px 0}
.schedule-feedback-form-body legend{font-weight:600;font-size:15px;line-height:1.4}
.schedule-feedback-choices{display:flex;flex-wrap:wrap;gap:8px;padding-top:10px}
.schedule-feedback-choices label{display:flex;align-items:center;gap:6px;min-height:44px;padding:8px;border:1px solid #dbe3ef;border-radius:8px}
.schedule-protected-feedback :is(textarea,select){box-sizing:border-box;width:100%;min-height:44px;padding:10px;border:1px solid #dbe3ef;border-radius:8px;font:inherit}
.schedule-protected-feedback footer{position:sticky;bottom:0;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;padding:16px 24px max(16px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e4e9f2}
.schedule-protected-feedback button{min-height:44px;padding:8px 14px;font:inherit;border-radius:8px;border:1px solid #dbe3ef;background:#fff;color:#215fab}
.schedule-protected-feedback footer button:last-child{background:#216eda;color:#fff}
.schedule-protected-feedback button:disabled{opacity:.55}
@media(max-width:600px){dialog.schedule-protected-feedback{width:100%;max-height:100dvh;border-radius:0}.schedule-protected-feedback :is(textarea,select){font-size:16px}}

/* Upcoming placement: a week before the start shows when it starts and a way
   to its first week, in place of an empty time grid. */
body.student-schedule-page .timetable-week-grid[data-schedule-notice] .timetable-week-header,
body.student-schedule-page .timetable-week-grid[data-schedule-notice] .timetable-week-body{display:none !important}
body.student-schedule-page .timetable-week-grid[data-schedule-notice] .timetable-week-empty{margin:0 !important;padding:0 !important;border:0 !important;background:transparent !important}
body.student-schedule-page .schedule-upcoming-notice{max-width:560px;margin:8px auto;padding:24px 20px;text-align:center;color:var(--pf-ink-2);font-size:14.5px;line-height:1.45;background:var(--pf-surface);border:1px solid var(--pf-line);border-radius:var(--pf-r);box-shadow:var(--pf-sh)}
body.student-schedule-page .schedule-upcoming-notice p{margin:0 0 4px !important;padding:0 !important;background:none !important;border:0 !important;box-shadow:none !important;max-width:none !important}
body.student-schedule-page .schedule-upcoming-notice .schedule-upcoming-notice__title{color:var(--pf-brand-ink);font-weight:600;font-size:15.5px}
body.student-schedule-page .schedule-upcoming-notice .btn{margin-top:12px}

/* ==========================================================================
   TIMETABLE T1.2 — owner-approved design (16 October 2026)

   The week grid, Day list, Key dates and event drawer set in B3.2's
   language: one ink rule opens the section, hairlines group, a session's
   colour marks its time and its edge (never a surface), white blocks, IBM
   Plex weights 400/600. The week heading is a date control that opens the
   month sheet (a popover at desktop widths, the existing bottom sheet on
   phones); Key dates is grouped into month sections with a month rail and a
   Now / Next / Next assessment line.

   The rules below were reviewed as a layer over the stylesheet above; each
   selector keeps the specificity it was reviewed at (html:root, 0-1-1) so the
   cascade is exactly the approved one. The phone shell (pill, tab bar,
   Learn/More sheets) is outside every selector here.
   ========================================================================== */

html:root {
  --tt-ink: #16233f;
  --tt-text: #1b2740;
  --tt-slate: #5d6b84;
  --tt-mist: #8a97ad;
  --tt-rule: #dfe4ec;
  --tt-soft: #f1f4f9;
  --tt-paper: #f6f8fb;
  --tt-blue: #1f6fd6;
  --tt-blue-deep: #1559b0;
  --tt-blue-tint: #eaf2fd;
  --tt-navy: #081f47;
  --tt-amber: #e08a1e;
  --tt-amber-ink: #8a5208;
  --tt-amber-tint: #fdf1df;
  --tt-green-ink: #137a40;
  --tt-ward: #7c5cff;
  --tt-clinic: #0d9488;
  --tt-theatre: #e0493b;
  --tt-teaching: #1f6fd6;
  --tt-quick: 100ms;
  --tt-base: 150ms;
  --tt-ease: cubic-bezier(0.3, 0.7, 0.4, 1);
}

/* ==========================================================================
   Shared: desktop and tablet (>=769px)
   ========================================================================== */
@media (min-width: 769px) {
  /* The timetable sits on the page, not in a card. */
  html:root body.student-schedule-page #schedule-card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  /* Toolbar: the week on the left, controls on one line, an ink rule opens
     the section (B3.2). */
  html:root body.student-schedule-page .schedule-header-row {
    align-items: flex-end !important;
    margin: 0 0 12px !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid var(--tt-ink) !important;
    gap: 16px !important;
  }
  html:root body.student-schedule-page #schedule-week-label {
    font-size: 20px !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    color: var(--tt-ink) !important;
    line-height: 1.15 !important;
  }
  html:root body.student-schedule-page #schedule-view-subtitle {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--tt-slate) !important;
    margin-top: 3px !important;
  }
  html:root body.student-schedule-page .schedule-view-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }
  html:root body.student-schedule-page .schedule-controls {
    gap: 8px !important;
    align-items: center !important;
  }
  html:root body.student-schedule-page .roster-toggle {
    background: #fff !important;
    border: 1px solid var(--tt-rule) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    padding: 2px !important;
    min-height: 36px !important;
    gap: 2px !important;
  }
  html:root body.student-schedule-page .roster-toggle-btn {
    border-radius: 6px !important;
    padding: 0 12px !important;
    min-height: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--tt-slate) !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    transition: background-color var(--tt-base) var(--tt-ease), color var(--tt-base) var(--tt-ease);
  }
  html:root body.student-schedule-page .roster-toggle-btn:hover {
    background: var(--tt-soft) !important;
    color: var(--tt-ink) !important;
    transition-duration: var(--tt-quick);
  }
  html:root body.student-schedule-page .roster-toggle-btn.is-active,
html:root body.student-schedule-page .roster-toggle-btn[aria-pressed="true"] {
    background: var(--tt-blue-tint) !important;
    color: var(--tt-blue-deep) !important;
  }
  html:root body.student-schedule-page #schedule-today-week {
    color: var(--tt-blue-deep) !important;
  }
  html:root body.student-schedule-page .roster-toggle-btn:focus-visible {
    outline: 2px solid var(--tt-blue) !important;
    outline-offset: 1px !important;
  }

  /* Summary and legend: one quiet line. */
  html:root body.student-schedule-page .tt-weekbar {
    margin: 0 0 14px !important;
    align-items: center !important;
  }
  html:root body.student-schedule-page #schedule-week-summary {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page #schedule-week-summary b {
    color: var(--tt-ink) !important;
    font-weight: 600 !important;
  }
  html:root body.student-schedule-page .tt-legend {
    margin: 0 !important;
    gap: 14px !important;
    font-size: 11.5px !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .tt-legend-swatch {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    margin-right: 6px !important;
  }

  /* ---- Week grid ---- */
  html:root body.student-schedule-page .timetable-week-grid {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
  }
  html:root body.student-schedule-page .timetable-week-header {
    gap: 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--tt-rule);
  }
  html:root body.student-schedule-page .timetable-weekday {
    padding: 0 10px 10px !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--tt-ink) !important;
    cursor: pointer;
    transition: background-color var(--tt-base) var(--tt-ease);
  }
  html:root body.student-schedule-page .timetable-weekday:hover {
    background: var(--tt-soft) !important;
    transition-duration: var(--tt-quick);
  }
  html:root body.student-schedule-page .timetable-weekday:focus-visible {
    outline: 2px solid var(--tt-blue);
    outline-offset: -2px;
  }
  html:root body.student-schedule-page .timetable-weekday-name {
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em !important;
    color: var(--tt-slate) !important;
    margin-bottom: 2px;
  }
  html:root body.student-schedule-page .timetable-weekday-date {
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    color: var(--tt-ink) !important;
    font-variant-numeric: tabular-nums;
  }
  html:root body.student-schedule-page .timetable-weekday.is-past .timetable-weekday-date {
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .timetable-weekday.is-today {
    box-shadow: inset 0 -2px 0 var(--tt-blue) !important;
  }
  html:root body.student-schedule-page .timetable-weekday.is-today .timetable-weekday-name,
html:root body.student-schedule-page .timetable-weekday.is-today .timetable-weekday-date {
    color: var(--tt-blue) !important;
  }
  html:root body.student-schedule-page .timetable-weekday.is-selected {
    background: var(--tt-blue-tint) !important;
  }
  html:root body.student-schedule-page .timetable-week-body {
    gap: 0 !important;
  }
  html:root body.student-schedule-page .timetable-time-axis {
    padding: 0 10px 0 0 !important;
  }
  html:root body.student-schedule-page .timetable-time-label {
    font-size: 11px !important;
    color: var(--tt-slate) !important;
    text-align: right;
    transform: translateY(-7px);
    font-variant-numeric: tabular-nums;
  }
  html:root body.student-schedule-page .timetable-week-columns {
    gap: 0 !important;
  }
  html:root body.student-schedule-page .timetable-day-column {
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: repeating-linear-gradient(to bottom, var(--tt-soft) 0 1px, transparent 1px var(--timetable-hour-height, 64px)) !important;
    border-left: 1px solid var(--tt-soft) !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  html:root body.student-schedule-page .timetable-day-column.is-today {
    background-color: #fafbfd !important;
  }
  html:root body.student-schedule-page .timetable-day-column.is-selected {
    background-color: var(--tt-blue-tint) !important;
  }
  html:root body.student-schedule-page .timetable-weekend-rail {
    border: 0 !important;
    border-left: 1px solid var(--tt-soft) !important;
    border-radius: 0 !important;
    padding: 16px 10px !important;
    color: var(--tt-slate) !important;
    font-size: 11.5px !important;
    line-height: 1.4;
  }
  html:root body.student-schedule-page .timetable-weekend-rail b {
    color: var(--tt-slate) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
  }
  html:root body.student-schedule-page .timetable-weekend-railhead {
    background: transparent !important;
  }
  html:root body.student-schedule-page .timetable-week-empty {
    border: 0 !important;
    background: transparent !important;
    padding: 20px 0 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    color: var(--tt-slate) !important;
  }

  /* Session blocks: white, a 2px edge and the time in the session's colour. */
  html:root body.student-schedule-page .timetable-event-block {
    --tt-c: var(--tt-slate);
    --tt-t: var(--tt-soft);
    left: 4px;
    right: 4px;
    width: auto;
    background: #fff !important;
    border: 1px solid var(--tt-rule) !important;
    border-left: 2px solid var(--tt-c) !important;
    border-radius: 6px !important;
    padding: 6px 8px 6px 10px !important;
    gap: 2px !important;
    box-shadow: none !important;
    color: var(--tt-text) !important;
    transition: border-color var(--tt-base) var(--tt-ease), background-color var(--tt-base) var(--tt-ease);
  }
  html:root body.student-schedule-page .timetable-event-block--ward { --tt-c: var(--tt-ward); }
  html:root body.student-schedule-page .timetable-event-block--clinic { --tt-c: var(--tt-clinic); }
  html:root body.student-schedule-page .timetable-event-block--theatre { --tt-c: var(--tt-theatre); }
  html:root body.student-schedule-page .timetable-event-block--teaching { --tt-c: var(--tt-teaching); }
  html:root body.student-schedule-page .timetable-event-block--overlap {
    left: calc(var(--schedule-lane-left, 0%) + 4px) !important;
    width: calc(var(--schedule-lane-width, 100%) - 8px) !important;
    right: auto;
  }
  html:root body.student-schedule-page .timetable-event-block:hover {
    border-color: #c5d0e2 !important;
    border-left-color: var(--tt-c) !important;
    background: #fbfcfe !important;
    transition-duration: var(--tt-quick);
  }
  html:root body.student-schedule-page .timetable-event-block:focus-visible,
html:root body.student-schedule-page .timetable-event-block.is-selected {
    outline: 2px solid var(--tt-blue) !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
  }
  html:root body.student-schedule-page .timetable-event-block-time {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    color: var(--tt-c) !important;
    font-variant-numeric: tabular-nums;
  }
  html:root body.student-schedule-page .timetable-event-block-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    line-height: 1.25 !important;
    color: var(--tt-ink) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    white-space: normal !important;
    height: auto !important;
  }
  html:root body.student-schedule-page .timetable-event-block-meta {
    font-size: 11.5px !important;
    font-weight: 400 !important;
    color: var(--tt-slate) !important;
    line-height: 1.35 !important;
  }
  /* Short sessions set on one line; the full title is in the drawer. */
  html:root body.student-schedule-page .timetable-event-block.is-short {
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 2px 8px 2px 8px !important;
    min-height: 24px;
  }
  html:root body.student-schedule-page .timetable-event-block.is-short .timetable-event-block-time {
    flex: none;
    width: auto !important;
  }
  html:root body.student-schedule-page .timetable-event-block.is-short .timetable-event-block-header {
    min-width: 0;
    flex: 1;
  }
  html:root body.student-schedule-page .timetable-event-block.is-short .timetable-event-block-title {
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 12px !important;
  }
  html:root body.student-schedule-page .timetable-event-block.is-short .timetable-event-block-meta,
html:root body.student-schedule-page .timetable-event-block.is-short .timetable-event-tick {
    display: none !important;
  }
  /* Mandatory: the legend's hatch, as a small corner mark. */
  html:root body.student-schedule-page .timetable-event-block--mandatory::after {
    content: "" !important;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: repeating-linear-gradient(135deg, var(--tt-amber) 0 1.5px, transparent 1.5px 4px) !important;
    opacity: 1 !important;
    inset: auto 6px auto auto !important;
    pointer-events: none;
  }
  html:root body.student-schedule-page .timetable-event-block--mandatory {
    background-image: none !important;
  }
  html:root body.student-schedule-page .timetable-event-block.is-cancelled {
    border-left-style: dashed !important;
    background: var(--tt-paper) !important;
    opacity: 1 !important;
  }
  html:root body.student-schedule-page .timetable-event-block.is-cancelled .timetable-event-block-title {
    text-decoration: line-through !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .timetable-event-tick {
    background: transparent !important;
    color: var(--tt-green-ink) !important;
    font-weight: 700 !important;
    top: 5px !important;
    right: 18px !important;
    box-shadow: none !important;
  }
  html:root body.student-schedule-page .timetable-nowline {
    height: 1.5px !important;
    background: var(--tt-ink) !important;
    box-shadow: none !important;
    left: 0 !important;
    width: 100% !important;
  }
  html:root body.student-schedule-page .timetable-nowline span {
    background: var(--tt-ink) !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-variant-numeric: tabular-nums;
  }

  /* ---- Day list (T1): rows on hairlines, B3.2's time stack ---- */
  html:root body.student-schedule-page .schedule-week-grid:not(.schedule-week-grid--message) {
    gap: 0 !important;
    margin: 0 !important;
  }
  html:root body.student-schedule-page .schedule-day-card {
    border: 0 !important;
    border-bottom: 1px solid var(--tt-rule) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
  }
  html:root body.student-schedule-page .schedule-day-header {
    width: 148px !important;
    padding: 16px 8px 16px 0 !important;
    background: transparent !important;
    border: 0 !important;
  }
  html:root body.student-schedule-page .schedule-day-label {
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    color: var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .schedule-day-card.is-today .schedule-day-label {
    color: var(--tt-blue) !important;
  }
  html:root body.student-schedule-page .schedule-day-count {
    font-size: 12.5px !important;
    font-weight: 400 !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .schedule-day-events {
    padding: 12px 0 12px 8px !important;
    gap: 8px !important;
  }
  html:root body.student-schedule-page .schedule-day-empty {
    padding: 6px 0 !important;
    font-size: 13px !important;
    color: var(--tt-mist) !important;
  }
  html:root body.student-schedule-page .schedule-event {
    border: 1px solid var(--tt-rule) !important;
    border-radius: 8px !important;
    background: #fff !important;
    padding: 10px 12px !important;
    box-shadow: none !important;
    transition: border-color var(--tt-base) var(--tt-ease), background-color var(--tt-base) var(--tt-ease);
  }
  html:root body.student-schedule-page .schedule-event:hover {
    border-color: #c5d0e2 !important;
    background: #fbfcfe !important;
    transition-duration: var(--tt-quick);
  }
  html:root body.student-schedule-page .schedule-event:focus-visible,
html:root body.student-schedule-page .schedule-event.is-selected {
    outline: 2px solid var(--tt-blue) !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
  }
  html:root body.student-schedule-page .schedule-event-start {
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    color: var(--tt-ink) !important;
    font-variant-numeric: tabular-nums;
  }
  html:root body.student-schedule-page .schedule-event-end {
    font-size: 12.5px !important;
    font-weight: 400 !important;
    color: var(--tt-slate) !important;
    font-variant-numeric: tabular-nums;
  }
  html:root body.student-schedule-page .schedule-event-title {
    font-size: 14.5px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    color: var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .schedule-event-meta {
    font-size: 13px !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .schedule-chip {
    font-size: 10.5px !important;
    letter-spacing: 0.06em !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    background: var(--tt-soft) !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .schedule-chip--mandatory {
    background: var(--tt-amber-tint) !important;
    color: var(--tt-amber-ink) !important;
  }
  html:root body.student-schedule-page .schedule-chip--cancelled {
    background: #fdecea !important;
    color: #9b2f25 !important;
  }
  html:root body.student-schedule-page .schedule-event.is-cancelled .schedule-event-title {
    text-decoration: line-through !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .schedule-event-chevron {
    color: var(--tt-mist) !important;
  }

  /* ---- Event drawer ---- */
  html:root body.student-schedule-page .schedule-detail-panel {
    box-shadow: -12px 0 40px -16px rgba(16, 26, 46, 0.22) !important;
    border-left-color: var(--tt-rule) !important;
  }
  html:root body.student-schedule-page .schedule-detail-header {
    padding: 22px 24px 18px !important;
    border-bottom: 1px solid var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .schedule-detail-label {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 0 8px !important;
    border-radius: 0 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.14em !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .schedule-detail--mandatory .schedule-detail-label {
    color: var(--tt-amber-ink) !important;
  }
  html:root body.student-schedule-page .schedule-detail--cancelled .schedule-detail-label {
    color: #9b2f25 !important;
  }
  html:root body.student-schedule-page .schedule-detail-header h2 {
    font-size: 21px !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
    text-wrap: balance;
  }
  html:root body.student-schedule-page .schedule-detail-sub {
    font-size: 13.5px !important;
    margin-top: 6px !important;
    font-variant-numeric: tabular-nums;
  }
  html:root body.student-schedule-page .schedule-detail-close {
    top: 18px !important;
    right: 18px !important;
    border-color: var(--tt-rule) !important;
    transition: background-color var(--tt-base) var(--tt-ease);
  }
  html:root body.student-schedule-page .schedule-detail-body {
    padding: 18px 24px 24px !important;
  }
  html:root body.student-schedule-page .schedule-detail-section-title {
    font-size: 12px !important;
    letter-spacing: 0.14em !important;
    color: var(--tt-ink) !important;
    margin-bottom: 4px !important;
  }
  html:root body.student-schedule-page .schedule-detail-row {
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--tt-soft);
    gap: 16px !important;
  }
  html:root body.student-schedule-page .schedule-detail-key {
    font-size: 11.5px !important;
    letter-spacing: 0.08em !important;
    color: var(--tt-slate) !important;
    min-width: 84px;
  }
  html:root body.student-schedule-page .schedule-detail-value {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--tt-ink) !important;
    overflow-wrap: anywhere;
  }
  html:root body.student-schedule-page .schedule-detail-badges .badge {
    border-radius: 4px !important;
    font-size: 11px !important;
    letter-spacing: 0.04em !important;
  }
  html:root body.student-schedule-page .schedule-detail-panel .btn.primary,
html:root body.student-schedule-page .schedule-checkin-btn {
    background: var(--tt-navy) !important;
    border-color: var(--tt-navy) !important;
    color: #fff !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }
  html:root body.student-schedule-page .schedule-detail-panel .btn.primary:hover,
html:root body.student-schedule-page .schedule-checkin-btn:hover {
    background: #12489e !important;
    border-color: #12489e !important;
  }
  html:root body.student-schedule-page .schedule-detail-panel .btn.ghost {
    border: 1px solid var(--tt-rule) !important;
    border-radius: 8px !important;
    color: var(--tt-ink) !important;
    background: #fff !important;
  }

  /* ---- Key dates: a list on hairlines, no card ---- */
  html:root body.student-schedule-page .schedule-key-dates {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
  }
  html:root body.student-schedule-page .schedule-key-dates-intro {
    padding: 4px 0 18px !important;
    border-bottom: 1px solid var(--tt-ink);
  }
  html:root body.student-schedule-page .schedule-key-dates-kicker {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.14em !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page #schedule-key-dates-heading {
    font-size: 26px !important;
    letter-spacing: -0.025em !important;
    color: var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .schedule-key-date-row {
    padding: 16px 0 !important;
    min-height: 0 !important;
    border-bottom: 1px solid var(--tt-rule);
  }
  html:root body.student-schedule-page .schedule-key-date-icon {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    grid-template-columns: 30px !important;
  }
}

/* ==========================================================================
   Phones (<=768px): the content under the pill, never the pill or the tabs
   ========================================================================== */
@media (max-width: 768px) {
  /* The phone already has its own week control; the desktop toolbar's
     duplicate week heading and Previous/Today/Next retire. The view
     toggle stays. */
  html:root body.student-schedule-page .schedule-header-row > .pf-toolbar-group:first-child,
html:root body.student-schedule-page .schedule-view-label {
    display: none !important;
  }
  html:root body.student-schedule-page .schedule-header-row {
    margin: 2px 0 10px !important;
  }
  html:root body.student-schedule-page .roster-toggle {
    background: #fff !important;
    border: 1px solid var(--tt-rule) !important;
    border-radius: 8px !important;
    padding: 2px !important;
    box-shadow: none !important;
  }
  html:root body.student-schedule-page .roster-toggle-btn {
    border-radius: 6px !important;
    padding: 0 12px !important;
    min-height: 32px !important;
    font-size: 13px !important;
    color: var(--tt-slate) !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  html:root body.student-schedule-page .roster-toggle-btn.is-active,
html:root body.student-schedule-page .roster-toggle-btn[aria-pressed="true"] {
    background: var(--tt-blue-tint) !important;
    color: var(--tt-blue-deep) !important;
  }
  html:root body.student-schedule-page .tt-weekbar {
    margin: 0 0 8px !important;
  }
  html:root body.student-schedule-page .tt-legend {
    display: none !important;
  }
  html:root body.student-schedule-page #schedule-week-summary {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--tt-slate) !important;
  }

  /* Week control: hairline, no shadow. */
  html:root body.student-schedule-page .pt-weekgroup,
html:root body.student-schedule-page .pt-today {
    border: 1px solid var(--tt-rule) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    min-height: 42px !important;
    height: 42px !important;
  }
  html:root body.student-schedule-page .pt-weeknav {
    min-height: 40px !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .pt-weeklabel {
    min-height: 40px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    color: var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .pt-today {
    color: var(--tt-blue-deep) !important;
    font-size: 13px !important;
  }
  /* Day strip: weekday as a small label, the date as the number. */
  html:root body.student-schedule-page .pt-dow {
    font-size: 10.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .pt-num {
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    color: var(--tt-ink) !important;
    font-variant-numeric: tabular-nums;
  }
  html:root body.student-schedule-page .pt-daycell.is-today .pt-num,
html:root body.student-schedule-page .pt-daycell.is-today .pt-dow {
    color: var(--tt-blue) !important;
  }
  html:root body.student-schedule-page .pt-daycell.is-selected .pt-num {
    background: var(--tt-blue) !important;
    color: #fff !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center !important;
    box-shadow: none !important;
  }
  html:root body.student-schedule-page .pt-daycell.is-out .pt-num {
    color: var(--tt-mist) !important;
  }
  /* Selected day: heading and rows on hairlines. */
  html:root body.student-schedule-page .pt-dayhead h2 {
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    color: var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .pt-daycount {
    font-size: 12.5px !important;
    font-weight: 400 !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .pt-dayhead {
    border-bottom: 1px solid var(--tt-ink) !important;
    padding-bottom: 10px !important;
    flex-wrap: wrap;
  }
  html:root body.student-schedule-page .pt-daybody {
    gap: 0 !important;
  }
  html:root body.student-schedule-page .pt-card {
    border: 0 !important;
    border-bottom: 1px solid var(--tt-rule) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 14px 0 !important;
    gap: 12px !important;
  }
  html:root body.student-schedule-page .pt-card:active {
    background: var(--tt-soft) !important;
  }
  html:root body.student-schedule-page .pt-card-spine {
    display: none !important;
  }
  html:root body.student-schedule-page .pt-card-time {
    min-width: 52px !important;
    width: 52px !important;
  }
  html:root body.student-schedule-page .pt-card-start {
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    color: var(--tt-ink) !important;
    font-variant-numeric: tabular-nums;
  }
  html:root body.student-schedule-page .pt-card--ward .pt-card-start { color: var(--tt-ward) !important; }
  html:root body.student-schedule-page .pt-card--clinic .pt-card-start { color: var(--tt-clinic) !important; }
  html:root body.student-schedule-page .pt-card--theatre .pt-card-start { color: var(--tt-theatre) !important; }
  html:root body.student-schedule-page .pt-card--teaching .pt-card-start { color: var(--tt-teaching) !important; }
  html:root body.student-schedule-page .pt-card-end {
    font-size: 12.5px !important;
    color: var(--tt-slate) !important;
    font-variant-numeric: tabular-nums;
  }
  html:root body.student-schedule-page .pt-card-title {
    font-size: 15.5px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    line-height: 1.25 !important;
    color: var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .pt-card.is-cancelled .pt-card-title {
    text-decoration: line-through !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .pt-card-loc {
    font-size: 13px !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .pt-chip {
    font-size: 10.5px !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
    border-radius: 4px !important;
    background: var(--tt-soft) !important;
    color: var(--tt-slate) !important;
    border: 0 !important;
  }
  html:root body.student-schedule-page .pt-chip--live {
    background: var(--tt-blue-tint) !important;
    color: var(--tt-blue-deep) !important;
  }
  html:root body.student-schedule-page .pt-chip--done {
    background: #e6f6ec !important;
    color: var(--tt-green-ink) !important;
  }
  html:root body.student-schedule-page .pt-chip--cancelled {
    background: #fdecea !important;
    color: #9b2f25 !important;
  }
  html:root body.student-schedule-page .pt-card-chev {
    color: var(--tt-mist) !important;
  }
  html:root body.student-schedule-page .pt-card-scan {
    background: var(--tt-navy) !important;
    color: #fff !important;
    border-radius: 8px !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  html:root body.student-schedule-page .pt-empty {
    border: 0 !important;
    background: transparent !important;
    padding: 28px 0 !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .pt-empty b {
    color: var(--tt-ink) !important;
    font-size: 15px !important;
  }
  /* Detail sheet: the same header rule as the drawer. */
  html:root body.student-schedule-page .schedule-detail-header {
    border-bottom: 1px solid var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .schedule-detail-label {
    background: transparent !important;
    padding: 0 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.14em !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .schedule-detail-header h2 {
    font-size: 21px !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
  }
  html:root body.student-schedule-page .schedule-detail-row {
    border-bottom: 1px solid var(--tt-soft);
  }
  html:root body.student-schedule-page .schedule-detail-key {
    font-size: 11.5px !important;
    letter-spacing: 0.08em !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .schedule-detail-value {
    font-size: 14.5px !important;
    font-weight: 500 !important;
    color: var(--tt-ink) !important;
    overflow-wrap: anywhere;
  }
  html:root body.student-schedule-page .schedule-detail-panel .btn.primary {
    background: var(--tt-navy) !important;
    border-color: var(--tt-navy) !important;
    border-radius: 8px !important;
  }

}

/* Reduced motion: the few transitions here are colour only; keep them off. */
@media (prefers-reduced-motion: reduce) {
  html:root body.student-schedule-page * {
    transition-duration: 0s !important;
  }
}

/* Forced colours: bars and blocks keep an edge; the now-line stays. */
@media (forced-colors: active) {
  html:root body.student-schedule-page .timetable-event-block {
    border: 1px solid CanvasText !important;
    forced-color-adjust: none;
  }
}

/* ==========================================================================
   Week grid and view messages
   ========================================================================== */
/* The shipped grid pins its header and body at 840px, which scrolls
   sideways at 1024px and shows two days on a phone. The columns are
   minmax(0, 1fr) already; let them take the width they have. */
html:root body.student-schedule-page .timetable-week-header,
html:root body.student-schedule-page .timetable-week-body {
  min-width: 0 !important;
  width: auto !important;
}
html:root body.student-schedule-page .timetable-week-grid {
  overflow: visible !important;
}
/* Loading, empty and error messages sit above the grid, not under it. */
@media (min-width: 769px) {
  html:root body.student-schedule-page .timetable-week-grid {
    display: flex !important;
    flex-direction: column;
  }
  html:root body.student-schedule-page .timetable-week-empty {
    order: -1;
    padding: 2px 0 16px !important;
  }
  html:root body.student-schedule-page .timetable-week-empty:not(.is-hidden) ~ .timetable-week-header {
    order: 1;
  }
  html:root body.student-schedule-page .timetable-weekday {
    border: 0 !important;
  }
  html:root body.student-schedule-page .timetable-event-block-meta {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto !important;
  }
  html:root body.student-schedule-page .schedule-day-card.is-today .schedule-day-header {
    background: transparent !important;
  }
}
html:root body.student-schedule-page .schedule-load-error {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 14px;
  color: var(--tt-ink);
}
html:root body.student-schedule-page .schedule-load-error p {
  margin: 0;
}
html:root body.student-schedule-page .schedule-retry-btn,
html:root body.student-schedule-page .schedule-upcoming-notice__go {
  background: var(--tt-navy) !important;
  border-color: var(--tt-navy) !important;
  color: #fff !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  min-height: 36px !important;
}
/* Session lists: the audience, source and "Published" chips restate what
   the row already shows; the drawer keeps every badge. */
html:root body.student-schedule-page .schedule-chip--audience,
html:root body.student-schedule-page .schedule-chip--source,
html:root body.student-schedule-page .schedule-chip--published,
html:root body.student-schedule-page .pt-chip--source,
html:root body.student-schedule-page .pt-chip--published {
  display: none !important;
}
/* No placement: the page head already says so (shipped copy); the empty
   week grid and its "No events" message are not drawn beneath it, unless the
   student has society bookings, which the week then shows. */
html:root body.student-schedule-page.schedule-no-placement:not(.schedule-has-society-bookings) .timetable-week-header,
html:root body.student-schedule-page.schedule-no-placement:not(.schedule-has-society-bookings) .timetable-week-body,
html:root body.student-schedule-page.schedule-no-placement:not(.schedule-has-society-bookings) .timetable-week-empty,
html:root body.student-schedule-page.schedule-no-placement:not(.schedule-has-society-bookings) .schedule-week-grid,
html:root body.student-schedule-page.schedule-no-placement:not(.schedule-has-society-bookings) .tt-weekbar,
html:root body.student-schedule-page.schedule-no-placement:not(.schedule-has-society-bookings) .schedule-mobile-weekbar,
html:root body.student-schedule-page.schedule-no-placement:not(.schedule-has-society-bookings) #schedule-mobile-day-selector {
  display: none !important;
}
html:root body.student-schedule-page.schedule-no-placement #schedule-placement-label {
  font-size: 16px !important;
  color: var(--tt-ink) !important;
  font-weight: 500 !important;
}

@media (max-width: 768px) {
  /* Phone cards: the time, a fluid body and the chevron; the spine's
     column stays in the template at zero width. */
  html:root body.student-schedule-page .pt-card {
    grid-template-columns: 52px 0 minmax(0, 1fr) 16px !important;
    column-gap: 10px !important;
  }
  html:root body.student-schedule-page .pt-card-spine {
    display: block !important;
    width: 0 !important;
    visibility: hidden;
  }
  html:root body.student-schedule-page .pt-card-body {
    min-width: 0;
  }
  html:root body.student-schedule-page .pt-chips {
    flex-wrap: wrap;
    gap: 4px 6px !important;
  }
  /* The promoted check-in card in the same language: white, a hairline,
     the navy action. */
  html:root body.student-schedule-page .pt-att {
    background: #fff !important;
    border: 1px solid var(--tt-rule) !important;
    border-radius: 10px !important;
    padding: 12px 14px 14px !important;
    box-shadow: none !important;
  }
  html:root body.student-schedule-page .pt-att-status {
    background: var(--tt-blue-tint) !important;
    color: var(--tt-blue-deep) !important;
  }
  html:root body.student-schedule-page .pt-att-mand {
    background: var(--tt-amber-tint) !important;
    color: var(--tt-amber-ink) !important;
  }
  html:root body.student-schedule-page .pt-att-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    color: var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .pt-att-meta,
html:root body.student-schedule-page .pt-att-say,
html:root body.student-schedule-page .pt-att-foot {
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .pt-att-btn {
    background: var(--tt-navy) !important;
    color: #fff !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }
  /* T1 phone Week: all seven days across, sessions as bars with their
     start time; tap a bar for the sheet. */
  html:root body.student-schedule-page .timetable-week-grid {
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
  }
  html:root body.student-schedule-page .timetable-week-header,
html:root body.student-schedule-page .timetable-week-body {
    grid-template-columns: 36px minmax(0, 1fr) !important;
    gap: 0 !important;
  }
  html:root body.student-schedule-page .timetable-week-header {
    margin: 0 !important;
    border-bottom: 1px solid var(--tt-rule);
  }
  html:root body.student-schedule-page .timetable-week-days,
html:root body.student-schedule-page .timetable-week-columns {
    display: flex !important;
    gap: 0 !important;
    min-width: 0 !important;
    width: auto !important;
  }
  html:root body.student-schedule-page .timetable-weekday,
html:root body.student-schedule-page .timetable-day-column {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
  }
  html:root body.student-schedule-page .timetable-weekend-rail,
html:root body.student-schedule-page .timetable-weekend-railhead {
    display: none !important;
  }
  html:root body.student-schedule-page .timetable-weekday {
    padding: 0 2px 8px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-align: center;
  }
  html:root body.student-schedule-page .timetable-weekday.is-today {
    box-shadow: inset 0 -2px 0 var(--tt-blue) !important;
  }
  html:root body.student-schedule-page .timetable-weekday-name {
    font-size: 9.5px !important;
    letter-spacing: 0.08em !important;
    color: var(--tt-slate) !important;
  }
  html:root body.student-schedule-page .timetable-weekday-date {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .timetable-weekday.is-today .timetable-weekday-name,
html:root body.student-schedule-page .timetable-weekday.is-today .timetable-weekday-date {
    color: var(--tt-blue) !important;
  }
  html:root body.student-schedule-page .timetable-time-axis {
    padding: 0 6px 0 0 !important;
  }
  html:root body.student-schedule-page .timetable-time-label {
    font-size: 9.5px !important;
    color: var(--tt-slate) !important;
    text-align: right;
    transform: translateY(-6px);
  }
  html:root body.student-schedule-page .timetable-day-column {
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: repeating-linear-gradient(to bottom, var(--tt-soft) 0 1px, transparent 1px var(--timetable-hour-height, 48px)) !important;
    border-left: 1px solid var(--tt-soft) !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  html:root body.student-schedule-page .timetable-day-column.is-today {
    background-color: #fafbfd !important;
  }
  html:root body.student-schedule-page .timetable-event-block {
    --tt-c: var(--tt-slate);
    --tt-t: var(--tt-soft);
    left: 2px !important;
    right: 2px !important;
    width: auto !important;
    padding: 3px 3px 3px 5px !important;
    border: 0 !important;
    border-left: 2px solid var(--tt-c) !important;
    border-radius: 3px !important;
    background: var(--tt-t) !important;
    box-shadow: none !important;
    overflow: hidden !important;
    display: block !important;
  }
  html:root body.student-schedule-page .timetable-event-block--ward { --tt-c: var(--tt-ward); --tt-t: #e4dcff; }
  html:root body.student-schedule-page .timetable-event-block--clinic { --tt-c: var(--tt-clinic); --tt-t: #cdeee8; }
  html:root body.student-schedule-page .timetable-event-block--theatre { --tt-c: var(--tt-theatre); --tt-t: #fbd9d5; }
  html:root body.student-schedule-page .timetable-event-block--teaching { --tt-c: var(--tt-teaching); --tt-t: #d6e6fa; }
  html:root body.student-schedule-page .timetable-event-block--overlap {
    left: calc(var(--schedule-lane-left, 0%) + 2px) !important;
    width: calc(var(--schedule-lane-width, 100%) - 4px) !important;
    right: auto !important;
  }
  html:root body.student-schedule-page .timetable-event-block-time {
    font-size: 9.5px !important;
    font-weight: 600 !important;
    color: var(--tt-c) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0 !important;
  }
  html:root body.student-schedule-page .timetable-event-block-header,
html:root body.student-schedule-page .timetable-event-block-meta,
html:root body.student-schedule-page .timetable-event-block-tick,
html:root body.student-schedule-page .timetable-event-block--mandatory::after {
    display: none !important;
  }
  html:root body.student-schedule-page .timetable-event-block.is-cancelled {
    background: repeating-linear-gradient(135deg, var(--tt-mist) 0 2px, transparent 2px 5px) !important;
    border-left-style: dashed !important;
  }
  html:root body.student-schedule-page .timetable-event-block.is-selected,
html:root body.student-schedule-page .timetable-event-block:focus-visible {
    outline: 2px solid var(--tt-blue) !important;
    outline-offset: 1px;
  }
  html:root body.student-schedule-page .timetable-nowline {
    height: 1.5px !important;
    background: var(--tt-ink) !important;
    box-shadow: none !important;
  }
  html:root body.student-schedule-page .timetable-nowline span {
    display: none !important;
  }
  html:root body.student-schedule-page .timetable-week-empty {
    border: 0 !important;
    background: transparent !important;
    padding: 12px 0 !important;
    color: var(--tt-slate) !important;
  }
}

/* ==========================================================================
   Hidden views, phone Week, no placement
   ========================================================================== */
/* A hidden view stays hidden, whatever display the layout gives it. */
html:root body.student-schedule-page .timetable-week-grid[hidden],
html:root body.student-schedule-page .timetable-week-grid.is-hidden,
html:root body.student-schedule-page .schedule-week-grid[hidden],
html:root body.student-schedule-page .schedule-week-grid.is-hidden {
  display: none !important;
}
/* While the grid carries a message (loading, no sessions, could not load),
   the message is the view; the empty frame is not drawn under it. */
html:root body.student-schedule-page .timetable-week-grid:has(> .timetable-week-empty:not(.is-hidden)) .timetable-week-header,
html:root body.student-schedule-page .timetable-week-grid:has(> .timetable-week-empty:not(.is-hidden)) .timetable-week-body {
  display: none !important;
}
@media (min-width: 769px) {
  html:root body.student-schedule-page .timetable-week-empty {
    padding: 18px 0 !important;
    font-size: 15px !important;
    color: var(--tt-ink) !important;
  }
  /* Rows: a short session's label has the width it needs beside the bar. */

  
  /* Checked in: a tick in the bar, never a chip over the label. */

  

  

  
}
@media (max-width: 768px) {
  /* Phone Week (T1): the start time alone fits a narrow column. */
  html:root body.student-schedule-page .timetable-event-block-time {
    width: 5ch !important;
    max-width: 100%;
    text-overflow: clip !important;
  }
  html:root body.student-schedule-page .timetable-event-tick {
    display: none !important;
  }
  html:root body.student-schedule-page .timetable-event-block.is-cancelled {
    background: repeating-linear-gradient(135deg, #d4dbe6 0 1px, var(--tt-soft) 1px 6px) !important;
  }
}

/* ==========================================================================
   Round-three fixes
   ========================================================================== */

@media (max-width: 768px) {
  html:root body.student-schedule-page .timetable-event-block-time {
    width: 4.7ch !important;
  }
}

/* No placement: outranks the shipped grid display rules (unless the student
   has society bookings, which the week then shows). */
html:root body.student-schedule-page.schedule-no-placement:not(.schedule-has-society-bookings) #schedule-card .schedule-week-grid,
html:root body.student-schedule-page.schedule-no-placement:not(.schedule-has-society-bookings) #schedule-card .timetable-week-grid {
  display: none !important;
}

/* ==========================================================================
   Date navigation: the week as a date control, the month sheet as a
   popover with year and month jumps, Key dates rows
   ========================================================================== */
html:root {
  --tt-bar: 66px;
  --tt-teal: #0d9488;
  --tt-teal-ink: #08766d;
}

/* ---- The desktop date control: ‹ 12 – 18 Oct 2026 ▾ ›  Today ---- */
@media (min-width: 769px) {
  html:root body.student-schedule-page .schedule-header-row > .pf-toolbar-group:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
  /* The heading stays for assistive technology; the control carries the week.
     In Key dates the heading is the title again and the control rests. */
  html:root body.student-schedule-page:not(.schedule-key-dates-mode) #schedule-week-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }
  html:root body.student-schedule-page.schedule-key-dates-mode .tt-datenav {
    display: none !important;
  }
  html:root body.student-schedule-page #schedule-view-subtitle {
    font-size: 12.5px !important;
    margin-top: 0 !important;
  }
  html:root body.student-schedule-page .tt-datenav {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  html:root body.student-schedule-page .tt-datestep {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 2px;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--tt-rule);
    border-radius: 8px;
  }
  html:root body.student-schedule-page .tt-datestep .btn,
html:root body.student-schedule-page .tt-datenav #schedule-today-week {
    display: inline-grid !important;
    place-items: center !important;
    width: 30px;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--tt-slate) !important;
    transition: background-color var(--tt-quick) var(--tt-ease), color var(--tt-quick) var(--tt-ease);
  }
  html:root body.student-schedule-page .tt-datestep .btn svg {
    width: 16px;
    height: 16px;
  }
  html:root body.student-schedule-page .tt-datebtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 8px 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--tt-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--tt-quick) var(--tt-ease);
  }
  html:root body.student-schedule-page .tt-datebtn svg {
    width: 14px;
    height: 14px;
    color: var(--tt-slate);
    transition: transform var(--tt-base) var(--tt-ease);
  }
  html:root body.student-schedule-page .tt-datebtn[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }
  html:root body.student-schedule-page .tt-datestep .btn:hover,
html:root body.student-schedule-page .tt-datebtn:hover,
html:root body.student-schedule-page .tt-datenav #schedule-today-week:hover {
    background: var(--tt-soft) !important;
    color: var(--tt-ink) !important;
  }
  html:root body.student-schedule-page .tt-datebtn[aria-expanded="true"] {
    background: var(--tt-blue-tint);
    color: var(--tt-blue-deep);
  }
  html:root body.student-schedule-page .tt-datenav #schedule-today-week {
    width: auto;
    padding: 0 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--tt-blue-deep) !important;
  }
  /* Already on today: the button says so by resting. */
  html:root body.student-schedule-page .tt-datenav #schedule-today-week.is-current {
    color: var(--tt-mist) !important;
  }
  html:root body.student-schedule-page .tt-datestep .btn:focus-visible,
html:root body.student-schedule-page .tt-datebtn:focus-visible,
html:root body.student-schedule-page .tt-datenav #schedule-today-week:focus-visible {
    outline: 2px solid var(--tt-blue) !important;
    outline-offset: 1px !important;
  }

  /* ---- The month picker as a popover under the date control ---- */
  /* The sheet is the card's sibling inside the layout: that is the box the
     popover is placed in. */
  html:root body.student-schedule-page #schedule-layout {
    position: relative !important;
  }
  html:root body.student-schedule-page .pt-sheet-scrim:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 59;
    background: transparent;
  }
  html:root body.student-schedule-page .pt-sheet:not([hidden]) {
    display: block;
    position: absolute;
    left: 0;
    top: 64px;
    z-index: 60;
    width: 372px;
    padding: 12px 14px 14px;
    background: #fff;
    border: 1px solid var(--tt-rule);
    border-radius: 12px;
    box-shadow: 0 16px 36px -14px rgba(8, 31, 71, 0.28), 0 2px 6px rgba(8, 31, 71, 0.06);
    animation: tt-pop var(--tt-base) var(--tt-ease);
  }
  @keyframes tt-pop {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
  }
  html:root body.student-schedule-page .pt-sheet-grab {
    display: none;
  }
  html:root body.student-schedule-page .pt-sheet-head {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 0 10px;
  }
  html:root body.student-schedule-page .pt-sheet-head > b {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--tt-ink);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  html:root body.student-schedule-page .pt-sheet-nav {
    display: flex;
    align-items: center;
    gap: 2px;
  }
  html:root body.student-schedule-page .pt-sheet-nav .pt-weeknav--bare,
html:root body.student-schedule-page .pt-sheet-nav .pt-today {
    display: inline-grid;
    place-items: center;
    height: 30px;
    min-width: 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--tt-slate);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  html:root body.student-schedule-page .pt-sheet-nav .pt-weeknav--bare svg {
    width: 16px;
    height: 16px;
  }
  html:root body.student-schedule-page .pt-sheet-nav .pt-today {
    padding: 0 10px;
    color: var(--tt-blue-deep);
  }
  html:root body.student-schedule-page .pt-sheet-nav .pt-weeknav--bare:hover,
html:root body.student-schedule-page .pt-sheet-nav .pt-today:hover {
    background: var(--tt-soft);
    color: var(--tt-ink);
  }
  html:root body.student-schedule-page .pt-sheet-dow,
html:root body.student-schedule-page .pt-sheet-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  html:root body.student-schedule-page .pt-sheet-dow {
    padding: 6px 0 4px;
  }
  html:root body.student-schedule-page .pt-sheet-dow span {
    color: var(--tt-mist);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-align: center;
  }
  html:root body.student-schedule-page .pt-mcell {
    position: relative;
    min-width: 0;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    color: var(--tt-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
  }
  html:root body.student-schedule-page .pt-mcell:hover {
    background: var(--tt-soft);
  }
  html:root body.student-schedule-page .pt-mcell.is-dim {
    color: #c1c9d6;
  }
  html:root body.student-schedule-page .pt-mcell.is-out {
    opacity: 0.45;
  }
  html:root body.student-schedule-page .pt-mdots {
    height: 4px;
    display: flex;
    gap: 2px;
  }
  html:root body.student-schedule-page .pt-mdots .pt-dot {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
  }
  html:root body.student-schedule-page .pt-mdots .pt-dot--ward { background: var(--tt-ward); }
  html:root body.student-schedule-page .pt-mdots .pt-dot--clinic { background: var(--tt-clinic); }
  html:root body.student-schedule-page .pt-mdots .pt-dot--theatre { background: var(--tt-theatre); }
  html:root body.student-schedule-page .pt-mdots .pt-dot--teaching { background: var(--tt-teaching); }
  html:root body.student-schedule-page .pt-mdots .pt-dot--default { background: var(--tt-mist); }
}

/* Shared picker language (both widths): today, the viewed week, the
   selected day are three different things; key dates are marked. */
html:root body.student-schedule-page .pt-mcell.is-viewed {
  background: var(--tt-blue-tint);
  border-radius: 0;
}
html:root body.student-schedule-page .pt-mcell.is-viewed:nth-child(7n + 1) {
  border-radius: 8px 0 0 8px;
}
html:root body.student-schedule-page .pt-mcell.is-viewed:nth-child(7n) {
  border-radius: 0 8px 8px 0;
}
html:root body.student-schedule-page .pt-mcell.is-today {
  color: var(--tt-blue-deep);
  box-shadow: inset 0 0 0 1.5px var(--tt-blue);
}
html:root body.student-schedule-page .pt-mcell.is-selected,
html:root body.student-schedule-page .pt-mcell.is-selected.is-viewed {
  background: var(--tt-blue);
  color: #fff;
  border-radius: 8px;
  box-shadow: none;
}
html:root body.student-schedule-page .pt-mcell.is-selected .pt-mdots .pt-dot {
  background: rgba(255, 255, 255, 0.85);
}
html:root body.student-schedule-page .pt-mcell:focus-visible {
  outline: 2px solid var(--tt-blue);
  outline-offset: -2px;
  z-index: 1;
}
html:root body.student-schedule-page .tt-kmark {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--tt-amber);
  transform: rotate(45deg);
}
html:root body.student-schedule-page .pt-mcell.is-selected .tt-kmark {
  background: #fff;
}
html:root body.student-schedule-page .tt-ym {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  margin: 0 0 6px;
  border-top: 1px solid var(--tt-rule);
  border-bottom: 1px solid var(--tt-rule);
}
html:root body.student-schedule-page .tt-ym-year {
  display: flex;
  align-items: center;
  gap: 2px;
}
html:root body.student-schedule-page .tt-ym-y {
  min-width: 42px;
  text-align: center;
  color: var(--tt-ink);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
html:root body.student-schedule-page .tt-ym-step,
html:root body.student-schedule-page .tt-ym-m {
  display: inline-grid;
  place-items: center;
  min-width: 0;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--tt-slate);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--tt-quick) var(--tt-ease), color var(--tt-quick) var(--tt-ease);
}
html:root body.student-schedule-page .tt-ym-step svg {
  width: 14px;
  height: 14px;
}
html:root body.student-schedule-page .tt-ym-months {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2px;
}
html:root body.student-schedule-page .tt-ym-step {
  min-width: 26px;
}
html:root body.student-schedule-page .tt-ym-m.is-outside {
  color: var(--tt-mist);
}
html:root body.student-schedule-page .tt-ym-step:hover,
html:root body.student-schedule-page .tt-ym-m:hover {
  background: var(--tt-soft);
  color: var(--tt-ink);
}
html:root body.student-schedule-page .tt-ym-m[aria-pressed="true"] {
  background: var(--tt-blue-tint);
  color: var(--tt-blue-deep);
}
html:root body.student-schedule-page .tt-ym-step:focus-visible,
html:root body.student-schedule-page .tt-ym-m:focus-visible,
html:root body.student-schedule-page .tt-kd-row:focus-visible,
html:root body.student-schedule-page .tt-kd-all:focus-visible {
  outline: 2px solid var(--tt-blue);
  outline-offset: 1px;
}
html:root body.student-schedule-page .tt-kd-month {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--tt-rule);
}
html:root body.student-schedule-page .tt-kd-month > b {
  margin: 0 0 4px;
  color: var(--tt-slate);
  font-size: 11.5px;
  font-weight: 600;
}
html:root body.student-schedule-page .tt-kd-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 10px;
  align-items: baseline;
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--tt-ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
html:root body.student-schedule-page .tt-kd-row:hover {
  background: var(--tt-soft);
}
html:root body.student-schedule-page .tt-kd-row time {
  color: var(--tt-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html:root body.student-schedule-page .tt-kd-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html:root body.student-schedule-page .tt-kd-row small {
  grid-column: 2;
  color: var(--tt-slate);
  font-size: 11.5px;
}
html:root body.student-schedule-page .tt-kd-more {
  padding: 2px 6px;
  color: var(--tt-mist);
  font-size: 11.5px;
}
html:root body.student-schedule-page .tt-kd-all {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--tt-blue-deep);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
html:root body.student-schedule-page .tt-kd-all:hover {
  background: var(--tt-blue-tint);
}
html:root body.student-schedule-page .pt-sheet-foot {
  margin: 10px 0 0;
  color: var(--tt-mist);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
}

/* ---- The selected day in the week (desktop) ---- */
@media (min-width: 769px) {
  html:root body.student-schedule-page .schedule-day-card.is-selected .schedule-day-header {
    box-shadow: inset 0 2px 0 var(--tt-blue);
  }
  html:root body.student-schedule-page .schedule-day-card.is-selected .schedule-day-label {
    color: var(--tt-blue-deep) !important;
  }
  html:root body.student-schedule-page .timetable-weekday.is-selected {
    color: var(--tt-blue-deep) !important;
  }
  html:root body.student-schedule-page .timetable-day-column.is-selected {
    background: var(--tt-paper) !important;
  }
  html:root body.student-schedule-page .schedule-day-card,
html:root body.student-schedule-page .timetable-day-column {
    scroll-margin-top: 16px;
  }
}

/* ---- Key dates: the year's dates under their months ---- */
/* The intro repeated the page title and the tab; the heading stays for the
   list's accessible name, the rail carries the year. */
html:root body.student-schedule-page .schedule-key-dates-intro {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}
html:root body.student-schedule-page .tt-kd-months {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 0 10px;
  margin: 0 0 2px;
  background: #fff;
  border-bottom: 1px solid var(--tt-ink);
}
html:root body.student-schedule-page .tt-kd-months > b {
  margin-right: 12px;
  color: var(--tt-ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
html:root body.student-schedule-page .tt-kd-yr {
  margin: 0 4px 0 8px;
  color: var(--tt-mist);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
html:root body.student-schedule-page .tt-kd-yr:first-of-type {
  margin-left: 0;
}
html:root body.student-schedule-page .tt-kd-jump {
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--tt-slate);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--tt-quick) var(--tt-ease), color var(--tt-quick) var(--tt-ease);
}
html:root body.student-schedule-page .tt-kd-jump:hover {
  background: var(--tt-soft);
  color: var(--tt-ink);
}
html:root body.student-schedule-page .tt-kd-jump.is-now {
  color: var(--tt-blue-deep);
  box-shadow: inset 0 -2px 0 var(--tt-blue);
  border-radius: 6px 6px 0 0;
}
html:root body.student-schedule-page .tt-kd-jump[aria-disabled="true"] {
  color: #c1c9d6;
  cursor: default;
}
html:root body.student-schedule-page .tt-kd-jump:focus-visible {
  outline: 2px solid var(--tt-blue);
  outline-offset: 1px;
}
html:root body.student-schedule-page .schedule-key-date-item {
  position: relative;
  box-shadow: none !important;
  scroll-margin-top: 12px;
}
html:root body.student-schedule-page .schedule-key-date-item + .schedule-key-date-item {
  border-top: 0 !important;
}

/* The current (teal) and next (blue) period keep their mark, in the gutter
   beside the row: it can cross nothing in the row, not the focus ring either. */
html:root body.student-schedule-page .schedule-key-date-item.is-current::after,
html:root body.student-schedule-page .schedule-key-date-item.is-next::after {
  content: "";
  position: absolute;
  left: -16px;
  top: 0;
  bottom: 1px;
  width: 3px;
  border-radius: 2px;
  background: var(--tt-teal);
}
html:root body.student-schedule-page .schedule-key-date-item.is-next::after {
  background: var(--tt-blue);
}

html:root body.student-schedule-page .schedule-key-date-row {
  grid-template-columns: 168px minmax(0, 1fr) auto 24px !important;
  gap: 16px !important;
  padding: 14px 0 !important;
  align-items: center !important;
}
html:root body.student-schedule-page .schedule-key-date-row:hover {
  background: transparent !important;
}
html:root body.student-schedule-page .schedule-key-date-row:hover .schedule-key-date-event strong {
  color: var(--tt-blue-deep);
}
/* Dates first: they are what the page is scanned for. */
html:root body.student-schedule-page .schedule-key-date-range {
  order: -1;
  color: var(--tt-ink) !important;
  font-size: 14px !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: left !important;
  white-space: nowrap;
}
html:root body.student-schedule-page .schedule-key-date-type {
  order: 1;
  justify-self: end;
  color: var(--tt-mist) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  white-space: nowrap;
}
/* One calendar glyph on every row says nothing a row does not. */
html:root body.student-schedule-page .schedule-key-date-icon {
  display: none !important;
}
html:root body.student-schedule-page .schedule-key-date-chevron {
  order: 2;
}
html:root body.student-schedule-page .schedule-key-date-event strong {
  font-size: 14.5px !important;
  font-weight: 600 !important;
}
html:root body.student-schedule-page .schedule-key-date-event-title {
  gap: 0 !important;
}
html:root body.student-schedule-page .schedule-key-date-event-title > strong {
  margin-right: 10px;
}
/* Qualifications as text, not chips: mode and time quiet, a review state
   kept in its own colour and weight. */
html:root body.student-schedule-page .schedule-key-date-tag {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--tt-slate) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}
html:root body.student-schedule-page .schedule-key-date-tag + .schedule-key-date-tag::before,
html:root body.student-schedule-page .schedule-key-date-tag + .schedule-key-date-status::before {
  content: "·";
  margin: 0 6px;
  color: var(--tt-mist);
}
html:root body.student-schedule-page .schedule-key-date-tag.tt-tag-review {
  color: var(--tt-amber-ink) !important;
  font-weight: 600 !important;
}
html:root body.student-schedule-page .schedule-key-date-status {
  padding: 0 !important;
  background: transparent !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
}
html:root body.student-schedule-page .schedule-key-date-status--current {
  color: var(--tt-teal-ink) !important;
}
html:root body.student-schedule-page .schedule-key-date-status--next {
  color: var(--tt-blue-deep) !important;
}
html:root body.student-schedule-page .schedule-key-date-link {
  margin: -6px 0 14px 184px !important;
}
html:root body.student-schedule-page .schedule-key-date-programme {
  padding: 2px 0 18px 184px !important;
}
html:root body.student-schedule-page .schedule-key-date-card > summary:focus-visible,
html:root body.student-schedule-page a.schedule-key-date-row:focus-visible,
html:root body.student-schedule-page .schedule-key-date-item:focus-visible {
  outline: 2px solid var(--tt-blue) !important;
  outline-offset: -2px !important;
}

/* ---- Phones ---- */
@media (max-width: 768px) {
  /* The gutter mark needs a gutter: the list indents once, for every row. */
  html:root body.student-schedule-page .schedule-key-dates {
    margin: 0 !important;
    padding: 0 16px !important;
  }
  html:root body.student-schedule-page .tt-kd-months {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 0 10px;
  }
  html:root body.student-schedule-page .tt-kd-months::-webkit-scrollbar {
    display: none;
  }
  html:root body.student-schedule-page .tt-kd-months > b {
    font-size: 13px;
  }
  html:root body.student-schedule-page .tt-kd-jump {
    flex: none;
    height: 36px;
    padding: 0 10px;
  }
  html:root body.student-schedule-page .schedule-key-date-item {
    padding-left: 14px !important;
  }

  html:root body.student-schedule-page .schedule-key-date-item.is-current::after,
html:root body.student-schedule-page .schedule-key-date-item.is-next::after {
    left: 0;
  }
  html:root body.student-schedule-page .schedule-key-date-row {
    grid-template-columns: minmax(0, 1fr) 24px !important;
    gap: 4px 10px !important;
    padding: 14px 0 !important;
    border-bottom: 1px solid var(--tt-rule);
  }
  html:root body.student-schedule-page .schedule-key-date-range,
html:root body.student-schedule-page .schedule-key-date-event,
html:root body.student-schedule-page .schedule-key-date-type {
    grid-column: 1;
    justify-self: start;
    text-align: left !important;
  }
  html:root body.student-schedule-page .schedule-key-date-range {
    order: -1;
    font-size: 13.5px !important;
  }
  html:root body.student-schedule-page .schedule-key-date-type {
    order: 1;
  }
  html:root body.student-schedule-page .schedule-key-date-chevron {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
  html:root body.student-schedule-page .schedule-key-date-link {
    margin: -6px 0 14px 14px !important;
  }
  html:root body.student-schedule-page .schedule-key-date-programme {
    padding: 2px 0 16px 14px !important;
  }

  /* The sheet's extra rows at touch size: twelve months on two rows. */
  html:root body.student-schedule-page .tt-ym {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px 6px;
  }
  html:root body.student-schedule-page .tt-ym-year {
    justify-content: center;
    gap: 8px;
  }
  html:root body.student-schedule-page .tt-ym-step {
    min-width: 40px;
    height: 40px;
  }
  html:root body.student-schedule-page .tt-ym-y {
    font-size: 14px;
  }
  html:root body.student-schedule-page .tt-ym-months {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
  }
  html:root body.student-schedule-page .tt-ym-m {
    height: 40px;
    font-size: 13px;
  }
  html:root body.student-schedule-page .tt-kd-month {
    margin: 10px 6px 0;
  }
  html:root body.student-schedule-page .tt-kd-row {
    min-height: 44px;
    font-size: 14px;
  }
  html:root body.student-schedule-page .tt-kd-all {
    min-height: 44px;
    font-size: 14px;
  }
  html:root body.student-schedule-page .pt-sheet-foot {
    text-align: center;
  }
  html:root body.student-schedule-page .tt-kmark {
    top: 4px;
    right: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:root body.student-schedule-page .pt-sheet:not([hidden]) {
    animation: none !important;
  }
  html:root body.student-schedule-page .tt-datebtn svg,
html:root body.student-schedule-page .tt-datestep .btn,
html:root body.student-schedule-page .tt-datebtn,
html:root body.student-schedule-page .tt-kd-jump,
html:root body.student-schedule-page .tt-ym-m,
html:root body.student-schedule-page .tt-ym-step {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  html:root body.student-schedule-page .schedule-key-date-item.is-current::after,
html:root body.student-schedule-page .schedule-key-date-item.is-next::after,
html:root body.student-schedule-page .tt-kmark {
    background: Highlight;
    forced-color-adjust: none;
  }
  html:root body.student-schedule-page .pt-mcell.is-selected {
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
  html:root body.student-schedule-page .pt-mcell.is-today {
    box-shadow: inset 0 0 0 2px CanvasText;
  }
  html:root body.student-schedule-page .tt-datestep,
html:root body.student-schedule-page .pt-sheet:not([hidden]) {
    border: 1px solid CanvasText;
  }
}

/* Between 769 and 900 the shipped toolbar stacks its two groups; T1's
   flex-end would set the date control on the right of the stack. */
@media (min-width: 769px) and (max-width: 900px) {
  html:root body.student-schedule-page .schedule-header-row {
    align-items: flex-start !important;
    gap: 10px !important;
  }
}

/* No placement: nothing to move between weeks (Key dates stays available
   when the account has a programme calendar), unless there are society
   bookings to move between. */
html:root body.student-schedule-page.schedule-no-placement:not(.schedule-has-society-bookings) .tt-datenav,
html:root body.student-schedule-page.schedule-no-placement #schedule-view-subtitle {
  display: none !important;
}

/* ==========================================================================
   Key dates as month sections, the expanded panel on hairlines, the
   Now / Next line, the rail that follows, short settle fades
   ========================================================================== */

/* ---- Rows: the date wraps instead of running under the title ---- */
@media (min-width: 769px) {
  html:root body.student-schedule-page .schedule-key-date-row {
    grid-template-columns: 196px minmax(0, 1fr) minmax(96px, auto) 24px !important;
    gap: 6px 18px !important;
    padding: 13px 0 !important;
    align-items: start !important;
  }
  html:root body.student-schedule-page .schedule-key-date-range {
    white-space: normal;
    line-height: 1.35;
    padding-top: 1px;
  }
  html:root body.student-schedule-page .schedule-key-date-range strong {
    display: block;
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  html:root body.student-schedule-page .schedule-key-date-type {
    padding-top: 2px;
    text-align: right;
  }
  html:root body.student-schedule-page .schedule-key-date-chevron {
    padding-top: 1px;
  }
  html:root body.student-schedule-page .schedule-key-date-event strong {
    line-height: 1.35 !important;
  }
}
html:root body.student-schedule-page .schedule-key-date-event-title {
  row-gap: 2px !important;
}
html:root body.student-schedule-page .schedule-key-date-tag {
  white-space: nowrap;
}

/* ---- Month sections: a heading each, the current month marked ---- */

html:root body.student-schedule-page .tt-kd-group {
  margin: 0;
  padding: 0;
  list-style: none;
  scroll-margin-top: calc(var(--tt-bar, 64px) + 58px);
}
html:root body.student-schedule-page .tt-kd-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
html:root body.student-schedule-page .tt-kd-head {
  position: sticky;
  top: calc(var(--tt-bar, 64px) + 49px);
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0;
  padding: 22px 0 8px;
  background: #fff;
  border-bottom: 1px solid var(--tt-ink);
  color: var(--tt-ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
html:root body.student-schedule-page .tt-kd-group:first-child .tt-kd-head {
  padding-top: 14px;
}
html:root body.student-schedule-page .tt-kd-group.is-now .tt-kd-head-name {
  color: var(--tt-blue-deep);
}
html:root body.student-schedule-page .tt-kd-count {
  color: var(--tt-mist);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
html:root body.student-schedule-page .tt-kd-cont {
  margin-left: auto;
  color: var(--tt-slate);
  font-size: 12.5px;
  font-weight: 500;
}
html:root body.student-schedule-page .tt-kd-list > .schedule-key-date-item:last-child .schedule-key-date-row {
  border-bottom: 0;
}
/* The gutter mark, measured from the section's row. */
html:root body.student-schedule-page .schedule-key-date-item.is-current::after,
html:root body.student-schedule-page .schedule-key-date-item.is-next::after {
  top: 6px;
  bottom: 7px;
}

/* ---- The rail follows; the now-line says where the student is ---- */
@media (min-width: 769px) {
  html:root body.student-schedule-page .tt-kd-months {
    position: sticky;
    top: var(--tt-bar, 64px);
    z-index: 5;
    padding: 10px 0;
    margin: 0;
  }
}
html:root body.student-schedule-page .tt-kd-jump.is-active {
  color: var(--tt-ink);
  background: var(--tt-soft);
}
html:root body.student-schedule-page .tt-kd-jump.is-now.is-active {
  color: var(--tt-blue-deep);
  background: var(--tt-blue-tint);
}
html:root body.student-schedule-page .tt-kd-now {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--tt-rule);
}
html:root body.student-schedule-page .tt-kd-now-item {
  display: grid;
  grid-template-columns: auto;
  gap: 1px;
  padding: 4px 6px;
  margin: 0 -6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--tt-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--tt-quick) var(--tt-ease);
}
html:root body.student-schedule-page .tt-kd-now-item:hover {
  background: var(--tt-soft);
}
html:root body.student-schedule-page .tt-kd-now-item:hover strong {
  color: var(--tt-blue-deep);
}
html:root body.student-schedule-page .tt-kd-now-item:focus-visible {
  outline: 2px solid var(--tt-blue);
  outline-offset: 1px;
}
html:root body.student-schedule-page .tt-kd-now-label {
  color: var(--tt-slate);
  font-size: 11.5px;
  font-weight: 600;
}
html:root body.student-schedule-page .tt-kd-now-item strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
html:root body.student-schedule-page .tt-kd-now-meta {
  color: var(--tt-slate);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* ---- The expanded panel: under the title, on hairlines, room to read ---- */
html:root body.student-schedule-page .schedule-key-date-programme {
  margin: 0 !important;
  padding: 2px 0 24px 214px !important;
  border-top: 0 !important;
  background: transparent !important;
}
html:root body.student-schedule-page .schedule-key-date-card[open] > .schedule-key-date-programme,
html:root body.student-schedule-page .schedule-key-date-card[open] > .schedule-course-resources {
  animation: tt-settle var(--tt-base) var(--tt-ease);
}
html:root body.student-schedule-page .schedule-key-date-programme > p.schedule-key-date-detail {
  max-width: 68ch;
  margin: 0 0 10px;
  color: var(--tt-text);
  font-size: 14px;
  line-height: 1.55;
}
html:root body.student-schedule-page .schedule-key-date-programme > p.schedule-key-date-caveat {
  max-width: 68ch;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--tt-amber-tint);
  color: var(--tt-amber-ink);
  font-size: 13px;
  line-height: 1.5;
}
html:root body.student-schedule-page .schedule-key-date-caveat > span[aria-hidden="true"] {
  display: none;
}
html:root body.student-schedule-page .schedule-key-date-programme > p.schedule-key-date-caveat::before {
  content: "Check";
  display: inline-block;
  margin-right: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 11px;
  text-transform: uppercase;
}
html:root body.student-schedule-page .schedule-key-date-programme > .schedule-key-date-link,
html:root body.student-schedule-page .schedule-key-date-item > .schedule-key-date-link {
  display: inline-block;
  margin: 2px 0 0 !important;
  padding: 0;
  color: var(--tt-blue-deep) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
html:root body.student-schedule-page .schedule-key-date-item > .schedule-key-date-link {
  margin: -6px 0 16px 214px !important;
}
html:root body.student-schedule-page .schedule-key-date-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* The introduction's day-by-day programme: days as rows, sessions beneath,
   resources as links — not cards in a tinted box. */
html:root body.student-schedule-page .schedule-key-date-programme-heading h3 {
  font-size: 14px !important;
  color: var(--tt-ink) !important;
}
html:root body.student-schedule-page .schedule-key-date-programme-heading p {
  color: var(--tt-slate) !important;
  font-size: 12.5px !important;
}
html:root body.student-schedule-page .schedule-key-date-days {
  gap: 0 !important;
  margin-top: 10px !important;
  border-top: 1px solid var(--tt-rule);
}
html:root body.student-schedule-page .schedule-key-date-day {
  border: 0 !important;
  border-bottom: 1px solid var(--tt-rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}
html:root body.student-schedule-page .schedule-key-date-day > summary {
  min-height: 44px !important;
  padding: 10px 0 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--tt-ink) !important;
}
html:root body.student-schedule-page .schedule-key-date-day > summary:hover {
  background: transparent !important;
  color: var(--tt-blue-deep) !important;
}
html:root body.student-schedule-page .schedule-key-date-day > summary small {
  font-size: 12px !important;
  color: var(--tt-mist) !important;
}
html:root body.student-schedule-page .schedule-key-date-sessions {
  border-top: 0 !important;
  padding-bottom: 6px !important;
}
html:root body.student-schedule-page .schedule-key-date-session {
  grid-template-columns: 96px minmax(0, 1fr) !important;
  gap: 4px 14px !important;
  padding: 8px 0 !important;
  border-top: 0 !important;
  background: transparent !important;
}
html:root body.student-schedule-page .schedule-key-date-session time {
  color: var(--tt-slate) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  padding-top: 1px;
}
html:root body.student-schedule-page .schedule-key-date-session-copy strong {
  font-size: 13.5px !important;
  font-weight: 600 !important;
}
html:root body.student-schedule-page .schedule-key-date-session--break time,
html:root body.student-schedule-page .schedule-key-date-session--break strong {
  color: var(--tt-mist) !important;
  font-weight: 500 !important;
}
html:root body.student-schedule-page .schedule-key-date-presenter {
  font-size: 12.5px !important;
}
html:root body.student-schedule-page span.schedule-session-resources,
html:root body.student-schedule-page section.schedule-session-resources--compact {
  margin-top: 4px !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}
html:root body.student-schedule-page section.schedule-session-resources--compact > h5 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
html:root body.student-schedule-page .schedule-resource-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html:root body.student-schedule-page .schedule-resource-link,
html:root body.student-schedule-page .schedule-resource-link--compact {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 8px !important;
  min-height: 0 !important;
  padding: 2px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--tt-blue-deep) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
html:root body.student-schedule-page .schedule-resource-link:hover .schedule-resource-link-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
html:root body.student-schedule-page .schedule-resource-link-type {
  flex: none;
  min-width: 64px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--tt-slate) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}
html:root body.student-schedule-page .schedule-resource-link-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
html:root body.student-schedule-page .schedule-resource-link-open {
  color: var(--tt-mist);
}
/* The catalogue of all slides and recordings: the same language, grouped. */
html:root body.student-schedule-page .schedule-course-resources {
  margin: 0 !important;
  padding: 16px 0 22px 214px !important;
  border: 0 !important;
  border-top: 1px solid var(--tt-rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
html:root body.student-schedule-page .schedule-course-resources-head {
  margin-bottom: 8px !important;
}
html:root body.student-schedule-page .schedule-course-resources-head p {
  max-width: 68ch;
}
html:root body.student-schedule-page .schedule-resource-groups {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
  margin-top: 6px !important;
  border-top: 1px solid var(--tt-rule);
}
html:root body.student-schedule-page .schedule-resource-group {
  border: 0 !important;
  border-bottom: 1px solid var(--tt-rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}
html:root body.student-schedule-page .schedule-resource-group > summary {
  min-height: 42px !important;
  padding: 9px 0 !important;
  font-size: 13.5px !important;
}
html:root body.student-schedule-page .schedule-resource-group > summary:hover {
  background: transparent !important;
  color: var(--tt-blue-deep) !important;
}
html:root body.student-schedule-page .schedule-resource-group > .schedule-resource-list {
  padding: 0 0 10px !important;
}

/* ---- Settling in: a shown view, an opened panel ---- */
@keyframes tt-settle {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}
html:root body.student-schedule-page .tt-view-in {
  animation: tt-settle var(--tt-base) var(--tt-ease);
}
html:root body.student-schedule-page .schedule-key-date-chevron {
  transition: transform var(--tt-base) var(--tt-ease), color var(--tt-quick) var(--tt-ease);
}
html:root body.student-schedule-page .schedule-key-date-row:hover .schedule-key-date-chevron {
  color: var(--tt-ink);
}

/* ---- Phones ---- */
@media (max-width: 768px) {
  html:root body.student-schedule-page .tt-kd-head {
    position: static;
    padding: 22px 0 8px;
    font-size: 15px;
  }
  html:root body.student-schedule-page .tt-kd-cont {
    margin-left: 0;
    flex-basis: 100%;
    font-size: 12px;
  }
  html:root body.student-schedule-page .tt-kd-now {
    gap: 6px 18px;
    padding: 10px 0;
  }
  html:root body.student-schedule-page .tt-kd-now-item {
    min-height: 44px;
    padding: 4px 6px;
  }
  html:root body.student-schedule-page .schedule-key-date-tag + .schedule-key-date-tag::before,
html:root body.student-schedule-page .schedule-key-date-tag + .schedule-key-date-status::before {
    content: none;
  }
  html:root body.student-schedule-page .schedule-key-date-event-title {
    gap: 2px 10px !important;
  }
  html:root body.student-schedule-page .schedule-key-date-programme,
html:root body.student-schedule-page .schedule-course-resources {
    padding: 2px 0 18px 14px !important;
  }
  html:root body.student-schedule-page .schedule-key-date-item > .schedule-key-date-link {
    margin: -6px 0 14px 14px !important;
  }
  html:root body.student-schedule-page .schedule-key-date-session {
    grid-template-columns: 76px minmax(0, 1fr) !important;
    gap: 2px 10px !important;
  }
  /* A resource reads as one line of text on a phone: type, title, arrow. */
  html:root body.student-schedule-page .schedule-resource-link,
html:root body.student-schedule-page .schedule-resource-link--compact {
    display: block !important;
    line-height: 1.45;
  }
  html:root body.student-schedule-page .schedule-resource-link-type,
html:root body.student-schedule-page .schedule-resource-link-title,
html:root body.student-schedule-page .schedule-resource-link-open {
    display: inline !important;
    min-width: 0 !important;
  }
  html:root body.student-schedule-page .schedule-resource-link-type {
    margin-right: 6px;
  }
  html:root body.student-schedule-page .schedule-resource-link-open {
    margin-left: 4px;
  }
  html:root body.student-schedule-page .schedule-key-date-item.is-current::after,
html:root body.student-schedule-page .schedule-key-date-item.is-next::after {
    top: 8px;
    bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:root body.student-schedule-page .tt-view-in,
html:root body.student-schedule-page .schedule-key-date-card[open] > .schedule-key-date-programme,
html:root body.student-schedule-page .schedule-key-date-card[open] > .schedule-course-resources {
    animation: none !important;
  }
  html:root body.student-schedule-page .schedule-key-date-chevron,
html:root body.student-schedule-page .tt-kd-now-item {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  html:root body.student-schedule-page .tt-kd-jump.is-active {
    outline: 1px solid CanvasText;
  }
  html:root body.student-schedule-page .schedule-key-date-programme > p.schedule-key-date-caveat {
    border: 1px solid CanvasText;
  }
}

/* Refinement: the sticky rail and headings also cover the gutter the
   current/next mark sits in; a phone resource link shows one arrow. */
@media (min-width: 769px) {
  html:root body.student-schedule-page .tt-kd-months,
html:root body.student-schedule-page .tt-kd-head {
    box-shadow: -24px 0 0 #fff;
  }
}
@media (max-width: 768px) {
  html:root body.student-schedule-page .schedule-resource-link-open {
    display: none !important;
  }
}

/* A list the month sheet hides stays hidden whatever its layout display. */
html:root body.student-schedule-page .tt-kd-month[hidden] {
  display: none !important;
}

/* Keyboard focus and in-page jumps land below the sticky month rail and
   month heading, never under them. */
@media (min-width: 769px) {
  html:root:has(body.student-schedule-page.schedule-key-dates-mode) {
    scroll-padding-top: calc(var(--tt-bar, 66px) + 104px);
  }
}

/* PR64: Notes, attendance support and peer reviews are separate drawer
   sections. These rules never reach Today, Site Info or the native shell. */
body.student-schedule-page .schedule-detail-notes {
  margin: 24px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
}
body.student-schedule-page .schedule-detail-notes h3,
body.student-schedule-page .schedule-detail-attendance-issue h3 {
  margin: 0 0 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.5;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--pf-ink, #16233f) !important;
}
body.student-schedule-page .schedule-detail-notes p {
  color: var(--pf-ink-2, #5d6b84) !important;
  line-height: 1.6 !important;
}
body.student-schedule-page .schedule-detail-attendance-issue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 24px 0 0;
}
body.student-schedule-page .schedule-detail-attendance-issue h3 {
  margin: 0 !important;
}
body.student-schedule-page .schedule-detail-attendance-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-ink-2, #5d6b84);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--pf-line, #dfe4ec);
}
body.student-schedule-page .schedule-detail-attendance-link:hover {
  color: var(--pf-brand-ink, #081f47);
  text-decoration-color: currentColor;
}
body.student-schedule-page .schedule-detail-attendance-link:focus-visible {
  outline: 2px solid var(--pf-brand, #1f6fd6);
  outline-offset: 3px;
  border-radius: 3px;
}
body.student-schedule-page .schedule-detail-section.pf-pr-session {
  margin: 16px 0 24px !important;
  padding: 16px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--pf-line, #dfe4ec) !important;
  min-height: 156px;
  gap: 12px;
  align-content: start;
}
html:root body.student-schedule-page .pf-pr-session .schedule-detail-section-title {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.4;
  letter-spacing: -.01em !important;
  text-transform: none !important;
  color: var(--pf-brand-ink, #16233f) !important;
}
body.student-schedule-page .pf-pr-session > .pf-pr {
  gap: 12px;
}
body.student-schedule-page .pf-pr-session .pf-pr-empty {
  font-size: 14px;
  line-height: 1.5;
  color: var(--pf-ink-2, #5d6b84);
}
body.student-schedule-page .pf-pr-session .pf-pr-mine {
  padding: 0;
  gap: 16px;
  border: 0;
  background: none;
}
body.student-schedule-page .pf-pr-session .pf-pr-rate {
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--pf-brand-ink, #081f47);
  border-color: var(--pf-brand-ink, #081f47);
}
body.student-schedule-page .pf-pr-session .pf-pr-form {
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  background: none;
  gap: 18px;
}
body.student-schedule-page .pf-pr-session .pf-pr-form legend {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pf-ink, #16233f);
}
body.student-schedule-page .pf-pr-session .pf-pr-disclosure {
  gap: 10px;
}
body.student-schedule-page .pf-pr-session .pf-pr-note,
body.student-schedule-page .pf-pr-session .pf-pr-check {
  line-height: 1.55;
}
body.student-schedule-page .pf-pr-session .pf-pr-advice {
  gap: 16px;
}
body.student-schedule-page .pf-pr-session .pf-pr-advice li {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
body.student-schedule-page .pf-pr-session .pf-pr-advice li + li {
  padding-top: 16px;
  border-top: 1px solid var(--pf-line, #dfe4ec);
}
body.student-schedule-page .pf-pr-session .pf-pr-advice-foot {
  margin-top: 8px;
}
