
#growthWorkspace { --growth-focus:#4e7e76; }
:root.theme-dark #growthWorkspace { --growth-focus:#8dc6b9; }
#growthWorkspace .growth-layout { display:grid; grid-template-columns:180px minmax(0,1fr); min-height:0; align-items:start; }
#growthWorkspace .growth-student-index { display:flex; position:sticky; top:8px; height:auto; min-height:0; max-height:calc(100dvh - 150px); padding:10px 8px; border-right:1px solid var(--line); background:color-mix(in srgb,var(--growth-focus) 3%,var(--surface)); }
#growthWorkspace .growth-student-list { display:flex; flex-direction:column; flex-wrap:nowrap; gap:5px; min-width:0; overflow-y:auto; overflow-x:hidden; padding:0 3px 0 0; }
#growthWorkspace .growth-student-button { flex:0 0 auto; width:100%; min-height:40px; padding:7px 9px; border:1px solid transparent; border-radius:8px; box-shadow:none; font-size:13px; }
#growthWorkspace .growth-student-button.is-active { border-color:color-mix(in srgb,var(--growth-focus) 65%,var(--line)); background:color-mix(in srgb,var(--growth-focus) 10%,var(--surface)); font-weight:700; }
#growthWorkspace .growth-student-button:hover { background:var(--surface); border-color:var(--control-outline); }
#growthWorkspace .growth-student-button:focus-visible { outline:2px solid var(--growth-focus); outline-offset:-2px; }
#growthWorkspace .growth-student-seat { min-width:24px; font-size:11px; font-weight:500; color:var(--muted); }
#growthWorkspace .growth-student-identity > span:last-child { overflow:visible; white-space:normal; overflow-wrap:anywhere; text-overflow:clip; }
#growthWorkspace .growth-student-detail { padding:12px; }
#growthWorkspace .growth-detail-head { align-items:center; margin-bottom:12px; min-height:30px; }
#growthWorkspace .growth-detail-head h3 { display:flex; align-items:center; gap:8px; font-size:16px; font-weight:650; }
#growthWorkspace .growth-detail-seat { margin:0; padding:4px 6px; border-radius:6px; background:color-mix(in srgb,var(--growth-focus) 8%,var(--surface)); color:var(--growth-focus); font-weight:600; }
#growthWorkspace :is(.growth-ability-card,.growth-rank-card) { border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:none; overflow:hidden; }
#growthWorkspace .growth-visual-head { padding:10px 12px; gap:10px; flex-wrap:wrap; }
#growthWorkspace .growth-visual-head h4 { font-size:14px; font-weight:650; }
#growthWorkspace .growth-ability-body { grid-template-columns:minmax(0,1.15fr) minmax(180px,.85fr); min-height:300px; }
#growthWorkspace .growth-ability-group { padding:12px; }
#growthWorkspace .growth-ability-subject { border-radius:6px; padding:5px 8px; }
#growthWorkspace .growth-rank-charts { gap:12px; margin-top:12px; }
@media(max-width:1100px) { #growthWorkspace .growth-ability-body { grid-template-columns:minmax(0,1fr); } }
@media(max-width:760px) {
 #growthWorkspace .growth-layout { grid-template-columns:minmax(0,1fr); }
 #growthWorkspace .growth-student-index { position:static; top:auto; width:100%; max-height:none; padding:8px; border-right:0; border-bottom:1px solid var(--line); }
 #growthWorkspace .growth-student-list { flex-direction:row; width:100%; overflow-x:auto; overflow-y:hidden; padding:0 0 5px; gap:6px; overscroll-behavior-x:contain; scrollbar-width:thin; }
 #growthWorkspace .growth-student-button { width:auto; min-height:38px; padding:6px 8px; border-color:var(--line); background:var(--surface); }
 #growthWorkspace .growth-student-identity { gap:5px; }
 #growthWorkspace .growth-student-identity > span:last-child { white-space:nowrap; }
 #growthWorkspace .growth-student-detail { padding:10px 8px; }
 #growthWorkspace .growth-detail-head { margin-bottom:8px; }
 #growthWorkspace .growth-detail-head h3 { font-size:15px; }
 #growthWorkspace .growth-ability-body { min-height:0; }
 #growthWorkspace .growth-radar-legend { gap:9px; font-size:10px; }
 #growthWorkspace .growth-rank-charts { grid-template-columns:minmax(0,1fr); gap:10px; }
}

#growthWorkspace .growth-export-control { position:relative; margin-left:auto; }
#growthWorkspace .growth-rank-chart-card { border:1px solid var(--line); border-radius:12px; overflow:hidden; box-shadow:none; }
#growthWorkspace .growth-rank-chart-card > header { padding:10px 12px; background:var(--surface); }
#growthWorkspace .growth-rank-chart-scroll { scrollbar-width:thin; scrollbar-color:var(--control-outline) transparent; }
#growthWorkspace .growth-radar-current { fill:color-mix(in srgb,var(--accent) 8%,transparent); }

.growth-export-render { position:fixed; left:-20000px; top:0; width:1100px; pointer-events:none; }
#growthExportDialog { width:min(600px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); margin:auto; padding:20px; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); box-sizing:border-box; overflow:auto; }
#growthExportDialog::backdrop { background:#17233170; }
#growthExportDialog header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
#growthExportDialog h2 { margin:0; font-size:18px; font-weight:650; }
#growthExportDialog header p { margin:5px 0 0; font-size:12px; color:var(--muted); }
#growthExportDialog header button { display:grid; place-items:center; width:36px; min-height:36px; padding:0; border:1px solid var(--control-outline); border-radius:50%; background:var(--surface); color:var(--ink); font-size:24px; line-height:1; }
#growthExportDialog .growth-export-selection { display:flex; align-items:center; gap:12px; padding:10px 0; border-block:1px solid var(--line); font-size:13px; }
#growthExportDialog .growth-export-selection label { display:flex; align-items:center; gap:6px; margin:0; }
#growthExportDialog .growth-export-selection button { padding:5px 8px; min-height:30px; font-size:12px; }
#growthExportDialog [data-growth-export-count] { margin-left:auto; color:var(--muted); white-space:nowrap; }
#growthExportDialog input[type=checkbox] { appearance:auto; width:16px; height:16px; min-height:0; flex:0 0 16px; margin:0; padding:0; accent-color:var(--accent); }
#growthExportDialog .growth-export-students { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; max-height:38dvh; overflow:auto; padding:12px 1px; }
#growthExportDialog .growth-export-students label { display:flex; align-items:center; gap:7px; min-height:40px; margin:0; padding:7px 8px; border:1px solid var(--line); border-radius:8px; font-size:13px; cursor:pointer; }
#growthExportDialog .growth-export-students label:has(:checked) { border-color:color-mix(in srgb,var(--accent) 55%,var(--line)); background:color-mix(in srgb,var(--accent) 5%,var(--surface)); }
#growthExportDialog .growth-export-seat { color:var(--muted); min-width:18px; text-align:center; font-size:11px; }
#growthExportDialog .growth-export-format { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:12px; border-top:1px solid var(--line); font-size:13px; }
#growthExportDialog select { width:auto; max-width:72%; height:38px; min-height:38px; margin:0; padding:5px 10px; border:1px solid var(--control-outline); border-radius:8px; background:var(--surface); color:var(--ink); }
#growthExportDialog [role=status] { margin:8px 0; font-size:12px; color:var(--muted); }
#growthExportDialog [role=status]:empty { display:none; }
#growthExportDialog footer { display:grid; grid-template-columns:1fr 1.4fr; gap:10px; margin-top:16px; }
#growthExportDialog footer button { min-height:40px; padding:8px; }
#growthWorkspace .growth-ability-group { border-color:var(--line); }
#growthWorkspace .growth-rank-card-meta small { font-size:11px; }
@media(max-width:760px) { #growthExportDialog { padding:16px; } #growthExportDialog .growth-export-students { grid-template-columns:repeat(2,minmax(0,1fr)); } }
/* Rank trends: quiet axes, one stable color per series, readable exam spacing. */
#growthWorkspace .growth-rank-chart-card { --growth-chart-color:#347d73; background:var(--surface); }
#growthWorkspace .growth-rank-chart-card.is-grade { --growth-chart-color:#527da8; }
:root.theme-dark #growthWorkspace .growth-rank-chart-card { --growth-chart-color:#87cabe; }
:root.theme-dark #growthWorkspace .growth-rank-chart-card.is-grade { --growth-chart-color:#94bce5; }
#growthWorkspace .growth-rank-chart-card > header { min-height:48px; padding:12px 16px; gap:10px; border-bottom:0; }
#growthWorkspace .growth-rank-chart-card h4 { font-size:14px; font-weight:650; }
#growthWorkspace .growth-rank-card-meta { display:flex; flex-direction:row; flex-wrap:wrap; gap:12px; align-items:center; font-size:11px; color:var(--muted); }
#growthWorkspace .growth-rank-card-meta strong { font-size:15px; color:var(--growth-chart-color); font-variant-numeric:tabular-nums; }
#growthWorkspace .growth-rank-chart { height:auto; min-width:100%; }
#growthWorkspace .growth-chart-line { stroke-width:2; }
#growthWorkspace .growth-chart-point circle { stroke-width:1.8; }
#growthWorkspace .growth-chart-point.is-latest circle:not(.growth-chart-point-halo) { fill:var(--growth-chart-color); stroke:var(--surface); stroke-width:2; }
#growthWorkspace .growth-chart-point .growth-chart-point-halo { fill:var(--growth-chart-color); stroke:none; opacity:.13; }
#growthWorkspace .growth-chart-point text { font-size:11px; font-weight:600; fill:var(--growth-chart-color); paint-order:stroke; stroke:var(--surface); stroke-width:4px; stroke-linejoin:round; }
#growthWorkspace .growth-chart-point:focus { outline:none; }
#growthWorkspace .growth-chart-point:focus circle { stroke:var(--ink); stroke-width:3; }
#growthWorkspace .growth-chart-grid-line { stroke:var(--line); stroke-dasharray:2 5; stroke-width:.8; }
#growthWorkspace .growth-chart-semester-divider { stroke:var(--line); stroke-dasharray:3 6; opacity:.65; }
#growthWorkspace .growth-chart-semester-label { font-weight:500; font-size:10px; fill:var(--muted); }
#growthWorkspace .growth-chart-exam-label { font-size:10px; font-weight:500; fill:var(--ink); }
#growthWorkspace .growth-chart-axis-label { font-size:10px; }
@media(max-width:760px) { #growthWorkspace .growth-rank-chart-card > header { padding:10px 12px; } #growthWorkspace .growth-rank-card-meta { gap:8px; } #growthWorkspace .growth-rank-chart-scroll { overflow-x:auto; overscroll-behavior-x:contain; } }
#growthWorkspace .growth-rank-card-meta > span { display:inline-flex; align-items:baseline; gap:4px; width:auto; height:auto; min-width:0; padding:0; border:0; border-radius:0; background:none; white-space:nowrap; color:var(--muted); }
