body.dash { min-height: 100%; display: block; background: var(--panel); }
.dash-main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }
.who { color: var(--muted); font-size: 13.5px; }

.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px; }
.auth-intro { margin: 0 0 18px; text-align: center; }
.auth-intro p { margin-left: auto !important; margin-right: auto !important; }
.hero-logo { display: block; margin: 0 auto 10px; height: 96px; width: 96px; }
.card .sub.center { text-align: center; }
.card h2.center { text-align: center; }
.auth-intro h1 { font-size: 24px; margin: 0 0 6px; font-weight: 600; }
.auth-intro p { margin: 0; color: var(--muted); max-width: 60ch; line-height: 1.5; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.card h2 { margin: 0 0 4px; font-size: 17px; }
.card .sub { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; padding: 2px; margin-bottom: 12px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 5px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--teal-tint); color: var(--teal-dark); font-weight: 500; }
.form label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.form input, .form textarea, .form select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.form textarea { min-height: 72px; resize: vertical; }
.form .row { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.form .error { color: var(--stop); font-size: 13px; margin: 8px 0 0; min-height: 1em; }
.code-input { font-family: var(--mono); letter-spacing: 2px; text-transform: uppercase; }

.section { margin-top: 30px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head .spacer { flex: 1; }
.empty { color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: 18px; margin: 0; }

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.project { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.project a.title-link { font-weight: 600; color: var(--ink); text-decoration: none; }
.project a.title-link:hover { color: var(--teal-dark); text-decoration: underline; }
.project .meta { color: var(--muted); font-size: 12.5px; }
.project .tag { align-self: flex-start; font-size: 11.5px; color: var(--teal-dark); background: var(--teal-tint); border-radius: 4px; padding: 1px 6px; }
.project .acts { display: flex; gap: 12px; margin-top: auto; padding-top: 6px; }

table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #fdf0e3; font-size: 13.5px; vertical-align: middle; }
table.list th { font-weight: 600; color: var(--muted); background: var(--panel); font-size: 12.5px; }
table.list tr:last-child td { border-bottom: 0; }
table.list .acts { display: flex; gap: 12px; flex-wrap: wrap; }
.status-pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #fdf0e3; color: var(--muted); }
.status-pill.done { background: #e2f4ea; color: #17733f; }
.status-pill.graded { background: var(--teal-tint); color: var(--teal-dark); }
.status-pill.progress { background: #fff4dc; color: #8a5a00; }
.class-code { font-family: var(--mono); font-weight: 500; letter-spacing: 1px; background: var(--panel); border: 1px solid var(--line); padding: 1px 7px; border-radius: 5px; }
.feedback { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.grade-cell { display: flex; gap: 6px; align-items: center; }
.grade-cell input { width: 64px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; }
.grade-cell input.fb { width: 200px; }
.back { margin-bottom: 8px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; }

@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  table.list th:nth-child(3), table.list td:nth-child(3) { display: none; }
}
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: #fff; }
.code-input::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.admin-link { margin-top: 22px; color: var(--muted); font-size: 13.5px; }
.admin-link a { color: var(--teal-dark); }
.site-notice { background: #fff3e6; border-bottom: 1px solid #fed7aa; color: #7c2d12; }

/* my account + two-step sign-in */
.account-page { display: grid; gap: 16px; max-width: 720px; }
.account-page .page-title { margin: 0; font-size: 22px; font-weight: 600; }
.account-page .lede { margin: -8px 0 0; color: var(--muted); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.card-head h2 { margin: 0; }
.otp-card { max-width: 420px; margin: 0 auto; }
.otp-input { font-family: var(--mono); font-size: 20px !important; letter-spacing: 4px; max-width: 220px; }
.pw-meter { font-size: 12.5px; margin-top: 4px; min-height: 1.2em; color: var(--muted); }
.pw-meter[data-score="0"], .pw-meter[data-score="1"] { color: var(--stop); }
.pw-meter[data-score="2"] { color: #8a5a00; }
.pw-meter[data-score="3"], .pw-meter[data-score="4"] { color: #17733f; }
.ok-note { color: #17733f; background: #e2f4ea; border-radius: 6px; padding: 8px 12px; margin: 10px 0 0; font-size: 13.5px; }
.warn-note { color: #6e4800; background: #fff4dc; border: 1px solid #f0d49a; border-radius: 6px; padding: 8px 12px; margin: 0; font-size: 13.5px; line-height: 1.45; }
.setup-steps { margin: 4px 0 0; padding-left: 20px; line-height: 1.5; }
.setup-steps li { margin-bottom: 10px; }
.qr { width: 190px; height: 190px; margin: 10px 0 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.qr svg { width: 100%; height: 100%; display: block; }
code.secret { display: inline-block; font-family: var(--mono); background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; margin-top: 6px; letter-spacing: 1px; user-select: all; }
.recovery { margin-top: 14px; }
.recovery .codes { columns: 2; font-family: var(--mono); font-size: 14px; margin: 12px 0; padding-left: 26px; }
.recovery .codes li { margin-bottom: 4px; }
.recovery .row, .twostep .row { display: flex; gap: 10px; flex-wrap: wrap; }
.twostep .btn.danger { background: var(--stop); color: #fff; border-color: var(--stop); }
.top-links a[hidden] { display: none; }
@media (max-width: 640px) { .recovery .codes { columns: 1; } }

/* quizzes */
.hint { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }
.tag-quiz { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: #6b3fa0; background: #f0e8fa; border-radius: 4px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px; }
.quiz-builder { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 4px; }
.q-about { margin: 6px 0 0; }
.q-edit-list { padding-left: 22px; margin: 14px 0 10px; }
.q-edit { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.q-edit::marker { font-weight: 600; color: var(--muted); }
.form .q-edit textarea.q-text { min-height: 44px; font-weight: 500; }
.q-opts { display: grid; gap: 5px; margin: 8px 0; }
.q-opt { display: grid; grid-template-columns: 22px 1fr 24px; gap: 6px; align-items: center; }
.form .q-opt input[type="radio"] { width: 16px; height: 16px; accent-color: var(--ok); }
.form .q-opt input[type="text"] { padding: 5px 8px; }
.q-tools { display: flex; gap: 12px; align-items: center; font-size: 12.5px; }
.q-tools .spacer { flex: 1; }
.form .q-explain { margin-top: 6px; font-size: 13px; padding: 5px 8px; }
.q-flags { margin-top: 12px; display: grid; gap: 4px; }
.form label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 13.5px; margin: 0; }
.form label.check input { width: 16px; height: 16px; accent-color: var(--teal); }
.danger-link { color: var(--stop) !important; }
.quiz { display: grid; gap: 14px; max-width: 760px; }
.quiz-q { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 12px; margin: 0; }
.quiz-q.right { border-left: 4px solid var(--ok); }
.quiz-q.wrong { border-left: 4px solid var(--stop); }
.quiz-q legend { font-weight: 500; padding: 0; float: left; width: 100%; margin-bottom: 10px; line-height: 1.45; }
.quiz-q .qn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-dark); font-size: 12px; font-weight: 600; margin-right: 8px; }
.quiz-opt { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; margin-top: 6px; cursor: pointer; clear: both; }
.quiz-opt:hover { background: var(--panel); }
.quiz-opt:has(input:checked:enabled) { border-color: var(--teal); background: var(--teal-tint); }
.quiz-opt input { accent-color: var(--teal); }
.quiz-opt .letter { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.quiz-opt .mark { margin-left: auto; font-size: 12px; font-weight: 500; }
.quiz-opt.is-answer { border-color: #9fd8b6; background: #e2f4ea; }
.quiz-opt.is-answer .mark { color: #17733f; }
.quiz-opt.is-wrong { border-color: #f1b8b1; background: #fbe9e7; }
.quiz-opt.is-wrong .mark { color: var(--stop); }
.quiz .explain { margin: 10px 0 0; font-size: 13.5px; color: #364153; background: var(--panel); border-radius: 6px; padding: 8px 10px; line-height: 1.45; }
.quiz .row { display: flex; gap: 12px; align-items: center; }
.quiz .error { color: var(--stop); }
.quiz-score { display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 0 0 16px; max-width: 760px; box-sizing: border-box; }
.quiz-score .big { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--teal-dark); }
.quiz-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 20px; }
.quiz-tiles .tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.quiz-tiles .num { font-size: 24px; font-weight: 600; }
.quiz-tiles .lbl { color: var(--muted); font-size: 13px; }
.sub-head { font-size: 16px; margin: 22px 0 8px; }
.pct { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.pct-bar { height: 8px; background: var(--ok); border-radius: 4px; min-width: 2px; }
.pct-bar.low { background: var(--warn); }
.pct span { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
table.list td.num { font-variant-numeric: tabular-nums; }

/* separate student / teacher sign-in */
.auth.single { grid-template-columns: minmax(0, 460px); justify-content: center; }
.auth-switch { text-align: center; color: var(--muted); margin: 18px 0 0; }
.auth-switch a { color: var(--teal-dark); }
.role-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 760px; margin: 8px auto 0; }
.role-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 26px 24px 22px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.role-card:hover, .role-card:focus-visible { border-color: var(--teal); box-shadow: 0 6px 18px rgb(185 61 11 / .12); transform: translateY(-2px); outline: none; }
.role-icon svg { width: 64px; height: 64px; display: block; }
.role-title { font-size: 19px; font-weight: 600; }
.role-text { color: var(--muted); font-size: 14px; line-height: 1.45; max-width: 30ch; }
.role-go { margin-top: 8px; display: inline-block; padding: 8px 16px; border-radius: 7px; background: var(--teal); color: #fff; font-weight: 500; font-size: 14px; }
.role-card.teacher .role-go { background: #23306B; }
@media (max-width: 640px) { .role-cards { grid-template-columns: 1fr; } .auth.single { grid-template-columns: 1fr; } }
.auth.single .card > h2 { display: none; }
/* Footer sits at the bottom of the window on short pages and after the content on long ones */
body.dash { height: auto; min-height: 100vh; position: relative; padding-bottom: 34px; box-sizing: border-box; }
body.dash .site-footer { position: absolute; left: 0; right: 0; bottom: 0; }
.captcha-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.captcha-img { display: block; flex: none; border: 1px solid var(--line); border-radius: 6px; }
.form .captcha-row input { flex: 1 1 100%; width: 100%; text-transform: uppercase; letter-spacing: 2px; }
/* teacher review (2026-11-11) */
.status-pill.returned { background: #fde8e4; color: #a33a22; }
.tag-note { display: inline-block; margin-left: 6px; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #fde8e4; color: #a33a22; text-decoration: none; }
.activity .student-block h3 { margin: 0; font-size: 16px; }
.section-head .filter { max-width: 260px; }
.muted.small, .small { font-size: 12px; }
.activity td .tag { margin-left: 8px; }
.section-head .filter { padding: 6px 10px; border: 1px solid var(--line, #f0dcc7); border-radius: 6px; font: inherit; }
.project .tag-note { align-self: flex-start; margin-left: 0; }
td .tag-note { display: table; margin: 4px 0 0; }

/* Consent tick at sign-up (2026-11-13) */
.form .consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--ink); margin: 4px 0 2px; }
.form .consent[hidden] { display: none; }
.form .consent input { margin-top: 3px; flex: none; width: auto; }
.form .consent a { color: var(--teal-dark, #9a3412); font-weight: 600; }
