.grade-book{min-width:0;color:var(--ink,#123d35)}
.grade-book-intro{display:flex;justify-content:space-between;gap:16px;align-items:start;margin:0 0 12px}.grade-book-intro h3{margin:0 0 8px;font-size:22px}.grade-book-intro p,.grade-book-key{font-size:14px;line-height:1.6;color:#566b65;margin:0}.grade-book-intro>span{white-space:nowrap;font-size:13px;padding:8px 12px;background:#e9efe7;border-radius:20px}.grade-book-key{margin:12px 0 20px}
.grade-book-head,.grade-subject summary{display:grid;grid-template-columns:minmax(180px,2fr) repeat(var(--grade-cols),minmax(65px,1fr));gap:12px;align-items:center;padding:18px 24px}.grade-book-head{font-size:13px;font-weight:700;color:#53675f}.grade-book-head>span:not(:first-child){text-align:center}.grade-subject{background:white;border:1px solid #dce4db;border-radius:16px;margin-bottom:10px;overflow:hidden}.grade-subject summary{cursor:pointer;list-style:none;min-height:92px}.grade-subject summary::-webkit-details-marker{display:none}.grade-subject summary:hover{background:#f7f9f4}.grade-subject summary:focus-visible{outline:3px solid #487c60;outline-offset:-4px}.grade-subject-name strong{font-size:17px;display:block}.grade-subject-name small{font-size:12px;color:#617269;display:block;margin-top:6px}.grade-disclosure{display:block;color:#365e4c;margin-top:8px;text-decoration:underline;text-underline-offset:3px}.grade-disclosure:after{content:' ＋'}.grade-subject[open] .grade-disclosure:after{content:' −'}.grade-result{font-size:21px;font-weight:650;text-align:center;font-variant-numeric:tabular-nums}.grade-mobile-label{display:none}.grade-alert{color:#b42318}.grade-missing{color:#78867d;font-weight:400}.grade-detail{border-top:1px solid #e0e6dc;padding:24px;background:#fafbf7}.grade-detail h4{margin:0 0 16px;font-size:15px}.grade-detail dl{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px}.grade-detail dl>div{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #e3e8df;padding:12px 0}.grade-detail dt{font-size:14px;overflow-wrap:anywhere}.grade-detail dd{margin:0;font-size:18px;font-weight:600;font-variant-numeric:tabular-nums}.grade-detail p{font-size:12px;color:#617269;line-height:1.6;margin:18px 0 0}
@media(max-width:600px){.grade-book-intro{display:block}.grade-book-intro h3{font-size:20px}.grade-book-intro>span{display:inline-block;margin-top:12px}.grade-book-head{display:none}.grade-subject summary{grid-template-columns:repeat(var(--grade-cols),minmax(0,1fr));gap:16px 8px;padding:18px}.grade-subject-name{grid-column:1/-1}.grade-subject-name small{display:flex;align-items:center;justify-content:space-between;gap:10px}.grade-disclosure{margin:0}.grade-mobile-label{display:block;font-size:11px;font-weight:500;color:#617269;margin-bottom:7px}.grade-result{font-size:19px;border-top:1px solid #e3e8df;padding-top:12px}.grade-detail{padding:18px}.grade-detail dl{grid-template-columns:1fr}.grade-book-key{font-size:12px}}
.grade-periods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.grade-period{min-width:0;background:white;border:1px solid #e0e6dc;border-radius:12px;padding:18px}.grade-period h4{font-size:15px;margin:0 0 8px}.grade-period dl{display:block}.grade-period dt small{display:block;color:#6a776e;font-size:11px;margin-top:4px}.grade-period .grade-average{background:#eef3e9;margin:8px -8px 0;padding:12px 8px;border:0;border-radius:8px}.grade-average dt{font-weight:700}.grade-hide,.grade-subject[open] .grade-show{display:none}.grade-subject[open] .grade-hide{display:inline}.grade-desktop-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:600px){.grade-periods{grid-template-columns:1fr;gap:14px}.grade-period{padding:14px}.grade-desktop-label{display:none}}
.grade-cols-1{--grade-cols:1}.grade-cols-2{--grade-cols:2}.grade-cols-3{--grade-cols:3}.grade-cols-4{--grade-cols:4}
.grade-book .grade-picker{position:sticky;top:var(--student-header-height,0px);z-index:2;background:#f5f7f2;padding-top:6px;border-bottom:1px solid #dce4db;box-shadow:0 8px 12px -12px #123d3555}
.grade-book [hidden]{display:none!important}.grade-picker{display:flex;align-items:center;gap:10px;min-width:0;margin:20px 0 8px}.grade-tabs{position:relative;display:flex;gap:8px;overflow-x:auto;min-width:0;flex:1;padding:6px 3px 12px;scrollbar-width:thin;scroll-snap-type:x proximity}.grade-tabs button{flex:0 0 auto;scroll-snap-align:start;white-space:nowrap;border:1px solid var(--school-button-border,#ced9cf);background:white;color:var(--school-button-ink,#365e4c);border-radius:24px;padding:12px 18px;min-height:44px;font:inherit;font-size:14px;cursor:pointer}.grade-tabs button[aria-selected=true]{background:var(--school-button-background,#123d35);border-color:var(--school-button-background,#123d35);color:var(--school-button-text,white);font-weight:700}.grade-picker .grade-step{flex:0 0 40px;width:40px;min-height:44px;padding:0;border:1px solid var(--school-button-border,#ced9cf);border-radius:12px;background:white;color:var(--school-button-ink,#123d35);font-size:26px;cursor:pointer}.grade-step:disabled{opacity:.35;cursor:default}.grade-tabs button:focus-visible,.grade-step:focus-visible{outline:3px solid #6a8d59;outline-offset:2px}
@media(max-width:600px){.grade-picker{gap:6px}.grade-picker .grade-step{flex-basis:32px;width:32px}.grade-tabs button{padding:10px 14px}.grade-subject-name strong{overflow-wrap:anywhere}}

.absence-book .grade-book-head>span,.absence-book .grade-mobile-label{overflow-wrap:anywhere}.absence-book .absence-percentage{margin-top:18px}

/* Keep the academic heading and subject picker close together. */
.compact-academic-head{margin-bottom:4px;gap:10px;align-items:center}
.compact-academic-head>div{display:flex;align-items:center;gap:16px;min-width:0}
.compact-academic-head #section-description{display:none}
.compact-academic-head #section-title{margin:0;font-size:24px}
.compact-academic-head .back-link{margin:0;white-space:nowrap}
.compact-academic-head .refresh{flex-shrink:0}
.academic-caption{margin:0;color:#566b65;font-size:13px;line-height:1.5}
.academic-caption>span{font-weight:600}
.compact-book .grade-picker{margin-top:8px}
@media(max-width:600px){.compact-academic-head>div{gap:12px}.compact-academic-head #section-title{font-size:23px}}

.curriculum-controls{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:8px 0 12px}.curriculum-controls>div{min-width:0}.curriculum-controls label{margin:0 0 8px}.curriculum-controls input,.curriculum-controls select{min-height:48px;width:100%}.curriculum-book>.academic-caption{margin-bottom:16px}.curriculum-detail h3{overflow-wrap:anywhere}.curriculum-detail dd{overflow-wrap:anywhere;text-align:right;font-size:16px}.curriculum-detail .grade-detail{border-top:0;background:#fff}.curriculum-detail .grade-detail dl{margin-top:14px}
@media(max-width:600px){.curriculum-controls{grid-template-columns:1fr;gap:12px}.curriculum-detail .grade-detail dl{grid-template-columns:1fr}}
