/* Preserve the teacher prototype's compact matrix and profile composition. */
.ct-dashboard{--r902-red:#f4b0b5;--r902-yellow:#f5d75a;--r902-green:#8bd18a;--r902-missing:#edf0f2;background:var(--kyj-color-page,#f9fafb)}
.ct-content{max-width:1440px}.ct-panel{border:1px solid #e5e7eb;border-radius:16px}.ct-dashboard .ct-button.main{background:#323232;border-color:#323232}.ct-dashboard .ct-button.main:hover{background:#555}.ct-dashboard :where(button,a,input,select,summary,[tabindex]):focus-visible{outline:2px solid #8151ac;outline-offset:3px}
.r902-tabs{display:flex;gap:24px;border-bottom:1px solid #dce1e6;margin-bottom:18px;overflow-x:auto;flex-shrink:0}
.r902-tabs button{flex-shrink:0;white-space:nowrap;color:#616b76;padding:12px 0;min-height:44px;border-bottom:3px solid transparent;font-size:13px}
.r902-tabs button[aria-selected=true]{color:#323232;border-bottom-color:#8151ac;font-weight:600}.r902-tabs button:hover{color:#8151ac}
.r902-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:14px 0}.r902-actions a{text-decoration:none}.r902-resource-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0}.r902-resource-grid .ct-button{justify-content:flex-start;min-height:68px;padding:16px}
.r902-legend{display:flex;gap:18px;flex-wrap:wrap;align-items:center;margin:14px 0;font-size:12px;color:#53616d}.r902-legend strong{font-weight:500;margin-right:4px}.r902-legend span{display:flex;gap:6px;align-items:center}.r902-dot{display:inline-block;width:11px;height:11px;border-radius:2px;flex-shrink:0}
.r902-dot.red,.r902-distribution .red{background:var(--r902-red)}.r902-dot.yellow,.r902-distribution .yellow{background:var(--r902-yellow)}.r902-dot.green,.r902-distribution .green{background:var(--r902-green)}.r902-dot.missing,.r902-distribution .missing{background:#c4ccd3}
.r902-rate{font-variant-numeric:tabular-nums;white-space:nowrap}.r902-rate.red{color:#a83240}.r902-rate.yellow{color:#806100}.r902-rate.green{color:#28733c}.r902-rate.missing{color:#616b76}
.r902-matrix-tools{display:flex;gap:24px;align-items:start;flex-wrap:wrap;min-height:40px}.r902-matrix-tools details{position:relative;font-size:12px}.r902-matrix-tools summary{color:#465460;min-height:36px}.r902-options{position:absolute;z-index:15;top:100%;left:0;width:200px;padding:10px 16px;border:1px solid #cbd3dc;border-radius:8px;background:#fff;box-shadow:0 8px 24px #263b501a}.r902-options label{display:flex;align-items:center;gap:9px;min-height:36px}.r902-column-options{width:min(320px,calc(100vw - 60px));max-height:350px;overflow:auto}.r902-options input{flex-shrink:0}
.r902-matrix-scroll{background:#fff;border-radius:12px;border:1px solid #e0e5e9;max-height:calc(100dvh - 380px);min-height:220px;overflow:auto;scrollbar-gutter:stable;isolation:isolate}
.r902-matrix{table-layout:fixed;min-width:1080px;width:100%;border-collapse:separate;border-spacing:0;font-size:12px}
.r902-matrix thead th{position:sticky;top:0;z-index:4;background:#fff;padding:12px 10px;border-bottom:1px solid #dce2e8;vertical-align:middle;min-width:140px;width:160px;white-space:normal;line-height:1.6}
.r902-matrix thead th button{min-height:44px;font-size:12px;white-space:normal;text-align:left;width:100%;line-height:1.6;overflow:visible;overflow-wrap:anywhere}
.r902-matrix thead th:first-child,.r902-matrix tbody th{width:126px;min-width:126px}.r902-matrix thead th:nth-last-child(-n+2){width:110px;min-width:110px}
.r902-matrix .ct-sticky{position:sticky;left:0;z-index:3;background:#fff}.r902-matrix thead .ct-sticky{z-index:6}.r902-matrix tbody th{padding:2px 12px;vertical-align:middle}.r902-matrix tbody td{padding:2px 1px;border-right:1px solid white;height:48px;vertical-align:middle}.r902-matrix tr:nth-child(even) .ct-sticky{background:#f0f2f4}.r902-matrix tr.ct-average>:is(td,th){background:#e8edf1;font-weight:600}.r902-matrix .ct-average td{padding-top:3px;padding-bottom:3px}
.r902-cell{display:flex;flex-direction:column;justify-content:center;gap:7px;width:100%;height:44px;padding:5px 10px;border-radius:0;color:#303b40;font-size:12px;text-align:left;font-variant-numeric:tabular-nums;line-height:1.4}.r902-cell strong{font-weight:500}.r902-cell.red{background:var(--r902-red)}.r902-cell.yellow{background:var(--r902-yellow)}.r902-cell.green{background:var(--r902-green)}.r902-cell.missing{background:var(--r902-missing);color:#616b76}.r902-cell.uncolored{background:#f1f4f6}.r902-cell.uncolored.red{color:#a83240}.r902-cell.uncolored.yellow{color:#806100}.r902-cell.uncolored.green{color:#28733c}button.r902-cell:hover{outline:2px solid #8151ac;outline-offset:-2px}.r902-bar{display:block;width:90%;height:2px;background:#ffffff88}.r902-bar i{display:block;background:#354d5599;height:100%}.uncolored .r902-bar{background:#d9dfe5}
.r902-sr-only{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
.r902-modal .ct-profile-grid .ct-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.r902-modal .r902-test-chart{max-height:180px}.r902-modal .r902-test-chart+.ct-footnote{padding:4px 0}.r902-modal .ct-profile-grid .ct-panel-heading{margin-bottom:8px}
.r902-distribution{display:flex;min-height:44px;margin:18px 0;border-radius:5px;overflow:hidden;color:#303b40;text-align:center}.r902-distribution span{display:flex;align-items:center;justify-content:center;min-width:0;font-variant-numeric:tabular-nums}.r902-counts{display:flex;gap:10px 24px;flex-wrap:wrap;font-size:12px;color:#53616d}
.r902-empty{padding:22px;border:1px dashed #c8d0d8;border-radius:8px;color:#616b76;background:#fafbfc;font-size:13px}.r902-knowledge-links{display:flex;flex-wrap:wrap;gap:5px 14px;margin:6px 0}.r902-knowledge-links .ct-link{font-size:12px;min-height:28px}
.r902-modal-overlay{position:fixed;inset:var(--app-header-height) 0 0;z-index:80;background:#10233577;display:flex;align-items:center;justify-content:center;padding:22px}.r902-modal{background:#f5f6f6;border-radius:16px;width:min(1180px,100%);height:min(94%,1000px);display:flex;flex-direction:column;box-shadow:0 20px 80px #13253944;overflow:hidden}.r902-modal>header{display:flex;justify-content:space-between;padding:10px 20px;border-bottom:1px solid #dde4e7;background:white;flex-shrink:0}.r902-modal>header button:last-child{margin-left:auto}.r902-modal-body{overflow:auto;padding:22px;overscroll-behavior:contain;min-height:0}.r902-modal-body>h2{font-size:20px;margin-bottom:18px}.r902-modal-body>.ct-panel{margin-top:18px}.r902-preview{width:100%;height:70vh;min-height:300px;background:#fff;border:1px solid #c5d3da;border-radius:8px}.r902-paper{display:block;max-width:100%;height:auto;margin:10px auto;background:white}.r902-pre{white-space:pre-wrap;font:inherit;overflow-wrap:anywhere;max-width:100%;margin:12px 0}.r902-question{padding:16px 0;border-bottom:1px solid #dbe3e7}.r902-modal details{padding:10px 0;border-bottom:1px solid #dce2e8}.r902-modal summary{cursor:pointer;color:#27647d;min-height:36px}.r902-modal .ct-profile-grid{grid-template-columns:minmax(240px,2fr) minmax(0,3fr);gap:20px;margin-bottom:20px;align-items:start}.r902-modal .ct-profile-grid>*{min-width:0}.ct-profile-identity{align-self:start}.r902-modal .ct-profile-identity{padding:30px 18px;min-height:270px}.r902-modal .ct-kpis{gap:10px}.r902-modal .ct-kpis>div{padding:14px 12px}.r902-modal .ct-kpis strong{font-size:24px}.r902-test-chart{display:block;width:100%;height:auto;max-height:300px}.r902-test-chart text{font:11px system-ui,sans-serif;fill:#5d6976}.r902-profile-item{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:4px 0}.r902-profile-item>.ct-link{flex:1;min-width:60%}.r902-profile-item>small{width:100%}.ct-dashboard .katex-display{max-width:100%;overflow:auto}
#r902-graph{width:100%;height:470px;border:1px solid #c4d3dc;border-radius:10px}.r902-graph-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(220px,1fr);gap:18px}.r902-evidence-list{max-height:470px;overflow:auto}.r902-evidence-list button{display:flex;align-items:center;text-align:left;gap:10px;width:100%;padding:13px 6px;border-bottom:1px solid #e5ebef}.r902-evidence-list i{width:12px;height:12px;border-radius:50%;flex-shrink:0}.r902-evidence-list button span{flex:1;min-width:0}.r902-evidence-list strong{font-size:12px;font-weight:500}
@media(min-width:1536px){.ct-content{max-width:1440px}}@media(max-width:767px){.ct-content{padding:0 16px 20px}.ct-class-header{align-items:start;gap:12px}.ct-class-heading{flex-wrap:wrap;gap:8px}.ct-class-heading h1{font-size:20px}.ct-class-meta{display:none}.ct-filterbar{gap:10px;align-items:start}.ct-filter{flex-wrap:wrap}.ct-filterbar input{width:170px}.ct-filterbar>span{width:100%}.r902-tabs{gap:20px}.ct-kpis{gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}.ct-kpis>div{padding:14px}.ct-kpis strong{font-size:22px}.ct-panel{padding:16px;border-radius:12px}.r902-matrix-scroll{max-height:65dvh}.r902-options{width:180px}.r902-column-options{left:auto;right:0;width:min(260px,calc(100vw - 40px))}.r902-legend{gap:10px;font-size:11px}.r902-modal-overlay{padding:5px}.r902-modal{height:100%;border-radius:8px}.r902-modal-body{padding:13px}.r902-modal-body>.ct-panel{padding:12px}.r902-modal .ct-profile-grid{grid-template-columns:minmax(0,1fr)}.r902-modal .ct-profile-identity{min-height:210px;padding:20px}.r902-modal .ct-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.r902-actions{gap:7px}.r902-actions .ct-button,.r902-tabs button,.ct-filterbar select,.ct-dashboard .ct-link{min-height:44px}.r902-resource-grid{grid-template-columns:1fr}.r902-graph-layout{grid-template-columns:1fr}#r902-unit{max-width:100%;white-space:normal}.ct-half-grid{grid-template-columns:1fr}}
@media(max-width:767px){.r902-modal .ct-profile-grid .ct-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
.r902-advice h3{margin:14px 0 6px}.r902-advice ol{padding-left:22px}.r902-advice li{margin:10px 0;line-height:1.9}.r902-advice p{line-height:1.9}
.r902-learning-badge{display:inline-flex;align-items:center;gap:8px;font-weight:500}.r902-learning-badge:before{content:'';width:12px;height:12px;border-radius:50%;background:var(--level-color)}
.r902-unit-context{margin:0 0 20px}.r902-unit-context h3{font-size:17px}.r902-unit-context p{font-size:12px;color:#616b76}
.r902-unit-kpis .ct-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.r902-distribution button{display:flex;align-items:center;justify-content:center;min-width:0;overflow:hidden;color:#303b40;min-height:44px;font-variant-numeric:tabular-nums}.r902-distribution button:hover{outline:2px solid #8151ac;outline-offset:-2px}
.r902-unit-band-list{display:grid;gap:4px}.r902-unit-band-list button{display:flex;align-items:center;gap:10px;min-height:44px;border-bottom:1px solid #edf0f2;text-align:left;font-size:13px}.r902-unit-band-list button>span:first-of-type{flex:1}.r902-unit-band-list button>span:last-child{font-size:12px;color:#616b76}.r902-unit-band-list button:hover{background:#f6f3fa}
.r902-unit-comparison{display:grid;gap:8px}.r902-unit-comparison>button{display:block;width:100%;padding:10px 12px;border:1px solid transparent;border-radius:8px;text-align:left}.r902-unit-comparison>button.active{border-color:#c7b3da;background:#f7f4fa}.r902-unit-comparison>button:hover{background:#f3f5f7}.r902-unit-comparison-name{display:block;font-size:12px;line-height:1.7;margin-bottom:7px}.r902-compare-row{display:grid;grid-template-columns:30px 1fr 60px;gap:8px;align-items:center;font-size:11px;line-height:1.7}.r902-compare-row strong{font-size:11px;font-weight:500;text-align:right}.r902-compare-row i{height:6px;border-radius:5px;background:#edf0f2;overflow:hidden}.r902-compare-row b{display:block;height:100%;background:#8151ac}.r902-compare-row.grade b{background:#9daab7}
@media(max-width:900px){.r902-unit-kpis .ct-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
#r902-graph{height:560px}.r902-evidence-list{max-height:560px}
@media(max-width:767px){#r902-graph{height:470px}}
@media(prefers-reduced-motion:reduce){.ct-dashboard *{scroll-behavior:auto;transition:none}}

/* Give the intervention graph a dedicated, spacious workspace. */
.ct-content[data-view="interventions"] { max-width: 1840px; padding: 0 28px 24px; }
.ct-content[data-view="interventions"] .ct-class-header { padding: 14px 0 12px; }
.ct-content[data-view="interventions"] .ct-class-header h1 { font-size: 21px; line-height: 28px; }
.ct-content[data-view="interventions"] .ct-section-heading { padding: 12px 0 0; }
.ct-content[data-view="interventions"] > .r902-tabs { margin-bottom: 12px; }
.r902-intervention-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; min-height: 44px; }
.r902-student-picker .ct-filter { font-size: 13px; gap: 12px; }
.r902-student-picker select { min-width: 160px; height: 40px; border-color: #d5dce5; font-weight: 600; }
.r902-intervention-shortcut { margin-left: auto; }
.r902-student-filters { position: relative; }
.r902-student-filters > summary { font-size: 13px; color: #687482; padding: 8px 10px; }
.r902-student-filters > .ct-filterbar { position: absolute; z-index: 20; top: 100%; left: 0; width: 310px; padding: 20px; border: 1px solid #e0e5ec; border-radius: 12px; background: white; box-shadow: 0 12px 36px #20324c1a; align-items: stretch; gap: 14px; }
.r902-student-filters .ct-filter { display: grid; grid-template-columns: 78px minmax(0,1fr); }
.r902-student-filters .ct-filter input { width: 100%; min-width: 0; }
.r902-intervention-map { --map-height: clamp(620px, calc(100dvh - 360px), 940px); border: 1px solid #dce4ec; border-radius: 20px; padding: 22px; background: white; box-shadow: 0 4px 20px #24354d05; }
.r902-map-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.r902-map-heading h2 { font-size: 22px; line-height: 30px; color: #26364a; }
.r902-map-heading p { font-size: 13px; color: #728095; margin: 4px 0 0; }
.r902-map-expand { border-color: #d6dce8; background: #f8f9fd; color: #65508a; }
.r902-map-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 18px 0; color: #627086; font-size: 12px; }
.r902-map-legend > span { display: flex; align-items: center; gap: 7px; }
.r902-map-legend i { width: 9px; height: 9px; border-radius: 50%; }
.r902-map-legend b { color: #33445c; font-weight: 600; font-variant-numeric: tabular-nums; }
.r902-intervention-map .r902-graph-layout { grid-template-columns: minmax(0,1fr) 280px; gap: 22px; }
.r902-map-canvas { min-width: 0; height: var(--map-height); background: #f3f5f8; border: 1px solid #e2e7ee; border-radius: 14px; overflow: hidden; }
.r902-intervention-map #r902-graph { display: block; width: 100%; height: 100%; border: 0; border-radius: 0; }
.r902-map-sidebar { min-width: 0; display: flex; flex-direction: column; height: var(--map-height); padding: 16px 14px 0; background: #fafbfe; border: 1px solid #edf0f5; border-radius: 14px; }
.r902-map-sidebar > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.r902-map-sidebar h3 { font-size: 14px; color: #36455b; }
.r902-map-sidebar > header > span { font-size: 11px; color: #77859a; }
.r902-map-sidebar > p { font-size: 11px; color: #7a8799; margin: 3px 0 12px; }
.r902-intervention-map .r902-evidence-list { flex: 1; min-height: 0; max-height: none; scrollbar-width: thin; scrollbar-color: #cdd5e0 transparent; padding-bottom: 12px; }
.r902-intervention-map .r902-evidence-list button { padding: 13px 8px; gap: 10px; border-radius: 8px; border-bottom-color: #e9edf3; transition: background .15s; }
.r902-intervention-map .r902-evidence-list button:hover { background: #eef0f8; }
.r902-intervention-map .r902-evidence-list strong { font-size: 13px; line-height: 20px; color: #35445b; }
.r902-intervention-map .r902-evidence-list small { font-size: 11px; margin-top: 3px; }
.r902-intervention-map .r902-evidence-list i { width: 9px; height: 9px; }
.r902-intervention-map .r902-evidence-arrow { flex: 0 0 auto; color: #9aa5b6; font-size: 18px; }
.r902-map-notes { margin-top: 12px; font-size: 12px; color: #7b8797; }
.r902-map-notes summary { padding: 4px 0; min-height: 28px; }
.r902-map-notes p { max-width: 1000px; line-height: 1.8; }
.r902-intervention-map.is-expanded { position: fixed; inset: calc(var(--app-header-height) + 12px) 16px 16px; z-index: 45; display: flex; flex-direction: column; padding: 20px; box-shadow: 0 0 0 100vmax #20324c66; }
.r902-intervention-map.is-expanded .r902-graph-layout { flex: 1; min-height: 0; }
.r902-intervention-map.is-expanded .r902-map-canvas, .r902-intervention-map.is-expanded .r902-map-sidebar { height: 100%; min-height: 0; }
.r902-intervention-map.is-expanded .r902-map-notes { display: none; }
@media (min-width: 1700px) { .r902-intervention-map .r902-graph-layout { grid-template-columns: minmax(0,1fr) 310px; } }
@media (max-width: 1100px) { .r902-intervention-map .r902-graph-layout { grid-template-columns: minmax(0,1fr) 240px; gap: 14px; } .r902-intervention-map { padding: 18px; } }
@media (max-width: 767px) {
 .ct-content[data-view="interventions"] { padding: 0 12px 20px; }
 .r902-intervention-toolbar { flex-wrap: wrap; gap: 8px 12px; }
 .r902-intervention-shortcut { margin-left: 0; }
 .r902-student-picker select { min-width: 140px; }
 .r902-student-filters > .ct-filterbar { left: auto; right: -8px; width: min(310px,calc(100vw - 36px)); }
 .r902-intervention-map { padding: 14px; border-radius: 14px; --map-height: 520px; }
 .r902-map-heading { align-items: flex-start; gap: 8px; }
 .r902-map-heading h2 { font-size: 18px; line-height: 26px; }
 .r902-map-heading p { font-size: 11px; }
 .r902-map-expand { min-height: 36px; padding: 6px 9px; font-size: 11px; flex-shrink: 0; }
 .r902-map-legend { gap: 10px 14px; margin: 14px 0; }
 .r902-intervention-map .r902-graph-layout { grid-template-columns: minmax(0,1fr); }
 .r902-map-sidebar { height: 320px; }
 .r902-intervention-map.is-expanded { inset: calc(var(--app-header-height) + 6px) 6px 6px; padding: 12px; }
 .r902-intervention-map.is-expanded .r902-graph-layout { display: block; }
 .r902-intervention-map.is-expanded .r902-map-sidebar { display: none; }
}
@media (min-width: 768px) {
 .ct-content[data-view="interventions"] { display: grid; grid-template-columns: auto minmax(0,1fr); column-gap: 24px; }
 .ct-content[data-view="interventions"] > .ct-class-header { grid-column: 1 / -1; }
 .ct-content[data-view="interventions"] > .ct-section-heading { grid-column: 1; grid-row: 2; align-self: center; padding: 0; }
 .ct-content[data-view="interventions"] > .r902-tabs { grid-column: 2; grid-row: 2; margin: 0 0 12px; justify-content: flex-end; border-bottom-color: transparent; }
 .ct-content[data-view="interventions"] > .ct-filterbar, .ct-content[data-view="interventions"] > #r902-page-panel { grid-column: 1 / -1; }
 .r902-intervention-map { padding: 18px; }
 .r902-map-legend { margin: 12px 0; }
}
@media (max-width: 767px) { .r902-intervention-map { --map-height: clamp(360px,95vw,520px); } }
