@media (max-width: 767px) {
  .editor-layout { grid-template-columns: 1fr; }
}

body>main.wide {
  max-width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  height: calc(100vh - 2 * var(--pico-block-spacing-vertical));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.toolbar button {
  height: 2.1rem;
  padding: 0 .9rem;
  margin-bottom: 0;
  line-height: 1;
  vertical-align: middle;
}

.toolbar a[role="button"] {
  height: 2.1rem;
  padding: 0 .9rem;
  margin-bottom: 0;
  line-height: 2.1rem;
  background: var(--pico-del-color);
  border-color: var(--pico-del-color);
  color: var(--pico-primary-inverse);
}

.toolbar a[role="button"]:hover {
  filter: brightness(.9);
}

.grade-box {
  display: inline-flex;
  align-items: center;
  height: 2.1rem;
  padding: 0 .75rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  font-size: .85rem;
  background: var(--pico-card-background-color);
}

.grade-box.graded {
  border-color: var(--pico-primary);
  color: var(--pico-primary);
}


td.row-actions,
th.row-actions {
  text-align: right;
  white-space: nowrap;
}

td.row-actions form {
  margin: 0;
  display: inline-block;
}

td.row-actions a {
  display: inline-flex;
  align-items: center;
  height: 2.1rem;
  margin-right: .5rem;
  vertical-align: middle;
}

#settings-form {
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: 28rem;
  margin: 0;
}

#settings-form input {
  flex: 1;
  height: 2.1rem;
  margin: 0;
  padding: 0 .75rem;
  font-size: .875rem;
}

#settings-form button {
  width: auto;
  height: 2.1rem;
  margin: 0;
  padding: 0 1rem;
  white-space: nowrap;
}

.rollcall-picker {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

.rollcall-picker input,
.rollcall-picker button,
.rollcall-picker label {
  width: auto;
  margin: 0;
}

.rollcall-picker input,
.rollcall-picker button {
  height: 2rem;
  padding-top: 0;
  padding-bottom: 0;
}

.rollcall-present {
  color: var(--pico-ins-color);
}

.settings-note {
  margin-top: .5rem;
  font-size: .8rem;
  color: var(--pico-muted-color);
}

.copy-key {
  width: auto;
  height: auto;
  margin: 0 0 0 .5rem;
  padding: .15rem .5rem;
  font-size: .75rem;
  vertical-align: middle;
}

td.row-actions form + form {
  margin-left: .5rem;
}

#student-table {
  width: 100%;
  table-layout: fixed;
}

#student-table th:first-of-type,
#student-table td:first-of-type,
#student-table th:nth-of-type(2),
#student-table td:nth-of-type(2) {
  width: 300px;
}

#student-table td,
#student-table th {
  padding: .25rem .25rem;
}

#student-table th:first-of-type {
  padding-left: 21px;
}

#student-table th:nth-of-type(2) {
  padding-left: 21px;
}

h1 {
  font-size: 1.75rem;
}

.login-page {
  max-width: 22rem;
  margin: 15vh auto 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 0;
}

.login-form input {
  height: 2.4rem;
  margin: 0;
}

.login-form button {
  width: 100%;
  height: 2.4rem;
  margin: 0;
  padding: 0 1rem;
}

.login-error {
  color: var(--pico-del-color);
  font-size: .875rem;
}

.login-teacher {
  margin-top: 1rem;
  font-size: 1rem;
}

.login-identity {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .25rem;
  font-size: .9rem;
}

.login-identity svg {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  flex: none;
}

#password-form {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
}

#password-form button {
  width: auto;
  height: 2rem;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
}

#password-form .copy-key {
  margin: 0;
}

.student-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

body > main.dashboard-main {
  max-width: 90rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.student-nav-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
}

.student-nav-user svg {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--pico-card-background-color);
}

.status-popup {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  background: #1e1e1e;
  color: #d4d4d4;
  padding: .75rem 1rem;
  border-radius: var(--pico-border-radius);
  font-size: .875rem;
  pointer-events: none;
  animation: popup-fade 3s ease forwards;
}

@keyframes popup-fade {
  0% { opacity: 0; transform: translateY(-.5rem); }
  10%, 70% { opacity: 1; transform: none; }
  100% { opacity: 0; visibility: hidden; }
}

.editor-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  margin-top: 1rem;
}

.pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pane label {
  font-size: .8rem;
  margin: 0 0 .25rem;
  color: var(--pico-muted-color);
}

.pane > #run-output {
  flex: 1;
  min-height: 0;
}

#code-editor,
#run-output {
  scrollbar-width: none;
}

#run-output,
.test-output {
  background: #0d1016;
  color: #bfbdb6;
  font-size: .85rem;
  padding: 1rem;
  border-radius: var(--pico-border-radius);
  margin: 0;
  height: 100%;
  overflow: auto;
  white-space: pre-wrap;
}

.test-output {
  height: auto;
  max-height: 24rem;
}

#code-editor {
  font-family: var(--pico-font-family-monospace, monospace);
  font-size: .85rem;
  line-height: 1.5;
  white-space: pre !important;
  position: relative;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  padding: 1rem 1rem 1rem 2.25rem;
  height: 100%;
  overflow: auto;
  background: #0d1016;
  color: #bfbdb6;
  caret-color: #f29668;
}

#code-editor .gutter {
  position: absolute;
  top: 0;
  left: 0;
  width: 2.25rem;
  pointer-events: none;
  user-select: none;
  margin: 0;
  padding: 1rem .375rem 1rem .75rem;
  text-align: right;
  font-family: var(--pico-font-family-monospace, monospace);
  font-size: .85rem;
  line-height: 1.5;
  color: var(--pico-muted-color);
  background: #0d1016;
  white-space: pre;
}

#code-editor .gutter::before {
  content: attr(data-lines);
}

#code-editor:focus {
  outline: none;
}

#code-editor::-webkit-scrollbar,
#run-output::-webkit-scrollbar {
  display: none;
}

.ansi-bold { font-weight: bold; }
.ansi-black { color: #666666; }
.ansi-red { color: #f14c4c; }
.ansi-green { color: #23d18b; }
.ansi-yellow { color: #f5a623; }
.ansi-blue { color: #569cd6; }
.ansi-magenta { color: #c586c0; }
.ansi-cyan { color: #29b8db; }
.ansi-white { color: #d4d4d4; }
.ansi-gray { color: #8e908c; }
.ansi-bright-red { color: #ff6e67; }
.ansi-bright-green { color: #5af78e; }
.ansi-bright-yellow { color: #f4f528; }
.ansi-bright-blue { color: #97cafd; }
.ansi-bright-magenta { color: #e48bff; }
.ansi-bright-cyan { color: #9fedfb; }
.ansi-bright-white { color: #ffffff; }

.token.keyword { color: #ff8f3f; }
.token.function { color: #ffb353; }
.token.string { color: #a9d94b; }
.token.number { color: #d2a6ff; }
.token.operator { color: #f29668; }
.token.boolean { color: #d2a6ff; }
.token.comment { color: #93a4bc; font-style: italic; }
.token.builtin { color: #ffb353; }
.token.class-name { color: #59c2ff; }

@font-face {
  font-family: "SN Pro";
  src: url("/assets/fonts/sn-pro-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SN Pro";
  src: url("/assets/fonts/sn-pro-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SN Pro";
  src: url("/assets/fonts/sn-pro-700.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SN Pro";
  src: url("/assets/fonts/sn-pro-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "SN Pro";
  src: url("/assets/fonts/sn-pro-vn-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0306-0307, U+0309, U+0323, U+032E, U+0329-032A, U+1EA0-1EF9;
}
@font-face {
  font-family: "SN Pro";
  src: url("/assets/fonts/sn-pro-vn-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0306-0307, U+0309, U+0323, U+032E, U+0329-032A, U+1EA0-1EF9;
}
@font-face {
  font-family: "SN Pro";
  src: url("/assets/fonts/sn-pro-vn-700-normal.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0306-0307, U+0309, U+0323, U+032E, U+0329-032A, U+1EA0-1EF9;
}
@font-face {
  font-family: "SN Pro";
  src: url("/assets/fonts/sn-pro-vn-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0306-0307, U+0309, U+0323, U+032E, U+0329-032A, U+1EA0-1EF9;
}
@font-face {
  font-family: "Maple Mono";
  src: url("/assets/fonts/maple-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Maple Mono";
  src: url("/assets/fonts/maple-mono-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --pico-font-family-sans-serif: "SN Pro", sans-serif;
  --pico-font-size: 16px;
  --pico-font-family-monospace: "Maple Mono", monospace;
}

table small {
  font-size: 1rem;
}

#grade-table td {
  vertical-align: middle;
}

#grade-table td > details {
  margin: 0;
}

#grade-table td > div {
  display: flex;
  align-items: center;
  gap: .5rem;
}

#grade-table td > div small {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pico-muted-color);
}

#grade-table td form {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
}

#grade-table td form input {
  height: 2.1rem;
  width: 4.5rem;
  margin: 0;
}

#grade-table td form input[name="feedback"] {
  width: 20rem;
}

#grade-table td form button {
  height: 2.1rem;
  padding: 0 .9rem;
}

/* ---- shared sidebar ---- */
.shared-side {
  padding: 1.25rem .75rem;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: .1rem;
  font-size: .875rem;
}

.shared-side h1, .shared-side h2 {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pico-muted-color);
  margin: 0 0 .5rem;
}

.shared-side a {
  display: block;
  padding: .18rem .6rem;
  border-radius: .4rem;
  text-transform: none;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-side a:hover {
  background: color-mix(in srgb, var(--pico-primary) 8%, transparent);
  text-decoration: none;
}

.shared-side a[aria-current="page"] {
  background: color-mix(in srgb, var(--pico-primary) 14%, transparent);
  font-weight: 600;
}

.shared-side button {
  width: 100%;
  margin-bottom: .5rem;
  font-size: .8rem;
  height: auto;
  padding: .3rem .75rem;
  --pico-line-height: 1.2;
  --pico-form-element-spacing-vertical: .3rem;
}

#chat-side button {
  font-size: .8rem;
  height: 2rem;
  min-height: 0;
  padding: .25rem .75rem;
  line-height: 1.4;
}

/* ---- teacher sidebar ---- */
body:has(.teacher-layout), body:has(.chat-layout) {
  padding-bottom: 0;
}

.teacher-layout, .chat-layout {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 2rem;
  min-height: calc(100vh - 2 * var(--pico-block-spacing-vertical));
}

@media (max-width: 767px) {
  .teacher-layout, .chat-layout { grid-template-columns: 1fr; min-height: 0; }
  .shared-side { height: auto; }
}

.chat-layout {
  display: grid;
  grid-template-columns: 15rem 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 2rem;
  flex: 1;
  min-height: 0;
}

body:has(.chat-layout) {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#chat-side {
  align-self: stretch;
  min-height: 0;
  overflow-y: auto;
}


.chat-layout {
  padding-right: 1.5rem;
}

.teacher-layout {
  padding-right: 1.5rem;
}

.banner {
  margin-top: 2rem;
  padding: .5rem .75rem;
  border-left: 3px solid var(--pico-primary);
  background: var(--pico-card-background-color);
}

.teacher-layout > main > h1 {
  margin-top: 2rem;
}

.chat-bubble {
  width: fit-content;
  max-width: 80%;
  margin: .4rem 0;
  padding: .5rem .8rem;
  line-height: 1.35;
  border-radius: var(--pico-border-radius);
}

.chat-bubble > :first-child {
  margin-top: 0;
}

.chat-bubble > :last-child {
  margin-bottom: 0;
}

.chat-bubble p, .chat-bubble ul, .chat-bubble ol {
  margin: .4rem 0;
}

.chat-bubble ul, .chat-bubble ol {
  padding-left: 1.25rem;
}

.chat-table {
  margin: .6rem 0;
  overflow-x: auto;
}

.chat-table table {
  width: auto;
  margin: 0;
  font-size: .85rem;
}

.chat-table th, .chat-table td {
  padding: .3rem .6rem;
}

.chat-student {
  margin-left: auto;
  background: var(--pico-primary-background);
  color: var(--pico-primary-inverse);
  white-space: pre-line;
}

.chat-bot {
  margin-right: auto;
  border: 1px solid var(--pico-muted-border-color);
}

.chat-error {
  color: var(--pico-del-color);
}


.editor-links {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: -.25rem 0 .35rem;
}

.editor-links form {
  margin: 0;
}

.link-button {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--pico-primary);
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  background: none;
  color: var(--pico-primary-hover);
}

.chat-dot {
  animation: chat-blink 1.2s infinite;
}

.chat-dot:nth-of-type(2) {
  animation-delay: .2s;
}

.chat-dot:nth-of-type(3) {
  animation-delay: .4s;
}

@keyframes chat-blink {
  0%, 80%, 100% { opacity: .2; }
  40% { opacity: 1; }
}

.chat-code {
  margin: .4rem 0;
  padding: .5rem .8rem;
  border-radius: var(--pico-border-radius);
  background: var(--pico-code-background-color);
  font-family: var(--pico-font-family-monospace);
  font-size: .8rem;
  white-space: pre;
  overflow-x: auto;
}

.chat-code .token.keyword { color: #b3520f; }
.chat-code .token.function, .chat-code .token.builtin { color: #8a6200; }
.chat-code .token.string { color: #3d7a1a; }
.chat-code .token.number, .chat-code .token.boolean { color: #7a3fb0; }
.chat-code .token.operator { color: #9a4f1e; }
.chat-code .token.comment { color: #5f6b7a; font-style: italic; }
.chat-code .token.class-name { color: #0b6fa4; }

.chat-layout > main {
  display: flex;
  flex-direction: column;
  width: 50rem;
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
  min-height: 0;
}

#chat-title {
  margin-top: 2rem;
}

#chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 1rem;
  scrollbar-width: thick;
}

#chat-log::-webkit-scrollbar {
  width: .65rem;
}

#chat-log::-webkit-scrollbar-thumb {
  background: var(--pico-muted-border-color);
  border-radius: .3rem;
}

#chat-composer {
  position: sticky;
  bottom: 0;
  width: 100%;
  display: flex;
  gap: .5rem;
  align-items: center;
  margin: auto 0 1rem;
  padding: .5rem 0;
  background: var(--pico-background-color);
}

#chat-composer input {
  flex: 1;
  height: 2.1rem;
  margin: 0;
  padding: 0 .75rem;
  font-size: .875rem;
}

#chat-composer button {
  width: auto;
  height: 2.1rem;
  margin: 0;
  padding: 0 1rem;
  font-size: .875rem;
}


#chat-side li, #teacher-nav li {
  list-style: none;
  display: block;
  padding: 0;
  margin: 0;
}

#chat-side ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 0;
  margin: .25rem 0 0;
}

#chat-side li, #teacher-nav li {
  display: flex;
  width: 100%;
}

#chat-side, #chat-side li {
  text-align: left;
}

.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.session-row a {
  min-width: 0;
  flex: 1;
  margin-right: .4rem;
}

.session-row.active-cols {
  font-weight: inherit;
}

.chat-session.active > .session-row > a {
  font-weight: 600;
}

.session-icons {
  display: flex;
  align-items: center;
  flex: none;
  margin: 0;
}

#chat-side .icon-btn {
  width: 1.7rem;
  height: 1.7rem;
  margin: 0 .1rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--pico-muted-color);
  font-size: .9rem;
  line-height: 1;
  cursor: pointer;
}

#chat-side .icon-btn:hover {
  color: var(--pico-primary);
  background: transparent;
}


#chat-side li, #teacher-nav li {
  list-style: none;
  display: block;
  padding: 0;
  margin: 0;
}

#chat-side, #chat-side li {
  text-align: left;
}

#chat-side details {
  display: inline-flex;
  margin: 0;
  align-items: center;
}

#chat-side summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  padding: .18rem .4rem;
}

#chat-side summary::-webkit-details-marker {
  display: none;
}

#chat-side li {
  display: flex;
  width: 100%;
}

.chat-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-session a {
  min-width: 0;
  font-weight: inherit;
}

.chat-session.active > a {
  font-weight: 600;
}

.chat-session details {
  position: relative;
}

.chat-session details > form {
  position: absolute;
  right: 0;
  z-index: 10;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  padding: .5rem;
  display: flex;
  gap: .3rem;
  align-items: center;
}

.chat-session details button {
  width: auto;
  margin: 0;
}


.pager {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* completion matrix: 18+ narrow columns */
.completion td, .completion th { text-align: center; font-size: .8rem; padding: .3rem .4rem; }
.completion td:first-child, .completion th:first-child { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--pico-card-background-color); }
.completion thead th[title] { writing-mode: vertical-rl; width: 1.2rem; }
.completion { display: block; overflow-x: auto; }
/* tabs: reading / quiz / assignment (links, one page per tab) */
.tab-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tab-row { display: flex; justify-content: flex-start; gap: .25rem; margin: 0 0 .5rem; }
.tab-link { padding: .35rem .9rem; font-size: .9rem; color: var(--pico-muted-color); border-radius: .4rem .4rem 0 0; border-bottom: 2px solid transparent; text-decoration: none; }
.tab-link.active { color: var(--pico-color); border-bottom-color: var(--pico-primary); font-weight: 600; }
.tab-panel.md { overflow-y: auto; scrollbar-width: none; padding: .5rem 0 2rem; max-width: 62rem; flex: 1; min-height: 0; }.tab-panel.md::-webkit-scrollbar { display: none; }

/* tutor chat embedded as a workspace tab: fill the panel, keep its own scroll */
.chat-pane { display: flex; flex-direction: column; overflow: hidden; flex: 1; min-height: 0; width: min(50rem, 100%); margin: 0 auto; }
.chat-pane #chat-title { text-align: left; margin: .5rem 0 1rem; width: 100%; }
.chat-pane #chat-log { flex: 1; }
.chat-pane #chat-composer { margin-top: 1rem; }

/* ---- conversation-style tutor chat ---- */
#chat-title h1 { font-size: 1.05rem; margin-bottom: .25rem; }
#chat-side { background: var(--pico-card-background-color); border-right: 1px solid var(--pico-muted-border-color); padding: 1rem .6rem; }
#chat-side .session-row a { font-size: .88rem; }
.chat-session .icon-btn { opacity: 0; }
.chat-session:hover .icon-btn, .chat-session.active .icon-btn { opacity: 1; }
.chat-msg { margin: .9rem 0; }
.chat-msg .chat-who { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--pico-muted-color); margin-bottom: .15rem; }
.chat-msg:has(.chat-student) .chat-who { text-align: right; }
.chat-msg:has(.chat-student) .chat-bubble { float: right; clear: both; }
.chat-bot { border: none; background: transparent; padding-left: 0; padding-right: 0; }
#chat-log, #chat-composer { max-width: 44rem; margin: 0 auto; }
#chat-composer { border-top: 1px solid var(--pico-muted-border-color); padding: .8rem 0 1rem; }
#chat-composer input { border-radius: 2rem; height: 2.6rem; }
#chat-composer button { border-radius: 2rem; height: 2.6rem; width: auto; margin: 0; padding: 0 1.4rem; }

/* tutor thread control and teacher transcripts */
.chat-notice-row { display: flex; align-items: center; gap: .75rem; margin: .35rem 0 1rem; font-size: .85rem; font-style: italic; color: var(--pico-muted-color); }
.chat-notice-row form { margin: 0; width: auto; }
.chat-notice-row button { width: auto; height: auto; margin: 0; padding: .2rem .8rem; font-size: .78rem; border-radius: 2rem; }
.chat-filter select { width: auto; }
.chat-thread { max-width: 60rem; margin: 1.5rem 0; padding: 1rem 1.25rem; border: 1px solid var(--pico-muted-border-color); border-radius: var(--pico-border-radius); }
.chat-thread > header { display: flex; flex-wrap: wrap; gap: .45rem; align-items: baseline; font-size: .85rem; color: var(--pico-muted-color); margin-bottom: .75rem; }
.chat-thread > header a { margin-left: auto; }

#chat-side { display: flex; flex-direction: column; }
#chat-side ul { overflow-y: auto; min-height: 0; scrollbar-width: none; }
#chat-side ul::-webkit-scrollbar { display: none; }

/* interactive quizzes */
.quiz-q { margin: 1.2rem 0; }
.quiz-q + .quiz-q { margin-top: 2.25rem; padding-top: 1.75rem; border-top: 1px solid var(--pico-muted-border-color); }
.quiz-q .quiz-stem { margin-bottom: .5rem; }
.quiz-opts { margin-bottom: .5rem; }
.quiz-opt { display: flex; align-items: center; gap: .6rem; width: 100%; margin-bottom: 0; padding: .45rem .75rem; border-radius: var(--pico-border-radius); border: 4px solid transparent; background: var(--pico-card-background-color); font-size: .92rem; cursor: pointer; }
.quiz-opt:focus { box-shadow: none; outline: 0; }
.quiz-opt, .quiz-opt p { color: #111827; }
.quiz-opt p { margin: 0; }
.quiz-opt .opt-radio { flex: 0 0 auto; width: 1.15em; height: 1.15em; border-radius: 50%; border: 1.5px solid var(--pico-muted-color); display: inline-flex; align-items: center; justify-content: center; }
.quiz-opt.picked .opt-radio { border-color: var(--pico-primary-background); }
.quiz-opt.picked .opt-radio::after { content: ""; width: .5em; height: .5em; border-radius: 50%; background: var(--pico-primary-background); }
.quiz-opt.picked { border-left-color: var(--pico-primary-background); }
.quiz-opt.right { border-left-color: var(--pico-ins-color); }
.quiz-opt.wrong { border-left-color: var(--pico-del-color); }
.quiz-check { width: auto; height: auto; margin: 0; padding: .3rem 1.1rem; font-size: .85rem; }
.quiz-result { font-size: .9rem; }
.quiz-credit { font-size: .78rem; color: var(--pico-muted-color); margin-top: 2rem; }

/* section group headers in the dashboard table */
.section-row th { background: var(--pico-card-background-color); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--pico-muted-color); text-align: left; font-weight: 600; padding: .35rem .5rem; }
