.teacher-diagnostic-page {
  --need-challenge: #38d7c7;
  --need-confidence: #78a8ff;
  --need-purpose: #ffb648;
  --need-ownership: #a78bfa;
  --need-connection: #5bd6ff;
  --diagnostic-surface: rgba(7, 17, 31, 0.84);
  --diagnostic-surface-2: rgba(12, 31, 48, 0.84);
}

.teacher-diagnostic-page .page-shell {
  width: min(1360px, calc(100% - 36px));
}

.diagnostic-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.55fr);
  gap: 14px;
  margin-bottom: 14px;
}

.diagnostic-hero-copy,
.diagnostic-hero-panel,
.diagnostic-mode-panel,
.diagnostic-class-pulse,
.diagnostic-next-move,
.diagnostic-priority-panel,
.learner-drilldown-controls,
.learner-matrix-panel,
.current-data-intro {
  border: 1px solid rgba(136, 173, 255, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(10, 28, 45, 0.9), rgba(5, 13, 26, 0.82)),
    rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow);
}

.diagnostic-hero-copy {
  min-height: 260px;
  display: grid;
  align-content: end;
  padding: 24px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 13, 26, 0.96), rgba(7, 18, 34, 0.78) 58%, rgba(5, 13, 26, 0.34)),
    linear-gradient(180deg, rgba(5, 13, 26, 0.06), rgba(5, 13, 26, 0.92)),
    url("../Assets/landing-screenshots/ecc-future-campus-hero.png") center center / cover no-repeat;
}

.diagnostic-hero-copy h1 {
  max-width: 14ch;
  margin-bottom: 12px;
  font-size: clamp(38px, 5vw, 64px);
}

.diagnostic-hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.diagnostic-stage-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 209, 102, 0.36);
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
  color: #ffe3a1;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.diagnostic-hero-panel {
  min-height: 260px;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(7, 18, 33, 0.32), rgba(7, 18, 33, 0.9)),
    url("../Assets/Images and Animations/Student Hub/community-impact-banner.png") center center / cover no-repeat;
}

.diagnostic-hero-panel strong {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.diagnostic-hero-panel p {
  margin-bottom: 0;
  color: #d9e8ff;
  line-height: 1.48;
}

.diagnostic-model-mark {
  width: fit-content;
  min-width: 70px;
  padding: 10px 12px;
  border: 1px solid rgba(104, 210, 255, 0.32);
  border-radius: 10px;
  background: rgba(5, 13, 26, 0.72);
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.14em;
}

.diagnostic-mode-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
}

.diagnostic-mode-copy h2,
.current-data-intro h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3vw, 34px);
}

.diagnostic-mode-copy p,
.current-data-intro p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.diagnostic-view-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.diagnostic-view-tab {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(136, 173, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.diagnostic-view-tab span {
  width: 36px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(104, 210, 255, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.diagnostic-view-tab strong {
  min-width: 0;
  color: #edf5ff;
  font-size: 14px;
  line-height: 1.15;
}

.diagnostic-view-tab.is-active {
  border-color: rgba(128, 237, 153, 0.42);
  background:
    linear-gradient(145deg, rgba(128, 237, 153, 0.13), rgba(104, 210, 255, 0.08)),
    rgba(255, 255, 255, 0.055);
}

.diagnostic-view-tab:focus-visible,
.diagnostic-primary-link:focus-visible,
.learner-selector-row select:focus-visible {
  outline: 3px solid rgba(104, 210, 255, 0.62);
  outline-offset: 2px;
}

.diagnostic-view {
  display: grid;
  gap: 14px;
}

.diagnostic-view[hidden] {
  display: none;
}

.diagnostic-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.65fr);
  gap: 14px;
}

.diagnostic-class-pulse,
.diagnostic-next-move,
.diagnostic-priority-panel,
.learner-drilldown-controls,
.learner-matrix-panel,
.current-data-intro {
  padding: 18px;
}

.diagnostic-confidence-chip,
.student-need-chip,
.evidence-stream-status,
.need-score-chip,
.diagnostic-status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(136, 173, 255, 0.2);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.need-bar-list {
  display: grid;
  gap: 12px;
}

.need-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.26fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.need-bar-row strong,
.need-bar-row span {
  color: var(--text);
  font-size: 14px;
}

.need-bar-row small {
  color: var(--muted);
}

.need-bar-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.need-bar-fill {
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: var(--need-color);
}

.next-move-card {
  min-height: 218px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(255, 182, 72, 0.26);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(7, 16, 31, 0.16), rgba(7, 16, 31, 0.9)),
    url("../Assets/Images and Animations/Student Hub/module-est-prep-thumb.png") center center / cover no-repeat;
}

.next-move-card h3 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.02;
}

.next-move-card p {
  margin-bottom: 0;
  color: #edf5ff;
  line-height: 1.45;
}

.diagnostic-need-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.need-card {
  min-height: 285px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(136, 173, 255, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--need-color) 15%, transparent), rgba(7, 18, 33, 0.82)),
    rgba(255, 255, 255, 0.035);
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .need-card {
    background: rgba(8, 20, 38, 0.8);
  }
}

.need-card-top {
  display: flex;
  gap: 10px;
  align-items: center;
}

.need-card-icon {
  width: 44px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(5, 13, 26, 0.58);
  color: var(--need-color);
  font-size: 18px;
  font-weight: 900;
}

.need-card h3 {
  margin: 0;
  font-size: 21px;
}

.need-card-question {
  margin: 0;
  color: #edf5ff;
  font-weight: 800;
  line-height: 1.3;
}

.need-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.need-card-stat {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(136, 173, 255, 0.16);
}

.need-card-stat strong {
  color: var(--need-color);
  font-size: 26px;
}

.priority-learner-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.priority-learner-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(136, 173, 255, 0.18);
  border-left: 4px solid var(--need-color);
  border-radius: 10px;
  background: rgba(8, 20, 38, 0.72);
}

.priority-learner-card h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.priority-learner-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.diagnostic-evidence-streams {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.evidence-stream-card {
  min-height: 210px;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(136, 173, 255, 0.18);
  border-radius: 10px;
  background: rgba(8, 20, 38, 0.74);
}

.evidence-stream-card.is-populated {
  border-color: rgba(128, 237, 153, 0.32);
}

.evidence-stream-card h3 {
  margin-bottom: 0;
  font-size: 20px;
}

.evidence-stream-card p,
.evidence-stream-card li {
  color: var(--muted);
  line-height: 1.4;
}

.evidence-stream-card ul,
.evidence-bullet-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.evidence-stream-status.is-live {
  color: #c8ffd5;
  border-color: rgba(128, 237, 153, 0.28);
  background: rgba(128, 237, 153, 0.1);
}

.learner-drilldown-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.32fr);
  gap: 16px;
  align-items: end;
}

.learner-selector-row {
  display: grid;
  gap: 8px;
}

.learner-selector-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.learner-selector-row select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(136, 173, 255, 0.2);
  border-radius: 8px;
  background: rgba(5, 13, 26, 0.82);
  color: var(--text);
  font: inherit;
}

.learner-profile-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.48fr) minmax(0, 1fr);
  gap: 14px;
}

.learner-profile-card,
.learner-evidence-card {
  padding: 18px;
  border: 1px solid rgba(136, 173, 255, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(12, 31, 48, 0.84), rgba(5, 13, 26, 0.78)),
    rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow);
}

.learner-profile-card {
  display: grid;
  gap: 14px;
  border-left: 5px solid var(--need-color);
}

.learner-profile-card h2 {
  margin-bottom: 4px;
  font-size: clamp(28px, 3.4vw, 42px);
}

.learner-profile-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.learner-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.learner-stat {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(136, 173, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.learner-stat strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.learner-stat span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.learner-evidence-card {
  display: grid;
  gap: 14px;
}

.learner-evidence-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.learner-need-cell {
  min-height: 185px;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(136, 173, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.learner-need-cell.is-primary {
  border-color: color-mix(in srgb, var(--need-color) 58%, transparent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--need-color) 12%, transparent), rgba(255, 255, 255, 0.035));
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .learner-need-cell.is-primary {
    border-color: rgba(128, 237, 153, 0.38);
  }
}

.learner-need-cell strong {
  color: var(--text);
  font-size: 15px;
}

.learner-need-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.learner-need-meter span {
  display: block;
  width: var(--need-width);
  height: 100%;
  border-radius: inherit;
  background: var(--need-color);
}

.learner-need-cell p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.teacher-needs-matrix {
  width: max(100%, 1420px);
}

.teacher-needs-matrix th:not(.teacher-matrix-student-col),
.teacher-needs-matrix td:not(.teacher-matrix-student-col) {
  width: 220px;
}

.diagnostic-matrix-cell {
  min-height: 112px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid rgba(136, 173, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.diagnostic-matrix-cell.is-primary {
  border-color: color-mix(in srgb, var(--need-color) 56%, transparent);
}

.diagnostic-matrix-score {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.diagnostic-matrix-score strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.diagnostic-matrix-cell p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.current-data-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.diagnostic-primary-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 1px solid rgba(104, 210, 255, 0.32);
  border-radius: 8px;
  color: #05111f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
  text-decoration: none;
}

.diagnostic-current-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.diagnostic-current-metrics .metric {
  min-height: 132px;
  border-radius: 10px;
}

.diagnostic-current-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.current-data-card {
  min-height: 240px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(136, 173, 255, 0.18);
  border-radius: 10px;
  background: rgba(8, 20, 38, 0.74);
}

.current-data-card h3 {
  margin-bottom: 0;
  font-size: 20px;
}

.current-data-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.current-data-card-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.current-data-card-list li {
  padding: 9px;
  border: 1px solid rgba(136, 173, 255, 0.14);
  border-radius: 8px;
  color: #dfeaff;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 1120px) {
  .diagnostic-hero,
  .diagnostic-mode-panel,
  .diagnostic-overview-grid,
  .learner-profile-layout,
  .current-data-intro {
    grid-template-columns: 1fr;
  }

  .diagnostic-need-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .priority-learner-list,
  .diagnostic-evidence-streams,
  .diagnostic-current-metrics,
  .diagnostic-current-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learner-evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .teacher-diagnostic-page .page-shell {
    width: min(100% - 20px, 1360px);
  }

  .diagnostic-hero-copy,
  .diagnostic-hero-panel {
    min-height: 320px;
    padding: 18px;
  }

  .diagnostic-view-tabs,
  .diagnostic-need-card-grid,
  .priority-learner-list,
  .diagnostic-evidence-streams,
  .diagnostic-current-metrics,
  .diagnostic-current-grid,
  .learner-evidence-grid,
  .learner-drilldown-controls,
  .learner-stat-grid {
    grid-template-columns: 1fr;
  }

  .diagnostic-view-tab {
    min-height: 64px;
  }

  .need-bar-row {
    grid-template-columns: 1fr;
  }

  .current-data-intro {
    align-items: stretch;
  }

  .diagnostic-primary-link {
    width: 100%;
  }
}
