:root{--ink:#1d2939;--muted:#667085;--border:#dee3e8;--bg:#f4f6f9;--blue:#2563eb;--pale:#edf4ff;--green:#12805c}*{box-sizing:border-box}body{margin:0;background:var(--bg);font:14px/1.5 -apple-system,BlinkMacSystemFont,'Helvetica',Arial,sans-serif;color:var(--ink)}button,input,select,textarea{font:inherit}button{border:1px solid #d0d8e2;border-radius:8px;background:#fff;color:#253244;padding:9px 13px;cursor:pointer;font-weight:600}button:hover{background:#f5f7fb}button:disabled{opacity:.45;cursor:not-allowed}.primary{color:#fff;background:#1763cf;border-color:#1763cf}.primary:hover{background:#1355ad}.secondary{background:#f0f5ff;border-color:#bbcef1;color:#1e4db5}.ghost{border:0;background:transparent}.hide{display:none!important}.muted,small{color:var(--muted)}small{font-size:12px}.error,.warning{border-radius:8px;padding:10px 12px}.error{color:#b42318;background:#fee}.warning{background:#fff6e2;border:1px solid #f3d4a5;color:#72501f}.pill{border:1px solid #bfdbfe;color:#1d4ed8;background:#eff6ff;border-radius:20px;padding:4px 8px;font-size:12px}.logo{display:flex;gap:9px;align-items:center;font-size:18px;font-weight:750;color:#132846}.logo span{white-space:nowrap}.topbar{height:65px;background:#fff;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;padding:0 28px}.rightbar{display:flex;align-items:center;gap:14px}.layout{min-height:calc(100vh - 65px);display:flex}.sidebar{width:235px;flex-shrink:0;background:white;border-right:1px solid var(--border);padding:22px 12px;display:flex;flex-direction:column;gap:4px}.navsmall{padding:0 12px 10px;color:#8c97a5;letter-spacing:.09em;font-weight:700;font-size:11px}.nav{text-align:left;border:0;background:transparent;padding:12px 14px;color:#425466;font-weight:650}.nav.active{color:#1d56aa;background:#ecf3ff}
.sidebar .sidebar-group{display:flex;align-items:center;gap:10px;margin:6px 0 4px;padding:0 14px;min-height:43px;box-sizing:border-box;border-radius:9px;background:#edf3ff;color:#213957;font-size:15px;font-weight:750}
.sidebar .sidebar-group-icon{display:inline-flex;align-items:center;justify-content:center;width:21px;flex:0 0 21px;font-size:18px;line-height:1}
.sidebar .sidebar-group-admin{margin-top:44px}
.sidebar .nav{padding-left:25px}
.sidebar-bottom{margin-top:auto;padding:16px 12px;color:#607080;font-size:12px;border-top:1px solid #e8eaef}.sidebar-bottom p{line-height:1.8}.main{padding:28px 34px;width:calc(100% - 235px);max-width:1700px;margin:0 auto}.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}.page-head h2{font-size:26px;letter-spacing:-.5px;margin:0}.page-head p{margin:2px 0 0}.card{background:#fff;border:1px solid #e0e5ec;border-radius:12px;padding:20px;margin-bottom:16px;box-shadow:0 1px 4px #18223008}.toolbar{display:flex;gap:12px}.toolbar input{flex:1}input,select,textarea{width:100%;padding:9px 11px;min-height:40px;background:#fff;border:1px solid #ced6e0;border-radius:7px;color:#202939}input:focus,select:focus,textarea:focus{outline:2px solid #cbe0ff;border-color:#4b8ee7}.student-table{overflow-x:auto}.student-row{display:grid;grid-template-columns:1fr 150px 150px 120px;gap:12px;border-bottom:1px solid #eff0f4;padding:15px 4px;align-items:center}.student-row:last-child{border:0}.student-row strong{font-size:15px}.student-row small{display:block}.actions{display:flex;gap:8px;flex-wrap:wrap}.report-toolbar{display:flex;align-items:end;gap:14px;flex-wrap:wrap}.report-toolbar label{min-width:180px;font-size:12px;font-weight:650}.report-toolbar label select,.report-toolbar label input{display:block;margin-top:5px}.tabs{display:flex;gap:5px;overflow:auto;max-width:980px;margin:0 auto}.tabs button{border-radius:7px 7px 0 0;min-width:60px}.tabs button.active{background:#1763cf;border-color:#1763cf;color:white}.paper{width:100%;max-width:960px;margin:0 auto 26px;background:white;padding:44px 52px 64px;box-shadow:0 5px 24px #34405420;min-height:1040px;color:#111;font-family:Helvetica,Arial,sans-serif;font-size:11.5pt;line-height:1.22}.paper h1{font-size:16.5pt;text-align:center;text-decoration:underline;margin:0 0 13px;font-weight:700}.student-meta{display:grid;grid-template-columns:1fr 1fr;column-gap:32px;row-gap:7px;font-weight:700;font-size:10.5pt}.student-meta label{display:flex;align-items:center;gap:6px;white-space:nowrap}.student-meta input{padding:2px;border:0;border-bottom:1px dotted #bdc5cc;border-radius:0;font:inherit;font-weight:700;min-height:25px;min-width:0;flex:1}.symbols{margin:21px 0 27px 1px;font-size:9.5pt}.symbols div{display:flex;gap:20px;margin:6px 0}.symbols div span{padding-left:0}.iep-table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:11pt;line-height:1.17}.iep-table th,.iep-table td{border:1px solid #222;padding:4px 5px;vertical-align:top;overflow-wrap:anywhere;white-space:normal}.iep-table thead th{font-weight:700;text-align:center}.iep-table td{height:45px}.iep-table tr.section td{font-weight:700;height:27px}.cell-wrap{display:flex;flex-direction:column;min-height:42px}.cell-select{font:inherit;border:0;border-radius:0;padding:2px 18px 2px 0;min-height:26px;line-height:1.15;white-space:normal;width:100%;max-width:100%;background:transparent;color:#151515;cursor:pointer}.cell-select:focus{outline:1px solid #91b5eb}.cell-static{display:none;white-space:pre-wrap;overflow-wrap:anywhere}.cell-text{font:inherit;border:0;border-radius:0;padding:0;min-height:38px;resize:vertical;line-height:1.15;color:#111}.cell-text:focus{outline:1px dashed #6b99dc}.print-footer{text-align:right;font-size:8pt;color:#757575;margin-top:18px}.formbox{max-width:630px;display:flex;flex-direction:column;gap:15px}.formbox label{display:block;font-weight:650;font-size:13px}.formbox label input,.formbox label select{margin-top:6px}.cards2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.login-shell{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#f1f6ff,#ecf4f6)}.login-card{background:#fff;border:1px solid #e0e5eb;padding:36px;width:420px;max-width:94vw;border-radius:18px;box-shadow:0 20px 50px #1d29391c;display:flex;flex-direction:column;gap:13px}.login-card h1{font-size:23px;line-height:1.2;margin:9px 0 0}.login-card p{margin:0}.login-card label{font-weight:600}.login-card input{display:block;margin-top:7px}.login-card small{line-height:1.5}#notice{background:#eaf6ed;color:#155e37;padding:10px 14px;border:1px solid #bee5cb;border-radius:8px;margin:0 0 18px}dialog{width:min(780px,95vw);border:1px solid #d0d7e0;border-radius:15px;padding:22px;box-shadow:0 25px 60px #0004}dialog::backdrop{background:#16212da8}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h3{margin:0}#source-content{white-space:pre-wrap;max-height:62vh;overflow:auto;font-size:12px;border:1px solid #eee;background:#f7f9fb;padding:12px}.report-toolbar button{margin-bottom:1px}#import-preview{max-height:260px;overflow:auto}#teacher-table,#transfer-history{font-size:13px;white-space:pre-wrap}#teacher-table>div,#transfer-history>div{padding:10px;border-bottom:1px solid #eee}
@media(max-width:1100px){.topbar{padding:0 14px}.sidebar{width:55px;padding:10px 3px}.sidebar .nav{font-size:0;text-align:center;padding:14px 5px}.sidebar .nav:first-letter{font-size:18px}.navsmall,.sidebar-bottom,.sidebar .sidebar-group{display:none}.main{width:calc(100% - 55px);padding:18px 10px}.page-head{align-items:start;flex-direction:column}.report-toolbar{gap:9px}.paper{padding:20px 15px 42px;font-size:9pt;min-height:700px}.paper h1{font-size:12pt}.student-meta{font-size:8pt;gap:4px}.symbols{font-size:8pt}.iep-table{font-size:9pt}.iep-table th,.iep-table td{padding:3px}.student-row{grid-template-columns:1fr 85px}.student-row .student-class{display:none}.cards2{grid-template-columns:1fr}.rightbar #user-display{display:none}}
@media print{@page{size:A4 portrait;margin:14mm 15mm 13mm}body{background:white!important;color:black!important}.topbar,.sidebar,.page-head,.report-toolbar,.tabs,#notice,.print-footer,#login{display:none!important}.layout,.main,#report-view{display:block!important;margin:0!important;padding:0!important;width:100%!important;max-width:none!important}.view:not(#report-view){display:none!important}.paper{box-shadow:none!important;border:0!important;min-height:0!important;margin:0!important;padding:0!important;max-width:none!important;width:100%!important;font-family:Helvetica,Arial,sans-serif;font-size:10.5pt;line-height:1.15}.paper h1{font-size:15pt;margin:0 0 10px}.student-meta{font-size:10pt}.student-meta input{border:0!important;padding:0!important;font-size:10pt}.symbols{font-size:9pt;margin:19px 0 22px}.iep-table{font-size:10pt;width:100%;table-layout:fixed}.iep-table tr{break-inside:avoid;page-break-inside:avoid}.iep-table td,.iep-table th{border:1px solid #000!important;padding:3px 4px}.cell-select,.cell-text{display:none!important}.cell-static{display:block!important}.cell-wrap{min-height:0}.iep-table td{height:39px}.iep-table tr.section td{height:24px}#printable{display:block!important}}

.import-check{display:flex!important;align-items:flex-start;gap:10px;background:#f0f6ff;padding:12px;border-radius:9px;line-height:1.45}.import-check input{width:18px!important;height:18px;min-height:18px;margin-top:2px;flex-shrink:0}.import-row{border-bottom:1px solid #eee;padding:10px 0}.import-row:last-child{border-bottom:0}.import-warn{display:block;font-size:12px;color:#9b4f00}.import-sample{color:#445;display:block;margin-top:5px;font-size:12px}.import-actions{display:flex;gap:10px;flex-wrap:wrap}

/* v3: full IEP print support. Generated print sheets remain hidden while editing. */
#print-only-pages{display:none}
.print-option{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;white-space:nowrap}
.print-option select{min-height:34px;width:175px;padding:5px 6px;font-size:12px}
@media print{
  /* Hide the interactive editor completely: avoids extra blank pages in Safari. */
  #printable{display:none!important}
  #print-only-pages{display:block!important;width:100%!important;margin:0!important;padding:0!important}
  .print-sheet{display:block!important;box-shadow:none!important;margin:0!important;padding:0!important;color:#111;font-family:Helvetica,Arial,sans-serif;font-size:10.5pt;line-height:1.15;break-after:page;page-break-after:always;}
  .print-sheet:last-child{break-after:auto;page-break-after:auto}
  .print-sheet h1{font-size:15pt;margin:0 0 10px;text-align:center;text-decoration:underline;font-weight:bold}
  .print-sheet .student-meta{display:grid;grid-template-columns:1fr 1fr;gap:7px 32px;font-size:10pt;font-weight:700}
  .print-sheet .symbols{margin:19px 0 22px;font-size:9pt}
  .print-sheet .symbols div{display:flex;gap:20px;margin:6px 0}
  .print-sheet .iep-table{font-size:10pt;line-height:1.15;width:100%;table-layout:fixed;border-collapse:collapse}
  .print-sheet .iep-table th,.print-sheet .iep-table td{border:1px solid #000!important;padding:3px 4px;vertical-align:top;white-space:pre-wrap;overflow-wrap:break-word}
  .print-sheet .iep-table td{min-height:32px;height:auto}
  .print-sheet .iep-table tr{break-inside:avoid;page-break-inside:avoid}
  .print-sheet .iep-table thead{display:table-header-group}
  .print-sheet .iep-table tr.section td{font-weight:700}
  .print-sheet-label{font-size:8pt;color:#555;text-align:right;margin-top:8px}
  .print-option{display:none!important}
}


/* v4 Apple Numbers reference PDF layout — intentionally separate from the screen editor. */
@page numbers-page-0 {size:670pt 837pt;margin:0}
@page numbers-page-1 {size:670pt 792pt;margin:0}
@page numbers-page-2 {size:670pt 792pt;margin:0}
@page numbers-page-3 {size:670pt 792pt;margin:0}
@page numbers-page-4 {size:670pt 808pt;margin:0}
@page numbers-page-5 {size:670pt 820pt;margin:0}
@page numbers-page-6 {size:670pt 912pt;margin:0}
@page numbers-page-7 {size:670pt 794pt;margin:0}
@page numbers-page-8 {size:670pt 792pt;margin:0}
@page numbers-page-other {size:670pt 1000pt;margin:0}
@media print {
 #print-only-pages{display:block!important;padding:0!important;margin:0!important;width:670pt!important;max-width:none!important}
 .numbers-print-sheet{position:relative!important;display:block!important;box-sizing:border-box!important;min-height:0!important;height:var(--numbers-height)!important;width:670pt!important;max-width:none!important;margin:0!important;padding:0!important;background:white!important;color:#000!important;break-after:page;page-break-after:always;font:12pt/14pt Helvetica,Arial,sans-serif!important;overflow:visible!important}
 .numbers-print-sheet:last-child{break-after:auto!important;page-break-after:auto!important}
 .numbers-page-0{page:numbers-page-0}.numbers-page-1{page:numbers-page-1}.numbers-page-2{page:numbers-page-2}.numbers-page-3{page:numbers-page-3}.numbers-page-4{page:numbers-page-4}.numbers-page-5{page:numbers-page-5}.numbers-page-6{page:numbers-page-6}.numbers-page-7{page:numbers-page-7}.numbers-page-8{page:numbers-page-8}.numbers-page-other{page:numbers-page-other}
 .numbers-heading{position:absolute;top:76pt;left:72pt;width:524pt;height:136pt;color:#000}
 .numbers-heading h1{position:absolute;top:0;left:0;margin:0;width:524pt!important;height:18pt;font:700 16pt/18pt Helvetica,Arial,sans-serif!important;text-align:center!important;text-decoration:underline!important;white-space:nowrap}
 .numbers-details{position:absolute;top:22pt;left:2pt;width:520pt;display:grid;grid-template-columns:303pt 217pt;grid-auto-flow:row;row-gap:9.5pt;font:700 12pt/14pt Helvetica,Arial,sans-serif!important}
 .numbers-details div{white-space:nowrap;overflow:visible}
 .numbers-details div:nth-child(2){grid-column:2;grid-row:1}
 .numbers-details div:nth-child(3){grid-column:1;grid-row:2}
 .numbers-details div:nth-child(4){grid-column:2;grid-row:2}
 .numbers-legend{position:absolute;top:78pt;left:2pt;font:10pt/10pt Helvetica,Arial,sans-serif!important}
 .numbers-legend div{height:18pt;white-space:nowrap}
 .numbers-table{position:absolute!important;top:90pt;left:72pt;border-collapse:collapse!important;table-layout:fixed!important;width:524pt!important;max-width:524pt!important;font:12pt/14pt Helvetica,Arial,sans-serif!important;color:#000!important}
 .numbers-first .numbers-table{top:224.5pt!important}
 .numbers-table col:nth-child(1){width:90pt!important}.numbers-table col:nth-child(2){width:183pt!important}.numbers-table col:nth-child(3){width:30pt!important}.numbers-table col:nth-child(4){width:150pt!important}.numbers-table col:nth-child(5){width:71pt!important}
 .numbers-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
 .numbers-table th,.numbers-table td{box-sizing:border-box!important;border:.55pt solid #111!important;vertical-align:top!important;padding:2pt!important;margin:0!important;min-height:0!important;height:auto!important;overflow:visible!important;white-space:pre-wrap!important;overflow-wrap:break-word!important;word-break:normal!important;letter-spacing:normal!important;color:#000!important;font:12pt/14pt Helvetica,Arial,sans-serif!important;text-align:left}
 .numbers-table th{font-weight:700!important;line-height:14pt!important;vertical-align:middle!important;padding:1pt 2pt!important;text-align:center!important;white-space:nowrap!important;height:17.2pt!important}
 .numbers-table td{padding-top:3pt!important}
 .numbers-table .numbers-section td{font-weight:700!important}
 .numbers-table .numbers-spacer td{font-weight:400!important}
 .numbers-table thead{display:table-header-group}
 .print-sheet-label{display:none!important}
}

/* v6: make the real export action obvious. */
.export-btn{border-color:#1d63c8;background:#edf4ff;color:#174f9b;font-weight:750}
.export-btn:hover{background:#dbeafe}
.export-context{flex-basis:100%;display:block;font-size:12px;color:#175696}
@media print{.export-context{display:none!important}}
.mobile-scroll-hint{display:none}
@media(max-width:1100px){
 .mobile-scroll-hint{display:block;color:#435f88;font-size:12px;margin:8px 4px}
 .paper-scroll{width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;background:#fff}
 .paper-scroll .paper{width:960px;min-width:760px;max-width:none;margin:0;min-height:1040px;padding:44px 52px 64px;font-size:11.5pt}
 .paper-scroll .paper h1{font-size:16.5pt}
 .paper-scroll .student-meta{font-size:10.5pt;gap:7px 32px}
 .paper-scroll .symbols{font-size:9.5pt}
 .paper-scroll .iep-table{font-size:11pt}
 .paper-scroll .iep-table th,.paper-scroll .iep-table td{padding:4px 5px}
}
@media print{.mobile-scroll-hint{display:none!important}.paper-scroll{overflow:visible!important;width:100%!important}}
@media(max-width:1100px){.toolbar{flex-wrap:wrap}.toolbar input{flex:1 1 220px;min-width:180px}.toolbar select{flex:0 1 220px;width:auto;min-width:180px}}
@media(max-width:500px){.toolbar input,.toolbar select{flex-basis:100%;width:100%}}

/* v7: make the report identity/date controls visibly editable. */
.student-meta input:not([disabled]){border-bottom:1px solid #9ab5dc!important;background:#fbfdff;border-radius:3px;padding:3px 5px;cursor:text}.student-meta input:focus{outline:2px solid #8cb7fb;outline-offset:1px;background:#fff}.meta-hint{font-size:12px;color:#527196;margin:8px 0 1px;line-height:1.4}@media print{.meta-hint{display:none!important}}

/* A narrow grade column must not spell 'Select' vertically. */
.iep-table td:nth-child(3) .cell-select{padding:0 2px;font-size:10pt;min-height:24px}.iep-table td:nth-child(3){overflow-wrap:normal;word-break:normal;text-align:center}.iep-table td:nth-child(3) .cell-wrap{min-height:26px}


/* v8: fixed column alignment for the assessment explanation in the EDITOR and fallback PRINT. */
.paper .symbols,
.print-sheet .symbols {
  display: grid !important;
  grid-template-columns: 1fr;
  row-gap: 0 !important;
  margin-top: 21px;
  margin-bottom: 27px;
  font-family: Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
.paper .symbols .symbol-row,
.print-sheet .symbols .symbol-row {
  display: grid !important;
  grid-template-columns: 30pt minmax(0, 1fr) !important;
  align-items: baseline;
  column-gap: 0 !important;
  height: 18pt;
  min-height: 18pt;
  margin: 0 !important;
  line-height: 18pt;
  white-space: nowrap;
}
.paper .symbols .symbol-code,
.paper .symbols .symbol-meaning,
.print-sheet .symbols .symbol-code,
.print-sheet .symbols .symbol-meaning {
  padding: 0 !important;
  margin: 0 !important;
  display: block;
  font-size: inherit;
  line-height: 18pt;
  white-space: nowrap;
}
/* The Numbers fallback print header has the same fixed legend columns. */
.numbers-legend { font: 10pt/18pt Helvetica,Arial,sans-serif !important; }
.numbers-legend .legend-row { display: grid !important; grid-template-columns: 30pt 1fr; height: 18pt !important; align-items: baseline; gap: 0; }
.numbers-legend .legend-code, .numbers-legend .legend-meaning { padding: 0; margin: 0; line-height: 18pt; white-space: nowrap; }

/* v9: Teacher Name is shown in the directory and edited for each student. */
.student-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.student-actions button{white-space:nowrap}.student-row{grid-template-columns:minmax(200px,1fr) 150px 125px 180px}.student-row small{color:#4f6179;margin-top:5px}.student-class{color:#7b8795;font-size:12px}@media(max-width:800px){.student-row{grid-template-columns:minmax(150px,1fr) 110px}.student-row .student-class{display:none}.student-actions{justify-content:flex-end}}

/* v10 — clear template-specific PDF scope; hidden from printable report */
.pdf-export-hint{max-width:880px;margin:12px auto 5px;border:1px solid #bfdbfe;background:#eef6ff;border-radius:9px;padding:9px 13px;font-size:13px;line-height:1.45;color:#1e40af;}
@media print{.pdf-export-hint{display:none !important;}}

/* v12: guarded destructive actions and Safari 12 dialog fallback. */
.danger{border:1px solid #b42318;background:#fff1f0;color:#9f1d14;font-weight:750}.danger:hover{background:#fee4e2}.danger-note{color:#8f271f;background:#fff4f2;border:1px solid #f3c4bd;border-radius:8px;padding:9px 11px;font-size:12px;line-height:1.45}.dialog-actions{display:flex;gap:10px;flex-wrap:wrap}.dialog-fallback-open{position:fixed;z-index:1001;left:50%;top:50%;transform:translate(-50%,-50%);display:block;max-width:min(680px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:auto}.dialog-fallback-open:before{content:"";position:fixed;z-index:-1;inset:-100vh -100vw;background:rgba(15,23,42,.55)}
.page-manager{display:flex;align-items:end;gap:7px;flex-wrap:wrap;margin:12px 0 5px}.page-manager label{font-size:11px;font-weight:700;color:#526174}.page-manager label:first-child{width:110px}.page-manager label:nth-child(2){min-width:220px;flex:1}.page-manager input{display:block;min-height:34px;padding:6px 8px;margin-top:3px}.page-manager small{color:#5d6c80;flex-basis:100%}.page-manager button{padding:7px 10px}.editable-label textarea,.editable-section textarea{background:#fbfdff;border-bottom:1px dashed #9ab5dc;padding:2px;min-height:35px}.editable-section textarea{font-weight:700;min-height:28px;resize:vertical}
.row-manager{display:flex;align-items:end;gap:7px;flex-wrap:wrap;margin:7px 0 10px;padding:9px;border:1px solid #d8e2ef;border-radius:10px;background:#f8fbff}.row-manager label{font-size:11px;font-weight:700;color:#526174}.row-manager select{display:block;min-width:105px;min-height:34px;margin-top:3px;padding:5px 8px}.row-manager button{padding:7px 10px}.row-manager small{color:#5d6c80;flex-basis:100%}
@media(max-width:760px){.page-manager label:first-child,.page-manager label:nth-child(2){width:100%;min-width:0;flex-basis:100%}.page-manager button,.row-manager button{min-height:42px}.row-manager label{flex-basis:100%}.row-manager select{width:100%}}
@media print{#page-manager,#row-manager{display:none!important}}
.template-top{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;background:#fff;border:1px solid #dce3eb;border-radius:12px;padding:17px 20px;margin-bottom:10px}
.template-top h2{margin:0;font-size:22px}.template-top p{margin:2px 0 0}.template-top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.template-top-actions select{width:170px}.template-upload{position:relative;display:inline-block;border:1px solid #d0d8e2;border-radius:8px;background:#fff;color:#253244;padding:9px 13px;font-weight:600;cursor:pointer}.template-upload input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.template-hint{margin:5px 0 10px;color:#667085;font-size:12px}
.template-editing #report-view>.page-head,.template-editing #report-view>.report-history-wrapper,.template-editing #report-view>.report-toolbar,.template-editing #report-view>#pdf-export-hint,.template-editing #report-view>#page-manager,.template-editing #report-view>#row-manager,.template-editing #report-view>.mobile-scroll-hint{display:none!important}
.template-editing #report-view #tabbar{max-width:none;margin:0;justify-content:flex-start}.template-editing #report-view .paper-scroll{background:#e9eef5;padding:18px 10px}.template-editing #report-view .paper{margin-bottom:0}
.template-context-menu{position:fixed;z-index:1000;min-width:205px;max-height:min(75vh,630px);overflow-y:auto;border:1px solid #d0d8e2;border-radius:10px;background:#fff;box-shadow:0 16px 35px #0003;padding:5px}.template-context-menu button{display:block;width:100%;padding:7px 9px;text-align:left;border:0;border-radius:6px;background:transparent;font-size:13px;font-weight:500}.template-context-menu button:hover,.template-context-menu button:focus{background:#eaf2ff;color:#1758b0}
.template-editing #report-view #tabbar button,.template-editing #report-view #original-numbers-grid td{cursor:context-menu}
.template-editing #report-view.template-empty .paper-scroll{display:none}

/* v11 verified migration review */
.import-intro{background:#f2f7ff;border:1px solid #cddcf3;border-radius:10px;padding:14px;color:#263e5a;font-size:13px;line-height:1.65}.import-intro p{margin:8px 0 0}.import-intro code{background:#e1ebfc;border-radius:4px;padding:2px 4px}.validation-summary{margin:6px 0 16px;font-size:13px}.validation-summary .v-head{padding:12px 14px;background:#f3f5f9;border-radius:9px;margin-bottom:8px}.validation-summary .v-block{background:#fff2ee;border:1px solid #efb5ab;color:#8b2c21}.validation-summary .v-pass{background:#ecf8ee;border:1px solid #b6dfc2;color:#12662b}.validation-summary details{margin:7px 0;border:1px solid #e2e8f0;border-radius:8px;padding:8px 12px}.validation-summary summary{cursor:pointer;font-weight:700}.validation-summary table{border-collapse:collapse;width:100%;font-size:12px;margin-top:8px}.validation-summary td,.validation-summary th{padding:6px;border-bottom:1px solid #e8edf3;text-align:left}.validation-summary .mismatch{color:#b42318;font-weight:700}#import-preview{max-height:none;overflow:visible}.import-check{margin-top:10px}

/* Source-first Numbers layout. Values are real worksheet cells, not template choices. */
#original-numbers-grid{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%;margin:12px auto 24px;background:#fff}
#original-numbers-grid .numbers-source-table{border-collapse:collapse;border-spacing:0;table-layout:fixed;width:max-content;max-width:none;color:#111}
#original-numbers-grid .numbers-source-table td{border:.55pt solid #555;padding:0;vertical-align:top;min-width:15pt;overflow:hidden}
#original-numbers-grid .numbers-source-cell{display:block;box-sizing:border-box;width:100%;height:100%;min-height:21pt;border:0!important;outline:0;background:transparent;font:12pt/1.2 Helvetica,Arial,sans-serif;line-height:1.15;padding:2pt;resize:vertical;overflow:hidden;white-space:pre-wrap;overflow-wrap:break-word;border-radius:0;box-shadow:none}
#original-numbers-grid .numbers-source-cell:focus{outline:2px solid #387dde!important;outline-offset:-2px}
#original-numbers-grid .numbers-original-title textarea{font-weight:700!important;text-align:center!important;text-decoration:underline!important;font-size:16pt!important}
.paper.native-import-mode{width:max-content;max-width:100%;overflow:visible;padding:24px 28px;min-height:800px}
.paper.native-import-mode>h1,.paper.native-import-mode .student-meta,.paper.native-import-mode .symbols,.paper.native-import-mode .iep-table,.paper.native-import-mode .meta-hint,.paper.native-import-mode .print-footer{display:none!important}
@media(max-width:1100px){.paper.native-import-mode{width:100%;padding:8px;overflow:hidden}#original-numbers-grid{overflow:auto;max-height:none}}
@media print{#original-numbers-grid{overflow:visible!important}#original-numbers-grid .numbers-source-table td{border:.55pt solid #333}}


/* v13: imported Numbers must show real sentences, not clipped one-line fields. */
#original-numbers-grid{display:block;overflow:visible;max-width:100%;margin:12px auto 26px;background:#fff;color:#111}
#original-numbers-grid .numbers-document-header{padding:10px 4px 0;margin:0 0 23px;font:12pt/1.3 Helvetica,Arial,sans-serif}
#original-numbers-grid .numbers-doc-title{margin:0 auto 13px;font-size:16pt;text-align:center}
#original-numbers-grid .numbers-header-input{display:block;width:100%;height:auto;min-height:20pt;resize:none!important;overflow:hidden!important;box-sizing:border-box;border:0!important;border-radius:0!important;background:transparent!important;color:#111;padding:0!important;font:700 11pt/1.28 Helvetica,Arial,sans-serif;white-space:pre-wrap;overflow-wrap:break-word}
#original-numbers-grid .numbers-header-input:focus{outline:1px solid #a2bde9!important;background:#f6faff!important}
#original-numbers-grid .numbers-headline-input{font:700 16pt/1.25 Helvetica,Arial,sans-serif!important;text-align:center!important;text-decoration:underline!important}
#original-numbers-grid .numbers-head-fields{display:grid;grid-template-columns:55% 45%;gap:5px 7px;align-items:start;margin-bottom:18px}
#original-numbers-grid .numbers-header-name{grid-column:1;grid-row:1}
#original-numbers-grid .numbers-header-duration{grid-column:2;grid-row:1}
#original-numbers-grid .numbers-header-birth{grid-column:1;grid-row:2}
#original-numbers-grid .numbers-header-plan{grid-column:2;grid-row:2}
#original-numbers-grid .numbers-original-legend{display:flex;flex-direction:column;gap:3px;margin:12px 0 21px}
#original-numbers-grid .numbers-legend-line{display:grid;grid-template-columns:30pt minmax(0,1fr);gap:3px;align-items:start}
#original-numbers-grid .numbers-original-legend .numbers-header-input{font:10pt/1.25 Helvetica,Arial,sans-serif!important}
#original-numbers-grid .numbers-unclassified-header{display:flex;flex-direction:column;gap:3px;margin:8px 0 15px}
#original-numbers-grid .numbers-unclassified-header textarea{font-weight:400!important}
#original-numbers-grid .numbers-table-scroll{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch;padding-bottom:2px}
#original-numbers-grid .numbers-source-table{border-collapse:collapse;table-layout:fixed;max-width:none;color:#111;margin:0}
#original-numbers-grid .numbers-source-table td{border:.65pt solid #333!important;padding:0!important;vertical-align:top;overflow:visible!important;min-width:0;white-space:normal}
#original-numbers-grid .numbers-source-table textarea.numbers-source-cell{display:block;width:100%;min-height:25px;height:auto;max-height:none!important;overflow:hidden!important;resize:none!important;box-sizing:border-box;white-space:pre-wrap!important;overflow-wrap:break-word!important;word-break:normal!important;border:0!important;border-radius:0!important;outline:0;box-shadow:none!important;background:transparent!important;font-family:Helvetica,Arial,sans-serif;font-size:11pt;line-height:1.28;padding:3px 4px!important;margin:0!important}
#original-numbers-grid .numbers-source-table textarea.numbers-source-cell:focus{outline:2px solid #3b82f6!important;outline-offset:-2px;background:#eef6ff!important}
.paper.native-import-mode{width:100%;max-width:960px;min-height:1000px;padding:24px 30px 65px;overflow:visible}
.paper.native-import-mode>h1,.paper.native-import-mode .student-meta,.paper.native-import-mode .symbols,.paper.native-import-mode .iep-table,.paper.native-import-mode .meta-hint,.paper.native-import-mode .print-footer{display:none!important}
@media(max-width:1100px){.paper-scroll .paper.native-import-mode{width:100%;max-width:960px;min-width:0;padding:16px 14px 35px;overflow:visible}}
@media(max-width:480px){#original-numbers-grid .numbers-head-fields{grid-template-columns:1fr;gap:6px}#original-numbers-grid .numbers-header-name,#original-numbers-grid .numbers-header-birth,#original-numbers-grid .numbers-header-duration,#original-numbers-grid .numbers-header-plan{grid-column:1;grid-row:auto}}


/* Admin-only encrypted Drive restore. */
.restore-card{grid-column:1/-1}.restore-controls{display:grid;grid-template-columns:auto minmax(220px,1fr) auto;gap:10px;align-items:end}.restore-summary{margin:14px 0;padding:12px;border:1px solid #d8e2ef;border-radius:9px;background:#f8fbff;line-height:1.55}.restore-summary strong{color:#16263d}.restore-summary.restore-ready{border-color:#a7d7b4;background:#effaf2;color:#155e2c}.restore-summary.restore-error{border-color:#efb5ab;background:#fff2ee;color:#8b2c21}@media(max-width:760px){.restore-controls{grid-template-columns:1fr}.restore-controls button,.restore-controls select{width:100%}}

/* Imported Apple Numbers pop-up controls: retain source text wrapping and options. */
#original-numbers-grid .numbers-popup-wrap{display:block;width:100%;position:relative;min-height:27px}
/* Dropdown cells: tap anywhere in the text region to choose an option.
   The right-hand ⋯ remains an independent Edit Options button. */
#original-numbers-grid .numbers-popup-wrap textarea.numbers-source-cell{padding-right:25px!important}
#original-numbers-grid .numbers-popup-picker{position:absolute;left:0;right:23px;top:0;bottom:0;width:calc(100% - 23px);height:100%;margin:0;padding:0;opacity:0;cursor:pointer;z-index:3;-webkit-appearance:none;appearance:none}
#original-numbers-grid .numbers-popup-picker:focus-visible{outline:2px solid #38a169;outline-offset:-2px}
#original-numbers-grid .numbers-popup-edit{position:absolute;right:0;top:0;width:23px;height:27px;padding:0!important;background:#e5f2e9;border:0;border-left:1px solid #cbdccd;border-radius:0;font-size:15px;color:#34483a;cursor:pointer;z-index:4}
#original-numbers-grid .numbers-popup-edit:focus{outline:2px solid #2f855a}
@media print{#original-numbers-grid .numbers-popup-picker,#original-numbers-grid .numbers-popup-edit{display:none!important}#original-numbers-grid .numbers-popup-wrap textarea.numbers-source-cell{padding-right:4px!important}}

/* Numbers-style option editor. Kept outside the grid so narrow tables never clip it. */
.numbers-options-overlay{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:22px;background:rgba(15,23,42,.58);box-sizing:border-box}
.numbers-options-dialog{width:min(680px,100%);max-height:min(780px,calc(100vh - 44px));display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid #cbd5e1;border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.3);color:#172033}
.numbers-options-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:20px 22px 8px}.numbers-options-head h2{margin:0;font-size:24px;line-height:1.2}.numbers-options-close{flex:0 0 auto;width:40px;height:40px;padding:0!important;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#334155;font-size:27px;line-height:1;cursor:pointer}
.numbers-options-help{margin:0;padding:0 22px 14px;color:#64748b;font-size:15px;line-height:1.45}.numbers-options-list{overflow-y:auto;padding:2px 22px 8px;-webkit-overflow-scrolling:touch}.numbers-option-row{display:grid;grid-template-columns:28px minmax(0,1fr) 38px 38px 42px;gap:7px;align-items:center;margin:8px 0}.numbers-option-order{color:#64748b;text-align:center;font-variant-numeric:tabular-nums}.numbers-option-input{width:100%;min-width:0;height:44px;box-sizing:border-box;padding:8px 11px;border:1px solid #b9c7d8;border-radius:8px;background:#fff;color:#172033;font:16px/1.25 Helvetica,Arial,sans-serif}.numbers-option-input:focus{outline:3px solid rgba(37,99,235,.22);border-color:#2563eb}.numbers-option-move,.numbers-option-remove{width:38px;height:40px;padding:0!important;border:1px solid #cbd5e1;border-radius:8px;background:#f8fafc;color:#334155;font-size:19px;cursor:pointer}.numbers-option-remove{width:42px;color:#a11c1c;background:#fff7f7;border-color:#efb2b2}.numbers-option-move:disabled,.numbers-option-remove:disabled{opacity:.35;cursor:not-allowed}
.numbers-options-warning{margin:3px 22px 8px;padding:10px 12px;border:1px solid #f2c36b;border-radius:8px;background:#fff8e8;color:#7a4d09;font-size:14px;line-height:1.4}.numbers-options-add{align-self:flex-start;margin:4px 22px 14px;padding:9px 14px!important;border:1px solid #9bb9e7;border-radius:9px;background:#f5f9ff;color:#1d4fa3;font-weight:700;cursor:pointer}.numbers-options-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px;border-top:1px solid #e2e8f0;background:#f8fafc}.numbers-options-cancel,.numbers-options-save{min-width:110px;padding:10px 15px!important;border-radius:9px;cursor:pointer;font-weight:700}.numbers-options-cancel{border:1px solid #cbd5e1;background:#fff;color:#334155}.numbers-options-save{border:1px solid #1d5ec8;background:#2168d3;color:#fff}.numbers-options-save:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:620px){.numbers-options-overlay{padding:0;align-items:flex-end}.numbers-options-dialog{max-height:92vh;border-radius:18px 18px 0 0}.numbers-options-head{padding:16px 14px 8px}.numbers-options-help{padding:0 14px 10px}.numbers-options-list{padding:2px 14px 8px}.numbers-option-row{grid-template-columns:22px minmax(0,1fr) 34px 34px 38px;gap:4px}.numbers-option-move{width:34px}.numbers-option-remove{width:38px}.numbers-options-warning{margin-left:14px;margin-right:14px}.numbers-options-add{margin-left:14px}.numbers-options-actions{padding:12px 14px 16px}.numbers-options-cancel,.numbers-options-save{flex:1;min-width:0}}
@media print{.numbers-options-overlay{display:none!important}}

/* Numbers-derived cover: title, details and legend are source cells, but the
   original Numbers PDF positions them above the assessment table. This is
   presentation only; cell values and source row/column keys are unchanged. */
#original-numbers-grid .numbers-source-cover{display:block;box-sizing:border-box;max-width:none;margin:0;padding:0;overflow:visible}
#original-numbers-grid .numbers-cover-row{box-sizing:border-box;width:100%;min-width:0;align-items:start}
#original-numbers-grid .numbers-cover-title,#original-numbers-grid .numbers-cover-line{display:flex}
#original-numbers-grid .numbers-cover-columns{display:grid;column-gap:0}
#original-numbers-grid .numbers-source-cover .numbers-cover-input{box-sizing:border-box;display:block;width:100%;min-width:0;height:auto!important;min-height:19px;border:0!important;outline:0;background:transparent;resize:none;overflow:hidden;white-space:pre-wrap;overflow-wrap:break-word;line-height:1.18;padding:0!important;margin:0!important;color:inherit}
#original-numbers-grid .numbers-cover-title .numbers-cover-input{text-align:center!important;font-weight:700;text-decoration:underline}
#original-numbers-grid .numbers-source-cover .numbers-cover-input:focus{outline:1px solid #aec7e8!important;background:#f3f8ff}
#original-numbers-grid .numbers-cover-blank{display:block}

/* Minimal Numbers Import: only the file picker, file status, review, preview and import actions. */
#import-view .import-minimal{max-width:630px;gap:12px}
#import-view .import-file-zone{display:flex;flex-direction:column;gap:14px}
#import-view .import-file-zone>label:first-child{display:block}
#import-view #import-preview{min-height:58px;max-height:260px;overflow:auto;font-size:13px;line-height:1.45}
#import-view .import-check{margin:0;align-items:center}
#import-view .import-main-actions{gap:8px}
#import-view .import-main-actions button{min-height:40px}
@media(max-width:560px){#import-view .import-main-actions button{flex:1 1 100%}}

/* Teacher Accounts / Transfer Student integration */
.teacher-transfer-panel{margin-top:28px;padding-top:24px;border-top:1px solid var(--border)}
.teacher-transfer-panel .page-head{margin-bottom:16px}
.teacher-transfer-panel .page-head h3{font-size:22px;letter-spacing:-.3px;margin:0}
.teacher-transfer-panel .page-head p{margin:4px 0 0}
.teacher-transfer-panel .card.formbox{max-width:630px}

/* Teacher Transfer Student shares the admin's transfer form, but never displays
   the Teacher Accounts management controls on a teacher login. */
#teachers-view.teacher-transfer-mode > :not(#teacher-transfer-panel){display:none!important}
#teachers-view.teacher-transfer-mode #teacher-transfer-panel{border-top:0;margin-top:0;padding-top:0}

/* Web editor only: compact 12pt normal-weight /, D.K., X assessment symbols.
   Original Numbers widths stay untouched; Export PDF uses source widths. */
@media screen {
 #original-numbers-grid .numbers-source-table td.numbers-assessment-grade {
  background:#f8fbff;
  overflow:visible!important;
 }
 #original-numbers-grid .numbers-source-table td.numbers-assessment-grade textarea.numbers-source-cell {
  font-size:12pt!important;
  font-weight:400!important;
  line-height:1.35!important;
  text-align:center!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  min-height:30px;
  padding-left:3px!important;
  padding-right:3px!important;
 }
 #original-numbers-grid .numbers-source-table td.numbers-assessment-grade .numbers-popup-wrap textarea.numbers-source-cell {
  padding-right:42px!important;
 }
}
#backup-view .card label{display:block;margin:10px 0;font-weight:650;font-size:13px}#backup-view .card label select,#backup-view .card label input{display:block;width:100%;margin-top:5px}.individual-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}#individual-backup-create{margin-top:10px}

/* Private Drive restore browser: folder navigation stays inside School IEP. */
#individual-drive-dialog{width:min(1120px,96vw);max-height:calc(100vh - 32px);overflow:auto}
#individual-drive-dialog .dialog-head{gap:16px}
#individual-drive-dialog #individual-drive-help{margin:12px 0 16px}
.drive-browser{border:1px solid #d9e2ee;border-radius:13px;overflow:hidden;background:#fff}
.drive-browser-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 16px;border-bottom:1px solid #e4eaf2}
.drive-browser-head strong{display:block;font-size:16px}
.drive-browser-head small{display:block;color:#5e6c80;margin-top:3px}
.drive-browser-grid{display:grid;grid-template-columns:minmax(180px,23%) minmax(250px,1fr) minmax(235px,29%);min-height:360px}
.drive-browser-grid>section{min-width:0;padding:14px;border-right:1px solid #e4eaf2}
.drive-browser-grid>section:last-child{border-right:0}
.drive-browser-grid h4{margin:0 0 12px;font-size:12px;letter-spacing:.05em;text-transform:uppercase;color:#5e6c80}
.drive-folder-row,.drive-file-row{display:block;width:100%;border:0;background:transparent;text-align:left;color:#1c293b;border-radius:8px;padding:10px 12px;font:inherit;font-size:13px;cursor:pointer}
.drive-folder-row:hover,.drive-file-row:hover{background:#f0f5fc}
.drive-folder-row.selected,.drive-file-row.selected{background:#e8f0ff;color:#164eb1}
.drive-file-row{border-bottom:1px solid #e9eef5;border-radius:0;overflow-wrap:anywhere}
.drive-file-row strong,.drive-file-row small{display:block}
.drive-file-row small{margin-top:4px;color:#5e6c80;font-size:11px}
.drive-browser-preview{display:flex;flex-direction:column;gap:12px}
.drive-browser-preview .restore-summary{margin:0;flex:1}
.drive-browser-preview button{width:100%}
.drive-browser-preview label{font-size:13px;font-weight:650}
.drive-browser-preview label input{margin-top:6px}
.drive-browser-files>p{font-size:13px;padding:10px}
.drive-id-fallback{margin-top:14px;font-size:12px;color:#5e6c80}
.drive-id-fallback summary{cursor:pointer}
.drive-id-fallback label{display:block;margin-top:10px;font-weight:650}
.drive-id-fallback input{margin-top:6px}
.drive-browser-footer{padding:11px 16px;border-top:1px solid #e4eaf2;font-size:12px;color:#5e6c80}
@media(max-width:760px){.drive-browser-grid{grid-template-columns:1fr}.drive-browser-grid>section{border-right:0;border-bottom:1px solid #e4eaf2}.drive-browser-grid>section:last-child{border-bottom:0}.drive-browser-head{align-items:flex-start}.drive-browser-head button{width:auto}}


/* School Admin Students hierarchy: Department -> Teacher -> Student.
   Teacher accounts continue using the original flat list. */
.student-table.student-admin-hierarchy{overflow-x:visible}
.student-admin-hierarchy .student-department-group{border:1px solid #dce5f1;border-radius:11px;margin-bottom:14px;overflow:hidden;background:#fff}
.student-admin-hierarchy .student-department-group:last-child{margin-bottom:0}
.student-admin-hierarchy details>summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer}
.student-admin-hierarchy details>summary::-webkit-details-marker{display:none}
.student-admin-hierarchy details>summary::before{content:"▸";color:#4870a6;font-size:16px;line-height:1;flex:0 0 13px}
.student-admin-hierarchy details[open]>summary::before{content:"▾"}
.student-admin-hierarchy .student-department-group>summary{padding:13px 16px;background:#edf4ff;color:#17427c;font-size:16px;font-weight:750}
.student-admin-hierarchy .student-teacher-group{margin:12px 12px 0;border:1px solid #e3e9f1;border-radius:9px;overflow:hidden}
.student-admin-hierarchy .student-teacher-group:last-child{margin-bottom:12px}
.student-admin-hierarchy .student-teacher-group>summary{padding:11px 13px;background:#f8fafc;font-size:14px;font-weight:700}
.student-admin-hierarchy .student-group-label{flex:1;min-width:0;overflow-wrap:anywhere}
.student-admin-hierarchy .student-group-count{flex-shrink:0;border:1px solid #d7e3f2;background:#fff;border-radius:18px;color:#546984;font-size:12px;font-weight:650;padding:3px 9px}
.student-admin-hierarchy .student-group-rows{padding:0 13px}
.student-admin-hierarchy .student-grouped-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:13px 0}
.student-admin-hierarchy .student-grouped-row:last-child{border-bottom:0}
.student-admin-hierarchy .student-identity{min-width:0;overflow-wrap:anywhere}
.student-admin-hierarchy .student-identity strong{display:block;font-size:14px}
.student-admin-hierarchy .student-identity small{margin-top:3px;overflow-wrap:anywhere}
.student-admin-hierarchy .student-grouped-row .student-actions{justify-content:flex-end;align-items:center}
.student-admin-hierarchy .student-group-empty{padding:16px;margin:0;color:#667085}
@media(max-width:650px){
 .student-admin-hierarchy .student-department-group>summary{padding:12px;font-size:15px}
 .student-admin-hierarchy .student-department-body{padding-bottom:1px}
 .student-admin-hierarchy .student-teacher-group{margin:9px 7px 0}
 .student-admin-hierarchy .student-teacher-group:last-child{margin-bottom:9px}
 .student-admin-hierarchy .student-teacher-group>summary{padding:10px}
 .student-admin-hierarchy .student-group-rows{padding:0 10px}
 .student-admin-hierarchy .student-grouped-row{grid-template-columns:minmax(0,1fr);gap:7px}
 .student-admin-hierarchy .student-grouped-row .student-actions{justify-content:flex-start}
 .student-admin-hierarchy .student-grouped-row .student-actions button{min-height:39px}
}


/* Optional dropdowns: an untouched Numbers cell stays blank until the teacher clicks it.
   Controls are outside the printable report; source columns and PDF dimensions never change. */
#original-numbers-grid td.numbers-dropdown-target{outline:2px solid #2563eb!important;outline-offset:-2px;background:#f3f8ff!important}
.numbers-dropdown-backdrop{position:fixed;inset:0;z-index:8999;background:rgba(21,34,55,.46)}
.numbers-dropdown-backdrop.hide{display:none!important}
body.numbers-dropdown-open{overflow:hidden}
.numbers-dropdown-panel{
 position:fixed;z-index:9000;top:50%;left:50%;right:auto;bottom:auto;
 transform:translate(-50%,-50%);box-sizing:border-box;
 width:min(560px,calc(100vw - 28px));max-height:calc(100vh - 32px);
 overflow-y:auto;-webkit-overflow-scrolling:touch;
 padding:23px 25px 19px;background:#fff;border:1px solid #d5dfed;
 border-radius:18px;box-shadow:0 18px 58px rgba(15,23,42,.22);
 color:#1c293b;font:14px/1.45 Helvetica,Arial,sans-serif
}
.numbers-dropdown-panel.hide{display:none!important}
.numbers-dropdown-panel .numbers-dd-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.numbers-dropdown-panel .numbers-dd-head h2{font-size:23px;line-height:1.25;margin:0 0 6px;color:#1e2e46}
.numbers-dropdown-panel .numbers-dd-head small{display:block;font-size:12px;color:#64748b}
.numbers-dropdown-panel #numbers-dd-close{
 width:39px;height:39px;min-width:39px;min-height:39px;padding:0!important;
 border:1px solid #d8e2ef;border-radius:9px;background:#fff;color:#475569;
 font-size:23px;line-height:1;cursor:pointer
}
.numbers-dropdown-panel .numbers-dd-help{font-size:13px;line-height:1.5;color:#53647c;margin:12px 0 19px}
.numbers-dropdown-panel .numbers-dd-options{display:flex;flex-direction:column;gap:7px;max-height:355px;overflow-y:auto}
.numbers-dropdown-panel .numbers-dd-option{
 display:grid;grid-template-columns:22px minmax(0,1fr) 38px 38px 39px;
 gap:6px;align-items:center;padding:0;border:0;background:transparent
}
.numbers-dropdown-panel .numbers-dd-option span{font-size:13px;color:#586e88;text-align:center}
.numbers-dropdown-panel .numbers-dd-option input{
 width:100%;min-width:0;min-height:41px;box-sizing:border-box;
 padding:7px 11px;border:1px solid #cbd7e7;border-radius:8px;
 background:#fff;color:#22344c;font-size:15px
}
.numbers-dropdown-panel .numbers-dd-option button{
 min-width:37px;min-height:41px;padding:0!important;
 border:1px solid #d1dceb;border-radius:8px;background:#f8fafc;
 color:#2b415d;font-size:20px;line-height:1;cursor:pointer
}
.numbers-dropdown-panel .numbers-dd-option button[aria-label^="Remove option"]{color:#b42318;background:#fff7f7;border-color:#f2c0c0}
.numbers-dropdown-panel .numbers-dd-option button:disabled{opacity:.35;cursor:default}
.numbers-dropdown-panel .numbers-dd-add-option{
 display:inline-flex;align-items:center;justify-content:center;margin-top:16px;
 padding:8px 12px!important;min-height:38px;border:1px solid #a8c6f5;
 border-radius:8px;background:#eff6ff;color:#1d4ed8;font-weight:650;cursor:pointer
}
.numbers-dropdown-panel .numbers-dd-space-hint{
 display:block;margin:10px 0 0;color:#64748b;font-size:12px;line-height:1.4
}
.numbers-dropdown-panel .numbers-dd-status{margin:0;min-height:0;color:#516b84;font-size:12px;line-height:1.5}
.numbers-dropdown-panel .numbers-dd-status:not(:empty){margin-top:9px}
.numbers-dropdown-panel .numbers-dd-status.error{color:#b91c1c}
.numbers-dropdown-panel .numbers-dd-footer{border-top:1px solid #e1e8f1;margin-top:14px;padding-top:14px}
.numbers-dropdown-panel .numbers-dd-footer-actions{display:flex;justify-content:flex-end;gap:10px}
.numbers-dropdown-panel .numbers-dd-cancel,
.numbers-dropdown-panel .numbers-dd-apply{
 min-width:118px;min-height:43px;padding:8px 18px!important;
 border-radius:9px;font-size:14px;font-weight:700;cursor:pointer
}
.numbers-dropdown-panel .numbers-dd-cancel{border:1px solid #d0dcea;background:#fff;color:#273d56}
.numbers-dropdown-panel .numbers-dd-apply{border:1px solid #1765d6;background:#1765d6!important;color:#fff!important}
.numbers-dropdown-panel .numbers-dd-apply:disabled{opacity:.5;cursor:not-allowed}
.numbers-dropdown-panel .numbers-dd-remove{
 display:block;width:auto;max-width:100%;margin:0 0 12px;padding:8px 12px!important;min-height:38px;
 border:1px solid #f0b8b8;border-radius:8px;color:#b42318;background:#fff;
 font-size:13px;font-weight:600;cursor:pointer
}
.numbers-dropdown-panel .numbers-dd-remove.hide{display:none!important}
.numbers-dropdown-panel :is(input,button):focus-visible{outline:2px solid #2563eb;outline-offset:2px}
@media(max-width:700px){
 .numbers-dropdown-panel{width:calc(100vw - 20px);max-height:calc(100vh - 20px);padding:17px}
 .numbers-dropdown-panel .numbers-dd-options{max-height:45vh}
 .numbers-dropdown-panel .numbers-dd-option{grid-template-columns:16px minmax(0,1fr) 31px 31px 31px;gap:4px}
 .numbers-dropdown-panel .numbers-dd-option button{min-width:30px;min-height:39px}
 .numbers-dropdown-panel .numbers-dd-footer-actions{gap:8px}
 .numbers-dropdown-panel .numbers-dd-cancel,.numbers-dropdown-panel .numbers-dd-apply{min-width:0;flex:1}
}
@media print{.numbers-dropdown-panel{display:none!important}.numbers-dropdown-backdrop{display:none!important}#original-numbers-grid td.numbers-dropdown-target{outline:0!important;background:transparent!important}}

/* Student editor current-age and editable report dates (not a Numbers template). */
.student-age-preview{margin:0 0 10px;color:#285480;font-size:13px;font-weight:600}
.student-report-dates{padding:12px 13px;border:1px solid #dce5f1;border-radius:10px;background:#f8fbff;display:grid;gap:10px}
.student-report-dates.hide{display:none!important}
.student-report-heading{font-size:14px;font-weight:700;color:#223d5b}
.student-report-date-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.student-report-dates label{display:grid;gap:4px;font-size:13px;font-weight:600}
.student-report-dates input{width:100%;min-width:0;box-sizing:border-box}
.student-report-dates small{display:block;line-height:1.45}
@media(max-width:520px){.student-report-date-row{grid-template-columns:minmax(0,1fr)}}


/* Numbers-style clean editor. Screen-only controls never enter Numbers data/PDF. */
@media screen {
 #report-view.editor-context-mode #page-manager,
 #report-view.editor-context-mode #row-manager {display:none!important}
 #report-view #sheet-context-trigger.sheet-context-trigger{
  display:inline-flex;align-items:center;justify-content:center;
  margin:0 0 8px 8px;padding:0 13px;min-height:38px;min-width:45px;
  background:#f8fafc;color:#23364c;border:1px solid #d2ddea;
  border-radius:7px;font-size:19px;cursor:pointer;
 }
 #report-view #sheet-context-trigger.hide{display:none!important}
 #original-numbers-grid .numbers-table-scroll.numbers-has-row-gutter{
  position:relative;box-sizing:border-box;padding-left:34px!important;
 }
 #original-numbers-grid.numbers-context-enabled .numbers-source-cover{margin-left:34px!important}
 #original-numbers-grid .numbers-row-gutter{
  position:absolute;left:0;top:0;bottom:0;width:31px;z-index:2;
  pointer-events:none;color:#57718b;
 }
 #original-numbers-grid .numbers-row-trigger{
  position:absolute;box-sizing:border-box;left:0;width:29px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid #d5deea;border-radius:3px;background:#f2f6fb;color:#51657f;
  font:12px/1 Helvetica,Arial,sans-serif;cursor:pointer;pointer-events:auto;
  padding:0 2px;min-height:24px;
 }
 #original-numbers-grid .numbers-row-trigger:hover,
 #original-numbers-grid .numbers-row-trigger:focus-visible{
  color:#1d4ed8;background:#dbeafe;border-color:#7aacef;outline:0;
 }
 #original-numbers-grid .numbers-source-table tr.numbers-menu-selected td{
  box-shadow:inset 0 1px 0 #3b82f6,inset 0 -1px 0 #3b82f6;
 }
 #original-numbers-grid .numbers-row-trigger:focus-visible{outline:2px solid #2563eb;outline-offset:-2px}
 .numbers-context-menu{
  position:fixed;z-index:12000;box-sizing:border-box;width:238px;
  max-width:calc(100vw - 16px);max-height:min(560px,calc(100vh - 16px));
  overflow-y:auto;padding:6px;background:#25272b;color:#fff;
  border:1px solid #464a50;border-radius:12px;
  box-shadow:0 12px 34px rgba(15,23,42,.34);
  font:13px/1.35 Helvetica,Arial,sans-serif;
  -webkit-overflow-scrolling:touch;
 }
 .numbers-context-menu.hide{display:none!important}
 .numbers-context-action{
  display:flex;align-items:center;gap:9px;width:100%;min-height:37px;
  padding:7px 10px;border:0;border-radius:6px;background:transparent;
  color:#f8fafc;text-align:left;font:inherit;cursor:pointer;
 }
 .numbers-context-action:hover:not(:disabled),
 .numbers-context-action:focus-visible:not(:disabled){
  background:#3269af;outline:0;
 }
 .numbers-context-action:disabled{opacity:.38;cursor:not-allowed}
 .numbers-context-action.danger{color:#ffb6b6}
 .numbers-context-icon{width:20px;flex:none;text-align:center;font-size:16px}
 .numbers-context-separator{height:1px;margin:5px 9px;background:#4b5057}
}
@media(max-width:720px){
 #report-view #sheet-context-trigger.sheet-context-trigger{min-height:42px}
 #original-numbers-grid .numbers-row-trigger{font-size:11px}
}
@media print{
 #sheet-context-trigger,.numbers-context-menu,.numbers-row-gutter{display:none!important}
 #original-numbers-grid .numbers-table-scroll.numbers-has-row-gutter{padding-left:0!important}
 #original-numbers-grid.numbers-context-enabled .numbers-source-cover{margin-left:0!important}
 #original-numbers-grid .numbers-source-table tr.numbers-menu-selected td{box-shadow:none!important}
}


/* Minimal School IEP: everyday editing needs only Save, Backup, Export,
   save status, History and imported Numbers tabs. Legacy controls are not deleted. */
@media screen{
 #report-view>.page-head{margin-bottom:12px}
 #report-view>.page-head #editing-student{display:none!important}
 #report-view .pdf-export-hint,
 #report-view .mobile-scroll-hint{display:none!important}
 #report-view .report-history-wrapper{position:relative;margin-bottom:17px}
 #report-view .report-compact-status{
  display:flex;align-items:center;justify-content:flex-end;
  padding:9px 17px;gap:18px;min-height:47px;
  margin-bottom:0;border-radius:11px;
 }
 #report-view .report-status-group{
  display:inline-flex;align-items:center;gap:8px;
  font-size:13px;white-space:normal;min-width:0;
 }
 #report-view .report-status-dot{
  width:9px;height:9px;min-width:9px;border-radius:50%;
  background:#94a3b8;display:inline-block;
 }
 #report-view .report-compact-status.has-unsaved .report-status-dot{background:#f59e0b}
 #report-view .report-compact-status.has-unsaved #save-status{color:#97560b}
 #report-view .report-compact-status.has-saved .report-status-dot{background:#22a06b}
 #report-view .report-history-trigger{
  width:auto;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:38px;padding:7px 10px;border:0;border-left:1px solid #dce5f0;
  border-radius:0;background:transparent;color:#1763cf;font-weight:650;cursor:pointer;
 }
 #report-view .report-history-trigger:hover,
 #report-view .report-history-trigger[aria-expanded="true"]{background:#eff6ff;border-radius:6px}
 #report-view .report-history-trigger:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}
 #report-view .report-history-panel{
  position:absolute;top:calc(100% + 6px);right:0;z-index:3500;
  box-sizing:border-box;width:720px;max-width:100%;
  background:#fff;color:#1e293b;
  border:1px solid #d4dfed;border-radius:12px;
  box-shadow:0 15px 45px rgba(15,23,42,.18);
  padding:16px;max-height:75vh;overflow-y:auto;
 }
 #report-view .report-history-panel.hide{display:none!important}
 #report-view .report-history-head{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;margin-bottom:12px;
 }
 #report-view .report-history-head strong{font-size:15px}
 #report-view #history-close{width:auto;min-height:37px}
 #report-view .report-history-panel .report-toolbar{
  display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;
 }
 #report-view .report-history-panel .report-toolbar label{flex:1 1 180px}
 #report-view .report-history-panel .report-toolbar button{width:auto;min-height:40px}
 #report-view .report-history-panel #delete-iep-btn{margin-left:auto}
 #report-view .tabs{margin-top:18px}
 /* The lone sheet ⋯ is a fallback for touch-based/old Safari iPads.
    Desktop Mac uses right-click and does not display this extra button. */
 html:not(.numbers-touch-device) #report-view #sheet-context-trigger.sheet-context-trigger{display:none!important}
 /* An added blank row is intentionally white in EVERY column, including C.
    Original imported grade rows retain their pale gray-blue background. */
 #original-numbers-grid .numbers-source-table tr.numbers-inserted-blank-row td{
  background:#fff!important;color:#111!important;
 }
 #original-numbers-grid .numbers-source-table tr.numbers-inserted-blank-row textarea.numbers-source-cell{
  background:#fff!important;font-weight:400!important;
  font-size:11pt!important;text-align:left!important;
  padding:3px 4px!important;
 }
 #original-numbers-grid .numbers-source-table tr.numbers-inserted-blank-row textarea.numbers-source-cell:focus{
  background:#fff!important;outline:2px solid #3b82f6!important;
 }
}
@media(max-width:720px){
 #report-view .report-compact-status{padding:7px 12px;gap:8px;justify-content:space-between}
 #report-view .report-history-panel{left:0;right:0;width:auto;max-width:none}
 #report-view .report-history-panel .report-toolbar label{min-width:0;flex:1 1 100%}
 #report-view>.page-head{align-items:flex-start}
 #report-view>.page-head .actions{gap:6px}
}
@media print{
 #report-view .report-history-wrapper{display:none!important}
 #report-view .report-history-panel{display:none!important}
 #original-numbers-grid .numbers-source-table tr.numbers-inserted-blank-row td{background:white!important}
}


/* Row-number actions are separate from one-cell actions. Never printed. */
@media screen{
 #original-numbers-grid .numbers-source-table td.numbers-cell-menu-selected{
  outline:2px solid #2563eb!important;outline-offset:-2px;
 }
 #original-numbers-grid .numbers-source-table td.numbers-cell-menu-selected textarea{
  background:#f0f6ff!important;
 }
 #original-numbers-grid .numbers-row-trigger:active{background:#c3dcff}
 .numbers-dropdown-panel .numbers-dd-custom-label{
  padding:12px 10px;text-align:center;border-radius:9px;
  border:1px solid #bad2fb;background:#eff6ff;
  color:#1d4ed8;font-size:13px;font-weight:750;
 }
 #report-view .report-history-panel{
  width:700px;max-width:calc(100vw - 45px);
  padding:22px 25px;max-height:min(80vh,780px);
 }
 #report-view .report-history-head{
  padding-bottom:11px;margin-bottom:13px;
 }
 #report-view .report-history-head strong{
  font-size:20px;letter-spacing:-.2px;
 }
 #report-view .report-history-main{display:grid;gap:20px}
 #report-view .report-history-section{display:grid;gap:9px}
 #report-view .report-history-label,
 #report-view .report-history-version-head h3{
  font-size:17px;font-weight:750;color:#1f2937;margin:0;
 }
 #report-view .report-history-section>select{
  display:block;width:100%;min-height:48px;padding:10px 12px;
  background:#fff;border:1px solid #cbd5e1;border-radius:9px;font-size:15px;
 }
 #report-view .report-history-help{
  margin:0;color:#65748a;font-size:12px;line-height:1.45;
 }
 #report-view .report-history-version-head{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
 }
 #report-view .report-history-version-head #history-latest{min-height:34px;font-size:12px}
 #report-view .report-history-versions{
  display:flex;flex-direction:column;
  border:1px solid #cbd5e1;border-radius:10px;
  padding:4px 13px;background:#fff;overflow:hidden;
 }
 #report-view .report-history-version{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:8px;
  width:100%;min-height:55px;padding:10px 7px;
  border:0;border-radius:0;border-bottom:1px solid #e3e9f1;
  color:#1e293b;text-align:left;font-size:14px;font-weight:500;background:#fff;
 }
 #report-view .report-history-version:last-child{border-bottom:0}
 #report-view .report-history-version:hover,
 #report-view .report-history-version:focus-visible{
  color:#1d4ed8;background:#f4f8ff;outline:0;
 }
 #report-view .report-history-version.selected{background:#ecf4ff;color:#1d4ed8;font-weight:700}
 #report-view .report-history-version-date{color:#64748b;font-size:12px;font-weight:400}
 #report-view .report-history-empty{margin:12px 0;color:#64748b}
 #report-view .report-history-advanced{
  border-top:1px solid #e4eaf2;margin-top:20px;padding-top:11px;
 }
 #report-view .report-history-advanced>summary{
  color:#53677e;font-size:12px;font-weight:700;cursor:pointer;padding:9px 4px;
 }
 #report-view .report-history-advanced .report-toolbar{padding:10px 0}
}
@media(max-width:720px){
 #report-view .report-history-panel{width:auto;max-width:none;padding:14px;max-height:80vh}
 #report-view .report-history-head strong{font-size:17px}
 #report-view .report-history-version{align-items:flex-start}
}
@media print{
 #original-numbers-grid .numbers-source-table td.numbers-cell-menu-selected{outline:0!important}
 #original-numbers-grid .numbers-source-table td.numbers-cell-menu-selected textarea{background:transparent!important}
}


/* School IEP compact revision recovery. Restore is deliberately visible with
   the selected historical version; hidden Admin utilities remain functional. */
@media screen{
 #report-view .report-history-restore{
  margin-top:1px;padding:15px 16px 16px;
  border:1px solid #d8e1ef;border-radius:11px;
  background:#fff;
 }
 #report-view .report-history-restore.hide{display:none!important}
 #report-view .report-history-restore strong{
  display:block;color:#25364a;font-size:15px;font-weight:700;
 }
 #report-view .report-history-restore p{
  margin:8px 0 12px;color:#6b7789;font-size:12px;line-height:1.45;
 }
 #report-view .report-history-restore #restore-btn{
  display:block;width:100%;min-height:43px;
  border-radius:9px;background:#eaf2ff;
  border:1px solid #c0d5fe;color:#145bd8;
  font-size:14px;font-weight:750;text-align:center;
 }
 #report-view .report-history-restore #restore-btn.hide{display:none!important}
 #report-view #history-legacy-controls.hide{display:none!important}
}
@media print{
 #report-view .report-history-restore,
 #report-view #history-legacy-controls{display:none!important}
}


/* Admin transfer is an independent sidebar destination, not a section of Teachers. */
#teachers-view:not(.teacher-transfer-mode) #teacher-transfer-panel{display:none!important}
#teacher-table .teacher-row{
 display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;
 gap:10px;padding:12px 8px;border-bottom:1px solid #e5e9ef;
}
#teacher-table .teacher-row:last-child{border-bottom:0}
#teacher-table .teacher-details{display:flex;flex-direction:column;gap:2px;min-width:0}
#teacher-table .teacher-details small{font-size:12px;color:#667085;white-space:normal;overflow-wrap:anywhere}
#teacher-table .teacher-row-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}
#teacher-table .teacher-row-actions button{min-height:38px}
#teacher-table .teacher-delete-btn{color:#b42318;background:#fff;border:1px solid #f3b0ac}
#teacher-table .teacher-delete-btn:hover{background:#fff0ee;color:#912018}
#report-view .report-undo-btn{
 width:auto;display:inline-flex;align-items:center;gap:6px;min-height:37px;
 padding:6px 12px;border:1px solid #bbcef1;background:#f0f5ff;
 border-radius:8px;color:#165cc8;font-size:13px;font-weight:700;
}
#report-view .report-undo-btn:hover:not(:disabled){background:#e4efff}
#report-view .report-undo-btn:disabled{opacity:.38}
#report-view .report-undo-btn span{font-size:20px;line-height:1}
@media print{
 #report-view .report-undo-btn{display:none!important}
}


/* Spreadsheet mouse interaction: left single click shows Cell actions;
   right single click only selects; double click enables text editing. */
@media screen{
 #original-numbers-grid .numbers-source-table td.numbers-cell-picked{
  outline:2px solid #2563eb!important;outline-offset:-2px;
  background:#f0f6ff!important;
 }
 #original-numbers-grid .numbers-source-table td.numbers-cell-picked textarea.numbers-source-cell{
  background:transparent!important;
 }
 #original-numbers-grid .numbers-source-table textarea.numbers-source-cell[readonly]{
  cursor:cell;caret-color:transparent;
  -webkit-user-select:none;user-select:none;
 }
 #original-numbers-grid .numbers-source-table td.numbers-cell-editing textarea.numbers-source-cell{
  cursor:text;caret-color:auto;
  -webkit-user-select:text;user-select:text;
  outline:2px solid #2563eb!important;
  background:#fff!important;
 }
 #original-numbers-grid .numbers-blank-wrap{
  display:block;position:relative;min-width:0;
 }
 #original-numbers-grid .numbers-blank-add-dropdown{
  display:none;position:absolute;right:1px;top:1px;
  width:26px;min-height:23px;padding:0;border:0;
  border-radius:4px;background:#e3f3ec;
  color:#285c47;font-size:17px;line-height:1;
  text-align:center;
 }
 #original-numbers-grid .numbers-cell-picked .numbers-blank-add-dropdown,
 #original-numbers-grid .numbers-blank-wrap:focus-within .numbers-blank-add-dropdown{
  display:block;
 }
 #original-numbers-grid .numbers-cell-editing .numbers-blank-add-dropdown{display:none}
 #original-numbers-grid .numbers-blank-add-dropdown:hover{background:#d1ecdf}
 #report-view .report-undo-wrap{position:relative;display:flex;align-items:center}
 #report-view .report-undo-history{
  position:absolute;z-index:4000;right:0;top:calc(100% + 7px);
  box-sizing:border-box;width:min(380px,calc(100vw - 24px));
  max-height:460px;overflow-y:auto;
  padding:12px 12px 10px;background:#fff;color:#1d2939;
  border:1px solid #d2ddec;border-radius:11px;
  box-shadow:0 17px 42px rgba(15,23,42,.19);
 }
 #report-view .report-undo-history.hide{display:none!important}
 #report-view .report-undo-heading{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-bottom:9px;
 }
 #report-view .report-undo-heading strong{font-size:15px;font-weight:750}
 #report-view .report-undo-heading button{
  width:32px;min-height:32px;padding:0;background:#f2f6fd;
 }
 #report-view .report-undo-list{display:flex;flex-direction:column;gap:3px;min-width:0}
 #report-view .report-undo-entry{
  width:100%;min-height:47px;display:flex;flex-direction:column;
  align-items:flex-start;justify-content:center;gap:3px;
  text-align:left;border:0;border-radius:7px;
  padding:7px 10px;background:#fff;
 }
 #report-view .report-undo-entry:first-child{background:#f1f6ff}
 #report-view .report-undo-entry:hover,
 #report-view .report-undo-entry:focus-visible{background:#e9f2ff;outline:2px solid #a7c6ff}
 #report-view .report-undo-entry-title{font-size:13px;font-weight:650;color:#263b59}
 #report-view .report-undo-entry-detail{font-size:11px;color:#667b92}
 #report-view .report-undo-empty{padding:12px 8px;margin:0;color:#64748b;font-size:12px}
 #report-view .report-undo-hint{
  margin:10px 3px 0;padding-top:9px;border-top:1px solid #e7ecf4;
  color:#69758b;font-size:11px;line-height:1.4;
 }
}
@media print{
 #report-view .report-undo-wrap{display:none!important}
 #original-numbers-grid .numbers-blank-add-dropdown{display:none!important}
 #original-numbers-grid .numbers-source-table td.numbers-cell-picked{outline:0!important;background:#fff!important}
}


/* Students: names are the only primary identifiers shown in the directory.
   Internal student IDs stay in the database and action data attributes. */
#student-table .student-identity strong{
 display:block;
 font-size:18px;
 font-weight:750;
 line-height:1.4;
 color:#1d2939;
}
#student-table.student-admin-hierarchy .student-grouped-row{
 padding-top:15px;
 padding-bottom:15px;
 align-items:center;
}
#student-table:not(.student-admin-hierarchy) .student-row{
 grid-template-columns:minmax(160px,1fr) minmax(90px,130px) auto;
 align-items:center;
}
@media(max-width:800px){
 #student-table:not(.student-admin-hierarchy) .student-row{
  grid-template-columns:minmax(0,1fr) auto;
 }
 #student-table:not(.student-admin-hierarchy) .student-row > div:nth-child(2){
  display:none;
 }
 #student-table .student-identity strong{font-size:17px}
}
@media print{
 #student-table .student-identity strong{font-size:inherit}
}

/* Teacher Students: the teacher + department is already shown in the filter.
   Make the learner's name the single prominent line on each student card. */
#student-table:not(.student-admin-hierarchy) .student-identity strong{
 font-size:24px;
 font-weight:760;
 line-height:1.3;
}
@media(max-width:800px){
 #student-table:not(.student-admin-hierarchy) .student-identity strong{font-size:21px}
}

/* Save Online → Backup to Drive → Export PDF: clearly distinguish locked steps.
   Both button attributes and click handlers enforce the same sequence. */
#report-view #editor-backup-drive:disabled,
#report-view #print-btn:disabled{
 background:#f1f3f6!important;
 border-color:#d6dbe3!important;
 color:#8994a5!important;
 opacity:1!important;
 cursor:not-allowed!important;
 box-shadow:none!important;
}
#report-view #editor-backup-drive:disabled:hover,
#report-view #print-btn:disabled:hover{
 background:#f1f3f6!important;
}

/* Responsive IEP navigation: full labels on desktop; compact icon-only rail
   on iPad/iPhone landscape and other tablet-sized viewports.
   Paper, original Numbers sheet, dropdowns and PDF layout remain untouched. */
@media screen {
 .sidebar .nav{display:flex;align-items:center;gap:11px}
 .sidebar .nav-icon{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 19px;font-size:18px;line-height:1;
 }
 .sidebar .nav-label{white-space:nowrap}
}
@media screen and (max-width:1100px),
       screen and (orientation:landscape) and (max-width:1390px) and (max-height:1050px) {
 .layout{min-width:0}
 .sidebar{
  width:52px;flex:0 0 52px;padding:10px 4px;gap:4px;
  position:relative;z-index:3;overflow:visible;
 }
 .sidebar .navsmall,.sidebar .sidebar-bottom,.sidebar .sidebar-group{display:none}
 .sidebar .nav{
  position:relative;
  width:44px;height:44px;min-height:44px;
  justify-content:center;align-items:center;
  padding:0;margin:0;
  border-radius:9px;
  font-size:15px;line-height:1;
  text-align:center;
  flex:0 0 44px;white-space:nowrap;
 }
 .sidebar .nav .nav-icon{
  display:inline-flex;flex:0 0 auto;
  width:22px;height:22px;font-size:19px;line-height:1;
 }
 .sidebar .nav .nav-label{display:none}
 .sidebar .nav::after{
  content:attr(data-nav-label);
  position:absolute;left:calc(100% + 9px);top:50%;
  transform:translateY(-50%);
  padding:8px 11px;border-radius:7px;
  background:#1f304c;color:#fff;
  font:600 13px/1.3 -apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;
  white-space:nowrap;box-shadow:0 4px 14px #14263c35;
  pointer-events:none;opacity:0;visibility:hidden;
  z-index:100;
 }
 /* Keyboard label is visible only during keyboard focus, not after a tap. */
 .sidebar .nav:focus-visible::after{opacity:1;visibility:visible}
 .sidebar .nav:focus-visible{outline:2px solid #4e8be4;outline-offset:1px}
 .main{
  width:calc(100% - 52px);max-width:none;min-width:0;
  flex:1 1 auto;margin:0;padding:16px 12px 24px;
 }
 #report-view .tabs{width:100%;max-width:none}
 #report-view .paper-scroll{width:100%;max-width:100%}
}
@media screen and (max-width:1100px) and (any-hover:hover),
       screen and (orientation:landscape) and (max-width:1390px) and (max-height:1050px) and (any-hover:hover) {
 .sidebar .nav:hover::after{opacity:1;visibility:visible}
}

/* Replace an attached .numbers or .zip without refreshing the page. */
#import-view .import-file-picker{position:relative;min-width:0;width:100%}
#import-view .import-file-picker #import-file{display:block;width:100%;box-sizing:border-box;padding-right:54px;min-height:42px}
#import-view .import-file-clear{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:30px;height:30px;min-height:30px;min-width:30px;padding:0;border:1px solid #d9e0e8;border-radius:7px;background:#f6f8fa;color:#5d6b7b;font-size:21px;line-height:1;font-weight:600;cursor:pointer;z-index:1}
#import-view .import-file-clear:hover{background:#e9eef3;border-color:#bec8d4;color:#344252}
#import-view .import-file-clear:active{background:#e2e8ef}
#import-view .import-file-clear:focus-visible{outline:2px solid #7c9ac3;outline-offset:2px}

/* Append up to five Numbers files; each row has its own accessible neutral X. */
#import-view .import-file-picker{display:flex;align-items:center;gap:8px;min-height:40px}
#import-view .import-file-native{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;padding:0!important;border:0!important;pointer-events:none}
#import-view .import-add-files{min-height:40px;padding:8px 14px;border-radius:8px;background:#f5f7fa;border:1px solid #d6dee8;color:#263c58;font-weight:600;cursor:pointer}
#import-view .import-add-files:hover{background:#eaf0f6;border-color:#b6c6d8}
#import-view .import-add-files:disabled{opacity:.55;cursor:not-allowed}
#import-view .import-file-count{font-size:12px;line-height:1.35;margin-top:-7px}
#import-view .import-selected-files{display:flex;flex-direction:column;gap:7px;min-width:0}
#import-view .import-selected-files:empty{display:none}
#import-view .import-file-row{display:flex;align-items:center;gap:10px;justify-content:space-between;background:#f9fbfd;border:1px solid #e0e5eb;border-radius:8px;padding:7px 9px;min-height:40px}
#import-view .import-file-name{overflow-wrap:anywhere;word-break:break-word;flex:1;min-width:0;font-size:13px;color:#344252;font-weight:500}
#import-view .import-file-badge{font-size:11px;color:#66788d;background:#edf2f7;border:1px solid #e1e7ef;border-radius:5px;padding:3px 6px;flex-shrink:0}
#import-view .import-file-remove{display:flex;align-items:center;justify-content:center;width:29px;height:29px;min-height:29px;min-width:29px;padding:0;border:1px solid #d9e0e8;border-radius:7px;background:#f6f8fa;color:#5d6b7b;font-size:20px;font-weight:600;cursor:pointer;flex-shrink:0}
#import-view .import-file-remove:hover{background:#e9eef3;border-color:#bec8d4;color:#344252}
#import-view .import-file-remove:focus-visible,.import-add-files:focus-visible{outline:2px solid #7c9ac3;outline-offset:2px}


/* School IEP Help Center: neutral gray/white, accessible on old iPads. */
#help-view .help-layout{max-width:1010px;display:flex;flex-direction:column;gap:15px}
#help-view .card{margin:0;box-shadow:0 2px 5px #1d2c3d08}
#help-view .help-search-card{display:flex;flex-direction:column;gap:9px;padding:20px}
#help-view .help-search-label{font-size:16px;font-weight:700;color:#223149}
#help-view #help-search{display:block;width:100%;box-sizing:border-box;height:46px;min-height:46px;padding:12px 14px;border:1px solid #cbd5df;border-radius:10px;background:#fff;color:#23374e;font-size:16px}
#help-view #help-search:focus-visible{outline:2px solid #6084af;outline-offset:2px}
#help-view .help-search-caption{font-size:12px;margin:0}
#help-view .help-faq-card,#help-view .help-guides-section,#help-view .help-admin-upload{padding:20px}
#help-view .help-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:13px}
#help-view .help-section-head h3,#help-view .help-admin-upload h3{margin:0 0 5px;font-size:18px;color:#223149}
#help-view .help-section-head p{margin:0;font-size:13px}
#help-view .help-quiet-count{padding:5px 9px;background:#f1f4f7;border-radius:20px;color:#667387;white-space:nowrap;font-size:12px;font-weight:600}
#help-view .help-faq-item{border-bottom:1px solid #e6ebf0}
#help-view .help-faq-item:last-child{border-bottom:0}
#help-view .help-faq-question{appearance:none;border:0;border-radius:0;box-shadow:none;background:transparent;color:#263950;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:49px;padding:12px 6px;width:100%;font-size:14px;line-height:1.4;font-weight:650;cursor:pointer}
#help-view .help-faq-question:hover{background:#f7f9fb;color:#162e4d}
#help-view .help-faq-question:focus-visible{outline:2px solid #6084af;outline-offset:-2px}
#help-view .help-chevron{display:flex;align-items:center;justify-content:center;width:23px;height:23px;min-width:23px;border-radius:6px;background:#f0f3f6;color:#5e6e81;font-size:19px;font-weight:400}
#help-view .help-faq-answer{padding:5px 12px 15px;color:#3c4a5e;font-size:14px;line-height:1.6}
#help-view .help-faq-answer[hidden]{display:none}
#help-view .help-faq-answer p{margin:0 0 10px}
#help-view .help-faq-ref{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:12px;color:#647589}
#help-view .help-text-link{appearance:none;border:0;background:transparent;padding:4px 0;color:#275c96;font-size:13px;min-height:32px;font-weight:600;cursor:pointer}
#help-view .help-text-link:hover{text-decoration:underline}
#help-view .help-text-link:disabled{color:#8895a2;cursor:not-allowed}
#help-view .help-empty{margin:14px 0;color:#617185}
#help-view .help-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#help-view .help-guide-card{border:1px solid #dfe5ed;border-radius:12px;padding:16px;background:#fff;min-width:0}
#help-view .help-guide-head{display:flex;align-items:flex-start;gap:11px}
#help-view .help-guide-icon{display:flex;width:33px;height:33px;flex:0 0 33px;align-items:center;justify-content:center;background:#f0f3f6;border-radius:8px;font-size:18px;color:#425976}
#help-view .help-guide-info{min-width:0}
#help-view .help-guide-info h4{margin:0 0 5px;font-size:15px;color:#21344a}
#help-view .help-guide-info p{margin:0;color:#66768b;font-size:12px;line-height:1.4}
#help-view .help-guide-meta{margin:14px 0 12px;color:#6c7988;font-size:12px}
#help-view .help-guide-actions{display:flex;gap:8px;flex-wrap:wrap}
#help-view .help-small-btn{font-size:13px;min-height:36px;padding:7px 13px;border-radius:8px;background:#f7f9fb;border:1px solid #d6dfe9;color:#2a4c70}
#help-view .help-small-btn:hover:not(:disabled){background:#edf2f8}
#help-view .help-small-btn:disabled{opacity:.52;cursor:not-allowed}
#help-view .help-admin-upload{display:flex;flex-direction:column;align-items:flex-start;gap:10px}
#help-view .help-admin-upload.hide{display:none!important}
#help-view .help-admin-upload p{margin:0;font-size:13px}
#help-view .help-upload-label{font-weight:600;color:#384c66;font-size:13px}
#help-view #help-upload-files{display:block;max-width:100%;font-size:13px}
#help-view #help-upload-button{background:#f5f7f9;border:1px solid #d5dfe8;color:#283f59;min-height:42px}
@media(max-width:720px){#help-view .help-layout{gap:12px}#help-view .help-guide-grid{grid-template-columns:1fr}#help-view .help-search-card,#help-view .help-faq-card,#help-view .help-guides-section,#help-view .help-admin-upload{padding:14px}#help-view .help-section-head{flex-wrap:wrap}#help-view .help-faq-question{font-size:14px;min-height:50px}}
/* Device video tutorials: light, responsive cards, playable via YouTube.
 * Use intrinsic 16:9 image wrapper for iOS 12 Safari (no aspect-ratio dependency). */
#help-view .help-videos-section{padding:20px}
#help-view .help-video-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#help-view .help-video-card{display:block;min-width:0;overflow:hidden;text-decoration:none;color:#223149;background:#fff;border:1px solid #dae3ed;border-radius:12px;transition:border-color .15s ease,box-shadow .15s ease}
#help-view .help-video-card:hover{border-color:#9bb8dc;box-shadow:0 3px 12px #1a345818}
#help-view .help-video-card:focus-visible{outline:3px solid #4783cf;outline-offset:3px}
#help-view .help-video-preview{display:block;position:relative;padding-bottom:56.25%;overflow:hidden;background:#e6edf6}
#help-view .help-video-preview img{position:absolute;top:0;left:0;width:100%;height:100%;display:block;object-fit:cover}
#help-view .help-video-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:54px;height:39px;border-radius:11px;color:#fff;background:#152f4edb;font-size:19px;padding-left:3px;box-sizing:border-box}
#help-view .help-video-body{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:13px 14px 15px}
#help-view .help-video-device{display:inline-block;padding:3px 9px;background:#eef3fa;color:#395975;border-radius:12px;font-weight:700;font-size:11px;letter-spacing:.02em}
#help-view .help-video-body strong{font-size:15px;line-height:1.35}
#help-view .help-video-description{font-size:12px;color:#66768b;line-height:1.45}
#help-view .help-video-watch{margin-top:7px;font-size:13px;font-weight:650;color:#2765ab}
@media(max-width:900px){#help-view .help-video-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#help-view .help-videos-section{padding:14px}#help-view .help-video-grid{grid-template-columns:1fr}#help-view .help-video-card{display:flex;align-items:stretch}#help-view .help-video-preview{flex:0 0 40%;width:40%;padding-bottom:0;min-height:132px}#help-view .help-video-body{padding:13px;justify-content:center}}
@media print{#help-view{display:none!important}}


/* Neutral School Admin monthly backup monitor: consistent with existing light UI. */
#backup-view .monthly-auto-card{grid-column:1/-1;padding:20px;border:1px solid #dbe2eb;background:#fff}
.monthly-auto-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.monthly-auto-heading h3{margin:0 0 7px}
.monthly-auto-heading p{margin:0}
.monthly-state{font-size:12px;font-weight:700;border:1px solid #d5dce7;background:#f5f7fa;color:#556479;padding:6px 10px;border-radius:7px;white-space:nowrap}
.monthly-state.is-success{border-color:#cbded3;background:#f2f7f3;color:#305c41}
.monthly-state.is-failed{border-color:#e3cdc9;background:#fcf6f5;color:#93463d}
.monthly-auto-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:18px}
.monthly-auto-grid>div{border:1px solid #e1e7ef;border-radius:9px;padding:13px;background:#fafbfd;min-width:0}
.monthly-auto-grid small{display:block;color:#68798e;font-size:12px;margin-bottom:7px}
.monthly-auto-grid strong{display:block;color:#25364a;font-size:14px;overflow-wrap:anywhere}
.monthly-auto-grid span{display:block;color:#778497;font-size:11px;line-height:1.45;margin-top:6px}
.monthly-auto-foot{display:flex;gap:16px;justify-content:space-between;align-items:center;margin-top:14px}
.monthly-auto-foot p{margin:0;font-size:12px}
.monthly-auto-foot button{white-space:nowrap}
.monthly-history{border-top:1px solid #e7ebf0;margin-top:16px;padding-top:14px}
.monthly-history h4{margin:0 0 10px;font-size:14px;color:#25364a}
.monthly-history table{width:100%;border-collapse:collapse;font-size:12px}
.monthly-history th,.monthly-history td{text-align:left;padding:9px 8px;border-bottom:1px solid #e8edf2;overflow-wrap:anywhere}
.monthly-history th{color:#647187;font-weight:650;background:#fafbfd}
.monthly-recovery{border-top:1px solid #e7ebf0;margin-top:13px;padding-top:12px;font-size:12px;color:#58677d}
.monthly-recovery summary{font-weight:650;cursor:pointer;color:#2f527f}
.monthly-recovery p{line-height:1.55;margin:10px 0 0}
@media(max-width:1000px){.monthly-auto-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:610px){.monthly-auto-heading,.monthly-auto-foot{flex-direction:column;align-items:flex-start}.monthly-auto-grid{grid-template-columns:1fr}.monthly-history{overflow:auto}.monthly-history table{min-width:460px}}

/* iPhone/iPad visual-viewport safety for Numbers editor actions.
   The worksheet is intentionally never resized by these rules.
   Screen UI only; original Numbers layout and printed PDF stay exact. */
@media screen{
 #original-numbers-grid .numbers-row-trigger{
  min-height:0!important;overflow:hidden;
  white-space:nowrap;-webkit-user-select:none;user-select:none;
  -webkit-touch-callout:none;
 }
 .numbers-context-menu,.numbers-context-menu *{
  -webkit-user-select:none!important;user-select:none!important;
  -webkit-touch-callout:none!important;
 }
 .numbers-context-menu button{touch-action:manipulation}
 .numbers-context-menu.numbers-phone-menu{
  max-height:none;overflow-y:auto;overscroll-behavior:contain;
  font-size:14px;line-height:1.35;
 }
 .numbers-context-menu.numbers-phone-menu .numbers-context-action{
  min-height:41px;padding:8px 12px;
 }
 .numbers-context-menu.numbers-phone-menu .numbers-context-icon{font-size:17px}
 html.numbers-phone-dropdown body.numbers-dropdown-open{overflow:hidden}
 html.numbers-phone-dropdown .numbers-dropdown-backdrop{
  inset:auto;background:rgba(15,23,42,.6);
 }
 html.numbers-phone-dropdown .numbers-dropdown-panel{
  display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  box-sizing:border-box;min-width:0;max-width:none;
  border:1px solid #cbd5e1;border-radius:18px;
  padding:19px 17px 17px;
  box-shadow:0 24px 70px rgba(15,23,42,.3);
 }
 html.numbers-phone-dropdown .numbers-dropdown-panel.hide{display:none!important}
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-head{
  flex:0 0 auto;flex-wrap:wrap;gap:8px
 }
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-head h2{font-size:21px}
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-head-actions{
  margin-left:auto;gap:6px
 }
 html.numbers-phone-dropdown .numbers-dropdown-panel #numbers-dd-hide-keyboard{
  font-size:11px;padding:6px 7px!important
 }
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-help{flex:0 0 auto;margin:9px 0 13px}
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-options{
  flex:0 1 auto;min-height:0;
  max-height:var(--numbers-phone-options-max,280px)!important;
  overflow-y:auto;-webkit-overflow-scrolling:touch;
 }
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-add-option{align-self:flex-start}
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-space-hint{flex:0 0 auto}
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-status{flex:0 0 auto}
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-footer{
  flex:0 0 auto;margin-top:12px;padding-top:12px
 }
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-option{
  grid-template-columns:20px minmax(0,1fr) 36px 36px 36px;gap:5px
 }
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-option input{
  font-size:16px;min-height:43px
 }
 html.numbers-phone-dropdown .numbers-dropdown-panel .numbers-dd-option button{min-height:43px}
}
@media print{
 .numbers-context-menu,.numbers-dropdown-panel,.numbers-dropdown-backdrop,
 #original-numbers-grid .numbers-row-gutter{display:none!important}
}

/* Tablet iPad pinch-zoom: contextual menus follow the touched Sheet/tab/cell
   and both option editors stay INSIDE Safari's current visual viewport.
   Screen only. Imported Numbers cells, sheet width and PDF remain unchanged. */
@media screen{
 .numbers-context-menu.numbers-tablet-menu{
  overflow-y:auto;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  font-size:13px;line-height:1.4;
 }
 .numbers-context-menu.numbers-tablet-menu .numbers-context-action{
  min-height:39px;padding:8px 11px;
 }
 /* Original Numbers Edit pop-up menu uses its own screen-only dialog. */
 .numbers-options-overlay.numbers-options-viewport{
  position:fixed;right:auto!important;bottom:auto!important;inset:auto;
  align-items:center;justify-content:center;
  padding:16px;box-sizing:border-box;
 }
 .numbers-options-viewport .numbers-options-dialog{
  width:min(680px,100%);min-width:0;
  display:flex;flex-direction:column;overflow:hidden;
 }
 .numbers-options-viewport .numbers-options-head,
 .numbers-options-viewport .numbers-options-actions{flex:0 0 auto}
 .numbers-options-viewport .numbers-options-list{
  flex:1 1 auto;min-height:0;overflow-y:auto;
 }
 .numbers-options-head-buttons,
 .numbers-dd-head-actions{display:flex;align-items:center;gap:8px}
 .numbers-options-hide-keyboard,
 .numbers-dropdown-panel #numbers-dd-hide-keyboard{
  display:none;white-space:nowrap;
  min-height:38px;padding:7px 10px!important;
  background:#f5f8fc;border:1px solid #cbd7e8;border-radius:8px;
  color:#334f6f;font-size:12px;font-weight:700;cursor:pointer;
 }
 .numbers-options-viewport .numbers-options-hide-keyboard,
 html.numbers-tablet-dropdown .numbers-dropdown-panel #numbers-dd-hide-keyboard,
 html.numbers-phone-dropdown .numbers-dropdown-panel #numbers-dd-hide-keyboard{
  display:inline-flex;align-items:center;justify-content:center;
 }
 html.numbers-tablet-dropdown body.numbers-dropdown-open{overflow:hidden}
 html.numbers-tablet-dropdown .numbers-dropdown-backdrop{inset:auto}
 html.numbers-tablet-dropdown .numbers-dropdown-panel{
  display:flex;flex-direction:column;
  box-sizing:border-box;overflow:hidden;
  max-width:none;border-radius:16px;
  padding:20px 21px 17px;
 }
 html.numbers-tablet-dropdown .numbers-dropdown-panel.hide{display:none!important}
 html.numbers-tablet-dropdown .numbers-dropdown-panel .numbers-dd-head,
 html.numbers-tablet-dropdown .numbers-dropdown-panel .numbers-dd-help,
 html.numbers-tablet-dropdown .numbers-dropdown-panel .numbers-dd-space-hint,
 html.numbers-tablet-dropdown .numbers-dropdown-panel .numbers-dd-status,
 html.numbers-tablet-dropdown .numbers-dropdown-panel .numbers-dd-footer{flex:0 0 auto}
 html.numbers-tablet-dropdown .numbers-dropdown-panel .numbers-dd-help{margin:10px 0 14px}
 html.numbers-tablet-dropdown .numbers-dropdown-panel .numbers-dd-options{
  flex:1 1 auto;min-height:0;max-height:none!important;overflow-y:auto;
 }
 html.numbers-tablet-dropdown .numbers-dropdown-panel .numbers-dd-add-option{
  align-self:flex-start;
 }
 html.numbers-tablet-dropdown .numbers-dropdown-panel .numbers-dd-option input{
  font-size:16px;
 }
}
@media print{
 .numbers-options-overlay,.numbers-context-menu,
 .numbers-dropdown-panel,.numbers-dropdown-backdrop{display:none!important}
}

/* Clean school login: remove redundant introductory copy without leaving
   an oversized gap, and keep the confidentiality notice visible. */
@media screen{
 .login-card{gap:14px;padding:34px 36px 30px}
 .login-card h1{margin:4px 0 12px}
 .login-card label{font-size:13px}
 .login-card #sign-in{margin-top:4px}
 .login-card .login-confidentiality{
  display:block;margin-top:8px;color:#64748b;
  font-size:12px;line-height:1.5;text-align:center;
 }
 .login-card #setup-warning.hide{display:none!important}
}
@media screen and (max-width:1100px){
 /* Safari zooms the page when a focused input's text is below 16px. */
 .login-card input{font-size:16px}
}
@media screen and (max-width:520px){
 .login-card{padding:28px 22px;gap:13px}
 .login-card h1{font-size:21px;margin:4px 0 7px}
 .login-card .login-confidentiality{margin-top:7px}
}

/* Student Add/Edit form – iOS Safari portrait & landscape containment.
   Screen-only UI. Preserve dates, age override, Numbers files and PDF layout. */
@media screen {
 #student-dialog {
  box-sizing:border-box;
  max-width:calc(100vw - 20px);
  max-height:calc(100vh - 24px); /* older iOS Safari fallback */
  max-height:calc(100dvh - 24px);
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
 }
 #student-dialog > .dialog-head {
  position:sticky;top:0;z-index:2;
  background:#fff;padding:5px 0 12px;margin-bottom:9px;
 }
 #student-dialog .formbox {
  width:100%;max-width:630px;min-width:0;
 }
 #student-dialog .formbox > label {
  width:100%;min-width:0;max-width:100%;
 }
 #student-dialog .student-report-dates {
  width:100%;max-width:100%;min-width:0;
  grid-template-columns:minmax(0,1fr);
 }
 #student-dialog .student-report-dates > *,
 #student-dialog .student-report-dates label {
  min-width:0;max-width:100%;
 }
 #student-dialog .student-report-dates label {
  width:100%;grid-template-columns:minmax(0,1fr);
 }
 #student-dialog .student-report-date-row {
  width:100%;min-width:0;max-width:100%;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
 }
 #student-dialog .student-report-date-row > label {
  min-width:0;max-width:100%;
 }
 #student-dialog input,
 #student-dialog select {
  max-width:100%;min-width:0;box-sizing:border-box;
  font-size:16px; /* Prevent iOS Safari auto-zoom on focus */
 }
 #student-dialog input[type="date"] {
  display:block;width:100%;min-width:0;max-width:100%;
 }
}
@media screen and (max-width:620px) {
 #student-dialog {width:calc(100vw - 20px);padding:18px 16px}
 #student-dialog .student-report-date-row {
  grid-template-columns:minmax(0,1fr);
 }
}
@media screen and (orientation:landscape) and (max-height:550px) {
 #student-dialog {
  max-height:calc(100vh - 16px);
  max-height:calc(100dvh - 16px);
  padding:14px 18px;
 }
 #student-dialog .formbox{gap:12px}
}

/* Safari's native type=date control has an intrinsic width on some iOS releases.
   The grid track and the *control's painted border* must both fit the form.
   The JS resize fallback measures the real border when Safari still overflows. */
@media screen {
 #student-dialog .formbox,
 #student-dialog .formbox > label,
 #student-dialog .student-report-dates,
 #student-dialog .student-report-date-row,
 #student-dialog .student-report-dates label{
  box-sizing:border-box;min-inline-size:0;max-inline-size:100%;
 }
 #student-dialog .student-report-dates{
  inline-size:100%;
  grid-template-columns:minmax(0,1fr);
  overflow-x:clip; /* Last-resort guard; not the primary sizing fix. */
 }
 #student-dialog .formbox > label,
 #student-dialog .student-report-dates > label,
 #student-dialog .student-report-date-row > label{
  inline-size:100%;min-inline-size:0;
 }
 #student-dialog .formbox input,
 #student-dialog .formbox select{
  display:block;
  inline-size:100%;
  min-inline-size:0!important;
  max-inline-size:100%;
  -webkit-min-logical-width:0;
  box-sizing:border-box;
 }
 #student-dialog .formbox input[type="date"]{
  overflow:hidden;
  text-overflow:clip;
 }
}


/* Formatting popup stays outside the report, and is never printed. */
.iep-cell-format-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:12010;background:rgba(15,23,42,.12)}
.iep-cell-format-panel{position:fixed;box-sizing:border-box;transform-origin:top left;overflow:auto;-webkit-overflow-scrolling:touch;background:#25272b;color:#fff;border:1px solid #464a50;border-radius:13px;padding:12px;box-shadow:0 12px 34px rgba(15,23,42,.34);font:14px/1.35 Helvetica,Arial,sans-serif}
.iep-cell-format-title{font-weight:700;margin:0 0 10px}
.iep-cell-format-preview{background:#fff;border-radius:6px;color:#202124;padding:8px;margin-bottom:10px;min-height:24px;max-height:105px;overflow:auto;white-space:pre-wrap;overflow-wrap:break-word}
.iep-cell-format-row{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;margin-top:9px}
.iep-cell-format-panel button{box-sizing:border-box;min-width:40px;min-height:40px;padding:5px 7px;border:1px solid #575d67;border-radius:7px;background:#353940;color:#fff;font:inherit;cursor:pointer;touch-action:manipulation}
.iep-cell-format-panel button:disabled{opacity:.4}
.iep-cell-format-panel button.active{background:#2164bd;border-color:#8fbaff}
.iep-cell-format-panel button:focus-visible{outline:2px solid #a5c9ff;outline-offset:2px}
.iep-cell-format-size{min-width:30px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}
.iep-cell-format-panel .iep-format-bold{font-weight:700}.iep-cell-format-panel .iep-format-italic{font-style:italic}.iep-cell-format-panel .iep-format-underline{text-decoration:underline}
.iep-format-align-icon{display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:17px;margin:auto}.iep-format-align-icon i{display:block;background:currentColor;height:2px;width:17px}.iep-format-align-icon i:nth-child(even){width:11px}.iep-format-align-center{align-items:center}.iep-format-align-right{align-items:flex-end}.iep-format-align-justify i:nth-child(even){width:17px}
.iep-cell-format-footer button{flex:1}.iep-cell-format-footer .iep-cell-format-done{background:#1763cf;border-color:#75aaff;font-weight:700}
@media(pointer:coarse){.iep-cell-format-panel button{min-height:44px;min-width:40px}}
@media print{.iep-cell-format-overlay{display:none!important}}

/* Safari 12 has no flex gap support. */
.iep-cell-format-row{gap:0}.iep-cell-format-row>*{margin:2px}

/* Approved compact no-color Cell formatting panel. */
.iep-cell-format-title{display:flex;align-items:center;justify-content:space-between;min-height:30px;font-size:16px}
.iep-cell-format-panel .iep-cell-format-close{border:0;background:transparent;min-width:36px;min-height:36px;font-size:23px;line-height:1}
@media(pointer:coarse){.iep-cell-format-panel .iep-cell-format-close{min-height:44px;min-width:44px}}

/* Unsaved student IEP modal: centered, no layout shifts, Safari 12 compatible. */
.unsaved-iep-overlay{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;z-index:12500;background:rgba(15,23,42,.42);padding:12px;box-sizing:border-box}
.unsaved-iep-overlay.hide{display:none!important}
.unsaved-iep-panel{box-sizing:border-box;width:100%;max-width:480px;max-height:90vh;overflow:auto;background:#fff;color:#182638;border:1px solid #d7e0eb;border-radius:14px;padding:20px;box-shadow:0 12px 40px rgba(15,23,42,.25)}
 .unsaved-iep-panel{position:relative}
.unsaved-iep-close{position:absolute;top:8px;right:8px;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:8px;background:transparent;color:#526176;font-size:27px;line-height:1;cursor:pointer}
.unsaved-iep-close:hover,.unsaved-iep-close:focus{background:#edf2fa;color:#182638}.unsaved-iep-close:disabled{opacity:.45;cursor:default}
.unsaved-iep-panel h2{font-size:21px;margin:0 44px 10px 0}.unsaved-iep-panel p{font-size:15px;line-height:1.45;margin:0 0 12px}
#unsaved-iep-feedback:empty{display:none}#unsaved-iep-feedback{color:#9b2828}
.unsaved-iep-actions{display:flex;margin:0 -4px}.unsaved-iep-actions button{flex:1;min-width:0;min-height:44px;margin:0 4px;white-space:normal}
@media print{.unsaved-iep-overlay{display:none!important}}

.iep-row-height-toggle{margin-left:auto;display:inline-block;flex:none;width:34px;height:20px;border-radius:20px;background:#70747d;position:relative}.iep-row-height-toggle:after{content:'';position:absolute;left:3px;top:3px;width:14px;height:14px;border-radius:50%;background:white}.iep-row-height-toggle.on{background:#1763cf}.iep-row-height-toggle.on:after{left:17px}
@media screen{#original-numbers-grid .numbers-source-table td[data-fixed-height] textarea.numbers-source-cell{overflow-y:auto!important;min-height:0!important}}
.iep-text-tools-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(15,23,42,.38);display:flex;align-items:center;justify-content:center;z-index:12020;padding:12px;box-sizing:border-box}
.iep-text-tools-panel{width:100%;max-width:480px;max-height:88vh;overflow:auto;box-sizing:border-box;background:#fff;color:#182638;border-radius:14px;padding:18px;box-shadow:0 12px 40px rgba(0,0,0,.25);-webkit-overflow-scrolling:touch}.iep-text-tools-panel h2{margin:0 0 8px}.iep-text-tools-panel p{font-size:14px;margin:8px 0}.iep-text-tools-panel label{display:block;margin:10px 0;font-size:14px;font-weight:600}.iep-text-tools-panel input:not([type=checkbox]),.iep-text-tools-panel select{display:block;width:100%;box-sizing:border-box;min-height:42px;margin-top:5px;font-size:16px}.iep-text-tools-panel .iep-text-case{display:flex;align-items:center}.iep-text-case input{margin-right:8px}.iep-text-preview{max-height:30vh;overflow:auto;border:1px solid #d8e0eb;border-radius:7px}.iep-text-match{padding:9px;border-bottom:1px solid #e0e5ed;overflow-wrap:break-word;font-size:13px}.iep-text-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;margin:8px -3px 0}.iep-text-actions button{margin:3px;min-height:44px;white-space:normal}@media print{.iep-text-tools-overlay{display:none!important}}

/* Range selection is visual only, never printed. */
@media screen{
#original-numbers-grid td.iep-range-selected,#original-numbers-grid tr.iep-range-selected>td,#original-numbers-grid td.iep-range-anchor,#original-numbers-grid tr.iep-range-anchor>td{box-shadow:inset 0 0 0 1px #1763cf;background:#dceafe!important}
#original-numbers-grid .numbers-row-trigger.iep-range-selected{background:#1763cf;color:white}
}

/* Compact Plus: only Android / iPhone portrait widths at most 600px.
   Scope to IEP controls, never to the imported Numbers worksheet or PDF. */
@media screen and (orientation:portrait) and (max-width:600px){
 #report-view>.page-head{gap:5px;margin-bottom:7px;align-items:stretch}
 #report-view>.page-head h2{font-size:21px;line-height:1.22}
 #report-view>.page-head .actions{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;justify-content:start;gap:5px;
  width:100%;max-width:100%;margin:0;
 }
 #report-view>.page-head .actions #save-btn,
 #report-view>.page-head .actions #editor-backup-drive,
 #report-view>.page-head .actions #print-btn{
  box-sizing:border-box;display:flex;align-items:center;justify-content:center;
  min-width:0;width:100%;height:36px;min-height:36px;
  padding:4px 5px;border-radius:7px;font-size:12px;
  font-weight:700;line-height:1.15;white-space:nowrap;
 }
 #report-view>.page-head .actions #print-btn{grid-column:1;grid-row:2}
 #report-view .report-history-wrapper{margin-bottom:6px}
 #report-view .report-compact-status{
  min-height:34px;padding:2px 5px;gap:4px;
  display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;
 }
 #report-view .report-undo-wrap{flex:0 0 auto;min-width:0}
 #report-view #global-undo-btn{
  height:30px;min-height:30px;min-width:0;padding:3px 5px;
  gap:2px;font-size:11px;border-radius:6px;
 }
 #report-view #global-undo-btn span{font-size:14px}
 #report-view .report-status-group{
  flex:1 1 auto;min-width:0;gap:4px;font-size:11px;
  white-space:nowrap;overflow:hidden;
 }
 #report-view #save-status{
  display:block;min-width:0;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;
 }
 #report-view .report-status-dot{width:6px;height:6px;min-width:6px}
 #report-view .report-history-trigger{
  flex:0 0 auto;width:auto;height:30px;min-height:30px;
  padding:3px 5px;gap:2px;font-size:11px;
 }
 #report-view #tabbar.tabs{
  box-sizing:border-box;display:flex;flex-wrap:nowrap;
  justify-content:flex-start;align-items:stretch;
  width:100%;max-width:100%;margin:6px 0 0;
  padding:0 0 2px;gap:3px;overflow-x:auto;overflow-y:hidden;
  -webkit-overflow-scrolling:touch;touch-action:pan-x;
 }
 #report-view #tabbar.tabs button{
  box-sizing:border-box;flex:0 0 auto;
  min-width:46px;width:auto;height:34px;min-height:34px;
  padding:4px 6px;font-size:12px;line-height:1.15;
  font-weight:700;border-radius:6px 6px 0 0;
  white-space:nowrap;
 }
 #report-view #sheet-context-trigger.sheet-context-trigger{
  flex:0 0 auto;min-width:40px;height:34px;min-height:34px;
  padding:4px 5px;font-size:12px;
 }
 #report-view .portrait-sheet-tools{margin:3px 0 5px}
 #report-view #portrait-sheet-toggle{min-height:30px;padding:4px 8px;font-size:11px}
}

.mobile-iep-ui{display:none}
@media screen {
 #report-view.mobile-iep-editor>.page-head{display:block;margin-bottom:10px}
 .mobile-iep-editor #mobile-student{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0 10px}
 #mobile-student>div{min-width:0;overflow-wrap:anywhere}
 #mobile-student small{display:block;color:#526177}
 #mobile-edit-student{flex:none;min-height:44px}
 #report-view.mobile-iep-editor>.page-head .actions{display:grid;width:100%;max-width:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 #report-view.mobile-iep-editor>.page-head .actions button{width:100%;min-width:0;min-height:44px;white-space:normal}
 #report-view.mobile-iep-editor>.page-head .actions #save-btn{grid-column:1/-1}
 #report-view.mobile-iep-editor>.page-head .actions #print-btn{grid-column:2;grid-row:2}
 .mobile-iep-editor #mobile-iep-modes{display:flex;gap:4px;background:#fff;border:1px solid #d6dfe9;border-radius:12px;padding:3px;margin:8px 0}
 #mobile-iep-modes button{flex:1;min-width:0;min-height:44px;border:0;background:transparent;color:#425168;border-radius:9px}
 #mobile-iep-modes button[aria-pressed=true]{background:#e8effa;color:#183968;font-weight:bold}
 #report-view.mobile-easy-active #iep-paper-scroll,#report-view.mobile-easy-active .portrait-sheet-tools,
 #report-view.mobile-easy-active #sheet-context-trigger{display:none!important}
 .mobile-easy-active #mobile-items{display:block;min-width:0;background:white;border-radius:12px;padding:12px 8px}
 #mobile-items .easy-summary{display:flex;justify-content:space-between;align-items:baseline;gap:5px;scroll-margin-top:12px}
 #mobile-items h3{font-size:17px;margin:0;overflow-wrap:anywhere}
 #mobile-items .easy-count{flex:none;color:#455668;font-size:13px}
 #mobile-items .easy-note{color:#22496f;background:#eff6ff;padding:7px 9px;margin:8px 0;border-radius:6px;font-size:13px}
 #mobile-items progress{display:block;width:100%;height:6px;margin:10px 0 12px;accent-color:#198654;border:0;border-radius:4px;overflow:hidden}
 #mobile-items progress::-webkit-progress-bar{background:#e3e9ef}
 #mobile-items progress::-webkit-progress-value{background:#198654}
 #mobile-items .easy-card{border:1px solid #c6d2e0;border-radius:10px;margin-top:8px;padding:0 10px;background:white}
 #mobile-items .easy-complete{background:#e9f8ef;border-color:#79bf96}
 #mobile-items .easy-toggle{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 8px;width:100%;min-height:48px;padding:10px 0;text-align:left;background:transparent;color:#152641;border:0;white-space:normal;overflow-wrap:anywhere;scroll-margin-top:14px}
 #mobile-items .easy-toggle strong{font-size:16px}
 #mobile-items .easy-preview{grid-column:1/-1;font-size:14px;font-weight:400;color:#475569}
 #mobile-items .easy-mark{color:#167344;font-size:13px}
 #mobile-items .easy-value{justify-self:end;font-size:13px}
 #mobile-items .easy-arrow{color:#2157ac}
 #mobile-items .easy-mark:empty,#mobile-items .easy-preview:empty,#mobile-items .easy-value:empty{display:none}
 #mobile-items .easy-field{margin:8px 0 12px;min-width:0}
 #mobile-items .easy-field label{display:block;font-size:14px;font-weight:600;margin-bottom:5px}
 #mobile-items select,#mobile-items .easy-grades button,#mobile-items .easy-done{box-sizing:border-box;min-height:44px;font-size:16px}
 #mobile-items select{width:100%;max-width:100%;min-width:0}
 #mobile-items .easy-grades{display:flex;flex-wrap:wrap;gap:5px}
 #mobile-items .easy-grades button{flex:1;background:white;border:1px solid #b3c2d5;border-radius:7px;color:#183254}
 #mobile-items .easy-grades button[aria-pressed=true],#mobile-items .easy-done{background:#184f96;color:white}
 #mobile-items .easy-done{width:100%;margin:0 0 12px;border:0;border-radius:20px;font-weight:600}
}
@media screen {
 #app.phone-navigation:not(.phone-nav-open)>.layout>.sidebar{display:none}
 #app.phone-navigation:not(.phone-nav-open)>.layout>.main{width:100%;min-width:0}
 #app.phone-navigation .topbar{height:auto;min-height:54px;flex-wrap:wrap;gap:4px}
 #app.phone-navigation .phone-menu{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;background:transparent;color:inherit;font-size:24px;line-height:1}
}

@media screen {
 #app.phone-navigation #report-view #global-undo-btn,
 #app.phone-navigation #report-view .report-history-trigger{
  height:44px;min-height:44px;padding:4px 9px;gap:4px;font-size:14px
 }
 #app.phone-navigation #report-view #global-undo-btn span{font-size:18px}
 #app.phone-navigation #report-view #tabbar.tabs button{
  height:44px;min-height:44px;min-width:54px;padding:4px 10px;font-size:14px
 }
}

html.drive-backup-pending,html.drive-backup-pending body{overflow:hidden;overscroll-behavior:none}
#drive-backup-lock:not(.hide){position:fixed;top:0;right:0;bottom:0;left:0;z-index:99999;display:flex;align-items:center;justify-content:center;background:rgba(20,33,52,.55);touch-action:none;cursor:wait}
#drive-backup-message{margin:16px;padding:18px 24px;border-radius:12px;background:white;color:#183254}

#restore-status { display:none }
.restoring #login,.restoring #app { visibility:hidden }
.restoring #restore-status { display:grid; position:fixed; inset:0; place-items:center; color:#344963; background:#f5f7fa }

#mode-badge.is-offline{color:#991b1b;background:#fef2f2;border-color:#dc2626;font-weight:600}

/* Phone-only Edit Student: show the outcome of Save Changes below the
 * action buttons. Do not hide the destructive action or its confirm dialogs. */
@media screen{
 #student-dialog.phone-edit-feedback #delete-student-note{display:none!important}
 #student-dialog.phone-edit-feedback .student-save-feedback{
  display:block;box-sizing:border-box;width:100%;margin:10px 0 0;
  border:1px solid;border-radius:10px;padding:12px 14px;
  font-size:14px;font-weight:600;line-height:1.5;overflow-wrap:anywhere;
 }
 #student-dialog.phone-edit-feedback .student-save-feedback.hide{display:none!important}
 #student-dialog.phone-edit-feedback .student-save-success{
  color:#166534;background:#eefbf1;border-color:#86c69b;
 }
 #student-dialog.phone-edit-feedback .student-save-error{
  color:#991b1b;background:#fff0f0;border-color:#ed9b9b;
 }
}
/* Real school startup is asynchronous and has no trustworthy percentage.
 * Use an animated blue indeterminate progress bar, not a fabricated number.
 * Works on old iPad Safari (no CSS Houdini or aspect-ratio dependency). */
.restoring #restore-status{padding:20px;text-align:center}
.restoring #restore-status .restore-panel{
 width:320px;max-width:calc(100vw - 40px);color:#263a55;font-size:15px;
 display:flex;flex-direction:column;align-items:stretch;gap:14px;
}
.restoring #restore-status #restore-message{font-size:16px;font-weight:600}
.restoring #restore-progress{height:8px;width:100%;background:#dae4f1;border-radius:999px;overflow:hidden;position:relative}
.restoring #restore-progress .restore-progress-fill{
 position:absolute;top:0;bottom:0;left:0;width:38%;
 background:#1763cf;border-radius:999px;
 animation:school-iep-opening 1.55s ease-in-out infinite;
}
@keyframes school-iep-opening{
 0%{left:-40%}100%{left:100%}
}
.restoring.has-restore-error #restore-progress .restore-progress-fill{animation-play-state:paused}
.restoring #restore-error{
 border:1px solid #e6a2a2;background:#fff0f0;color:#9d1c1c;
 font-size:13px;font-weight:500;line-height:1.45;padding:12px;border-radius:9px;
 text-align:left;
}
.restoring #restore-retry{align-self:center;min-height:42px;padding:9px 22px;font-weight:650}
@media(prefers-reduced-motion:reduce){
 .restoring #restore-progress .restore-progress-fill{animation:none;left:31%}
}

/* Admin structure mind map */
.manage-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:12px}
#manage-status{color:#315475;font-weight:600;font-size:13px}
.manage-scroll{overflow:auto;max-width:100%;min-height:350px;padding:20px}
.manage-board{min-width:760px;font-size:14px;line-height:1.35}
.manage-root{margin:0 auto 35px;background:#1763cf;color:white;border-radius:12px;padding:14px 28px;font-size:1.3em;font-weight:700;width:max-content;position:relative}
.manage-root:after{content:'';position:absolute;left:50%;top:100%;height:35px;border-left:2px solid #83a8df}
.manage-columns{display:flex;align-items:flex-start;justify-content:space-around;gap:14px;position:relative}
.manage-columns:before{content:'';position:absolute;top:-1px;left:16.7%;right:16.7%;border-top:2px solid #83a8df}
.manage-dept{min-width:235px;flex:1;position:relative;padding:12px 6px}
.manage-dept:before{content:'';position:absolute;top:0;left:50%;height:13px;border-left:2px solid #83a8df}
.manage-dept-node{background:#dbeafe;color:#17447f;border:1px solid #8bb5ee;text-align:center;border-radius:10px;padding:12px;font-weight:700;margin-bottom:18px;font-size:1.1em}
.manage-branches{display:flex;flex-direction:column;gap:18px;border-left:2px solid #e2b575;padding-left:10px}
.manage-teacher-branch{position:relative}
.manage-teacher-branch:before{content:'';position:absolute;width:11px;left:-12px;top:20px;border-top:2px solid #e2b575}
.manage-teacher-node,.manage-student-node{display:flex;gap:5px;align-items:center;border-radius:9px;padding:7px;border:1px solid #e8a849;background:#ffedce;color:#71470b;min-height:42px}
.manage-unassigned{background:#edf0f5;color:#48566a;border-color:#aab7c8}
.manage-student-list{margin:8px 0 0 12px;border-left:2px solid #8bc5a0;padding-left:8px;display:flex;flex-direction:column;gap:7px}
.manage-student-node{background:#e0f5e6;color:#245a39;border-color:#80c79b;position:relative}
.manage-student-node:before{content:'';position:absolute;left:-10px;width:9px;top:50%;border-top:2px solid #8bc5a0}
.manage-name{flex:1;min-width:0;overflow-wrap:anywhere;font-weight:600}
.manage-grip{font-size:1.2em;cursor:grab}
.manage-teacher-node button,.manage-student-node button{font-size:.85em;padding:4px 6px;min-height:32px}
.manage-delete{color:#a11b1b!important;font-weight:700}
.manage-target{border:1px dashed #aabbd0;border-radius:8px;color:#547098;text-align:center;padding:8px;font-size:.9em}
.manage-drop-active{outline:3px solid #1763cf;outline-offset:1px;background:#e0edff!important}
.manage-key{margin-top:12px;font-size:13px}
@media(max-width:700px){.manage-scroll{padding:10px}.manage-toolbar{align-items:flex-start}.manage-board{min-width:750px}.manage-teacher-node button,.manage-student-node button{min-height:40px}}

.manage-dept-node button{float:right;min-width:30px;min-height:30px;padding:3px 6px}.manage-history-row{padding:8px 0;border-bottom:1px solid #e5eaf1;font-size:13px}#manage-history-panel{margin-bottom:12px;max-height:350px;overflow:auto}

/* Shared teacher deletion confirmation: selectable email and copy action. */
#teacher-delete-confirm-dialog{width:480px;max-width:calc(100vw - 28px);max-height:calc(100vh - 28px);overflow:auto;box-sizing:border-box}
#teacher-delete-confirm-dialog h3{margin:0}
#teacher-delete-name{font-weight:700;margin:0}
#teacher-delete-confirm-dialog .formbox{display:flex;flex-direction:column;gap:12px}
.teacher-delete-email-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#teacher-delete-email{flex:1;min-width:0;width:100%;background:#f3f6fa;font-size:16px;user-select:text;-webkit-user-select:text}
#teacher-delete-copy{flex-shrink:0;white-space:nowrap}
#teacher-delete-copy-status{min-height:1em;color:#24613d}
#teacher-delete-confirm-dialog .dialog-actions{justify-content:flex-end}
#teacher-delete-fallback-backdrop:not(.hide){position:fixed;inset:0;top:0;right:0;bottom:0;left:0;z-index:1000;background:rgba(15,23,42,.45)}
@media(max-width:480px){#teacher-delete-confirm-dialog{padding:16px}.teacher-delete-email-row{flex-direction:column;align-items:stretch}#teacher-delete-copy{min-height:42px}#teacher-delete-confirm-dialog input{font-size:16px}}

/* Keep Edit / Move / Delete grouped on narrow mind-map cards. */
.manage-teacher-node,.manage-student-node{flex-wrap:wrap}
.manage-teacher-node .manage-name,.manage-student-node .manage-name{flex:1 1 90px;overflow-wrap:break-word;word-break:normal}
.manage-node-actions{display:flex;align-items:center;gap:4px;flex:0 0 auto;margin-left:auto}
.manage-node-actions button{white-space:nowrap;flex-shrink:0}
@media(max-width:700px){.manage-node-actions button{min-height:40px;padding:5px 8px}}

/* Manage Students: counts remain school-wide while search filters the map. */
.manage-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.manage-summary .card{margin:0;padding:12px 15px;display:flex;flex-direction:column;gap:4px}.manage-summary span{font-size:13px;color:#51647b;font-weight:600}.manage-summary strong{font-size:26px;color:#173e71;line-height:1.2}.manage-summary small{font-size:11px;color:#65758b}.manage-search-label{display:flex;flex-direction:column;gap:4px;min-width:210px;font-size:12px;font-weight:600}.manage-search-label input{width:100%;min-height:38px}.manage-dept-count{display:block;font-size:.75em;font-weight:500;margin-top:3px}.manage-count-badge{font-size:.78em;font-weight:600;border-radius:12px;background:#fff8;padding:3px 7px;white-space:nowrap}.manage-teacher-node .manage-count-badge{order:1}.manage-teacher-node .manage-node-actions{order:2}@media(max-width:700px){.manage-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.manage-search-label{width:100%}}

/* Manage Students phone layout: stacked departments, no horizontal canvas. */
.manage-key .manage-phone-hint{display:none}
@media screen{
#app.phone-navigation #manage-view{min-width:0;max-width:100%;width:100%}
#app.phone-navigation #manage-view >.page-head{display:block;margin-bottom:12px}
#app.phone-navigation #manage-view >.page-head h2{font-size:22px;line-height:1.25}
#app.phone-navigation #manage-view >.page-head .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:8px;width:100%;margin-top:12px}
#app.phone-navigation #manage-view >.page-head .actions button{min-width:0;width:100%;min-height:44px;padding:7px 6px;white-space:normal}
#app.phone-navigation #manage-view #manage-save{grid-column:1/-1}
#app.phone-navigation #manage-view .manage-summary{grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:8px;margin-bottom:10px}
#app.phone-navigation #manage-view .manage-summary .card{padding:10px 12px;min-width:0}
#app.phone-navigation #manage-view .manage-summary span{font-size:12px;overflow-wrap:break-word}
#app.phone-navigation #manage-view .manage-summary strong{font-size:24px}
#app.phone-navigation #manage-view .manage-toolbar{display:block;padding:12px;margin-bottom:12px}
#app.phone-navigation #manage-view .manage-search-label{display:block;width:100%;min-width:0}
#app.phone-navigation #manage-view #manage-search{display:block;margin-top:5px;min-height:44px;font-size:16px}
#app.phone-navigation #manage-view .manage-toolbar .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:8px;margin-top:10px}
#app.phone-navigation #manage-view .manage-toolbar .actions button{min-height:44px;min-width:0;padding:6px;white-space:normal}
#app.phone-navigation #manage-view #manage-zoom-in{display:none}
#app.phone-navigation #manage-view #manage-zoom-out{display:none}
#app.phone-navigation #manage-view #manage-status{display:block;margin-top:10px;overflow-wrap:break-word}
#app.phone-navigation #manage-view .manage-scroll{overflow:visible;min-width:0;min-height:0;width:100%;max-width:100%;padding:12px;margin-bottom:10px}
#app.phone-navigation #manage-view .manage-board{min-width:0;width:100%;max-width:100%;font-size:14px!important}
#app.phone-navigation #manage-view .manage-root{margin:0 auto 20px;width:auto;max-width:100%;text-align:center;padding:12px 15px;font-size:16px}
#app.phone-navigation #manage-view .manage-root:after{height:20px}
#app.phone-navigation #manage-view .manage-columns{display:block;min-width:0;width:100%;padding-left:0}
#app.phone-navigation #manage-view .manage-columns:before{display:none}
#app.phone-navigation #manage-view .manage-dept{min-width:0;width:100%;padding:0;margin:0 0 14px;border:1px solid #d8e3f2;border-radius:12px;background:#fff}
#app.phone-navigation #manage-view .manage-dept:last-child{margin-bottom:0}
#app.phone-navigation #manage-view .manage-dept:before{display:none}
#app.phone-navigation #manage-view .manage-dept-node{position:relative;display:block;min-height:60px;text-align:left;padding:10px 60px 10px 12px;margin:0;border:0;border-radius:11px 11px 0 0;font-size:16px;overflow-wrap:break-word}
#app.phone-navigation #manage-view .manage-dept-node button{position:absolute;right:8px;top:50%;transform:translateY(-50%);float:none;min-width:44px;min-height:44px;font-size:18px;padding:0}
#app.phone-navigation #manage-view .manage-dept-count{font-size:12px;margin-top:2px}
#app.phone-navigation #manage-view .manage-branches{display:block;border-left:0;padding:10px}
#app.phone-navigation #manage-view .manage-teacher-branch{margin-bottom:10px;min-width:0}
#app.phone-navigation #manage-view .manage-teacher-branch:last-child{margin-bottom:0}
#app.phone-navigation #manage-view .manage-teacher-branch:before{display:none}
#app.phone-navigation #manage-view .manage-teacher-node{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-gap:8px;padding:10px;min-width:0}
#app.phone-navigation #manage-view .manage-student-node{display:grid;grid-template-columns:minmax(0,1fr);grid-gap:8px;padding:10px;min-width:0}
#app.phone-navigation #manage-view .manage-grip{display:none}
#app.phone-navigation #manage-view .manage-name{min-width:0;overflow-wrap:break-word;word-break:break-word;font-size:14px;align-self:center}
#app.phone-navigation #manage-view .manage-count-badge{order:0;max-width:100%;font-size:11px;align-self:center;white-space:normal;text-align:right}
#app.phone-navigation #manage-view .manage-node-actions{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;grid-gap:6px;width:100%;margin:0;order:2}
#app.phone-navigation #manage-view .manage-node-actions button{min-height:44px;min-width:0;width:100%;padding:6px 4px;font-size:13px;white-space:normal}
#app.phone-navigation #manage-view .manage-node-actions .manage-delete{color:#a11b1b;background:#fff8f8;border-color:#e8b5b5;font-size:18px}
#app.phone-navigation #manage-view .manage-student-list{display:block;margin:8px 0 0 8px;padding-left:8px;min-width:0}
#app.phone-navigation #manage-view .manage-student-list:empty{display:none}
#app.phone-navigation #manage-view .manage-student-node{margin-bottom:7px}
#app.phone-navigation #manage-view .manage-student-node:last-child{margin-bottom:0}
#app.phone-navigation #manage-view .manage-target{display:none}
#app.phone-navigation #manage-view .manage-key .manage-desktop-hint{display:none}
#app.phone-navigation #manage-view .manage-key .manage-phone-hint{display:inline}
#app.phone-navigation #manage-view .manage-key{font-size:12px;line-height:1.5;overflow-wrap:break-word}
}
@media screen and (max-width:600px){
#manage-view{min-width:0;max-width:100%;width:100%}
#manage-view >.page-head{display:block;margin-bottom:12px}
#manage-view >.page-head h2{font-size:22px;line-height:1.25}
#manage-view >.page-head .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:8px;width:100%;margin-top:12px}
#manage-view >.page-head .actions button{min-width:0;width:100%;min-height:44px;padding:7px 6px;white-space:normal}
#manage-view #manage-save{grid-column:1/-1}
#manage-view .manage-summary{grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:8px;margin-bottom:10px}
#manage-view .manage-summary .card{padding:10px 12px;min-width:0}
#manage-view .manage-summary span{font-size:12px;overflow-wrap:break-word}
#manage-view .manage-summary strong{font-size:24px}
#manage-view .manage-toolbar{display:block;padding:12px;margin-bottom:12px}
#manage-view .manage-search-label{display:block;width:100%;min-width:0}
#manage-view #manage-search{display:block;margin-top:5px;min-height:44px;font-size:16px}
#manage-view .manage-toolbar .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:8px;margin-top:10px}
#manage-view .manage-toolbar .actions button{min-height:44px;min-width:0;padding:6px;white-space:normal}
#manage-view #manage-zoom-in{display:none}
#manage-view #manage-zoom-out{display:none}
#manage-view #manage-status{display:block;margin-top:10px;overflow-wrap:break-word}
#manage-view .manage-scroll{overflow:visible;min-width:0;min-height:0;width:100%;max-width:100%;padding:12px;margin-bottom:10px}
#manage-view .manage-board{min-width:0;width:100%;max-width:100%;font-size:14px!important}
#manage-view .manage-root{margin:0 auto 20px;width:auto;max-width:100%;text-align:center;padding:12px 15px;font-size:16px}
#manage-view .manage-root:after{height:20px}
#manage-view .manage-columns{display:block;min-width:0;width:100%;padding-left:0}
#manage-view .manage-columns:before{display:none}
#manage-view .manage-dept{min-width:0;width:100%;padding:0;margin:0 0 14px;border:1px solid #d8e3f2;border-radius:12px;background:#fff}
#manage-view .manage-dept:last-child{margin-bottom:0}
#manage-view .manage-dept:before{display:none}
#manage-view .manage-dept-node{position:relative;display:block;min-height:60px;text-align:left;padding:10px 60px 10px 12px;margin:0;border:0;border-radius:11px 11px 0 0;font-size:16px;overflow-wrap:break-word}
#manage-view .manage-dept-node button{position:absolute;right:8px;top:50%;transform:translateY(-50%);float:none;min-width:44px;min-height:44px;font-size:18px;padding:0}
#manage-view .manage-dept-count{font-size:12px;margin-top:2px}
#manage-view .manage-branches{display:block;border-left:0;padding:10px}
#manage-view .manage-teacher-branch{margin-bottom:10px;min-width:0}
#manage-view .manage-teacher-branch:last-child{margin-bottom:0}
#manage-view .manage-teacher-branch:before{display:none}
#manage-view .manage-teacher-node{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-gap:8px;padding:10px;min-width:0}
#manage-view .manage-student-node{display:grid;grid-template-columns:minmax(0,1fr);grid-gap:8px;padding:10px;min-width:0}
#manage-view .manage-grip{display:none}
#manage-view .manage-name{min-width:0;overflow-wrap:break-word;word-break:break-word;font-size:14px;align-self:center}
#manage-view .manage-count-badge{order:0;max-width:100%;font-size:11px;align-self:center;white-space:normal;text-align:right}
#manage-view .manage-node-actions{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;grid-gap:6px;width:100%;margin:0;order:2}
#manage-view .manage-node-actions button{min-height:44px;min-width:0;width:100%;padding:6px 4px;font-size:13px;white-space:normal}
#manage-view .manage-node-actions .manage-delete{color:#a11b1b;background:#fff8f8;border-color:#e8b5b5;font-size:18px}
#manage-view .manage-student-list{display:block;margin:8px 0 0 8px;padding-left:8px;min-width:0}
#manage-view .manage-student-list:empty{display:none}
#manage-view .manage-student-node{margin-bottom:7px}
#manage-view .manage-student-node:last-child{margin-bottom:0}
#manage-view .manage-target{display:none}
#manage-view .manage-key .manage-desktop-hint{display:none}
#manage-view .manage-key .manage-phone-hint{display:inline}
#manage-view .manage-key{font-size:12px;line-height:1.5;overflow-wrap:break-word}
}

/* Bulk IEP Edit */
#bulk-iep-card h3,#bulk-iep-card h4{margin:0 0 8px}.bulk-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.bulk-columns>div{min-width:0;border:1px solid #e0e5ec;border-radius:9px;padding:12px}.bulk-columns label{display:block;margin-bottom:10px}.bulk-students{max-height:240px;overflow:auto;margin:8px 0;padding:6px;border:1px solid #dee3e8;border-radius:8px}.bulk-student{display:flex!important;gap:8px;align-items:center;padding:5px 4px;margin:0!important;overflow-wrap:break-word}.bulk-student input{width:20px!important;min-height:20px;flex:0 0 20px}.bulk-preview-student{border:1px solid #dee3e8;border-radius:8px;padding:10px;margin:10px 0}.bulk-preview-student summary{font-weight:700;cursor:pointer}.bulk-diff{padding:8px 0;border-top:1px solid #e5eaf1;margin-top:8px}.bulk-diff-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.bulk-diff-values>div{padding:8px;background:#f5f7fa;border-radius:6px;min-width:0;overflow-wrap:break-word}.bulk-diff-values p,.bulk-diff-values pre{white-space:pre-wrap;overflow-wrap:break-word;margin:4px 0;font:inherit}.bulk-apply-result{color:#155e37}#bulk-review{margin-top:12px}#bulk-review input{max-width:240px;display:block;margin:6px 0}#bulk-status{font-weight:650;overflow-wrap:break-word}@media(max-width:700px){.bulk-columns,.bulk-diff-values{grid-template-columns:minmax(0,1fr)}#bulk-iep-card button{min-height:44px}#bulk-iep-card input,#bulk-iep-card select{font-size:16px}}

/* Shared Manage Students dropdown for Move, including older Safari. */
#manage-move-dialog{width:460px;max-width:calc(100vw - 28px);max-height:calc(100vh - 28px);overflow:auto;box-sizing:border-box}#manage-move-dialog .formbox{display:flex;flex-direction:column;gap:14px}#manage-move-dialog h3,#manage-move-current{margin:0}#manage-move-dialog select{font-size:16px;min-height:44px;width:100%;margin-top:6px}#manage-move-dialog .dialog-actions{justify-content:flex-end}#manage-move-dialog .dialog-actions button{min-height:44px;min-width:90px}#manage-move-dialog .hide{display:none!important}#manage-move-backdrop:not(.hide){position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:rgba(15,23,42,.5)}#manage-move-dialog.manage-move-fallback{position:fixed;z-index:1001;left:50%;top:50%;transform:translate(-50%,-50%);margin:0;display:block}@media(max-width:600px){#manage-move-dialog{padding:18px}#manage-move-dialog .dialog-actions button{flex:1}}

/* Student directory: equal-width search and department/teacher filters. */
#students-view .student-directory-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:center}
#students-view .student-search-field{position:relative;width:100%;min-width:0}
#students-view .student-search-field svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:#53677e}
#students-view .student-directory-toolbar #student-search,#students-view .student-directory-toolbar #dept-filter{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;min-height:44px;margin:0;font-size:14px}
#students-view .student-directory-toolbar #student-search{padding-left:40px}
@media(max-width:650px){#students-view .student-directory-toolbar{grid-template-columns:minmax(0,1fr);gap:10px}#students-view .student-directory-toolbar #student-search,#students-view .student-directory-toolbar #dept-filter{font-size:16px}}

#help-view .help-language{display:flex;align-items:center;gap:4px;flex-shrink:0;border:1px solid #d6e0eb;border-radius:9px;padding:3px;background:#fff}#help-view .help-language button{min-height:38px;padding:7px 14px;border:0;background:transparent;color:#294361;border-radius:6px;font-weight:600}#help-view .help-language button[aria-pressed="true"]{background:#1763cf;color:#fff} @media(max-width:600px){#help-view .help-language button{min-height:44px}}

/* Help-only bilingual shortcuts and private guide feedback. */
#help-view .help-quick-search{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin:4px 0}
#help-view .help-quick-chip{border:1px solid #ced9e6;border-radius:999px;background:#fff;color:#294361;padding:7px 13px;min-height:34px;font-size:13px;font-weight:600;cursor:pointer}
#help-view .help-quick-chip[aria-pressed="true"]{background:#1763cf;border-color:#1763cf;color:#fff}
#help-view .help-quick-clear{border-color:transparent;color:#275c96;background:transparent}
#help-view .help-pdf-action-status{font-size:12px;color:#49627d;line-height:1.5;margin:6px 0 0}
#help-view .help-pdf-action-status:empty{display:none}
#help-view .help-text-link{color:#1763cf;text-decoration:underline;min-height:40px}
@media(max-width:650px){#help-view .help-quick-chip{min-height:44px;font-size:14px}#help-view .help-text-link{min-height:44px}}

/* Match the Students search and filter controls on Safari and Chrome, for both roles. */
#students-view .student-directory-toolbar #student-search,
#students-view .student-directory-toolbar #dept-filter{height:44px;min-height:44px;border:1px solid #ced6e0;border-radius:7px;box-sizing:border-box;background-color:#fff}
#students-view .student-directory-toolbar #dept-filter{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 36px 0 12px;line-height:normal;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23647789' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:16px 16px}
#students-view .student-directory-toolbar #student-search:focus,
#students-view .student-directory-toolbar #dept-filter:focus{outline:2px solid #cbe0ff;border-color:#4b8ee7}
@media(max-width:650px){#students-view .student-directory-toolbar #student-search,#students-view .student-directory-toolbar #dept-filter{height:44px;font-size:16px}}

/* Help only: FAQ follows search; PDF guide library stays collapsed until opened. */
#help-view .help-guides-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;min-height:44px}
#help-view .help-guides-toggle::-webkit-details-marker{display:none}
#help-view .help-guides-toggle::marker{content:""}
#help-view .help-guides-heading{display:flex;flex-direction:column;gap:5px;min-width:0}
#help-view .help-guides-title{font-size:18px;font-weight:700;color:#223149}
#help-view .help-guides-caption{font-size:13px}
#help-view .help-guides-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
#help-view .help-guides-chevron{display:block;width:9px;height:9px;border-right:2px solid #53677e;border-bottom:2px solid #53677e;transform:rotate(45deg);margin:0 5px 4px}
#help-view #help-guides-collapse[open] .help-guides-chevron{transform:rotate(225deg);margin:4px 5px 0}
#help-view #help-guides-collapse:not([open]) #help-guide-list{display:none}
#help-view #help-guides-collapse[open] #help-guide-list{margin-top:14px}
#help-view .help-guides-toggle:focus-visible{outline:2px solid #1763cf;outline-offset:4px;border-radius:4px}

/* School-wide maintenance controls (teacher modal and admin backup card). */
#maintenance-card .page-head{margin-bottom:12px}
#maintenance-status{font-weight:700;color:#465b73;white-space:normal}
#maintenance-status[data-phase="online"]{color:#227749}
#maintenance-status[data-phase="preparing"]{color:#946313}
#maintenance-status[data-phase="active"]{color:#a2352a}
.maintenance-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.maintenance-dialog{max-width:min(92vw,540px);width:540px;border:1px solid #d6e0ec;border-radius:14px;padding:0;background:#fff;color:#20354d}
.maintenance-dialog::backdrop{background:rgba(25,39,58,.76)}
.maintenance-dialog-body{text-align:center;padding:30px;line-height:1.6}
.maintenance-dialog-body h2{font-size:23px;margin:12px 0}
.maintenance-dialog-body h3{margin:16px 0 8px}
.maintenance-symbol{display:block;color:#1763cf;font-size:44px;line-height:1}
.maintenance-dialog-body .maintenance-actions{justify-content:center;margin-top:20px}
#maintenance-dialog-feedback{font-size:13px;color:#946313}
@media(max-width:650px){.maintenance-dialog-body{padding:22px}.maintenance-actions button{min-height:44px}#maintenance-card .page-head{flex-wrap:wrap}}

/* Admin health and rollback history only. */
#health-view .health-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:14px}
#health-view .health-grid .card{display:flex;flex-direction:column;gap:12px;margin:0;min-width:0}
#health-view .health-grid strong{color:#234768;font-size:19px;overflow-wrap:anywhere}
#health-view .health-card dl{margin:12px 0}
#health-view .health-card dt{font-size:13px;color:#53677e;margin:10px 0 5px}
#health-view .health-card dd{margin:0;padding:0 0 12px;border-bottom:1px solid #e1e8f0;overflow-wrap:anywhere}
#health-audit{max-height:420px;overflow:auto}#health-audit p,#health-duplicates p{border-bottom:1px solid #e1e8f0;padding:8px 0;font-size:13px;overflow-wrap:anywhere}
#bulk-history-list .bulk-history-item{border:1px solid #d6e0eb;border-radius:9px;padding:13px;margin:10px 0}
#bulk-history-list details{margin:8px 0}#bulk-history-list summary{cursor:pointer;color:#1763cf;font-weight:600}
#bulk-history-list .bulk-history-report{padding:10px 0;border-bottom:1px solid #e1e8f0;overflow-wrap:anywhere}
@media(max-width:600px){#health-view .health-grid{gap:8px}#health-view .health-grid strong{font-size:16px}}


/* Maintenance countdown and compact user activity roster */
.maintenance-countdown{font-weight:700;color:#965c0b;margin:0 0 12px;font-variant-numeric:tabular-nums}.presence-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}.presence-summary{display:flex;align-items:center;flex-wrap:wrap;gap:10px;color:#43546a}.presence-table-wrap{overflow-x:auto;border:1px solid #dce5ef;border-radius:8px;margin:10px 0}.presence-table{border-collapse:collapse;width:100%;font-size:14px}.presence-table th,.presence-table td{text-align:left;padding:8px 12px;border-bottom:1px solid #e4eaf2;vertical-align:middle}.presence-table th{background:#eef2f8}.presence-table tr:last-child td{border-bottom:0}.presence-pill{display:inline-block;border-radius:12px;padding:3px 9px;font-weight:700;white-space:nowrap}.presence-online{background:#e7f6e8;color:#166534}.presence-offline{background:#edf0f3;color:#526171}.presence-detail{margin-left:8px;font-size:12px;color:#526171;display:inline-block}.presence-summary small{white-space:nowrap}@media(max-width:600px){.presence-table{min-width:470px}.presence-summary{width:100%}.presence-head{align-items:flex-start}}

.numbers-options-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.numbers-options-delete{border:1px solid #efb4b4;background:#fff;color:#b42318;border-radius:8px;font-weight:600;padding:9px 14px;min-height:40px;cursor:pointer}.numbers-options-delete:hover{background:#fff1f1}

/* Compact, readable text tools and responsive health dashboard. */
.iep-text-tools-panel .iep-text-case{display:flex!important;align-items:center;justify-content:flex-start;gap:8px;margin:12px 0;color:#34475d;font-size:14px;line-height:1.4}.iep-text-tools-panel .iep-text-case input[type=checkbox]{appearance:auto;-webkit-appearance:checkbox;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;padding:0!important;margin:0!important;flex:0 0 16px;accent-color:#1967d2}.iep-text-tools-panel .iep-text-case span{display:inline;width:auto;min-width:0;white-space:nowrap}.iep-text-tools-panel .iep-text-count{margin:0 0 9px;color:#53657a;font-size:13px}.iep-text-tools-panel .iep-text-preview:empty{display:none}.iep-text-tools-panel h2{font-size:21px;line-height:1.3}.iep-text-tools-panel .iep-text-actions{border-top:1px solid #e2e8f0;padding-top:9px}.health-backup-dashboard .health-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:12px 0}.health-backup-dashboard .health-metric{display:flex;flex-direction:column;gap:9px;background:#f5f8fc;border:1px solid #dce5f0;border-radius:10px;padding:13px;min-width:0}.health-metric span,.health-metric small{color:#52647c;font-size:13px}.health-metric strong{font-size:20px;overflow-wrap:anywhere;color:#17273c}.health-meter{height:8px;background:#e0e8f3;border-radius:9px;overflow:hidden}.health-meter i{display:block;height:100%;width:0;background:#1b9460;border-radius:9px}.health-meter i.usage-warning{background:#d99b2c}.health-meter i.usage-danger{background:#c24136}.health-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0}.health-status-grid>div{display:flex;align-items:center;justify-content:space-between;gap:5px;background:#f5f8fc;border-radius:8px;padding:9px;font-size:13px}.health-backup-dashboard button{width:100%;margin-top:8px}.health-status-grid>div:first-child strong{color:#19824f}.health-status-grid>div:nth-child(2) strong{color:#ad6c18}.health-status-grid>div:nth-child(3) strong{color:#b42318}#individual-backup-progress{display:block;width:100%;height:12px;margin:12px 0;accent-color:#1967d2}@media(max-width:480px){.health-backup-dashboard .health-metrics{grid-template-columns:1fr}.health-status-grid{grid-template-columns:1fr}}

.health-originals-review{border-top:1px solid #e2e8f0;padding-top:14px;margin-top:14px}.health-originals-review h4{margin:0 0 8px}.health-originals-review small{color:#52647c}

/* Dropdown editor: align both tools on the same row and separate the destructive action. */
.numbers-options-dialog .numbers-options-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:nowrap;padding:4px 22px 14px}
.numbers-options-dialog .numbers-options-tools .numbers-options-add,.numbers-options-dialog .numbers-options-tools .numbers-options-delete{margin:0;align-self:center;min-height:40px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;padding:9px 14px!important;line-height:20px;white-space:nowrap}
@media(max-width:620px){.numbers-options-dialog .numbers-options-tools{padding:4px 14px 14px}}
/* Keep the dark menu legible in Safari, including the auto-focused Copy action. */
#numbers-context-menu .numbers-context-action{color:#f8fafc;background:transparent;-webkit-appearance:none;appearance:none}
#numbers-context-menu .numbers-context-action:hover:not(:disabled),#numbers-context-menu .numbers-context-action:focus:not(:disabled){background:#3269af;color:#fff;outline:0}
#numbers-context-menu .numbers-context-action:disabled{color:#d3d8df;opacity:.45;background:transparent}
#numbers-context-menu .numbers-context-action.danger:not(:disabled){color:#ffb6b6}

/* Original evidence cleanup: compact, responsive progress panel. */
#health-view .health-originals-review{margin-top:18px;padding:18px;border:1px solid #dce5f0;border-radius:12px;background:#fff;display:grid;gap:10px}#health-view .original-clean-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}#health-view .original-clean-head h4{margin:0;font-size:16px}#health-originals-progress-label{font-size:12px;color:#52647c}#health-view .health-originals-review p{margin:0;font-size:13px;overflow-wrap:anywhere}#health-view .original-clean-progress{padding:14px;border:1px solid #e1e8f0;border-radius:10px;background:#f7f9fc}#health-view .original-clean-metrics{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}#health-originals-count{font-size:24px;font-weight:750;color:#167849}#health-originals-bytes{font-size:13px;color:#52647c}#health-originals-progress-bar{width:100%;height:10px;margin:12px 0;accent-color:#16944e;display:block}#health-view .original-clean-states{display:grid;gap:10px;margin:0}#health-view .original-clean-states>div{display:flex;justify-content:space-between;gap:12px;align-items:center}#health-view .original-clean-states dt,#health-view .original-clean-states dd{margin:0;padding:0;border:0;font-size:13px}#health-view .original-clean-states dd{font-weight:650;text-align:right}#health-view .original-clean-states dd[data-state=active]{color:#167849}#health-view .original-clean-states dd[data-state=warning]{color:#9b5b14}#health-view .original-clean-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}#health-view .original-clean-actions button{width:100%;min-height:42px;white-space:normal}#health-originals-clean{grid-column:1/-1}@media(max-width:620px){#health-view .health-originals-review{padding:12px}#health-view .original-clean-actions{grid-template-columns:1fr}#health-view .original-clean-states>div{flex-wrap:wrap;gap:4px}}

/* History maintenance: matching original-file card, readable on phone/tablet. */
#health-view .health-history-actions{margin-top:18px;padding:18px;border:1px solid #dce5f0;border-radius:12px;background:#fff;display:grid;gap:12px}#health-view .history-clean-head,#health-view .history-run-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}#health-view .history-clean-head h4{margin:0;font-size:16px}#health-history-progress-label,#health-history-run-count{font-size:12px;color:#52647c}#health-history-progress-label[data-state=active]{color:#167849}#health-history-progress-label[data-state=warning]{color:#9b5b14}#health-view .history-clean-metrics,#health-view .history-clean-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#health-view .history-clean-metrics>div{background:#f7f9fc;border:1px solid #e1e8f0;border-radius:10px;padding:14px;display:grid;gap:6px}#health-view .history-clean-metrics strong{font-size:26px;color:#17273c}#health-view .history-clean-metrics small,#health-view .history-clean-option small,#health-view .history-clean-safety{font-size:12px;color:#52647c;line-height:1.5}#health-view .history-clean-option{border:1px solid #dce5f0;border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:9px;min-width:0}#health-view .history-option-title{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap;font-size:14px}#health-view .history-recommended{font-size:11px;color:#167849}#health-view .history-option-count{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}#health-view .history-option-count strong{font-size:24px;color:#165bbb}#health-view .history-clean-danger .history-option-count strong{color:#a52a22}#health-view .history-clean-option button{margin-top:auto;min-height:42px;white-space:normal}#health-view .history-clean-progress{border:1px solid #e1e8f0;background:#f7f9fc;border-radius:10px;padding:14px}#health-view .history-clean-progress[hidden]{display:none!important}#health-history-progress-bar{width:100%;height:10px;margin:12px 0;accent-color:#16944e;display:block}#health-view .health-history-actions p{margin:0;font-size:13px;overflow-wrap:anywhere}@media(max-width:620px){#health-view .health-history-actions{padding:12px}#health-view .history-clean-options{grid-template-columns:1fr}#health-view .history-clean-metrics strong{font-size:22px}}
