/* Shared by the school and ACE shells. Keep native browser zoom enabled. */
.roji-skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 2147483647;
  transform: translateY(-200%);
  padding: .75rem 1rem;
  border: 2px solid #fff;
  border-radius: .25rem;
  background: #102d42;
  color: #fff;
  font: 700 1rem/1.5 system-ui, sans-serif;
}
.roji-skip-link:focus { transform: none; }
html { scroll-padding-block: 1rem 5rem; }
body { padding-bottom: 5rem; }
main, .workspace, .card, .overview-card, .overview-week, .week-day,
.pilot-grid > *, .grid > *, .stats > *, .twocol > * { min-width: 0; }
main, dialog { overflow-wrap: anywhere; }
button, input, select, textarea { max-width: 100%; }
button { white-space: normal; }
.roji-accessibility-launch {
  position: fixed; left: .75rem; bottom: .75rem; z-index: 90;
  width: auto !important; min-height: 44px; max-width: calc(100vw - 1.5rem);
  padding: .6rem .8rem; border: 2px solid #fff; border-radius: .5rem;
  background: #102d42; color: #fff; font: 600 1rem/1.5 system-ui, sans-serif;
}
.roji-accessibility-dialog {
  box-sizing: border-box; width: min(36rem, calc(100% - 2rem));
  max-width: none; max-height: calc(100dvh - 2rem); overflow: auto;
  margin: auto; padding: 1.25rem; border: 2px solid #102d42;
  border-radius: .75rem; background: #fff; color: #102d42;
  font: 1rem/1.5 system-ui, sans-serif;
}
.roji-accessibility-dialog::backdrop { background: #102d4280; }
.roji-accessibility-dialog h2 { font-size: 1.5rem; color: #102d42; }
.roji-accessibility-dialog label { display: block; margin-block: 1rem; font-size: 1rem; }
.roji-accessibility-dialog select { display: block; width: 100%; margin-top: .5rem; }
.roji-accessibility-dialog button { min-height: 44px; font: inherit; }
.roji-accessibility-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
html[data-roji-spacing] body { line-height: 1.5; }
html[data-roji-spacing] body :not(svg):not(svg *) {
  line-height: 1.5 !important;
  letter-spacing: .12em !important; word-spacing: .16em !important;
}
html[data-roji-spacing] p { margin-bottom: 2em !important; }
/* Contain two-dimensional tables without hiding page-level overflow. */
.scroll, #attendance-records { max-width: 100%; overflow: auto; }
.teacher-workspace { overflow-x: visible; }
.week-days { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); overflow: visible; }
.teacher-sidebar nav button span { min-width: 0; overflow-wrap: anywhere; }
html[data-roji-large-text] .overview-grid,
html[data-roji-large-text] .stats,
html[data-roji-large-text] .twocol { grid-template-columns: minmax(0, 1fr); }
html[data-roji-large-text] .overview-atlas { flex-wrap: wrap; }
html[data-roji-large-text] .teacher-sidebar { width: 16rem; }
html[data-roji-large-text] body.teacher-workspace { padding-left: 16rem; }
@media (max-width: 700px) {
  html[data-roji-large-text] .teacher-sidebar { position: relative; width: 100%; }
  html[data-roji-large-text] body.teacher-workspace { padding-left: 0; }
  .teacher-sidebar nav { grid-template-columns: minmax(0, 1fr); }
  .teacher-workspace #pilot-main { padding-inline: 1rem; }
  .workspace > header, .cardhead, .row, .student-search { flex-wrap: wrap; }
  .stats, .grid, .twocol, .iep-overview, .teacher-class-grid, .drill-grid { grid-template-columns: minmax(0, 1fr); }
  .roster-controls .formfield, .student-search .formfield { min-width: 0; flex-basis: 100%; }
  .teacher-workspace .week-days { grid-template-columns: minmax(0, 1fr); }
  .teacher-workspace .journey-stop { transform: none; max-width: 100%; }
}
/* Two colors keep the indicator visible on light and dark surfaces. */
:focus-visible {
  outline: 3px solid #102d42 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px #fff !important;
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* Leave room to reach the final sidebar items above the reading control. */
.teacher-sidebar, .admin-workspace #app > aside { padding-bottom: 6rem; }
@media (max-width: 700px) {
  .roji-accessibility-launch { font-size: .875rem; padding: .4rem .6rem; }
  .teacher-sidebar, .admin-workspace #app > aside { padding-bottom: 1rem; }
}
.workspace > header > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .workspace > header > * { flex-basis: 100%; }
  .workspace .toptools { align-items: flex-start; }
  .student-directory-toolbar, .classes-page-heading { flex-wrap: wrap; }
  .student-class-filter > div { min-width: 0; width: min(16rem, calc(100vw - 3rem)); }
}
/* Measured text contrast on the current teacher dashboard, including tinted cards. */
.overview-heading > span, .overview-heading p, .week-day time,
.overview-card small, .overview-note, .overview-list p, .overview-stats span {
  color: #526478;
}
.chat-message.chat-roji { color: #102d42; }
/* Calendar day lists reflow; timetable tables keep their separate scrolling region. */
.roji-calendar .calendar-days {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  overflow: visible;
}
/* A drawer must remain scrollable when enlarged text fills its fixed-height space. */
html[data-roji-large-text] .roji-panel-content,
html[data-roji-large-text] .admin-roji-panel { overflow-y: auto; }
html[data-roji-large-text] .persistent-mascot,
html[data-roji-large-text] .admin-roji-mascot { display: none; }
html[data-roji-motion-paused] *, html[data-roji-motion-paused] *::before,
html[data-roji-motion-paused] *::after {
  animation-play-state: paused !important;
  transition-duration: .01ms !important;
  scroll-behavior: auto !important;
}
/* The current family sidebar has no menu toggle: keep its two destinations usable. */
@media (max-width: 700px) {
  .admin-workspace #app > aside:has(.parent-roji-brand) #dashboard-navigation { display: grid; }
  .admin-workspace #app > aside:has(.parent-roji-brand) .asidebottom { display: block; margin-top: 1rem; }
}
/* Relative text sizing also covers the current semester gradebook added in the IEP chat. */
.semester-gradebook .gradebook-heading > span { font-size: .6875rem; }
.semester-gradebook .gradebook-notice, .semester-gradebook .gradebook-method,
.semester-gradebook .gradebook-filters label, .semester-gradebook table { font-size: .8125rem; }
.semester-gradebook .gradebook-stats span, .semester-gradebook .progress-chart p,
.semester-gradebook .chart-legend { font-size: .75rem; }
.semester-gradebook .gradebook-stats strong { font-size: 1.875rem; }
.semester-gradebook .progress-chart h2 { font-size: 1.1875rem !important; }
.semester-gradebook .gradebook-text-button { font-size: .8125rem !important; }
.semester-gradebook td small { font-size: .6875rem; }
.semester-gradebook .gradebook-stats > * { min-width: 0; }
@media (max-width: 700px) {
  .semester-gradebook .gradebook-stats { grid-template-columns: minmax(0, 1fr); }
  .semester-gradebook .gradebook-filters label { min-width: 0; max-width: 100%; }
  .semester-gradebook .gradebook-stats strong { font-size: 1.5625rem; }
}
/* Minimum touch/keyboard target spacing for repeated roster actions and disclosures. */
main details > summary, dialog details > summary { min-height: 44px; padding-block: .625rem; cursor: pointer; }
.admin-workspace button.link { min-height: 32px; min-width: 24px; padding-block: .25rem; }
.roji-refresh-notice { position: relative; margin: 0; padding: .75rem 1rem; background: #fff2c7; color: #3e310e; font: 1rem/1.5 system-ui, sans-serif; }
.roji-refresh-notice[hidden] { display: none; }
.roji-accessibility-footer { padding: 1rem; text-align: center; font: 1rem/1.5 system-ui,sans-serif; color: #102d42; }
.roji-accessibility-link { display: inline-block; margin-inline-start: 1rem; padding: .5rem; color: #164d8b; font-size: 1rem; }
/* Structured student records remain readable at enlarged text sizes. */
.shared-record-dialog .record-details{margin:1rem 0}
.shared-record-dialog .record-details dt{font-weight:700;margin-top:.75rem}
.shared-record-dialog .record-details dd{margin:.25rem 0 .75rem;overflow-wrap:anywhere}
.shared-record-dialog li{margin-block:.5rem}
.shared-record-dialog summary{min-height:2.75rem;box-sizing:border-box;overflow-wrap:anywhere}
.shared-record-dialog,#dialog{overscroll-behavior:contain}
@media(max-width:700px){.iep-overview{grid-template-columns:minmax(0,1fr)}}
#dialog summary > h3{display:inline;font:inherit;margin:0}
