/* ── work-wall.css — the Work Wall and the student page's Work tab (S14) ── */

.ww-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.ww-gap {
  flex: 1;
}
/* Wrappers the phone lays out as a scrolling row and a form row; the
   computer sees through them. */
body:not(.mobile-mode) .ww-pills,
body:not(.mobile-mode) .ww-by-row {
  display: contents;
}

/* The wall over the page, under the grader (3900). */
.ww-overlay {
  position: fixed;
  inset: 0;
  z-index: 3800;
  background: var(--bg);
  padding: 24px;
  box-sizing: border-box;
  display: flex;
}
.ww-page {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px var(--divider-subtle),
    0 8px 28px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.ww-bar,
.ww-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  box-shadow: inset 0 -0.5px 0 var(--divider-heavy);
  flex-wrap: wrap;
}
.ww-bar {
  gap: 12px;
  padding: 12px 16px;
}
.ww-back {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  border: 0;
  background: var(--seg-track);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.ww-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ww-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.ww-sub {
  font-size: 12px;
  color: var(--text-3);
}
.ww-label {
  font-size: 12px;
  font-weight: 600;
}
.ww-seg {
  display: flex;
  padding: 2px;
  border-radius: 9px;
  background: var(--seg-track);
}
.ww-seg-btn {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ww-seg-btn.is-on {
  background: var(--seg-thumb);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.ww-grade {
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: var(--active-fill);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.ww-grade:disabled {
  opacity: 0.45;
  cursor: default;
}

.ww-pill {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: var(--seg-track);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.ww-pill-work {
  background: var(--active-light);
  color: var(--link);
}
.ww-pill-all {
  background: var(--seg-track);
  color: var(--text);
}
.ww-pill.is-on {
  background: var(--text);
  color: var(--surface);
}
.ww-pill-lv.is-on.ww-lv-1 {
  background: var(--score-1);
  color: #fff;
}
.ww-pill-lv.is-on.ww-lv-2 {
  background: var(--score-2);
  color: #fff;
}
.ww-pill-lv.is-on.ww-lv-3 {
  background: var(--score-3);
  color: #fff;
}
.ww-pill-lv.is-on.ww-lv-4 {
  background: var(--score-4);
  color: #fff;
}
.ww-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--score-0);
  flex: none;
}
.ww-lv-1 > .ww-dot,
.ww-dot.ww-lv-1 {
  background: var(--score-1);
}
.ww-lv-2 > .ww-dot,
.ww-dot.ww-lv-2 {
  background: var(--score-2);
}
.ww-lv-3 > .ww-dot,
.ww-dot.ww-lv-3 {
  background: var(--score-3);
}
.ww-lv-4 > .ww-dot,
.ww-dot.ww-lv-4 {
  background: var(--score-4);
}
.ww-pill.is-on > .ww-dot {
  background: #fff;
}
.ww-by {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.ww-scroll {
  flex: 1;
  overflow: auto;
  padding: 16px;
}
.ww-group + .ww-group {
  margin-top: 20px;
}
.ww-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}
.ww-group-head .ww-dot {
  width: 9px;
  height: 9px;
  border-radius: 5px;
}
.ww-group-n {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
}
.ww-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}
.ww-empty {
  color: var(--text-3);
  padding: 24px 0;
  text-align: center;
}

/* A student's card: the first page, the name, the level. */
.ww-card,
.sw-card {
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--text);
  text-align: left;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--divider-strong);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.ww-card:hover,
.sw-card:hover {
  box-shadow: 0 0 0 2px var(--active);
}
.ww-card:focus-visible,
.sw-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--active);
}
.ww-pic,
.sw-pic {
  position: relative;
  display: block;
  height: 220px;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--divider-medium);
}
.sw-pic {
  height: 150px;
}
.ww-img {
  width: 100%;
  display: block;
}
.ww-nopic {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}
.ww-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 1px 7px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.ww-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
}
.ww-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ww-chip {
  flex: none;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  box-sizing: border-box;
  border-radius: 6px;
  background: var(--seg-track);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.ww-chip.ww-lv-1 {
  background: var(--score-1-bg);
  color: var(--score-1-text);
}
.ww-chip.ww-lv-2 {
  background: var(--score-2-bg);
  color: var(--score-2-text);
}
.ww-chip.ww-lv-3 {
  background: var(--score-3-bg);
  color: var(--score-3-text);
}
.ww-chip.ww-lv-4 {
  background: var(--score-4-bg);
  color: var(--score-4-text);
}
.ww-chip.is-tograde {
  background: var(--active-light);
  color: var(--link);
}
/* A draft: graded, not returned (the gradebook's dashed mark). */
.ww-chip.is-draft {
  outline: 1px dashed currentColor;
  outline-offset: -1px;
}

/* The student page's Work tab. */
.sw-tab {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sw-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sw-bar .tb-action-btn:disabled {
  opacity: 0.45;
  filter: none;
  cursor: default;
}
.sw-chip {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: var(--seg-track);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.sw-chip.is-on {
  background: var(--text);
  color: var(--surface);
}
.sw-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Show (where the work stands), Category and Sort, under the chips. */
.sw-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sw-cat-label {
  margin-left: 8px;
}
.sw-seg .ww-seg-btn {
  white-space: nowrap;
}
.sw-n {
  color: var(--text-3);
  font-weight: 600;
}
.sw-seg .ww-seg-btn.is-on .sw-n {
  color: var(--text-2);
}
.sw-headrow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: -6px;
}
.sw-head {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.sw-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}
.sw-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.sw-card {
  border-radius: 10px;
}
/* A filter changed: the cards slide to their new places as the class
   dashboard's do (dashboard.css .dash-card.is-sliding). A card coming in
   fades and grows in; one going fades out where it was. */
.sw-card.is-placing {
  transition: none;
}
.sw-card.is-sliding {
  transition:
    transform 250ms var(--ease-out),
    opacity 250ms var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}
.sw-card.is-entering,
.sw-card.is-gone {
  opacity: 0;
  transform: scale(0.96);
}
.sw-card.is-leaving {
  position: absolute;
  margin: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .sw-card.is-sliding {
    transition: none;
  }
}
.sw-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
}
.sw-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sw-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sw-date {
  font-size: 12px;
  color: var(--text-3);
}
.sw-card .ww-chip {
  height: 20px;
  font-size: 11px;
  border-radius: 5px;
}

/* A student's pages one at a time, over everything (shared/work-viewer.js). Dark, like Add Work's page view:
   the page fills the height in its own proportions, never wider than the room beside its arrows. */
.wv-overlay {
  position: fixed;
  inset: 0;
  z-index: 3850;
  background: rgba(18, 18, 20, 0.96);
  color: #fff;
}
.wv-box {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 16px;
  box-sizing: border-box;
}
.wv-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wv-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.wv-title,
.wv-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wv-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.wv-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}
.wv-gap {
  flex: 1;
}
.wv-step,
.wv-turn,
.wv-close,
.wv-thumb {
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font: inherit;
  cursor: pointer;
  flex-shrink: 0;
}
.wv-step,
.wv-turn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.wv-step {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.wv-close {
  height: 32px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
:is(.wv-step, .wv-turn, .wv-close, .wv-thumb):hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.26);
}
:is(.wv-step, .wv-turn):disabled {
  opacity: 0.3;
  cursor: default;
}
.wv-overlay button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* The page, Page 1 of 2 under it, and its arrows. The stage is the size they are fitted to. */
.wv-stage {
  --wv-side: 56px;
  --wv-under: 0px;
  flex: 1;
  min-height: 0;
  container-type: size;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  touch-action: pan-y pinch-zoom;
}
.wv-stage:not(:has(.wv-turn)) {
  --wv-side: 0px;
}
.wv-stage:has(.wv-at) {
  --wv-under: 30px;
}
.wv-sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wv-turn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.wv-img {
  display: block;
  width: min(100cqw - 2 * var(--wv-side), (100cqh - var(--wv-under)) * var(--wv-ratio));
  height: min(100cqh - var(--wv-under), (100cqw - 2 * var(--wv-side)) / var(--wv-ratio));
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
}
.wv-img[hidden] {
  display: none;
}
.wv-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wv-at {
  height: var(--wv-under);
  display: flex;
  align-items: flex-end;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* A piece of three pages or more: every page, to jump to. */
.wv-strip {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding: 3px;
}
.wv-thumb {
  position: relative;
  width: 42px;
  height: 54px;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
}
.wv-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wv-thumb.is-on {
  box-shadow: 0 0 0 2px #fff;
}
.wv-note {
  margin: 0;
  max-width: 70ch;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 600px) {
  .ww-overlay {
    padding: 0;
  }
  .ww-page {
    border-radius: 0;
  }
  .ww-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .ww-pic {
    height: 180px;
  }
  .wv-box {
    padding: 8px;
  }
  .wv-stage {
    --wv-side: 40px;
    gap: 4px;
  }
  .wv-turn {
    width: 36px;
  }
}

/* The glance: a student's first pages by See the Work, while it is pointed
   at or has focus (shared/work-wall.js). It takes no clicks. */
.ww-glance {
  position: fixed;
  z-index: var(--z-popover);
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.ww-glance-pages {
  display: flex;
  gap: 8px;
}
.ww-glance-img {
  display: block;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
}
.ww-glance-more {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
}

/* The rubric card: how a piece was scored, beside a card on the Work tab
   or the Work Wall while it is pointed at (teacher/work-rubric-card.js). Over the
   wall, so above its overlay. It takes no clicks. */
.wr-card {
  position: fixed;
  display: flex;
  flex-direction: column;
  z-index: 3900;
  box-sizing: border-box;
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
}
/* Nothing in it moves: fitting it measures each size at once, and the
   reduced-motion rule would otherwise turn every change into a transition. */
.wr-card,
.wr-card * {
  transition-property: none;
}
.wr-head {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.wr-head-main {
  flex: 1;
  min-width: 0;
}
.wr-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.wr-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}
.wr-overall {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.wr-overall .ww-chip {
  height: 26px;
  padding: 0 10px;
  font-size: 14px;
}
.wr-label,
.wr-note-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
}
.wr-draft {
  font-size: 11px;
  color: var(--text-3);
}
.wr-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.wr-table th,
.wr-table td {
  border: 1px solid var(--divider-strong);
  padding: 7px 8px;
  vertical-align: top;
  text-align: left;
}
.wr-crit-head,
.wr-lv-head {
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
}
.wr-crit-head {
  width: 24%;
}
.wr-lv-head.wr-lv-1 {
  color: var(--score-1-text);
}
.wr-lv-head.wr-lv-2 {
  color: var(--score-2-text);
}
.wr-lv-head.wr-lv-3 {
  color: var(--score-3-text);
}
.wr-lv-head.wr-lv-4 {
  color: var(--score-4-text);
}
.wr-crit {
  font-size: 12px;
  font-weight: 700;
}
.wr-cell {
  font-size: 11.5px;
  color: var(--text-3);
}
.wr-cell.is-on {
  color: var(--text);
  box-shadow: inset 0 0 0 2px currentColor;
}
.wr-cell.is-on.wr-lv-1 {
  background: var(--score-1-bg);
  color: var(--score-1-text);
}
.wr-cell.is-on.wr-lv-2 {
  background: var(--score-2-bg);
  color: var(--score-2-text);
}
.wr-cell.is-on.wr-lv-3 {
  background: var(--score-3-bg);
  color: var(--score-3-text);
}
.wr-cell.is-on.wr-lv-4 {
  background: var(--score-4-bg);
  color: var(--score-4-text);
}
.wr-mark {
  display: block;
  margin-bottom: 3px;
  font-size: 11.5px;
  font-weight: 800;
}
.wr-sp-note {
  color: var(--text);
}
.wr-checks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 5px;
}
.wr-check {
  display: flex;
  gap: 5px;
  align-items: flex-start;
}
.wr-box {
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 1px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: 9px;
  line-height: 11px;
  text-align: center;
}
.wr-check.is-on {
  font-weight: 700;
}
.wr-note-row td {
  padding: 6px 8px 8px;
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
}
.wr-score {
  font-size: 13px;
  color: var(--text-2);
}
.wr-score > span {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}
.wr-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}
.wr-feedback {
  flex: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
}
.wr-feedback-text {
  margin-top: 3px;
  font-size: 13px;
  white-space: normal;
}
.wr-empty {
  font-size: 13px;
  color: var(--text-3);
}
/* Too tall for the window: smaller type, then work-rubric-card.js draws
   the whole table smaller. Every level stays. */
.wr-card.is-tight .wr-table th,
.wr-card.is-tight .wr-table td {
  padding: 4px 6px;
  font-size: 10.5px;
}
.wr-card.is-tight .wr-mark {
  font-size: 10.5px;
}
