/* Wire palette: neutral data, one accent for the active follow-up. */
:root{--bg:#fff;--ink:#1f1e1c;--muted:#6e6d66;--line:#dbdad3;--soft:#f0f0ee;--accent:#f5572f;--data:#22211f}
body{background:#fff;font-size:14px}main{max-width:1600px;padding:28px 40px 24px}
.topbar{padding:16px 40px;background:var(--data);color:#fff;border:0;min-height:64px}.brand{display:flex;align-items:center;gap:14px;color:inherit;text-decoration:none;font-size:13px}.brand strong{font-size:16px}.brand-divider{color:#aaa99f}.brand>.lucide{width:22px;height:22px}.environment{display:flex;gap:7px;align-items:center;border:0;color:#e8e7df;padding:0}
.lucide{display:inline-block;width:18px;height:18px;flex-shrink:0;stroke-width:1.7;vertical-align:middle}.icon-button{width:38px;height:38px;padding:0;display:inline-flex;align-items:center;justify-content:center;background:#fff;flex-shrink:0}
.skip-link{position:fixed;left:16px;top:-80px;background:#fff;padding:10px;z-index:10;color:var(--ink)}.skip-link:focus{top:10px}
.heading{align-items:center}.eyebrow{font-size:12px;margin-bottom:6px}h1{font-size:28px;font-weight:650}h2{font-size:17px}
.snapshot{font-size:12px;gap:10px;margin-top:14px;padding:10px 0 0}.snapshot>span:last-child{color:#46453f}
.filters{grid-template-columns:1.35fr .7fr 1.6fr .7fr 1.1fr auto;gap:14px;margin:24px 0 10px;align-items:end}.filters label{gap:5px}.filters select,.ranking-controls select,.ranking-controls input,.student-filter select{background:#fff;height:38px;font-size:13px;border-color:#c0bfb7}.filters select:focus-visible,input:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.active-scope{font-size:12px;color:var(--muted);padding-bottom:18px;border-bottom:1px solid var(--line)}
.scope-summary{display:flex;gap:32px;flex-wrap:wrap;align-items:center;margin:18px 0}.scope-summary>div{display:flex;gap:8px;align-items:baseline}.scope-summary strong{font-size:14px;font-weight:600}.scope-summary span{font-size:12px;color:var(--muted)}
.kpis{padding:20px 0 24px;border-top:0;border-bottom:1px solid var(--line);gap:24px;grid-template-columns:repeat(4,minmax(0,1fr))}.kpi{padding-right:20px;border-color:var(--line)}.kpi p{font-size:13px}.kpi strong{font-size:36px;line-height:1.2;margin:10px 0;font-weight:650}.kpi small{font-size:12px;display:block;line-height:1.6}
.followup-heading{display:flex;align-items:center;gap:12px;padding:22px 0 12px}.followup-heading h2{font-size:14px}.followup-heading .sub{margin:0}.followup-heading button{margin-left:auto}.text-button{border:0;border-radius:0;min-height:28px;padding:0 2px;font-size:12px;text-decoration:underline;text-underline-offset:4px}
.followup-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.followup-item{text-align:left;display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:6px 8px;padding:12px 16px;border:1px solid var(--line);border-radius:5px;background:#fff;min-width:0;position:relative}.followup-item span{font-size:13px;font-weight:500}.followup-item strong{font-size:23px;line-height:1.3}.followup-item small{grid-column:1/-1;font-size:11px;color:var(--muted)}.followup-item[aria-pressed=true]{border-color:var(--accent);box-shadow:inset 3px 0 0 var(--accent);background:var(--soft)}.followup-item[aria-pressed=true] span{font-weight:700}.followup-item:hover:not(:disabled){border-color:#aaa99f;background:var(--soft)}
.insight{color:#46453f;font-size:12px;line-height:1.7;border-bottom:1px solid var(--line);padding:12px 0 20px;margin:0}
.ranking-heading{margin:24px 0 12px;align-items:end}.ranking-controls{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.ranking-controls label{display:grid;gap:5px;font-size:12px;color:var(--muted)}.ranking-controls input{font:inherit;border:1px solid #c0bfb7;border-radius:5px;padding:7px 10px;color:var(--ink);width:150px}.ranking-controls input[type=number]{width:85px}.ranking-controls .icon-button{margin-bottom:0}#ranking-note{margin:0 0 12px;font-size:12px}
.table-scroll{border-top:1px solid var(--line);border-bottom:1px solid var(--line);scrollbar-gutter:stable}table{font-size:13px;background:#fff}th{height:42px;background:var(--soft);border-bottom:1px solid #c0bfb7;padding:10px 14px;color:#46453f}td{padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:middle}td:first-child,th:first-child{padding-left:14px}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#f6f6f4}td small{font-size:11px;line-height:1.45;color:var(--muted);margin-top:4px}
#ranking-table{min-width:1010px}#ranking-table td{height:78px;padding-top:10px;padding-bottom:10px}#ranking-table tbody tr{cursor:pointer}#ranking-table th:nth-child(n+3),#ranking-table td:nth-child(n+3){text-align:right}.ranking-scroll{max-height:650px;overscroll-behavior:contain}.ranking-scroll th{position:sticky;top:0;z-index:1}.ranking-scroll td:nth-child(2){width:235px;min-width:190px;max-width:235px}#ranking-table td:nth-child(2) small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:235px}.rank-number{font-size:15px;color:var(--muted);width:64px;font-weight:500}
.teacher-link,.class-link{border:0;background:none;border-radius:0;min-height:28px;padding:0;text-align:left;font-size:14px;font-weight:600;text-decoration:none}.teacher-link:hover:not(:disabled),.class-link:hover:not(:disabled){background:none;text-decoration:underline;text-underline-offset:4px}.metric-cell strong{font-size:15px;font-weight:600}.metric-cell small{font-size:11px}.rank-selected{background:#f5f5f3}.rank-selected strong{font-weight:700}th.rank-selected{background:#e8e7df;color:var(--ink)}.metric-bar{display:block;width:74px;height:3px;background:var(--line);margin:7px 0 0 auto}.metric-bar>span{display:block;height:100%;background:var(--data)}
.tabs{gap:24px;margin:18px 0 8px}.tabs button{font-size:14px;padding:12px 0}.tabs button[aria-selected=true]{border-bottom-width:3px}#teacher-breadcrumb{display:flex;gap:16px;align-items:center;margin-bottom:18px}#back-overview{display:flex;gap:8px;align-items:center;border:0;padding:0;min-height:28px;font-size:13px}#teacher-scope{font-size:12px;color:var(--muted)}
.teacher-followups{margin-top:20px}.wave-heading{margin:24px 0 12px;align-items:center}.pager{flex-wrap:wrap;justify-content:flex-end}.pager .text-button{margin-right:8px}#rate-table td{white-space:nowrap}#rate-table td:nth-child(n+3){text-align:right}#rate-table small{white-space:normal;max-width:210px}#rate-table tr:focus{outline:2px solid var(--ink);outline-offset:-2px;background:var(--soft)}
.chart-pair{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin-top:6px}.chart-pair>section{min-width:0}.chart-pair>section+section{border-left:1px solid var(--line);padding-left:32px}.chart-pair .sub{min-height:20px}.wave{height:260px;min-width:280px;width:100%}.chart-pair .source-note{line-height:1.65;max-width:550px}.chart-scroll{overflow:auto}.chart-scroll>div{max-width:none}
.question-controls{display:flex;align-items:end;gap:18px;flex-wrap:wrap;margin:20px 0 16px}.question-controls label,.diagram-tools label{display:grid;gap:5px;font-size:12px;color:var(--muted)}.question-controls label{min-width:170px}.track-tabs{display:flex;gap:0}.track-tabs button{border-radius:0;min-width:62px}.track-tabs button+button{margin-left:-1px}.track-tabs button:first-child{border-radius:5px 0 0 5px}.track-tabs button:last-child{border-radius:0 5px 5px 0}.track-tabs button[aria-pressed=true]{background:var(--data);color:#fff}.diagram-tools{display:flex;align-items:end;gap:18px;justify-content:space-between;margin:18px 0}.diagram-tools label{width:min(100%,460px)}#colonnade{min-width:710px}
#colonnade .edge-hit{stroke:transparent;stroke-width:12;fill:none;cursor:pointer}#colonnade .edge-line{stroke:#aaa9a2;stroke-width:.7;opacity:.65;fill:none}#colonnade .edge.active .edge-line,#colonnade .edge:focus .edge-line{stroke:var(--ink);stroke-width:2;opacity:1}#colonnade .edge:focus{outline:none}#colonnade text{fill:var(--ink)}#colonnade .draw{stroke-dasharray:1;stroke-dashoffset:1;animation:draw .7s cubic-bezier(.25,1,.5,1) forwards}#colonnade .node{cursor:pointer}#colonnade .node:focus{outline:none}#colonnade .node:focus circle{stroke:var(--accent);stroke-width:2}
#question-warning:empty{display:none}#question-table tr.selected{background:var(--soft)}#export-questions{margin-left:auto;font-size:13px}.warning{font-size:12px;line-height:1.7}#data-boundary{margin-top:28px;padding-top:18px}#data-boundary summary{font-size:13px;font-weight:600}#quality-count{color:var(--muted);font-weight:400;font-size:12px;margin-left:20px}#quality-note{color:var(--ink)}#rules{columns:2;column-gap:40px}#rules p{break-inside:avoid;line-height:1.75;font-size:12px}footer{margin-top:28px;font-size:11px}
dialog{background:#fff;padding:24px;box-shadow:0 24px 80px #0003}dialog::backdrop{background:#1f1e1c70;backdrop-filter:blur(2px)}.dialog-heading{align-items:flex-start;margin-bottom:16px}.dialog-heading h2{font-size:18px}dialog .table-scroll{max-height:50vh}dialog th{background:var(--soft)}dialog td{font-size:12px}dialog td:last-child{min-width:220px;max-width:380px}#student-body td:first-child{white-space:nowrap}.student-filter{display:flex;align-items:center;gap:14px;font-size:12px;color:var(--muted);margin-bottom:18px}.student-filter select{width:240px}#student-error{color:#9d3d26;padding:12px 0}
@keyframes draw{to{stroke-dashoffset:0}}
@media(min-width:1700px){main{padding-top:32px}}
@media(max-width:1150px){main{padding:24px}.topbar{padding:15px 24px}.filters{grid-template-columns:1.4fr 1fr 1.4fr}.filters button{justify-self:end}.ranking-heading{flex-wrap:wrap;gap:16px}.ranking-controls{width:100%;justify-content:flex-start}.scope-summary{gap:18px}.scope-summary>div{display:block}.scope-summary span{display:block;margin-top:3px}.chart-pair{gap:20px}.chart-pair>section+section{padding-left:20px}.kpis{gap:18px}.kpi strong{font-size:32px}.followup-item{padding:12px}}
@media(max-width:800px){main{padding:20px 18px}.topbar{padding:14px 18px}.kpis{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:22px}.kpi:nth-child(2){border-right:0}.kpi strong{font-size:30px}.followup-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.followup-item strong{font-size:22px}.chart-pair{grid-template-columns:1fr;gap:8px}.chart-pair>section+section{padding-left:0;border-left:0;border-top:1px solid var(--line)}.chart-pair .sub{min-height:0}.section-heading{flex-wrap:wrap}.question-controls{gap:12px}.question-controls label{flex:1;min-width:130px}#export-questions{width:100%;margin-left:0}.diagram-tools{flex-wrap:wrap}.diagram-tools label{width:100%}#rules{columns:1}.ranking-scroll{max-height:600px}.table-scroll{overscroll-behavior-x:contain}}
@media(max-width:520px){.brand{gap:8px;font-size:12px}.brand strong{font-size:14px}.brand>.lucide{width:18px;height:18px}.environment{font-size:10px;gap:4px}.environment .lucide{width:14px;height:14px}.topbar{padding:14px}.filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.filters button{justify-self:end}.scope-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.scope-summary strong{font-size:13px}.scope-summary span{font-size:11px;line-height:1.5}.kpis{column-gap:14px}.kpi{padding-right:10px}.kpi strong{font-size:29px}.kpi small{font-size:11px}.followup-item{gap:4px;padding:12px 10px}.followup-item span{font-size:12px}.followup-item small{font-size:10px}.followup-item strong{font-size:21px}.ranking-controls{display:grid;grid-template-columns:minmax(0,1fr) 80px 38px;gap:10px}.ranking-controls label:first-child{grid-column:1}.ranking-controls label:nth-child(3){grid-column:1/3;grid-row:2}.ranking-controls input,.ranking-controls input[type=number]{width:100%}.ranking-controls .icon-button{grid-column:3;grid-row:2}.snapshot{display:grid;gap:4px}.snapshot>span{font-size:11px}h1{font-size:24px}.active-scope{font-size:11px}.followup-heading{gap:8px;flex-wrap:wrap}.followup-heading .sub{font-size:11px}.followup-heading button{margin-left:0}.pager{gap:6px;font-size:11px}#teacher-breadcrumb{flex-wrap:wrap;gap:4px}#quality-count{display:block;margin:6px 0 0 18px}.student-filter{align-items:start;flex-direction:column;gap:5px}.student-filter select{width:100%}dialog{padding:16px}.dialog-heading h2{font-size:16px}dialog .table-scroll{max-height:45vh}.tabs{gap:18px}.tabs button{font-size:13px}}
@media(prefers-reduced-motion:reduce){#colonnade .draw{animation:none;stroke-dashoffset:0}}
/* Keep the first ranking rows in the initial desktop viewport. */
@media(min-width:801px){
  main{padding-top:16px}.topbar{min-height:48px;padding-top:10px;padding-bottom:10px}
  h1{font-size:25px}.eyebrow{font-size:11px;margin-bottom:4px}
  .snapshot{margin-top:8px;padding-top:0}.filters{margin-top:10px;gap:12px}.active-scope{padding-bottom:6px}
  .scope-summary{margin:10px 0}.kpis{padding:10px 0 12px}.kpi strong{font-size:34px;margin:7px 0}
  .followup-heading{padding:12px 0 9px}.followup-item{padding-top:8px;padding-bottom:8px;gap:3px 8px}.followup-item strong{font-size:22px}
  .insight{padding:7px 0 10px}.ranking-heading{margin-top:14px;margin-bottom:9px}#ranking-note{margin-bottom:8px}
  #teacher-breadcrumb{margin-bottom:12px}.teacher-followups{margin-top:16px}.tabs{margin-top:12px}.wave-heading{margin-top:20px}
}
@media(max-width:600px){
  #ranking-table{min-width:0;table-layout:fixed}
  #ranking-table th,#ranking-table td{padding:10px 8px}
  #ranking-table th:first-child,#ranking-table td:first-child{width:36px;padding-left:6px;padding-right:3px}
  #ranking-table th:nth-child(2),#ranking-table td:nth-child(2){min-width:0;max-width:none;width:auto}
  #ranking-table th:nth-child(n+3),#ranking-table td:nth-child(n+3){display:none}
  #ranking-table th.rank-selected,#ranking-table td.rank-selected{display:table-cell;width:112px}
  #ranking-table td:nth-child(2) small{overflow-wrap:anywhere;font-size:10px}
  .followup-item small{font-size:11px}
}
@media(max-width:360px){.followup-item span,.followup-item strong{grid-column:1/-1}.followup-item span{white-space:nowrap}}
.heading-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.heading-actions button,.update-toolbar button,#use-update{display:inline-flex;align-items:center;gap:7px}
#data-updates{width:720px;max-width:calc(100vw - 32px);max-height:90vh;overflow:auto}#data-updates h3{font-size:15px;margin:0 0 12px}
.update-toolbar{display:flex;gap:18px;align-items:center;flex-wrap:wrap}.update-toolbar span{font-size:13px}#update-progress{display:block;width:100%;height:6px;margin:18px 0;accent-color:#22211f}#update-progress[hidden]{display:none}
.update-stages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:0;list-style:none;gap:8px;margin:20px 0;font-size:12px;color:var(--muted)}.update-stages li{border-bottom:2px solid var(--line);padding-bottom:10px}.update-stages li[aria-current=true]{color:var(--ink);border-color:var(--accent);font-weight:600}
#update-error{color:#9d3d26;line-height:1.6}.update-result{margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}#update-summary{line-height:1.7}
.update-changes{display:grid;grid-template-columns:1fr auto;gap:10px;font-size:13px}.update-changes dt{color:var(--muted)}.update-changes dd{margin:0;font-variant-numeric:tabular-nums;text-align:right}.version-choice{display:grid;gap:6px;font-size:12px;margin:20px 0 12px}.version-choice select{max-width:100%;width:100%;font-size:13px}#update-view-version{overflow-wrap:anywhere;line-height:1.6}
@media(max-width:600px){.heading{flex-wrap:wrap;gap:12px}.heading-actions button{font-size:12px}#data-updates{padding:18px}#update-summary{font-size:13px}.update-stages{font-size:11px}.update-toolbar{gap:12px}.update-changes{font-size:12px}}
