/* Light operational surfaces. Comfortaa remains the shared typeface.
   Screen-only: printed registers/timetables keep their established layouts. */
@media screen{
 :root{--data-line:#bac9bf;--data-divider:#d1dbd4;--data-header:#e4ece5;--data-alternate:#f4f7f3;--data-hover:#eaf1e9}
 :is(.student-surface,.aw-surface):has(table),.reg-surface{border:1px solid var(--data-line);border-radius:6px;box-shadow:none}
 .table-scroll{border:1px solid var(--data-line);border-radius:4px;background:#fff}
 .student-surface>.table-scroll,.student-surface>#student-results>.table-scroll{border-width:0;border-radius:0}
 :is(#main,#student-dialog) table:not(.tt-grid,.hm-table,.print-table){background:#fff}
 :is(#main,#student-dialog) table:not(.tt-grid,.hm-table,.print-table)>thead>tr>th{
  background:var(--data-header);color:#2c4d3a;font-weight:700;font-size:12px;line-height:1.4;
  padding:12px 14px;border-bottom:2px solid #98af9e
 }
 :is(#main,#student-dialog) table:not(.tt-grid,.hm-table,.print-table)>tbody>tr>td{
  padding:11px 14px;border-bottom:1px solid var(--data-divider);line-height:1.5;font-size:13px
 }
 :is(#main,#student-dialog) table:not(.tt-grid,.hm-table,.print-table)>:is(thead,tbody)>tr>:is(th,td)+:is(th,td){border-left:1px solid #d9e2db}
 :is(#main,#student-dialog) table:not(.tt-grid,.hm-table,.print-table)>tbody>tr:nth-child(even){background:var(--data-alternate)}
 :is(#main,#student-dialog) table:not(.tt-grid,.hm-table,.print-table)>tbody>tr:hover{background:var(--data-hover)}
 :is(#main,#student-dialog) table:not(.tt-grid,.hm-table,.print-table)>tbody>tr:focus-within{outline:2px solid #88a38e;outline-offset:-2px}
 .table-scroll>table>thead>tr>th{position:sticky;top:0;z-index:3}
 .student-surface>.filters,.student-surface>.tabs,.aw-nav,.reg-head{background:#f0f4ef;border-bottom:1px solid var(--data-line)}
 .student-surface>.filters{padding:14px 18px;gap:16px}
 .student-surface>.tabs{padding-inline:18px}
 .pagination{background:#f0f4ef;border-top:1px solid var(--data-line);padding:12px 18px}
 .student-surface:not(.reg-surface) .student-name{font-size:14px;line-height:1.45}
 .student-surface:not(.reg-surface) .avatar{width:30px;height:30px;font-size:11px}
 .staff-directory-table table{white-space:normal}
 .staff-directory-table td{overflow-wrap:anywhere;min-width:160px}
 .staff-directory-table td:nth-child(2){min-width:220px}
 #main .staff-directory-table td:nth-child(3){min-width:250px;font-size:12px}
 .staff-directory-table td:last-child:has(button:not(.staff-pill)){min-width:90px}
 #main .staff-directory-table .staff-group-heading th{
  background:#eef3ec;color:#36513d;border-top:2px solid #a8bdad;border-bottom:1px solid var(--data-line);
  padding:9px 14px;font-size:12px;letter-spacing:.02em;font-weight:700
 }
 .staff-directory-table .staff-group-heading span{background:transparent;color:#5e7464;padding:0;margin-left:8px;border-radius:0;font-size:11px}
 .staff-directory-table .staff-pill{font-weight:700;font-size:13px}
 .reg-head,.reg-bar{border-bottom:2px solid var(--data-line)}
 .reg-list{padding-top:0}
 .reg-row{border-bottom:1px solid #b1c5b7}
 .reg-num{color:#5e7366;font-variant-numeric:tabular-nums}
 .reg-state{border-left:1px solid #b1c5b7;padding-left:12px}
 .reg-bar{box-shadow:0 2px 0 #d1dbd4}
 .tt-grid th,.tt-grid td{border-color:var(--data-line)}
 .tt-grid thead th{border-bottom:2px solid #96ac9b}
 .tt-grid tbody th{border-right:2px solid #afc1b4}
 .tt-grid .tt-band td{border-top:1px solid var(--data-line);border-bottom:1px solid var(--data-line)}
 .tt-panel:has(table){border:1px solid var(--data-line);border-radius:6px;box-shadow:none}
 .tt-panel-head{padding-bottom:14px;border-bottom:1px solid var(--data-line);margin-bottom:16px}
 .marksheet td,.marksheet th{font-variant-numeric:tabular-nums}
 @media(max-width:650px){
  :is(#main,#student-dialog) table:not(.tt-grid,.hm-table,.print-table)>tbody>tr>td{padding:10px 12px}
  .reg-state{border-left:0;padding-left:0}
 }
}
/* Keep the student identity readable beside the history strip and mark controls. */
@media screen{
 .reg-row{grid-template-columns:24px minmax(230px,1fr) auto;grid-template-areas:'number name marks' 'number strip marks' 'number state marks';gap:5px 16px;padding:12px 18px}
 .reg-row>.reg-num{grid-area:number}
 .reg-row>.student-name{grid-area:name;font-size:16px;gap:10px}
 .reg-row>.student-name>span:last-child{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
 .reg-row>.reg-strip{grid-area:strip;order:initial}
 .reg-row>.reg-state{grid-area:state;display:block;border:0;padding:0;white-space:normal;font-size:12px}
 .reg-row>.reg-marks{grid-area:marks;gap:8px}
 .reg-row .reg-mark{width:88px;height:52px;font-size:14px;border-radius:7px}
 .reg-row .avatar{width:34px;height:34px;font-size:11px}
 @media(max-width:1000px){
  .reg-row{grid-template-columns:24px minmax(0,1fr);grid-template-areas:'number name' 'number strip' 'number state' 'number marks';gap:8px 12px}
  .reg-row>.reg-marks{flex-wrap:wrap}
 }
 @media(max-width:650px){
  .reg-row{grid-template-columns:minmax(0,1fr);grid-template-areas:'name' 'strip' 'state' 'marks';padding:12px}
  .reg-row>.reg-num{display:none}
  .reg-row>.reg-marks{gap:6px;flex-wrap:nowrap}
  .reg-row .reg-mark{width:auto;min-width:0;flex:1;font-size:12px;gap:4px}
  .reg-row .reg-ico{font-size:13px}
 }
}
.sibling-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.sibling-row>button:first-child{text-align:left;white-space:normal}.sibling-row>button:last-child{flex-shrink:0}
.sibling-link{margin-top:14px}.sibling-link summary{cursor:pointer;color:var(--green);font-weight:700}
#sibling-form{display:grid;gap:12px;margin-top:14px}#sibling-form select{width:100%;min-width:0;padding:10px;border:1px solid #bac9bf;border-radius:5px;font:inherit;background:#fff}
#sibling-form p{font-size:12px}#sibling-form button{justify-self:start}#sibling-error{color:#8a3030;font-size:13px;margin-top:10px}
