/* Everything below is specific to this page. Colour, type and spacing come
   from /css/site.css, so the theme toggle in the nav works here with nothing
   extra. The site uses no border-radius anywhere; neither does this. */

/* The site has one accent, #ff6b35, and one faint grey. As text on the light
   panel the accent is 2.8:1 and the grey 3.0:1 (3.7:1 on the dark one): the
   words "needs attention" were the least legible on a bright projector. So
   this page names its own text colours, each at 4.5:1 or better on the page,
   on a panel and on a highlighted row, in both themes:
     --bad    something failed, or cannot be undone
     --warn   somebody needs looking at
     --label  the small mono labels and ids (11 to 13 px)
     --link   a link, and the kicker over the title
   The accent itself stays for edges, rules and fills. Dark is the site's
   default; light comes by the media query or by the toggle, as there. */
:root {
  --bad: #f47067;
  --warn: #d29922;
  --label: #8d9199;
  --link: var(--accent);
  --link-hover: var(--accent-hover);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bad: #b62f2a;
    --warn: #855800;
    --label: #6b665e;
    --link: #b3420f;
    --link-hover: #8f3209;
  }
}
:root[data-theme="light"] {
  --bad: #b62f2a;
  --warn: #855800;
  --label: #6b665e;
  --link: #b3420f;
  --link-hover: #8f3209;
}
main a, dialog a, .detail a { color: var(--link); }
main a:hover, dialog a:hover, .detail a:hover { color: var(--link-hover); }
.pagehead__kicker { color: var(--link); }
/* The site's own small labels, where this page uses them. */
.meta__key, .legend, .none, .calendar thead th,
.calendar td[data-label]::before { color: var(--label); }

.section--dash { padding: 16px 24px 64px; }
/* One section of one activity is a wide table: seven columns, one of them a
   glyph per task. The site's 1080px is a reading width, so on those views
   the page, with the nav and the footer it lines up with, may be wider. */
body.is-board { --maxw: 1560px; }

/* Lab mode, for the hour the room is working: the site's nav, the strip,
   the page head, the crumbs, the meta strip, the tiles and the footer go,
   and one line that stays at the top of the window says what they said:
   the window, the four counts, and how old the board is. */
body.lab .nav, body.lab .istrip, body.lab .pagehead, body.lab .footer,
body.lab #board-view > .crumbs, body.lab #board-view > .meta,
body.lab #live-tab > .tiles { display: none; }
body.lab .section--dash { padding-top: 0; }
body.lab .tabs { margin-top: 6px; margin-bottom: 12px; }
body.lab #student-tab { padding-top: 12px; }
.labbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 18px;
  margin: 0 -24px;
  padding: 8px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--panel-line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--strong);
}
.labbar__t { font-family: var(--sans); font-size: 15px; font-weight: 600; }
.labbar__c b { font-weight: 700; }
.labbar__u { color: var(--label); }
.labbar__spacer { flex: 1; }
.crumbs__r { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
/* The page's small buttons, in the mono of its labels: the lab switch, the
   strip's Tools, a dialog's close, the detail panel's arrows. */
.lab-switch, .istrip__tools, .tools__x, .detail__nav button {
  font: inherit;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--ghost-border);
  padding: 3px 10px;
  cursor: pointer;
}
.lab-switch:hover, .istrip__tools:hover, .tools__x:hover,
.detail__nav button:hover { color: var(--strong); border-color: var(--muted); }
.lab-switch { font-size: 12px; }
.lab-switch, .istrip__tools { padding: 2px 10px; }

.hint  { color: var(--muted); font-size: 14px; }
.error { color: var(--bad); font-weight: 500; }
.faint { color: var(--label); }
.mono  { font-family: var(--mono); }

/* The site styles .btn for links; these are real buttons. */
button.btn,
button.btn--ghost {
  font-family: var(--sans);
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}
button.btn:hover { background: var(--accent-hover); }
button.btn--ghost,
button.btn--ghost:hover { color: var(--strong); border-color: var(--ghost-border); }
button.btn--ghost:hover { border-color: var(--muted); }
button[disabled] { opacity: .5; cursor: not-allowed; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.paste__input {
  font-family: var(--mono);
  font-size: 14px;
  padding: 10px 12px;
  width: 24rem;
  max-width: 100%;
  border: 1px solid var(--ghost-border);
  background: var(--panel-bg);
  color: var(--strong);
}
details.paste { margin-top: 24px; }
details.paste > summary { cursor: pointer; color: var(--muted); font-size: 14px; }

/* A callout in the site's idiom: flat, squared, one accent edge. */
.callout {
  border: 1px solid var(--panel-line);
  border-left: 2px solid var(--accent);
  background: var(--panel-bg);
  padding: 12px 16px;
  margin: 0 0 18px;
}
.callout p { margin: 0; font-size: 14px; line-height: 1.6; }
.callout p + p { margin-top: 6px; }
.callout code { font-family: var(--mono); font-size: .92em; color: var(--strong); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* Tabs and the sort switch share one rule. */
.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
  margin: 16px 0 22px;
  border-bottom: 1px solid var(--panel-line);
}
.tab {
  padding: 8px 0 10px;
  margin-bottom: -1px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--strong); }
.tab--on, .tab--on:hover { color: var(--strong); border-bottom-color: var(--accent); }
.tabs__spacer { flex: 1; }

/* Anything that opens the detail panel says so with its cursor, and the one
   that is open is marked. */
[data-d] { cursor: pointer; }
.d-on { background: color-mix(in srgb, var(--strong) 16%, transparent);
        outline: 1px solid var(--strong); outline-offset: 1px; }
button.key, button.bar__t {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
}
button.key { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.detail {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  max-height: 45dvh;
  overflow-y: auto;
  background: var(--panel-bg);
  border-top: 2px solid var(--strong);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .18);
}
.detail__inner { max-width: var(--maxw); margin: 0 auto; padding: 12px 24px 16px; }
.detail__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.detail__head h2 { flex: 1 1 12rem; margin: 0; font-size: 15px; font-weight: 600; color: var(--strong); letter-spacing: 0; }
.detail__nav { display: inline-flex; gap: 6px; }
.detail__body { font-size: 14px; line-height: 1.55; }
.detail__body p { margin: 6px 0 0; }
.detail__body .mono { font-size: 13px; }
.detail__body pre { margin: 6px 0 0; padding: 8px 10px; background: var(--bg); border: 1px solid var(--panel-line);
  font-family: var(--mono); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail__v { font-family: var(--mono); font-size: 14px; }
.detail__keys { display: grid; gap: 3px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; }

/* The filter box, in the tabs' row. */
.find { display: inline-flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.find__n { font-family: var(--mono); font-size: 12px; color: var(--label); white-space: nowrap; }
.find input {
  font-family: var(--mono);
  font-size: 13px;
  width: 19rem;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--ghost-border);
  border-radius: 0;
  background: var(--panel-bg);
  color: var(--strong);
  -webkit-appearance: none;
  appearance: none;
}
.find input::placeholder { color: var(--label); opacity: 1; }
.find--on input { border-color: var(--strong); }

.toggle { display: inline-flex; border: 1px solid var(--ghost-border); margin-bottom: 8px; }
.toggle button {
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 12px;
  background: transparent;
  color: var(--muted);
  border: 0;
  cursor: pointer;
}
.toggle button + button { border-left: 1px solid var(--ghost-border); }
.toggle button.on { background: var(--panel-bg); color: var(--strong); }

/* A column's name sorts by it, over the results and over the board's
   students; the arrow says which way. The arrow hangs in the cell's padding,
   or on the board in the gap between columns, so sorting never moves one. */
.calendar thead th > button,
.stu-head button {
  position: relative;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.calendar thead th > button:hover,
.calendar thead th[aria-sort="ascending"] > button,
.calendar thead th[aria-sort="descending"] > button,
.stu-head button:hover,
.stu-head [data-sort] > button { color: var(--strong); }
.calendar thead th > button::after,
.stu-head button::after { position: absolute; left: 100%; margin-left: 3px; }
.calendar thead th[aria-sort="ascending"] > button::after,
.stu-head [data-sort="ascending"] > button::after { content: "↑"; }
.calendar thead th[aria-sort="descending"] > button::after,
.stu-head [data-sort="descending"] > button::after { content: "↓"; }

/* The board's orders as buttons, for where the list has no header row. */
.stu-sort { display: none; }

/* Four numbers. */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.tile { border: 1px solid var(--panel-line); background: var(--panel-bg); padding: 14px 16px 12px; }
.tile__n {
  display: block;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--strong);
}
.tile__k { display: block; margin-top: 6px; }
/* The page's small label: mono, upper case, spaced. Under a tile's number,
   over a group of students, over a column, beside a service's line. */
.tile__k, .stu-group > summary, .stu-head, .tasklist th, .sub__body th, .digest__src {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--label);
}
.tile--warn .tile__n { color: var(--warn); }
.tile--ok .tile__n { color: var(--green); }

h2.h { font-size: 15px; font-weight: 600; margin: 30px 0 10px; color: var(--strong); }

/* One bar per task: pass, fail, crash, missing, in that order. */
.bars { display: grid; gap: 7px; }
.bar {
  display: grid;
  grid-template-columns: 8ch minmax(8rem, 20rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.bar__n { font-family: var(--mono); font-size: 12px; color: var(--label); white-space: nowrap; }
.bar__t { color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__t .faint { font-size: 12px; }
.bar__track { display: flex; height: 12px; background: var(--line); }
.bar__seg { height: 100%; box-sizing: border-box; }
.bar__seg + .bar__seg { border-left: 1px solid var(--bg); }
.bar__c { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
/* Each state has its own fill, so a bar reads without its colours: solid
   for pass and at-keys (green against the text colour), two bands for a fail,
   stripes one way for a crash, upright for a timeout, a hollow box for
   missing, dots for open and not run, a thin hatch the other way for
   locked. The legend's swatches are these same rules. */
.v-PASS    { background: var(--green); }
.v-FAIL    { background: linear-gradient(var(--bad) 0 5px, var(--bg) 5px 7px, var(--bad) 7px); }
.v-CRASH   { background: repeating-linear-gradient(135deg, var(--bad) 0 2px, transparent 2px 5px) var(--bg);
             box-shadow: inset 0 0 0 1px var(--bad); }
.v-OTHER   { background: repeating-linear-gradient(90deg, var(--muted) 0 2px, transparent 2px 5px) var(--bg); }
.v-MISSING { background: var(--bg); box-shadow: inset 0 0 0 1px var(--label); }
.v-OPEN    { background: radial-gradient(circle, var(--label) 1.1px, transparent 1.6px) 0 0 / 4px 4px var(--bg); }
.v-KEYS    { background: var(--strong); }
.v-LOCKED  { background: repeating-linear-gradient(45deg, var(--label) 0 1px, transparent 1px 5px) var(--line); }
.legend__swatch { display: inline-block; width: 16px; height: 12px; }
.legend .g { font-size: 14px; }

/* One glyph per task in a student's latest run. */
.glyphs { font-family: var(--mono); font-size: 14px; letter-spacing: .12em; white-space: nowrap; }
.g { cursor: default; }
.g[data-d] { cursor: pointer; }
.g-PASS    { color: var(--green); }
.g-FAIL    { color: var(--bad); }
.g-CRASH   { color: var(--bad); font-weight: 700; }
.g-OTHER   { color: var(--muted); }
.g-MISSING { color: var(--label); }
.g-LOCKED  { color: var(--label); opacity: .7; }
.g-OPEN    { color: var(--muted); }
.g-KEYS    { color: var(--strong); font-weight: 700; }
.g--moved  { text-decoration: underline; text-underline-offset: 3px; }

/* Where a student is on a chain: the task, then a tick per key of that one
   task, or how many tries its code has had. */
.at { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.at__t { color: var(--strong); }
.at__done { color: var(--green); }
.at__left { color: var(--label); }
.at__miss { color: var(--warn); }
.at__note { color: var(--muted); }

/* A task's keys over the section, under its bar: the share who had each
   right at the first try. */
.keys { grid-column: 3 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -2px 0 4px;
        font-family: var(--mono); font-size: 12px; color: var(--muted); }
.key { cursor: pointer; white-space: nowrap; }
.key__n { color: var(--label); }
.key--low .key__v { color: var(--warn); font-weight: 700; }
.key--none .key__v { color: var(--label); }
.keys__more { margin-left: auto; text-align: right; }
.keys__more[open] { flex-basis: 100%; }
.keys__more > summary { color: var(--label); }
.keys__more > summary::before { content: "\25b8  "; }
.keys__more[open] > summary::before { content: "\25be  "; }
.keys__more > summary:hover { color: var(--strong); }
.keys__more__body { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline;
                    gap: 6px 14px; margin: 6px 0 2px; }
.keys__more__body button { font-family: var(--mono); font-size: 12px; padding: 3px 10px; }
.keys__more__body button:hover { color: var(--bad); border-color: var(--bad); }
.keylist { display: grid; gap: 3px; margin: 4px 0 2px; font-size: 13px; }
.keylist__k { font-family: var(--mono); font-size: 12px; color: var(--label); }
.keylist .typed { font-family: var(--mono); font-size: 12px; }

.st--warn  { color: var(--warn); }
.st--ok    { color: var(--green); }
.st--faint { color: var(--label); }

/* A fold: a block of the board that closes to one line. Its summary keeps a
   digest, so a closed block still says what matters ("most missed: task 06").
   Which blocks are open is remembered per device. */
details.block { border-top: 1px solid var(--panel-line); }
details.block:last-child { border-bottom: 1px solid var(--panel-line); }
details.block > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 14px 0;
}
/* Each fold draws its own marker, so the browser's is taken off, once. */
details.block > summary, .stu-group > summary, .keys__more > summary,
details.ev-sub > summary { cursor: pointer; list-style: none; }
details.block > summary::-webkit-details-marker, .stu-group > summary::-webkit-details-marker,
.keys__more > summary::-webkit-details-marker, details.ev-sub > summary::-webkit-details-marker { display: none; }
details.block > summary::before {
  content: "▸";
  font-family: var(--mono);
  color: var(--label);
  width: 1em;
  flex: 0 0 1em;
}
details.block[open] > summary::before { content: "▾"; }
details.block > summary:hover .block__t { color: var(--link); }
.block__t { font-size: 15px; font-weight: 600; color: var(--strong); }
.block__d { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.block__body { padding: 0 0 22px; }

/* Students, grouped by what they need: one list per group, each row a link. */
.stu-group { margin-bottom: 4px; }
.stu-group > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 10px 0 8px;
}
.stu-group > summary::before { content: "▸"; width: 1em; flex: 0 0 1em; }
.stu-group[open] > summary::before { content: "▾"; }
.stu-group > summary .n { color: var(--strong); }
.stu-group--warn > summary .n { color: var(--warn); }
.stu-group > summary .faint { text-transform: none; letter-spacing: 0; }
.stu-list { border: 1px solid var(--panel-line); background: var(--panel-bg); }
.stu {
  display: grid;
  grid-template-columns: minmax(10rem, 1.2fr) 10.5rem 5.5rem minmax(8rem, 1fr) minmax(9rem, 1.6fr) 6rem 6.5rem;
  gap: 0 14px;
  align-items: center;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}
.stu:first-child { border-top: 0; }
.stu:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.stu__name { color: var(--strong); }
.stu__id { font-family: var(--mono); font-size: 12px; color: var(--label); }
.stu__facts { display: contents; }
.stu__f { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.stu__f::before { content: attr(data-k) " "; color: var(--label); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; display: none; }
.stu__st { font-size: 13px; }
/* Where the latest run came from: three values on one line, cut where the
   column ends and whole in the cell's title. */
.stu__from { font-size: 12px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* On a chain, one column more: where each student is. */
.stu-list--chain .stu, .stu-head.stu-head--chain {
  grid-template-columns: minmax(10rem, 1.2fr) 10.5rem 4.5rem 9.5rem minmax(8rem, 1fr) minmax(9rem, 1.6fr) 6rem 6.5rem;
}
.stu-head {
  display: grid;
  grid-template-columns: minmax(10rem, 1.2fr) 10.5rem 5.5rem minmax(8rem, 1fr) minmax(9rem, 1.6fr) 6rem 6.5rem;
  gap: 0 14px;
  padding: 6px 14px 2px;
}

/* The feed: mono lines. */
.feed { font-family: var(--mono); font-size: 13px; line-height: 1.9; display: grid; gap: 2px; padding: 4px 0; }
/* The live feed holds the last thirty; ten rows show, the rest scroll. */
#feed { max-height: 27em; overflow-y: auto; padding-right: 6px; }

/* One student's page. */
.standing { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0 0 4px; font-family: var(--mono); font-size: 13px; }
.standing__item { display: flex; gap: 8px; }
.standing__k { color: var(--label); }
.standing__v { color: var(--strong); }
/* A code handed to a student from their page: shown once, big enough to
   read across a desk, then gone with the next render. */
.code-once { font: 700 1.6rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
             letter-spacing: .15em; color: var(--strong); margin: .35rem 0; }
/* The same code beside its button: one line, the text's own size. */
.stu__code { display: flex; align-items: center; gap: 6px; justify-self: end; white-space: nowrap; }
.stu__code button { font: inherit; font-size: 12px; padding: 2px 8px; }
.stu__code .code-once { font-size: 15px; letter-spacing: .12em; margin: 0; }
.stu__code .faint { font-size: 11px; }
/* A stored file opened in place on the student page. */
.files a { margin-right: .6rem; }
.file-view { max-height: 26rem; overflow: auto; margin: .4rem 0 .8rem; }
.walk { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; font-size: 14px; margin-left: auto; }
.walk a { color: var(--muted); }
.walk a:hover { color: var(--strong); }
.tasklist { width: 100%; border-collapse: collapse; font-size: 14px; }
.tasklist th, .tasklist td { text-align: left; vertical-align: top; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.tasklist th, .sub__body th { font-weight: 500; }
.tasklist th:first-child { width: 5rem; }
.tasklist th:nth-child(3) { width: 9rem; }
.tasklist details > summary { cursor: pointer; }
.tasklist .t-n { font-family: var(--mono); font-size: 12px; color: var(--label); white-space: nowrap; }
.tasklist .t-v { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.tasklist .t-d { color: var(--muted); font-size: 13px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border: 1px solid var(--ghost-border); color: var(--muted); }
.tag--on { border-color: var(--green); color: var(--green); }

/* The site's calendar table, with a few cell kinds of our own. */
.calendar .c-num  { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.calendar .c-id   { font-family: var(--mono); font-size: 12px; color: var(--label); }
.calendar .c-name { color: var(--strong); white-space: nowrap; }
.calendar tbody tr.row-link { cursor: pointer; }
.calendar tbody tr.row-on td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.calendar tbody tr.row-bad td { background: color-mix(in srgb, var(--accent) 9%, transparent); }

/* The results' grid: one narrow column per task between the scores and
   "counted". A mark is a small square: solid where verify has run what
   counts, hatched inside a dashed edge where the pass is still the student's
   own machine's word, a dot where the task is not passed, nothing at all for
   a student with nothing stored. */
.tk { display: inline-block; box-sizing: border-box; width: 12px; height: 12px; vertical-align: -1px; }
.tk--v { background: var(--green); }
.tk--p { border: 1px dashed var(--green);
         background: repeating-linear-gradient(135deg, var(--green) 0 1.5px, transparent 1.5px 4px); }
.tk--n { background: radial-gradient(circle, var(--label) 1.6px, transparent 2.1px); }
.calendar th.c-task, .calendar td.c-task { padding-left: 3px; padding-right: 3px; text-align: center; width: 20px; }
.calendar th.c-task > button { font-size: 11px; letter-spacing: 0; padding: 2px 1px; }
.calendar th.c-task--on > button { color: var(--strong); outline: 1px solid var(--strong); outline-offset: 1px; }
.calendar th.c-task--bonus > button { font-style: italic; }
.calendar tfoot td { padding: 8px 14px; border-top: 1px solid var(--panel-line); font-family: var(--mono);
                     font-size: 11px; color: var(--label); white-space: nowrap; }
.calendar tfoot td.c-task { padding-left: 1px; padding-right: 1px; }
.calendar td.c-break { display: none; }
#r-legend { margin: 0 0 8px; }
#r-task { margin: 0 0 10px; color: var(--text); }

/* The landing: one group per course, its closed activities folded away. */
.group { margin-top: 26px; }
.group + .group { margin-top: 34px; }
.group .none { margin: 4px 0 0; }
.group > h2.h { margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.group > h2.h .c-id { font-weight: 400; }
.group > h2.h .faint { font-size: 13px; font-weight: 400; }
details.closed { margin-top: 8px; }
details.closed > summary { cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 6px 0; }
details.closed > summary:hover { color: var(--strong); }
details.closed .calendar-scroll { margin-top: 8px; }
.group--past details.closed { margin-top: 0; }
.group--past details.closed > summary { padding: 4px 0; }

.ev {
  display: grid;
  grid-template-columns: 13ch minmax(8rem, 1fr) 6ch 6ch auto;
  gap: 0 14px;
  align-items: baseline;
}
.ev__t { color: var(--label); }
.ev__n a { color: var(--text); }
.ev__n a:hover { color: var(--strong); }
.ev__k { color: var(--muted); }
.ev__s { color: var(--strong); }
.feed-empty { color: var(--label); }

/* A check in the fold: the feed's line, which opens on the files behind it.
   A check from before 19 Sep 2026 stored none, so that one is the line and
   nothing more; the marker column keeps both of them aligned. */
.ev--check { grid-template-columns: 2ch 13ch 20ch minmax(4rem, 1fr) 7ch 7ch; }
.ev__m { color: var(--label); }
details.ev-sub:not([open]) > summary .ev__m::before { content: "\25b8"; }
details.ev-sub[open] > summary .ev__m::before { content: "\25be"; }
details.ev-sub > summary:hover .ev__m,
details.ev-sub[open] > summary .ev__m { color: var(--strong); }
details.ev-sub > .sub__body { padding: 2px 0 14px 2ch; font-family: var(--sans); }

/* One attempt on the student's page. */
details.sub { border: 1px solid var(--panel-line); background: var(--panel-bg); margin-bottom: 10px; }
details.sub > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  cursor: pointer;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--strong);
}
details.sub > summary .faint { font-size: 12px; }
.sub__body { padding: 0 14px 14px; font-size: 14px; }
.sub__body .files { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.sub__body .files a { color: var(--strong); }
.sub__body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sub__body th, .sub__body td { text-align: left; vertical-align: top; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); }
.sub__body pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--panel-line);
  font-family: var(--mono);
  font-size: 12px;
  overflow-x: auto;
  max-height: 14rem;
  white-space: pre-wrap;
}
.sub__body details > summary { cursor: pointer; color: var(--muted); font-size: 12px; }

/* The instructors' four pages as one row under the site nav. The row and
   its links are the shared script's (handin.strip, which brings their
   styles); the button that opens this page's tools is its own. */

/* The tools dialog. No border-radius, like everything else on the site. */
.tools { width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 64px);
  overflow-y: auto;          /* it is taller than a laptop screen with both halves */
  padding: 0; border: 1px solid var(--panel-line); background: var(--panel-bg);
  color: var(--text); }
.tools::backdrop { background: rgba(0, 0, 0, .58); }
.tools__head { display: flex; align-items: baseline; gap: 16px;
  padding: 18px 24px 12px; border-bottom: 1px solid var(--line); }
.tools__head h2 { margin: 0; font-size: 19px; color: var(--strong); flex: 1; }
.tools__runner { margin: 0; padding: 10px 24px; font-family: var(--mono); font-size: 13px;
  color: var(--label); border-bottom: 1px solid var(--line); }
.tools__runner.bad { color: var(--bad); }
.tools__h { margin: 0; padding: 16px 24px 4px; font-size: 13px; font-family: var(--mono);
  font-weight: 500; color: var(--label); border-top: 1px solid var(--line); }
.tools .hint { margin: 0; padding: 0 24px 10px; }
.tools__foot { margin: 0; padding: 12px 24px 18px; font-size: 13px; color: var(--label);
  border-top: 1px solid var(--line); }
.tools__ver { border-top: 0; padding-top: 0; font-size: 12px; }
.job { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px;
  align-items: start; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.job__t { color: var(--strong); font-weight: 500; }
.job__d { grid-column: 1; color: var(--muted); font-size: 14px; line-height: 1.55; }
.job__go { grid-column: 2; grid-row: 1 / span 2; }
.job__s { grid-column: 1 / -1; font-family: var(--mono); font-size: 13px;
  color: var(--label); }
.job__s.bad { color: var(--bad); }
.job__s.ok { color: var(--green); }
.job__log { grid-column: 1 / -1; margin: 6px 0 0; padding: 8px 10px; max-height: 150px;
  overflow: auto; background: var(--bg); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--muted);
  white-space: pre-wrap; }
@media (max-width: 560px) {
  .job { grid-template-columns: 1fr; }
  .job__go { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* The warning before a task's keys are cleared for a whole section. */
.ck__body { padding: 14px 24px 4px; font-size: 14px; line-height: 1.6; }
.ck__body p { margin: 0 0 10px; }
.ck__warn { color: var(--bad); font-weight: 600; }
.ck__keys { margin: 0 0 12px; padding-left: 1.2em; font-size: 13px; color: var(--muted); }
.ck__keys .mono { color: var(--label); }
.ck__type { display: block; }
.ck__type input { font-family: var(--mono); font-size: 14px; width: 6ch; padding: 3px 6px; margin-left: 8px;
  color: var(--strong); background: var(--bg); border: 1px solid var(--ghost-border); }
.ck__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 24px 18px;
  border-top: 1px solid var(--line); margin-top: 10px; }
.ck__foot button { padding: 6px 14px; }

/* What a service beside the grader says, in one line, on the landing and on
   a student's page; read here, acted on there. */
.digest { margin: -2px 0 12px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.digest__go { margin-left: auto; font-size: 13px; color: var(--muted); }
.digest__go:hover { color: var(--strong); }
.reasons { display: grid; gap: 6px; margin: 4px 0 12px; }
.reason { display: grid; grid-template-columns: 4ch 5ch minmax(0, 1fr); gap: 0 14px; font-size: 14px; align-items: baseline; }
.reason .p { font-family: var(--mono); font-size: 12px; color: var(--label); }
.reason .v { font-family: var(--mono); font-size: 13px; color: var(--strong); }
.src { font-size: 14px; margin: 6px 0; }
.tag--warn { border-color: var(--warn); color: var(--warn); }
.mastery { display: grid; gap: 7px; margin: 4px 0 12px; }
.m { display: grid; grid-template-columns: 3ch minmax(8rem, 16rem) minmax(8rem, 20rem) 4ch; gap: 0 14px; align-items: center; font-size: 14px; }
.m__l { font-family: var(--mono); font-size: 12px; color: var(--label); }
.m__t { color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m__bar { display: block; height: 10px; background: var(--line); }
.m__bar > span { display: block; height: 100%; background: var(--accent); }
.m__v { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }

[hidden] { display: none !important; }
#signin { margin: 4px 0 8px; min-height: 44px; }

/* A tablet held upright, and a phone on its side: 701 to 1023px. The list
   of students keeps its columns and its header, which is what a room is
   scanned by; the one column it cannot seat, where the run came from, is a
   second line under each row, and under the header, which still sorts by
   it. A row with nothing to say there has no second line. */
@media (min-width: 701px) and (max-width: 1023px) {
  .stu, .stu-head {
    grid-template-columns: minmax(7rem, 1.4fr) 7.5rem 3.25rem minmax(6.5rem, 1fr) 5.25rem 4.5rem;
    gap: 0 10px;
  }
  .stu-list--chain .stu, .stu-head.stu-head--chain {
    grid-template-columns: minmax(7rem, 1.4fr) 7.5rem 3.25rem 6.75rem minmax(6.5rem, 1fr) 5.25rem 4.5rem;
  }
  .stu__from, .stu-head [data-col="from"] { grid-row: 2; grid-column: 1 / -1; }
  .stu__from { padding-top: 2px; }
  .stu__from.none { display: none; }
  .stu__from::before { display: inline; }
  .stu-head { row-gap: 2px; }
  /* A task's bar keeps its width: its numbers go under it, over its keys.
     On one line the title and the numbers left the bar none at all. */
  .bar { grid-template-columns: 8ch minmax(8rem, 15rem) minmax(0, 1fr); gap: 4px 14px; }
  .bar__c { grid-column: 3; white-space: normal; }
}
/* Under 800px a chain's eight columns are one too many even so: when they
   were last seen and how long without progress join the second line, each
   under its own name in the header's second line. */
@media (min-width: 701px) and (max-width: 800px) {
  .stu-list--chain .stu, .stu-head.stu-head--chain {
    grid-template-columns: minmax(7rem, 1.4fr) 7.5rem 3.25rem 6.75rem minmax(6.5rem, 1fr);
  }
  .stu-list--chain .stu__from, .stu-head--chain [data-col="from"] { grid-column: 1 / 4; }
  .stu-list--chain .stu__from.none { display: block; }
  .stu-list--chain .stu__f[data-k="seen"], .stu-head--chain [data-col="seen"] { grid-row: 2; grid-column: 4; }
  .stu-list--chain .stu__f[data-k="no progress"], .stu-head--chain [data-col="stuck"] { grid-row: 2; grid-column: 5; }
}

/* The results' table is as wide as its tasks are many, and under 1024px it
   does not fit: each row is a card, as the site's calendar is on a phone
   (site.css, whose rule starts at 700px; these are its lines, for this one
   table, from 1023px down). On a tablet a card is two lines: the name, the
   three scores and the marks, then when it was counted and what needs a
   look. On a phone each of those is a line of its own (the block below). */
@media (max-width: 1023px) {
  #results-tab .calendar-scroll { overflow-x: visible; border: 0; background: transparent; }
  #results, #results tbody, #results td { display: block; width: auto; min-width: 0; }
  #results thead, #results tfoot, .r-cols { display: none; }
  #results tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; margin-bottom: 10px; padding: 4px 0;
                      border: 1px solid var(--panel-line); background: var(--panel-bg); }
  #results tbody tr:hover td { background: transparent; }
  #results tbody td { flex: 0 1 auto; box-sizing: border-box; border-bottom: 0; padding: 5px 14px; }
  #results td[data-label]::before { content: attr(data-label); display: inline; margin: 0 6px 0 0; font-family: var(--mono);
                                    font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
  #results td[data-label="student"] { flex: 1 1 14rem; }
  #results td[data-label="student"]::before { display: none; }
  #results td[data-label="mark"], #results td[data-label="verified"],
  #results td[data-label="self"] { padding-right: 4px; }
  #results td[data-label="counted"] { flex: 1 1 100%; }
  #results td[data-label="counted"] .c-num { white-space: normal; }
  #results td[data-label="needs a look"] { flex: 1 1 100%; }
  #results td[data-label="needs a look"]:has(> .none) { display: none; }
  /* The marks, each under its task's number: a card has no header to say
     which is which. */
  #results td.c-task { flex: 0 0 auto; width: auto; padding: 5px 3px; text-align: center; }
  #results td.c-task::before { content: attr(data-n); display: block; margin-bottom: 2px; font-family: var(--mono);
                               font-size: 9px; color: var(--label); }
  #results td.c-task--first { padding-left: 14px; }
  #results td.c-break { display: none; }
}

@media (max-width: 700px) {
  .section--dash { padding: 12px 16px 48px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: 10px 12px 9px; }
  .tile__n { font-size: 24px; }
  .bar { grid-template-columns: 7ch minmax(0, 1fr); gap: 6px 12px; }
  .bar__track, .bar__c { grid-column: 1 / -1; }
  .bar__c { white-space: normal; }
  .ev { grid-template-columns: 13ch minmax(0, 1fr); }
  .ev__k, .ev__s, .ev .glyphs { grid-column: 2; }
  /* Three lines: when and what it scored, then the window, then the note. */
  .ev--check { grid-template-columns: 2ch 13ch 6ch minmax(0, 1fr); }
  .ev--check .ev__k { grid-area: 1 / 3; }
  .ev--check .ev__s { grid-area: 1 / 4; }
  .ev--check .ev__n { grid-area: 2 / 2 / auto / -1; }
  .ev--check .ev__x { grid-area: 3 / 2 / auto / -1; }
  /* A student row becomes a three-line card: who and where they stand, the
     run, then the numbers with their labels. */
  .stu-head { display: none; }
  .stu { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 10px 12px 12px; }
  .stu__who { flex: 1 1 auto; order: 0; }
  .stu__st { order: 0; text-align: right; }
  .stu__run { order: 1; flex: 1 1 100%; }
  .stu__at { order: 2; flex: 0 0 auto; }
  .keys { grid-column: 1 / -1; }
  .stu__f { order: 2; font-size: 12px; }
  .stu__f::before { display: inline; }
  .stu__from { order: 3; flex: 1 1 100%; white-space: normal; overflow-wrap: anywhere; }
  .standing { gap: 6px 18px; }
  .walk { margin-left: 0; }
  /* Results on a phone: the name, then the three scores on one line, then
     the marks, then when it was counted, each a line of its own. */
  #results tbody td, #results td[data-label="student"] { flex: 0 0 100%; }
  #results td[data-label="mark"], #results td[data-label="verified"],
  #results td[data-label="self"] { flex: 0 0 auto; padding-right: 18px; }
  #results td.c-break { display: block; height: 0; padding: 0; }   /* the marks start a line of their own */
  #results td.c-task { flex: 0 0 auto; padding: 5px 4px 5px 0; }
  #results td.c-task--first { padding-left: 14px; }
  /* The cards have no header row, so the named orders are the phone's sort.
     They wrap and stretch to fill each line, the border showing through a
     one-pixel gap so the lines keep their dividers. */
  #r-sort, .stu-sort { display: flex; flex-wrap: wrap; gap: 1px; background: var(--ghost-border); }
  #r-sort button, .stu-sort button { flex: 1 1 auto; background: var(--bg); }
  #r-sort button + button, .stu-sort button + button { border-left: 0; }
  #r-sort button.on, .stu-sort button.on { background: var(--panel-bg); }
  /* The task list: number, title and verdict on one line, detail under it. */
  .tasklist thead { display: none; }
  .tasklist, .tasklist tbody { display: block; }
  .tasklist tr { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 0 10px; align-items: baseline; border-bottom: 1px solid var(--line); padding: 7px 0; }
  .tasklist td { border: 0; padding: 0; }
  .tasklist td.t-d { grid-column: 1 / -1; }
  .tasklist td.t-d:empty { display: none; }
  /* An attempt's tasks likewise: five columns would crush the detail. The
     file and its verdict, then how it ran and for how long, then the detail. */
  .sub__body thead { display: none; }
  .sub__body table, .sub__body tbody { display: block; }
  .sub__body tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline;
                  border-bottom: 1px solid var(--line); padding: 8px 0; }
  .sub__body td { border: 0; padding: 0; overflow-wrap: anywhere; }
  .sub__body td.a-ran::before, .sub__body td.a-ms::before { content: attr(data-k) " "; font-size: 11px; letter-spacing: .06em;
                                                            text-transform: uppercase; color: var(--label); }
  .sub__body td.a-d { grid-column: 1 / -1; display: flex; flex-wrap: wrap; column-gap: 20px; }
  .sub__body td.a-d > details[open] { flex: 1 1 100%; min-width: 0; }
  .sub__body td.a-d:empty { display: none; }
  .m { grid-template-columns: 3ch minmax(0, 1fr) 4ch; }
  .m__bar { grid-column: 1 / -1; }
  .digest__go { margin-left: 0; }
  .detail__inner { padding: 10px 16px 14px; }
  /* The filter is a line of its own, at 16px so a phone does not zoom in. */
  .find { flex: 1 1 100%; order: 3; }
  .find input { flex: 1; width: auto; min-width: 0; font-size: 16px; }
  /* Three short lines: what this is and the way out of lab mode; the
     window and how old the board is; the four counts. */
  .labbar { margin: 0 -16px; padding: 6px 16px; gap: 1px 12px; font-size: 12px; }
  .labbar__t { font-size: 14px; flex: 1 1 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .labbar #lab-off { order: 1; }
  .labbar #lb-window { order: 2; }
  .labbar__u { order: 3; margin-left: auto; }
  .labbar__c, .labbar #lb-pulse { order: 4; flex-basis: 100%; }
  .labbar__spacer { display: none; }
  .labbar__more { display: none; }

  /* --- a finger is the pointer --------------------------------------------
     Whatever can be tapped is at least 40px tall, the site's own nav and
     footer included; whatever can be typed in is 16px, or an iPhone zooms
     the page in on it. Desktop keeps its density: all of it is in here. */
  .nav { padding: 8px 16px; gap: 0 14px; }
  .skip, .nav__brand, .nav__links a, .footer__social a { display: inline-flex; align-items: center; justify-content: center;
                                                         min-width: 24px; min-height: 40px; }
  .theme-toggle { width: 40px; height: 40px; }
  .footer__inner { padding: 20px 16px 24px; gap: 12px; }
  .footer__bar { padding-top: 8px; gap: 0 16px; }
  main a, .detail a { display: inline-block; padding-block: 12px; }
  .files a { padding-block: 13px; }
  .tab { padding: 10px 0 10px; }
  .btn, button.btn, button.btn--ghost, .lab-switch, .toggle button, .istrip__tools, .tools__x,
  .keys__more__body button, .stu__code button, .ck__foot button { min-height: 40px; }
  .lab-switch, .istrip__tools, .tools__x, .keys__more__body button, .stu__code button { padding: 0 12px; }
  .detail__nav button { min-width: 44px; min-height: 40px; }
  .detail__head { align-items: center; }
  .detail__head h2 { flex-basis: 8rem; }
  .crumbs { align-items: center; gap: 0 20px; }
  .paste__input, .ck__type input { font-size: 16px; }
  .ck__type input { width: 7ch; min-height: 40px; padding: 6px 8px; box-sizing: border-box; }
  .find input { min-height: 40px; box-sizing: border-box; }
  details.closed > summary, details.paste > summary,
  .tasklist details > summary, .sub__body details > summary { padding-block: 13px; }
  .stu-group > summary { padding: 14px 0 12px; }
  details.sub > summary { padding: 12px 14px; }
  details.ev-sub > summary { min-height: 40px; align-items: center; }
  .keys__more > summary { display: inline-flex; align-items: center; min-height: 40px; }
  /* A task's title and its keys under the bar. */
  button.bar__t { min-height: 40px; }
  .keys { gap: 0 10px; margin: 0; }
  button.key { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; font-size: 13px; }
  /* One glyph per task, each a share of the whole line: with ten tasks a
     glyph is 33px wide on a 390px phone, and never less than the line gives. */
  .stu .glyphs, .ev .glyphs { display: flex; letter-spacing: 0; font-size: 16px; }
  .stu .glyphs .g, .ev .glyphs .g { flex: 1 1 0; min-width: 0; max-width: 44px; padding: 10px 0; text-align: center; }
  .stu .glyphs { margin: -2px 0 -4px -10px; }     /* the first glyph sits under the name, not 10px in */
  .ev .glyphs { grid-column: 1 / -1; }
  .at[data-d] { display: inline-block; padding-block: 12px; }
  .stu .at[data-d] { margin-block: -10px; }       /* 40px to tap, a line of text to look at */
  .at [data-d] { display: inline-block; padding: 12px 8px; }
  /* A card whose every part opens the same page: the link is 40px tall
     inside the card, not 22px more of card. */
  .calendar a.c-name { margin-block: -8px; }
  /* The header row is gone, and so are its sorts: the same orders as buttons. */
  .stu-sort { margin: 0 0 6px; }
  /* The cards of the landing and of the Flags tab have no header either;
     hidden outright, not clipped, so that nothing of it lies off the page. */
  .calendar thead { display: none; }
  /* The board comes first: the site's own paragraph about its author is
     not shown under a section's views. */
  body.is-board .footer__bio { display: none; }
}

/* Try it yourself: an instructor's own try-outs, under the landing. */
.tryout { margin-top: 28px; }
.tryout__code, .tryout__start { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.tryout__code .stu__code { justify-self: auto; }
.tryout__start select { font: inherit; font-size: 13px; padding: 3px 6px; max-width: 100%; }
.tryout__acts { display: inline-flex; gap: 12px; font-size: 13px; }
