:root {
  --paper: #f3ecdf;
  --paper-2: #fffaf3;
  --ink: #1e1a16;
  --muted: #6f655b;
  --line: #e0d3c2;
  --teal: #0e6b5c;
  --teal-deep: #0a4f44;
  --clay: #8d3b2c;
  --clay-soft: #f8ebe6;
  --gold: #8a5a12;
  --good: #146333;
  --good-soft: #e5f3ea;
  --navy: #1e4d7b;
  --shadow: 0 18px 50px rgba(48, 32, 14, 0.08);
  --serif: Fraunces, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  --mono: "DejaVu Sans Mono", "Liberation Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html {
  margin: 0;
  min-height: 100%;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}
body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16.5px/1.5 var(--sans);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.sign-in {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(320px, 0.85fr);
}
.sign-copy {
  background: #1c1712;
  color: #f6f0e6;
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #f6f0e6;
  border-radius: 8px;
  font-family: var(--serif);
  font-weight: 640;
}
.sign-copy h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 18px 0 12px;
}
.lede { max-width: 36ch; color: #e6dccb; margin: 0; }
.rules { list-style: none; padding: 0; margin: 32px 0 0; }
.rules li { padding: 12px 0; border-top: 1px solid rgba(246, 240, 230, 0.16); max-width: 42ch; }
.sign-panel { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.sign-panel h2 { font-family: var(--serif); font-weight: 560; font-size: 32px; margin: 0 0 8px; }
.form { display: grid; gap: 12px; margin: 18px 0 8px; }
label { display: grid; gap: 6px; font-size: 14px; }
label span { color: var(--muted); }
input[type="email"], input[type="password"], input[type="text"], input[type="url"], input[type="number"], textarea, select {
  width: 100%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
textarea { resize: vertical; }
.primary, .quiet, .text-button {
  border-radius: 999px;
  padding: 10px 16px;
  border: 0;
}
.primary { background: var(--teal); color: #f6f0e6; font-weight: 600; }
.primary:hover { background: var(--teal-deep); }
.primary:disabled, .quiet:disabled { opacity: 0.55; cursor: wait; }
.quiet { background: transparent; border: 1px solid #cbbba6; }
.quiet:hover { background: rgba(255, 250, 243, 0.7); }
.text-button { background: transparent; padding: 0; color: var(--clay); }
.accounts { display: grid; gap: 10px; margin-top: 22px; }
.accounts h3 { margin: 0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.account {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: center;
  padding: 12px 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.account b { display: block; }
.account small { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; }

.shell { min-height: 100vh; }
.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  overflow: visible;
  gap: 10px 16px;
  padding: 10px 22px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand em { font-style: normal; font-family: var(--serif); font-weight: 560; }
.class-name { color: var(--muted); }
.term-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}
.term-bar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.term-bar select {
  width: auto;
  min-width: 6.5rem;
  padding: 6px 8px;
  background: var(--paper);
}
.menu-wrap { position: relative; }
.menu-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid #cbbba6;
  background: transparent;
  padding: 0;
  color: var(--ink);
}
.menu-button:hover, .menu-button[aria-expanded="true"] { background: rgba(14, 107, 92, 0.08); }
.bars { display: grid; gap: 4px; width: 18px; }
.bars span { display: block; height: 2px; border-radius: 1px; background: currentColor; }
.menu-panel[hidden] { display: none !important; }
.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(380px, calc(100vw - 32px));
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
  z-index: 6;
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 80px);
  overflow: auto;
}
.menu-panel h2 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 22px;
  margin: 8px 0 0;
}
.menu-panel h2:first-child { margin-top: 0; }
.menu-form { display: grid; margin: 0; }
.menu-panel .primary { justify-self: start; }
.spacer { flex: 1; }
.who { color: var(--muted); }
.shell-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
.side {
  min-height: calc(100vh - 64px);
  padding: 18px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 64px;
}
.side a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
}
.side a[aria-current="page"], .side a:hover { background: rgba(14, 107, 92, 0.08); }
.lock-card {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}
.lock-card.locked { background: var(--clay-soft); border-color: #e3c2ba; }
.lock-card p { margin: 0 0 10px; font-size: 14px; }
.lock-card strong { display: block; margin-bottom: 4px; }
.main { padding: 28px 32px 72px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-bottom: 18px; }
.page-head h1, .task-head h1 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  font-size: 40px;
  line-height: 1.05;
  margin: 0;
}
.blurb { max-width: 62ch; color: var(--muted); margin-top: 0; }
.task-list { display: grid; gap: 12px; }
.task-card {
  display: block;
  text-decoration: none;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
a.task-card:hover { border-color: #c9b89f; }
.task-card h2 { margin: 8px 0 4px; font-size: 22px; font-family: var(--serif); font-weight: 560; }
a.task-open { display: block; color: inherit; text-decoration: none; }
a.task-open:hover h2 { color: var(--teal-deep); }
.task-card .rubric-editor { margin-top: 14px; }
.page-head .primary { white-space: nowrap; }
.card-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.chip.graded, .chip.code { color: var(--teal-deep); }
.chip.practice { color: var(--gold); }
.chip.guided { color: var(--navy); }
.chip.silent, .chip.writing { color: var(--muted); }
.chip.checked { color: var(--navy); }
.score-block { text-align: right; }
.score-mark { font-family: var(--serif); font-size: 40px; line-height: 0.9; }
.score-label, .kicker {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.task-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 8px; }
.prose { white-space: pre-wrap; max-width: 72ch; margin: 8px 0 18px; }
.status-line { color: var(--muted); margin-top: 0; }
.workspace { display: grid; gap: 18px; align-items: start; }
.workspace.with-tutor { grid-template-columns: minmax(0, 1fr) 320px; }
.lecture-banner { margin: 0 0 16px; }
.lecture-note { margin: 0 0 12px; }
.lecture-prompt {
  display: grid;
  gap: 8px;
  max-width: 72ch;
  margin: 8px 0 18px;
}
.lecture-prompt .quiet { justify-self: start; }
.lecture-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lecture-actions select { width: auto; flex: 1 1 140px; min-width: 0; }
.lecture-keys { margin-top: 8px; }
.panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
}
.files-panel h2, .publish .attachment-group h2 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 28px;
  margin: 0 0 8px;
}
.attachment-group { display: grid; gap: 8px; }
.attachment-group h3 { margin: 0; font-size: 16px; }
.attachment-group .muted { margin: 0; }
.attachment-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.attachment-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.attachment-row a, .attachment-row .name { font-weight: 600; overflow-wrap: anywhere; }
.empty-file { padding: 0; background: transparent; border: 0; }
.file-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.file-pick input[type="file"] { max-width: 100%; }
.editor-shell { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fffdf8; }
.editor-bar, .panel-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f6f0e6;
  border-bottom: 1px solid var(--line);
}
.editor-shell .editor-bar { align-items: flex-start; flex-wrap: wrap; }
.file-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}
.editor-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
}
.file-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--mono);
  font-size: 13px;
}
.editor-shell .file-tab.active { background: #fffdf8; border-color: var(--line); }
.editor-shell .file-tab.chosen:not(.active) { background: #fffdf8; border-color: var(--gold); }
button.tab-switch {
  border: 0;
  background: transparent;
  padding: 2px 6px;
  font: 13px/1.3 var(--mono);
}
button.tab-close {
  border: 0;
  background: transparent;
  width: 1.25rem;
  padding: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
button.tab-close:disabled { opacity: 0.35; cursor: default; }
input.tab-name, input.file-add-name {
  max-width: 40vw;
  padding: 4px 8px;
  border-radius: 999px;
  font: 13px/1.3 var(--mono);
  background: #fffdf8;
}
input.tab-name { width: 12rem; }
input.file-add-name { width: 8.5rem; }
.file-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0 10px 8px;
  background: #f6f0e6;
  border-bottom: 1px solid var(--line);
}
.file-add .banner { flex: 1 1 100%; margin: 0; }
.save-state { color: var(--muted); font-size: 13px; }
.editor-body { display: grid; grid-template-columns: 3rem minmax(0, 1fr); }
.gutter {
  margin: 0;
  padding: 12px 8px 12px 0;
  text-align: right;
  color: #9a8d7d;
  overflow: hidden;
  font: 13.5px/1.55 var(--mono);
  background: #f6f0e6;
}
textarea.code, pre.code-read {
  margin: 0;
  border: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 220px;
  padding: 12px;
  background: transparent;
  font: 13.5px/1.55 var(--mono);
  tab-size: 4;
  white-space: pre;
  overflow-x: auto;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}
.editor-shell, .editor-body, .work { min-width: 0; }
textarea.draft {
  width: 100%;
  min-height: 380px;
  border: 0;
  background: transparent;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  padding: 8px 4px 18px;
}
.questions { display: grid; gap: 12px; }
.question { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.question:last-child { border-bottom: 0; }
.question h3 { margin: 0 0 6px; font-size: 16px; }
.options { display: grid; gap: 6px; margin: 8px 0; }
.options label { grid-template-columns: auto 1fr; align-items: center; }
.feedback { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: #f6f0e6; }
.feedback.pass { background: var(--good-soft); }
.feedback.miss { background: var(--clay-soft); }
.results { display: grid; gap: 10px; }
.case { padding: 10px 0; border-top: 1px solid var(--line); }
.case header { display: flex; gap: 8px; align-items: center; }
.case h3 { margin: 0; font-size: 16px; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.badge.pass { background: var(--good-soft); color: var(--good); }
.badge.miss { background: var(--clay-soft); color: var(--clay); }
.badge.wait { background: #efe6d4; color: var(--muted); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare p, .field-label { margin: 8px 0 4px; color: var(--muted); font-size: 13px; }
pre.out {
  margin: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  font: 13px/1.45 var(--mono);
}
.compiler {
  border-left: 3px solid var(--clay);
  background: var(--clay-soft);
  padding: 10px 12px;
  border-radius: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.compiler pre {
  margin: 6px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  font: 13px/1.45 var(--mono);
}
aside.tutor {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 100px);
}
aside.tutor header { padding: 14px 14px 0; }
aside.tutor header h2 { font-family: var(--serif); margin: 0 0 4px; font-weight: 560; }
aside.tutor header p { margin: 0; color: var(--muted); font-size: 14px; }
.tutor-log { flex: 1; min-height: 120px; max-height: 420px; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.bubble { padding: 8px 10px; border-radius: 12px; white-space: pre-wrap; position: static; }
.bubble.student { background: #f6f0e6; align-self: flex-end; max-width: 95%; }
.bubble.tutor {
  background: #e7f3f0;
  align-self: flex-start;
  max-width: 95%;
  position: static;
  top: auto;
  display: block;
  border: 0;
  max-height: none;
}
.notice { background: var(--clay-soft); border-radius: 12px; padding: 10px; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.composer input { flex: 1; }
table { width: 100%; border-collapse: collapse; background: var(--paper-2); border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
.excluded { color: var(--muted); }
.banner { padding: 10px 12px; border-radius: 10px; background: var(--clay-soft); color: var(--clay); }
.muted { color: var(--muted); }
.sign-copy p.muted { color: #e6dccb; }
.account > div { display: grid; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.row-actions { display: flex; gap: 8px; align-items: center; }
.check-row, .publish-check {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  display: grid;
  gap: 8px;
  background: var(--paper-2);
}
.publish { max-width: 760px; display: grid; gap: 12px; }
.loading { color: var(--muted); }
.console-block { margin-top: 14px; min-width: 0; max-width: 100%; }
.console-shell {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: clip;
  background: #1c1712;
  min-width: 0;
  max-width: 100%;
}
.console-shell .editor-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}
.console-shell .file-tab { padding: 2px 6px; }
.console-shell .save-state {
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.console-actions {
  display: grid;
  grid-template-columns: 4.75rem 5.25rem;
  gap: 8px;
  align-items: center;
}
.console-actions .primary, .console-actions .quiet {
  width: 100%;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}
.console-notes { min-width: 0; max-width: 100%; }
.console-notes .compiler { margin: 10px; }
.console-run { min-width: 0; max-width: 100%; }
.console-run.with-plots {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(200px, 0.85fr);
  gap: 12px;
  align-items: start;
}
.plot-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  min-width: 0;
  overflow: hidden;
}
.plot-bar {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.plot-empty, .plot-error {
  margin: 0;
  padding: 12px;
  color: var(--muted);
}
.plot-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding: 10px;
}
.plot-list:empty { display: none; }
.plot-list img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 8px;
}
.console-frame { position: relative; }
.console-screen {
  min-height: 180px;
  max-height: 320px;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  padding: 12px;
  background: #1c1712;
  color: #f6f0e6;
  font: 13.5px/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
}
.console-screen:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}
.console-placeholder { color: #cbbba6; }
.console-stderr { color: #f0c2b6; }
.console-cursor {
  display: inline-block;
  width: 0.62em;
  height: 1.05em;
  margin-left: 1px;
  background: #f6f0e6;
  vertical-align: text-bottom;
  animation: console-blink 1.1s steps(1) infinite;
}
.console-screen.is-idle .console-cursor { visibility: hidden; }
input.console-capture {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  min-width: 0;
  max-width: 1px;
  margin: 0;
  opacity: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
}
@keyframes console-blink {
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .console-cursor { animation: none; }
}

.student-bench .bench { display: grid; gap: 16px; }
.rubric-read, .rubric-editor, .brief, .submission, .roster-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.rubric-read h2, .rubric-editor h2, .brief h2, .submission h2, .roster h2, .grade-feedback h2 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 28px;
  margin: 0 0 8px;
}
.rubric-read ol { margin: 8px 0 0; padding-left: 1.2rem; display: grid; gap: 12px; }
.rubric-read li p, .grade-item p, .criterion-row textarea { margin: 4px 0 0; }
.criterion-line, .grade-item header, .roster-card header, .desk-head, .section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.points { color: var(--teal-deep); font-weight: 600; white-space: nowrap; }
.grade-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grade-note:empty { display: none; }
.grade-feedback { display: grid; gap: 10px; }
.grade-item { padding-top: 8px; border-top: 1px solid var(--line); }
.grade-item h3, .source-file h3, .roster-card h3 { margin: 0; font-size: 18px; }
.waiting { margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; background: #efe6d4; }

.grading-desk { display: grid; gap: 18px; }
.grading-desk .desk-head {
  background: #1c1712;
  color: #f6f0e6;
  border-radius: 18px;
  padding: 22px 24px;
  align-items: flex-end;
}
.grading-desk .desk-head h1 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  font-size: 40px;
  line-height: 1.05;
  margin: 0 0 10px;
}
.grading-desk .desk-head .kicker { color: #e6dccb; }
.grading-desk .desk-head .text-button { color: #f0c2b6; }
.grading-desk .chip { color: #f6f0e6; border-color: rgba(246, 240, 230, 0.45); }
.grading-desk .brief h3 { margin: 14px 0 6px; font-size: 16px; }
.roster { display: grid; gap: 12px; }
.roster-card header { align-items: center; }
.roster-card.open { border-color: var(--teal); box-shadow: var(--shadow); }
.roster-card .muted { margin: 0; }
.roster-score { text-align: right; }
.roster-score .score-mark { font-size: 32px; }
.roster-feedback { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.roster-feedback li { display: grid; gap: 2px; }
.roster-feedback span { color: var(--ink); }
a.file-link {
  display: inline-block;
  width: fit-content;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid #cbbba6;
}
.source-list { display: grid; gap: 14px; }
.source-file h3 { font-family: var(--serif); font-weight: 560; }
pre.source-code {
  margin: 8px 0 0;
  padding: 14px 16px;
  background: #fffaf3;
  border: 1px solid var(--line);
  border-radius: 12px;
  white-space: pre;
  overflow: auto;
  font: 13.5px/1.55 var(--mono);
  tab-size: 4;
}
.criterion-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  display: grid;
  gap: 8px;
  background: #fffaf3;
}
.rubric-editor { display: grid; gap: 8px; }

.class-office { margin: 8px 0 28px; display: grid; gap: 12px; }
.class-office h2, .ledger-card h2, .office-card h3 {
  font-family: var(--serif);
  font-weight: 560;
  margin: 0;
}
.class-office h2, .ledger-card h2 { font-size: 28px; }
.office-card h3 { font-size: 22px; }
.office-card h4 { margin: 8px 0 0; font-size: 16px; }
.office-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.office-form { margin: 12px 0; }
.model-choice { display: flex; gap: 16px; margin: 8px 0; }
.model-choice label { display: flex; gap: 8px; align-items: center; }
.person-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.person-row label { flex: 1 1 180px; }
.roster-list { list-style: none; padding: 0; margin: 8px 0 12px; }
.roster-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.admin-desk { min-height: 100vh; }
.admin-top {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 22px;
  background: #1c1712;
  color: #f6f0e6;
}
.admin-top .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.admin-top .brand em { font-style: normal; font-family: var(--serif); font-weight: 560; }
.admin-top .who { color: #e6dccb; }
.admin-top .quiet { color: #f6f0e6; border-color: rgba(246, 240, 230, 0.4); }
.admin-top .quiet:hover { background: rgba(246, 240, 230, 0.08); }
.admin-main { max-width: 1040px; margin: 0 auto; padding: 28px 22px 72px; }
.professor-card h3 { margin-bottom: 8px; }
.canvas-box {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.canvas-box h4 { margin: 0 0 4px; font-size: 16px; }
.token-state { margin: 4px 0 0; font-weight: 600; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pull-result { margin: 8px 0; }
.student-edits { display: grid; gap: 8px; margin: 8px 0 12px; }
.admin-mast h1 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 0.95;
  margin: 0 0 10px;
}
.admin-mast .lede { max-width: 62ch; color: var(--ink); }
.admin-ledger { display: grid; gap: 16px; }
.ledger-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.ledger-card .office-card { margin-top: 12px; }
.admin-gate .sign-copy { background: #241816; }
.admin-gate .mark { background: var(--clay); }
.admin-gate .kicker { color: #f0c2b6; }

@media (max-width: 960px) {
  .sign-in { grid-template-columns: 1fr; }
  .sign-copy, .sign-panel { padding: 32px 22px; }
  .shell-body { grid-template-columns: 1fr; }
  .side { position: static; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .lock-card { margin-top: 8px; }
  .workspace.with-tutor { grid-template-columns: 1fr; }
  .console-run.with-plots { grid-template-columns: 1fr; }
  aside.tutor { position: static; max-height: none; }
  .compare, .page-head, .task-head, .card-row { grid-template-columns: 1fr; display: grid; }
  .score-block, .roster-score { text-align: left; }
  .desk-head, .criterion-line, .grade-item header, .roster-card header, .section-title { display: grid; }
  .grading-desk .desk-head h1 { font-size: 32px; }
  .main, .admin-main { padding: 20px 16px 48px; }
  .admin-top { flex-wrap: wrap; height: auto; padding: 10px 14px; }
  .roster-list li, .attachment-row { display: grid; }
  .topbar {
    height: auto;
    flex-wrap: wrap;
    overflow: visible;
    padding: 10px 14px;
  }
  .brand em { font-size: 16px; }
  .spacer { display: none; }
}
