/* Shared controls: preserve native form semantics, validation and keyboard behavior. */
.portal-body :where(select,input:not([type=checkbox],[type=radio],[type=hidden],[type=file],[type=color],[type=range]),textarea){font:inherit;color:var(--text);border:1px solid var(--border,#cbd9ed);border-radius:12px;background-color:var(--surface,#fff);min-width:0;max-width:100%;box-sizing:border-box;line-height:1.45;padding:.7rem .9rem;transition:border-color .15s,box-shadow .15s}
.portal-body :where(select,input:not([type=checkbox],[type=radio],[type=hidden],[type=file],[type=color],[type=range])){min-height:44px}
.portal-body :where(select,textarea,input):focus-visible{outline:3px solid color-mix(in srgb,var(--primary,#2767b4) 25%,transparent);outline-offset:2px;border-color:var(--primary,#2767b4)}
.portal-body :where(select,textarea,input):disabled{opacity:.65;cursor:not-allowed;background-color:var(--blue-soft,#eef4fc)}
:is(.portal-body,.login-body) select:not([multiple]){appearance:none;padding-inline-end:2.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235b7290' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .75rem center;cursor:pointer;text-overflow:ellipsis;white-space:nowrap}
:is(.portal-body,.login-body) select[multiple]{padding:.4rem}
:is(.portal-body,.login-body) select[multiple] option{padding:.6rem .75rem;border-radius:7px}
@supports(appearance:base-select){
 :is(.portal-body,.login-body) select:not([multiple]):not([size]),:is(.portal-body,.login-body) select:not([multiple])[size="1"]{appearance:base-select;background-image:none;padding-inline-end:.9rem;align-items:center;gap:.75rem}
 :is(.portal-body,.login-body) select:not([multiple])::picker(select){appearance:base-select;background:var(--surface,#fff);color:var(--text,#263c58);border:1px solid var(--border,#d4e0ef);border-radius:14px;box-shadow:0 12px 40px #102b4c26;padding:6px;max-block-size:min(340px,65dvh);max-inline-size:calc(100vw - 24px);overflow:auto;overscroll-behavior:contain;margin-block:6px;font:inherit;scrollbar-width:thin}
 :is(.portal-body,.login-body) select::picker-icon{content:'⌄';font:600 1.15rem/1 sans-serif;color:var(--text-soft,#5b7290);transition:rotate .16s}
 :is(.portal-body,.login-body) select:open::picker-icon{rotate:180deg}
 :is(.portal-body,.login-body) select option{display:flex;align-items:center;gap:.6rem;min-block-size:40px;padding:.6rem .75rem;border-radius:8px;line-height:1.35;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
 :is(.portal-body,.login-body) select option:checked{background:var(--blue-soft,#eaf2ff);color:var(--primary,#2163b4);font-weight:650}
 :is(.portal-body,.login-body) select option:hover,:is(.portal-body,.login-body) select option:focus{background:var(--blue-soft,#eaf2ff);outline:none}
 :is(.portal-body,.login-body) select option:disabled{opacity:.5;cursor:not-allowed}
 :is(.portal-body,.login-body) select option::checkmark{color:var(--primary,#2163b4);order:1;margin-inline-start:auto;font-weight:700}
 :is(.portal-body,.login-body) select optgroup{padding:.35rem;color:var(--text-soft,#5b7290);font-weight:700}
}
/* Month heading must take the available track, never inherit arrow button dimensions. */
.portal-body .mini-calendar-header{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;align-items:center;gap:8px;position:relative;margin-bottom:16px}
.portal-body .mini-calendar-header #miniCalendarTitle{width:100%;height:auto;min-height:40px;min-width:0;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(.9rem,1.25vw,1.1rem);line-height:1.3;padding:8px 3px;border:0;background:transparent;text-transform:none;border-radius:10px;font-weight:700}
.portal-body .mini-calendar-header #miniCalendarTitle:hover{background:var(--blue-soft,#eaf2ff)}
.portal-body .mini-calendar-header #miniCalendarMonth{position:absolute;inset:auto 50% 0;pointer-events:none;opacity:0;width:1px;height:1px;min-height:0;padding:0;border:0}
.portal-body .mini-calendar-header>button:not(#miniCalendarTitle){width:36px;height:36px;padding:0;min-height:0;border-radius:11px;font-size:1.1rem}
.portal-body .calendar-weekdays{font-size:.72rem;letter-spacing:.03em}
.portal-body .coverage-exportbar{display:flex;gap:14px;align-items:end;flex-wrap:wrap;border-radius:18px;padding:20px;background:var(--surface,#fff);border:1px solid var(--border);box-shadow:0 4px 18px #16365706}
.portal-body .coverage-exportbar label{display:grid;gap:7px;font-weight:600;font-size:.9rem;min-width:190px}
.portal-body .coverage-exportbar label select{width:100%}
.portal-body .coverage-exportbar p{flex-basis:100%;margin:2px 0 0;font-size:.85rem;color:var(--text-soft,#5b7290);line-height:1.5}
.portal-body .coverage-exportbar a{min-height:44px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.portal-body #communicationsFilters{align-items:end}
.portal-body .communication-filters label,.portal-body .communications-filters label{display:grid;gap:7px;min-width:0;font-size:.88rem;font-weight:600}
.portal-body .communication-filters input,.portal-body .communications-filters input{width:100%}
.portal-body .ejmc-date-navigation{align-items:end}
@media(max-width:600px){.portal-body .coverage-exportbar label{flex:1 1 100%;min-width:0}.portal-body .coverage-exportbar a{flex:1 1 42%;font-size:.85rem}.portal-body .mini-calendar-header #miniCalendarTitle{font-size:1rem}}
@media(prefers-reduced-motion:reduce){.portal-body :where(select,input,textarea){transition:none}:is(.portal-body,.login-body) select::picker-icon{transition:none}}

.login-body select{font:inherit;color:var(--text,#263c58);background-color:var(--surface,#fff);border:1px solid var(--border,#cbd9ed);border-radius:12px;min-height:44px;padding:.65rem .9rem}
.portal-body .sr-only{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
#gradesWorkspace>.grades-heading{display:none}
#viewGrades>.teaching-heading{margin-bottom:20px}
#gradesWorkspace #gradesStatus:empty{margin:0;height:14px}
.portal-body .communication-filterbar{align-items:end;gap:16px}.portal-body .communication-filterbar label{display:grid;gap:8px;min-width:0;font-size:.88rem;font-weight:600}.portal-body .communication-filterbar input,.portal-body .communication-filterbar select{width:100%}.portal-body .coverage-exportbar[hidden]{display:none}

#viewGrades>.teaching-heading .eyebrow{display:none}
#viewGrades>.teaching-heading h1{margin:4px 0 8px}
#viewGrades>.teaching-heading p:not(.eyebrow){margin:0}
