/* dashboard.css — Dashboard page styles */

/* ── Dashboard-scoped overrides ────────────────────────────── */
/* The student list has its own class picker: the toolbar's shows only
   when the list is collapsed (as on Assignments). */
.page-layout:not(.sidebar-hidden) .dash-course-select {
  display: none;
}
/* Class Settings puts its class list where the student list goes
   (renderClassManager). It shows even when the student list is
   collapsed, so the sidebar button has nothing to do there. */
body.cm-open #page-layout #sidebar-mount {
  width: auto;
  overflow: visible;
}
body.cm-open #app-dock [data-action='toggleSidebar'] {
  visibility: hidden;
}
#main.page-main.page-dashboard {
  background: var(--bg-secondary, #ececf0);
  padding: 0 12px 20px;
}

/* ── Dashboard Section Wrapper (scoped to dashboard page) ───── */
.page-dashboard .dash-section {
  padding: 0;
  margin: 0;
  margin-top: 12px;
  flex-shrink: 0;
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* ── Class Overview Panel ──────────────────────────────────── */
/* The top bar (Class Average, To Grade, Missing and Late, Upcoming
   Birthdays); then the middle row (.dash-row, below); then the students. */

/* The top bar (Colin, Nov 26: the design spec): four cards like the tiles
   under them, each a link to its page with a › after its name, one rhythm in
   every card (its name, the number, a thin bar, one line under it) so the
   lines sit level across the row, and no grey. */
.dash-glance {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dash-glance.has-to-grade {
  grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr));
}
.dash-glance-cell {
  display: grid;
  grid-template-rows: 20px 40px 16px 20px;
  align-content: start;
  min-width: 0;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-base);
  text-align: left;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out);
}
.dash-glance-cell > * {
  grid-column: 1;
  min-width: 0;
}
.dash-glance-cell:hover {
  background: color-mix(in srgb, var(--surface) 94%, var(--text));
}
.dash-glance-cell:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
}
.dash-glance-old {
  white-space: nowrap;
}
.dash-glance-label {
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 20px;
}
/* The ›: it says the card opens a page, and moves a little under the pointer. */
.dash-glance-label::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-left: 3px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.45;
  transition:
    transform var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out);
}
.dash-glance-cell:hover .dash-glance-label::after {
  opacity: 0.9;
  transform: translateX(2px) rotate(45deg);
}
.dash-glance-value {
  grid-row: 2;
  align-self: end;
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 30px;
  font-weight: 700;
  line-height: 36px;
  font-variant-numeric: tabular-nums;
}
.dash-glance-word {
  font-size: 15px;
  font-weight: 600;
}
.dash-glance-sub,
.dash-glance-key {
  grid-row: 4;
  align-self: end;
  min-width: 0;
  font-size: 13.5px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-glance-sub b,
.dash-glance-key b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* The class's change since the last report, at the right of the number line. */
.dash-glance-change {
  grid-row: 2;
  grid-column: 1;
  justify-self: end;
  align-self: end;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.dash-glance-change.is-up {
  color: var(--score-3-text);
}
.dash-glance-change.is-down {
  color: var(--score-1-text);
}
/* Nothing changed: the line keeps its space and says nothing. */
.dash-glance-change.is-none {
  visibility: hidden;
}
.dash-glance-dist,
.dash-glance-bar {
  grid-row: 3;
  align-self: center;
  display: flex;
  gap: 2px;
  height: 6px;
}
.dash-glance-dist .dist-seg {
  border-radius: 2px;
}
.dash-glance-dist .dist-seg:first-child {
  border-radius: 4px 2px 2px 4px;
}
.dash-glance-dist .dist-seg:last-child {
  border-radius: 2px 4px 4px 2px;
}
.dash-glance-dist .dist-seg:only-child {
  border-radius: 4px;
}
/* Next Report's bar fills as its comments are approved. */
.dash-glance-bar {
  border-radius: 3px;
  background: var(--divider-subtle);
  overflow: hidden;
}
.dash-glance-bar > span {
  border-radius: 3px;
  background: var(--active-fill);
}
.dash-glance-key {
  display: flex;
  flex-wrap: nowrap;
}
.dash-glance-key > * + *::before {
  content: '·';
  margin: 0 5px;
}
@media (max-width: 900px) {
  .dash-glance,
  .dash-glance.has-to-grade {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
/* A short window (under 760 px; an older laptop's browser, a zoomed one)
   gives the top bar two short lines a card: the name on the first, the
   number and what is under it on the second, 64 px tall, so the row below
   starts higher and fits (board "Dashboard Row, Revised After Review",
   Nov 28). One line cut the words short on a 1366 px Dell ("3 Missi…"). The
   bars and the change line go; the numbers stay. */
@media (max-height: 759.98px) {
  .dash-glance-cell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 20px 24px;
    column-gap: 8px;
    row-gap: 4px;
    align-items: center;
    box-sizing: border-box;
    height: 64px;
    padding: 8px 16px;
    overflow: hidden;
  }
  .dash-glance-cell > * {
    grid-column: auto;
  }
  .dash-glance-label {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: var(--text-sm);
    white-space: nowrap;
  }
  .dash-glance-value {
    grid-column: 1;
    grid-row: 2;
    font-size: var(--text-lg);
    line-height: 24px;
    white-space: nowrap;
  }
  .dash-glance-word {
    font-size: var(--text-sm);
  }
  .dash-glance-sub,
  .dash-glance-key {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    font-size: var(--text-sm);
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Next Report's line keeps the date: the report's name is in the card's link and Reports. */
  .dash-glance-next .dash-glance-sub:has(.dash-glance-sep) .dash-glance-term,
  .dash-glance-next .dash-glance-sep,
  .dash-glance-next .dash-glance-wd {
    display: none;
  }
  /* The level counts wrap and the ones that do not fit are cut whole, never mid-word. */
  .dash-glance-key {
    display: flex;
    flex-wrap: wrap;
    height: 20px;
  }
  .dash-glance-dist,
  .dash-glance-bar,
  .dash-glance-change {
    display: none;
  }
}

.dash-overview-section {
  min-height: 0;
}
/* The seven Core Competencies take two lines at most. Where the card is too
   narrow for that, they take a four-column grid and a long name ends in an
   ellipsis (the full name is in its hover card or title). */
.dash-overview-section {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 12px;
  overflow: visible;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.page-dashboard .dash-section-title {
  font-family: var(--font-base);
  font-size: var(--text-lg);
  color: var(--text);
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-dashboard .dash-section-title a {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  text-transform: none;
  letter-spacing: 0;
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  margin-left: auto;
}
.page-dashboard .dash-section-title a:hover {
  text-decoration: underline;
}

/* A competency's bar (Curricular Competencies, Class Average). */
.dash-outcome-bar-track {
  flex: 1;
  height: 8px;
  background: var(--divider-subtle);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.dash-outcome-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s var(--ease-out);
  min-width: 2px;
}
/* The view menu's list, which the report studio's zoom menu also uses. */
.dash-view-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: var(--z-fab);
  width: 290px;
  max-width: calc(100vw - 32px);
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}
.dash-view-menu[hidden] {
  display: none;
}
.dash-view-menu:not([hidden]) {
  animation: dash-view-in 100ms var(--ease-out);
}
@keyframes dash-view-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
}
.dash-view-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-family: var(--font-base);
  text-align: left;
  cursor: pointer;
}
.dash-view-item.is-on {
  background: color-mix(in srgb, var(--active) 8%, transparent);
}
.dash-view-item:hover,
.dash-view-item:focus-visible {
  background: var(--overlay-hover);
  outline: none;
}
.dash-view-item:focus-visible {
  box-shadow: inset 0 0 0 2px var(--active);
}
.dash-view-tick {
  font-size: var(--text-sm);
  color: var(--active);
}
.dash-view-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dash-view-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}
.dash-view-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-2);
  white-space: normal;
}

/* ── Class insights (dash-insights.js) ─────────────────────── */
/* The head of a competency row's list of students (the Competencies tile's
   .dash-comp-pop), and the shared next step under it. */
.dash-mix-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}
.dash-mix-pop-next {
  line-height: 1.4;
  color: var(--text);
}
.dash-mix-pop-next b {
  font-weight: 600;
  color: var(--text);
}
.dash-mix-pop-close {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: var(--text-lg);
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
}

/* Students as small tinted chips, in the segment list and Who Needs Help. */
.dash-ins-people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.dash-ins-person {
  display: inline-flex;
  background: var(--bg);
  color: var(--text);
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.dash-ins-person:hover {
  text-decoration: underline;
}
.dash-ins-val {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.dash-ins-link {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--link);
  text-decoration: none;
  cursor: pointer;
}
.dash-ins-link:hover {
  text-decoration: underline;
}
a.dash-ins-name {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
a.dash-ins-name:hover {
  color: var(--link);
  text-decoration: underline;
}

/* Students heading: a white bar like every other dashboard section, the
   title 21px in, level with the card titles above. Cards | Grid sits beside
   the title (it changes what the section shows); Search and Show, which
   narrow the list, follow in the Assignments bar's style (the shared .atb-*
   parts in styles.css); the sort menu is pushed to the right end. */
.dash-students-head {
  /* Search is 240px and gives up room down to 160px before anything wraps. */
  --atb-search-min: 160px;
  --atb-search-max: 240px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 10px 10px 20px;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.dash-students-head .atb-field > input {
  border-radius: 8px;
}
/* Show holds its room: the badge arriving or going moves nothing beside it. */
.dash-show [data-show='all'] {
  min-width: 56px;
  justify-content: center;
}
.dash-show [data-show='flagged'] {
  min-width: 112px;
  justify-content: center;
}
/* The sort: the native select, in the grey fill the Assignments bar's
   controls use, one width whatever it says. */
.dash-students-head .dash-sort-select {
  margin-left: auto;
  flex: 0 0 176px;
  width: 176px;
  max-width: none;
  padding: 0 28px 0 12px;
  border: none;
  background-color: rgba(118, 118, 128, 0.12);
  font-size: var(--text-sm);
  font-weight: 600;
  text-overflow: ellipsis;
}
.dash-students-head .dash-sort-select:hover {
  background-color: rgba(118, 118, 128, 0.2);
}
/* Point to preview: while the pointer or the keyboard rests on an unpressed
   Flagged, the cards and rows of students who are not flagged dim. The delay
   keeps the page still as the pointer crosses the bar. */
#main:has(.dash-show [data-show='flagged']:is(:hover, :focus-visible):not([aria-pressed='true']))
  :is(.dash-card:not(.flagged), .dash-sg tbody tr:not(.is-flagged)) {
  opacity: 0.35;
}
@media (prefers-reduced-motion: no-preference) {
  #main .dash-card,
  #main .dash-sg tbody tr {
    transition:
      box-shadow 0.18s var(--ease-out),
      transform 0.18s var(--ease-out),
      border-color 200ms,
      opacity 150ms ease;
  }
  #main:has(.dash-show [data-show='flagged']:is(:hover, :focus-visible):not([aria-pressed='true']))
    :is(.dash-card:not(.flagged), .dash-sg tbody tr:not(.is-flagged)) {
    transition:
      box-shadow 0.18s var(--ease-out),
      transform 0.18s var(--ease-out),
      border-color 200ms,
      opacity 150ms ease 120ms;
  }
}
.dash-students-title {
  margin: 0 6px 0 0;
  font-family: var(--font-base);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
}
.dash-students-count {
  margin-left: 4px;
  font-weight: 500;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* The student grid: a row per student, a column per competency with a count
   of students at each proficiency above it. Shapes as well as colours. */
.dash-sg-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.dash-sg {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--text);
}
.dash-sg th,
.dash-sg td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--divider-subtle);
  text-align: center;
  white-space: nowrap;
}
.dash-sg thead th {
  vertical-align: bottom;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg);
  border-bottom: 1px solid var(--divider-strong);
}
/* A heading is a sort button: grey until it is the sort, then dark with
   its arrow. */
.dash-sg-sort {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  margin: 0 -4px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.dash-sg-sort:hover {
  color: var(--text);
  background: var(--overlay-hover);
}
.dash-sg-sort:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 0;
}
.dash-sg-sort.is-on {
  color: var(--text);
}
.dash-sg-arrow:empty {
  display: none;
}
.dash-sg th.dash-sg-name-h,
.dash-sg th.dash-sg-name,
.dash-sg tfoot th {
  text-align: left;
}
.dash-sg th.dash-sg-name {
  font-weight: 600;
}
.dash-sg .dash-sg-obs-h,
.dash-sg .dash-sg-obs {
  text-align: right;
}
.dash-sg-hist {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 3px;
  height: 46px;
  margin-bottom: 4px;
}
.dash-sg-hbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dash-sg-hn {
  font-size: var(--text-2xs);
  font-weight: 500;
  color: var(--text-2);
}
.dash-sg-hfill {
  width: 14px;
  border-radius: 3px 3px 0 0;
}
.dash-sg-col {
  display: block;
}
.dash-sg-val {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
}
.dash-sg-none {
  color: var(--text-3);
}
.dash-sg-obs {
  color: var(--text-2);
}
.dash-sg-obs.is-overdue {
  color: var(--score-2-text);
  font-weight: 600;
}
.dash-sg tbody tr:hover {
  background: var(--overlay-hover);
}
.dash-sg tfoot th,
.dash-sg tfoot td {
  border-bottom: 0;
  background: var(--bg);
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-2);
}
.dash-sg tfoot th {
  font-family: var(--font-base);
}
.dash-sg-legend {
  display: flex;
  gap: 16px;
  padding: 8px 4px 0;
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: var(--text-2);
}

/* ── Birthday Widget ─────────────────────────────────────── */
.dash-birthday-box {
  margin-top: 12px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.bday-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.bday-row + .bday-row {
  border-top: 1px solid var(--divider-subtle);
}
.bday-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.bday-info {
  flex: 1;
  min-width: 0;
}
.bday-name {
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bday-date {
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: var(--text-3);
}
.bday-countdown {
  flex-shrink: 0;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
}
.bday-today {
  color: #fff;
  background: var(--score-3);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: var(--text-sm);
}
.bday-soon {
  color: var(--score-2);
  font-weight: 600;
}
.bday-days {
  color: var(--text-3);
  font-weight: 500;
}

/* ── Toolbar ────────────────────────────────────────────────── */
.dash-toolbar {
  flex-wrap: wrap;
}
/* Class Settings: the tinted secondary button the Assignments bar uses. */
.dash-toolbar:not(.cm-toolbar) .tb-action-btn {
  padding: 0 12px;
  font-size: var(--text-sm);
}
.dash-toolbar:not(.cm-toolbar) .tb-action-btn.tb-action-secondary {
  border: none;
  background: var(--active-light);
  color: var(--link);
}
.dash-toolbar:not(.cm-toolbar) .tb-action-btn.tb-action-secondary:hover {
  background: var(--active-light);
  filter: brightness(0.95);
}
.dash-toolbar-spacer {
  flex: 1;
}

/* ── Student Card Grid ──────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  /* The section above already sets the 12px between boxes. */
  margin-top: 0;
}
/* minmax(0, 1fr), not 1fr: a long name or a wide strip never widens its
   column past the others (the stress test, Nov 5). */
@media (max-width: 960px) {
  .dash-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .dash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  /* Not overflow: hidden, so a chip's pop-up can run past the card. */
  position: relative;
  transition:
    box-shadow 0.18s var(--ease-out),
    transform 0.18s var(--ease-out),
    border-color 200ms;
  cursor: pointer;
}
.dash-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
/* The card under the pointer or the keyboard sits above its neighbours, so
   its chip pop-up isn't drawn under the next row. */
.dash-card:hover,
.dash-card:focus-within {
  z-index: 2;
}
.dash-card.flagged {
  box-shadow:
    inset 4px 0 0 var(--priority),
    var(--shadow-sm);
}
.dash-card.flagged:hover {
  box-shadow:
    inset 4px 0 0 var(--priority),
    var(--shadow-md);
  transform: translateY(-1px);
}

/* Card Header: avatar, name (designations on its line), the overall grade
   and its trend. The flag and missing work are in the footer (plan F.6). */
.dash-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px;
}
.dash-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-base);
  font-size: var(--text-xs);
  font-weight: 700;
}
/* The flag, at the footer's bottom left: 22 px square. */
.dash-flag-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: -4px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--text-md);
  line-height: 1;
  color: var(--text-3);
  transition: color 0.12s;
}
.dash-flag-btn:hover {
  background: var(--overlay-hover);
  color: var(--text-2);
}
.dash-flag-btn:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 1px;
}
.dash-flag-btn.is-on {
  color: var(--priority);
}
.dash-card-info {
  flex: 1;
  min-width: 0;
}
/* Designation and ELL badges sit on the name's line; a long name
   truncates before they do. */
.dash-card-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.dash-card-name {
  min-width: 0;
  font-family: var(--font-base);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  /* A long name wraps to a second line at its spaces rather than being cut
     off (Colin, Nov 5); two lines at most, the full name in its title. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
  line-height: 1.25;
}
.dash-card-name:hover {
  color: var(--link);
}
.dash-card-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dash-card-badge.is-none {
  color: var(--text-2);
}
.dash-card-missing {
  font-family: var(--font-base);
  font-size: var(--text-xs);
  font-weight: 600;
  /* --priority is 3.6:1 on white; small text needs 4.5:1. */
  color: var(--score-1-text);
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* One segment per competency or folder, tinted by the student's level:
   labelled chips up to eight columns, thin bars past that. A segment's
   pop-up (.dist-tip) spans the card under the strip. */
.dash-card-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 12px 10px;
}
/* A segment's colours by the student's level (lv-1 … lv-4; is-none when
   not assessed). The text colour passes 4.5:1 on its level in each theme:
   white on Emerging, Proficient and Extending in light, dark on Developing's
   amber; dark on every level in dark, where the level colours are bright. */
.dash-card-seg {
  --chip-bg: var(--divider-medium);
  --chip-fg: var(--text-2);
  flex: 1;
  min-width: 0;
  height: 6px;
  border-radius: 2px;
  background: var(--chip-bg);
  outline: 2px solid transparent;
  outline-offset: 1px;
  transition:
    background-color 200ms,
    color 200ms,
    outline-color 200ms;
}
.dash-card-seg.lv-1 {
  --chip-bg: var(--score-1);
  --chip-fg: #fff;
}
.dash-card-seg.lv-2 {
  --chip-bg: var(--score-2);
  --chip-fg: #2b1a00;
}
.dash-card-seg.lv-3 {
  --chip-bg: var(--score-3);
  --chip-fg: #fff;
}
.dash-card-seg.lv-4 {
  --chip-bg: var(--score-4);
  --chip-fg: #fff;
}
@media (prefers-color-scheme: dark) {
  .dash-card-seg.lv-1,
  .dash-card-seg.lv-2,
  .dash-card-seg.lv-3,
  .dash-card-seg.lv-4 {
    --chip-fg: #1d1d1f;
  }
}
.dash-card-strip.is-chips .dash-card-seg {
  height: 14px;
  padding: 0;
  border: none;
  border-radius: 3px;
  color: var(--chip-fg);
  font-family: var(--font-base);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  cursor: pointer;
}
.dash-card-strip.is-chips .dash-card-seg:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 1px;
}
.dash-card-seg:hover .dist-tip,
.dash-card-seg:focus-within .dist-tip,
.dash-card-seg:focus-visible .dist-tip {
  display: block;
}
.dash-card-strip .dist-tip {
  left: 8px;
  right: 8px;
  top: 100%;
  transform: none;
  margin-top: 0;
  min-width: 0;
  max-width: none;
  white-space: normal;
  text-align: left;
  letter-spacing: normal;
  cursor: default;
}
.dash-card-strip .dist-tip-title,
.dash-card-strip .dist-tip-name {
  display: block;
}
.dash-card-strip .dist-tip-title {
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--text);
}
.dash-card-strip .dist-tip-name {
  font-weight: 400;
  line-height: 1.5;
}
/* A sort's motion (StudentCards.slideFrom): a card is put back where it
   was with no transition (is-placing), then slides to its new place
   (is-sliding). */
.dash-card.is-placing,
.dash-card.is-placing .dash-card-seg {
  transition: none;
}
.dash-card.is-sliding {
  transition:
    transform 250ms var(--ease-out),
    border-color 200ms,
    box-shadow 0.18s var(--ease-out);
}
/* Less motion asked for: nothing slides, fades or grows. */
@media (prefers-reduced-motion: reduce) {
  .dash-card,
  .dash-card.is-sliding,
  .dash-card-seg,
  .dash-outcome-bar-fill {
    transition: none;
  }
  .dash-view-menu:not([hidden]) {
    animation: none;
  }
}

/* The grade badge's trend arrow. */
.dash-card-trend {
  flex-shrink: 0;
  font-size: 0.9375rem;
  line-height: 1;
}

/* Card Footer: the flag, the observation line, missing work, and on the
   right "N not assessed". */
.dash-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 10px;
}
.dash-card-missing,
.dash-card-unassessed {
  flex-shrink: 0;
  margin-left: auto;
  font-family: var(--font-base);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dash-card-obs {
  /* On a narrow card the observation line takes its own row rather than
     cutting "Last observed …" short. The line wraps onto a second row that
     is never shown, so on a card too narrow for all of it (a 1366 Dell's
     four columns) "· 5 in all" goes and "Last observed 12 days ago" stays
     whole. */
  flex: 1 1 auto;
  min-width: 0;
  height: 18px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  justify-content: flex-start;
  gap: 0 5px;
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
}
.dash-obs-dots {
  display: inline-flex;
  gap: 3px;
  flex-shrink: 0;
}
.dash-obs-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
}
.dash-obs-dot[data-type='strength'] {
  background: var(--score-3);
}
.dash-obs-dot[data-type='growth'] {
  background: var(--active);
}
.dash-obs-dot[data-type='concern'] {
  background: var(--score-2);
}
.dash-obs-dot[data-type='note'] {
  background: var(--obs-note);
  box-shadow: inset 0 0 0 1px var(--obs-note-edge);
}
/* An untyped note is an outline, as on the Observations page. */
.dash-obs-dot[data-type='none'] {
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--text-3);
}
.dash-obs-when {
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-obs-when.is-overdue {
  /* The darker Developing amber: --score-2 read 3.49:1 on white, this is
     4.69:1 (dark mode is the same #ff9f0a, 6.78:1). */
  color: var(--score-2-dark);
  font-weight: 600;
}
.dash-obs-count {
  flex-shrink: 0;
}

/* ── Dashboard Designation Badges ───────────────────────────── */
.dash-desig-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.dash-desig-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: var(--text-2xs);
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: var(--tracking-wide);
  background: rgba(0, 122, 255, 0.08);
  color: var(--link);
}
.dash-desig-badge.low-inc {
  background: rgba(255, 59, 48, 0.08);
  color: var(--priority);
}
.dash-iep-tag,
.dash-mod-tag {
  font-size: var(--text-2xs);
  font-weight: 600;
  padding: 1px 4px;
  border-radius: var(--radius-xs);
  font-family: var(--font-base);
  letter-spacing: var(--tracking-wide);
}
.dash-iep-tag {
  background: rgba(255, 149, 0, 0.1);
  color: var(--iep-badge);
}
.dash-mod-tag {
  background: rgba(88, 86, 214, 0.1);
  color: var(--mod-badge);
}

/* ── Empty state ────────────────────────────────────────────── */
.dash-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-3);
}
.dash-empty-title {
  font-family: var(--font-base);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 4px;
}
.dash-empty-text {
  font-family: var(--font-base);
  font-size: var(--text-md);
}

/* ── Course selector in dock ────────────────────────────────── */
/* ── Distribution Tooltip ──────────────────────────────── */
.dist-seg {
  position: relative;
  cursor: pointer;
  border-radius: 4px;
}
.dist-seg:first-child {
  border-radius: 8px 4px 4px 8px;
}
.dist-seg:last-child {
  border-radius: 4px 8px 8px 4px;
}
.dist-seg:only-child {
  border-radius: 8px;
}
.dist-seg:hover .dist-tip {
  display: block;
}
.dist-tip {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  /* --tip-shift keeps it inside the card (page-dashboard.js _keepTipInside). */
  transform: translateX(calc(-50% + var(--tip-shift, 0px)));
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  z-index: var(--z-fab);
  min-width: 140px;
  max-width: 220px;
  white-space: nowrap;
}
.dist-tip-title {
  font-family: var(--font-base);
  font-size: var(--text-2xs);
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 4px;
}
.dist-tip-name {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.6;
}

/* ── Class Manager ──────────────────────────────────────────── */

.cm-toolbar-detail {
  font-size: var(--text-sm);
  color: var(--text-3);
}

#main.page-main.page-dashboard.cm-listing {
  padding: 0;
}
.cm-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.cm-layout > .cm-detail {
  flex: 1;
  min-width: 0;
}
.cm-toolbar {
  min-height: 52px;
  box-sizing: border-box;
}

/* The class list, drawn like the student list (#gb-sidebar). */
.cm-sidebar {
  width: var(--sidebar-w);
  height: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border-right: 1px solid var(--divider-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cm-sidebar-header {
  height: 52px;
  flex-shrink: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 0.5px solid var(--divider-medium);
}
.cm-sidebar-title {
  font-family: var(--font-base);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}
.cm-new-class-btn {
  flex-shrink: 0;
}
.cm-class-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.cm-class-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration-micro);
}
.cm-class-item:hover {
  background: var(--overlay-hover);
}
.cm-class-item.selected {
  background: var(--active-light);
}
.cm-class-item.selected .cm-class-name {
  color: var(--link);
  font-weight: 600;
}
.cm-class-item.archived {
  opacity: 0.5;
}
.cm-class-item.cm-create-active {
  background: var(--active-light);
  outline: 1.5px dashed var(--active);
  outline-offset: -1.5px;
  margin-bottom: 4px;
}
.cm-class-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cm-class-avatar-new {
  background: var(--active-fill);
  font-size: var(--text-base);
}
.cm-class-text {
  display: block;
  flex: 1;
  min-width: 0;
}
.cm-class-name {
  display: block;
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-class-meta {
  display: block;
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-class-group {
  margin-top: 8px;
  padding: 8px 12px 4px;
  border-top: 1px solid var(--divider-subtle);
  font-family: var(--font-base);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-3);
}
.cm-sidebar-foot {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding: 8px 14px;
  border-top: 1px solid var(--divider-subtle);
}
.cm-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: var(--text-2);
  cursor: pointer;
}
.cm-new-btn:hover {
  color: var(--link);
}
.cm-restore-summary {
  margin: 4px 0 12px;
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cm-restore-summary:empty {
  display: none;
}
.cm-restore-note {
  margin-top: 6px;
  color: var(--text-3);
}

.cm-detail {
  overflow-y: auto;
  padding: 20px 24px;
  background: var(--bg);
}
.cm-detail-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  max-width: 1400px;
}

/* Tabbed class view: a header, one row of tabs, then the open tab. */
.cm-detail-inner.cm-tabbed {
  display: block;
  max-width: 1200px;
}
.cm-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cm-head-title {
  font-family: var(--font-base);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.cm-head-meta {
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--text-2);
  margin-top: 4px;
}
.cm-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Class Actions' menu, in the look of the Assignments bar's menus (.assess-menu). */
.cm-std-menu.cm-class-actions-menu {
  min-width: 220px;
  padding: var(--space-1);
  border: 0;
  border-radius: 12px;
  box-shadow:
    0 0 0 0.5px var(--divider-medium),
    0 10px 28px rgba(0, 0, 0, 0.18);
}
.cm-std-menu.cm-class-actions-menu .cm-std-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.cm-std-menu.cm-class-actions-menu .cm-std-menu-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.cm-std-menu-sep {
  display: block;
  height: 1px;
  margin: 4px 8px;
  background: var(--divider-medium);
}
.cm-class-actions-note {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--text-2);
  padding: 8px 10px 6px;
  margin-top: 4px;
  border-top: 0.5px solid var(--divider-subtle);
}
.cm-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.cm-tab {
  font-family: var(--font-base);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 14px;
  cursor: pointer;
}
.cm-tab:hover {
  color: var(--text);
}
.cm-tab.active {
  color: var(--link);
  font-weight: 600;
  border-bottom-color: var(--link);
}
.cm-tab:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: -2px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.cm-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
}
.cm-tab-panel-competencies {
  max-width: 1200px;
}
/* Grading tab */
.cm-tab-panel-grading {
  max-width: 1200px;
}
.cm-grade-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.cm-grade-title {
  font-family: var(--font-base);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.cm-gs-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.cm-gs-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  text-align: left;
  font-family: var(--font-base);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
}
.cm-gs-card.active {
  border: 2px solid var(--active);
  background: var(--active-light);
  padding: 13px 15px;
}
.cm-gs-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}
.cm-gs-desc,
.cm-gs-sample {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cm-gs-sample strong {
  color: var(--text);
}
.cm-grade-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.cm-grade-lanes {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cm-lane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cm-lane .cm-field {
  margin-bottom: 0;
}
.cm-lane-off {
  background: var(--bg);
  border: 1px dashed var(--border-2);
}
.cm-lane-off > *:not(.cm-lane-note) {
  opacity: 0.6;
}
.cm-lane-note {
  font-family: var(--font-base);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-2);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.cm-method-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.cm-method-head .cm-label {
  margin-bottom: 0;
}
.cm-method-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--divider-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cm-method {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--divider-subtle);
  background: var(--surface);
  font-family: var(--font-base);
  text-align: left;
  cursor: pointer;
}
.cm-method:first-child {
  border-top: 0;
}
.cm-method.active {
  background: var(--active-light);
}
.cm-method-dot {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1.5px solid var(--text-3);
}
.cm-method.active .cm-method-dot {
  border: 5px solid var(--active);
}
.cm-method-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.cm-method-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}
.cm-method-desc {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cm-method-example {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  min-width: 36px;
  text-align: right;
}
.cm-rule-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cm-rule-title {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}
.cm-rule-text {
  font-family: var(--font-base);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
}
/* The categories' weights as one bar (teacher/cm-grading-bars.js): each
   line between two categories drags, by mouse, pen or touch, or moves by
   the arrow keys once focused. */
.cm-weight-bar {
  position: relative;
  display: flex;
  height: 32px;
  margin-top: 4px;
  user-select: none;
}
.cm-weight-seg {
  flex: none;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.cm-weight-seg:first-child {
  border-radius: 6px 0 0 6px;
}
.cm-weight-seg:nth-last-child(1 of .cm-weight-seg) {
  border-radius: 0 6px 6px 0;
}
.cm-weight-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 6px;
}
.cm-weight-pct {
  padding-right: 6px;
  font-variant-numeric: tabular-nums;
}
.cm-weight-grip {
  position: absolute;
  top: -4px;
  z-index: 1;
  width: 24px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  justify-content: center;
  transform: translateX(-50%);
  cursor: ew-resize;
  touch-action: none;
}
.cm-weight-grip::before {
  content: '';
  width: 6px;
  height: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--text-2);
  border-radius: 3px;
  background: var(--surface);
  transition: border-color 150ms;
}
.cm-weight-grip:hover::before,
.cm-weight-grip.is-dragging::before {
  border-color: var(--text);
}
.cm-weight-grip:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
  border-radius: 4px;
}
.cm-check {
  width: 340px;
  flex: 0 0 340px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cm-check .cm-field {
  margin-bottom: 0;
}
.cm-check-overall {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-base);
}
.cm-check-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-2);
}
.cm-check-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
}
.cm-check-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 0.5px solid var(--divider-subtle);
  padding-top: 12px;
  font-family: var(--font-base);
}
.cm-check-sub {
  font-weight: 400;
}
.cm-check-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: var(--text-base);
}
.cm-check-code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
}
.cm-check-scores {
  color: var(--text-2);
}
.cm-check-num {
  text-align: right;
  white-space: nowrap;
}
.cm-check-cats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 52px;
  gap: 6px 8px;
  font-size: var(--text-base);
}
.cm-check-colhead {
  font-size: var(--text-xs);
  color: var(--text-2);
}
.cm-check-weight {
  color: var(--text-2);
}
.cm-check-total {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-base);
}
@media (max-width: 1100px) {
  .cm-grade-body {
    flex-direction: column;
  }
  /* Full width, not its widest line, so the Points and Proficiency ruler
     scrolls inside its card on a phone. */
  .cm-grade-lanes {
    width: 100%;
  }
  .cm-check {
    width: 100%;
    flex: none;
  }
}
/* Reporting Terms tab: saved terms as tiles */
.cm-term-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cm-term-view-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cm-term-view-top .cm-term-school,
.cm-term-view-top .cm-term-span {
  margin: 0;
}
.cm-term-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.cm-term-tile {
  border: 1px solid var(--divider-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-base);
}
.cm-term-tile-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}
.cm-term-tile-dates {
  font-size: var(--text-base);
  color: var(--text-2);
  margin-top: 2px;
}
.cm-term-tile-report {
  font-size: var(--text-sm);
  color: var(--text-2);
  margin-top: 6px;
}
.cm-term-view-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cm-term-school-label {
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.cm-term-cancel {
  margin-top: 8px;
}
/* Reporting Terms: Create New and the teacher's own dates (2026-11-17) */
.cm-term-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--active);
  background: var(--surface);
  border: 1.5px solid var(--active);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.cm-term-new:hover {
  background: var(--active-light);
}
.cm-term-own-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 10px;
}
.cm-term-own-title {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
}
.cm-term-start,
.cm-term-also {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.cm-term-also {
  border-top: 1px solid var(--divider-subtle);
  padding-top: 12px;
  margin-top: 4px;
}
.cm-term-also-hint {
  flex-basis: 100%;
}
.cm-term-chip {
  font: inherit;
  font-size: var(--text-sm);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 12px;
  cursor: pointer;
}
.cm-term-chip.active {
  font-weight: 600;
  color: var(--active);
  background: var(--active-light);
  border-color: var(--active);
}
.cm-term-row-wrap {
  border-radius: var(--radius-sm);
}
.cm-term-row-bad {
  background: var(--priority-light);
}
.cm-term-input-bad {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}
.cm-term-row-msg:empty {
  display: none;
}
.cm-term-row-msg {
  font-size: var(--text-sm);
  color: var(--danger);
  padding: 0 8px 6px;
}
.cm-term-strip {
  margin: 6px 0 10px;
}
.cm-term-strip:empty {
  display: none;
}
.cm-term-strip-bar {
  position: relative;
  height: 26px;
  background: var(--bg-secondary);
  border-radius: 6px;
  overflow: hidden;
}
.cm-term-strip-term {
  position: absolute;
  top: 3px;
  height: 20px;
  box-sizing: border-box;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--active-light);
  box-shadow: inset 0 0 0 1px var(--active);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-term-strip-overlap {
  position: absolute;
  top: 0;
  height: 26px;
  background: var(--danger);
  opacity: 0.5;
  border-radius: 2px;
}
.cm-term-strip-months {
  position: relative;
  height: 16px;
  font-size: var(--text-xs);
  color: var(--text-2);
}
.cm-term-strip-months span {
  position: absolute;
  top: 2px;
}
.cm-term-kept {
  font-size: var(--text-sm);
  color: var(--notice-text);
  background: var(--notice-bg);
  border: 1px solid var(--notice-edge);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 10px;
}
.cm-details-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.cm-details-row > .cm-field {
  margin-bottom: 0;
}

.cm-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 0.5px solid var(--divider-subtle);
  margin-bottom: 0;
  padding: 18px 20px;
}
.cm-section-title {
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 12px;
}

.cm-field {
  margin-bottom: 12px;
}
.cm-field:last-child {
  margin-bottom: 0;
}
.cm-label {
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}
.cm-input {
  font-family: var(--font-base);
  font-size: var(--text-md);
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  width: 100%;
  transition: border 0.12s;
  box-sizing: border-box;
}
.cm-input:focus {
  border-color: var(--active);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.15);
  outline: none;
}
.cm-textarea {
  font-family: var(--font-base);
  font-size: var(--text-base);
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  width: 100%;
  min-height: 52px;
  resize: vertical;
  transition: border 0.12s;
  box-sizing: border-box;
}
.cm-textarea:focus {
  border-color: var(--active);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.15);
  outline: none;
}

/* Class Settings segments (.seg) sit in a narrow column: they wrap
   onto a second row instead of pushing the last segment out of view. */
.cm-seg {
  flex-wrap: wrap;
  max-width: 100%;
}
.cm-seg .seg-btn {
  white-space: normal;
}

/* T-UI-12 · Category management inline row */
.cm-cat-field {
  margin-top: 14px;
}
/* A save that was not made: the list changed on another device, or could
   not be checked (dash-class-manager.js CM_CAT_NOTICES). */
.cm-cat-notice {
  margin: 2px 0 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.35;
}
.cm-cat-notice .cm-add-link {
  margin-top: 6px;
}
.cm-cat-typed {
  margin-top: 6px;
}
.cm-cat-typed-label {
  font-weight: 600;
}
.cm-cat-typed ul {
  margin: 2px 0 0;
  padding-left: 18px;
}
.cm-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cm-cat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
}
.cm-cat-row:hover {
  background: var(--overlay-hover);
}
.cm-cat-row.dragging {
  opacity: 0.5;
}
.cm-cat-handle {
  font-size: 0.78rem;
  color: var(--text-3);
  cursor: grab;
  padding: 0 2px;
  letter-spacing: -2px;
  user-select: none;
}
.cm-cat-handle:active {
  cursor: grabbing;
}
.cm-cat-name {
  flex: 1;
  min-width: 120px;
}
.cm-cat-weight {
  width: 64px;
  text-align: right;
}
.cm-cat-pct {
  color: var(--text-2);
  font-size: var(--text-sm);
  margin-right: 4px;
}
.cm-cat-mode {
  width: auto;
  flex-shrink: 0;
}
.cm-cat-mode-hint {
  margin-top: 6px;
}
.cm-cat-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 10px;
  flex-wrap: wrap;
}
.cm-cat-sum {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cm-cat-sum strong {
  color: var(--text);
  font-weight: 600;
}
.cm-cat-sum-over {
  color: var(--priority);
}
.cm-cat-sum-over strong {
  color: var(--priority);
}
.cm-cat-sum-warn {
  font-style: italic;
  font-size: var(--text-xs);
}
.cm-cat-save:disabled,
.cm-detail .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

/* Reporting terms editor (same row model as categories) */
.cm-term-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 6px;
}
.cm-term-school {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.cm-term-school-select {
  flex: 1;
  min-width: 200px;
}
.cm-term-label {
  flex: 1;
  min-width: 112px;
}
.cm-term-date {
  width: 140px;
}

/* ── Curriculum Wizard ── */
.cw-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.cw-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-base);
  font-size: var(--text-xs);
  color: var(--text-3);
  font-weight: 600;
}
.cw-step.active {
  color: var(--link);
}
.cw-step.done {
  color: var(--score-3);
}
.cw-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  border: 1.5px solid var(--text-3);
  color: var(--text-3);
}
.cw-step.active .cw-step-num {
  border-color: var(--active-fill);
  background: var(--active-fill);
  color: #fff;
}
.cw-step.done .cw-step-num {
  border-color: var(--score-3);
  background: var(--score-3);
  color: #fff;
}
.cw-step-arrow {
  color: var(--text-3);
  font-size: var(--text-sm);
}

/* Re-link (Class Settings) still picks a grade, a subject and its courses with these. */
.cw-grade-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cw-grade-btn {
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: 600;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.cw-grade-btn:hover {
  border-color: var(--active);
  color: var(--link);
}
.cw-grade-btn.active {
  background: var(--active-fill);
  color: #fff;
  border-color: var(--active-fill);
}

.cw-subject-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cw-subject-btn {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cw-subject-btn:hover {
  border-color: var(--text-3);
  color: var(--text);
}
.cw-subject-btn.active {
  border-color: var(--active);
  background: var(--active-light);
  color: var(--link);
  font-weight: 600;
}
.cw-subject-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.cw-course-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-3);
  background: var(--overlay-hover);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
}
.cw-selection-summary {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(0, 122, 255, 0.06);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text);
}
.cw-selection-summary strong {
  font-weight: 600;
}

.cw-course-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  background: var(--surface);
}
.cw-course-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.08s;
}
.cw-course-item:hover {
  background: var(--active-light);
}
.cw-course-item.selected {
  background: var(--active-light);
}
.cw-course-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-xs);
  color: transparent;
  transition:
    background-color 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.cw-course-item.selected .cw-course-check {
  background: var(--active);
  border-color: var(--active);
  color: #fff;
}
.cw-course-name {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text);
  flex: 1;
}
.cw-course-count {
  font-size: var(--text-sm);
  color: var(--text-3);
  white-space: nowrap;
}
.cw-course-item {
  min-height: 40px;
  box-sizing: border-box;
}
.cw-course-item:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: -2px;
}
.cw-course-name {
  flex: 0 1 auto;
}
.cw-course-sub {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-base);
  color: var(--text-3);
}
.cw-course-name + .cw-course-count {
  margin-left: auto;
}
.cw-course-head {
  padding: 10px 12px 4px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-3);
}
.cw-course-sep {
  height: 1px;
  margin: 4px 8px;
  background: var(--divider-subtle);
}
.cw-course-list [hidden] {
  display: none;
}
.cw-find-none {
  margin: 0;
  padding: 12px;
  font-size: var(--text-md);
  color: var(--text);
}

/* ── New Class: the two steps beside Your Class (Course Tabs Board, Nov 25) ── */
.cw-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}
.cw-main {
  flex: 999 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cw-title {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.cw-subtitle {
  margin: 0 0 10px;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
}
.cw-grade-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.cw-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}
.cw-grade-seg .seg-btn {
  min-width: 40px;
}
.cw-find {
  flex: 1 1 200px;
  min-width: 0;
  max-width: none;
}
.cw-lead,
.cw-desc {
  margin: 16px 0 8px;
  font-size: var(--text-md);
  color: var(--text);
}
.cw-desc {
  margin: 10px 0 0;
}
.cw-custom-link {
  display: block;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
}
.cw-custom-link:hover {
  text-decoration: underline;
}
.cw-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
}
.cw-detail-row > .cm-field {
  margin-bottom: 0;
}
.cw-wizard .cw-main .cm-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}
.cw-name {
  max-width: 420px;
}
.cw-grade-input {
  max-width: 160px;
}
/* Already Set for You: a row a setting, its Change opening it in place. */
.cw-set-row {
  border-top: 1px solid var(--divider-subtle);
}
.cw-set-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
.cw-set-label {
  flex: 0 0 150px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}
.cw-set-value {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-md);
  color: var(--text);
}
.cw-set-btn {
  flex: 0 0 auto;
  min-height: 32px;
}
.cw-set-panel {
  padding: 0 0 14px;
}
/* New Class › Reporting Terms is Class Settings' section in a narrower
   column: a term's name gives way so its dates and ✕ stay in the row. */
.cw-set-panel .cm-term-label {
  min-width: 0;
}
.cw-set-panel .cw-cc-course {
  margin-top: 12px;
  border: 1px solid var(--divider-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}
.cw-set-panel .cw-cc-course-head {
  padding: 14px 16px 8px;
}
.cw-set-panel .cw-cc-folder {
  padding: 6px 16px 12px;
}
.cw-set-panel .cw-cc-loose {
  padding: 2px 16px 14px;
}
/* Your Class: the class as a page, its courses listed as they are ticked. */
.cw-rail {
  flex: 1 1 300px;
  max-width: 360px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  padding: 18px 16px;
  background: var(--surface);
  border: 0.5px solid var(--divider-subtle);
  border-radius: var(--radius);
}
.cw-rail-title {
  margin: 0 0 10px 4px;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
}
.cw-rail-page {
  min-height: 150px;
  box-sizing: border-box;
  padding: 12px 12px 10px 14px;
  background: var(--surface);
  border-radius: 8px;
  box-shadow:
    0 0 0 12px #ececf0,
    0 1px 3px 12px rgba(0, 0, 0, 0.04);
  margin: 12px;
}
.cw-rail-name {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  overflow-wrap: anywhere;
}
.cw-rail-sub {
  min-height: 4px;
  margin-bottom: 8px;
  font-size: var(--text-sm);
  color: var(--text-3);
}
.cw-rail-course {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-top: 1px solid #ececf0;
}
.cw-rail-dot {
  flex: 0 0 10px;
  height: 10px;
  border-radius: 3px;
}
.cw-rail-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 5px 0;
}
.cw-rail-cname {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cw-rail-count {
  font-size: var(--text-xs);
  line-height: 1.35;
  color: var(--text-3);
}
.cw-rail-x {
  flex: 0 0 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-3);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.cw-rail-x:hover {
  background: var(--overlay-pressed);
}
.cw-rail-note {
  margin: 14px 4px 0;
  font-size: var(--text-md);
  color: var(--text);
}

.cw-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}
/* The New Class wizard fills the pane, and its Cancel / Back / Next row sits
   at the foot of it on every step. A short step keeps the row there too, so
   ticking a course never moves Next. */
.cm-detail-inner.cw-wizard {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
/* The auto margin takes the place of the footer's own 16px, so the last box
   above it keeps that space when the step runs long. */
.cw-wizard > .cw-footer {
  margin-top: auto;
}
.cw-wizard > :nth-last-child(2) {
  margin-bottom: 16px;
}
/* Back and Next stay in view at the foot of a long step (Choose
   Competencies runs to thousands of pixels). */
.cm-detail .cw-footer {
  position: sticky;
  bottom: -20px;
  z-index: 2;
  margin-bottom: -20px;
  padding: 12px 0 20px;
  background: var(--bg);
}

/* ── Compact Standard Cards (used in class manager + wizard) ── */
.cm-std-card {
  background: var(--surface);
  border: 1px solid var(--divider-subtle);
  border-radius: var(--radius);
  margin-bottom: 4px;
  overflow: visible;
}
.cm-std-card.open {
  border-color: var(--active);
}
.cm-std-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 28px;
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
  min-height: 40px;
}
.cm-std-header:hover {
  background: rgba(0, 122, 255, 0.03);
}
/* Drag grip on standard cards */
.cm-std-card[draggable='true'] .cm-std-header::before {
  content: '\283F';
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: var(--text-lg);
  opacity: 0.2;
  transition: opacity 0.12s;
  cursor: grab;
}
.cm-std-card[draggable='true']:hover .cm-std-header::before {
  opacity: 0.5;
}
.cm-std-card.dragging {
  opacity: 0.35;
  transform: scale(0.98);
}
.cm-std-card.merge-target {
  animation: merge-pulse 0.35s ease-out forwards;
  border-color: var(--active);
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.06);
  position: relative;
  z-index: 2;
}
.cm-std-card.merge-target::after {
  content: '\01F4C1  Create Group';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--active-fill);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 3;
  pointer-events: none;
}
.cm-std-color-bar {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  flex-shrink: 0;
}
.cm-std-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-std-chevron {
  font-size: var(--text-xs);
  color: var(--text-3);
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  transition: color 0.15s;
}
.cm-std-card.open .cm-std-chevron {
  color: var(--link);
}
.cm-std-body {
  display: none;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--divider-subtle);
}
.cm-std-card.open .cm-std-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cm-std-card.open .cm-std-chevron {
  transform: rotate(90deg);
}

/* The competency's code, in its own colour mixed toward the text colour so
   it stays readable in light and dark mode. */
.cm-std-code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: color-mix(in srgb, var(--chip, var(--active)) 65%, var(--text));
  background: color-mix(in srgb, var(--chip, var(--active)) 12%, transparent);
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 16ch;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-std-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cm-std-flag {
  font-size: var(--text-xs);
  color: var(--text-2);
  background: var(--overlay-hover);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
}
.cm-std-count {
  font-size: var(--text-xs);
  color: var(--text-3);
}
.cm-std-tools {
  display: none;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.cm-std-card.open .cm-std-tools {
  display: inline-flex;
}
.cm-std-card.open .cm-std-meta {
  display: none;
}
.cm-std-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--link);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 8px;
  min-height: 32px;
  cursor: pointer;
}
.cm-std-help-btn:hover {
  background: var(--active-light);
}
.cm-std-help-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.cm-std-icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer;
}
.cm-std-icon-btn:hover,
.cm-std-icon-btn[aria-expanded='true'] {
  background: var(--overlay-hover);
  color: var(--text);
}
.cm-std-menu-wrap {
  position: relative;
}
.cm-std-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: var(--z-fab);
  min-width: 200px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.cm-std-menu[hidden] {
  display: none;
}
.cm-std-menu-item {
  text-align: left;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 5px;
  background: none;
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--text);
  cursor: pointer;
}
.cm-std-menu-item:hover,
.cm-std-menu-item:focus-visible {
  background: var(--active-light);
  outline: none;
}
.cm-std-menu-item.danger {
  color: var(--danger);
}
.cm-std-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 12px;
}
.cm-std-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cm-std-title-input {
  font-weight: 600;
}
.cm-std-code-input {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 600;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--chip, var(--active)) 65%, var(--text));
}
.cm-std-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cm-std-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}
.cm-std-section-label {
  flex: 1;
  margin-bottom: 0;
}
.cm-std-link {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--link);
  background: none;
  border: none;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.cm-std-link:hover {
  background: var(--active-light);
}
.cm-std-wording {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cm-std-wording p {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.45;
  color: var(--text);
}
.cm-std-wording .cm-std-wording-empty {
  color: var(--text-3);
}
.cm-std-source {
  font-size: var(--text-xs);
  color: var(--text-3);
}
.cm-std-wording-input {
  min-height: 80px;
  line-height: 1.45;
}
.cm-ican-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cm-ican-row {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--divider-subtle);
  background: var(--surface);
}
.cm-ican-row:last-child {
  border-bottom: none;
}
.cm-ican-row:focus-within {
  background: var(--active-light);
}
.cm-ican-row.dragging {
  opacity: 0.4;
}
.cm-ican-row.drop-target {
  box-shadow: inset 0 2px 0 var(--active);
}
.cm-ican-grip {
  width: 32px;
  flex-shrink: 0;
  text-align: center;
  color: var(--text-3);
  opacity: 0.5;
  cursor: grab;
  font-size: var(--text-md);
  user-select: none;
}
.cm-ican-grip:hover {
  opacity: 1;
}
.cm-ican-text {
  flex: 1;
  min-width: 0;
  font-family: var(--font-base);
  font-size: var(--text-base);
  line-height: 1.45;
  color: var(--text);
  border: none;
  background: none;
  resize: none;
  padding: 10px 0;
  field-sizing: content;
}
.cm-ican-text:focus,
.cm-ican-new:focus {
  outline: none;
}
.cm-ican-delete {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--text-3);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.cm-ican-delete:hover {
  color: var(--danger);
  background: var(--overlay-hover);
}
.cm-ican-plus {
  width: 32px;
  flex-shrink: 0;
  text-align: center;
  color: var(--link);
  font-weight: 700;
}
.cm-ican-new {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: none;
  background: none;
  padding: 0 12px 0 0;
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--text);
}
.cm-std-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider-subtle);
}
.cm-std-foot-label {
  margin-bottom: 0;
}
.cm-std-foot-select {
  width: auto;
  min-width: 140px;
  font-size: var(--text-base);
  padding: 5px 8px;
}
.cm-std-swatch-wrap {
  position: relative;
  width: 28px;
  height: 28px;
}

/* ── Where These Appear ── */
.cm-help-card {
  width: 760px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-base);
  color: var(--text);
  animation: slide-up var(--duration-normal) var(--ease-out);
}
.cm-help-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px 24px;
}
.cm-help-title {
  margin: 0;
  flex: 1;
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
}
.cm-help-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--text-3);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.cm-help-close:hover {
  background: var(--divider-subtle);
  color: var(--text);
}
.cm-help-body {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  border-top: 0.5px solid var(--divider-medium);
}
.cm-help-tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  background: var(--bg);
  border-right: 0.5px solid var(--divider-medium);
}
.cm-help-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  font-family: var(--font-base);
}
.cm-help-tab:hover {
  background: var(--overlay-hover);
}
.cm-help-tab[aria-selected='true'] {
  background: rgba(0, 122, 255, 0.1);
}
.cm-help-tab-name {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
}
.cm-help-tab[aria-selected='true'] .cm-help-tab-name {
  font-weight: 600;
  color: var(--link);
}
.cm-help-tab-where {
  font-size: var(--text-xs);
  color: var(--text-2);
}
.cm-help-panel {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cm-help-picture {
  height: 240px;
  box-sizing: border-box;
  border-radius: var(--radius);
  background: var(--bg);
  border: 0.5px solid var(--divider-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  pointer-events: none;
}
.cm-help-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cm-help-caption-name {
  font-size: var(--text-md);
  font-weight: 600;
}
.cm-help-caption-text {
  font-size: var(--text-base);
  line-height: 1.45;
  color: var(--text-2);
}
.cm-help-hl {
  outline: 2px solid var(--active);
  outline-offset: 2px;
  border-radius: 4px;
  background-color: var(--active-light);
}
.cm-help-gb {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--divider-medium);
  border-radius: var(--radius-sm);
  padding: 8px 12px 12px;
}
.cm-help-gb-row {
  display: flex;
  align-items: center;
}
.cm-help-gb-name {
  width: 96px;
  font-size: var(--text-base);
  color: var(--text);
}
.cm-help-gb-th {
  align-self: flex-end;
  padding-bottom: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-3);
}
.cm-help-gb .cm-help-col {
  flex: 0 0 64px;
  width: 64px;
}
.cm-help-cell {
  width: 64px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.cm-help-tip {
  position: absolute;
  left: 104px;
  top: 40px;
  max-width: 280px;
  font-size: var(--text-sm);
  line-height: 1.35;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 6px 10px;
  color: var(--text);
}
.cm-help-report {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
}
.cm-help-empty {
  margin: 0;
  font-size: var(--text-base);
  color: var(--text-2);
}
@media (max-width: 760px) {
  .cm-help-body {
    grid-template-columns: 1fr;
  }
  .cm-help-tabs {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 0.5px solid var(--divider-medium);
  }
  .cm-help-tab {
    width: auto;
    flex-shrink: 0;
  }
}

.cw-empty-msg {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-3);
  font-size: var(--text-sm);
}

/* ── Curriculum Re-link ── */
.cm-curric-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 122, 255, 0.04);
  border: 1px solid rgba(0, 122, 255, 0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.cm-curric-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--link);
  background: rgba(0, 122, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: var(--tracking-wide);
}
.cm-curric-name {
  font-size: var(--text-sm);
  color: var(--text);
  font-weight: 500;
  flex: 1;
}
.cm-curric-unlinked {
  font-size: var(--text-sm);
  color: var(--text-3);
  font-style: italic;
  padding: 8px 0;
}
.cm-relink-btn {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--active);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--link);
  cursor: pointer;
  transition:
    background-color 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.cm-relink-btn:hover {
  background: var(--active-fill);
  color: #fff;
}
.cm-relink-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.cm-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.cm-slider-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-2);
  min-width: 44px;
  text-align: right;
  font-weight: 600;
}
.cm-hint {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-top: 4px;
  line-height: 1.3;
}

.cm-subject-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--overlay-hover);
}
.cm-subject-row:last-of-type {
  border-bottom: none;
}
.cm-subject-color {
  flex-shrink: 0;
  position: relative;
  background: none !important;
  border: none;
  width: auto;
  height: auto;
}

.cm-delete-mini {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  font-size: var(--text-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.1s,
    color 0.1s;
}
.cm-delete-mini:hover {
  background: rgba(255, 59, 48, 0.1);
  color: var(--priority);
}

.cm-add-link {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--link);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  display: block;
}
.cm-add-link:hover {
  text-decoration: underline;
}

/* Sentence starters */
.cm-section-count {
  font-weight: 400;
  color: var(--text-3);
}
.cm-starter-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.cm-starter-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--divider-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.cm-starter-row.is-suggestion {
  border-style: dashed;
  background: transparent;
}
.cm-starter-main {
  flex: 1;
  min-width: 0;
}
.cm-starter-text {
  font-size: var(--text-md);
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.cm-starter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.cm-starter-pills .obs-card-dim .dim-dot,
.cm-starter-tag .dim-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cm-starter-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-base);
  font-size: var(--text-sm);
  cursor: pointer;
}
.cm-starter-btn:hover:not(:disabled) {
  background: var(--overlay-hover);
  color: var(--text);
}
.cm-starter-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.cm-starter-edit {
  color: var(--link);
  font-weight: 600;
}
.cm-starter-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--active);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 8px;
}
.cm-starter-editor-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-2);
}
.cm-starter-editor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cm-starter-select {
  flex: 1 1 140px;
  width: auto;
}
.cm-starter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}
.cm-starter-tags-head {
  flex-basis: 100%;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-3);
  margin-top: 4px;
}
.cm-starter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px 2px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-base);
  font-size: var(--text-xs);
  cursor: pointer;
}
.cm-starter-tag.is-on {
  border-color: var(--active);
  background: color-mix(in srgb, var(--active) 12%, transparent);
  color: var(--text);
  font-weight: 600;
}
.cm-starter-editor-actions,
.cm-starter-empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.cm-starter-error {
  margin-top: 8px;
  font-size: var(--text-sm);
  color: var(--priority);
}
@media (max-width: 600px) {
  .cm-starter-row {
    flex-direction: column;
  }
}
.cm-action-btn {
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  cursor: pointer;
  transition:
    background-color 0.12s,
    border-color 0.12s,
    color 0.12s,
    opacity 0.12s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.cm-action-btn:hover {
  border-color: var(--text-3);
  color: var(--text);
}

.cm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  flex: 1;
}
.cm-empty-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

/* The first screen with no classes: two cards side by side, under the
   heading, near the top of the page. */
.cm-empty.cm-first-run {
  justify-content: flex-start;
  padding: 112px 20px 40px;
}
.cm-first-run .cm-empty-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
}
.cm-empty-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.cm-empty-card {
  width: 360px;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.06);
  text-align: left;
}
.cm-empty-card-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
}
.cm-empty-card-text {
  flex: 1;
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.45;
  color: var(--text);
}
.cm-empty-card-btn {
  align-self: flex-start;
  margin-top: 12px;
  min-height: 36px;
  padding: 0 18px;
  font-size: var(--text-md);
  font-weight: 600;
}
.cm-empty-help {
  margin-top: 24px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--active);
  text-decoration: none;
}
.cm-empty-help:hover {
  filter: brightness(0.8);
}

.cm-color-swatch-selected {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 3.5px var(--border);
  transition: box-shadow 0.12s;
  position: relative;
}
.cm-color-swatch-selected:hover {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 3.5px var(--text-3);
}
.cm-color-palette {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: var(--z-fab);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  width: 186px;
  margin-top: 4px;
}
.cm-color-palette.open {
  display: flex;
}
.cm-color-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    border-color 0.1s,
    transform 0.1s;
}
.cm-color-dot:hover {
  border-color: var(--text);
  transform: scale(1.12);
}

/* Student roster in class manager */
.cm-student-list {
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.cm-student-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--overlay-hover);
  font-size: var(--text-base);
  transition: background 0.1s;
}
.cm-student-row:last-child {
  border-bottom: none;
}
.cm-student-row:hover {
  background: var(--overlay-hover);
}
.cm-student-name {
  flex: 1;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-iep-tag,
.cm-mod-tag {
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  padding: 0 3px;
  border-radius: 2px;
}
.cm-iep-tag {
  background: rgba(0, 122, 255, 0.12);
  color: var(--link);
}
.cm-mod-tag {
  background: rgba(255, 149, 0, 0.12);
  color: var(--late);
}
.cm-student-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
/* Students tab: toolbar, the roster as a full-width table */
.cm-roster-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.cm-roster-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}
/* Add Student: the shared primary size, one width whatever the font. */
.cm-roster-bar .tb-action-btn.cm-roster-add {
  width: 112px;
  padding: 0;
  justify-content: center;
}
.cm-roster-section {
  padding: 0;
  overflow: hidden;
}
/* Students tab roster: every field edited in place. The table scrolls
   sideways under a sticky header with Last and First Name pinned, rows
   alternate, and the row being pointed at or edited turns light blue. */
.cm-detail-inner.cm-tabbed.cm-tabbed-wide,
.cm-tabbed-wide .cm-tab-panel {
  max-width: none;
}
/* Search and the roster's notes take the room left beside the buttons, but
   never less than Search's own least width: where that does not fit (an iPad
   mini upright, a wider font) the buttons wrap to a line of their own rather
   than the field running under Import Roster. */
.cm-rs-tools {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.cm-rs-tools ~ .cm-roster-buttons {
  flex-shrink: 0;
}
.cm-rs-search {
  --atb-search-min: 240px;
  --atb-search-max: 240px;
  flex: 0 0 240px;
}
.cm-rs-summary {
  margin: 0;
}
.cm-rs-summary:empty {
  display: none;
}
.cm-rs-section {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.cm-rs-scroll {
  overflow-x: auto;
  max-height: none;
  border: 0;
  margin: 0;
}
/* The roster scrolls sideways at most widths: its scrollbar always shows
   (not only while scrolling), and the right edge fades while columns are
   hidden past it. */
.cm-rs-scroll::-webkit-scrollbar {
  height: 12px;
}
.cm-rs-scroll::-webkit-scrollbar-track {
  background: var(--bg);
}
.cm-rs-scroll::-webkit-scrollbar-thumb {
  background: var(--text-3);
  border: 3px solid var(--bg);
  border-radius: 6px;
}
.cm-rs-section::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 12px;
  width: 48px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--surface));
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 3;
}
.cm-rs-section.cm-rs-more-right::after {
  opacity: 1;
}
.cm-rs-grid {
  display: grid;
  grid-template-columns: 150px 140px 110px 110px 120px 140px 230px 220px 220px 240px 48px 40px;
  column-gap: 12px;
  align-items: center;
  padding: 0 12px;
  min-width: max-content;
}
.cm-rs-head {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--divider-subtle);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
}
.cm-rs-row {
  height: 44px;
  background: var(--surface);
  border-bottom: 1px solid var(--divider-subtle);
}
.cm-rs-row[hidden] {
  display: none;
}
.cm-rs-stick1,
.cm-rs-stick2 {
  position: sticky;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 100%;
  background: inherit;
}
.cm-rs-stick1 {
  left: 0;
  margin-left: -12px;
  padding-left: 12px;
}
.cm-rs-stick2 {
  left: 150px;
  box-shadow: 8px 0 8px -8px rgba(0, 0, 0, 0.12);
}
.cm-rs-alt {
  background: var(--bg);
}
.cm-rs-row:hover,
.cm-rs-row:focus-within {
  background: var(--focus-banner-bg);
}
.cm-rs-sort {
  font: inherit;
  font-weight: 600;
  color: var(--text-2);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.cm-rs-sort[aria-pressed='true'] {
  color: var(--text);
}
.cm-rs-in {
  font: inherit;
  font-size: var(--text-sm);
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 7px;
  margin: 0 -8px;
  width: calc(100% + 16px);
  min-width: 0;
  box-sizing: border-box;
  text-overflow: ellipsis;
}
.cm-rs-in::placeholder {
  color: var(--link);
  font-weight: 600;
}
.cm-rs-row:hover .cm-rs-in {
  border-color: var(--divider-medium);
}
.cm-rs-in:hover {
  border-color: var(--border);
  background: var(--surface);
}
.cm-rs-in:focus {
  outline: none;
  border-color: var(--active);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--active-light);
}
.cm-rs-in.cm-rs-bad {
  border-color: var(--score-1);
  box-shadow: 0 0 0 3px var(--priority-light);
}
.cm-rs-strong {
  font-weight: 600;
}
.cm-rs-desig {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cm-rs-chip {
  font: inherit;
  font-size: var(--text-xs);
  white-space: nowrap;
  border: 0;
  border-radius: 4px;
  padding: 2px 6px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.cm-rs-desig-wrap {
  position: relative;
}
.cm-rs-add {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  border: 1px dashed var(--border-2);
  background: transparent;
  color: var(--link);
  font-weight: 700;
  cursor: pointer;
}
.cm-rs-picker {
  position: absolute;
  top: 28px;
  left: 0;
  z-index: var(--z-fab);
  display: flex;
  flex-direction: column;
  min-width: 240px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  background: var(--surface);
  border: 0.5px solid var(--divider-medium);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.cm-rs-pick {
  font: inherit;
  font-size: var(--text-sm);
  text-align: left;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.cm-rs-pick:hover,
.cm-rs-pick:focus {
  background: var(--active-light);
  outline: none;
}
.cm-rs-check {
  display: flex;
  justify-content: center;
}
.cm-rs-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.cm-rs-menu {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.cm-rs-menu:hover {
  background: var(--surface-2);
}
.cm-rs-add:focus-visible,
.cm-rs-menu:focus-visible,
.cm-rs-chip:focus-visible,
.cm-rs-check input:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 1px;
}
.cm-rs-menu-wrap {
  position: relative;
}
.cm-rs-menu-wrap .cm-std-menu {
  right: 0;
  left: auto;
}
/* Import Roster (board: Import Roster canvas, Nov 11 2026) */
.cm-import-empty {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
}
.cm-import-drop {
  border: 2px dashed var(--border-2, var(--border));
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--font-base);
  transition:
    border-color 0.12s,
    background 0.12s;
}
.cm-import-drop.is-over {
  border-color: var(--active);
  background: var(--active-light);
}
.cm-import-drop-big {
  min-height: 320px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.cm-import-file-icon {
  width: 44px;
  height: 44px;
  flex: none;
  color: var(--link);
}
.cm-import-drop-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
}
.cm-import-drop-text {
  margin: 0;
  max-width: 440px;
  font-size: var(--text-base);
  color: var(--text);
  line-height: 1.45;
}
.cm-import-drop-big .btn {
  margin-top: 4px;
}
.cm-import-drop-big .cm-hint {
  margin: 4px 0 0;
  max-width: 420px;
}
.cm-import-side {
  display: flex;
  flex-direction: column;
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--text);
}
.cm-import-side-part {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--divider-subtle);
}
.cm-import-side-part:first-child {
  padding-top: 4px;
  border-top: none;
}
.cm-import-side-part h3 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 700;
}
.cm-import-side-part p {
  margin: 0;
  line-height: 1.45;
}
.cm-import-side-part a {
  color: var(--link);
  font-weight: 600;
}
.cm-import-side-part a.cm-action-btn {
  display: inline-flex;
  color: var(--text);
  text-decoration: none;
}
.cm-import-side-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.cm-import-steps {
  margin: 0;
  padding-left: 1.4em;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.4;
}
.cm-import-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
}
.cm-import-strip .cm-import-file-icon {
  width: 30px;
  height: 30px;
}
.cm-import-strip-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-base);
  color: var(--text);
}
.cm-import-strip-text a {
  color: var(--link);
  font-weight: 600;
}
.cm-import-link {
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.cm-import-link:hover {
  text-decoration: underline;
}
.cm-import-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
  font-family: var(--font-base);
}
.cm-import-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cm-import-card-head h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}
.cm-import-card-mark {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--notice-bg);
  color: var(--notice-text);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-import-card-text {
  margin: 0;
  font-size: var(--text-base);
  color: var(--text);
}
.cm-import-card .cm-hint {
  margin: 0;
}
.cm-import-card .cm-import-buttons {
  margin-top: 6px;
}

.cm-import-review {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-base);
}
.cm-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.cm-import-head .cm-grade-title {
  margin: 0;
}
.cm-import-head .cm-grade-title:focus {
  outline: none;
}
.cm-import-sub {
  margin-top: 4px;
  font-size: var(--text-base);
  color: var(--text-2);
}
.cm-import-sub strong {
  color: var(--text);
}
.cm-import-file-line {
  display: block;
  margin-top: 2px;
  font-size: var(--text-sm);
}
.cm-import-band {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--ok-bg);
  color: var(--ok-text);
  font-size: var(--text-base);
}
.cm-import-band > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cm-import-band .cm-import-link {
  color: inherit;
  text-decoration: underline;
}
.cm-import-band-mark {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok-text);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-import-band .cm-import-band-mark {
  width: auto;
  height: auto;
  background: none;
}
.cm-import-needs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cm-import-need {
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--bg);
  color: var(--text-2);
  font-size: var(--text-sm);
}
.cm-import-need strong {
  color: var(--text);
}
.cm-import-need.is-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}
.cm-import-need.is-ok strong {
  color: inherit;
}
.cm-import-need.is-missing {
  background: var(--notice-bg);
  color: var(--notice-text);
}
.cm-import-need.is-missing strong {
  color: inherit;
}
.cm-import-cols-scroll {
  border: 1px solid var(--divider-subtle);
  border-radius: 10px;
  overflow-x: auto;
}
.cm-import-cols {
  display: grid;
}
.cm-import-col-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 10px 12px;
  background: var(--bg);
  border-right: 1px solid var(--divider-subtle);
  border-bottom: 1px solid var(--divider-subtle);
  min-width: 0;
}
.cm-import-col-head.is-out {
  background: var(--bg-secondary, var(--bg));
}
.cm-import-col-name {
  font-size: var(--text-sm);
  color: var(--text);
  overflow-wrap: anywhere;
}
.cm-import-field-wrap {
  position: relative;
  align-self: stretch;
}
.cm-import-field-btn {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-2, var(--border));
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
}
.cm-import-col-head.is-out .cm-import-field-btn {
  color: var(--text-2);
  font-weight: 500;
}
.cm-import-field-btn[aria-expanded='true'] {
  border-color: var(--active);
  box-shadow: 0 0 0 1px var(--active);
}
.cm-import-field-menu {
  left: 0;
  right: auto;
  width: 360px;
  max-height: 420px;
  overflow-y: auto;
}
.cm-import-menu-group {
  padding: 8px 10px 2px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-2);
}
.cm-import-field-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cm-import-field-item.is-on {
  background: var(--active-light);
  font-weight: 600;
}
.cm-import-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.cm-import-item-used {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-2);
}
.cm-import-item-guess {
  font-size: var(--text-sm);
  color: var(--notice-text);
}
.cm-import-item-hint {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-2);
}
.cm-import-tag {
  padding: 1px 8px;
  border-radius: 10px;
  font-size: var(--text-xs);
  font-weight: 600;
}
.cm-import-tag.is-read {
  background: var(--ok-bg);
  color: var(--ok-text);
}
.cm-import-tag.is-guess {
  border: 1px dashed var(--notice-text);
  background: var(--notice-bg);
  color: var(--notice-text);
}
.cm-import-col-note {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.35;
}
.cm-import-col-issue {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--notice-text);
}
.cm-import-ask {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--notice-text);
  font-weight: 600;
}
.cm-import-ask-btns {
  display: flex;
  gap: 6px;
}
.cm-import-ask .cm-action-btn {
  padding: 3px 12px;
}
.cm-import-suggest {
  padding: 4px 10px;
  border: none;
  border-radius: 13px;
  background: var(--active-light);
  color: var(--link);
  font-family: var(--font-base);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}
.cm-import-cell {
  padding: 8px 10px;
  border-bottom: 1px solid var(--divider-subtle);
  font-size: var(--text-sm);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-import-cell.is-out {
  background: var(--bg);
  color: var(--text-2);
}
.cm-import-more {
  padding: 8px 10px;
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cm-import-problems-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.cm-import-problems-head h3 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
}
.cm-import-problems {
  border: 1px solid var(--notice-edge);
  border-radius: 10px;
  overflow: hidden;
}
.cm-import-problem {
  display: grid;
  grid-template-columns: 72px minmax(120px, 170px) minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: var(--notice-bg);
  border-top: 1px solid var(--notice-edge);
  font-size: var(--text-base);
  color: var(--text);
}
.cm-import-problem:first-child {
  border-top: none;
}
.cm-import-problem .cm-hint {
  display: inline;
}
.cm-import-problem-name.is-missing {
  color: var(--notice-text);
}
.cm-import-rownum {
  justify-self: start;
  padding: 1px 10px;
  border: 1px solid var(--notice-edge);
  border-radius: 11px;
  background: var(--surface);
  color: var(--notice-text);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}
.cm-import-fix {
  grid-column: 4;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-xs);
  color: var(--text-2);
}
.cm-import-fix .cm-input {
  padding: 5px 10px;
  font-size: var(--text-base);
}
.cm-import-list {
  border-top: 1px solid var(--divider-subtle);
}
.cm-import-list-row {
  display: grid;
  grid-template-columns: var(--cm-import-cols);
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  border-bottom: 1px solid var(--divider-subtle);
  font-size: var(--text-base);
  color: var(--text);
  cursor: pointer;
}
.cm-import-list-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 10px;
}
.cm-import-list-row.is-head {
  min-height: 36px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-2);
  cursor: default;
}
.cm-import-list-row .is-name {
  font-weight: 600;
}
/* Pronouns From Gender: the heading may take two lines; each choice fits its row. */
.cm-import-list-row.is-head > span {
  white-space: normal;
  line-height: 1.2;
  padding-block: 6px;
}
.cm-import-list-row .cm-import-pron {
  width: 100%;
  max-width: 9.5rem;
  padding: 3px 8px;
  font-size: var(--text-base);
}
.cm-import-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.cm-import-groups > div {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cm-import-changes {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-sm);
}
/* The Done panel, above the roster after an import */
.cm-import-done {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-family: var(--font-base);
}
.cm-import-done-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cm-import-done-body h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}
.cm-import-done-body h2:focus {
  outline: none;
}
.cm-import-done-body p {
  margin: 0;
  font-size: var(--text-base);
  color: var(--text);
}
.cm-import-next-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.cm-import-next {
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--active-light);
  color: var(--link);
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
}
.cm-import-done-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cm-import-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-2);
  font-size: 1rem;
  cursor: pointer;
}
.cm-rs-new {
  background: linear-gradient(var(--active-light), var(--active-light)), var(--surface);
}
.cm-rs-new-tag {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 7px;
  border-radius: 9px;
  background: var(--active-light);
  color: var(--link);
  font-size: var(--text-xs);
  font-weight: 700;
  pointer-events: none;
}
@media (max-width: 900px) {
  .cm-import-empty,
  .cm-import-groups {
    grid-template-columns: minmax(0, 1fr);
  }
  .cm-import-strip {
    flex-wrap: wrap;
  }
  .cm-import-problem {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .cm-import-problem > span:nth-of-type(2),
  .cm-import-fix {
    grid-column: 1 / -1;
  }
}

/* Import review groups (also Re-link's review) */
.cm-import-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cm-import-group-head,
.cm-import-same {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-base);
}
.cm-import-same {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.cm-import-group h3,
.cm-import-same h3 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
}
.cm-import-group-head span,
.cm-import-same span {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cm-import-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--divider-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: var(--font-base);
  font-size: var(--text-base);
  cursor: pointer;
}
.cm-import-old {
  color: var(--text-2);
}
.cm-import-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--divider-subtle);
  padding-top: 12px;
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--text-2);
}
.cm-import-foot strong {
  color: var(--text);
}
.cm-import-buttons {
  display: flex;
  gap: 8px;
}
/* Keep a copy first, in the permanent-delete dialog */
.cm-keep-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 12px 0 4px;
}
.cm-keep-copy .cm-action-btn {
  white-space: nowrap;
  flex-shrink: 0;
}
.cm-keep-copy-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cm-keep-copy-text strong {
  font-size: var(--text-base);
  color: var(--text);
}
/* Withdrawn students, under the roster */
.cm-withdrawn {
  margin-top: 0;
}
.cm-withdrawn-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-2);
}
.cm-withdrawn-help {
  margin: 2px 0 8px;
  font-size: var(--text-sm);
  color: var(--text-3);
}
/* Name and date on the first line, the two actions under them: the
   roster column is too narrow for all four on one line. */
.cm-withdrawn-row {
  flex-wrap: wrap;
  row-gap: 0;
}
.cm-withdrawn-row .cm-student-name {
  flex: 1 1 auto;
  color: var(--text-2);
}
.cm-withdrawn-when {
  color: var(--text-3);
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.cm-withdrawn-row .cm-student-actions {
  flex-basis: 100%;
  gap: 16px;
}
.cm-withdrawn-btn {
  padding: 2px 0;
}
.cm-withdrawn-delete {
  color: var(--danger);
}
.cm-add-student-form {
  border: 1px solid var(--active);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 8px;
  background: rgba(0, 122, 255, 0.02);
}
.cm-student-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
@media (max-width: 600px) {
  .cm-student-form {
    grid-template-columns: 1fr;
  }
}
.cm-student-form .cm-field {
  margin-bottom: 0;
}
.cm-student-form .cm-input,
.cm-student-form .cm-pronoun-select {
  font-size: var(--text-base);
  padding: 6px 10px;
}
.desig-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px;
}
.desig-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  transition: background 0.1s;
}
.desig-check-item:hover {
  background: var(--overlay-hover);
}
.cm-desig-check {
  margin: 0;
  flex-shrink: 0;
}
.desig-check-code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--link);
  font-size: var(--text-sm);
}
.desig-check-name {
  font-family: var(--font-base);
  color: var(--text-2);
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* New class empty curriculum hint */
.cm-curriculum-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-3);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
}
.cm-curriculum-empty-text {
  font-size: var(--text-base);
  line-height: 1.4;
}

/* Block picker: None, A–E, X chips, then an "Other" label box. */
.cm-block-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cm-block-picker .cm-block-other {
  flex: 1 1 160px;
  min-width: 140px;
}
.cm-dup-card .cm-field {
  margin: 12px 0 4px;
  text-align: left;
}

/* Reporting terms: "This class runs" Full year / Semester 1 / Semester 2. */
.cm-term-span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.cm-term-span-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}
/* Competencies tab: the list and its toolbar beside the BC Curriculum link
   and the subjects */
.cm-comp-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.cm-comp-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cm-comp-selecting .cm-comp-main {
  max-width: 820px;
}
.cm-comp-side {
  flex: 0 0 340px;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cm-comp-side .cm-section {
  margin: 0;
}
.cm-comp-side-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cm-comp-side-card > .cm-add-link {
  align-self: flex-start;
}
.cm-comp-side-card .cm-relink-btn {
  align-self: flex-start;
  border-color: var(--border);
  color: var(--text);
  font-weight: 500;
}
.cm-comp-side-card .cm-relink-btn:hover {
  background: var(--overlay-hover);
  color: var(--text);
}
.cm-comp-list {
  margin: 0;
  padding: 14px 16px;
}
/* Folders sit in the list's card, not in boxes of their own */
.cm-comp-list .mod-folder.mod-folder {
  border: none;
  background: none;
  margin-bottom: 8px;
}
.cm-comp-list .mod-folder:last-child {
  margin-bottom: 0;
}
.cm-comp-list .mod-folder-header {
  padding: 4px 4px 8px;
  border-radius: 0;
}
.cm-comp-list .mod-folder-body {
  padding-top: 8px;
}
.cm-comp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cm-comp-toolbar > .cm-hint {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.cm-comp-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}
.cm-comp-buttons .cm-action-btn,
.cm-comp-buttons .btn {
  min-height: 36px;
}
.cm-comp-io-menu {
  width: 340px;
}
.cm-comp-io-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
}
.cm-comp-io-name {
  font-weight: 600;
}
.cm-comp-io-desc {
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--text-2);
  white-space: normal;
}
/* Select mode */
.cm-comp-selectbar {
  justify-content: flex-start;
  gap: 12px;
  background: #1d1d1f;
  color: #fff;
  border: 1px solid #3a3a3c;
  border-radius: var(--radius);
  padding: 10px 14px;
}
.cm-comp-selected {
  font-family: var(--font-base);
  font-size: var(--text-md);
  font-weight: 600;
}
.cm-comp-selectbar > .cm-add-link {
  color: #9ecbff;
  margin: 0;
  padding: 4px 6px;
}
.cm-comp-selectbar .cm-comp-buttons {
  margin-left: auto;
}
.cm-comp-selectbar .cm-action-btn {
  background: none;
  color: #fff;
  border-color: #636366;
}
.cm-comp-selectbar .cm-action-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.cm-comp-selectbar .cm-comp-remove:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  font-weight: 600;
}
.cm-comp-selectbar .cm-std-menu {
  color: var(--text);
}
.cm-comp-select-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--divider-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px 14px;
  margin-bottom: 8px;
  font-family: var(--font-base);
  cursor: pointer;
}
.cm-comp-select-row.selected {
  border: 1.5px solid var(--active);
  background: var(--active-light);
  padding: 11.5px 13.5px;
}
.cm-comp-select-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.cm-comp-select-row .cm-std-label {
  flex: 1;
}
/* Where a competency's I Can statements print */
/* A competency's Levels (Nov 2 mockup, batch 2): read-only descriptors and
   next steps, or the four fields of Write Your Own. */
.cm-std-levels {
  margin-top: 16px;
}
.cm-levels-list {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.cm-level-row,
.cm-levels-edit-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  font-family: var(--font-base);
  font-size: var(--text-sm);
}
.cm-levels-word {
  font-weight: 600;
  color: var(--text);
}
.cm-level-desc {
  line-height: 1.4;
  color: var(--text);
}
.cm-level-next {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
}
.cm-levels-edit-row {
  align-items: start;
}
.cm-levels-input {
  width: 100%;
  min-height: 52px;
}
.cm-levels-hint {
  margin: 4px 0 0;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cm-levels-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.cm-std-shown {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cm-std-shown-label {
  font-weight: 600;
  color: var(--text);
}
.cm-std-shown-chip {
  background: var(--active-light);
  color: var(--link);
  border-radius: 10px;
  padding: 2px 9px;
}
.cm-std-shown .cm-add-link {
  margin: 0;
  font-weight: 600;
}
/* Re-link and CSV import review */
.cm-comp-review {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cm-back-link {
  align-self: flex-start;
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-base);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
}
.cm-cr-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cm-cr-sub {
  font-family: var(--font-base);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--text-2);
}
.cm-comp-review .cm-section {
  margin: 0;
}
.cm-cr-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cm-cr-row,
.cm-cr-changed {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--divider-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-base);
}
label.cm-cr-row {
  cursor: pointer;
}
.cm-cr-row > input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 0;
}
.cm-cr-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.cm-cr-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}
.cm-cr-note {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cm-cr-verb {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}
.cm-cr-changed {
  flex-direction: column;
  align-items: stretch;
  padding: 14px;
}
.cm-cr-changed-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cm-cr-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cm-cr-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  cursor: pointer;
}
.cm-cr-option.on {
  border: 2px solid var(--active);
  background: var(--active-light);
  padding: 12px 14px;
}
.cm-cr-option input {
  margin-top: 3px;
}
.cm-cr-pick {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
}
.cm-cr-segs {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--overlay-hover);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
}
.cm-cr-seg {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  color: var(--text-2);
  cursor: pointer;
}
.cm-cr-seg.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.cm-cr-seg input {
  margin: 0;
}
.cm-cr-same-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-base);
}
.cm-cr-same-head h3 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
}
.cm-cr-same-head h3 span {
  font-weight: 500;
  color: var(--text-3);
}
.cm-cr-same-head .cm-add-link {
  margin: 0;
  font-weight: 600;
}
.cm-cr-same-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.cm-cr-same-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--text);
}
.cm-comp-review .cm-import-foot {
  border-top-color: var(--border);
  padding-top: 16px;
}
.cm-comp-review .cm-import-foot > div:first-child {
  flex: 1;
  min-width: 0;
}
.cm-comp-review .cm-import-buttons {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .cm-comp-layout {
    flex-direction: column;
  }
  .cm-comp-side {
    width: 100%;
    flex-basis: auto;
  }
}
/* My Sentence Starters (page-starters.js) */
.ms-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: var(--font-base);
}
.ms-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ms-title {
  margin: 0;
  font-size: var(--text-2xl, 28px);
  font-weight: 700;
  color: var(--text);
}
.ms-sub {
  margin-top: 6px;
  font-size: var(--text-md);
  color: var(--text-2);
}
.ms-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--active-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
}
.ms-info-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--link);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.ms-table {
  background: var(--surface);
  border: 1px solid var(--divider-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}
.ms-table.ms-empty {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ms-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 190px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--divider-subtle);
}
.ms-row-head {
  border-top: none;
  background: var(--bg);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-2);
  padding: 10px 18px;
}
.ms-row-text {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text);
  overflow-wrap: anywhere;
}
.ms-row-uses {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: var(--text-md);
  color: var(--text);
}
.ms-row-head .ms-row-uses {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.ms-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}
.ms-table .ms-editor {
  margin: 10px 14px;
}
.ms-foot {
  font-size: var(--text-sm);
  color: var(--text-2);
}
@media (max-width: 760px) {
  .ms-page {
    padding: 20px 16px 32px;
  }
  .ms-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ms-row-actions {
    grid-column: 1 / -1;
  }
}
/* Grading tab: Count Only the Most Recent */
.cm-recent-limit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--divider-subtle);
  padding-top: 12px;
  margin-top: 12px;
}
.cm-recent-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cm-recent-text .cm-label {
  margin: 0;
}
.cm-recent-select {
  width: auto;
  min-width: 130px;
  flex-shrink: 0;
}
.cm-recent-limit.off .cm-recent-select {
  opacity: 0.5;
}
/* Grading tab: Folders Count as One. Curriculum: each folder's Counts as
   One switch on its header, and the line saying why it's gone. */
.cm-folder-count-row .gpd-switch {
  flex-shrink: 0;
}
.cm-folder-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
  cursor: pointer;
}
.cm-folder-count-text {
  font-size: var(--text-sm);
  color: var(--text-2);
  white-space: nowrap;
}
.cm-folder-count-off {
  margin: 0 0 12px;
}
/* Points and Proficiency as one 0–100% ruler (_cmRenderPointsScale):
   Counts As markers above, Points to Proficiency bands and their handles
   below. Under 420px wide the ruler scrolls sideways in its card. Nothing
   on it animates. */
.cm-pts-scale {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  gap: 8px;
  border-top: 1px solid var(--divider-subtle);
  padding-top: 12px;
  margin-top: 12px;
}
.cm-pts-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  /* Room for a marker at 0% or 100% and for the picked ring. */
  padding: 6px 18px 2px;
}
.cm-pts-ruler {
  --cm-pts-top: 42px;
  position: relative;
  min-width: 420px;
  height: calc(var(--cm-pts-top) + 82px);
}
.cm-pts-ruler.is-two-rows {
  --cm-pts-top: 66px;
}
.cm-pts-marker {
  --chip-bg: var(--score-0);
  --chip-fg: #fff;
  position: absolute;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}
.cm-pts-marker.is-low {
  top: 24px;
}
.cm-pts-marker.is-on {
  z-index: 3;
}
/* The text passes 4.5:1 on its level in each theme, as the dashboard
   chips do (.dash-card-seg): white on Emerging, Proficient and Extending
   in light, dark on Developing's amber; dark on every level in dark. */
.cm-pts-marker.lv-1 {
  --chip-bg: var(--score-1);
}
.cm-pts-marker.lv-2 {
  --chip-bg: var(--score-2);
  --chip-fg: #2b1a00;
}
.cm-pts-marker.lv-3 {
  --chip-bg: var(--score-3);
}
.cm-pts-marker.lv-4 {
  --chip-bg: var(--score-4);
}
@media (prefers-color-scheme: dark) {
  .cm-pts-marker {
    --chip-fg: #1d1d1f;
  }
}
.cm-pts-pill {
  min-width: 28px;
  height: 20px;
  padding: 0 6px;
  border: 0;
  border-radius: 10px;
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
  cursor: grab;
  touch-action: none;
}
.cm-pts-stem {
  width: 1.5px;
  height: calc(var(--cm-pts-top) - 20px);
  background: var(--chip-bg);
  opacity: 0.6;
}
.cm-pts-marker.is-low .cm-pts-stem {
  height: calc(var(--cm-pts-top) - 44px);
}
.cm-pts-bands {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--cm-pts-top);
  height: 34px;
  display: flex;
  border-radius: 6px;
  overflow: hidden;
}
.cm-pts-band {
  flex: none;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 34px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-pts-band.lv-1 {
  background: var(--score-1-bg);
  color: var(--score-1-text);
}
.cm-pts-band.lv-2 {
  background: var(--score-2-bg);
  color: var(--score-2-text);
}
.cm-pts-band.lv-3 {
  background: var(--score-3-bg);
  color: var(--score-3-text);
}
.cm-pts-band.lv-4 {
  background: var(--score-4-bg);
  color: var(--score-4-text);
}
.cm-pts-edge {
  position: absolute;
  top: calc(var(--cm-pts-top) - 4px);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}
.cm-pts-edge-line {
  width: 3px;
  height: 42px;
  border-radius: 2px;
  background: var(--text-2);
}
.cm-pts-edge.is-on .cm-pts-edge-line {
  background: var(--text);
}
.cm-pts-handle {
  height: 20px;
  margin-top: 2px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  cursor: grab;
  touch-action: none;
}
.cm-pts-pill.is-on {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--text);
}
.cm-pts-handle.is-on {
  box-shadow: 0 0 0 2px var(--text);
}
.cm-pts-pill:focus-visible,
.cm-pts-handle:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 3px;
}
.cm-pts-ticks {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--cm-pts-top) + 66px);
  height: 14px;
  color: var(--text-2);
  font-size: 11px;
  line-height: 14px;
}
.cm-pts-ticks span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.cm-pts-edit {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  font-size: var(--text-sm);
}
.cm-pts-edit-label {
  color: var(--text-2);
}
.cm-pts-edit-name {
  color: var(--text);
  font-weight: 600;
}
/* Wide enough for "100.0" beside the number arrows. */
.cm-pts-input {
  width: 80px;
  text-align: center;
}
.cm-pts-unit {
  color: var(--text-2);
}
.cm-pts-error {
  padding: 0 18px;
  color: var(--score-1-text);
  font-size: var(--text-sm);
}
/* Each preset with the sentence that says what it does beside it. */
.cm-pts-actions {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 10px 14px;
}
.cm-pts-preset-text {
  margin-top: 0;
  padding-top: 6px;
  max-width: 62ch;
}
@media (max-width: 560px) {
  .cm-pts-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .cm-pts-actions .cm-action-btn {
    justify-self: start;
  }
  .cm-pts-preset-text {
    padding: 0 0 8px;
  }
}

/* ── Student Page tab (teacher/cm-student-page.js; board "Teacher: Class
   Settings, Student Page") ── */
/* One card of rows, a rule above each: a title and a line saying what it
   decides, the control, then any line about what follows from it. */
.sp-card {
  display: flex;
  flex-direction: column;
}
.sp-card > .cm-grade-title {
  margin-bottom: 14px;
}
.sp-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 0;
  border-top: 0.5px solid var(--divider-strong);
}
.sp-row:last-child {
  padding-bottom: 0;
}
.sp-row-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sp-row-title {
  font-family: var(--font-base);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}
.sp-row .cm-hint {
  margin: 0;
}
/* The build switch's card, shown only at the build address: Class Settings'
   own switch row, with no rule above it. */
.sp-build .sp-build-row {
  margin: 0;
  padding: 0;
  border: 0;
}

/* ── Student Cards (teacher/student-cards.js): the list under Return
   Grades. No code is ever shown in it. ── */
.sc-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sc-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.sc-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sc-titles .cm-grade-title,
.sc-titles .cm-hint,
.sc-note {
  margin: 0;
}
.sc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Print Sticker Sheets, on a row of its own under the cards' buttons. */
.sc-stickers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 2px;
}
.sc-stickers .cm-hint {
  margin: 0;
}
.sc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-base);
  font-size: var(--text-sm);
  color: var(--text);
}
.sc-table th,
.sc-table td {
  padding: 8px 12px 8px 0;
  text-align: left;
  font-weight: 400;
  border-top: 0.5px solid var(--divider-strong);
}
.sc-table thead th {
  border-top: 0;
  padding-top: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-3);
}
.sc-table .sc-name {
  font-weight: 600;
}
.sc-none .sc-which {
  color: var(--text-3);
}
.sc-status {
  color: var(--text-2);
}
.sc-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* A row's own buttons (Unlock, Print New Card), at the end of the row. */
.sc-table .sc-do {
  padding-right: 0;
  text-align: right;
  white-space: nowrap;
}
.sc-do .sc-row-btn {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 10px;
  font-size: var(--text-xs);
}
.sc-do .sc-row-btn:first-child {
  margin-left: 0;
}
/* Cards Work Until: a day, and the way back to the default. */
.sc-until {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sc-until .cm-hint {
  margin: 0;
}
.sc-until-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sc-until-row .sc-until-date {
  width: auto;
  font-size: var(--text-sm);
  padding: 5px 8px;
}
.sc-until-row .sc-row-btn {
  margin-left: 0;
}
/* The filters: All, Not Printed, Locked, Never Opened, each with its count. */
.sc-filters {
  align-self: flex-start;
  flex-wrap: wrap;
}
.sc-count {
  margin-left: 4px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.sc-empty {
  margin: 0;
}
.sc-actions .cm-action-btn:disabled,
.sc-do .sc-row-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.sc-lock {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--score-1-text);
  background: var(--score-1-bg);
}

/* ── Students (teacher/student-page-students.js): the Student Cards list
   with what each student has done, their Overall Grade, boxes to tick, the
   bar for ticked rows and the side panel a name opens. ── */
.sps-table-wrap {
  overflow-x: auto;
}
.sc-table .sps-pick {
  width: 28px;
  padding-right: 6px;
}
.sps-pick-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sps-check {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--active);
  cursor: pointer;
}
.sps-name {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.sps-name:hover {
  color: var(--link);
  text-decoration: underline;
}
.sps-name:focus-visible,
.sps-except:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 2px;
  border-radius: 2px;
}
.sc-table .sps-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sc-table .sps-muted {
  color: var(--text-3);
}
.sc-table tr.sps-picked {
  background: var(--active-light);
}
.sc-table tr.sps-open-row {
  box-shadow: inset 3px 0 0 var(--active);
}
/* Overall Grade: a word as well as a colour for a student's own choice. */
.sps-grade {
  display: inline-flex;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}
.sps-grade-hidden {
  background: var(--score-2-bg);
  color: var(--score-2-text);
}
.sps-grade-paused {
  background: var(--score-1-bg);
  color: var(--score-1-text);
}
.sps-grade-shown {
  background: var(--active-light);
  color: var(--link);
}
.sps-grade-class {
  padding-left: 0;
  font-weight: 400;
  color: var(--text-3);
}
.sc-chip-info {
  background: var(--active-light);
  color: var(--link);
}
/* Show Overall Grade's exceptions, under its hint. */
.sp-row .sps-except {
  align-self: flex-start;
  margin-top: 2px;
  font-size: var(--text-sm);
  text-align: left;
}
/* The bar the ticked rows get: FullVision's selection colours (the Assignments
   list's bar), white buttons in named groups. */
.sps-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 12px;
  border: 1px solid var(--divider-medium);
  border-radius: var(--radius);
  background: var(--active-light);
  color: var(--text);
  font-family: var(--font-base);
  font-size: var(--text-sm);
}
.sps-bar-count {
  font-weight: 700;
  color: var(--active);
}
.sps-bar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.sps-bar-label {
  font-weight: 600;
  color: var(--text-2);
  margin-right: 2px;
}
.sps-bar .sps-bar-btn {
  background: var(--surface);
}
.sps-bar .sps-bar-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.sps-bar .sps-bar-clear {
  margin-left: auto;
  border-color: transparent;
  background: transparent;
  color: var(--link);
}
/* Show on Screen: the card just made, large, over everything, for a student
   beside the teacher to scan or type (teacher/student-cards.js). The card is
   the printed one (teacher/qr-slips.css), drawn at screen size. */
.sc-show-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
}
.sc-show {
  width: min(620px, 100%);
  max-height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-base);
}
.sc-show-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.sc-show-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.sc-show-count {
  font-size: var(--text-sm);
  color: var(--text-2);
}
/* teacher/qr-slips.css is the printed sheet's (media print), so the card on
   screen carries its own layout, the printed card's at screen size. */
.sc-show-card.qs-slip {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: #000;
  line-height: 1.25;
}
.sc-show-card .qs-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #000;
}
.sc-show-card .qs-who {
  min-width: 0;
}
.sc-show-card .qs-name {
  font-weight: 700;
}
.sc-show-card .qs-class,
.sc-show-card .qs-dates {
  color: #333;
}
.sc-show-card .qs-what {
  flex-shrink: 0;
  text-align: right;
}
.sc-show-card .qs-title {
  font-weight: 700;
}
.sc-show-card .qs-body {
  display: flex;
  align-items: center;
}
.sc-show-card .qs-qr {
  flex-shrink: 0;
}
.sc-show-card .qs-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.sc-show-card .qs-how {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sc-show-card .qs-type span {
  display: block;
  font-weight: 700;
  color: #555;
}
.sc-show-card .qs-type strong {
  display: block;
  font-family: ui-monospace, Menlo, monospace;
}
.sc-show-card .qs-name {
  font-size: 1.5rem;
}
.sc-show-card .qs-class,
.sc-show-card .qs-dates,
.sc-show-card .qs-title {
  font-size: 0.95rem;
}
.sc-show-card .qs-body {
  gap: 24px;
}
.sc-show-card .qs-qr {
  width: min(260px, 45vw);
  height: min(260px, 45vw);
}
.sc-show-card .qs-scan {
  font-size: 1rem;
}
.sc-show-card .qs-type span {
  font-size: 0.8rem;
}
.sc-show-card .qs-type strong {
  font-size: 2rem;
  letter-spacing: 3px;
}
.sc-show-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sc-show-spacer {
  flex: 1;
}
@media (max-width: 560px) {
  .sc-show-card .qs-body {
    flex-direction: column;
  }
}

/* The side panel: from the right, over Class Settings, under any question. */
.sps-panel {
  position: fixed;
  top: var(--toolbar-h);
  right: 0;
  bottom: 0;
  z-index: calc(var(--z-fab) - 1);
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 0.5px solid var(--divider-strong);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-base);
}
.sps-panel-in {
  animation: sps-slide-in 200ms var(--motion-ease);
}
@keyframes sps-slide-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sps-panel-in {
    animation: none;
  }
}
.sps-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 12px;
  border-bottom: 0.5px solid var(--divider-strong);
}
.sps-head .cm-hint {
  margin: 0;
}
.sps-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sps-name-title {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
}
.sps-name-title:focus {
  outline: none;
}
.sps-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 14px 16px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sps-sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sps-sec-title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-2);
}
.sps-ctl {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.sps-ctl .cm-hint {
  margin: 0;
}
.sps-seg {
  flex-wrap: wrap;
}
.sps-facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--text);
}
.sps-facts li {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 8px;
}
.sps-fact-label {
  color: var(--text-3);
}
.sps-unopened {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  color: var(--text-2);
}
.sps-question {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.sps-question .cm-hint {
  margin: 0;
}
.sps-card-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* Preview as a student whose page is paused: what their card shows instead of the page. */
.ps-closed {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
}
.ps-closed-line {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--text-md);
  color: var(--text);
}

/* ── Reflect tab (teacher/cm-questionnaires.js; reflect plan, board 1) ── */
.sq-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sq-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.sq-section-head .cm-section-title,
.sq-section-head .cm-hint,
.sq-hint {
  margin: 0;
}
.sq-card {
  border: 0.5px solid var(--divider-medium);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sq-off {
  background: var(--bg);
}
.sq-off .sq-name,
.sq-off .sq-desc {
  color: var(--text-3);
}
.sq-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.sq-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sq-name {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 700;
}
.sq-desc {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.sq-grade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
}
.sq-grade select {
  width: auto;
  padding: 2px 6px;
}
.sq-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--divider-subtle);
  border-bottom: 1px solid var(--divider-subtle);
}
.sq-facts > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.sq-facts > div > span:first-child {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
}
.sq-facts strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-base);
  font-weight: 600;
}
.sq-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
}
.sq-bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  overflow: hidden;
  max-width: 160px;
}
.sq-bar span {
  display: block;
  height: 4px;
  background: var(--score-3);
}
.sq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sq-copy {
  width: auto;
  max-width: 240px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
}
.sq-section-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sq-section-head .sq-new {
  flex-shrink: 0;
}
.sq-until {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.sq-closed {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-2);
}
.sq-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
.sq-dates .cm-field {
  margin: 0;
}
.sq-msg {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.sq-qs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}
.sq-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sq-q {
  border: 0.5px solid var(--divider-medium);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
}
.sq-q-slip {
  background: var(--bg);
}
.sq-q-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sq-num {
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--surface-2);
  font-size: var(--text-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sq-type {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
}
.sq-remove,
.sq-slip-seg {
  margin-left: auto;
}
.sq-text {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
  line-height: 1.45;
}
.sq-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-2);
}
.sq-chip {
  cursor: pointer;
}
.sq-core-add {
  width: auto;
  padding: 2px 6px;
  font-size: var(--text-sm);
}
.sq-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
@media (max-width: 640px) {
  .sq-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── New Reflection, the builder (teacher/cm-reflect-builder.js; reflect
   plan, board 2). Every name here is the builder's own: the Rubric Bank
   has rb-list, rb-menu and others. ── */
.rb-build {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.rb-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rb-preview-btn svg {
  width: 14px;
  height: 14px;
}
.rb-heads {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rb-name,
.rb-desc {
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--divider-medium);
  border-radius: 0;
  padding: 4px 0 6px;
}
.rb-name {
  font-size: var(--text-xl);
  font-weight: 700;
}
.rb-desc {
  font-size: var(--text-base);
  color: var(--text-2);
  border-bottom-color: var(--divider-subtle);
}
.rb-name:focus,
.rb-desc:focus {
  outline: none;
  border-bottom-color: var(--active);
}
.rb-qs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rb-q {
  position: relative;
  border: 0.5px solid var(--divider-medium);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rb-q-on {
  border: 1.5px solid var(--active);
  box-shadow: var(--shadow-md);
}
/* Moving a card, as One Report moves a statement: its ⠿ in the left margin
   (shown on the card pointed at and the open one) drags it; the others make
   room and glide. */
.rb-q-grip {
  position: absolute;
  left: -30px;
  top: 12px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: none;
  color: var(--text-2);
  font: 15px/24px var(--font-base);
  text-align: center;
  cursor: grab;
  opacity: 0;
  touch-action: none;
}
.rb-q:hover > .rb-q-grip,
.rb-q-on > .rb-q-grip,
.rb-q-lift > .rb-q-grip {
  opacity: 1;
}
.rb-q-grip:hover {
  background: var(--surface-2);
  color: var(--text);
}
@media (hover: none) {
  .rb-q-grip {
    opacity: 1;
  }
}
.rb-q-lift {
  z-index: 5;
  box-shadow: var(--shadow-lg);
}
.rb-q-shift {
  transition: transform 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
body.rb-dragging,
body.rb-dragging * {
  cursor: grabbing !important;
  user-select: none;
}
.rb-said {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* Adding between two cards: the + on the line between them; pointing at
   it parts the cards and offers its two choices in the gap. */
.rb-q {
  transition: margin-top 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.rb-q-parted {
  margin-top: 20px;
}
.rb-ins {
  position: absolute;
  height: 0;
  z-index: 6;
}
.rb-ins-line {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  background: var(--active);
  border-radius: 1px;
  transition: top 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.rb-ins-plus {
  position: absolute;
  left: -30px;
  top: -10px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--active);
  color: #fff;
  font: 600 15px/20px var(--font-base);
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: top 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.rb-ins-acts {
  position: absolute;
  left: 8px;
  top: -4px;
  display: none;
  gap: 2px;
  padding: 2px;
  background: var(--surface);
  border: 1px solid var(--divider-medium);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.rb-ins-acts button {
  font: 600 var(--text-xs) / 1 var(--font-base);
  color: var(--link);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}
.rb-ins-acts button:hover {
  background: var(--overlay-hover);
}
/* Open: the line and the choices sit in the middle of the parted gap; a
   bridge from the + lets the pointer reach them. */
.rb-ins.open .rb-ins-line {
  top: 9px;
}
.rb-ins.open .rb-ins-plus {
  top: 0;
}
.rb-ins.open .rb-ins-acts {
  display: flex;
  top: -4px;
}
.rb-ins.open::before {
  content: '';
  position: absolute;
  left: -40px;
  right: 0;
  top: -12px;
  height: 44px;
}
@media (prefers-reduced-motion: reduce) {
  .rb-q-shift,
  .rb-q,
  .rb-ins-line,
  .rb-ins-plus {
    transition: none;
  }
}
.rb-q-bad {
  border-color: var(--danger);
}
.rb-q-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rb-q-view[data-action] {
  cursor: pointer;
}
.rb-v-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.rb-v-prompt {
  font: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  min-width: 0;
}
button.rb-v-prompt {
  cursor: pointer;
}
.rb-v-section .rb-v-prompt {
  font-size: var(--text-lg);
  font-weight: 700;
}
.rb-v-kind {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
}
.rb-req {
  color: var(--danger);
}
.rb-v-sub {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.rb-v-empty {
  color: var(--text-3);
  font-weight: 500;
}
.rb-v-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: var(--text-sm);
  color: var(--text-2);
  max-width: 520px;
}
.rb-v-long {
  min-height: 54px;
  box-sizing: border-box;
}
.rb-v-date,
.rb-v-select {
  max-width: 220px;
}
.rb-v-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.rb-v-end {
  font-size: var(--text-sm);
  color: var(--text-2);
}
.rb-v-levels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rb-v-level {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
}
.rb-v-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rb-v-opt,
.rb-v-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
}
.rb-v-rank {
  max-width: 420px;
}
.rb-v-item {
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text);
}
.rb-v-item svg,
.rb-grip {
  color: var(--text-3);
  display: inline-flex;
  flex-shrink: 0;
}
.rb-mark {
  width: 16px;
  height: 16px;
  border-radius: 8px;
  border: 1.5px solid var(--text-3);
  box-sizing: border-box;
  flex-shrink: 0;
  display: inline-block;
}
.rb-mark-check {
  border-radius: 4px;
}
.rb-v-likert {
  display: grid;
  row-gap: 8px;
  align-items: center;
  font-size: var(--text-base);
  max-width: 660px;
}
.rb-v-col {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
}
.rb-v-cell {
  display: flex;
  justify-content: center;
}
.rb-q-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rb-q-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-2);
}
.rb-kind {
  width: auto;
  font-size: var(--text-sm);
}
.rb-tools {
  margin-left: auto;
  display: flex;
  gap: 2px;
}
.rb-tool,
.rb-x {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-xs);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.rb-x {
  width: 28px;
  height: 28px;
  font-size: var(--text-md);
}
.rb-tool:hover:not(:disabled),
.rb-x:hover {
  background: var(--overlay-hover);
}
.rb-tool:disabled {
  opacity: 0.35;
  cursor: default;
}
.rb-prompt {
  font-weight: 600;
}
.rb-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rb-opt {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rb-opt .cm-input {
  flex-grow: 1;
}
.rb-other {
  flex-grow: 1;
  font-size: var(--text-sm);
  color: var(--text-2);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.rb-adds {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.rb-likert {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
}
.rb-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.rb-rating .cm-field {
  margin: 0;
}
.rb-rating select {
  width: auto;
}
.rb-q-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  border-top: 0.5px solid var(--divider-subtle);
  padding-top: 10px;
}
.rb-sw {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
}
.rb-switch {
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--border-2);
  border: 0;
  padding: 2px;
  display: flex;
  justify-content: flex-start;
  cursor: pointer;
}
.rb-switch[aria-checked='true'] {
  background: var(--score-3);
  justify-content: flex-end;
}
.rb-switch span {
  width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--surface);
  display: block;
}
.rb-qmore {
  position: relative;
}
.rb-qmore-btn {
  width: 32px;
  height: 28px;
  background: var(--surface-2);
  border: 0;
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.rb-qmenu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  width: 230px;
  background: var(--surface);
  border: 0.5px solid var(--divider-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 5px;
  display: flex;
  flex-direction: column;
  z-index: var(--z-popover);
}
.rb-qmenu-item {
  font: inherit;
  font-size: var(--text-base);
  color: var(--text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--radius-xs);
  padding: 7px 10px 7px 28px;
  position: relative;
  cursor: pointer;
}
.rb-qmenu-item:hover,
.rb-qmenu-item:focus-visible {
  background: var(--overlay-hover);
}
.rb-qmenu-item:disabled {
  opacity: 0.45;
  cursor: default;
  background: none;
}
.rb-qmenu-danger {
  color: var(--danger);
}
.rb-qmenu-line {
  border: 0;
  border-top: 0.5px solid var(--divider-medium);
  margin: 4px 0;
}
.rb-qmenu-sub {
  font-size: var(--text-xs);
  color: var(--text-2);
  padding: 6px 10px 2px 28px;
}
.rb-qmenu-item[aria-checked='true']::before {
  content: '✓';
  position: absolute;
  left: 10px;
}
.rb-err {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--danger);
}
.rb-add {
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rb-add-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-2);
  margin-right: 4px;
}
.rb-add-btn {
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--link);
  background: var(--active-light);
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}
.rb-add-section {
  color: var(--text-2);
  background: var(--surface-2);
}
.rb-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-top: 0.5px solid var(--divider-subtle);
  padding-top: 12px;
}
.rb-closes {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rb-closes .cm-input {
  width: 180px;
}
.rb-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.rb-msg {
  font-size: var(--text-sm);
  color: var(--text-2);
}
/* The Reflect builder's cards, laid out as One Report's rows read
   (Colin, Nov 24: "the question and option boxes are weirdly spaced …
   the little draggable dots … are half on the white space"):
   - a gutter inside the card's left edge holds its ⠿ and the + between
     cards, so neither sits half off the card;
   - the open card's words are lines, not boxes: the question, its
     subtitle and each option underline, and an option's ✕ shows on the
     row pointed at, so every line ends at the same right edge;
   - the question's words and the options' marks share one left edge,
     with even gaps between the parts.
   Scoped to .rb-build: the Quizzes card draws from the same pieces and
   keeps its own look. */
.rb-build .rb-q {
  padding: 14px 18px 14px 40px;
}
.rb-build .rb-q-grip {
  left: 8px;
  top: 12px;
}
.rb-build .rb-q-on > .rb-q-grip {
  top: 19px;
}
.rb-build .rb-ins-plus {
  left: 10px;
}
.rb-build .rb-ins-acts {
  left: 38px;
}
.rb-build .rb-ins.open::before {
  left: 0;
}
.rb-build .rb-q-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rb-build .rb-q-edit input.cm-input {
  border: 0;
  border-bottom: 1px solid var(--divider-medium);
  border-radius: 0;
  background: transparent;
  padding: 6px 0;
  box-shadow: none;
}
.rb-build .rb-q-edit input.cm-input:hover {
  border-bottom-color: var(--border-2);
}
/* Focused, a line thickens and turns blue; the app's glow around inputs
   (styles.css, input:focus) would draw a box round a line. */
.rb-build .rb-q-edit input.cm-input:focus,
.rb-build .rb-q-edit input.cm-input:focus-visible {
  border-bottom: 2px solid var(--active);
  padding-bottom: 5px;
  outline: none;
}
.rb-build .rb-q-edit input.cm-input:focus,
.rb-build .rb-name:focus,
.rb-build .rb-desc:focus {
  box-shadow: none !important;
}
.rb-build .rb-q-edit .rb-prompt {
  font-size: var(--text-lg);
}
.rb-build .rb-q-edit .rb-subtitle {
  font-size: var(--text-sm);
  color: var(--text-2);
  margin-top: -6px;
}
.rb-build .rb-opts {
  gap: 2px;
}
.rb-build .rb-opt {
  position: relative;
  gap: 10px;
}
.rb-build .rb-opt input.cm-input {
  padding-right: 34px;
  border-bottom-color: var(--divider-subtle);
}
.rb-build .rb-opt .rb-x {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
}
.rb-build .rb-opt:hover .rb-x,
.rb-build .rb-opt:focus-within .rb-x,
.rb-build .rb-opt .rb-x:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .rb-build .rb-opt .rb-x {
    opacity: 1;
  }
}
.rb-build .rb-other {
  border: 0;
  border-bottom: 1px dashed var(--divider-medium);
  border-radius: 0;
  padding: 7px 0;
}
.rb-build .rb-adds {
  margin-top: -4px;
}
/* A Ranking's items are numbered while they are edited: a ⠿ beside each
   would read as a second handle on a card that has one. */
.rb-build .rb-q-edit .rb-opts {
  counter-reset: rb-item;
}
.rb-build .rb-q-edit .rb-opt .rb-grip {
  display: none;
}
.rb-build .rb-q-edit .rb-opt:has(.rb-grip)::before {
  counter-increment: rb-item;
  content: counter(rb-item) '.';
  width: 16px;
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-2);
  text-align: right;
}
/* An answer box drawn on the open card is what students will see, not a
   box to type in: dashed. */
.rb-build .rb-q-edit .rb-v-box {
  border-style: dashed;
}
@media (max-width: 640px) {
  .rb-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .rb-likert {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* New Class wizard, Choose Competencies: one card per course, Ministry
   folders as headings with their figure, each competency with its wording. */
.cw-cc-intro {
  color: var(--text);
  font-size: var(--text-md);
  margin: 0 0 14px;
}

.cw-cc-course-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 20px 24px 12px;
}
.cw-cc-course-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
}
.cw-cc-course-fig {
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.cw-cc-folder {
  border-top: 1px solid var(--divider-subtle);
  padding: 6px 24px 12px;
}
.cw-cc-folder-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 8px;
}
.cw-cc-folder-name {
  font-weight: 700;
  color: var(--text);
}
.cw-cc-folder-fig {
  font-size: var(--text-sm);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  background: #f2f2f4;
  border-radius: 999px;
  padding: 1px 9px;
}
.cw-cc-folder-acts {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.cw-cc-btn {
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  background: #e5e5ea;
  border: 0;
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
}
.cw-cc-btn:hover {
  background: #d8d8de;
}
.cw-cc-loose {
  padding: 2px 24px 14px;
}
.cw-cc-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cw-cc-row {
  display: grid;
  grid-template-columns: 20px auto 1fr;
  column-gap: 10px;
  align-items: start;
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}
.cw-cc-row.off {
  background: #f2f2f4;
  box-shadow: none;
}
.cw-cc-check {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--active);
  cursor: pointer;
}
.cw-cc-row .cm-std-code {
  margin-top: 1px;
}
.cw-cc-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cw-cc-name {
  font-weight: 600;
  color: var(--text);
}
.cw-cc-wording {
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.45;
}

/* Competency list: each card's name with its wording's first line under it
   (hidden once the card is open), and runs of competencies outside folders
   sitting among the folders. */
.cm-std-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cm-std-line {
  font-size: var(--text-sm);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-std-card.open .cm-std-line {
  display: none;
}
.cm-comp-list .mod-folder.cm-loose-run > .mod-folder-body {
  padding-top: 0;
}
.cm-std-ican-none {
  color: var(--text);
}

/* Re-link review: a competency's wording under its name, and the
   curriculum's replacements for an older class's competency. */
.cm-cr-wording {
  display: block;
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.45;
  margin-top: 2px;
}
.cm-cr-repl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.cm-cr-repl-item {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: start;
}
.cm-cr-repl-item .cm-cr-name {
  font-size: var(--text-sm);
}
.cm-relink-dropped {
  color: var(--text);
  margin-bottom: 12px;
}

/* Class Settings below 1024 px: the student list's width is 0 there, so
   the class list kept 1 px and New Class and Restore Class from Backup
   couldn't be reached (Nov 3 sweep). It keeps its own width on a tablet
   and, on a phone, sits above the class as a short list of its own. */
@media (max-width: 1024px) {
  body.cm-open #page-layout .cm-sidebar {
    width: 220px;
  }
}
@media (max-width: 600px) {
  body.cm-open #page-layout {
    flex-direction: column;
  }
  body.cm-open #page-layout #sidebar-mount {
    height: auto;
    flex-shrink: 0;
  }
  body.cm-open #page-layout .cm-sidebar {
    width: 100%;
    height: auto;
    max-height: 40vh;
    border-right: 0;
    border-bottom: 1px solid var(--divider-subtle);
  }
  body.cm-open #page-layout .cm-sidebar-header {
    height: 44px;
  }
  body.cm-open #page-layout .cm-class-list {
    min-height: 0;
  }
  body.cm-open #page-layout .cm-new-btn {
    min-height: 44px;
  }
  body.cm-open #page-layout .page-main {
    flex: 1 1 auto;
    min-height: 0;
  }
}

/* ── Questions From Students (S10-F4) ──────────────────────── */
/* #main is a flex column: the card keeps its height (no shrinking).
   The board puts it at the top of the page while it has questions, under
   only the photo reminder. page-dashboard.js writes it after the
   competency cards, so the flex order lifts it. */
.page-dashboard .dash-questions {
  order: -1;
  flex-shrink: 0;
  margin-top: 12px;
}
.dash-questions-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-dashboard .dash-questions-head .dash-section-title {
  margin-bottom: 0;
}
.dash-questions-count {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 11px;
  background: #f5b800;
  color: #3b2a00;
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
}
.dash-questions-hint {
  margin: 4px 0 8px;
  color: var(--text-2);
  font-size: var(--text-sm);
}
.dash-questions-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-questions-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--divider);
}
.dash-questions-av {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--active-fill);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.dash-questions-body {
  flex: 1;
  min-width: 0;
}
/* The name, then "piece · class · date" on the same line. */
.dash-questions-who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}
.dash-questions-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}
.dash-questions-meta {
  color: var(--text-2);
  font-size: var(--text-sm);
}
/* The student's words, in a yellow box: a question waits on you. */
.dash-questions-text {
  margin: 6px 0 0;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, #f5b800 60%, var(--surface));
  border-radius: 8px;
  background: color-mix(in srgb, #f5b800 14%, var(--surface));
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.btn.dash-questions-answer {
  margin-top: 8px;
  border: 0;
  background: rgba(0, 122, 255, 0.1);
  color: #0062cc;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}
.btn.dash-questions-answer:hover {
  background: rgba(0, 122, 255, 0.16);
}
@media (prefers-color-scheme: dark) {
  /* As the grader's Return All: 4.87:1 at rest, 4.63:1 on hover. */
  .btn.dash-questions-answer {
    background: rgba(10, 132, 255, 0.14);
    color: var(--link);
  }
  .btn.dash-questions-answer:hover {
    background: rgba(10, 132, 255, 0.18);
  }
}

/* ── A warning before the year runs out (shared/photo-expiry.js) ── */
/* One quiet line per class whose photos go within 30 days because it has
   not been opened for a year, at the top of the Dashboard. Empty: nothing. */
.page-dashboard .photo-expiry {
  order: -2;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.page-dashboard .photo-expiry:empty {
  display: none;
}
.photo-expiry-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-left: 4px solid var(--late);
  border-radius: 12px;
}
.photo-expiry-text {
  flex: 1 1 320px;
  margin: 0;
  color: var(--text);
  font-size: var(--text-base);
  line-height: 1.4;
}
.photo-expiry-more {
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: var(--text-sm);
}

/* ── The middle row (D2, docs/plans/dashboard-inbox-plan.md; on since D9) ──
   A left column and one Competencies tile. The row is as tall as its tallest
   tile needs, up to what the window leaves (--dash-row-h, set by
   DashRowSize.apply from DashRowFit; 510 px with no script), never under 420,
   so the Students heading starts below the first view. The Competencies tile
   is a third of the row, or, until anything is assessed this term, 22% of it
   between 260 and 340 px (.is-comp-narrow). The left column holds the Inbox
   slot (Recent Assessments with Send Work off) and Bulletins under it; the
   two heights are set inline from the same plan. */
.dash-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  height: var(--dash-row-h, 510px);
}
.dash-row.is-comp-narrow {
  grid-template-columns: minmax(0, 1fr) clamp(260px, 22%, 340px);
}
.dash-row-left {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  min-height: 0;
}
.dash-row-left.has-bulletins {
  grid-template-rows: minmax(0, 3fr) minmax(0, 2fr);
}
.dash-row-slot,
.dash-row-comp {
  display: flex;
  min-width: 0;
  min-height: 0;
}
.dash-row-slot > *,
.dash-row-comp > * {
  flex: 1 1 auto;
  min-width: 0;
}
/* Under 900 px the tiles stack: the Inbox, Bulletins, then Competencies, at
   the heights on the board (an iPad held upright: teacher/tablet.css). */
@media (max-width: 900px) {
  .dash-row {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }
  .dash-row-left,
  .dash-row-left.has-bulletins {
    grid-template-rows: none;
  }
  .dash-row-inbox {
    height: 450px;
  }
  .dash-row-bulletins {
    height: 300px;
  }
  .dash-row-comp {
    height: 520px;
  }
}

/* A tile: one white box like the cards. */
.dash-recent,
.dash-comp-tile {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--divider-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* Recent Assessments, as the board draws it (Nov 28): a 32 px head, rows of
   40 px that fill the tile, a Coming Up list under them, and the Send Work
   line at the foot. */
.dash-recent-head {
  flex: 0 0 auto;
  height: 32px;
  align-items: center;
}
.dash-recent-title,
.dash-comp-tile-title {
  margin: 0;
  font: inherit;
  color: inherit;
}
.dash-recent-head a {
  margin-left: auto;
}
.dash-recent-list {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dash-recent-row {
  border-bottom: 1px solid var(--divider-medium);
}
.dash-recent-row[hidden] {
  display: none;
}
.dash-recent-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  height: 40px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.dash-recent-link:hover .dash-recent-name {
  text-decoration: underline;
}
.dash-recent-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-base);
  line-height: 20px;
  font-weight: 600;
}
.dash-recent-count {
  flex: 0 0 auto;
  font-size: var(--text-sm);
  line-height: 20px;
  color: var(--text-2);
}
/* Coming Up under the rows: the same rows, the title plain and the date at the right. */
.dash-coming-rows[hidden] {
  display: none;
}
.dash-coming-rows-label {
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
  height: 32px;
  padding-bottom: 4px;
  font-size: var(--text-sm);
  line-height: 20px;
  font-weight: 600;
  color: var(--text-2);
}
.dash-coming-list .dash-recent-name {
  font-weight: 400;
}
.dash-recent-none {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  margin: 0;
  font-size: var(--text-md);
  line-height: 24px;
  font-weight: 600;
}
.dash-recent-hint {
  flex: 0 0 auto;
  margin: auto 0 0;
  padding-top: 12px;
  font-size: var(--text-sm);
  line-height: 20px;
  color: var(--text-2);
}
.dash-recent-hint a {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* The Competencies tile: Curricular | Core over two pages that slide
   sideways in 220 ms (dash-competencies.css draws each page). A page that is
   not shown is hidden (not just moved), so nothing in it takes focus. */
/* The title and Curricular | Core on one line when they fit; when the tile
   is too narrow for both (1100 wide with the roster shown, or a wider font)
   the switch goes under the title, at the right, whole. */
.dash-comp-tile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  flex: 0 0 auto;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
}
.dash-comp-seg {
  flex: 0 0 auto;
  margin-left: auto;
}
.dash-comp-pages {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 10px;
  overflow: hidden;
}
.dash-comp-track {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 220ms var(--ease-out);
}
.dash-comp-tile[data-page='core'] .dash-comp-track {
  transform: translateX(-50%);
}
.dash-comp-page {
  display: flex;
  flex-direction: column;
  flex: 0 0 50%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 220ms;
}
.dash-comp-page.is-on {
  visibility: visible;
  transition-delay: 0s;
}
@media (prefers-reduced-motion: reduce) {
  .dash-comp-track,
  .dash-comp-page {
    transition: none;
  }
}

/* How Folders Count, beside the competency list: each folder with its
   own As One | Each. */
.cm-fc-intro {
  margin: 4px 0 8px;
  line-height: 1.4;
}
.cm-fc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.cm-fc-name {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}
.cm-fc-title {
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}
.cm-fc-segs {
  flex: none;
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: rgba(118, 118, 128, 0.12);
}
.cm-fc-seg {
  min-width: 58px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}
.cm-fc-seg.is-on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.cm-fc-example {
  margin: 8px 2px 0;
  font-size: var(--text-sm);
  color: var(--text-2);
}
