:root {
  --ink: #17213A;
  --paper: #F6F5F1;
  --card: #FFFFFF;
  --line: #DEDBD2;
  --muted: #5A6170;
  --accent: #2456C7;
  --accent-soft: #E3EBFB;
  --good: #1E7A4C;
  --good-soft: #E1F2E8;
  --bad: #B3261E;
  --bad-soft: #FBE9E7;
  --code-bg: #FBFAF7;
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E8EAF0; --paper: #12161F; --card: #1A202B; --line: #2E3644; --muted: #A2A9B6;
    --accent: #7FA6FF; --accent-soft: #1E2A44; --good: #6FD39C; --good-soft: #15291F;
    --bad: #FF9A8F; --bad-soft: #3A1E1B; --code-bg: #151A23;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--font); }
a { color: var(--accent); }
code, pre, textarea { font-family: var(--mono); font-size: 14px; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; }
h1, h2, h3 { line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 19px; }
.brand svg { width: 30px; height: 30px; color: var(--accent); }
.top nav { display: flex; gap: 4px; }
.top nav[hidden] { display: none; }
.top nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 700; }
.top nav a.active { color: var(--ink); background: var(--accent-soft); }

main { max-width: 1400px; margin: 0 auto; padding: 24px; }

/* buttons */
.btn { font: inherit; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0E1420; } }
.btn.ghost { border-style: dashed; }
.btn.small { min-height: 34px; padding: 0 10px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }

/* home */
.daily { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 24px; background: var(--ink); color: var(--paper);
  border-radius: 18px; padding: 24px 28px; margin-bottom: 28px; }
.daily h1 { margin: 2px 0 6px; font-size: 32px; }
.daily .eyebrow { color: #F3C969; }
.daily-blurb { margin: 0; max-width: 70ch; opacity: .9; }
.daily .btn.primary { background: #F3C969; border-color: #F3C969; color: #17213A; }
.daily-status .status { background: rgba(255,255,255,.12); color: inherit; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.papers { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.paper h2 { margin: 0; font-size: 26px; }
.paper h2 span { font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 6px; }
.paper > .muted { margin: 4px 0 8px; }
.topic { font-size: 15px; margin: 20px 0 8px; color: var(--muted); }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qlist a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.qlist a:hover { border-color: var(--accent); }
.q-title { font-weight: 700; }
.q-meta { grid-column: 1; font-size: 14px; color: var(--muted); }
.status { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--paper); color: var(--muted); white-space: nowrap; }
.status.done { background: var(--good-soft); color: var(--good); }
.status.part { background: var(--accent-soft); color: var(--accent); }

/* question workspace */
.workspace { display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; gap: 24px; align-items: start; }
.question { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; position: sticky; top: 84px; max-height: calc(100vh - 108px); overflow: auto; }
.back { font-size: 15px; text-decoration: none; font-weight: 700; }
.question h1 { margin: 6px 0 2px; font-size: 28px; }
.marks { margin: 0 0 8px; color: var(--muted); font-weight: 700; }
.prose p, .prose ul { margin: 0 0 12px; }
.prose ul { padding-left: 22px; }
.task { border-left: 4px solid var(--accent); padding-left: 14px; }
.files-given { margin: 8px 0 16px; }
.files-given summary { cursor: pointer; font-weight: 700; }
.file-name { margin: 8px 0 4px; font-family: var(--mono); font-size: 14px; }
.files-given pre { margin: 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.help { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 4px; }
.help h2 { font-size: 18px; margin: 12px 0 8px; }
.help-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; margin: 0 0 8px; }

.coder { display: grid; gap: 12px; }
.coder-bar, .run-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.lang-tag { font-weight: 700; font-size: 14px; background: var(--accent-soft); color: var(--accent); padding: 4px 12px; border-radius: 999px; }
.seg { display: inline-flex; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { font: inherit; font-weight: 700; font-size: 14px; border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 7px; cursor: pointer; min-height: 34px; }
.seg button[aria-checked="true"] { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .seg button[aria-checked="true"] { color: #0E1420; } }

.editor { display: grid; grid-template-columns: auto 1fr; background: var(--code-bg); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 420px; }
.editor:focus-within { border-color: var(--accent); }
.gutter { margin: 0; padding: 12px 10px 12px 14px; text-align: right; color: var(--muted); opacity: .7; line-height: 1.6; overflow: hidden; user-select: none; border-right: 1px solid var(--line); min-width: 44px; }
.gutter b { color: var(--bad); opacity: 1; }
#code { border: 0; outline: 0; resize: none; padding: 12px 14px; line-height: 1.6; background: transparent; color: var(--ink); white-space: pre; overflow: auto; tab-size: 4; }
.inputs summary { cursor: pointer; font-weight: 700; font-size: 15px; }
#inputs { width: 100%; margin-top: 6px; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--code-bg); color: var(--ink); resize: vertical; }

.result h3 { font-size: 15px; margin: 12px 0 6px; }
.output { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; max-height: 280px; overflow: auto; white-space: pre-wrap; }
.error { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 14px; }
.error p { margin: 4px 0 0; color: var(--ink); }
.score { font-size: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.score.good { background: var(--good-soft); border-color: transparent; color: var(--good); }
.tests { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.tests li { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.tests li > span { font-weight: 700; width: 18px; }
.tests li.pass > span { color: var(--good); }
.tests li.fail > span { color: var(--bad); }
.trace { margin-top: 12px; }
.trace summary { cursor: pointer; font-weight: 700; }
.trace-wrap { overflow: auto; max-height: 320px; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; }
.trace table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: 13px; background: var(--card); }
.trace th, .trace td { border: 1px solid var(--line); padding: 4px 10px; text-align: left; white-space: nowrap; }
.trace th { position: sticky; top: 0; background: var(--accent-soft); }

/* reference */
.reference { max-width: 900px; margin: 0 auto; }
.reference table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.reference th { text-align: left; vertical-align: top; padding: 12px 16px; width: 26%; border-bottom: 1px solid var(--line); }
.reference td { padding: 8px 16px; border-bottom: 1px solid var(--line); }
.reference pre { margin: 4px 0; white-space: pre-wrap; }

@media (max-width: 900px) {
  main { padding: 16px; }
  .papers, .workspace { grid-template-columns: 1fr; }
  .question { position: static; max-height: none; }
  .daily { grid-template-columns: 1fr; padding: 20px; }
  .editor { height: 320px; }
}

/* accounts */
.who { display: flex; align-items: center; gap: 10px; }
.who-name { font-weight: 700; color: var(--muted); font-size: 15px; }
.auth { max-width: 440px; margin: 48px auto; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.auth h1 { margin-top: 0; }
.auth form { display: grid; gap: 14px; margin: 16px 0; }
.auth label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.auth input { font: inherit; font-weight: 400; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.auth input:focus { outline: none; border-color: var(--accent); }
.auth-error { color: var(--bad); margin: 0; min-height: 1em; font-size: 15px; }
.auth-note { background: var(--accent-soft); padding: 10px 14px; border-radius: 10px; }
.error-text { color: var(--bad); }

/* teacher class view */
.class-view { padding: 24px; max-width: 100%; }
.class-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.class-table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.class-table th, .class-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: bottom; }
.class-table thead th { font-size: 13px; min-width: 90px; }
.class-table tbody th { white-space: nowrap; position: sticky; left: 0; background: var(--card); }
.cell { text-align: center !important; font-weight: 700; }
.cell.done { background: var(--good-soft); color: var(--good); }
.cell.part { background: var(--accent-soft); color: var(--accent); }
.cell.none { color: var(--muted); font-weight: 400; }

/* AI tutor */
.tutor { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.tutor-log { max-height: 340px; overflow-y: auto; padding: 12px; display: grid; gap: 8px; }
.tutor-msg { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 15px; max-width: 92%; }
.tutor-msg p { margin: 0 0 6px; } .tutor-msg p:last-child { margin: 0; }
.tutor-msg ul { margin: 4px 0; padding-left: 20px; }
.tutor-msg.ai { background: var(--accent-soft); justify-self: start; }
.tutor-msg.me { background: var(--paper); border: 1px solid var(--line); justify-self: end; white-space: pre-wrap; }
.tutor-msg.thinking { color: var(--muted); font-style: italic; }
.tutor-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.tutor-form textarea { flex: 1; font: 15px/1.4 var(--font); padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); resize: vertical; }

/* examiner marking */
.markscheme { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.markscheme th, .markscheme td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.markscheme .mk { text-align: center; font-weight: 700; white-space: nowrap; }
.markscheme tr.got .mk { color: var(--good); }
.markscheme tr.lost .mk { color: var(--bad); }
.mk-line { font-weight: 400; font-size: 12px; }

/* daily challenge: streaks and solver of the day */
.daily-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.daily-prev { color: inherit; opacity: .85; font-size: 15px; font-weight: 700; text-decoration: none; }
.daily-prev:hover { opacity: 1; text-decoration: underline; }
.daily-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 15px; }
.daily-foot .muted { color: inherit; opacity: .75; }
.streak { display: inline-block; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #fff3d6; color: #8a4b00; font-size: 14px; }
.streak.none { background: rgba(127,127,127,.15); color: inherit; font-weight: 600; }
.star { color: #f5b800; font-size: 1.15em; margin-right: 3px; text-shadow: 0 0 1px #b07f00; }
.who-streak { font-weight: 700; font-size: 14px; color: #8a4b00; background: #fff3d6; padding: 2px 8px; border-radius: 999px; }
.daily-nav { margin: 4px 0 6px; font-weight: 700; font-size: 15px; }
.daily-info { margin: 6px 0 12px; }
.daily-info p { margin: 4px 0; }
.daily-done { background: var(--good-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.daily-done p { margin: 4px 0; }
.charcount { margin-right: 8px; white-space: nowrap; }
.daily-table td.dot { text-align: center; color: var(--muted); padding: 6px 4px; }
.daily-table td.dot.on { color: var(--good); font-weight: 700; }
.daily-table td.dot.late { color: #c07a00; }
.daily-table th.day { text-align: center; min-width: 30px; padding: 6px 4px; }
.daily-foot .status { background: rgba(255,255,255,.14); color: inherit; }
.dot-key.on { color: var(--good); } .dot-key.late { color: #c07a00; }

.dot-btn { all: unset; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.dot-btn:hover, .dot-btn:focus-visible { background: var(--accent-soft); outline: none; }
.code-dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; width: min(720px, 92vw); background: var(--card); color: var(--ink); }
.code-dialog::backdrop { background: rgba(10, 15, 30, .45); }
.code-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.code-dialog pre { max-height: 60vh; overflow: auto; }

/* ---- shared page layout for exam and other single-column pages */
.page { max-width: 900px; margin: 0 auto; padding: 24px; }
.linkish { all: unset; cursor: pointer; }
.linkish:hover, .linkish:focus-visible { text-decoration: underline; }
.code-dialog.wide { width: min(1100px, 95vw); }
.dialog-body { margin-top: 10px; max-height: 75vh; overflow: auto; }
.tmark { display: grid; gap: 10px; }
.tmark label { display: grid; gap: 4px; font-weight: 700; font-size: 15px; }
.tmark input, .tmark textarea, .setwork-form input, .setwork-form select, .toolbar select {
  font: inherit; font-weight: 400; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.tmark input[type=number] { width: 90px; display: inline-block; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }

/* ---- teacher feedback and model answers on question pages */
.teacher-feedback { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.teacher-feedback p { margin: 4px 0; }
.model-code { max-height: 360px; overflow: auto; }

/* ---- trace tables and test data answers */
.answer-table { margin: 10px 0; }
.trace-input { border-collapse: collapse; width: 100%; background: var(--card); }
.trace-input th { background: var(--accent-soft); font-family: var(--mono, monospace); font-size: 14px; padding: 6px; border: 1px solid var(--line); }
.trace-input td { border: 1px solid var(--line); padding: 0; }
.trace-input input { width: 100%; box-sizing: border-box; border: 0; padding: 8px; font: 15px var(--mono, monospace); background: transparent; color: var(--ink); text-align: center; }
.trace-input input:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.testdata { display: grid; gap: 12px; margin: 10px 0; }
.testdata fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 10px; background: var(--card); }
.testdata legend { font-weight: 700; padding: 0 6px; }
.testdata input { font: 16px var(--mono, monospace); padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); min-width: 160px; }

/* ---- set work on the pupil's page */
.setwork { margin: 0 0 24px; }
.setwork h2 { margin: 0 0 10px; }
.assignment { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; }
.assignment.complete { border-color: var(--good); }
.assignment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.assignment summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.due { font-size: 14px; color: var(--muted); }
.due.soon { color: #b06000; font-weight: 700; }
.due.late { color: var(--bad); font-weight: 700; }
.qlist.compact li a { padding: 8px 12px; }

/* ---- exam mode */
.exam-form { display: grid; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.exam-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.exam-form legend { font-weight: 700; margin-bottom: 6px; }
.exam-bar { position: sticky; top: 66px; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.exam-bar .spacer { flex: 1; }
.exam-timer { font: 700 18px var(--mono, monospace); padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); }
.exam-timer.low { background: var(--bad-soft); color: var(--bad); }
.exam-tabs { display: flex; gap: 6px; padding: 12px 24px 0; flex-wrap: wrap; }
.exam-tabs button { font: inherit; font-weight: 700; padding: 6px 14px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.exam-tabs button[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.exam-answer { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 16px; }
#marking li { margin: 6px 0; }

/* ---- teacher class pages */
.class-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.class-head h1 { margin: 0; }
.subtabs { display: flex; flex-wrap: wrap; gap: 4px; }
.subtabs a { text-decoration: none; color: var(--muted); font-weight: 700; padding: 6px 12px; border-radius: 8px; }
.subtabs a[aria-current="true"] { color: var(--ink); background: var(--accent-soft); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.toolbar p { margin: 0; }
.cell-btn, .name-btn { all: unset; cursor: pointer; display: block; border-radius: 6px; padding: 2px 4px; }
.name-btn { font-weight: 700; }
.cell-btn:hover, .cell-btn:focus-visible, .name-btn:hover, .name-btn:focus-visible { background: var(--accent-soft); outline: none; }
.teacher-mk { color: var(--accent); font-weight: 700; }
.work-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
@media (max-width: 800px) { .work-grid { grid-template-columns: 1fr; } }
.work-grid h3 { margin: 6px 0 8px; }
.attempt-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; max-height: 110px; overflow: auto; }
.attempt { font: inherit; font-size: 13px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.attempt.on { background: var(--accent-soft); border-color: var(--accent); }
.setwork-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; display: grid; gap: 10px; }
.setwork-form label { display: grid; gap: 4px; font-weight: 700; font-size: 15px; }
.qpick-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 800px) { .qpick-wrap { grid-template-columns: 1fr; } }
.qpick { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
.qpick legend { font-weight: 700; }
.qpick p { margin: 8px 0 2px; }
.qpick label { display: block; font-weight: 400; margin: 2px 0; }
.bar { display: inline-block; width: 120px; height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.bar span { display: block; height: 100%; background: var(--accent); }
.weak-table td { white-space: nowrap; }
.stuck { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin-bottom: 8px; }
.stuck p { margin: 4px 0; }
.stuck ul { margin: 4px 0; }
.code-block { background: var(--code-bg, var(--paper)); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: 14px/1.5 var(--mono, monospace); overflow-x: auto; white-space: pre; }
.tmark label.inline { display: flex; align-items: center; gap: 8px; }
.weak-table tbody th { white-space: normal; min-width: 280px; position: static; }

/* ---- class filter, groups and pupil profiles */
.class-filter { margin-left: auto; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.class-filter select, .group-edit input, .new-group input { font: inherit; font-weight: 400; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.name-link { color: inherit; font-weight: 700; text-decoration: none; }
.name-link:hover { text-decoration: underline; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.remove-solve { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
.new-group { margin: 12px 0 16px; }
.new-group label, .group-edit label { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.group-edit { display: grid; gap: 10px; margin-top: 10px; }
.member-pick { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.member-pick legend { font-weight: 700; }
.member-pick label { font-weight: 400; display: flex; gap: 6px; align-items: center; }
.profile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.profile-head h2 { margin: 4px 0 0; }
.profile-head p { margin: 4px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 14px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 2px; }
.stat strong { font-size: 24px; }
.stat span { font-weight: 700; font-size: 14px; }
.stat small { color: var(--muted); font-size: 12px; }
.ai-summary { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 10px 16px; margin: 14px 0; }
.ai-summary h3 { margin: 0; }
.ai-summary .prose p { margin: 8px 0 2px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.mid { background: var(--accent-soft); color: var(--accent); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.profile-table tbody th { white-space: normal; min-width: 220px; position: static; }
.profile-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .profile-cols { grid-template-columns: 1fr; } }
.stuck-list li { margin: 4px 0; }
.weeks { display: flex; align-items: flex-end; gap: 8px; height: 100px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.week { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.week span { width: 100%; max-width: 34px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.week small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.class-filter[hidden] { display: none; }
