.weight-panel{margin:0 10px 8px;border:1px solid #b9cbea;border-radius:8px;background:#f6f9ff;min-width:0;flex-shrink:0}
.weight-panel>summary{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;padding:10px 12px;min-height:44px;cursor:pointer;font-size:.86rem}
.weight-panel>summary::before{content:"";border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:6px solid currentColor}
.weight-panel[open]>summary::before{transform:rotate(90deg)}
.weight-panel>summary>span{font-size:.75rem;color:#53677e;margin-left:auto}
.weight-panel-body{padding:0 12px 12px;max-height:38vh;overflow:auto;overscroll-behavior:contain;font-size:.85rem}
.weight-panel .caption{font-size:.77rem;line-height:1.5}
.weight-mode{display:flex;align-items:start;flex-wrap:wrap;gap:8px 18px;border:0;padding:8px 0;margin:0;min-width:0}
.weight-mode legend{font-weight:650;padding-top:7px}
.weight-mode label{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-height:38px;cursor:pointer}
.weight-mode input{width:20px;height:20px;flex:none;accent-color:var(--blue)}
.weight-mode small{font-size:.74rem;color:#53677e}
.weight-actions{margin:9px 0}.weight-actions .button{font-size:.8rem;min-height:40px}
.weight-empty{margin:8px 0;padding:8px;background:#fff;border:1px dashed #b9cbea;border-radius:5px;font-size:.8rem;overflow-wrap:anywhere}
.weight-class-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(145px,100%),1fr));gap:8px;margin:10px 0}
.weight-class-total{padding:8px;border:1px solid var(--line);background:#fff;border-radius:6px;min-width:0}
.weight-class-total strong{display:flex;justify-content:space-between;flex-wrap:wrap;gap:5px;font-variant-numeric:tabular-nums}
.weight-class-total meter{width:100%;height:16px}.weight-class-total small{color:#53677e;font-size:.74rem}
.weight-breakdown{margin:9px 0}.weight-breakdown>summary{cursor:pointer;min-height:36px;display:flex;align-items:center;font-weight:600}
.weight-breakdown section{padding:8px;border-top:1px solid var(--line)}.weight-breakdown ul,.weight-result ul{padding-left:20px;margin:6px 0}
.weight-breakdown p,.weight-result p{overflow-wrap:anywhere}.weight-result{border-top:1px solid var(--line);padding-top:9px}.weight-result:empty{display:none}
.weight-result h3{font-size:.92rem}.weight-result>.button{margin-top:8px}
.weight-guide section{padding:12px 0;border-bottom:1px solid var(--line)}.weight-guide h3{margin:3px 0 8px}.weight-guide ol{padding-left:24px;margin:8px 0}.weight-guide li{padding:3px 0;line-height:1.6}
.weight-item-editor{display:grid;gap:9px;margin:12px 0}.weight-item-editor>[data-weight-item]{display:grid;grid-template-columns:minmax(0,1fr) minmax(90px,.35fr) auto;gap:8px;align-items:end;padding-bottom:10px;border-bottom:1px solid var(--line)}
.weight-item-editor label,.weight-search{display:grid;gap:5px;font-size:.86rem;min-width:0}
.weight-item-editor input,.weight-search input,.weight-edit-table input[type=number]{width:100%;min-height:42px;border:1px solid #b8c9df;border-radius:5px;padding:7px 8px;font:inherit;min-width:0}
.weight-search{margin:12px 0}.weight-people-table{max-height:43vh;overflow:auto;max-width:100%;border:1px solid var(--line);border-radius:6px}
.weight-edit-table{border-collapse:collapse;width:100%;font-size:.85rem}.weight-edit-table th,.weight-edit-table td{padding:8px;text-align:left;border-bottom:1px solid var(--line);white-space:normal;vertical-align:top}
.weight-edit-table thead th{position:sticky;top:0;z-index:1;background:#edf3ff;font-weight:650}
.weight-edit-table tbody th{position:static;font-weight:400;min-width:115px;max-width:160px;overflow-wrap:anywhere}
.weight-edit-table tbody th small{display:block;color:#53677e;font-size:.75rem;margin-top:3px;white-space:nowrap}
.weight-edit-table input[type=number]{width:7.5rem;max-width:100%}.weight-edit-table output{font-variant-numeric:tabular-nums;font-weight:650}
.weight-label-choices{display:flex;flex-wrap:wrap;gap:5px 10px;min-width:145px}
.weight-label-choices label{display:flex;align-items:center;gap:5px;min-height:36px;padding:3px 5px;overflow-wrap:anywhere;cursor:pointer}
.weight-label-choices input{width:20px;height:20px;accent-color:var(--blue);flex:none}.weight-label-choices small{color:#53677e;white-space:nowrap}
.weight-pagination{margin:12px 0;justify-content:space-between;font-size:.85rem;flex-wrap:wrap}.weight-pagination .button{font-size:.83rem}
.student-weight{font-size:.74rem;color:#284c92;background:#e8efff;padding:1px 5px;border-radius:4px;white-space:nowrap}
@media(max-width:720px){.weight-panel{margin:0 8px 8px}.weight-panel-body{max-height:48vh}.weight-mode{display:grid;gap:3px}.weight-actions>.button{flex:1 1 180px}.weight-item-editor>[data-weight-item]{grid-template-columns:minmax(0,1fr) 90px}.weight-item-editor [data-weight-remove]{grid-column:1/-1;justify-self:start}.weight-edit-table{font-size:.8rem}.weight-edit-table th,.weight-edit-table td{padding:7px}.weight-edit-table tbody th{min-width:105px}.weight-label-choices{min-width:135px}.weight-people-table{max-height:44vh}}
@media print{.weight-panel{display:none!important}}
