@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');
:root{--navy:#102a44;--bg:#f3f4f6;--line:#dfe3e7;--muted:#687482}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--navy);font:16px/1.9 Vazirmatn,Tahoma,sans-serif}button,input,select,textarea{font:inherit}a{color:#174b7b}button,.btn{border:0;background:var(--navy);color:white;border-radius:6px;display:inline-block;padding:10px 18px;cursor:pointer;text-decoration:none;line-height:1.6}button:disabled{background:#a7afb8;cursor:default}.shell{max-width:1000px;margin:auto;padding:18px 18px 120px;min-height:100dvh}.narrow{max-width:500px;margin:30px auto}header{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:8px 0 24px;border-bottom:1px solid var(--line)}header small{display:block;color:var(--muted)}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:inherit;font-weight:800}.brand img{width:64px;height:44px;object-fit:contain}h1{font-size:24px;margin:24px 0 16px}h2{font-size:19px;margin:20px 0 12px;border-right:3px solid #255a86;padding-right:10px}h3{font-size:17px}label{display:block;margin:14px 0;color:var(--navy)}input,textarea,select{display:block;width:100%;background:#fff;border:1px solid var(--line);border-radius:6px;padding:10px 12px;color:inherit;margin-top:5px;min-width:0}input[type=password],input[type=date],input[type=number],input[type=url]{direction:ltr;text-align:left}textarea{min-height:100px;resize:vertical}input[type=checkbox]{display:inline-block;width:auto}input[type=file]{font-size:14px}form{margin:12px 0}.card{background:white;border:1px solid var(--line);border-radius:8px;padding:18px;margin:14px 0;overflow-wrap:anywhere}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.grid .card{margin:0}.row{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap}.muted,small{color:var(--muted);font-size:14px}.error,.success{padding:12px;border:1px solid var(--line);background:#fff}.error{border-right:4px solid #a34242}.success{border-right:4px solid #255a86}.money{font-size:24px;font-weight:800;direction:ltr;text-align:right}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:right;vertical-align:top;padding:12px;border-bottom:1px solid var(--line)}th{white-space:nowrap}nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,1000px);display:flex;overflow-x:auto;background:#fff;border-top:1px solid var(--line);padding:8px 6px max(8px,env(safe-area-inset-bottom));z-index:5}nav a{flex:1;min-width:80px;text-align:center;text-decoration:none;color:var(--navy);font-size:14px;padding:12px 6px}nav a.on{background:#e8edf2;border-radius:6px}details{border:1px solid var(--line);background:#fff;padding:14px;border-radius:6px;margin:12px 0}summary{cursor:pointer;font-weight:600}progress{width:100%;height:14px;accent-color:var(--navy)}.status{border:1px solid var(--line);border-radius:4px;padding:3px 8px;font-size:14px;display:inline-block}p{white-space:pre-line}.library-row{display:flex;align-items:center;gap:12px}.library-row>div{flex:1;min-width:0}.crumbs{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.crumbs button{background:#e8edf2;color:var(--navy);font-size:14px;padding:7px 12px}.english{direction:ltr;text-align:left}.links{display:flex;gap:8px;flex-wrap:wrap}.empty{padding:22px 0;color:var(--muted)}.tools{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.tools a{padding:22px;border:1px solid var(--line);background:white;text-decoration:none;font-weight:600;border-radius:6px}button:hover,.btn:hover{filter:brightness(1.12)}:focus-visible{outline:3px solid #4e8ab8;outline-offset:3px}@media(max-width:600px){.grid,.tools{grid-template-columns:1fr}.shell{padding:12px 12px 116px}header{font-size:14px}.brand span{max-width:100px}h1{font-size:22px}.card{padding:14px}.library-row{flex-wrap:wrap}.library-row .btn{font-size:14px}.row{align-items:flex-start}}

/* Experimental amendments on installed v2.2 */
button,.btn,.tools a{display:inline-flex;align-items:center;justify-content:center;text-align:center;gap:8px}.brand{justify-content:center;text-align:center}.brand img{width:60px;height:60px}.shell{padding-top:10px}header{padding-bottom:12px}h1{font-size:21px;margin:14px 0 10px}h2{font-size:17px;margin:14px 0 8px}h3{margin:8px 0}p{margin:6px 0}.card{padding:12px;margin:8px 0}label{margin:8px 0}form{margin:8px 0}.row{gap:8px}.empty{padding:10px 0}.tools.quick-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.quick-grid a{padding:12px 6px;min-height:82px;flex-direction:column;font-size:13px}.quick-grid svg{width:26px;height:26px}.latest-message{display:block;text-decoration:none;color:inherit}.latest-message small{float:left;font-size:11px}.latest-message p{font-size:13px}.chat-contacts{display:grid;grid-template-columns:1fr 1fr;gap:8px}.chat-contacts a{display:flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;font-size:13px}.chat-contacts svg{width:24px;height:24px}.chat-panel{border:1px solid var(--line);border-radius:8px;background:white;padding:10px;margin-top:12px}.chat-panel h2{margin-top:0}.chat-history{height:300px;overflow-y:auto;overscroll-behavior:contain;background:#eef1f4;border-radius:6px;padding:10px;display:flex;flex-direction:column;gap:8px}.chat-bubble{align-self:flex-end;background:#fff;border:1px solid var(--line);border-radius:6px;padding:8px 10px;max-width:88%;flex-shrink:0}.chat-bubble.mine{align-self:flex-start;background:#e0eaf4}.chat-bubble p{font-size:14px}.chat-bubble small{display:block;font-size:10px;text-align:left}.chat-compose{display:flex;gap:8px;align-items:end}.chat-compose label{flex:1;margin:0}.chat-compose textarea{min-height:48px;height:48px}.feedback{border-top:1px solid #c6d0db;margin-top:6px;padding-top:6px}nav a{min-width:65px;padding:10px 4px;font-size:12px}@media(max-width:600px){.tools.quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.brand span{max-width:none}.brand img{width:48px;height:48px}.chat-history{height:260px}.shell{padding-bottom:95px}}

/* Unified button boxes throughout the app */
.action-box,.links,.tools,.tools.quick-grid,.chat-contacts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;align-items:stretch;margin:8px 0}
.action-box>*,.links>*,.tools>*,.chat-contacts>*{width:100%;min-width:0;margin:0;min-height:48px;display:flex;align-items:center;justify-content:center;text-align:center;overflow-wrap:anywhere;padding:10px 8px}
.action-box>:only-child,.links>:only-child,.tools>:only-child,.chat-contacts>:only-child,.action-box>:last-child:nth-child(odd),.links>:last-child:nth-child(odd),.tools>:last-child:nth-child(odd){grid-column:1/-1}
.tools.quick-grid a{min-height:78px;flex-direction:column}.action-box{clear:both}.chat-compose{display:block}.chat-compose .action-box{margin-bottom:0}.library-row .action-box{flex-basis:100%}
@media(max-width:600px){.action-box,.links,.tools,.tools.quick-grid,.chat-contacts{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}

.unified-compose{border:1px solid var(--line);border-radius:6px;padding:8px;background:white}.unified-compose .message-input{font-size:0}.unified-compose textarea{font-size:14px;border:0;margin:0;min-height:54px}.attachment-button{position:relative;display:flex;align-items:center;justify-content:center;background:#e8edf2;border-radius:6px;min-height:48px;text-align:center;cursor:pointer;margin:0!important;color:var(--navy)}.chat-attachment{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer;margin:0}.attachment-button:focus-within{outline:3px solid #4e8ab8;outline-offset:2px}.attachment-names{display:block;font-size:12px;overflow-wrap:anywhere}

/* Centered institute identity and compact symmetric term details */
header{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px}.brand{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;gap:4px;text-align:center}.brand span{max-width:none}.brand img{width:60px;height:60px;display:block;margin:0 auto}header>div{text-align:center;font-size:12px}.term-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0;text-align:center}.term-info>div{padding:8px 4px;border-bottom:1px solid var(--line);min-width:0}.term-info dt{font-size:12px;color:var(--muted)}.term-info dd{font-size:15px;font-weight:600;margin:2px 0 0;overflow-wrap:anywhere}.term-info .term-schedule{grid-column:1/-1;border-bottom:0}@media(max-width:600px){.brand img{width:52px;height:52px}.brand span{font-size:15px}}

/* Composer above independently scrolling message history */
.chat-panel{display:flex;flex-direction:column}.chat-panel>h2{order:0}.chat-panel>form{order:1;margin:0 0 8px}.chat-panel>.chat-history{order:2;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y;min-height:0}.chat-history{scrollbar-gutter:stable}

.unified-compose textarea{text-align:right}.unified-compose textarea::placeholder{direction:rtl;text-align:right}

/* Centered page and section headings */
h1,h2,h3{text-align:center}h2{border-right:0;padding-right:0}.chat-panel>h2{width:100%}

.term-info .term-schedule{grid-column:auto;border-bottom:1px solid var(--line)}

.resource-grid button{min-height:82px;flex-direction:column;background:#fff;color:var(--navy);border:1px solid var(--line);border-radius:6px;font-size:13px}.resource-grid svg{width:26px;height:26px}

[hidden]{display:none!important}

.story-word{cursor:pointer;border-radius:3px;padding:2px 0}.story-word:hover,.story-word.selected{background:#dce7f1;color:var(--navy)}.story-word:focus-visible{outline:2px solid #4e8ab8}#story-text{line-height:2.3}#selected-word{display:block;text-align:center;font-size:20px}#story-meaning p{text-align:right}

/* Refreshed palette; existing layout preserved */
:root{--navy:#123553;--bg:#f1f6fa;--line:#d3e1ed;--muted:#5e7486;--blue:#246fb0;--teal:#178276}
body{background:var(--bg);color:var(--navy)}a{color:#2165a0}button,.btn{background:var(--blue);color:#fff}button:disabled{background:#dce5ec;color:#758796}header{border-bottom-color:#c9dce9}.brand{color:var(--navy)}.card{background:#fff;border-color:var(--line)}h1,h2,h3{color:#164a72}.quick-grid a,.resource-grid button{background:#fff;color:#194f79;border-color:#cddfea}.quick-grid svg,.resource-grid svg{color:var(--blue)}.quick-grid a:nth-child(4n+2),.resource-grid button:nth-child(4n+2){background:#edf8f5;border-color:#c9e5df}.quick-grid a:nth-child(4n+2) svg,.resource-grid button:nth-child(4n+2) svg{color:var(--teal)}.quick-grid a:nth-child(4n+3),.resource-grid button:nth-child(4n+3){background:#f1f0fa;border-color:#ddd9ef}.quick-grid a:nth-child(4n+3) svg,.resource-grid button:nth-child(4n+3) svg{color:#7063a4}.quick-grid a:nth-child(4n+4),.resource-grid button:nth-child(4n+4){background:#eef5fc;border-color:#ccdfef}.chat-panel{background:#fff;border-color:#cbdfea}.chat-history{background:#edf4f8}.chat-bubble{background:#fff;border-color:#d3e1e9}.chat-bubble.mine{background:#dceee9;border-color:#bcded3}.unified-compose{border-color:#bdd5e6}.attachment-button{background:#e1f0f7;color:#1b628d}.term-info dt{color:#55778c}.term-info dd{color:#164a72}.status{background:#e8f2fb;border-color:#c3daed;color:#205f93}nav{background:#fff;border-color:#c5dbe9}nav a{color:#53718a}nav a.on{background:#dcecf8;color:#15578b}.story-word:hover,.story-word.selected{background:#d9eee8;color:#126c60}.success{background:#eff9f5;border-color:#c7e6d9;border-right-color:var(--teal)}progress{accent-color:var(--teal)}

/* Navy institute header, neutral surfaces and balanced warm actions */
:root{--navy:#102f49;--bg:#f1f2f4;--line:#dadfe4;--muted:#65717d;--warm:#a84c35}
body{background:var(--bg);color:var(--navy)}header{background:var(--navy);color:#fff;border:0;border-radius:0;margin:-10px -18px 14px;padding:16px 18px;gap:8px}.brand{color:#fff}.brand span{color:#fff;font-weight:700}.brand img{width:64px;height:64px}header small,header>div,header a{color:#e4e9ee}.card,.chat-panel{background:#fff;border-color:var(--line)}h1,h2,h3,.term-info dd{color:var(--navy)}.term-info dt{color:var(--muted)}button,.btn{background:#a84c35;color:#fff}button:disabled{background:#d9dee3;color:#6f7982}.quick-grid a,.resource-grid button{background:#fff;color:var(--navy);border-color:var(--line)}.quick-grid a:nth-child(n),.resource-grid button:nth-child(n){background:#fff;border-color:var(--line)}.quick-grid a:nth-child(n) svg,.resource-grid button:nth-child(n) svg{color:#a84c35}.quick-grid a:nth-child(2n) svg,.resource-grid button:nth-child(2n) svg{color:#98563b}.quick-grid a:hover,.resource-grid button:hover{background:#f8f1ed}.chat-history{background:#eceff2}.chat-bubble{background:#fff;border-color:#d8dfe5}.chat-bubble.mine{background:#e0e7ed;border-color:#c9d5df}.unified-compose{background:#fff;border-color:#d2dbe3}.attachment-button{background:#f4e8e0;color:#884632}.status{background:#eef1f4;border-color:#d4dce3;color:var(--navy)}nav{background:#fff;border-color:#d4dbe1}nav a{color:#65717d}nav a.on{background:#e3e9ef;color:var(--navy)}progress{accent-color:var(--navy)}.story-word:hover,.story-word.selected{background:#f3e5db;color:#85432e}a{color:#244c6d}.latest-message{color:var(--navy)}.crumbs button{background:#f4e8e0;color:#884632}.success{background:#fff;border-color:var(--line);border-right-color:var(--navy)}
@media(max-width:600px){header{margin:-10px -12px 12px;padding:14px 12px}.brand img{width:58px;height:58px}.brand span{font-size:16px}}

/* Gray actions within the navy, gray and white theme */
:root{--warm:#555f69}button,.btn{background:#555f69;color:#fff}.attachment-button{background:#e5e8eb;color:#344554}.quick-grid a:nth-child(n) svg,.resource-grid button:nth-child(n) svg{color:#596a78}.quick-grid a:hover,.resource-grid button:hover{background:#edf0f3}.crumbs button{background:#e5e8eb;color:#344554}.story-word:hover,.story-word.selected{background:#e4e9ee;color:#173d5a}.receipt-preview{display:block;max-width:100%;max-height:220px;object-fit:contain;margin:8px auto;border-radius:5px}.finance-history td,.finance-history th{text-align:center;padding:8px;font-size:12px}.finance-history td{white-space:nowrap}.finance-history th{background:#eef1f4}.receipt-status{font-size:12px;color:var(--muted)}

.report-term summary{text-align:center}.report-term .term-info .term-teacher{grid-column:1/-1}.report-scores th,.report-scores td{padding:7px 10px;font-size:14px}.report-scores td{text-align:center}.report-total{background:#e7edf2;font-weight:700}.report-scores{margin-top:8px}

.leitner-boxes{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:10px 0}.leitner-boxes>div{text-align:center;padding:8px 3px;border:1px solid var(--line);background:#fff;border-radius:5px;font-size:12px}.leitner-boxes b{display:block;font-size:18px}.dictionary-word,.leitner-word{text-align:center!important;font-size:23px;direction:ltr;font-weight:600}.dictionary-ipa{text-align:center!important;direction:ltr;font-size:17px}.dictionary-synonyms{direction:ltr;text-align:left!important;font-size:14px}.dictionary-result p{margin:6px 0}.dictionary-result button{width:100%}.learning-answer{text-align:center;margin:10px 0}.term-info .term-teacher{grid-column:1/-1}

.home-quick-grid .quick-class{grid-column:1 / -1}

.tools.home-quick-grid>a{grid-column:span 1!important}
.tools.home-quick-grid>a.quick-class{grid-column:1 / -1!important}

.unified-compose textarea:placeholder-shown{direction:rtl;text-align:right}

.notification-help{padding-inline-start:20px;margin:8px 0;color:var(--muted);font-size:13px}.notification-help li{margin:6px 0}

.report-chart-card{padding:10px}.report-chart-card h2{margin-top:0}#report-chart{width:100%;direction:ltr}#report-chart svg{display:block;width:100%;height:auto;max-height:280px}#report-chart text{font-family:Vazirmatn,Tahoma,sans-serif;font-size:12px;fill:#687482}#report-chart .report-bar{cursor:help}

/* Subtle monochrome learning doodles behind the shared page shell. */
body{background-color:var(--bg);background-image:linear-gradient(rgba(243,244,246,.82),rgba(243,244,246,.82)),url("assets/design-1.png");background-size:auto,480px 480px;background-position:0 0,center top;background-repeat:repeat;background-attachment:scroll}
.shell{background:transparent}

/* Two warm accents, with navy and gray retained for the main structure. */
:root{--rose:#c45f77;--rose-button:#b44f69;--peach:#f3d4c8}
button,.btn{background:var(--rose-button);color:#fff}
button:disabled{background:#d9dee3;color:#6f7982}
button:hover:not(:disabled),.btn:hover{filter:brightness(.96)}
.tools.home-quick-grid>a.quick-class{background:var(--peach);color:var(--navy);border-color:#e7bcae}
.quick-grid a:nth-child(n) svg,.resource-grid button:nth-child(n) svg{color:var(--rose)}
.quick-grid a:hover,.resource-grid button:hover{background:#faede7}
.resource-grid button:nth-child(3n+1){background:var(--peach);color:var(--navy);border-color:#e7bcae}
.attachment-button{background:var(--peach);color:var(--navy)}
.chat-bubble.mine{background:#fae9e2;border-color:#eccdc1;color:var(--navy)}
.report-total{background:var(--peach);color:var(--navy)}
.leitner-boxes>div:first-child{background:var(--peach);color:var(--navy)}
.story-word:hover,.story-word.selected{background:var(--peach);color:var(--navy)}
.success{border-right-color:var(--rose)}
form:has(input[name="action"][value="logout"]) button,#logout-demo{background:#555f69;color:#fff}

/* Educational resources use one coherent theme per section. */
.resource-grid.downloads-theme button:nth-child(n){background:#f7e5ea;color:var(--navy);border-color:#e4b5c1}
.resource-grid.downloads-theme button:nth-child(n) svg{color:var(--rose-button)}
.resource-grid.downloads-theme button:hover{background:#efd3dc}
.resource-grid.stories-theme button:nth-child(n){background:var(--peach);color:var(--navy);border-color:#e7bcae}
.resource-grid.stories-theme button:nth-child(n) svg{color:var(--navy)}
.resource-grid.stories-theme button:hover{background:#edc7b8}
#library-area .crumbs button,#library-area button,.library-row button[data-demo-file]{background:var(--rose-button);color:#fff}
#story-selected button,#story-levels button,#story-ages button,button[data-demo-level],button[data-demo-story],button[data-story-demo]{background:var(--peach);color:var(--navy);border:1px solid #e7bcae}

.chat-tabs{margin:12px 0 0}.chat-tabs button{background:#e8edf1;color:var(--navy);border:1px solid var(--line);font-size:13px;min-height:48px}
.chat-tabs button[aria-selected="true"]{background:var(--rose-button);color:#fff;border-color:var(--rose-button)}
.class-chat-tabs [role="tabpanel"] .chat-panel{margin-top:8px}.class-chat-tabs [role="tabpanel"][hidden]{display:none!important}

.teacher-class-grid a{display:flex;flex-direction:column;text-align:center;justify-content:center;gap:4px}.teacher-class-link small{color:var(--rose-button)}
.teacher-roster{list-style:none;padding:0;margin:8px 0}.teacher-student{padding:10px}.teacher-student-head{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap}.teacher-student-head small{font-size:11px}.teacher-student-actions{display:grid;grid-template-columns:1fr 1fr .65fr;gap:6px;margin-top:8px}.teacher-student-actions button{padding:8px 4px;font-size:12px;min-height:38px}.teacher-student-actions button:nth-child(2){background:var(--peach);color:var(--navy)}.teacher-student-actions button:nth-child(3){background:var(--navy);color:#fff}.teacher-daily-picker{padding:8px;margin-top:8px;border-top:1px solid var(--line);background:#f8f9fa}.teacher-daily-picker button{font-size:13px;padding:8px}.teacher-daily-picker>button{background:#e8edf1;color:var(--navy)}.teacher-chat-area{scroll-margin-top:12px}.teacher-chat-area .chat-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.teacher-chat-area .chat-tabs button:only-child{grid-column:1/-1}

.tools.teacher-student-actions{grid-template-columns:1fr 1fr .65fr}.tools.teacher-student-actions>button{grid-column:auto!important}

.unrecorded-status{color:#a23e59;font-weight:700;background:#fbe8ee;border-radius:3px;padding:1px 4px;white-space:nowrap}

/* Teacher exams: compact, symmetric archive and mixed-question builder. */
.exam-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.exam-fields label{min-width:0}.exam-list-item{display:block;width:100%;text-align:center;margin:10px 0}.exam-list-item small{display:block;margin-top:7px}.exam-question label{display:block;margin-top:10px}.exam-question textarea{min-height:80px}.exam-total{text-align:center}.exam-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0}.exam-result-grid>div{background:#f0f3f6;border-radius:10px;text-align:center;padding:9px 4px}.exam-result-grid dt{font-size:12px;color:#526578}.exam-result-grid dd{margin:6px 0 0;font-weight:700}.exam-student{padding:14px}.exam-student h3{margin:0}.exam-student>small{display:block;text-align:center}#exam-notice{color:#a23e59;text-align:center;margin:10px 0}.exam-fields input,.exam-fields select{width:100%;box-sizing:border-box}

#exams-workspace .exam-list-item{color:var(--navy);background:#fff;border:1px solid var(--line);display:block}#exams-workspace button.ghost{background:#e8edf1;color:var(--navy);border:1px solid var(--line)}#exams-workspace .exam-list-item small{color:#526578}

.chat-unread-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;border-radius:12px;background:#f3d4c8;color:#112d43;font-weight:800;font-size:11px;line-height:1;box-sizing:border-box}.teacher-student-actions button[data-teacher-private]{gap:5px}

/* One row per student in the exam archive. */
.exam-table-scroll{width:100%;max-width:100%;overflow-x:auto;direction:rtl;margin:12px 0;border:1px solid var(--line);border-radius:6px;background:#fff}.exam-results-table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:13px;margin:0}.exam-results-table th,.exam-results-table td{padding:10px 12px;text-align:center;border-bottom:1px solid var(--line)}.exam-results-table thead th{background:var(--navy);color:#fff;font-weight:600}.exam-results-table tbody th{font-weight:600}.exam-results-table tbody tr:nth-child(even){background:#f1f3f6}.exam-results-table tbody tr:last-child>*{border-bottom:0}.exam-results-table .unrecorded-status{font-size:12px}.exam-table-scroll:focus-visible{outline:2px solid var(--rose-button);outline-offset:2px}

/* Independently scrollable exam roster frame. */
.exam-table-scroll{height:auto;max-height:min(52vh,420px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}.exam-results-table{min-width:760px}.exam-results-table thead th{position:sticky;top:0;z-index:2;background:var(--navy)}.exam-scroll-hint{text-align:center;font-size:12px;color:#526578;margin:6px 0}

/* Archive overview: all exam information on a single row. */
#exam-archive-list{overflow-x:auto;max-width:100%;border:1px solid var(--line);border-radius:6px;background:#fff;margin:12px 0;overscroll-behavior-x:contain}#exams-workspace .exam-archive-row{display:grid;grid-template-columns:minmax(230px,2fr) 100px 85px 100px;align-items:center;gap:10px;width:100%;min-width:560px;box-sizing:border-box;padding:13px 12px;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;white-space:nowrap;text-align:center;background:#fff;color:var(--navy);font-size:13px}#exams-workspace .exam-archive-row:nth-child(even){background:#f1f3f6}#exams-workspace .exam-archive-row:last-child{border-bottom:0}#exams-workspace .exam-archive-row:hover{background:#f7e5ea}#exams-workspace .exam-archive-row:focus-visible{outline:2px solid var(--rose-button);outline-offset:-2px}#exam-archive-list>.muted{padding:12px}

/* Archive summary: class, term and exam date only. */
#exams-workspace .exam-archive-row{grid-template-columns:minmax(190px,2fr) 100px minmax(140px,1fr);min-width:460px}

/* Student results: collapsed name and total; details on demand. */
.exam-accordion-frame{max-height:min(52vh,420px);overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:6px;background:#fff;margin:12px 0}.exam-student-accordion{margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:#fff}.exam-student-accordion:last-child{border-bottom:0}.exam-student-accordion:nth-child(even){background:#f1f3f6}.exam-student-accordion>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:13px 12px;list-style:none;cursor:pointer;background:transparent;color:var(--navy);text-align:right;font-size:13px}.exam-student-accordion>summary::-webkit-details-marker{display:none}.exam-student-accordion>summary>b:before{content:'＋';display:inline-block;margin-left:7px;color:var(--rose-button)}.exam-student-accordion[open]>summary>b:before{content:'−'}.exam-student-accordion[open]>summary{background:#f7e5ea}.exam-final-score{white-space:nowrap;font-size:12px}.exam-accordion-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:0;padding:5px 12px 12px}.exam-accordion-info>div{padding:10px 4px;text-align:center;border-bottom:1px solid var(--line)}.exam-accordion-info dt{font-size:12px;color:#526578}.exam-accordion-info dd{margin:6px 0 0;font-weight:700}.exam-student-accordion>summary:focus-visible{outline:2px solid var(--rose-button);outline-offset:-2px}

/* Preserve one complete archive entry per row, including on phones. */
#exams-workspace #exam-archive-list{display:block;overflow-x:hidden}#exams-workspace .exam-archive-row{grid-template-columns:minmax(0,1fr) 68px 100px;min-width:0;max-width:100%;gap:6px;padding:13px 10px;font-size:12px}#exams-workspace .exam-archive-row>b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#exams-workspace .exam-archive-row>b>span{display:block;overflow:hidden;text-overflow:ellipsis}#exams-workspace .exam-archive-row>span:last-child{font-size:11px;font-variant-numeric:tabular-nums}

/* Teacher class overview is a list of linked rows. */
.teacher-class-list{list-style:none;padding:0;margin:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff}.teacher-class-list>li{margin:0;padding:0;border-bottom:1px solid var(--line)}.teacher-class-list>li:last-child{border-bottom:0}.teacher-class-list>li:nth-child(even){background:#f1f3f6}.teacher-class-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:10px;padding:15px 12px;text-decoration:none;text-align:center;color:var(--navy);font-size:14px;border:0;border-radius:0;background:transparent}.teacher-class-row>span{color:#526578;font-size:13px}.teacher-class-row:hover{background:#f7e5ea}.teacher-class-row:focus-visible{outline:2px solid var(--rose-button);outline-offset:-2px}

/* Attendance controls: present above two half-width statuses. */
.tools.attendance-choices>button:nth-child(n){grid-column:auto!important}.tools.attendance-choices>button:first-child{grid-column:1/-1!important}#teacher-class-workspace .term-schedule,#teacher-class-workspace .term-schedule dt,#teacher-class-workspace .term-schedule dd{text-align:center;justify-self:stretch}#teacher-class-workspace .term-schedule{width:100%;margin-inline:auto}

button.close-action,button[data-teacher-cancel],#exams-workspace button.close-action{background:#555f69!important;color:#fff!important;border-color:#555f69!important}button.close-action:hover:not(:disabled){background:#424c56!important}

/* Make the requested attendance changes immediately visible. */
#teacher-class-workspace .teacher-daily-picker .tools.attendance-choices{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}#teacher-class-workspace .teacher-daily-picker .tools.attendance-choices>button{grid-column:auto!important;width:100%!important}#teacher-class-workspace .teacher-daily-picker .tools.attendance-choices>button[data-teacher-rating="present"]{grid-column:1/-1!important}#teacher-class-workspace .term-info>.term-schedule{grid-column:1/-1!important;text-align:center!important}#teacher-class-workspace .term-info>.term-schedule dt,#teacher-class-workspace .term-info>.term-schedule dd{text-align:center!important;width:100%}#teacher-class-workspace button[data-teacher-cancel]{background:#555f69!important;color:#fff!important}

/* One attendance date counts as one held session in the current term. */
.teacher-class-row{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr);gap:6px;padding-inline:8px;font-size:13px}.teacher-class-row>span{font-size:12px}.teacher-class-row .teacher-held-sessions{font-weight:700;color:var(--navy);text-align:center}

/* Student result accordions follow the page scroll. */
#exams-workspace .exam-accordion-frame{max-height:none!important;height:auto!important;overflow:visible!important;overscroll-behavior:auto!important}

/* Individual tests and per-question written answer review. */
#exams-workspace .exam-section-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}#exams-workspace .exam-section-tabs>button{grid-column:auto!important;padding:10px 4px;font-size:12px}.exam-individual-list{border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff;margin:12px 0}#exams-workspace .exam-test-row{display:grid;grid-template-columns:minmax(0,1fr) 76px 70px;gap:6px;align-items:center;width:100%;padding:13px 8px;background:#fff;color:var(--navy);border:0;border-bottom:1px solid var(--line);border-radius:0;font-size:12px;text-align:center}#exams-workspace .exam-test-row:nth-child(even){background:#f1f3f6}#exams-workspace .exam-test-row:last-child{border-bottom:0}.exam-review-question{padding:14px 10px;background:#fff;border-bottom:1px solid var(--line);margin:0}.exam-question-heading,.written-answer-heading{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:12px}.exam-review-options{padding-inline-start:24px;font-size:13px}.written-answer-list{margin-top:10px}.written-answer-row{padding:12px 8px;border:1px solid var(--line);border-radius:6px;margin:8px 0;background:#f1f3f6}.written-answer-row>p{white-space:pre-wrap;font-size:14px}.written-rating-choices{grid-template-columns:repeat(3,minmax(0,1fr))!important}.written-rating-choices>button{grid-column:auto!important;background:#e8edf1;color:var(--navy);font-size:12px}.written-rating-choices>button[aria-pressed="true"]{background:var(--rose-button);color:#fff;border:2px solid var(--navy)}

/* Written correction has four choices in two balanced rows. */
#exams-workspace .written-rating-choices{grid-template-columns:repeat(2,minmax(0,1fr))!important}#exams-workspace .written-rating-choices>button{grid-column:auto!important}

.uncorrected-badge{display:block;margin:4px auto 0;padding:2px 4px;border-radius:4px;background:#fbe8ee;color:#a23e59;font-weight:700;font-size:10px;white-space:nowrap}.activity-edit-form{padding:10px 12px;border-top:1px solid var(--line);margin:0}.activity-edit-form>label{text-align:center;font-size:12px}.activity-edit-form input{text-align:center}.activity-edit-form>small{display:block;text-align:center;color:#526578;font-size:11px}

.integrity-report{background:#fff;border:1px solid var(--line);padding:12px;margin:12px 0}.grade-integrity{margin-top:7px;border:0;background:transparent;font-size:11px;text-align:right}.grade-integrity>summary{padding:5px;background:#fbe8ee;color:#a23e59;border-radius:4px;font-weight:600;font-size:11px;text-align:center}.grade-integrity>p,.grade-integrity>ul{font-size:11px;font-weight:400}.grade-integrity>ul{padding-inline-start:16px}#exam-remaining-label{color:#a23e59;font-weight:700}

/* Integrity factors occupy the full student accordion width. */
#exams-workspace .grade-integrity-trigger{display:block;width:100%;font-size:11px;line-height:1.5;padding:6px 3px;background:#fbe8ee;color:#a23e59;margin-top:7px;border:0}.grade-integrity-panel{display:block;width:100%;box-sizing:border-box;padding:14px 12px;border-top:1px solid var(--line);background:#f8f9fa;text-align:right}.grade-integrity-panel>h3{text-align:center;margin:0 0 10px;font-size:14px}.grade-integrity-panel>p,.grade-integrity-panel>ul{font-size:14px;line-height:1.9;font-weight:400}.grade-integrity-panel>ul{padding-inline-start:22px}.grade-integrity-panel li{margin-bottom:8px}.grade-integrity-panel[hidden]{display:none!important}

/* The expanded grade report sits immediately after its score cell. */
#exams-workspace .exam-accordion-info>.grade-integrity-panel{grid-column:1/-1;margin:4px 0 8px;padding:14px 12px;width:100%;background:#fbe8ee;border:1px solid #e4b5c1;border-radius:6px;color:var(--navy)}#exams-workspace .grade-integrity-panel{background:#fbe8ee;border-color:#e4b5c1}#exams-workspace .grade-integrity-panel>h3{color:#a23e59}

.teacher-class-resources{margin:12px 0}.teacher-class-resources>details{margin:8px 0;background:#fff;border:1px solid var(--line);border-radius:6px;padding:10px}.teacher-class-resources>details>summary{text-align:center;color:var(--navy);cursor:pointer;font-weight:600}.teacher-class-resources label{font-size:12px;margin-top:12px}.teacher-audio-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 6px;border-bottom:1px solid var(--line);color:var(--navy);text-decoration:none;font-size:12px}.teacher-audio-row>span{min-width:0;overflow-wrap:anywhere}.teacher-audio-row>b{flex-shrink:0;color:var(--rose-button);font-size:11px}.teacher-audio-row:hover{background:#f7e5ea}
