/* Navigation shared by the sign-in steps and assessment workspace. */
:is(.signin, .placement-workspace, .workbench-marking) .surface-back {
  display: inline-flex; align-items: center; gap: .65em; width: fit-content;
  min-height: 44px; padding: 0 12px; margin: 0 0 6px -8px;
  border-radius: 14px; border: 1px solid transparent; background: transparent;
  color: #efdfed; font: 550 15px/1.2 system-ui, sans-serif; text-decoration: none;
}
.surface-back::before, .question-route i {
  content: ''; display: inline-block; width: .5em; height: .5em;
  border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(45deg);
}
.signin .surface-back { margin-bottom: 8px; }
:is(.signin,.placement-workspace,.workbench-marking) .surface-back:hover {
  background: #f1deef13; border-color: #f1deef24;
}
:is(.signin,.placement-workspace,#placement-dialog,.workbench-marking) :where(a[href],button:enabled,select) {
  touch-action: manipulation; transition: scale 150ms ease-out, background-color 180ms ease, border-color 180ms ease;
}
:is(.signin,.placement-workspace,#placement-dialog,.workbench-marking) :is(a[href],button:enabled,select):active { scale: .97; }
:is(.signin,.placement-workspace,#placement-dialog,.workbench-marking) :focus-visible { outline: 2px solid #ffd8dd; outline-offset: 3px; }
.signin [aria-invalid="true"] { border-color: #ffb5ad; }
#record-filter-form { display: grid; gap: 16px; margin-top: 16px; }
#record-filter-form .btn { justify-self: end; }
.workbench-marking [data-grading-view="entry"] #grade-details,
.workbench-marking [data-grading-view="questions"] :is(.whole-entry,.marking-aside,.question-route) { display: none; }
.workbench-marking [data-grading-view="questions"] .marking-layout { grid-template-columns: minmax(0,1fr); }
.question-route {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px;
  margin-top: 12px; padding: 10px 20px; color: #f7edf8; text-align: left;
  background: linear-gradient(120deg,#edd9ff1e,#ffffff09);
  border: 1px solid #f1dcff38; border-radius: 16px; box-shadow: inset 0 1px #fff2;
}
.question-route span { margin-left: auto; font-size: 14px; color: #e3cedf; }
.question-route i { transform: rotate(225deg); color: #ead4e0; }
.workbench-marking #grade-details { padding: clamp(14px,2.5vw,24px); }
.workbench-marking .paper-nav { display:flex; gap:5px; overflow-x:auto; padding:4px 2px 10px; }
.workbench-marking .paper-nav button { flex:1 0 110px; min-height:48px; text-align:left; background:#ffffff06; border-radius:12px; }
.workbench-marking .paper-nav [aria-current="page"] { background:#ebd7ed24; border-color:#ebd7ed70; }
.workbench-marking #marking-dialog pre { white-space:pre-wrap; overflow-wrap:anywhere; margin:10px 0; }
.workbench-marking #marking-dialog ol { padding-inline-start:1.5em; }
@media(prefers-reduced-motion:no-preference){
  .workbench-marking [data-grading-view="questions"] #grade-details,
  .workbench-marking [data-grading-view="entry"] .whole-entry,
  .workbench-marking .feedback-panel { animation: marking-enter 260ms cubic-bezier(.2,.7,.25,1) both; }
  @keyframes marking-enter { from {transform:translateY(5px)} to {transform:none} }
}
@media(prefers-reduced-motion:reduce){
  :is(.signin,.placement-workspace,#placement-dialog,.workbench-marking) :is(button,a[href],select){ transition:none; }
  :is(.signin,.placement-workspace,#placement-dialog,.workbench-marking) :is(button,a[href],select):active{scale:1;background-color:#69526b}
}
.workbench-marking .answer-cell {
  grid-template-columns: 2ch minmax(0,1fr) auto; column-gap: 12px; min-height: 51px;
}
.workbench-marking .answer-cell .cell-number { font-variant-numeric:tabular-nums; }
.workbench-marking .answer-cell .answer-state {
  display:inline-flex; align-items:center; justify-content:flex-end; gap:7px; min-height:44px;
  border:0; padding:0 4px; background:transparent; border-radius:9px; font-size:14px;
}
.answer-state::after { content:''; width:5px; height:5px; border:solid currentColor; border-width:1px 1px 0 0; transform:rotate(45deg); }
.workbench-marking .choices .btn { min-width:35px; min-height:40px; border-radius:10px; }
.workbench-marking .answer-cell > input { min-height:38px; }
.mark-options { display:grid; gap:4px; }
.mark-options button { min-height:46px; text-align:start; background:#feeffc0a; border:0; border-radius:10px; padding-inline:15px; color:inherit; }
@media(max-width:640px) {
  .workbench-marking .paper-nav { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:2px; padding:3px; margin-bottom:18px; border-radius:14px; background:#2018295c; }
  .workbench-marking .paper-nav button { display:grid; place-items:center; min-height:44px; padding:0; border:0; background:transparent; }
  .workbench-marking .paper-nav button[aria-current="page"] { background:#e7d4ed2a; box-shadow:inset 0 1px #fff3; }
  .workbench-marking .paper-nav button .page-number { color:#f7edf8; font-size:13px; white-space:nowrap; }
  .workbench-marking .paper-nav button :is(small,b) { display:none; }
  .workbench-marking .answer-cell { gap:8px; }
  .workbench-marking .choices .btn { min-width:32px; min-height:44px; }
  .workbench-marking .whole-entry .group-header { display:grid; gap:14px; }
  .workbench-marking .whole-entry .code-label { margin:0; display:grid; gap:5px; }
  .workbench-marking #student-code { width:100%; }
}
.workbench-marking .answer-cell .choices .btn[aria-pressed="true"] {
  background:#e7cfeb; color:#31253a; border-color:#f7e2f7; box-shadow:inset 0 1px #fff8;
}
.workbench-marking #marking-dialog {
  width:min(420px,calc(100vw - 32px)); border-radius:20px; background:#382e43f5;
  border:1px solid #e5d3ef42; box-shadow:inset 0 1px #ffffff21,0 18px 60px #10081955;
  opacity:0; transform:translateY(6px);
  transition:opacity .18s ease,transform .22s ease-out,display .22s allow-discrete,overlay .22s allow-discrete;
}
.workbench-marking #marking-dialog[open] { opacity:1; transform:none; animation:none; }
@starting-style { .workbench-marking #marking-dialog[open] { opacity:0; transform:translateY(8px); } }
@media(prefers-reduced-motion:reduce){
  .workbench-marking #marking-dialog,.workbench-marking #marking-dialog::backdrop{transition:none;animation:none;transform:none}
}
