@import url("/static/md3.css?v=20260728");
/* Eye-Rec shared stylesheet (landing, teacher, dashboard).
 * Material Design 3 look built on the tokens/components of md3.css
 * (imported above). Every var() carries the contract fallback so the
 * page stays usable even if md3.css is briefly unavailable. */

:root {
  /* legacy aliases kept so older inline styles keep working */
  --bg: var(--md-surface, #FCFCFF);
  --surface: var(--md-surface, #FCFCFF);
  --border: var(--md-outline-variant, #C4C6CF);
  --border-strong: var(--md-outline, #74777F);
  --text: var(--md-on-surface, #1A1C1E);
  --muted: var(--md-on-surface-variant, #44474E);
  --accent: var(--md-primary, #0B57D0);
  --accent-soft: var(--md-primary-container, #D3E3FD);
  --green: var(--md-success, #146C2E);
  --green-soft: var(--md-success-container, #C4EED0);
  --red: var(--md-error, #B3261E);
  --red-soft: var(--md-error-container, #F9DEDC);
  --amber: #7a4a08;
  --amber-soft: var(--md-warn-container, #FFDF99);
  --aoi-question: #3b82f6;
  --aoi-a: #8b5cf6;
  --aoi-b: #0e9aa7;
  --aoi-c: #d97706;
  --aoi-d: #db2777;
  --aoi-off: #cbd5e1;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--md-on-surface, #1A1C1E);
  background: var(--md-surface, #FCFCFF);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--md-primary, #0B57D0); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 10px; }
h1 { font-size: 24px; font-weight: 600; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 14.5px; font-weight: 600; }

code, pre { font-family: var(--mono); font-size: 12.5px; }

/* ------------------------------------------------------------ layout */

.topbar {
  background: var(--md-surface, #FCFCFF);
  box-shadow: var(--md-elev-1, 0 1px 2px rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15));
  border-bottom: none;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 5;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--md-on-surface, #1A1C1E);
}
.brand:hover { text-decoration: none; }
.brand .eye { color: var(--md-primary, #0B57D0); }

.topbar nav { display: flex; gap: 14px; margin-left: auto; align-items: center; }
.topbar nav a {
  color: var(--md-on-surface-variant, #44474E);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--md-radius-full, 999px);
}
.topbar nav a:hover {
  color: var(--md-primary, #0B57D0);
  background: var(--md-secondary-container, #E8EDF6);
  text-decoration: none;
}

.topbar .section-info {
  color: var(--md-on-surface-variant, #44474E);
  font-size: 13px;
}
.topbar .section-info b { color: var(--md-on-surface, #1A1C1E); font-family: var(--mono); }

main.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 22px 48px;
  flex: 1;
}

footer.footer {
  border-top: 1px solid var(--md-outline-variant, #C4C6CF);
  color: var(--md-on-surface-variant, #44474E);
  font-size: 12px;
  padding: 12px 22px;
  background: var(--md-surface-container, #F0F3F8);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------- cards */

.card {
  background: var(--md-surface-container, #F0F3F8);
  border: none;
  border-radius: var(--md-radius-m, 12px);
  box-shadow: var(--md-elev-1, 0 1px 2px rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15));
  padding: 18px 20px;
  margin-bottom: 16px;
}

.card > h2:first-child, .card > h3:first-child { margin-top: 2px; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  align-items: start;
}

.muted { color: var(--md-on-surface-variant, #44474E); }
.small { font-size: 12.5px; }

/* --------------------------------------------------------- landing */

.hero { text-align: center; padding: 46px 16px 26px; }
.hero h1 { font-size: 40px; margin-bottom: 8px; }
.hero .tagline { font-size: 17px; color: var(--md-on-surface-variant, #44474E); margin: 0 0 8px; }
.hero .privacy {
  display: inline-block;
  font-size: 13px;
  color: var(--md-success, #146C2E);
  background: var(--md-success-container, #C4EED0);
  border: none;
  border-radius: var(--md-radius-full, 999px);
  padding: 6px 16px;
  margin-top: 6px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  max-width: 940px;
  margin: 26px auto 0;
}

.choice-card {
  display: block;
  background: var(--md-surface-container, #F0F3F8);
  border: 1px solid transparent;
  border-radius: var(--md-radius-l, 16px);
  box-shadow: var(--md-elev-1, 0 1px 2px rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15));
  padding: 26px 22px;
  text-align: center;
  color: var(--md-on-surface, #1A1C1E);
  transition: box-shadow 0.12s, transform 0.12s, background 0.12s;
}
.choice-card:hover {
  background: var(--md-secondary-container, #E8EDF6);
  box-shadow: var(--md-elev-2, 0 1px 2px rgba(0,0,0,.3), 0 2px 6px 2px rgba(0,0,0,.15));
  transform: translateY(-2px);
  text-decoration: none;
}
.choice-card .glyph { font-size: 34px; display: block; margin-bottom: 10px; }
.choice-card b { font-size: 16px; display: block; margin-bottom: 6px; }
.choice-card span.desc { color: var(--md-on-surface-variant, #44474E); font-size: 13px; }

/* -------------------------------------------------------- forms/buttons */

label.field { display: block; margin-bottom: 12px; font-weight: 500; }
label.field span { display: block; margin-bottom: 4px; font-size: 13px; }

input[type="text"], input[type="password"], select, textarea {
  font: inherit;
  color: var(--md-on-surface, #1A1C1E);
  background: var(--md-surface, #FCFCFF);
  border: 1px solid var(--md-outline, #74777F);
  border-radius: var(--md-radius-s, 8px);
  padding: 8px 12px;
  min-width: 200px;
}
input[type="text"]:focus, input[type="password"]:focus, select:focus,
textarea:focus {
  outline: 2px solid var(--md-primary, #0B57D0);
  outline-offset: -1px;
  border-color: var(--md-primary, #0B57D0);
}
input[type="file"] { font: inherit; }

/* legacy .btn = MD3 filled button (pill) */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  color: var(--md-on-primary, #fff);
  background: var(--md-primary, #0B57D0);
  border: none;
  border-radius: var(--md-radius-full, 999px);
  padding: 9px 22px;
  cursor: pointer;
  transition: box-shadow 0.12s, filter 0.12s;
}
.btn:hover {
  filter: brightness(1.12);
  box-shadow: var(--md-elev-1, 0 1px 2px rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15));
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: default; box-shadow: none; filter: none; }
.btn.secondary {
  color: var(--md-on-secondary-container, #1A1C1E);
  background: var(--md-secondary-container, #E8EDF6);
}
.btn.secondary:hover { filter: brightness(0.97); }

/* ---------------------------------------------------------- messages */

.error-box {
  background: var(--md-error-container, #F9DEDC);
  border: none;
  color: #410E0B;
  border-radius: var(--md-radius-s, 8px);
  padding: 10px 14px;
  margin: 12px 0;
  white-space: pre-wrap;
}

.notice-box {
  background: var(--md-warn-container, #FFDF99);
  border: none;
  color: #4d2f00;
  border-radius: var(--md-radius-s, 8px);
  padding: 10px 14px;
  margin: 12px 0;
}

.hidden { display: none !important; }

/* ------------------------------------------------------ big group code */

.big-code {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(56px, 12vw, 120px);
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--md-on-primary-container, #041E49);
  background: var(--md-primary-container, #D3E3FD);
  border-radius: var(--md-radius-l, 16px);
  padding: 30px 16px;
  margin: 12px 0 16px;
  user-select: all;
}

/* -------------------------------------------------------------- tables */

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--md-outline-variant, #C4C6CF);
  vertical-align: middle;
}
.tbl th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--md-on-surface-variant, #44474E);
  background: transparent;
  white-space: nowrap;
}
.tbl tbody tr:hover { background: var(--md-surface-container-high, #E9ECF2); }
.tbl.clickable tbody tr { cursor: pointer; }
.tbl tr.selected { background: var(--md-primary-container, #D3E3FD); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--md-primary, #0B57D0); }

.table-scroll { overflow-x: auto; }

/* ------------------------------------------------------------- tabs
   Legacy .tabs markup styled to the .md-tabs pattern (3px primary
   underline indicator, label-large). */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--md-outline-variant, #C4C6CF);
  margin-bottom: 18px;
  flex-wrap: wrap;
  background: transparent;
}
.tabs button {
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.1px;
  color: var(--md-on-surface-variant, #44474E);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: var(--md-radius-s, 8px) var(--md-radius-s, 8px) 0 0;
  padding: 10px 16px 8px;
  margin-bottom: -1px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.tabs button:hover {
  color: var(--md-on-surface, #1A1C1E);
  background: var(--md-surface-container-high, #E9ECF2);
}
.tabs button.active {
  color: var(--md-primary, #0B57D0);
  font-weight: 600;
  border-bottom-color: var(--md-primary, #0B57D0);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------------------------------------------------------- stat cards */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  background: var(--md-primary-container, #D3E3FD);
  color: var(--md-on-primary-container, #041E49);
  border: none;
  border-radius: var(--md-radius-m, 12px);
  padding: 14px 16px;
}
.stat .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--md-on-primary-container, #041E49);
  opacity: 0.8;
  margin-top: 2px;
}

.chart-box { position: relative; height: 280px; }
.chart-box-sm { position: relative; height: 220px; }

/* group overview charts row (Students tab) */
.group-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.group-charts .card { margin-bottom: 0; }

/* ------------------------------------------------- distribution mini bars */

.dist { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; }
.dist-bar {
  display: inline-block;
  width: 8px;
  background: var(--md-outline, #74777F);
  border-radius: 1px 1px 0 0;
  min-height: 2px;
}
.dist-bar.ok { background: var(--md-success, #146C2E); }

/* ------------------------------------------------------------- badges */

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--md-radius-full, 999px);
  padding: 2px 10px;
}
.badge.warn { background: var(--md-warn-container, #FFDF99); color: #4d2f00; border: none; }
.badge.ok { background: var(--md-success-container, #C4EED0); color: var(--md-success, #146C2E); }
.badge.err { background: var(--md-error-container, #F9DEDC); color: var(--md-error, #B3261E); }

.check { color: var(--md-success, #146C2E); font-weight: 700; }

/* pending ("N ungraded") chip in the students table */
.pending-chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--md-warn-container, #FFDF99);
  color: #4d2f00;
  border-radius: var(--md-radius-full, 999px);
  padding: 2px 10px;
  margin-left: 6px;
  white-space: nowrap;
}

/* question type chip (MC / YN / FILL / OPEN) */
.type-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--md-on-secondary-container, #1A1C1E);
  background: var(--md-secondary-container, #E8EDF6);
  border: 1px solid var(--md-outline-variant, #C4C6CF);
  border-radius: var(--md-radius-s, 8px);
  padding: 1px 8px;
  white-space: nowrap;
}
.type-chip.open {
  background: var(--md-primary-container, #D3E3FD);
  color: var(--md-on-primary-container, #041E49);
  border-color: transparent;
}

/* ------------------------------------------------------ student detail */

.qrow { display: flex; align-items: center; gap: 10px; margin: 5px 0; }
.qrow .qlabel { width: 42px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.qrow .bar-track { flex: 1; background: var(--md-surface-container-high, #E9ECF2); border-radius: var(--md-radius-full, 999px); height: 18px; position: relative; overflow: hidden; }
.qrow .bar-fill { display: block; height: 100%; border-radius: var(--md-radius-full, 999px) 0 0 var(--md-radius-full, 999px); }
.qrow .bar-fill.ok { background: var(--md-success, #146C2E); }
.qrow .bar-fill.bad { background: var(--md-error, #B3261E); }
.qrow .bar-fill.none { background: var(--md-outline, #74777F); }
.qrow .qval { width: 66px; text-align: right; font-variant-numeric: tabular-nums; color: var(--md-on-surface-variant, #44474E); font-size: 12.5px; flex: none; }
.qrow .replay-link { flex: none; font-size: 12.5px; }

.stack-track { flex: 1; display: flex; height: 18px; border-radius: var(--md-radius-full, 999px); overflow: hidden; background: var(--md-surface-container-high, #E9ECF2); }
.stack-seg { height: 100%; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--md-on-surface-variant, #44474E); margin: 8px 0; }
.legend .key { display: inline-flex; align-items: center; gap: 5px; }
.legend .swatch { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }

/* ------------------------------------------------------------- replay */

.replay-layout { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.replay-canvas-wrap { flex: 1 1 640px; min-width: 320px; }

#replay-canvas {
  width: 100%;
  max-width: 960px;
  border: 1px solid var(--md-outline-variant, #C4C6CF);
  border-radius: var(--md-radius-s, 8px);
  background: #fff;
  display: block;
}

.replay-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.replay-controls input[type="range"] { flex: 1; min-width: 140px; accent-color: var(--md-primary, #0B57D0); }
.replay-controls .toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--md-on-surface-variant, #44474E); }

.metrics-panel { flex: 0 0 260px; min-width: 240px; }
.metric-bar-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 12.5px; }
.metric-bar-row .mlabel { width: 62px; flex: none; color: var(--md-on-surface-variant, #44474E); }
.metric-bar-row .mtrack { flex: 1; background: var(--md-surface-container-high, #E9ECF2); height: 12px; border-radius: 3px; overflow: hidden; }
.metric-bar-row .mfill { display: block; height: 100%; border-radius: 3px 0 0 3px; }
.metric-bar-row .mval { width: 44px; text-align: right; font-variant-numeric: tabular-nums; flex: none; }

.kv { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.kv td { padding: 4px 2px; border-bottom: 1px dashed var(--md-outline-variant, #C4C6CF); }
.kv td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ------------------------------------------------------------ AI tab */

.llm-status { font-size: 13px; margin-bottom: 12px; }
.llm-status .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot.up { background: var(--md-success, #146C2E); }
.dot.down { background: var(--md-error, #B3261E); }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid var(--md-primary-container, #D3E3FD);
  border-top-color: var(--md-primary, #0B57D0);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.report-summary {
  font-size: 14.5px;
  background: var(--md-surface, #FCFCFF);
  border-left: 3px solid var(--md-primary, #0B57D0);
  padding: 10px 14px;
  border-radius: 0 var(--md-radius-s, 8px) var(--md-radius-s, 8px) 0;
}

.clusters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.cluster { background: var(--md-surface, #FCFCFF); border: 1px solid var(--md-outline-variant, #C4C6CF); border-radius: var(--md-radius-m, 12px); padding: 12px 14px; border-top-width: 3px; }
.cluster.understood { border-top-color: var(--md-success, #146C2E); }
.cluster.partial { border-top-color: #b06000; }
.cluster.not { border-top-color: var(--md-error, #B3261E); }
.cluster h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; }
.cluster.understood h4 { color: var(--md-success, #146C2E); }
.cluster.partial h4 { color: #b06000; }
.cluster.not h4 { color: var(--md-error, #B3261E); }

.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--md-secondary-container, #E8EDF6);
  border: 1px solid var(--md-outline-variant, #C4C6CF);
  border-radius: var(--md-radius-full, 999px);
  padding: 2px 9px;
  margin: 2px 3px 2px 0;
}
.cluster .evidence { font-size: 12px; color: var(--md-on-surface-variant, #44474E); margin-top: 8px; }

.rec-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.rec-card { border: none; border-radius: var(--md-radius-m, 12px); padding: 12px 14px; background: var(--md-secondary-container, #E8EDF6); }
.rec-card .topic { font-weight: 700; margin-bottom: 4px; }
.rec-card .action { margin-bottom: 6px; }
.rec-card .reason { font-size: 12.5px; color: var(--md-on-surface-variant, #44474E); }

/* teacher's custom question + LLM answer (outlined card) */
.custom-card {
  background: transparent;
  border: 1px solid var(--md-outline, #74777F);
  border-radius: var(--md-radius-m, 12px);
  padding: 14px 16px;
  margin-top: 14px;
}
.custom-card .custom-q {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--md-primary, #0B57D0);
  margin-bottom: 6px;
}
.custom-card .custom-a { font-size: 14px; white-space: pre-wrap; }

#custom-prompt { width: 100%; min-width: 0; min-height: 64px; resize: vertical; margin: 8px 0; }

details.report-item { border: 1px solid var(--md-outline-variant, #C4C6CF); border-radius: var(--md-radius-s, 8px); margin-bottom: 8px; background: var(--md-surface, #FCFCFF); }
details.report-item > summary { cursor: pointer; padding: 9px 14px; font-weight: 600; font-size: 13px; }
details.report-item > .report-body { padding: 4px 14px 14px; border-top: 1px solid var(--md-outline-variant, #C4C6CF); }
.report-actions { margin-top: 12px; }

/* -------------------------------------------------------- grading tab */

.grading-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.grading-q-head td {
  background: var(--md-surface-container-high, #E9ECF2);
  font-size: 14.5px;
  font-weight: 600;
  padding-top: 12px;
}
.grading-q-head .model-answer {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--md-on-surface-variant, #44474E);
  margin-top: 3px;
}
.answer-text { white-space: pre-wrap; max-width: 480px; }

.grade-chip {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--md-on-surface-variant, #44474E);
  background: var(--md-surface, #FCFCFF);
  border: 1px solid var(--md-outline, #74777F);
  border-radius: var(--md-radius-full, 999px);
  padding: 3px 12px;
  margin-right: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.grade-chip:hover { background: var(--md-surface-container-high, #E9ECF2); }
.grade-chip.on-ok {
  background: var(--md-success-container, #C4EED0);
  color: var(--md-success, #146C2E);
  border-color: transparent;
}
.grade-chip.on-bad {
  background: var(--md-error-container, #F9DEDC);
  color: var(--md-error, #B3261E);
  border-color: transparent;
}
.grade-chip:disabled { opacity: 0.6; cursor: default; }

.src-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--md-radius-full, 999px);
  padding: 2px 9px;
  white-space: nowrap;
}
.src-badge.src-pending { background: var(--md-warn-container, #FFDF99); color: #4d2f00; }
.src-badge.src-llm { background: var(--md-primary-container, #D3E3FD); color: var(--md-on-primary-container, #041E49); }
.src-badge.src-teacher { background: var(--md-success-container, #C4EED0); color: var(--md-success, #146C2E); }

.grade-note { font-style: italic; color: var(--md-on-surface-variant, #44474E); font-size: 12.5px; max-width: 320px; }

/* -------------------------------------------------------------- help */

details.help { border: 1px solid var(--md-outline-variant, #C4C6CF); border-radius: var(--md-radius-s, 8px); background: var(--md-surface, #FCFCFF); margin: 12px 0; }
details.help > summary { cursor: pointer; padding: 9px 14px; font-weight: 600; }
details.help > div { padding: 0 14px 12px; }
details.help pre {
  background: #101828;
  color: #e6edf6;
  border-radius: var(--md-radius-s, 8px);
  padding: 12px 14px;
  overflow-x: auto;
}

ul.plain { padding-left: 20px; margin: 8px 0; }
ul.plain li { margin: 3px 0; }

/* ------------------------------------------------------- login & account */

.login-card { max-width: 400px; margin: 9vh auto 0; border-radius: var(--md-radius-l, 16px); box-shadow: var(--md-elev-2, 0 1px 2px rgba(0,0,0,.3), 0 2px 6px 2px rgba(0,0,0,.15)); }
.login-card input[type="text"],
.login-card input[type="password"] { width: 100%; min-width: 0; }
.login-card .btn { width: 100%; margin-top: 4px; }

.topbar .user-box {
  color: var(--md-on-surface-variant, #44474E);
  border-left: 1px solid var(--md-outline-variant, #C4C6CF);
  padding-left: 14px;
  white-space: nowrap;
}
.topbar .user-box #user-name { color: var(--md-on-surface, #1A1C1E); font-weight: 600; }
.topbar .user-box a { color: var(--md-on-surface-variant, #44474E); }
.topbar .user-box a:hover { color: var(--md-primary, #0B57D0); }

/* ------------------------------------------------- user management (admin) */

.user-create { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.user-create input { min-width: 180px; }
.pw-input { font-family: var(--mono); }

.mini-btn {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--md-primary, #0B57D0);
  background: transparent;
  border: 1px solid var(--md-outline, #74777F);
  border-radius: var(--md-radius-full, 999px);
  padding: 3px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.mini-btn:hover { background: var(--md-primary-container, #D3E3FD); }

.ok-box {
  background: var(--md-success-container, #C4EED0);
  border: none;
  color: #0c3a1c;
  border-radius: var(--md-radius-s, 8px);
  padding: 10px 14px;
  margin: 12px 0;
}

.gen-pw {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  background: #101828;
  color: #ffffff;
  border-radius: 4px;
  padding: 2px 9px;
  user-select: all;
}

/* -------------------------------------------- student set-up (client info) */

.setup-line {
  font-size: 12.5px;
  color: var(--md-on-surface-variant, #44474E);
  background: var(--md-surface, #FCFCFF);
  border: 1px solid var(--md-outline-variant, #C4C6CF);
  border-radius: var(--md-radius-s, 8px);
  padding: 7px 10px;
  margin: 6px 0 12px;
}
.setup-line .setup-label {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--md-on-surface, #1A1C1E);
  margin-right: 8px;
}
.setup-bad { color: var(--md-error, #B3261E); font-weight: 700; }

/* remove-student button + no-data cluster box */
.remove-btn {
  border: 1px solid var(--md-error, #B3261E);
  background: transparent;
  color: var(--md-error, #B3261E);
  border-radius: var(--md-radius-full, 999px);
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.remove-btn:hover { background: var(--md-error-container, #F9DEDC); }
.cluster.nodata { border-top: 3px solid var(--md-outline, #74777F); margin-top: 12px; }
.cluster.nodata h4 { color: var(--md-on-surface-variant, #44474E); text-transform: uppercase; }

/* status chips on the teacher page sections table */
.status-chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--md-radius-full, 999px);
  padding: 2px 10px;
  white-space: nowrap;
}
.status-chip.draft { background: var(--md-warn-container, #FFDF99); color: #4d2f00; }
.status-chip.published { background: var(--md-success-container, #C4EED0); color: var(--md-success, #146C2E); }

/* draft upload result */
.draft-actions { margin: 14px 0; }
.draft-actions .btn { font-size: 16px; padding: 12px 28px; }

/* ------------------------------------------------- Bloom taxonomy (v1.2)
   Level chips and profile bars; the per-level color (blue -> purple by
   cognitive depth) is set inline from JS (bloomColor). */

.bloom-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #fff;
  border-radius: var(--md-radius-full, 999px);
  padding: 2px 10px;
  white-space: nowrap;
}

#bloom-bars { max-width: 760px; margin-bottom: 14px; }

.bloom-row { display: flex; align-items: center; gap: 10px; margin: 5px 0; }
.bloom-row .bloom-label {
  width: 110px;
  flex: none;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--md-on-surface, #1A1C1E);
}
.bloom-row .bloom-track {
  flex: 1;
  background: var(--md-surface-container-high, #E9ECF2);
  border-radius: var(--md-radius-full, 999px);
  height: 18px;
  overflow: hidden;
}
.bloom-row .bloom-fill {
  display: block;
  height: 100%;
  border-radius: var(--md-radius-full, 999px) 0 0 var(--md-radius-full, 999px);
}
.bloom-row .bloom-val {
  width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  flex: none;
}
.bloom-row .bloom-n {
  width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  flex: none;
}
.bloom-nodata {
  display: inline-block;
  font-size: 11px;
  line-height: 18px;
  padding: 0 10px;
  color: var(--md-on-surface-variant, #44474E);
}
.student-bloom { margin: 6px 0 12px; max-width: 620px; }

/* --------------------------------------------------- survey tab (v1.3)
   Likert rows: item text | 100%-stacked diverging bar | mean badge | n.
   Select items: compact horizontal count bars, modal option highlighted.
   Free-text answers: quote cards. */

.svy-lik-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0;
}
.svy-lik-text {
  flex: 0 1 340px;
  min-width: 200px;
  font-size: 12.5px;
  line-height: 1.3;
}
.svy-lik-track {
  flex: 1 1 220px;
  min-width: 160px;
  display: flex;
  height: 18px;
  border-radius: var(--md-radius-full, 999px);
  overflow: hidden;
  background: var(--md-surface-container-high, #E9ECF2);
}
.svy-lik-seg { height: 100%; }
.svy-lik-mean {
  flex: none;
  min-width: 34px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--md-on-primary-container, #041E49);
  background: var(--md-primary-container, #D3E3FD);
  border-radius: var(--md-radius-full, 999px);
  padding: 2px 8px;
}
.svy-lik-n {
  flex: none;
  width: 46px;
  text-align: right;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.svy-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px 28px;
}
.svy-sel-item h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.svy-sel-item h4 .svy-lik-n { width: auto; }
.svy-sel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
  font-size: 12.5px;
}
.svy-sel-label {
  flex: 0 0 46%;
  min-width: 120px;
  color: var(--md-on-surface-variant, #44474E);
  line-height: 1.25;
}
.svy-sel-row.modal .svy-sel-label {
  color: var(--md-on-surface, #1A1C1E);
  font-weight: 600;
}
.svy-sel-track {
  flex: 1;
  background: var(--md-surface-container-high, #E9ECF2);
  border-radius: var(--md-radius-full, 999px);
  height: 12px;
  overflow: hidden;
}
.svy-sel-fill {
  display: block;
  height: 100%;
  background: var(--md-outline, #74777F);
  border-radius: var(--md-radius-full, 999px) 0 0 var(--md-radius-full, 999px);
}
.svy-sel-row.modal .svy-sel-fill { background: var(--md-primary, #0B57D0); }
.svy-sel-count {
  flex: none;
  width: 26px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.svy-quote {
  margin: 8px 0;
  padding: 10px 14px;
  background: var(--md-surface, #FCFCFF);
  border-left: 3px solid var(--md-primary, #0B57D0);
  border-radius: 0 var(--md-radius-s, 8px) var(--md-radius-s, 8px) 0;
  font-style: italic;
  white-space: pre-wrap;
}

/* discrimination index (per-question table) */
.disc-good { color: var(--md-success, #146C2E); font-weight: 600; }
.disc-mid { color: var(--md-on-surface, #1A1C1E); }
.disc-weak { color: var(--amber, #7a4a08); font-weight: 600; }
.disc-bad { color: var(--md-error, #B3261E); font-weight: 700; }

/* research pseudonym (muted, next to the anon id) */
.pseudonym-cell { color: var(--md-on-surface-variant, #44474E); font-size: 12.5px; }
.pseudonym-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--md-on-surface-variant, #44474E);
  background: var(--md-surface-container-high, #E9ECF2);
  border-radius: var(--md-radius-full, 999px);
  padding: 1px 9px;
  vertical-align: middle;
}

/* section picker: notes + delete */
.pick-notes-cell { min-width: 220px; }
.pick-notes {
  width: 100%; border: 1px solid var(--md-outline-variant, #C4C6CF);
  border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px;
  background: var(--md-surface, #FCFCFF);
}
.pick-notes:focus { outline: 2px solid var(--md-primary, #0B57D0); }
.pick-notes.saved { border-color: var(--md-success, #146C2E);
  box-shadow: 0 0 0 2px var(--md-success-container, #C4EED0); }

/* survey: doughnuts for nominal items, stacked ordinal bars */
.svy-donut-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px; margin-bottom: 18px; }
.svy-donut-wrap { height: 180px; position: relative; }
.svy-ordinal-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px 24px; }
.svy-ord-track { display: flex; height: 22px; border-radius: 11px;
  overflow: hidden; background: var(--md-surface-container-high, #E9ECF2); }
.svy-ord-seg { display: block; height: 100%; }
.svy-ord-legend { display: flex; flex-wrap: wrap; gap: 4px 14px;
  margin-top: 6px; font-size: 12px; color: var(--md-on-surface-variant, #44474E); }
.svy-ord-key .swatch { display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.svy-ord-key.modal { font-weight: 700; }

/* past reports: delete always visible on the row */
.report-row { display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--md-outline-variant, #C4C6CF);
  border-radius: var(--md-radius-m, 12px); padding: 8px 10px;
  margin-bottom: 8px; background: var(--md-surface, #FCFCFF); }
.report-row .report-item { flex: 1; min-width: 0; }
.report-row .report-del { flex: none; }
