/* Test-exam reports (design/reports-showcase.html, recommendation A). Colors come from tokens.css only. */

.rp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.rp-head h1 { font-size: 1.35rem; margin: 0; border-inline-start: 4px solid var(--brand-orange); padding-inline-start: 10px; }
.rp-head__sub { color: var(--text-muted); font-size: .85rem; margin: 2px 0 0; padding-inline-start: 14px; }
.rp-head__acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.rp-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.rp-tabs a { border: 1px solid var(--gray-300); background: var(--surface); border-radius: var(--r-pill); padding: 4px 14px; font-weight: 700; font-size: .82rem; color: var(--gray-600); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.rp-tabs a:hover { border-color: var(--brand-orange); color: var(--heading); }
.rp-tabs a.on { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

.rp-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 12px; margin-bottom: 12px; box-shadow: var(--shadow-1); }
.rp-bar label { font-size: .78rem; color: var(--text-muted); font-weight: 700; margin: 0; }
.rp-bar .form-select { width: auto; min-width: 140px; font-size: .82rem; padding-block: 3px; }
.rp-bar__grow { flex: 1; }
/* segmented choice (count of top students): same look as the track switch (panel.css .xseg) */
.rp-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--gray-100); border: 1px solid var(--border); flex-wrap: wrap; }
.rp-seg a { display: inline-flex; align-items: center; height: 30px; padding-inline: 14px; border-radius: var(--r-pill); font-size: .82rem; font-weight: 700; color: var(--gray-600); text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; }
.rp-seg a:hover { background: var(--surface); color: var(--heading); text-decoration: none; }
.rp-seg a.on { background: var(--surface); color: var(--heading); box-shadow: 0 1px 3px rgb(28 46 99 / .16); }
.rp-chip { border: 1px solid var(--gray-300); border-radius: var(--r-pill); padding: 1px 10px; font-size: .76rem; font-weight: 700; color: var(--gray-600); background: var(--surface); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.rp-chip.on { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.rp-chip b { font-weight: 900; }

.rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.rp-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; border-inline-start: 4px solid var(--brand-blue); box-shadow: var(--shadow-1); }
.rp-kpi.o { border-inline-start-color: var(--brand-orange); }
.rp-kpi.g { border-inline-start-color: var(--green); }
.rp-kpi.r { border-inline-start-color: var(--red); }
.rp-kpi__l { font-size: .74rem; color: var(--text-muted); }
.rp-kpi__v { font-size: 1.25rem; font-weight: 900; color: var(--heading); line-height: 1.3; }
.rp-kpi__d { font-size: .72rem; font-weight: 700; }

.rp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: 14px 16px; margin-bottom: 12px; }
.rp-card h2 { font-size: .98rem; color: var(--heading); margin: 0 0 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rp-card h2 small { font-weight: 500; color: var(--text-muted); font-size: .76rem; }
.rp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rp-cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.rp-tw { overflow: auto; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); max-height: calc(100vh - 220px); }
.rp-tw.free { max-height: none; }
table.rp-t { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .8rem; }
table.rp-t th { background: var(--brand-blue); color: #fff; font-weight: 700; padding: 6px 8px; text-align: center; white-space: nowrap; border-inline-start: 1px solid rgb(255 255 255 / .15); position: sticky; top: 0; z-index: 2; }
/* a lower header row sticks under the rows above it: js/site.js measures --rp-top (33px is the one-line fallback) */
table.rp-t thead tr + tr th { background: #3A5CB0; font-size: .74rem; font-weight: 600; top: var(--rp-top, 33px); }
table.rp-t th a { color: #fff; text-decoration: none; }
table.rp-t th a:hover { text-decoration: underline; }
/* subject header button: opens the subject statistics card (advisor card) */
table.rp-t th a.rp-subj { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px 2px 10px; border-radius: var(--r-pill); background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .45); color: #fff; text-decoration: none; transition: background .15s, border-color .15s; }
table.rp-t th a.rp-subj svg { width: 14px; height: 14px; opacity: .9; }
table.rp-t th a.rp-subj:hover, table.rp-t th a.rp-subj:focus-visible { background: rgb(255 255 255 / .3); border-color: #fff; text-decoration: none; }
table.rp-t th a.rp-subj.is-on { background: var(--surface); color: var(--link); border-color: #fff; }
table.rp-t th a.rp-subj.tip[data-tip]::after { font-weight: 600; white-space: normal; width: 220px; }
table.rp-t th:has(.rp-subj) { z-index: 4; }
.rp-hint-ico { width: 14px; height: 14px; vertical-align: -2px; margin-inline-end: 4px; }
/* sortable report columns (js/table-tools.js) */
table.rp-t th[data-sort] { cursor: pointer; user-select: none; }
table.rp-t th[data-sort]::after { content: "▲▼"; font-size: .5rem; letter-spacing: -1px; margin-inline-start: 4px; opacity: .45; }
table.rp-t th.is-asc::after { content: "▲"; opacity: 1; color: var(--brand-amber); }
table.rp-t th.is-desc::after { content: "▼"; opacity: 1; color: var(--brand-amber); }
table.rp-t th[data-sort]:focus-visible { outline: 2px solid var(--brand-amber); outline-offset: -2px; }
.rp-search { margin: 8px 0 10px; }
.btn svg.ico-excel { color: var(--green-text); }
.btn svg.ico-pdf { color: var(--red); }
.rp-quick { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rp-quick .rp-chip { height: 34px; padding: 0 14px; font-size: .8rem; }
.rp-quick .rp-chip:hover { border-color: var(--brand-navy); color: var(--heading); text-decoration: none; }
.rp-quick .rp-chip.on, .rp-quick .rp-chip.on:hover { color: #fff; }

table.rp-t td { padding: 5px 8px; text-align: center; white-space: nowrap; border-top: 1px solid var(--line-soft); }
table.rp-t tbody tr:nth-child(even) td { background: var(--surface-sunk); }
table.rp-t td.nm { text-align: start; font-weight: 600; }
table.rp-t td.nm small { display: block; font-weight: 400; color: var(--text-muted); font-size: .72rem; line-height: 1.3; }
table.rp-t td.nm a { color: var(--heading); }
table.rp-t tr.me td { background: var(--warning-bg) !important; font-weight: 700; }
table.rp-t tr.sep td { background: var(--surface) !important; color: var(--text-muted); font-size: .72rem; padding: 2px; letter-spacing: 4px; }
table.rp-t tr.tot td { background: var(--tint-blue) !important; font-weight: 800; }
table.rp-t td.b { font-weight: 800; color: var(--heading); }
table.rp-t.math th { background: var(--track-math); }
table.rp-t.exp th { background: var(--track-exp); }
table.rp-t.hum th { background: var(--track-hum); }
/* Folding columns: «نمایش زیردرس‌ها» (.fx-parts, html.rp-parts) and «نمایش پیش و پایه» (.fx-stages, html.rp-stages) on the
   advisor card, «نمایش کتاب‌ها» (.fx-books, html.rp-books) on the teacher list. The .rp-part columns are always in the
   table, folded to zero width until js/site.js sets the class on <html>; the text wrapper .rp-pw carries the width so the
   fold animates. A middle-row heading over several kinds («کل ریاضی») carries each kind's fx class. */
table.rp-t .rp-part { padding-inline: 0; transition: padding .35s ease, border-width .35s ease; }
table.rp-t th.rp-part { border-inline-start-width: 0; background-image: linear-gradient(rgb(255 255 255 / .12), rgb(255 255 255 / .12)); }
table.rp-t .rp-pw { display: block; max-width: 0; opacity: 0; overflow: hidden; transition: max-width .35s ease, max-height .35s ease, opacity .3s ease; }
/* the middle header row (کل ریاضی · حسابان · ...) folds to zero height; js/site.js moves the rows below with it */
table.rp-t tr.rp-h2 th { padding-block: 0; line-height: 18px; transition: padding .35s ease, border-width .35s ease; }
table.rp-t tr.rp-h2 th > .rp-pw { display: block; max-height: 0; }
table.rp-t tr.rp-h2 th:is(html.rp-parts .fx-parts, html.rp-stages .fx-stages, html.rp-books .fx-books) { padding-block: 3px; }
table.rp-t tr.rp-h2 th:is(html.rp-parts .fx-parts, html.rp-stages .fx-stages, html.rp-books .fx-books) > .rp-pw { max-height: 40px; max-width: 12rem; }
table.rp-t th > .rp-pw { display: inline-block; vertical-align: bottom; }
table.rp-t th.rp-part[data-sort]::after { display: none; }
table.rp-t .rp-part:is(html.rp-parts .fx-parts, html.rp-stages .fx-stages, html.rp-books .fx-books) { padding-inline: 8px; }
table.rp-t th.rp-part:is(html.rp-parts .fx-parts, html.rp-stages .fx-stages, html.rp-books .fx-books) { border-inline-start-width: 1px; }
table.rp-t td.rp-part0:is(html.rp-parts .fx-parts, html.rp-stages .fx-stages, html.rp-books .fx-books) { border-inline-start: 1px dashed var(--border); }
table.rp-t :is(html.rp-parts .fx-parts, html.rp-stages .fx-stages, html.rp-books .fx-books) > .rp-pw { max-width: 7rem; opacity: 1; }
table.rp-t th.rp-part[data-sort]:is(html.rp-parts .fx-parts, html.rp-stages .fx-stages, html.rp-books .fx-books)::after { display: inline; }
@media (prefers-reduced-motion: reduce) { table.rp-t .rp-part, table.rp-t .rp-pw, table.rp-t tr.rp-h2 th { transition: none; } }
html.rp-nofx table.rp-t :is(.rp-part, .rp-pw, tr.rp-h2 th) { transition: none !important; }

:where(html:not(.rp-noheat)) .p1 { background: var(--perf-1) !important; color: var(--perf-1-text); }
:where(html:not(.rp-noheat)) .p2 { background: var(--perf-2) !important; color: var(--perf-2-text); }
:where(html:not(.rp-noheat)) .p3 { background: var(--perf-3) !important; color: var(--perf-3-text); }
:where(html:not(.rp-noheat)) .p4 { background: var(--perf-4) !important; color: var(--perf-4-text); }
:where(html:not(.rp-noheat)) .p5 { background: var(--perf-5) !important; color: var(--perf-5-text); }
/* the scale applies only while «طیف رنگی» is on (same specificity as before via :where); off, cells keep their row colour */
html.rp-noheat .rp-legend { display: none; }
.rp-head__acts .rp-heat { margin-inline-end: 6px; }
.rp-bar .form-check-label + .form-check-label { margin-inline-start: 14px; }
.rp-legend { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .72rem; color: var(--text-muted); margin: 8px 0; }
.rp-legend i { display: inline-block; min-width: 46px; text-align: center; border-radius: 4px; font-style: normal; font-weight: 700; padding: 0 4px; }

.rp-star { color: var(--brand-amber); }
.rp-badge { display: inline-block; font-size: .7rem; font-weight: 800; border-radius: var(--r-pill); padding: 0 8px; line-height: 1.7; }
.rp-badge.b { background: var(--tint-blue); color: var(--link); }
.rp-badge.g { background: var(--success-bg); color: var(--green-text); }
.rp-badge.r { background: var(--error-bg); color: var(--perf-1-text); }
.rp-badge.y { background: var(--warning-bg); color: var(--warning-text); }
.rp-badge.o { background: var(--tint-peach); color: var(--perf-2-text); }
.rp-badge.n { background: var(--gray-100); color: var(--gray-600); }
.rp-up { color: var(--green-text); font-weight: 700; }
.rp-dn { color: var(--perf-1-text); font-weight: 700; }
.rp-eq { color: var(--gray-600); }
.rp-anon { color: var(--gray-600); font-style: italic; }
.rp-mut { color: var(--text-muted); font-size: .78rem; }
.rp-note { font-size: .76rem; color: var(--text-muted); margin-top: 6px; }

.rp-msg { border-radius: var(--r-sm); padding: 10px 12px; font-size: .84rem; margin-bottom: 12px; }
.rp-msg.i { background: var(--tint-blue); color: var(--heading); }
.rp-msg.w { background: var(--warning-bg); color: var(--warning-text); }
.rp-msg.g { background: var(--success-bg); color: var(--green-text); }

.rp-stack { display: flex; height: 12px; border-radius: var(--r-pill); overflow: hidden; background: var(--gray-200); min-width: 110px; }
.rp-stack i { display: block; height: 100%; }
/* «کارنامهٔ مبحثی تجمیعی» (TopicCard.razor): the subject's total, then grade › book › chapter › lesson rows, indented by level */
table.tc-tree td.tc-l { white-space: normal; min-width: 280px; }
.tc-row { display: flex; align-items: center; }
.tc-in { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
table.tc-tree tr.tc-hide { display: none; }
.tc-tg { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-inline-end: 4px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text-muted); cursor: pointer; vertical-align: middle; }
.tc-tg::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(135deg); transition: transform .2s; }
.tc-tg[aria-expanded="true"]::before { transform: rotate(45deg); }
.tc-tg:hover { background: var(--surface-sunk); color: var(--heading); }
.tc-tg:focus-visible { outline: 2px solid var(--brand-blue-light); outline-offset: 1px; }
.tc-tg.is-leaf { cursor: default; }
.tc-tg.is-leaf::before { content: none; }
.tc-allbtn { display: inline-flex; gap: 4px; margin-inline-start: 10px; vertical-align: middle; }
.tc-allbtn .btn { font-size: .74rem; }
@media print { table.tc-tree tr.tc-hide { display: table-row; } .tc-tg::before { content: none; } .tc-allbtn { display: none; } }
.tc-in small { font-size: .72rem; font-weight: 500; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tc-t.is-mut { color: var(--text-muted); font-weight: 600; }
table.tc-tree td.tc-d0 { padding-inline-start: 10px; }
table.tc-tree td.tc-d1 { padding-inline-start: 24px; }
table.tc-tree td.tc-d2 { padding-inline-start: 40px; }
table.tc-tree td.tc-d3 { padding-inline-start: 58px; }
table.tc-tree td.tc-d4 { padding-inline-start: 76px; }
table.tc-tree tr.tc-tot td { border-top: 0; }
table.tc-tree tr.tc-tot td.tc-l, table.tc-tree tr.tc-r0 td.tc-l { font-size: .86rem; }
table.tc-tree tr.tc-r0 td { border-top: 2px solid var(--border); }
table.tc-tree tr.tc-r0 .tc-t { font-weight: 800; padding-inline-start: 8px; border-inline-start: 3px solid var(--brand-orange); }
table.tc-tree tr.tc-r1 .tc-t { font-weight: 800; }
table.tc-tree tr.tc-r2 .tc-t { font-weight: 700; }
table.tc-tree tr.tc-r2 .st-tag { background: var(--tint-blue); color: var(--link); }
table.tc-tree :is(tr.tc-r3, tr.tc-r4) td.tc-l { font-weight: 500; }
table.tc-tree :is(tr.tc-r3, tr.tc-r4, tr.tc-all) .rp-stack { min-width: 80px; height: 8px; }
.tc-weak { display: inline-block; padding: 1px 8px; border-radius: var(--r-pill); background: var(--error-bg); color: var(--red); font-weight: 700; font-size: .74rem; cursor: help; }
.rp-c { background: var(--green); }
.rp-w { background: var(--red); }
.rp-bl { background: var(--gray-300); }
.rp-bar1 { height: 8px; background: var(--gray-200); border-radius: var(--r-pill); overflow: hidden; min-width: 70px; }
.rp-bar1 i { display: block; height: 100%; background: var(--brand-blue); border-radius: var(--r-pill); }
.rp-bar1.o i { background: var(--brand-orange); }

/* answer grid of the student card */
/* «سؤال‌به‌سؤال» (Questions.razor, A2): view switch, filters and sort in one row; option bars of the readable view */
.qr-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 4px 0 12px; }
.qr-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.qr-chips .rp-chip { height: 30px; padding: 0 12px; }
.qr-chips .rp-chip:hover { border-color: var(--brand-navy); color: var(--heading); text-decoration: none; }
.qr-sort { margin-inline-start: auto; }
.qr-view .xseg__tab.is-on { background: var(--brand-navy); color: #fff; }
.qr-num { border: 0; background: var(--tint-blue); color: var(--heading); font: inherit; font-weight: 900; min-width: 34px; height: 30px; border-radius: 9px; cursor: pointer; }
.qr-num:hover, .qr-num:focus-visible { background: var(--brand-blue); color: #fff; }
table.qr-t td { vertical-align: middle; }
.qr-t td.nm b { display: block; }
.qr-ref { display: block; font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.qr-bar-h { min-width: 260px; }
.qr-bar-h small { display: block; font-size: .64rem; font-weight: 600; opacity: .85; }
.qr-obs { display: block; padding: 3px 0; }
.qr-ob { display: flex; height: 18px; border-radius: 5px; overflow: hidden; gap: 1px; background: var(--surface); }
.qr-ob i { display: grid; place-items: center; min-width: 0; font-style: normal; font-size: .64rem; font-weight: 800; color: var(--gray-700); background: var(--gray-200); cursor: default; }
.qr-ob i.k { background: var(--mark-correct); color: var(--mark-correct-text); }
.qr-ob i.t { background: var(--mark-trap); color: var(--mark-trap-text); }
.qr-ob i.bl { background: repeating-linear-gradient(45deg, var(--surface) 0 3px, var(--gray-200) 3px 6px); }
.qr-ob.is-all { height: 6px; margin-top: 3px; opacity: .8; }
.qr-disc { font-weight: 800; font-variant-numeric: tabular-nums; }
.qr-disc.is-bad { color: var(--red); }
.qr-disc.is-warn { color: var(--warning-text); }
.qr-flags .rp-badge { margin: 1px 0 1px 3px; }
tr.qr-void td { color: var(--text-muted); opacity: .7; }
.qr-legend i.qr-k { background: var(--mark-correct); color: var(--mark-correct-text); }
.qr-legend i.qr-tr { background: var(--mark-trap); color: var(--mark-trap-text); }
.qr-legend i.qr-bl { background: repeating-linear-gradient(45deg, var(--surface) 0 3px, var(--gray-200) 3px 6px); color: var(--text-muted); }

/* report card subjects table: the overall row closes it, as on the legacy card */
.rp-card-t th small { display: block; font-size: .64rem; font-weight: 600; opacity: .85; }
.rp-card-t tr.rp-total td { background: var(--gray-100); border-top: 2px solid var(--border); font-weight: 800; color: var(--heading); }
/* answer sheet like the OMR form (Card.razor): blocks of ten, four oval bubbles per question */
.om { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.om-s + .om-s { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.om-s h3 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; font-size: .92rem; font-weight: 800; color: var(--heading); }
.om-s h3 small { font-size: .74rem; font-weight: 600; color: var(--text-muted); }
.om-blocks { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.om-b { list-style: none; margin: 0; padding: 4px 8px; border: 1px solid var(--border); border-top: 3px solid var(--brand-blue); border-radius: 10px; background: var(--surface); }
.om-q { display: flex; align-items: center; gap: 6px; padding: 4px 2px; }
.om-q + .om-q { border-top: 1px dashed var(--line-soft); }
.om-q > b { width: 26px; font-size: .8rem; font-weight: 800; color: var(--heading); text-align: center; font-variant-numeric: tabular-nums; }
.om-q.is-w > b { color: var(--red); }
.om-o { display: inline-grid; place-items: center; width: 26px; height: 17px; border: 1.5px solid var(--gray-400); border-radius: 50%; font-style: normal; font-size: .62rem; font-weight: 700; color: var(--gray-500); line-height: 1; }
.om-o.is-me.is-ok { background: var(--green); border-color: var(--green); color: #fff; }
.om-o.is-me.is-bad { background: var(--red); border-color: var(--red); color: #fff; }
.om-o.is-key { border: 2px solid var(--green); color: var(--green-text); font-weight: 800; box-shadow: 0 0 0 2px var(--success-bg); }
.om-q.is-v .om-o { opacity: .35; }
.om-void { text-decoration: line-through; color: var(--text-muted) !important; }
.om-leg { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-bottom: 12px; font-size: .76rem; color: var(--text-muted); }
.om-leg span { display: inline-flex; align-items: center; gap: 6px; }
.om-leg .om-void { font-weight: 800; font-size: .8rem; }
.rp-qgrid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.rp-q { border-radius: 7px; padding: 2px 0; text-align: center; font-size: .72rem; font-weight: 800; line-height: 1.45; border: 1px solid var(--gray-200); background: var(--surface); }
.rp-q small { display: block; font-size: .62rem; font-weight: 700; opacity: .9; }
.rp-q.c { background: var(--perf-4); color: var(--perf-4-text); box-shadow: inset 0 -3px 0 var(--green); }
.rp-q.w { background: var(--perf-1); color: var(--perf-1-text); box-shadow: inset 0 -3px 0 var(--red); }
.rp-q.b { background: var(--gray-100); color: var(--gray-600); box-shadow: inset 0 -3px 0 var(--gray-300); }
.rp-q.v { background: var(--surface); color: var(--gray-300); }
.rp-opts { display: inline-flex; gap: 3px; }
.rp-opts span { border: 1px solid var(--gray-300); border-radius: 6px; padding: 0 6px; font-size: .72rem; min-width: 34px; text-align: center; }
.rp-opts span.k { background: var(--success-bg); border-color: var(--green); color: var(--green-text); font-weight: 800; }
.rp-opts span.x { background: var(--error-bg); border-color: var(--red); color: var(--perf-1-text); font-weight: 800; }

.rp-summary { background: var(--tint-blue); border-radius: var(--r-md); padding: 12px 14px; font-size: .88rem; color: var(--heading); margin-bottom: 12px; line-height: 2; }
.rp-summary b { color: var(--heading); }

.rp-mine { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.rp-mine > div { background: var(--warning-bg); border-radius: var(--r-md); padding: 10px 12px; }
.rp-mine .l { font-size: .74rem; color: var(--warning-text); }
.rp-mine .v { font-size: 1.2rem; font-weight: 900; color: var(--heading); }

.rp-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.rp-hub__exam h2 { font-size: 1rem; margin: 0 0 4px; }
.rp-hub__links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.rp-chart { width: 100%; height: auto; display: block; }

@media (max-width: 1000px) { .rp-cols, .rp-cols3 { grid-template-columns: 1fr; } .rp-qgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }


/* the empty state enlarges its icon; keep the back button's icon at button size */
.empty .btn svg { width: 16px; height: 16px; margin: 0; color: currentColor; }

/* ===== Subject page (Pages/Reports/Subject.razor, design/subject-page-showcase.html B2) ===== */
.sp-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--border); margin-bottom: 14px; }
.sp-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; margin-bottom: -2px; border-bottom: 2px solid transparent; font-weight: 800; font-size: .88rem; color: var(--text-muted); text-decoration: none; }
.sp-tabs a:hover { color: var(--heading); text-decoration: none; }
.sp-tabs a.on { color: var(--heading); border-bottom-color: var(--brand-orange); }
.sp-tabs a small { font-size: .68rem; font-weight: 700; background: var(--gray-100); border-radius: var(--r-pill); padding: 0 7px; color: var(--text-muted); }
.sp-card { padding: 16px 18px; }
.panel .sp-card h4.sp-t, .sp-t { font-size: .95rem; font-weight: 800; color: var(--heading); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 0; padding: 0; }
.sp-t small { font-weight: 600; color: var(--text-muted); font-size: .74rem; }
.sp-t__end { margin-inline-start: auto; }
.sp-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.sp-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sp-pct { font-weight: 800; border-radius: 6px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
tr.is-me td { background: var(--hl) !important; }

.sp-kp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.sp-kp > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; font-size: .76rem; color: var(--text-muted); line-height: 1.5; box-shadow: var(--shadow-1); }
.sp-kp b { display: block; font-size: 1.4rem; font-weight: 900; color: var(--heading); line-height: 1.3; font-variant-numeric: tabular-nums; }
.sp-kp b small { font-size: .78rem; font-weight: 600; color: var(--text-muted); }
.sp-kp em { font-style: normal; font-size: .74rem; }
.sp-kp .is-hero { background: var(--brand-navy); border-color: var(--brand-navy); color: var(--tint-periwinkle); }
.sp-kp .is-hero b { color: #fff; }
.sp-kp .is-hero .up { color: #9FE2B4; font-weight: 800; }
.sp-kp .is-hero .down { color: #FFB4B4; font-weight: 800; }


.sp-hist { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 160px; padding: 18px 0 20px; border-bottom: 1px solid var(--gray-300); }
.sp-hist__col { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.sp-hist__col i { display: block; width: 100%; background: var(--brand-blue); border-radius: 4px 4px 0 0; }
.sp-hist__col b { font-size: .66rem; color: var(--text); margin-bottom: 2px; }
.sp-hist__col span { position: absolute; bottom: -20px; font-size: .66rem; color: var(--text-muted); }
.sp-hist__mark { position: absolute; top: 0; bottom: 20px; width: 2px; pointer-events: none; }
.sp-hist__mark.is-group { background: var(--brand-orange); }
.sp-hist__mark.is-all { background: var(--brand-navy); opacity: .6; }
.sp-hist__mark em { position: absolute; top: -2px; transform: translateX(-50%); font-size: .64rem; font-style: normal; font-weight: 800; white-space: nowrap; background: var(--surface); padding: 0 4px; border-radius: 4px; direction: rtl; }
.sp-hist__mark.is-all em { top: 14px; color: var(--heading); }
.sp-hist__mark.is-group em { color: var(--brand-orange-dark); }

.sp-qs { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 4px; }
.sp-q { border-radius: 8px; padding: 4px 0; text-align: center; font-size: .74rem; font-weight: 800; border: 2px solid transparent; line-height: 1.3; background: var(--gray-100); color: var(--text); text-decoration: none; }
.sp-q:hover { text-decoration: none; border-color: var(--gray-300); }
.sp-q small { display: block; font-weight: 600; font-size: .64rem; opacity: .85; }
.sp-q.on { border-color: var(--brand-navy); }
.sp-q.is-void { opacity: .5; }
.sp-qd { margin-top: 10px; background: var(--gray-100); border-radius: var(--r-md); padding: 12px 14px; font-size: .82rem; display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; line-height: 1.9; }
.sp-opt, .sp-opt-h { display: grid; grid-template-columns: 74px 1fr 48px 48px; gap: 8px; align-items: center; margin: 3px 0; }
.sp-opt-h { font-size: .68rem; color: var(--text-muted); font-weight: 700; margin: 0; }
.sp-opt__tr { height: 10px; background: var(--surface); border-radius: var(--r-pill); overflow: hidden; }
.sp-opt__tr i { display: block; height: 100%; background: var(--gray-300); }
.sp-opt.is-key .sp-opt__tr i { background: var(--green); }
.sp-opt.is-trap .sp-opt__tr i { background: var(--red); }
.sp-opt small { color: var(--text-muted); font-size: .72rem; }


.sp-mx { overflow: auto; max-height: calc(100vh - 220px); border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.sp-mx table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px; }
.sp-mx__nmcol { width: 190px; }
.sp-mx__pccol { width: 58px; }
.sp-mx th, .sp-mx td { padding: 0; }
.sp-mx thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; font-size: .74rem; text-align: center; font-weight: 700; color: var(--text-muted); padding-top: 4px; }
.sp-mx thead th a { display: block; color: inherit; text-decoration: none; padding: 2px 0; }
.sp-mx thead th a b { display: block; font-size: .72rem; color: var(--text); border-radius: 4px; margin-top: 3px; padding: 1px 0; }
.sp-mx .nm { position: sticky; right: 0; background: var(--surface); z-index: 1; font-size: .84rem; padding: 0 8px; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-mx thead .nm, .sp-mx thead .pc { z-index: 3; }
.sp-mx .nm small { color: var(--text-muted); font-size: .64rem; margin-inline-start: 4px; }
.sp-mx .pc { font-size: .78rem; padding: 0 4px; text-align: center; }
.sp-cell { display: block; width: 100%; height: 22px; border-radius: 4px; }
.sp-cell.is-c { background: var(--mark-correct); }
.sp-cell.is-w { background: var(--mark-wrong); }
.sp-cell.is-b { background: var(--gray-200); }
.sp-cell.is-v { background: repeating-linear-gradient(45deg, var(--gray-200) 0 3px, var(--surface) 3px 6px); }
.sp-mx-leg { display: flex; gap: 14px; flex-wrap: wrap; font-size: .74rem; color: var(--text-muted); margin-top: 8px; align-items: center; }
.sp-mx-leg span { display: inline-flex; align-items: center; gap: 5px; }
.sp-mx-leg .sp-cell { width: 16px; height: 14px; }

.sp-st { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.sp-st li { display: flex; align-items: center; gap: 8px; font-size: .8rem; padding: 5px 10px; border-radius: var(--r-sm); background: var(--gray-100); }
.sp-st li a { color: var(--text); }
.sp-st li small { color: var(--text-muted); font-size: .72rem; }
.sp-st li .sp-pct { margin-inline-start: auto; }

@media (max-width: 1199.98px) { .sp-kp { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sp-ins, .sp-g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767.98px) { .sp-g2, .sp-ins, .sp-g3, .sp-qd { grid-template-columns: 1fr; } .sp-kp { grid-template-columns: 1fr 1fr; } }

.sp-ref { display: inline-flex; align-items: center; gap: 6px; color: var(--heading); font-weight: 700; }
.sp-ref svg { width: 15px; height: 15px; color: var(--link); }
.sp-qimg { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 10px; align-items: start; }
.sp-qimg figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 10px; }
.sp-qimg figcaption { font-size: .78rem; font-weight: 800; color: var(--heading); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.sp-qimg img { display: block; max-width: 100%; height: auto; margin-inline: auto; border-radius: 6px; cursor: zoom-in; }
.sp-g2--flat { margin-top: 0; }
.sp-sub-t { font-size: .78rem; font-weight: 800; color: var(--text-muted); margin: 12px 0 6px; }
.sp-sub-t small { font-weight: 600; }
.sp-pg { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.sp-pg li { display: flex; align-items: center; gap: 8px; font-size: .8rem; padding: 6px 10px; border-radius: var(--r-sm); background: var(--gray-100); flex-wrap: wrap; }
.sp-pg li small { margin-inline-start: auto; color: var(--text-muted); font-size: .72rem; }
@media (max-width: 767.98px) { .sp-qimg { grid-template-columns: 1fr; } }

/* calm comparison table (subject page): one thin bar per row, everyone's mean as a tick */
.sp-tbl { width: 100%; border-collapse: collapse; font-size: .84rem; }
.sp-tbl th { font-size: .7rem; font-weight: 700; color: var(--text-muted); text-align: start; padding: 0 8px 6px; white-space: nowrap; }
.sp-tbl td { padding: 6px 8px; border-top: 1px solid var(--line-soft); vertical-align: middle; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-tbl tbody tr:hover td { background: var(--surface-soft); }
.sp-tbl td b { color: var(--heading); font-weight: 800; }
.sp-tbl__name { white-space: normal !important; width: 34%; }
.sp-tbl__n, .sp-tbl__all { color: var(--text-muted); }
.sp-tbl tr.is-l0 .sp-tbl__name { font-weight: 800; color: var(--heading); }
.sp-tbl tr.is-l0 td { border-top-color: var(--border); }
.sp-tbl tr.is-l1 .sp-tbl__name { padding-inline-start: 22px; }
.sp-tbl tr.is-l2 .sp-tbl__name { padding-inline-start: 40px; color: var(--text-muted); font-size: .8rem; }
.sp-tbl tr.is-l1 .sp-tbl__name::before, .sp-tbl tr.is-l2 .sp-tbl__name::before { content: "└ "; color: var(--gray-300); }
.sp-tbl__bar { width: 30%; min-width: 120px; }
.sp-tbl__track { position: relative; display: block; height: 8px; border-radius: var(--r-pill); background: var(--gray-100); }
.sp-tbl__track i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--r-pill); background: var(--brand-orange); opacity: .85; }
.sp-tbl__track u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-inline-start: -1px; border-radius: 2px; background: var(--brand-navy); }
.sp-tbl__key { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.sp-tbl__key i { width: 12px; height: 6px; border-radius: 3px; background: var(--brand-orange); }
.sp-tbl__key u { width: 2px; height: 10px; background: var(--brand-navy); margin-inline-start: 6px; }
/* each card its own bar colour: levels by difficulty, parts blue, textbook orange (default) */
.sp-tbl.is-parts .sp-tbl__track i, .sp-tbl.is-parts .sp-tbl__key i { background: var(--brand-blue); }
.sp-tbl.is-parts .sp-tbl__track u, .sp-tbl.is-parts .sp-tbl__key u { background: var(--brand-orange); }
.sp-tbl tr.is-easy .sp-tbl__track i { background: var(--green); }
.sp-tbl tr.is-medium .sp-tbl__track i { background: var(--brand-amber); }
.sp-tbl tr.is-hard .sp-tbl__track i { background: var(--red); opacity: .75; }
.sp-tbl.is-levels .sp-tbl__key i { background: linear-gradient(to left, var(--green), var(--brand-amber), var(--red)); }

/* findings (subject page): big figure + title + one line, grouped, most serious first */
/* «یافته‌ها» of the student page (Student.razor; design/student-insights-showcase.html D): one row per finding, the
   sentence and beside it its picture (booklet strip, تراز waterfall, before → after line) */
.st-ins { display: grid; gap: 10px; }
.st-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-inline-start: 4px solid var(--brand-blue); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: 14px 18px; }
.st-in.is-bad { border-inline-start-color: var(--red); }
.st-in.is-warn { border-inline-start-color: var(--brand-amber); }
.st-in.is-good { border-inline-start-color: var(--green); }
.st-in:not(:has(.st-in__pic)) { grid-template-columns: 1fr; }
.st-in__txt h5 { margin: 0 0 2px; font-size: .92rem; font-weight: 900; color: var(--heading); }
.st-in__fig { font-weight: 700; color: var(--text-muted); }
.st-in__txt p { margin: 0; font-size: .84rem; line-height: 1.9; color: var(--text-muted); }
.st-in__go { display: inline-block; margin-top: 4px; font-size: .8rem; font-weight: 800; }
.st-in__pic { min-width: 0; }
@media (max-width: 767.98px) { .st-in { grid-template-columns: 1fr; } }
/* booklet strip: one cell per question, right to left like the answer sheet */
.st-strip { display: flex; gap: 1px; margin-bottom: 4px; }
.st-strip span { flex: 1; height: 26px; border-radius: 2px; background: var(--mark-blank); position: relative; }
.st-strip span.c { background: var(--mark-correct); }
.st-strip span.w { background: var(--mark-wrong); }
.st-strip span.v { background: var(--gray-100); }
.st-strip span.is-ring { outline: 2px solid var(--brand-orange); outline-offset: 0; z-index: 1; }
.st-strip span.is-dot::after { content: ""; position: absolute; inset-inline: 0; bottom: -7px; margin: auto; width: 5px; height: 5px; border-radius: 50%; background: var(--heading); }
.st-strip__ax { display: flex; margin-top: 8px; font-size: .64rem; color: var(--text-muted); }
.st-strip__ax span { border-inline-start: 1px solid var(--border); padding-inline-start: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* points on a 0–100 axis: a before → after line, the gap to the class mean */
.st-ax { position: relative; height: 64px; margin: 0 14px; }
.st-ax__line { position: absolute; inset-inline: 0; top: 31px; height: 2px; background: var(--border); }
.st-ax__span { position: absolute; top: 30px; height: 4px; border-radius: 2px; background: var(--brand-blue); }
.st-ax__span.is-up { background: var(--green); }
.st-ax__span.is-down { background: var(--red); }
.st-ax__span.is-gap { background: repeating-linear-gradient(90deg, var(--brand-blue) 0 6px, transparent 6px 10px); }
.st-ax__pt { position: absolute; top: 25px; width: 14px; height: 14px; transform: translateX(50%); border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); background: var(--brand-orange); }
.st-ax__pt.is-prev { background: var(--gray-400); }
.st-ax__pt.is-class { background: var(--brand-blue); }
.st-ax__lb { position: absolute; top: 2px; transform: translateX(50%); font-size: .7rem; font-weight: 800; white-space: nowrap; color: var(--brand-orange); }
.st-ax__lb.is-below { top: 44px; }
.st-ax__lb.is-prev { color: var(--text-muted); }
.st-ax__lb.is-class { color: var(--link); }
/* تراز waterfall, left to right like every time axis */
.st-wf { display: flex; direction: ltr; align-items: stretch; gap: 6px; height: 110px; margin-bottom: 22px; border-bottom: 1px solid var(--border); padding: 0 4px; }
.st-wf > div { flex: 1; position: relative; }
.st-wf u { position: absolute; inset-inline: 0; border-radius: 3px; background: var(--gray-300); }
.st-wf u.is-to { background: var(--brand-navy); }
.st-wf u.is-up { background: var(--green); }
.st-wf u.is-down { background: var(--red); }
.st-wf em { position: absolute; inset-inline: 0; text-align: center; font-style: normal; font-size: .68rem; font-weight: 800; line-height: 1.2; color: var(--heading); }
.st-wf em.is-up { color: var(--green-text); }
.st-wf em.is-down { color: var(--red); }
.st-wf small { position: absolute; bottom: -20px; inset-inline: 0; text-align: center; font-size: .66rem; color: var(--text-muted); white-space: nowrap; }
.sp-ins-h { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 800; color: var(--heading); margin: 6px 0 10px; }
.sp-ins-h small { font-size: .7rem; font-weight: 700; color: var(--text-muted); background: var(--gray-100); border-radius: var(--r-pill); padding: 0 8px; }
.sp-ins { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; margin-bottom: 18px; }
.sp-in1 { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow-1); border-inline-start: 4px solid var(--brand-blue); }
.sp-in1.is-good { border-inline-start-color: var(--green); }
.sp-in1.is-bad { border-inline-start-color: var(--red); }
.sp-in1.is-warn { border-inline-start-color: var(--brand-amber); }
.sp-in1__fig { flex: none; min-width: 92px; text-align: center; padding: 6px 8px; border-radius: var(--r-sm); background: var(--tint-blue); }
.sp-in1__fig b { display: block; font-size: 1.35rem; font-weight: 900; line-height: 1.3; color: var(--link); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-in1__fig small { display: block; font-size: .68rem; color: var(--text-muted); line-height: 1.4; }
.sp-in1.is-bad .sp-in1__fig { background: var(--error-bg); }
.sp-in1.is-bad .sp-in1__fig b { color: var(--red); }
.sp-in1.is-warn .sp-in1__fig { background: var(--warning-bg); }
.sp-in1.is-warn .sp-in1__fig b { color: var(--warning-text); }
.sp-in1.is-good .sp-in1__fig { background: var(--success-bg); }
.sp-in1.is-good .sp-in1__fig b { color: var(--green-text); }
.sp-in1__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sp-in1__body h5 { margin: 0; font-size: .92rem; font-weight: 800; color: var(--heading); }
.sp-in1__body p { margin: 0; font-size: .82rem; line-height: 1.8; color: var(--gray-600); }
.sp-in1__thumb { display: block; margin-top: 4px; }
.sp-in1__thumb img { display: block; width: 100%; height: 72px; object-fit: cover; object-position: right top; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.sp-in1__go { margin-top: auto; padding-top: 2px; font-size: .8rem; font-weight: 700; }
.sp-mx tbody tr:hover .nm { color: var(--heading); font-weight: 700; }
.sp-mx tbody tr:hover .sp-cell { filter: brightness(.95); }

/* subject trend: line charts (the whole group, then small multiples per class on one shared scale) */
.sp-lc { --c-g: var(--brand-orange); --c-s: var(--brand-blue); --c-a: var(--gray-500); margin-bottom: 18px; }
.sp-lc .is-g, .sp-lc__key .is-g { --c: var(--c-g); }
.sp-lc .is-s, .sp-lc__key .is-s { --c: var(--c-s); }
.sp-lc .is-a, .sp-lc__key .is-a { --c: var(--c-a); }
/* the group's best and weakest third (subject trend, client feedback 2026-11-03) */
.sp-lc .is-t, .sp-lc__key .is-t { --c: var(--green-text); }
.sp-lc .is-b, .sp-lc__key .is-b { --c: var(--red); }
.sp-lc__key .is-t i, .sp-lc__key .is-b i { border-top-style: dotted; border-top-width: 3px; }
.sp-lc__plot polyline.is-t, .sp-lc__plot polyline.is-b { stroke-dasharray: 2 3; }
.sp-lc__key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; font-size: .78rem; font-weight: 600; color: var(--text-muted); }
.sp-lc__key span { display: inline-flex; align-items: center; gap: 6px; }
.sp-lc__key i { width: 18px; height: 0; border-top: 2px solid var(--c); }
.sp-lc__key { --c-g: var(--brand-orange); --c-s: var(--brand-blue); --c-a: var(--gray-500); }
.sp-lc__key .is-a i { border-top-style: dashed; }
.sp-lc__plot { position: relative; height: 240px; margin-inline-end: 34px; }
.sp-lc.is-sm .sp-lc__plot { height: 120px; margin-inline-end: 28px; }
.sp-lc__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sp-lc__plot polyline { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sp-lc__plot polyline.is-g { stroke-width: 2.5; }
.sp-lc__plot polyline.is-a { stroke-dasharray: 5 4; }
.sp-lc__grid { position: absolute; inset-inline: 0; height: 0; border-top: 1px solid var(--line-soft); }
.sp-lc__grid.is-zero { border-top-color: var(--gray-300); }
.sp-lc__grid em { position: absolute; inset-inline-end: -34px; top: -.6em; min-width: 30px; font-style: normal; font-size: .68rem; color: var(--text-muted); text-align: start; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-lc.is-sm .sp-lc__grid em { inset-inline-end: -28px; width: 24px; font-size: .62rem; }
.sp-lc__pt.tip[data-tip] { position: absolute; width: 22px; height: 22px; margin: -11px -11px 0 0; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.sp-lc__pt i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface); transition: transform .12s; }
.sp-lc.is-sm .sp-lc__pt i { width: 7px; height: 7px; }
.sp-lc__pt:hover i, .sp-lc__pt:focus-visible i { transform: scale(1.35); }
.sp-lc__pt.tip[data-tip]::after { white-space: pre-line; }
/* first and last points: the tooltip opens inward so it never leaves the card */
.sp-lc__pt.is-l.tip[data-tip]::after { inset: auto auto calc(100% + 8px) 0; transform: translateY(4px); }
.sp-lc__pt.is-r.tip[data-tip]::after { inset: auto 0 calc(100% + 8px) auto; transform: translateY(4px); }
.sp-lc__pt.is-l.tip[data-tip]:hover::after, .sp-lc__pt.is-r.tip[data-tip]:hover::after,
.sp-lc__pt.is-l.tip[data-tip]:focus-visible::after, .sp-lc__pt.is-r.tip[data-tip]:focus-visible::after { transform: none; }
/* the latest value sits above its point (clear of the y axis), on a white chip in the line colour */
.sp-lc__val { position: absolute; transform: translate(50%, calc(-100% - 9px)); padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: inset 0 0 0 1px var(--c); font-size: .76rem; font-weight: 800; line-height: 1.6; color: var(--heading); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; z-index: 1; }
.sp-lc__x { position: relative; height: 22px; margin-inline-end: 34px; margin-top: 8px; }
.sp-lc__x span { position: absolute; transform: translateX(50%); font-size: .74rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.sp-lcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sp-lcs__c { border: 1px solid var(--border); border-radius: var(--r-md, 12px); padding: 12px 14px 4px; background: var(--surface); }
.sp-lcs__c.is-me { border-color: var(--brand-orange); box-shadow: 0 0 0 1px var(--brand-orange) inset; }
.sp-lcs__h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: .86rem; }
.sp-lcs__h a { color: var(--heading); }
.sp-lcs__h > span { display: inline-flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.sp-lcs__h bdi { font-size: .76rem; font-weight: 700; }
.sp-lcs .sp-lc { margin-bottom: 8px; }
/* the trend tab's extra charts (Student.razor): off, the subject charts sit in the grid (.sp-band is transparent). With
   html.st-parts / st-books / st-stages (js/site.js), each subject becomes a band: its chart (pinned) beside one lane per
   kind that is on. The switch runs as a view transition, so the charts move instead of jumping. */
.st-trx { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; margin-inline-start: auto; }
.st-trx .form-check-label { font-size: .78rem; font-weight: 600; color: var(--heading); }
.sp-band { display: contents; }
.sp-band__lanes, .sp-lane { display: none; }
html:is(.st-parts, .st-books, .st-stages) .sp-lcs { display: flex; flex-direction: column; gap: 14px; }
html:is(.st-parts, .st-books, .st-stages) .sp-band { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-lg, 16px); background: var(--surface-sunk); }
html:is(.st-parts, .st-books, .st-stages) .sp-band > .is-main { position: sticky; top: 12px; box-shadow: 0 0 0 2px var(--brand-orange) inset; }
html:is(.st-parts, .st-books, .st-stages) .sp-band__lanes { display: grid; gap: 14px; }
:is(html.st-parts .fx-st-parts, html.st-books .fx-st-books, html.st-stages .fx-st-stages).sp-lane { display: block; }
.sp-lane { padding-inline-start: 12px; border-inline-start: 3px solid var(--border); }
.sp-lane__h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.sp-lane__h b { font-size: .84rem; color: var(--heading); }
.sp-lane__h small { font-size: .72rem; color: var(--text-muted); }
.sp-lane__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.sp-lcs__c.is-x { background: var(--surface); }
.sp-lcs__c.is-x .sp-lcs__h b { font-size: .84rem; }
/* a narrow section (the student's own page has a side column): the subject's chart on top of its lanes */
.sp-lcs { container-type: inline-size; }
@container (max-width: 900px) {
    html:is(.st-parts, .st-books, .st-stages) .sp-band { grid-template-columns: 1fr; padding: 10px; }
    html:is(.st-parts, .st-books, .st-stages) .sp-band > .is-main { position: static; max-width: 420px; }
    .sp-lane__cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
/* the move itself (js/site.js wraps the switch in document.startViewTransition) */
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-new(*):only-child { animation: lc-in .45s cubic-bezier(.2, .7, .2, 1) both; }
::view-transition-old(*):only-child { animation: lc-out .25s ease both; }
@keyframes lc-in { from { opacity: 0; transform: translateX(24px) scale(.96); } }
@keyframes lc-out { to { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-new(*), ::view-transition-old(*) { animation: none !important; } }
/* the trend table's tree (Student.razor): subject › part › book › chapter, folded with js/site.js (data-tt) */
table.st-trt tr.tc-hide { display: none; }
.st-trt__l { display: flex; align-items: center; gap: 4px; }
/* title and tag apart (a letter touching the tag would join it: «حسابان» read «حسابا») */
.st-trt__t { display: inline-flex; align-items: center; gap: 6px; }
.st-trt__d1 { padding-inline-start: 18px; font-weight: 700; }
.st-trt__d2 { padding-inline-start: 36px; font-weight: 600; }
.st-trt__d3 { padding-inline-start: 54px; font-size: .8rem; color: var(--text-muted); }
@media print { table.st-trt tr.tc-hide { display: table-row; } }
/* book and chapter rows of the overview table: lighter than the subject rows */
table.st-subj tr.st-bd td { font-size: .8rem; color: var(--text-muted); }
table.st-subj tr.st-bd td:first-child { color: var(--heading); }

/* student page for staff (Pages/Reports/Student.razor): head, tiles, position among classmates, answer strip, mistakes,
   textbook pages and notes; findings and tabs reuse the subject page's .sp-* pieces */
.st-h1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-h1 .chip { font-size: .72rem; }
.st-exam { width: auto; min-width: 200px; max-width: 280px; }
/* «کل آزمون»: the whole exam as the last row of the subjects table */
.st-subj tfoot td { border-top: 2px solid var(--gray-300); background: var(--surface-soft); font-weight: 800; color: var(--heading); vertical-align: middle; }
.st-subj tfoot .st-cwb { min-width: 110px; margin-top: 4px; }
.st-subj-sec { margin-bottom: 16px; }
.st-subj-sec .table-wrap { box-shadow: var(--shadow-1); }
.st-subj thead th { height: 34px; }
.st-subj th, .st-subj td { padding-inline: 8px; }
.st-subj thead th.st-grp { text-align: center; border-bottom: 1px solid var(--border); }
.st-subj td:first-child { white-space: nowrap; }
.st-tot__note { font-size: .7rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.st-tot__d { display: block; font-style: normal; font-size: .7rem; font-weight: 800; line-height: 1.4; }
.st-tot__d.rp-up { color: var(--green-text); }
.st-tot__d.rp-dn { color: var(--red); }
.st-tot__d.rp-eq { color: var(--text-muted); }
.st-tot-m { display: none; }
@media (max-width: 700px) {
  .st-tot-m { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-soft); border: 1px solid var(--border); font-size: .8rem; color: var(--text-muted); }
  .st-tot-m > b { color: var(--heading); }
  .st-tot-m span b { color: var(--heading); margin-inline-start: 3px; }
  .st-tot-m .st-tot__d { display: inline; margin-inline-start: 4px; }
}
.st-disp { margin: 10px 0 0; font-size: .8rem; color: var(--text-muted); }
.st-disp b { color: var(--heading); margin-inline: 4px; }
.st-cwb { display: flex; gap: 2px; height: 8px; border-radius: var(--r-pill); overflow: hidden; margin-top: 6px; background: var(--gray-100); }
.st-cwb i { display: block; }
.st-cwb .c, .st-leg i.c, .st-as__row i.c { background: var(--mark-correct); }
.st-cwb .w, .st-leg i.w, .st-as__row i.w { background: var(--mark-wrong); }
.st-cwb .b, .st-leg i.b, .st-as__row i.b { background: var(--mark-blank); }
.st-tabs { margin-top: 4px; }
tr.st-part td { font-size: .8rem; color: var(--text-muted); }
tr.st-part td:first-child { padding-inline-start: 24px; }
.st-subj td { vertical-align: middle; }
.st-pos-h { min-width: 220px; }
.st-pos { position: relative; height: 26px; min-width: 200px; }
.st-pos::before { content: ""; position: absolute; inset-inline: 0; top: 13px; border-top: 1px solid var(--border); }
.st-pos i { position: absolute; top: 10px; width: 7px; height: 7px; margin-right: -3.5px; border-radius: 50%; background: var(--gray-400); }
.st-pos u { position: absolute; top: 5px; height: 17px; width: 2px; margin-right: -1px; background: var(--brand-navy); opacity: .55; }
.st-pos b { position: absolute; top: 6px; width: 14px; height: 14px; margin-right: -7px; border-radius: 50%; background: var(--brand-orange); box-shadow: 0 0 0 2px var(--surface); z-index: 2; }
.st-pos b.is-prev { top: 7.5px; width: 11px; height: 11px; margin-right: -5.5px; background: var(--surface); border: 2px solid var(--brand-orange); box-shadow: none; z-index: 1; }
.st-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; font-size: .74rem; color: var(--text-muted); }
.st-leg span { display: inline-flex; align-items: center; gap: 6px; }
.st-leg i { display: inline-block; width: 12px; height: 16px; border-radius: 3px; position: relative; }
.st-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-orange); }
.st-dot.is-prev { width: 10px; height: 10px; background: var(--surface); border: 2px solid var(--brand-orange); }
.st-leg i.st-dot-mate { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-400); }
.st-dot-mean { display: inline-block; width: 2px; height: 12px; background: var(--brand-navy); opacity: .55; }
/* subjects one under another, in booklet order (student page for staff and the student's own page) */
.st-as { display: grid; gap: 14px; }
.st-as__g + .st-as__g { padding-top: 12px; border-top: 1px dashed var(--border); }
.st-as__g h5 { margin: 0 0 4px; font-size: .78rem; font-weight: 800; color: var(--heading); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.st-as__g h5 small { font-size: .7rem; font-weight: 600; color: var(--text-muted); }
.st-as__row { display: flex; flex-wrap: wrap; gap: 2px; max-width: 640px; }
.st-as__row i { position: relative; width: 13px; height: 26px; border-radius: 3px; cursor: default; }
.st-as__row i.v { background: repeating-linear-gradient(45deg, var(--surface) 0 3px, var(--mark-blank) 3px 6px); }
.st-as__row i.is-easy::after, .st-leg i.is-easy::after { content: ""; position: absolute; inset-inline: 3px; bottom: 3px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--heading) 55%, transparent); }
.st-as__row i.is-run, .st-leg i.is-run { outline: 2px solid var(--brand-amber); }
.st-lvl td { font-variant-numeric: tabular-nums; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.st-chips a { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--gray-300); background: var(--surface); font-size: .76rem; font-weight: 700; color: var(--text-muted); text-decoration: none; }
.st-chips a.on { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.st-chips a small { font-weight: 600; opacity: .8; }
.st-ms { display: grid; gap: 8px; }
.st-mr { display: grid; grid-template-columns: 50px minmax(0, 1.3fr) minmax(0, 1fr) 170px; gap: 14px; align-items: center; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-decoration: none; }
.st-mr:hover { border-color: var(--brand-blue-light); background: var(--surface-soft); text-decoration: none; color: var(--text); }
.st-mr.on { border-color: var(--brand-orange); box-shadow: inset 0 0 0 1px var(--brand-orange); }
.st-mr__n { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; align-content: center; font-weight: 900; color: var(--heading); background: var(--tint-blue); line-height: 1.15; }
.st-mr__n small { font-size: .58rem; font-weight: 700; color: var(--text-muted); }
.st-mr__i { font-size: .8rem; line-height: 1.65; }
.st-mr__i b { color: var(--heading); }
.st-mr__i small { color: var(--text-muted); font-size: .74rem; }
.st-mr__r { display: flex; align-items: center; gap: 5px; font-size: .74rem; color: var(--text-muted); }
.st-mr__r svg { width: 13px; height: 13px; flex: none; }
.st-mr__o { font-size: .76rem; text-align: end; }
.st-opt { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 6px; font-weight: 800; font-size: .72rem; background: var(--gray-100); color: var(--text-muted); }
.st-opt.is-me { background: var(--error-bg); color: var(--red); }
.st-opt.is-k { background: var(--success-bg); color: var(--green-text); }
.st-qimg { margin: -2px 0 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-soft); }
.st-qn { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; margin: 2px 0 0 3px; border-radius: 6px; background: var(--gray-100); font-weight: 800; font-size: .72rem; color: var(--heading); }
.st-tr { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.st-rk { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 14px; }
.st-rk li { display: grid; grid-template-columns: 70px 1fr 80px; gap: 10px; align-items: center; font-size: .82rem; }
.st-rk li.is-cur > span:first-child { font-weight: 800; color: var(--heading); }
.st-rk__bar { position: relative; height: 8px; border-radius: var(--r-pill); background: linear-gradient(to left, var(--success-bg), var(--gray-100) 50%, var(--error-bg)); }
.st-rk__bar i { position: absolute; top: -4px; width: 16px; height: 16px; margin-right: -8px; border-radius: 50%; background: var(--brand-orange); box-shadow: 0 0 0 2px var(--surface); }
.st-rk li:not(.is-cur) .st-rk__bar i { background: var(--surface); border: 2px solid var(--brand-orange); box-shadow: none; }
.st-rk b { color: var(--heading); font-weight: 800; text-align: end; }
.st-rk b small { font-weight: 600; color: var(--text-muted); }
@media (max-width: 991.98px) { .st-tr { grid-template-columns: 1fr; } }
.st-bk__h { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 8px; font-size: .9rem; font-weight: 800; color: var(--heading); }
.st-bk__h:first-of-type { margin-top: 4px; }
.st-bk__h small { font-size: .74rem; font-weight: 600; color: var(--text-muted); }
/* «کتاب درسی» tree (Student.razor): a grade is a heading with an accent bar, a book a card, the book's contents rows inside
   it indented by level, «فصل ۳» / «درس ۲» as tags. A fold's heading shows the questions inside while it is closed. */
.st-tree { display: grid; gap: 18px; }
.st-tn__in { display: grid; }
.st-tn__h { display: grid; grid-template-columns: minmax(0, 1fr) 104px; column-gap: 12px; align-items: center; }
summary.st-tn__h { grid-template-columns: 8px minmax(0, 1fr) 104px; cursor: pointer; list-style: none; }
summary.st-tn__h::-webkit-details-marker { display: none; }
summary.st-tn__h::before { content: ""; grid-column: 1; grid-row: 1; align-self: center; width: 7px; height: 7px; border: solid var(--text-muted); border-width: 0 2px 2px 0; transform: rotate(135deg); transition: transform .2s; }
details[open] > summary.st-tn__h::before { transform: rotate(45deg); }
summary.st-tn__h > .st-tn__l { grid-column: 2; grid-row: 1; }
summary.st-tn__h > .st-tn__m { grid-column: 3; grid-row: 1 / span 2; }
summary.st-tn__h > .st-qs { grid-column: 2; grid-row: 2; margin-top: 8px; }
details[open] > summary.st-tn__h > .st-qs { display: none; }
.st-tn__l { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; color: var(--heading); font-size: .84rem; line-height: 1.6; }
.st-tn__t { font-weight: 700; }
.st-tn__l small { font-size: .72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.st-tn__ico { width: 16px; height: 16px; color: var(--link); flex: none; }
.st-tag { flex: none; font-style: normal; font-size: .7rem; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: var(--r-pill); background: var(--gray-100); color: var(--text-muted); }
.st-tn__m { font-size: .74rem; color: var(--text-muted); white-space: nowrap; text-align: end; }
.st-tn__m b { color: var(--heading); }
.st-tn__m.is-ok > span { color: var(--green-text); font-weight: 600; }
.st-tn__m .st-cwb { margin-top: 4px; height: 6px; }
/* grade */
.st-tn--d0 > summary.st-tn__h { padding: 4px 4px 8px; border-bottom: 2px solid var(--line-soft); }
.st-tn--d0 > summary .st-tn__t { font-size: 1rem; font-weight: 800; padding-inline-start: 10px; border-inline-start: 4px solid var(--brand-orange); line-height: 1.2; }
.st-tn--d0 > .st-tn__in { gap: 10px; padding-top: 10px; }
/* book: a card */
.st-tn--d1 { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.st-tn--d1 > summary.st-tn__h { padding: 10px 14px; background: var(--surface-sunk); }
.st-tn--d1 > summary .st-tn__t { font-size: .92rem; font-weight: 800; }
.st-tn--d1[open] > summary.st-tn__h { border-bottom: 1px solid var(--border); }
/* the book's contents: rows with a divider, indented one step per level */
:is(.st-tn--d2, .st-tn--d3, .st-tn--d4) + :is(.st-tn--d2, .st-tn--d3, .st-tn--d4) { border-top: 1px solid var(--line-soft); }
.st-tn--d2 > .st-tn__h, .st-tn--d2.st-tn--leaf { padding: 10px 14px; }
.st-tn--d3 > .st-tn__h, .st-tn--d3.st-tn--leaf { padding: 8px 14px; padding-inline-start: 40px; }
.st-tn--d4 > .st-tn__h, .st-tn--d4.st-tn--leaf { padding: 8px 14px; padding-inline-start: 64px; }
.st-tn--d2 > .st-tn__in { border-top: 1px solid var(--line-soft); }
.st-tn--d2 > summary .st-tag { background: var(--tint-blue); color: var(--link); }
.st-tn--d2 > summary .st-tn__t { font-weight: 800; }
.st-tn--d3 .st-tn__t, .st-tn--d4 .st-tn__t { font-weight: 600; }
summary.st-tn__h:hover { background: var(--surface-sunk); }
.st-tn--d1 > summary.st-tn__h:hover { background: var(--tint-blue); }
/* a leaf: title, then its questions; the figures at the end */
.st-tn--leaf { display: grid; grid-template-columns: minmax(0, 1fr) 104px; column-gap: 12px; align-items: center; }
.st-tn--leaf > .st-tn__h { display: contents; }
.st-tn--leaf > .st-tn__h .st-tn__l { grid-column: 1; grid-row: 1; }
.st-tn--leaf > .st-tn__h .st-tn__m { grid-column: 2; grid-row: 1 / span 2; }
.st-tn--leaf > .st-qs { grid-column: 1; margin-top: 6px; }
.st-tn--all .st-tn__t, .st-tn--loose .st-tn__t { color: var(--text-muted); font-weight: 600; }
.st-tn--loose { border: 1px dashed var(--border); border-radius: var(--r-md); padding: 10px 14px; }
@media (max-width: 575.98px) {
    .st-tn__h, .st-tn--leaf { grid-template-columns: minmax(0, 1fr) 84px; }
    summary.st-tn__h { grid-template-columns: 8px minmax(0, 1fr) 84px; }
    .st-tn--d3 > .st-tn__h, .st-tn--d3.st-tn--leaf { padding-inline-start: 26px; }
    .st-tn--d4 > .st-tn__h, .st-tn--d4.st-tn--leaf { padding-inline-start: 38px; }
}
.st-qs { display: flex; flex-wrap: wrap; gap: 4px; }
.st-qs i { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 7px; font-style: normal; font-size: .76rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-qs i.c { background: var(--success-bg); color: var(--green-text); }
.st-qs i.w { background: var(--error-bg); color: var(--red); }
.st-qs i.b { background: var(--gray-100); color: var(--text-muted); }
.st-qs i:hover { box-shadow: 0 0 0 2px var(--brand-blue-light); }
.st-pg > div { display: grid; grid-template-columns: minmax(0, 1fr) 150px 120px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: .82rem; }
.st-pg > div:first-child { border-top: 0; }
.st-pg b { color: var(--heading); }
.st-pg small { color: var(--text-muted); }
.st-pg .st-cwb { margin-top: 0; }
.st-th-sub { display: block; font-size: .64rem; font-weight: 600; opacity: .85; }
td.is-cur { background: var(--hl) !important; }
.st-notes { max-width: 820px; }
.st-notes textarea { min-height: 130px; }
.st-notes__empty { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--gray-300); border-radius: var(--r-md); font-size: .8rem; color: var(--text-muted); }
.st-notes__list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.st-notes__list li { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-soft); border-inline-start: 3px solid var(--brand-blue); }
.st-notes__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .76rem; color: var(--text-muted); }
.st-notes__meta b { color: var(--heading); }
.st-notes__list p { margin: 4px 0 0; font-size: .86rem; white-space: pre-line; line-height: 1.9; }
.st-notes__list li.is-shared { border-inline-start-color: var(--green); }
.st-notes__meta .chip svg { width: 13px; height: 13px; margin-inline-end: 4px; vertical-align: -2px; }
.st-notes__ed { font-size: .72rem; color: var(--text-muted); font-style: italic; }
.st-notes__acts { display: inline-flex; gap: 4px; margin-inline-start: auto; }
.st-notes__acts form { display: inline; margin: 0; }
.st-notes__acts .btn svg { width: 14px; height: 14px; }
.st-notes__acts .btn.is-danger { color: var(--red); }
.st-notes__share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: .84rem; font-weight: 600; }
.st-notes__share small { flex-basis: 100%; font-weight: 400; font-size: .74rem; color: var(--text-muted); }
.st-notes__edit { margin-top: 8px; }
.st-notes__edit textarea { min-height: 100px; }
@media (max-width: 991.98px) { .st-mr { grid-template-columns: 44px 1fr; } .st-mr__r, .st-mr__o { grid-column: 1 / -1; text-align: start; } .st-pg > div { grid-template-columns: 1fr; } }

/* «لیست دبیر» tabs (Teacher.razor, design/teacher-showcase.html E): action cards, weakest parts, most-missed questions,
   the full table, progress slopes and the class sheet */
.tl-act { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tl-act__c { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-1); border-top: 4px solid var(--brand-blue); }
.tl-act__c.is-bad { border-top-color: var(--red); }
.tl-act__c.is-warn { border-top-color: var(--brand-amber); }
.tl-act__c.is-good { border-top-color: var(--green); }
.tl-act__c.is-wrong { border-top-color: var(--brand-orange); }
.tl-act__c h4 { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: .9rem; font-weight: 800; color: var(--heading); }
.tl-act__c h4 b { margin-inline-start: auto; font-size: 1.5rem; font-weight: 900; }
.tl-act__c > p { margin: 2px 0 8px; font-size: .72rem; color: var(--text-muted); }
.tl-act__c ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.tl-act__c li { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 4px 8px; border-radius: var(--r-sm); background: var(--gray-100); font-size: .78rem; }
.tl-act__c li a { font-weight: 800; color: var(--heading); }
.tl-act__c li small { display: block; font-size: .66rem; color: var(--text-muted); line-height: 1.4; }
.tl-act__c li.is-none { display: block; color: var(--text-muted); }
.tl-more { margin: 6px 0 0; font-size: .72rem; color: var(--text-muted); }
.tl-weak { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.tl-weak > div { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; }
.tl-weak h5 { display: flex; align-items: baseline; margin: 0; font-size: .88rem; font-weight: 800; color: var(--heading); }
.tl-weak h5 b { margin-inline-start: auto; font-size: 1.3rem; }
.tl-weak > div > small { display: block; font-size: .72rem; color: var(--text-muted); margin-bottom: 6px; }
.tl-names { display: flex; flex-wrap: wrap; gap: 4px; }
.tl-names a { font-size: .74rem; padding: 1px 9px; border-radius: var(--r-pill); background: var(--gray-100); color: var(--text); text-decoration: none; }
.tl-names a:hover { background: var(--tint-blue); color: var(--heading); }
.tl-cq { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tl-cq__c { display: grid; gap: 4px; text-align: start; font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); cursor: pointer; box-shadow: var(--shadow-1); }
.tl-cq__c:hover { border-color: var(--brand-blue-light); }
.tl-cq__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tl-cq__h b { color: var(--heading); }
.tl-cq__c img { display: block; width: 100%; height: 58px; object-fit: cover; object-position: right top; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.tl-cq__c small { font-size: .7rem; color: var(--text-muted); line-height: 1.5; }
.tl-full-wrap { max-height: calc(100vh - 230px); overflow: auto; }
.tl-fold { white-space: nowrap; margin-inline-start: 10px; }
table.tl-full th small { display: block; font-size: .62rem; font-weight: 600; opacity: .85; }
table.tl-full td { vertical-align: middle; white-space: nowrap; }
table.tl-full td.nm small { display: block; font-size: .68rem; font-weight: 600; color: var(--text-muted); }
.tl-hc { display: inline-block; min-width: 42px; padding: 1px 5px; border-radius: 6px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tl-rk i { font-style: normal; font-size: .7rem; font-weight: 800; }
.tl-rk i { margin-inline-start: 5px; white-space: nowrap; }
.tl-rk i small { font-size: .64rem; margin-inline-start: 1px; }
/* «نظر مشاور برای دبیر» above the teacher list's tabs (client feedback 2026-11-03) */
.tl-cm { margin-bottom: 14px; border-inline-start: 4px solid var(--brand-orange); }
.tl-cm__list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.tl-cm__list li { background: var(--gray-100); border-radius: var(--r-sm); padding: 8px 12px; font-size: .84rem; }
.tl-cm__list p { margin: 4px 0 0; white-space: pre-line; }
.tl-cm__meta { display: flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--text-muted); }
.tl-cm__meta b { color: var(--heading); }
.tl-cm__acts { margin-inline-start: auto; display: inline-flex; gap: 4px; }
.tl-cm__acts form { display: inline; }
.tl-cm__new summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--link); margin: 4px 0; }
.tl-cm__new .form-actions { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tl-dv { display: inline-flex; align-items: center; gap: 8px; }
.tl-dv i { position: relative; display: block; width: 110px; height: 14px; background: linear-gradient(var(--gray-300), var(--gray-300)) center / 1px 100% no-repeat; }
.tl-dv b { position: absolute; top: 2px; height: 10px; border-radius: 3px; background: var(--gray-400); }
.tl-dv b.is-up2 { background: var(--green); }
.tl-dv b.is-up { background: var(--mark-correct); }
.tl-dv b.is-dn2 { background: var(--red); }
.tl-dv b.is-dn { background: var(--mark-wrong); }
.tl-dv bdi { min-width: 42px; }
.tl-strip { display: inline-flex; gap: 1px; vertical-align: middle; }
.tl-strip i { width: 5px; height: 16px; border-radius: 1px; background: var(--mark-blank); }
.tl-strip i.c { background: var(--mark-correct); }
.tl-strip i.w { background: var(--mark-wrong); }
.tl-strip i.v { background: repeating-linear-gradient(45deg, var(--surface) 0 2px, var(--mark-blank) 2px 4px); }
.tl-strip i.sep { width: 4px; background: transparent; }
.tl-sheet + .tl-sheet { margin-top: 14px; }
.tl-sheet__g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tl-sheet h5 { font-size: .84rem; font-weight: 800; color: var(--heading); margin: 0 0 6px; }
.tl-sheet h5 small { font-weight: 600; color: var(--text-muted); }
.tl-big3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tl-big3 div { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 10px; font-size: .72rem; color: var(--text-muted); }
.tl-big3 b { display: block; font-size: 1.2rem; font-weight: 900; color: var(--heading); }
.tl-pbars { display: grid; gap: 6px; }
.tl-pbars div { display: grid; grid-template-columns: 80px 1fr 52px; gap: 8px; align-items: center; font-size: .76rem; }
.tl-pbars i { position: relative; height: 9px; border-radius: var(--r-pill); background: var(--gray-100); }
.tl-pbars i u { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--r-pill); background: var(--brand-orange); }
.tl-pbars .is-lv i u { background: var(--brand-blue); }
.tl-pbars i s { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-inline-start: -1px; background: var(--brand-navy); text-decoration: none; }
.tl-pbars b { text-align: end; font-variant-numeric: tabular-nums; }
.tl-tb { width: 100%; border-collapse: collapse; font-size: .78rem; }
.tl-tb td { padding: 4px 6px; border-top: 1px solid var(--line-soft); }
.tl-tb td:last-child { text-align: end; font-weight: 800; white-space: nowrap; }
.tl-tb small { color: var(--text-muted); font-size: .68rem; margin-inline-start: 6px; }
.tl-qlink { border: 0; background: var(--tint-blue); color: var(--heading); font: inherit; font-weight: 800; padding: 1px 8px; border-radius: 7px; cursor: pointer; }
@media (max-width: 991.98px) { .tl-sheet__g { grid-template-columns: 1fr; } }

/* The student's own page (/student, design/student-panel-showcase.html B2): the student page plus a side column with a
   countdown to the next exam and the year's exams (Reports/StudentYear.razor). On phones: countdown, page, then the list. */
.st-own { display: grid; grid-template-columns: minmax(0, 1fr) 290px; grid-template-areas: "m c" "m l"; grid-template-rows: auto 1fr; gap: 16px; align-items: start; }
.st-own__m { grid-area: m; min-width: 0; }
.st-own__cd { grid-area: c; }
.st-own__yl { grid-area: l; }
/* next-exam card (design/countdown-showcase.html A): a calm white card, a calendar page and one button */
.st-cd { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.st-cd__top { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.st-cd__cal { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); text-align: center; box-shadow: 0 2px 6px rgb(28 46 99 / .08); }
.st-cd__cal small { display: block; padding: 2px 0; background: var(--brand-orange); color: #fff; font-size: .66rem; font-weight: 800; }
.st-cd__cal b { display: block; color: var(--heading); font-size: 1.6rem; font-weight: 900; line-height: 1.3; }
.st-cd__cal em { display: block; padding-bottom: 3px; color: var(--text-muted); font-size: .62rem; font-style: normal; }
.st-cd h4 { margin: 0; color: var(--heading); font-size: .98rem; font-weight: 900; line-height: 1.5; }
.st-cd p { margin: 0; color: var(--text-muted); font-size: .8rem; }
.st-cd p b { color: var(--brand-orange); font-size: 1rem; }
.st-cd__go { display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: var(--r-sm); background: var(--brand-navy); color: #fff; font-size: .82rem; font-weight: 800; text-decoration: none; }
.st-cd__go:hover { color: #fff; text-decoration: none; filter: brightness(1.12); }
.st-cd__go.is-soft { background: var(--surface); border: 1px solid var(--gray-300); color: var(--heading); }
.st-cd__go.is-soft:hover { color: var(--heading); background: var(--gray-100); filter: none; }
.st-cd__go svg { width: 16px; height: 16px; }
.st-cd .st-cd__ok { display: flex; align-items: center; gap: 6px; color: var(--green-text); font-weight: 700; }
.st-cd__ok svg { width: 16px; height: 16px; flex: none; }
.st-yl .sp-t svg { width: 18px; height: 18px; color: var(--link); flex: none; }
.st-yl__l { list-style: none; padding: 0; margin: 0; }
.st-yl__l li { position: relative; }
.st-yl__l li::before { content: ""; position: absolute; inset-inline-start: 17px; top: 0; bottom: 0; width: 2px; background: var(--gray-200); }
.st-yl__l li:first-child::before { top: 50%; }
.st-yl__l li:last-child::before { bottom: 50%; }
.st-yl__a { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 4px; border-radius: var(--r-sm); color: var(--text); font-size: .8rem; text-decoration: none; }
a.st-yl__a[href]:hover { background: var(--gray-100); text-decoration: none; }
.st-yl__n { position: relative; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--gray-300); background: var(--surface); color: var(--text-muted); font-size: .7rem; font-weight: 900; }
.st-yl__t b { display: block; color: var(--heading); font-weight: 800; line-height: 1.5; }
.st-yl__t small { display: block; color: var(--text-muted); font-size: .7rem; line-height: 1.4; }
.st-yl__v { text-align: end; line-height: 1.35; }
.st-yl__v b { display: block; color: var(--heading); font-weight: 900; font-variant-numeric: tabular-nums; }
.st-yl__v small { color: var(--text-muted); font-size: .68rem; }
.st-yl__l .is-done .st-yl__n { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.st-yl__l .is-wait .st-yl__n { background: var(--warning-bg); border-color: var(--brand-amber); color: var(--warning-text); }
.st-yl__l .is-next .st-yl__n { border-color: var(--brand-orange); color: var(--brand-orange); }
.st-yl__l .is-abs .st-yl__n { border-style: dashed; }
/* not held yet: switched off (the next one keeps its «… روز دیگر» chip in colour) */
.st-yl__l .is-up .st-yl__n, .st-yl__l .is-up .st-yl__t { opacity: .4; }
.st-yl__l .is-up .st-yl__t b { font-weight: 600; }
.st-yl__l .is-sel .st-yl__a { background: var(--tint-blue); box-shadow: inset -3px 0 0 var(--brand-orange); }
.st-yl__l .is-sel .st-yl__n { background: var(--brand-orange); border-color: var(--brand-orange); }
@media (min-width: 992px) { .st-exam--own { display: none; } }
@media (max-width: 991.98px) { .st-own { grid-template-columns: minmax(0, 1fr); grid-template-areas: "c" "m" "l"; grid-template-rows: auto; } }

/* «دفترچهٔ اشتباهات» (/student/notebook, design/mistakes-notebook-showcase.html A): subject, book, pages; a three-state switch
   per question. Green = یاد گرفتم, blue = مرور کردم, grey = مانده. */
.nb-stk { display: flex; gap: 2px; height: 12px; border-radius: var(--r-pill); overflow: hidden; background: var(--gray-200); }
.nb-stk i { display: block; height: 100%; }
.nb-stk .is-got { background: var(--green); }
.nb-stk .is-rev { background: var(--brand-blue); }
.nb-stk .is-new { background: var(--gray-300); }
.nb-sum { display: grid; gap: 6px; }
.nb-leg { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--text-muted); }
.nb-leg b { color: var(--heading); }
.nb-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 4px; vertical-align: -1px; }
.nb-leg i.is-got { background: var(--green); }
.nb-leg i.is-rev { background: var(--brand-blue); }
.nb-leg i.is-new { background: var(--gray-300); }
.nb-bar { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.nb-bar__l { font-size: .74rem; font-weight: 700; color: var(--text-muted); }
.nb-bar .xseg { flex-wrap: wrap; }
.nb-bar .xseg small { font-size: .66rem; opacity: .8; }
.nb-subj + .nb-subj { margin-top: 18px; }
.nb-subj__h > h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font-size: 1.05rem; font-weight: 900; color: var(--heading); }
.nb-subj__h > h2 small { font-size: .76rem; font-weight: 600; color: var(--text-muted); }
.nb-subj__h > h2 .nb-stk { flex: 1; max-width: 260px; height: 8px; align-self: center; }
.nb-book { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; }
.nb-book + .nb-book { margin-top: 10px; }
.nb-book > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-soft); cursor: pointer; list-style: none; }
.nb-book > summary::-webkit-details-marker { display: none; }
.nb-book[open] > summary { border-bottom: 1px solid var(--border); }
.nb-book > summary b { color: var(--heading); font-size: .92rem; }
.nb-book > summary small { color: var(--text-muted); font-size: .74rem; }
.nb-book > summary .nb-stk { width: 120px; height: 7px; margin-inline-start: auto; }
.nb-book__i { width: 18px; height: 18px; color: var(--link); flex: none; }
.nb-pg { display: flex; align-items: center; gap: 6px; margin: 10px 14px 2px; font-size: .74rem; font-weight: 800; color: var(--text-muted); }
.nb-pg::after { content: ""; flex: 1; height: 1px; background: var(--border); }
/* the notebook as a tree that folds: grade › book card › chapter › lesson (Notebook.razor); every heading is a summary with
   a chevron, its count and progress bar; .nb-book keeps its card look */
.nb-gr { margin-top: 14px; }
.nb-gr > summary, .nb-chd > summary, .nb-lsd > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.nb-gr > summary::-webkit-details-marker, .nb-chd > summary::-webkit-details-marker, .nb-lsd > summary::-webkit-details-marker { display: none; }
:is(.nb-gr, .nb-chd, .nb-lsd) > summary::before { content: ""; flex: none; width: 7px; height: 7px; border: solid var(--text-muted); border-width: 0 2px 2px 0; transform: rotate(135deg); transition: transform .2s; }
:is(.nb-gr, .nb-chd, .nb-lsd)[open] > summary::before { transform: rotate(45deg); }
.nb-grade { margin: 0 2px 8px; font-size: .9rem; font-weight: 800; color: var(--heading); }
.nb-grade > span { padding-inline-start: 8px; border-inline-start: 4px solid var(--brand-orange); line-height: 1.2; }
.nb-gr > .nb-book + .nb-book { margin-top: 10px; }
.nb-tally { font-size: .72rem; font-weight: 500; color: var(--text-muted); }
.nb-tally b { color: var(--warning-text); font-weight: 700; }
:is(.nb-grade, .nb-ch, .nb-ls) .nb-stk { width: 90px; height: 6px; margin-inline-start: auto; }
.nb-chd { border-top: 1px solid var(--line-soft); }
.nb-ch { padding: 10px 14px 6px; font-size: .86rem; font-weight: 800; color: var(--heading); }
.nb-ch:hover, .nb-ls:hover { background: var(--surface-sunk); }
.nb-ch .st-tag { background: var(--tint-blue); color: var(--link); }
.nb-ch.is-pg { font-size: .78rem; color: var(--text-muted); }
.nb-ch small:not(.nb-tally), .nb-ls small:not(.nb-tally) { font-size: .72rem; font-weight: 500; color: var(--text-muted); }
.nb-chd[open] > .nb-ch { padding-bottom: 4px; }
.nb-ls { margin: 0; padding: 6px 14px 6px; padding-inline-start: 34px; font-size: .8rem; font-weight: 700; color: var(--heading); }
.nb-ls.is-mut > span { color: var(--text-muted); font-weight: 600; }
.nb-lsd > .nb-q { margin-inline-start: 20px; }
.nb-foldall { display: inline-flex; gap: 4px; margin-inline-start: auto; }
.nb-foldall .btn { font-size: .74rem; }
@media (max-width: 575.98px) { .nb-lsd > .nb-q { margin-inline-start: 0; } .nb-ls { padding-inline-start: 22px; } :is(.nb-grade, .nb-ch, .nb-ls) .nb-stk { display: none; } }
@media print { .nb-foldall { display: none; } }
.nb-q { display: grid; grid-template-columns: auto 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 14px; }
.nb-q + .nb-q { border-top: 1px dashed var(--border); }
.nb-q.is-got .nb-thumb, .nb-q.is-got .nb-mid { opacity: .5; }
.nb-qn { display: grid; justify-items: center; min-width: 46px; padding: 4px 6px; border-radius: var(--r-sm); background: var(--tint-blue); color: var(--heading); font-weight: 900; font-size: 1rem; line-height: 1.2; }
.nb-qn small { font-size: .6rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.nb-thumb { display: block; width: 120px; height: 62px; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.nb-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: right top; display: block; }
.nb-thumb.is-none { display: grid; place-items: center; font-size: .66rem; color: var(--text-muted); cursor: default; }
.nb-mid { display: grid; gap: 4px; min-width: 0; font-size: .78rem; }
.nb-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .74rem; color: var(--text-muted); }
.nb-meta b { color: var(--heading); }
.nb-ans { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; font-size: .72rem; font-weight: 700; color: var(--text-muted); }
.nb-ans .st-opt + span { margin-inline-end: 6px; }
.nb-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nb-st3 { display: inline-flex; border: 1px solid var(--gray-300); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); }
.nb-st3 button { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px; border: 0; background: transparent; font: inherit; font-size: .74rem; font-weight: 800; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.nb-st3 button + button { border-inline-start: 1px solid var(--border); }
.nb-st3 button svg { width: 13px; height: 13px; }
.nb-st3 button:hover { background: var(--gray-100); }
.nb-st3 button.on.is-new { background: var(--gray-100); color: var(--heading); }
.nb-st3 button.on.is-rev { background: var(--brand-blue); color: #fff; }
.nb-st3 button.on.is-got { background: var(--green); color: #fff; }
.st-nb-link { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--tint-blue); font-size: .8rem; color: var(--link); }
.st-nb-link svg { width: 16px; height: 16px; flex: none; }
.st-nb-link a { font-weight: 800; }
@media (max-width: 767.98px) {
    .nb-q { grid-template-columns: auto minmax(0, 1fr); padding-inline: 10px; }
    .nb-q .nb-thumb { display: none; }
    .nb-acts { grid-column: 1 / -1; justify-content: flex-start; }
    .nb-book > summary .nb-stk { display: none; }
}
@media print { .nb-bar, .nb-st3, .nb-acts .btn { display: none; } }

/* Notebook: «مرور …» entry panel (ReviewStart) and a question's note */
.nb-subj__h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.nb-subj__h > h2 { flex: 1; margin: 0; }
.nb-start { position: relative; }
.nb-start > summary { list-style: none; }
.nb-start > summary::-webkit-details-marker { display: none; }
.nb-start > summary svg { width: 15px; height: 15px; }
.nb-start__pop { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; width: 300px; display: grid; gap: 8px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: 0 20px 50px rgb(28 46 99 / .22); }
.nb-start__pop h4 { margin: 0; font-size: .92rem; font-weight: 900; color: var(--heading); }
.nb-start__l { font-size: .72rem; font-weight: 700; color: var(--text-muted); }
.nb-start__opts { display: flex; gap: 6px; flex-wrap: wrap; }
.nb-start__opts label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--gray-300); border-radius: var(--r-pill); font-size: .76rem; font-weight: 700; color: var(--heading); cursor: pointer; }
.nb-start__opts label:has(input:checked) { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.nb-start__opts label:has(input:disabled) { opacity: .45; cursor: default; }
.nb-start__opts input { accent-color: var(--brand-orange); }
.nb-start__opts small { opacity: .8; }
.nb-start__pop .btn { justify-content: center; }
.nb-start__pop .btn svg { width: 16px; height: 16px; }
.nb-note { display: flex; gap: 6px; align-items: flex-start; margin: 0; padding: 4px 8px; border-radius: var(--r-sm); background: var(--note-bg); color: var(--note-text); font-size: .74rem; line-height: 1.7; white-space: pre-line; }
.nb-note svg { width: 13px; height: 13px; flex: none; margin-top: 4px; color: var(--brand-amber); }
.chip.is-bad { background: var(--error-bg); color: var(--red); }

/* Review page (/student/notebook/review, design/notebook-review-showcase.html A), in FocusLayout: no sidebar */
.focus { min-height: 100vh; background: var(--gray-100); position: relative; isolation: isolate; overflow-x: hidden; }
.focus::before { content: ""; position: absolute; z-index: -1; width: 560px; height: 560px; top: -220px; left: 8%; border-radius: 50%; filter: blur(90px); background: var(--bubble-3); pointer-events: none; }
.rv-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.rv-back { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--link); text-decoration: none; }
.rv-back svg { width: 16px; height: 16px; }
.rv-top h1 { margin: 0; font-size: 1.02rem; font-weight: 900; color: var(--heading); }
.rv-top h1 small { font-size: .76rem; font-weight: 600; color: var(--text-muted); }
.rv-cnt { margin-inline-start: auto; font-size: .8rem; font-weight: 700; color: var(--text-muted); }
.rv-dots { display: flex; flex-wrap: wrap; gap: 3px; padding: 10px 20px 0; max-width: 1060px; margin: 0 auto; }
.rv-dots a { width: 16px; height: 9px; border-radius: 3px; background: var(--gray-300); }
.rv-dots a.rev { background: var(--brand-blue); }
.rv-dots a.got { background: var(--green); }
.rv-dots a.nt { box-shadow: inset 0 -3px 0 var(--brand-amber); }
.rv-dots a.on { outline: 2px solid var(--brand-orange); outline-offset: 1px; }
.rv-main { padding: 14px 20px 28px; }
.rv-card { max-width: 1060px; margin: 0 auto; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.rv-card__h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.rv-card__h b { font-size: 1.05rem; color: var(--heading); }
.rv-ref { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; color: var(--text-muted); }
.rv-ref svg { width: 14px; height: 14px; }
.rv-imgs { display: grid; gap: 12px; padding: 14px 16px; }
.rv-imgs:has(.rv-ans[open]) { grid-template-columns: 1.1fr 1fr; align-items: start; }
.rv-imgs figure { margin: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-soft); }
.rv-imgs figcaption { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: .76rem; font-weight: 800; color: var(--heading); }
.rv-imgs img { display: block; max-width: 100%; height: auto; border-radius: 6px; background: var(--surface); }
.rv-ans > summary { list-style: none; width: max-content; margin: 2px auto; }
.rv-ans > summary::-webkit-details-marker { display: none; }
.rv-ans[open] > summary { display: none; }
.rv-ans kbd, .rv-keys kbd { font-family: system-ui, sans-serif; font-size: .66rem; padding: 0 5px; border: 1px solid currentColor; border-bottom-width: 2px; border-radius: 5px; opacity: .8; background: transparent; color: inherit; }
.rv-hint { margin: -4px 16px 10px; text-align: center; font-size: .78rem; color: var(--text-muted); }
.rv-imgs:has(.rv-ans[open]) + .rv-hint { display: none; }
.rv-note { display: grid; gap: 4px; padding: 0 16px 12px; }
.rv-note label { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; color: var(--heading); }
.rv-note label svg { width: 15px; height: 15px; color: var(--brand-amber); }
.rv-note label small { margin-inline-start: auto; font-weight: 600; color: var(--green-text); }
.rv-note textarea { width: 100%; min-height: 70px; padding: 8px 10px; border: 1px solid var(--gray-300); border-radius: var(--r-sm); background: var(--note-field); font: inherit; font-size: .86rem; resize: vertical; }
.rv-note .btn { justify-self: start; }
.rv-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-soft); }
.rv-foot .btn svg { width: 16px; height: 16px; }
.rv-st3 button { height: 36px; padding: 0 13px; font-size: .78rem; }
.rv-next { margin-inline-start: auto; }
.rv-keys { max-width: 1060px; margin: 8px auto 0; text-align: center; font-size: .72rem; color: var(--text-muted); }
.rv-done { max-width: 620px; margin: 30px auto; display: grid; gap: 12px; justify-items: center; padding: 24px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.rv-done__i { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--success-bg); color: var(--green-text); }
.rv-done__i svg { width: 32px; height: 32px; }
.rv-done h2 { margin: 0; font-size: 1.15rem; font-weight: 900; color: var(--heading); }
.rv-done__row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 0; }
.rv-done__row span { padding: 3px 12px; border-radius: var(--r-pill); background: var(--gray-100); font-size: .8rem; }
.rv-done__row b { color: var(--heading); }
@media (max-width: 767.98px) {
    .rv-top { padding: 8px 12px; }
    .rv-cnt { margin-inline-start: 0; width: 100%; }
    .rv-dots, .rv-main { padding-inline: 10px; }
    .rv-imgs:has(.rv-ans[open]) { grid-template-columns: 1fr; }
    .rv-ref { margin-inline-start: 0; }
    .rv-keys { display: none; }
    .rv-st3 { order: -1; width: 100%; justify-content: center; }
    .nb-start__pop { inset-inline-end: auto; inset-inline-start: 0; width: min(300px, calc(100vw - 40px)); }
}

/* reading guide under a chart (client feedback 2026-11-03) */
.sp-lc__guide { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; font-size: .74rem; color: var(--text-muted); line-height: 1.7; }
.sp-lc__guide svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--link); }

/* subject trend: which exams the chart shows, and the thirds switch (client feedback 2026-11-03) */
.sp-tx { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.sp-tx__l { font-size: .76rem; color: var(--text-muted); margin-inline-end: 2px; }
.sp-tx__c { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--gray-300); background: var(--surface); font-size: .76rem; font-weight: 700; color: var(--text-muted); text-decoration: none; }
.sp-tx__c:hover { border-color: var(--brand-orange); text-decoration: none; }
.sp-tx__c.on { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.sp-tx__th { margin-inline-start: 10px; }

/* «اشتباه تکراری در یک مبحث» on the mistakes tab (client feedback 2026-11-03) */
.st-rep { border: 1px solid var(--border); border-inline-start: 4px solid var(--red); border-radius: var(--r-md); background: var(--surface); padding: 10px 14px; margin-bottom: 14px; }
.st-rep h5 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 6px; font-size: .88rem; font-weight: 800; color: var(--heading); }
.st-rep h5 svg { width: 16px; height: 16px; color: var(--red); }
.st-rep h5 small { font-weight: 500; font-size: .74rem; color: var(--text-muted); }
.st-rep ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.st-rep li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: .8rem; padding: 6px 10px; border-radius: var(--r-sm); background: var(--gray-100); }
.st-rep li b { color: var(--heading); }
.st-rep__ex { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-muted); }
.st-rep__ex a { margin-inline-start: 4px; font-weight: 700; }
