/* Student pages (tutoring, T-0029b). Builds on app.css (same look as the placement test); phone first (360 px). */

.student .st-wrap { padding-top: 16px; }
.st-topbar { gap: 6px; }
.st-nav a, .st-nav button { font-size: .95rem; padding: 8px 10px; }
.st-foot { margin: 24px 0 8px; }
.st-narrowish { max-width: 820px; }
.st-back { text-decoration: none; font-weight: 700; margin-right: 4px; }

/* forms */
.st-form { display: flex; flex-direction: column; gap: 6px; text-align: left; max-width: 380px; margin: 16px auto 8px; }
.st-form label { font-weight: 600; font-size: .95rem; margin-top: 8px; }
.st-form input[type=text], .st-form input:not([type]), .st-form input[type=password] {
  font: inherit; font-size: 1.1rem; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--text); width: 100%; }
.st-form input:focus { border-color: var(--accent); outline: none; }
.st-form .btn { margin-top: 14px; }
.st-form .error { margin: 6px 0 0; }

/* home */
.st-hello h1 { font-size: 1.8rem; margin: 0; }
.st-hello p { margin: 0 0 14px; }
.st-grid { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
@media (min-width: 900px) { .st-grid { grid-template-columns: 1.15fr 1fr; } }
.st-h { margin: 0 0 10px; font-size: 1.2rem; }
.st-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; }
.st-live { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
           background: var(--good-soft); border-color: var(--good); }
.st-live h2 { margin: 0 0 4px; }
.st-live p { margin: 0; }
.st-next-when { font-size: 1.25rem; margin: 0 0 2px; }
.st-next-what { margin: 0; color: var(--muted); }
.st-topics { font-size: 1.15rem; font-weight: 700; margin: 6px 0 10px; }
.st-pill { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: 999px;
           background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.st-prep { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.st-prep h3 { margin-top: 6px; }
.st-prep h4, .st-plan h4, #material h4 { font-size: 1rem; margin: 12px 0 4px; }
.st-notehtml p:first-child { margin-top: 0; }
.st-notehtml ul, .st-notehtml ol { padding-left: 1.3rem; margin: .3rem 0 .6rem; }
.st-notehtml li { margin: .25rem 0; }
.st-checklist { list-style: none; padding: 0; margin: 4px 0 10px; }
.st-checklist li { position: relative; padding: 6px 0 6px 30px; }
.st-checklist li::before { content: ""; position: absolute; left: 0; top: 9px; width: 18px; height: 18px;
                           border: 2px solid var(--accent); border-radius: 5px; }
.st-tailored { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
.st-tag { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin: 0 0 4px; }
.st-empty { color: var(--muted); font-size: 1.05rem; }

.st-list { list-style: none; margin: 0; padding: 0; }
.st-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0;
           border-top: 1px solid var(--line); }
.st-item:first-child { border-top: 0; }
.st-item-main { display: flex; flex-direction: column; min-width: 0; }
.st-item-title { font-weight: 600; text-decoration: none; color: var(--text); overflow-wrap: anywhere; }
.st-item-title:hover { text-decoration: underline; }
.st-item .btn { flex: none; }
.st-overdue .st-item-title { color: var(--bad); }
.st-late { color: var(--bad); }
.st-today { background: var(--warn-soft); border-radius: 10px; padding: 10px; margin: 6px -10px 0; border-top: 0; }
.st-kind { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
           color: var(--muted); margin: 0; }
.st-kind-topic_test, .st-kind-revision_test { color: var(--bad); }
.st-kind-exam_prep_task { color: var(--warn); }
.st-kind-homework { color: var(--accent); }
.st-score { display: inline-block; font-weight: 800; font-variant-numeric: tabular-nums; padding: 2px 10px;
            border-radius: 999px; white-space: nowrap; font-size: .95rem; }
.st-score-strong { background: var(--good-soft); color: var(--good); }
.st-score-adequate { background: var(--accent-soft); color: var(--accent); }
.st-score-weak { background: var(--warn-soft); color: var(--warn); }
.st-score-critical { background: var(--bad-soft); color: var(--bad); }
.st-score-none { background: var(--line); color: var(--muted); }

/* timeline */
.st-tl { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 3px solid var(--line); }
.st-tl-item { position: relative; padding: 6px 0 8px 12px; display: flex; flex-direction: column; }
.st-tl-item::before { content: ""; position: absolute; left: -22px; top: 12px; width: 12px; height: 12px; border-radius: 50%;
                      background: var(--card); border: 3px solid var(--accent); }
.st-tl-past .st-tl-item::before { background: var(--accent); }
.st-tl-live::before { background: var(--good); border-color: var(--good); }
.st-tl-date { font-size: .82rem; font-weight: 700; color: var(--muted); }
.st-tl-what a { text-decoration: none; }
.st-tl-what .st-score { margin-left: 6px; font-size: .8rem; }

/* progress bars */
.st-strand { border-top: 1px solid var(--line); }
.st-strand:first-of-type { border-top: 0; }
.st-strand > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 52px; gap: 4px 10px;
                       align-items: center; padding: 10px 0; }
.st-strand > summary::-webkit-details-marker { display: none; }
.st-strand > summary .st-bar-label { grid-column: 1 / -1; font-weight: 600; }
.st-strand > summary .st-bar-label::before { content: "\25B8"; color: var(--muted); margin-right: 6px; display: inline-block; }
.st-strand[open] > summary .st-bar-label::before { transform: rotate(90deg); }
.st-bar { display: block; position: relative; height: 14px; background: var(--line); border-radius: 7px; overflow: hidden; }
.st-bar > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; min-width: 4px; }
.st-bar-thin { height: 9px; }
.st-bar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-topic-bars { list-style: none; margin: 0 0 10px; padding: 0 0 0 16px; }
.st-topic-bars li { display: grid; grid-template-columns: 1fr 52px; gap: 2px 10px; align-items: center; padding: 4px 0;
                    font-size: .92rem; }
.st-topic-bars .st-bar-label { grid-column: 1 / -1; text-decoration: none; }

/* note */
.st-note h1 { margin-bottom: 4px; }
.st-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.st-toc a { font-size: .85rem; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); text-decoration: none; }
.st-note-sec { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 4px; scroll-margin-top: 12px; }
.st-note-sec ul, .st-note-sec ol { padding-left: 1.3rem; }
.st-note-sec li { margin: .35rem 0; }
.st-sec-key-points { background: var(--accent-soft); border: 0; border-radius: 12px; padding: 4px 16px 8px; }
.st-sec-common-mistakes { background: var(--warn-soft); border: 0; border-radius: 12px; padding: 4px 16px 8px; }
.st-note .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.st-howto summary { cursor: pointer; font-weight: 600; }

/* results */
.st-result-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.st-result-head h1 { margin-bottom: 2px; }
.st-result-head p { margin: 0; }
.st-bigscore { display: flex; flex-direction: column; align-items: center; padding: 10px 20px; border-radius: 14px; min-width: 140px; }
.st-bigscore .pc { font-size: 2.3rem; font-weight: 800; line-height: 1.1; }
.st-encourage { font-size: 1.1rem; margin: 0 4px 16px; }
.st-rq .q-head h2 { margin: 0; font-size: 1.2rem; }
.st-rq-right { border-left: 5px solid var(--good); }
.st-rq-part { border-left: 5px solid var(--warn); }
.st-rq-wrong { border-left: 5px solid var(--bad); }
.st-mark { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 2px 10px; border-radius: 999px; }
.st-mark-right { background: var(--good-soft); color: var(--good); }
.st-mark-part { background: var(--warn-soft); color: var(--warn); }
.st-mark-wrong { background: var(--bad-soft); color: var(--bad); }
.st-answers { display: grid; gap: 8px; margin: 10px 0 4px; }
@media (min-width: 640px) { .st-answers { grid-template-columns: 1fr 1fr; } }
.st-yours, .st-correct { border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; overflow-x: auto; }
.st-yours.st-right { background: var(--good-soft); }
.st-yours.st-part { background: var(--warn-soft); }
.st-yours.st-wrong { background: var(--bad-soft); }
.st-correct { background: var(--accent-soft); }
.st-ans-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.st-yours code { font-size: 1.05rem; overflow-wrap: anywhere; }

/* live lesson */
.st-count { font-weight: 700; font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 10px; background: var(--accent-soft); }
.st-waiting { padding: 28px 18px; }
.st-waiting h1 { font-size: 1.4rem; }
.st-pulse { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); margin: 0 auto 14px;
            animation: st-pulse 1.6s ease-in-out infinite; }
@keyframes st-pulse { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.2); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .st-pulse { animation: none; } }
.st-lesson-foot { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.st-lesson-foot p { margin: 0; }
.st-feedback { margin: 10px 0 2px; border-radius: 10px; padding: 8px 12px; display: grid; gap: 4px; }
.st-feedback.st-right { background: var(--good-soft); }
.st-feedback.st-part { background: var(--warn-soft); }
.st-feedback.st-wrong { background: var(--bad-soft); }
.st-ans-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; justify-content: space-between; }
.st-summary p { margin: 4px 0; }
.st-comment { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }

/* exam prep */
.st-plan-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.st-plan-head h2 { margin: 0 0 4px; }
.st-plan-head p { margin: 0 0 4px; }
.st-plan-stats { display: flex; flex-direction: column; gap: 4px; min-width: 200px; flex: 0 1 260px; justify-content: center; }
.st-days { list-style: none; margin: 0; padding: 0; }
.st-day { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; }
.st-day-today { border: 2px solid var(--accent); background: var(--accent-soft); }
.st-day-done { opacity: .85; }
.st-day-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.st-day-topic { font-size: 1.05rem; }
.st-badge { font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--text); }
.st-badge-weak { background: var(--warn-soft); color: var(--warn); }
.st-tasks { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.st-tasks li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 34px; }
.st-tick { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.st-tick input { width: 22px; height: 22px; accent-color: var(--good); margin: 0; }
.st-ticked a { color: var(--good); }
.st-done-mark { color: var(--good); font-weight: 800; }
.st-kp { margin: 6px 0 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; }
.st-kp summary, .st-earlier summary, .st-plan details summary { cursor: pointer; font-weight: 600; padding: 4px 0; }

@media (max-width: 520px) {
  .st-hello h1 { font-size: 1.5rem; }
  .st-nav { width: 100%; justify-content: space-between; }
  .st-item { align-items: flex-start; flex-direction: column; }
  .st-item .btn { align-self: stretch; }
  .st-live .btn { width: 100%; }
  .st-bigscore { width: 100%; }
  .st-lesson-foot .btn { width: 100%; }
  .st-today { margin: 6px 0 0; }
}

/* T-0031: live lesson led by the tutor - the tutor's question is marked, questions ahead wait */
.grid .cell.tutor { box-shadow: inset 0 0 0 3px var(--flag); }
.grid .cell.locked { opacity: .7; cursor: not-allowed; }

/* print button under a question (print-question.js) */
.st-print { align-self: flex-start; }

/* ---- "show more" buttons (native <details>, no script) and the mastery donut */
.st-more { margin-top: 10px; }
.st-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; user-select: none; }
.st-more > summary::-webkit-details-marker { display: none; }
.st-more > summary::marker { content: ""; }
.st-more > summary::after { content: "\25BE"; margin-left: 8px; font-size: .9em; }
.st-more[open] > summary::after { content: "\25B4"; }
.st-more:not([open]) .when-open, .st-more[open] .when-closed { display: none; }
.st-more[open] > summary { margin-bottom: 6px; }
.st-more-topics { margin-top: 14px; }

.st-donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 10px 0 4px; }
.st-donut { width: 150px; height: 150px; flex: none; }
.st-donut circle { transition: stroke-width .15s; }
.st-donut circle:hover { stroke-width: 23; }
.pie-strong { stroke: var(--st-strong); } .pie-adequate { stroke: var(--st-adequate); }
.pie-weak { stroke: var(--st-weak); } .pie-critical { stroke: var(--st-critical); }
.st-donut-num { font: 700 20px var(--font); fill: var(--text); }
.st-donut-sub { font: 400 9px var(--font); fill: var(--muted); }
.st-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1; min-width: 200px; }
.st-legend li { display: flex; align-items: center; gap: 8px; }
.st-legend-name { flex: 1; }
.lg-dot { width: 12px; height: 12px; border-radius: 3px; flex: none; display: inline-block; }
