/* Pages E: messages, portal, reports, settings, sign-in */
.msgphone { border-radius: 22px; background: var(--soft); padding: 12px; }
.mp-h { display: flex; align-items: center; gap: 10px; padding: 2px 4px 12px; border-bottom: 1px solid var(--line); }
.mp-h b { display: block; font-size: 13px; } .mp-h small { color: var(--mute); font-size: 11.5px; }
.mp-b { padding: 14px 4px 4px; min-height: 120px; }
.bubble2 { background: var(--panel); border-radius: 18px 18px 18px 6px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; box-shadow: 0 1px 2px rgba(22,27,38,.08); white-space: pre-wrap; overflow-wrap: anywhere; }
.fm-f .seg { align-self: flex-start; }
.fd .tgl { margin-left: 0; }
.fd small[style*="normal"] { line-height: 1.35; }
#compose .sel select { max-width: none; width: 100%; }
#compose textarea { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--soft); border: 1px solid transparent; border-radius: 11px; padding: 10px 12px; resize: vertical; }
#compose textarea:focus { outline: none; border-color: var(--org); background: var(--panel); }
.btn-o:disabled { opacity: .5; cursor: default; }

/* reports */
.rcats { display: grid; gap: 14px; align-content: start; }
.rcat h4 { margin: 0 0 6px; font: 600 12px var(--ui); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); display: flex; align-items: center; gap: 8px; }
.rcat h4 svg { width: 15px; height: 15px; color: var(--org-d); }
.rpk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 12px; }
.rpk b { font-weight: 600; font-size: 13.5px; }
.rpk small { grid-column: 1; color: var(--mute); font-size: 12px; }
.rpk svg { grid-row: 1 / 3; grid-column: 2; align-self: center; width: 15px; height: 15px; color: var(--mute); opacity: 0; transition: opacity .2s; }
.rpk:hover { background: var(--soft); }
.rpk:hover svg { opacity: 1; }
.rpk.on { background: var(--dark); color: #fff; }
.rpk.on small { color: rgba(255,255,255,.6); }
.rpk.on svg { opacity: 1; color: var(--org); }
body[data-theme="dark"] .rpk.on { background: var(--org); color: #161b26; }
body[data-theme="dark"] .rpk.on small, body[data-theme="dark"] .rpk.on svg { color: rgba(22,27,38,.7); }
.rhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.rhead h2 { font: 600 22px var(--num); }
.rhead p { color: var(--mute); font-size: 13px; margin-top: 2px; }
.rexp { display: flex; gap: 6px; flex-wrap: wrap; }
.rsum { margin-bottom: 14px; }
.rpt-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.rpt-wrap .rcats { position: sticky; top: 16px; }
@media (max-width: 1100px) { .rpt-wrap { grid-template-columns: minmax(0, 1fr); } .rpt-wrap .rcats { position: static; } }
@media print { .rpt-wrap { display: block; } .rpt-wrap .rcats, .rexp, .rfil { display: none !important; } }

/* settings */
.perm { overflow-x: auto; }
.perm table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.perm th, .perm td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.perm th { color: var(--mute); font-weight: 600; font-size: 12px; }
.perm td:first-child, .perm th:first-child { text-align: left; font-weight: 600; }
.pm { display: inline-grid; place-items: center; min-width: 54px; padding: 3px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 700; }
.pm.full { background: var(--green-s); color: var(--green); }
.pm.view { background: var(--blue-s); color: var(--blue); }
.pm.own { background: var(--org-s); color: var(--org-d); }
.pm.none { color: var(--mute); }
.secret { display: inline-flex; align-items: center; gap: 6px; }
.sform { display: flex; flex-wrap: wrap; gap: 0 14px; }
.sform .fm-f input, .sform .fm-f select, .sform .fm-f textarea { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--soft); border: 1px solid transparent; border-radius: 11px; padding: 10px 12px; }
.sform .fm-f input:focus, .sform .fm-f select:focus, .sform .fm-f textarea:focus { outline: none; border-color: var(--org); background: var(--panel); }
.sform .fm-f input[readonly] { color: var(--ink-2); }
.sactions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.okdot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--green); background: var(--green-s); padding: 5px 10px; border-radius: 999px; }
.okdot i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.okdot.o { color: var(--org-d); background: var(--org-s); } .okdot.o i { background: var(--org); }
.intg-c { display: grid; gap: 4px; }
@media (max-width: 720px) { .intg { grid-template-columns: 44px minmax(0, 1fr); } .intg > :last-child { grid-column: 1 / -1; } .intg .lg { width: 44px; height: 44px; } }

/* portal */
.phone .scr { font-size: 13px; }
.pp-c .row2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pp-c .row2:last-child { border-bottom: 0; }
.pp-c .row2 b { font-weight: 600; display: block; }
.pp-c .row2 small { color: var(--mute); font-size: 11.5px; }
.pp-c .row2 em { font: 600 13px var(--num); font-style: normal; white-space: nowrap; }
.pp-c .ctrl { margin: 0 -4px; }
.pp-c .ctrl .cn { font-size: 21px; }
.chan { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.chan span { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; background: var(--soft); font-size: 12px; font-weight: 600; }
.chan svg { width: 16px; height: 16px; color: var(--org-d); }
.pp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pp-grid > div { background: var(--soft); border-radius: 14px; padding: 10px; }
.pp-grid small { display: block; font-size: 10.5px; color: var(--mute); font-weight: 600; }
.pp-grid b { font: 600 16px var(--num); }
.pp-c .heat i { aspect-ratio: 1.3; }
.pp-hero { margin: 0 12px 12px; border-radius: 22px; padding: 16px; background: linear-gradient(135deg, var(--org), #ffb547); color: #161b26; }
.pp-hero small { font-size: 11.5px; font-weight: 600; opacity: .75; }
.pp-hero b { display: block; font: 600 28px/1.15 var(--num); }
.pp-hero .pp-btn { margin-top: 12px; display: inline-flex; gap: 6px; align-items: center; background: #161b26; color: #fff; border-radius: 12px; padding: 8px 12px; font-weight: 600; font-size: 12.5px; }
.pp-hero .pp-btn svg { width: 15px; height: 15px; color: var(--org); }
.pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pstats > div { padding: 14px; border-radius: 16px; background: var(--soft); }
.pstats small { display: block; color: var(--mute); font-size: 12px; font-weight: 600; }
.pstats b { font: 600 24px var(--num); }
@media (max-width: 860px) { .pstats { grid-template-columns: minmax(0, 1fr); } }

/* sign-in */
.login .lft h1 { font: 600 44px/1.05 var(--num); letter-spacing: -.02em; margin-top: 18px; }
.login .lft h1 span { color: var(--org); }
.login .lft p.lead { color: rgba(255,255,255,.7); font-size: 16px; max-width: 30em; margin-top: 14px; }
.login .lft::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 70px solid rgba(243,146,0,.12); }
.login .feats { display: grid; gap: 14px; margin-top: 34px; position: relative; z-index: 1; }
.login .feats div { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; }
.login .feats span { width: 42px; height: 42px; border-radius: 14px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: var(--org); }
.login .feats b { display: block; font-weight: 600; }
.login .feats small { color: rgba(255,255,255,.6); font-size: 13px; }
.login .lbrand { display: flex; align-items: center; gap: 12px; }
.login .lbrand .crest { width: 48px; height: 48px; border-radius: 16px; background: var(--org); color: #161b26; display: grid; place-items: center; }
.login .lbrand .crest svg { width: 28px; height: 28px; }
.login .lbrand b { font: 700 22px var(--num); }
.login .lbrand b span { color: var(--org); }
.login .lbrand small { display: block; color: rgba(255,255,255,.55); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }
.login .lfoot { color: rgba(255,255,255,.45); font-size: 12px; position: relative; z-index: 1; }
.lcard { width: min(420px, 100%); padding: 32px; }
.lcard h2 { font: 600 26px var(--num); }
.lcard > p { color: var(--mute); margin-top: 4px; }
.lcard form { display: block; margin-top: 18px; }
.lcard .fm-f input { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--soft); border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; }
.lcard .fm-f input:focus { outline: none; border-color: var(--org); background: var(--panel); }
.lcard .lrow { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 18px; font-size: 13px; }
.lcard .lrow a { color: var(--org-d); font-weight: 600; text-decoration: none; }
.lcard .btn-o { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }
.lcard .or { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: 12px; margin: 18px 0; }
.lcard .or::before, .lcard .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lcard .btn-l { width: 100%; justify-content: center; padding: 12px; box-shadow: 0 0 0 1px var(--line); }
.lcard .mb { display: none; align-items: center; gap: 10px; margin-bottom: 22px; }
.lcard .mb .crest { width: 40px; height: 40px; border-radius: 13px; background: var(--dark); color: var(--org); display: grid; place-items: center; }
.lcard .mb b { font: 700 18px var(--num); } .lcard .mb b span { color: var(--org); }
@media (max-width: 900px) { .lcard .mb { display: flex; } .lcard { padding: 24px; } }
.phone .scr { display: flex; flex-direction: column; }
.phone .scr > * { flex: none; }
.phone .scr > .pp-tabs { margin-top: auto; }
@media (max-width: 860px) { .rpk small { display: none; } .rpk { padding: 7px 10px; } .rcats { gap: 8px; } }
a.btn-o, a.btn-l, a.btn-s { text-decoration: none; }
.scale i.pm { font-style: normal; }
.kv dd .icb { width: 28px; height: 28px; vertical-align: middle; margin: -6px 0; }

/* sign-in: one centred card (register style) */
.lone { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg, #eef0f5); }
.lcard1 { width: min(420px, 100%); padding: 36px 36px 28px; border-radius: 26px; }
.lcard1 .lcrest { width: 56px; height: 56px; border-radius: 18px; background: var(--dark); color: var(--org); display: grid; place-items: center; box-shadow: inset 0 -3px 0 var(--org); margin-bottom: 22px; }
.lcard1 .lcrest svg { width: 30px; height: 30px; }
.lcard1 .lnote { text-align: center; color: var(--mute); font-size: 12.5px; margin-top: 20px; }
.lcard1 .fm-f { margin-top: 14px; }
.lcard1 .fm-f label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
@media (max-width: 480px) { .lcard1 { padding: 26px 22px 22px; } }
/* ---------- the Student IS logo ("the reader", 18 Nov): light violet tile, violet child and left page, ink right page ---------- */
.crest.brand, .lcrest.brand { background: #efe7fd !important; box-shadow: none !important; }
.brand-mk .bm-a { fill: #6d28d9; } .brand-mk .bm-c { fill: #1b1530; }
.sbrand .crest.brand svg { width: 26px; height: 26px; }
body[data-theme="dark"] .crest.brand, body[data-theme="dark"] .lcrest.brand { background: #2a2140 !important; }
body[data-theme="dark"] .brand-mk .bm-a { fill: #c4b5fd; } body[data-theme="dark"] .brand-mk .bm-c { fill: #fff; }

/* Settings › Grading scale editor */
.gs-head, .gs-row { display: grid; grid-template-columns: 64px 74px 54px minmax(0, 1fr) 120px 70px 32px; gap: 8px; align-items: center; }
.gs-head { font-size: 12px; font-weight: 600; padding: 0 2px 6px; }
.gs-row { margin-bottom: 8px; }
.gs-row input:not([type=checkbox]) { width: 100%; min-width: 0; }
.gs-row input[name=g] { text-transform: uppercase; font-weight: 700; text-align: center; }
.gs-to { font-size: 13px; white-space: nowrap; }
.gs-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
@media (max-width: 640px) { .gs-head { display: none; } .gs-row { grid-template-columns: 56px 64px 46px minmax(0, 1fr) 32px; } .gs-row .sel, .gs-row .fm-chk { grid-row: 2; } .gs-row .sel { grid-column: 1 / 4; } .gs-row .fm-chk { grid-column: 4 / 6; } }
.gs-list { display: grid; gap: 10px; }
.gs-item { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.gs-it { display: grid; gap: 2px; min-width: 0; }
.gs-it small { font-size: 12px; }
.gs-item .scale span { background: var(--panel); }
.gs-classes { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 760px) { .gs-item { grid-template-columns: minmax(0, 1fr) auto; } .gs-item .scale { grid-column: 1 / -1; grid-row: 2; } }
