/* PDF Assignment Studio. Same look as SAT Math 800 (teal, Lexend); final branding comes in the branding step. */
:root {
  --ink: #1d2730; --muted: #5b6b78; --line: #dbe3e8; --bg: #f4f7f8; --card: #fff;
  --brand: #297b7e; --brand-d: #1f6063; --brand-l: #e6f2f2; --red: #b42318; --amber: #b45309; --green: #2e7d32;
  --r: 14px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  font-family: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: .4rem 0; line-height: 1.5; }
a { color: var(--brand-d); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 99; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); } .hint { color: var(--muted); font-size: .85rem; } .center-text { text-align: center; padding: 40px; }
.err { color: var(--red); min-height: 1em; font-size: .9rem; } .err:empty { min-height: 0; margin: 0; }
.notice { background: var(--brand-l); border-left: 4px solid var(--brand); padding: 8px 12px; border-radius: 8px; }

/* top bar and tabs */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; } .brand small { display: block; color: var(--muted); font-size: .8rem; }
.logo { background: var(--brand); color: #fff; font-weight: 700; font-size: .75rem; border-radius: 8px; padding: 8px 6px; letter-spacing: .04em; }
.who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; } .who .name { color: var(--muted); font-size: .9rem; }
.tabsbar { display: flex; gap: 4px; padding: 8px 16px 0; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabsbar a { padding: 8px 14px; border-radius: 10px 10px 0 0; text-decoration: none; color: var(--muted); white-space: nowrap; }
.tabsbar a[aria-current="page"] { color: var(--brand-d); background: var(--brand-l); font-weight: 600; }

/* layout */
.wrap { max-width: 1040px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; } .end { justify-content: flex-end; margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .span2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .top { flex-wrap: wrap; } }

/* sign-in */
.signin { width: min(420px, 100%); } .signin .back { display: inline-block; padding: 8px 0; min-height: 24px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 10px; padding: 4px; margin: 12px 0; }
.tabs button { border: 0; background: transparent; padding: 9px; border-radius: 8px; font: inherit; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }

/* forms and buttons */
label { display: block; font-weight: 500; font-size: .9rem; margin: 10px 0 4px; }
.inp { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.inp:focus, .btn:focus-visible, .tool:focus-visible, .swatch:focus-visible { outline: 3px solid rgba(41, 123, 126, .35); outline-offset: 1px; }
textarea.inp { resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; } .check small { color: var(--muted); margin-left: 4px; }
/* S7: touch-size targets (iPad and phones): the whole label row is at least 32 px tall and the box itself 20 px */
.check { min-height: 32px; align-items: center; } .check input[type=checkbox], .check input[type=radio] { width: 20px; height: 20px; flex: none; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 12px 0 0; padding: 4px 12px 10px; } legend { font-weight: 500; font-size: .9rem; padding: 0 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; min-height: 40px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand-d); }
.btn.ghost { background: transparent; } .btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: .85rem; } .btn.wide { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .55; cursor: default; }

/* lists and states */
.tablewrap { overflow-x: auto; } table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: left; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); padding: 8px; white-space: nowrap; }
table.list td { border-bottom: 1px solid var(--line); padding: 8px; vertical-align: top; } table.list td > a:not(.btn) { display: inline-block; padding: 4px 0; min-height: 24px; } td.actions { white-space: nowrap; text-align: right; }
.why { display: block; color: var(--red); font-size: .8rem; max-width: 280px; }
.state { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.s-ready, .a-published, .t-approved, .w-returned { background: #e8f5e9; border-color: #b7dfb9; color: var(--green); }
.s-rejected, .t-blocked, .late { background: #fdecea; border-color: #f3c1bc; color: var(--red); }
.s-reserved, .s-deleting, .a-draft, .t-requested, .w-in_progress { background: #fff4e5; border-color: #f5d3a4; color: var(--amber); }
.w-submitted { background: var(--brand-l); border-color: #b9dcdc; color: var(--brand-d); }
.pill { font-size: .8rem; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 3px 10px; }
.classes { display: grid; gap: 4px; } .code { font-size: 1.6rem; font-weight: 700; letter-spacing: .08em; text-align: center; background: var(--brand-l); border-radius: 10px; padding: 12px; }
.meter { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); } .meter div { height: 100%; background: var(--brand); }
.meter.amber div { background: var(--amber); } .meter.red div { background: var(--red); }
.preview { display: grid; justify-items: start; gap: 6px; } .page-canvas { border: 1px solid var(--line); border-radius: 6px; max-width: 100%; height: auto; background: #fff; }
.progress { position: relative; height: 22px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 12px; border: 1px solid var(--line); }
.progress .bar { height: 100%; width: 0; background: var(--brand); transition: width .2s; } .progress .ptext { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; }

/* student work list */
.worklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.worklist li { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.feedback { background: #f6fbf6; border-left: 4px solid var(--green); padding: 8px 12px; border-radius: 8px; white-space: pre-wrap; }
@media (max-width: 560px) { .worklist li { flex-direction: column; align-items: stretch; } }

/* viewer */
.viewer { display: block; }
.vbar { position: sticky; top: 61px; z-index: 15; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.tools { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tool { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .85rem; cursor: pointer; min-height: 36px; }
.tool[aria-pressed="true"] { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); font-weight: 600; }
.colors { display: inline-flex; gap: 4px; margin: 0 4px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.savestate { font-size: .85rem; color: var(--muted); margin-left: auto; } .savestate[data-state="offline"], .savestate[data-state="closed"] { color: var(--amber); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; background: var(--bg); padding: 4px 10px; border-radius: 8px; } .timer.low { color: var(--red); }
.pages { display: grid; justify-content: center; gap: 16px; padding: 16px 12px 80px; }
.page { position: relative; background: #fff; box-shadow: var(--shadow); border-radius: 4px; }
.page canvas { position: absolute; left: 0; top: 0; }
.page canvas.ink { touch-action: none; } .page canvas.ink.locked { cursor: default; } .page canvas.teacher { pointer-events: none; }
.pno { position: absolute; right: 8px; bottom: -22px; font-size: .75rem; color: var(--muted); }

/* modal and toast */
.modal-back { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: var(--r); padding: 20px; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.modal.wide { width: min(640px, 100%); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .2s; z-index: 60; max-width: calc(100vw - 32px); pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media print { .top, .tabsbar, .vbar { display: none; } }
/* S4: marking and printing */
.page canvas.under { pointer-events: none; }
.markpanel { max-width: 1000px; margin: 12px auto 0; } .markpanel .score { width: 90px; } .markpanel textarea { min-height: 56px; }
@media print {
  body { background: #fff; } .noprint, #toast, .staging, #rte-staging-banner { display: none !important; }
  .printable { max-width: none; padding: 0; } .printable .card { border: 0; box-shadow: none; padding: 0; }
  table.list { font-size: 10pt; } table.list td, table.list th { border-bottom: 1px solid #999; }
}
/* S5: questions made from the PDF (teacher) and answered on screen (student) */
.wrap.qwide { max-width: 1400px; }
.qbuild { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .qbuild { grid-template-columns: 1fr; } }
.qpages { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; }
@media (max-width: 980px) { .qpages { position: static; max-height: 70vh; } }
#qpages { display: grid; gap: 14px; justify-items: center; padding-bottom: 24px; }
.qpage { position: relative; background: #fff; box-shadow: var(--shadow); border-radius: 4px; }
.qpage canvas { position: absolute; left: 0; top: 0; }
.qover { position: absolute; inset: 0; cursor: crosshair; touch-action: pan-x pan-y pinch-zoom; }
.qover.finger { touch-action: none; }
.qsel { position: absolute; border: 2px dashed var(--brand); background: rgba(41, 123, 126, .12); pointer-events: none; }
.qbox { position: absolute; border: 2px solid var(--amber); background: rgba(180, 83, 9, .06); border-radius: 3px; text-decoration: none; }
.qbox.q-verified { border-color: var(--green); background: rgba(46, 125, 50, .06); } .qbox.q-rejected { border-color: var(--red); border-style: dotted; }
.qbox span { position: absolute; left: -2px; top: -20px; background: var(--ink); color: #fff; font-size: .72rem; padding: 1px 6px; border-radius: 6px; }
.qlist { display: grid; gap: 12px; align-content: start; } .qanswers, #qs { display: grid; gap: 12px; }
.qcard { display: grid; gap: 8px; scroll-margin-top: 90px; container-type: inline-size; } .qcard h2.qh { font-size: 1.05rem; margin: 0; }
.qlabel { width: 74px; padding: 6px 8px; }
/* the original picture and the text side by side when the card is wide enough, otherwise the picture right above the text */
.qside { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
@container (min-width: 760px) { .qside { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.qimg { margin: 0; } .qimg img { display: block; max-width: 100%; max-height: 480px; width: auto; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.qimg figcaption { font-size: .78rem; margin-top: 4px; }
.qnotes { background: #fff4e5; border-left: 4px solid var(--amber); border-radius: 8px; padding: 8px 12px; font-size: .88rem; }
.qnotes ul { margin: 4px 0 0; padding-left: 18px; }
.qpreview { background: var(--bg); border-radius: 8px; padding: 8px 10px; min-height: 2em; margin-top: 6px; overflow-x: auto; }
.qtext { line-height: 1.6; overflow-x: auto; } .qresp { white-space: pre-wrap; background: var(--bg); padding: 6px 10px; border-radius: 8px; }
.qanswer { border-top: 1px solid var(--line); padding-top: 6px; }
.qchoice { flex-wrap: nowrap; margin: 4px 0; } .qchoice .inp { flex: 1; }
.cl { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-l); color: var(--brand-d); font-weight: 600; font-size: .85rem; flex: none; }
.choice { display: flex; gap: 8px; align-items: center; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-l); } .choice input[type=radio] { width: 20px; height: 20px; flex: none; margin: 0; }
.qwrap { max-width: 860px; } .qmark { margin: 0; color: var(--green); }
.qopts { margin: 4px 0; padding-left: 22px; }
/* S6: answer keys and worked solutions */
.qkey { background: #f8fbfb; } .qsol { background: #f6fbf6; border-radius: 8px; padding: 6px 10px; } .qsol summary { cursor: pointer; font-weight: 500; }
.mlist { margin: 6px 0; padding-left: 18px; font-size: .88rem; } .mlist li { margin: 2px 0; }

/* E: the student dashboard (studio/js/dashview.js) */
.dash .dhead { margin: 8px 0 -4px; font-size: 1.05rem; color: var(--muted); }
.dash-hello h2 { margin-top: 0; } .dash-hello .muted { display: block; margin-top: 4px; font-size: .9rem; }
.dlinks { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.dchip { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; margin-right: 8px; vertical-align: 2px; white-space: nowrap; background: var(--bg); border: 1px solid var(--line); }
.dchip.d-studio { background: #e6f2f2; border-color: #b9dcdc; color: #1f6063; } .dchip.d-lp { background: #eef5e9; border-color: #c9e0bb; color: #2f5f1a; }
.dchip.d-path { background: #eaf1fb; border-color: #c4d6f0; color: #1f4f8f; } .dchip.d-sat { background: #fdf3e6; border-color: #f0d49a; color: #8a4b08; }
.dlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dlist li { display: flex; gap: 12px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.dlist li > div { min-width: 0; flex: 1; } .dlist b { overflow-wrap: anywhere; } .dlist .muted { display: block; font-size: .85rem; margin-top: 2px; overflow-wrap: anywhere; }
.dlist .btn { flex: none; } .dlist .feedback { margin: 6px 0 0; }
.dnext li:first-child { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.dscore { margin-left: 8px; font-weight: 700; color: var(--green); white-space: nowrap; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.dcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dcard h3 { margin: 4px 0 0; font-size: 1.05rem; overflow-wrap: anywhere; } .dcard h3 small { font-weight: 500; color: var(--muted); font-size: .85rem; }
.dcard .btn { align-self: flex-start; margin-top: auto; }
.dbig { margin: 2px 0; font-size: 1.6rem; font-weight: 700; } .dbig small { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); }
.dstats { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 4px 0; font-size: .88rem; } .dstats div { display: contents; } .dstats dt { color: var(--muted); } .dstats dd { margin: 0; font-weight: 600; text-align: right; }
.dsub { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.dbar { height: 8px; background: #eef2f6; border-radius: 6px; overflow: hidden; } .dbar i { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.dach { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dach li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); } .dach li span:not(.dchip) { flex: 1; min-width: 160px; } .dach b { white-space: nowrap; }
.dbadges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.dbadge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: #fdf3e6; border: 1px solid #f0d49a; font-size: .85rem; }
.dbadge i { font-style: normal; font-weight: 700; font-size: .72rem; min-width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 999px; background: #fff; border: 1px solid #f0d49a; padding: 0 4px; }
@media (max-width: 560px) { .dlist li { flex-wrap: wrap; } .dlist .btn { width: 100%; } }
.dcard .dchip { align-self: flex-start; }
.rte-line { margin: 0 0 6px; color: var(--brand-d); font-size: .9rem; letter-spacing: .01em; }

/* Challenge (31 Oct 2026): a live match between two students */
.ch-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ch-card h2 { margin: 0; }
.ch-score { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ch-score .lab, .ch .lab { display: block; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ch-score .big { font-size: 2.6rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.ch-score .wl { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-score .wl b { color: var(--ink); }
.ch-form { display: grid; gap: 6px; max-width: 520px; }
.ch-form label { font-weight: 600; margin-top: 6px; }
.ch-form .btn { justify-self: start; margin-top: 8px; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ch-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ch-list li:last-child { border-bottom: 0; }
.ch-list small { display: block; color: var(--muted); }
.ch-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; }
.ch-vs .side span { display: block; color: var(--muted); font-size: .9rem; }
.ch-vs .side b { font-size: 2.2rem; font-variant-numeric: tabular-nums; }
.ch-vs .side.me b { color: var(--brand); }
.ch-vs .dots { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.ch-vs .dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); }
.ch-vs .dots i.cur { border-color: var(--brand); } .ch-vs .dots i.ok { background: var(--green); border-color: var(--green); } .ch-vs .dots i.no { background: var(--red); border-color: var(--red); }
.ch-q .ch-bar { display: flex; justify-content: space-between; font-weight: 600; color: var(--muted); }
.ch-q .ch-bar .left { color: var(--brand); font-variant-numeric: tabular-nums; font-size: 1.2rem; }
.ch-q .tbar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 8px 0 14px; }
.ch-q .tbar i { display: block; height: 100%; background: var(--brand); transition: width .2s linear; }
.ch-q .qtext { font-size: 1.15rem; margin-bottom: 12px; overflow-x: auto; }
.ch-note { margin-top: 12px; font-weight: 600; }
.ch-ready, .ch-end, .ch-wait { text-align: center; }
.ch-ready .big, .ch-end .big { font-size: 3rem; font-weight: 700; margin: 6px 0; font-variant-numeric: tabular-nums; }
.ch-end.win h2 { color: var(--green); } .ch-end.lose h2 { color: var(--red); }
.ch-end .row, .ch-wait .row { justify-content: center; }
.lrow .ch-link { margin-left: 6px; }
#ch-bar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  width: min(720px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
#ch-bar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.5); }
@media (max-width: 520px) { .ch-vs .side b { font-size: 1.7rem; } .ch-ready .big, .ch-end .big { font-size: 2.3rem; } }

/* ---------- teachers' class dashboard (31 Oct 2026) ---------- */
.wrap.dwide { max-width: 1240px; }
.dtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 12px 0 4px; }
.dtiles.small { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.dtile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; background: #fff; min-width: 0; }
.dtile b { font-size: 1.6rem; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; } .dtile b small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.dtile > span { color: var(--muted); font-size: .85rem; } .dtile > small { color: var(--muted); font-size: .8rem; }
.dtile.good { border-left: 4px solid var(--green); } .dtile.warn { border-left: 4px solid var(--amber); }
.dbar { display: inline-block; vertical-align: middle; width: 70px; height: 7px; background: #e8eef0; border-radius: 99px; overflow: hidden; margin-left: 4px; }
.dtile .dbar { width: 100%; margin: 4px 0 0; } .dbar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.dsplit { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; } @media (max-width: 860px) { .dsplit { grid-template-columns: 1fr; } }
.dgroup { padding: 10px 0; border-top: 1px dashed var(--line); } .dgroup:first-child { border-top: 0; padding-top: 0; }
.dgroup h3 { margin: 0; } .dgroup .hint { margin: 2px 0 8px; }
.dcount { display: inline-block; min-width: 24px; text-align: center; padding: 1px 7px; border-radius: 99px; background: var(--brand-l); color: var(--brand-d); font-size: .8rem; font-weight: 600; }
.dnames { display: flex; flex-wrap: wrap; gap: 6px; }
.dname { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; font: inherit; font-size: .88rem; cursor: pointer; color: var(--ink); min-height: 32px; }
.dname:hover, .dname:focus-visible { border-color: var(--brand); color: var(--brand-d); outline: none; } .dname small { color: var(--muted); }
.good-note { color: var(--green); font-weight: 500; }
.dleaders { margin: 0; padding-left: 20px; display: grid; gap: 6px; } .dleaders .dname { padding: 3px 10px; }
.dtools { gap: 8px; } .dtools .inp { width: 210px; padding: 7px 10px; }
.dseg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.dseg button { border: 0; background: #fff; padding: 7px 11px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--muted); min-height: 34px; }
.dseg button + button { border-left: 1px solid var(--line); } .dseg button[aria-pressed="true"] { background: var(--brand-l); color: var(--brand-d); font-weight: 600; }
.dtable td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.dtable tr.dclick { cursor: pointer; } .dtable tr.dclick:hover td, .dtable tr.dclick:focus-visible td { background: #f7fafa; } .dtable tr.dclick:focus-visible { outline: 3px solid rgba(41, 123, 126, .35); }
.dstudents .dfirst { position: sticky; left: 0; background: #fff; z-index: 1; } .dstudents .dfirst small { display: block; color: var(--muted); font-size: .78rem; }
.dsort { border: 0; background: transparent; font: inherit; color: var(--muted); cursor: pointer; padding: 0; font-weight: 500; }
.dpill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.dpill.s-today { background: #e3f4e5; color: var(--green); } .dpill.s-week { background: var(--brand-l); color: var(--brand-d); }
.dpill.s-inactive { background: #fdf0dc; color: var(--amber); } .dpill.s-never { background: #f1f3f5; color: var(--muted); } .dpill.s-not_joined { background: #fde8e6; color: var(--red); }
.dflag { font-size: .72rem; background: #fdf0dc; color: var(--amber); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.dtopic { margin: 10px 0; } .dtopic h4 { margin: 0 0 6px; font-size: .9rem; } .dtopic h4 small { font-weight: 500; margin-left: 6px; } .dtopic h4 small.ok { color: var(--green); } .dtopic h4 small.no { color: var(--amber); }
.dlessons { display: flex; flex-wrap: wrap; gap: 6px; }
.dl { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 50px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); background: #f6f8f9; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.dl i { font-style: normal; font-size: .7rem; } .dl.done { background: #e3f4e5; border-color: #b9dfbe; color: var(--green); font-weight: 600; } .dl.tried { background: #fdf0dc; border-color: #f2d3a2; color: var(--amber); }
.hint .dl { min-width: 0; display: inline-block; padding: 1px 8px; }
.dchart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 110px; padding: 4px 0 0; }
.dchart span { display: grid; grid-template-rows: 1fr auto; height: 100%; align-items: end; text-align: center; }
.dchart i { display: block; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; } .dchart small { color: var(--muted); font-size: .68rem; }
@media (max-width: 640px) { .dtools { width: 100%; } .dtools .inp { width: 100%; } .dseg { width: 100%; } .dseg button { flex: 1; padding: 7px 4px; } .dtile b { font-size: 1.35rem; } }
@media print { .tabsbar, .top, #dref, #dcsv, .dtools { display: none !important; } .wrap.dwide { max-width: none; } }
/* Setup codes (migration 35, 2 Nov 2026): first password with the teacher's code, the teacher's list and the printable slips */
.ar { display: block; direction: rtl; text-align: right; font-family: "Geeza Pro", "Noto Naskh Arabic", Tahoma, "Segoe UI", sans-serif; font-size: 1.02em; line-height: 1.6; }
.two > span { display: block; }
.newstudent { margin-top: 16px; padding: 12px 14px; border: 1.5px solid var(--green); background: #eef7ee; border-radius: 12px; display: grid; gap: 4px; }
.newstudent .tag { font-size: .78rem; font-weight: 700; letter-spacing: .05em; color: #1f5f22; }
.newstudent .firstbtn { margin-top: 0; border: 1.5px solid #1f5f22; color: #1f5f22; font-weight: 600; min-height: 46px; }
.newstudent .ar { text-align: center; color: #1f5f22; }
.setup .link.back { background: none; border: 0; padding: 8px 0; color: var(--brand-d); font: inherit; cursor: pointer; }
.setup label { display: block; margin-top: 10px; font-weight: 600; }
.setup .inp.code { font-size: 1.6rem; font-weight: 700; letter-spacing: .25em; text-align: center; }
.setup .pwrow { display: flex; gap: 8px; } .setup .pwrow .inp { flex: 1; min-width: 0; }
.setup .err.two:not(:empty) { background: #fdecea; border: 1.5px solid var(--red); border-radius: 10px; padding: 10px 12px; color: #7a1a12; font-size: .95rem; margin-top: 10px; }
.chips { margin: 10px 0; } .chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: .85rem; }
.chip.ok { border-color: var(--green); background: #eef7ee; color: #1f5f22; } .chip.wait { border-color: var(--brand); background: var(--brand-l); color: var(--brand-d); }
.chip.old { border-color: var(--amber); background: #fff6e5; color: #7a3d05; }
table.codes .num, table.codes .codecell { font-variant-numeric: tabular-nums; } table.codes .codecell { letter-spacing: .12em; }
table.codes tr.attn td { background: #fffbef; } table.codes .end-cell { text-align: right; white-space: nowrap; }
.st-ok { color: #1f5f22; } .st-wait { color: var(--brand-d); } .st-old { color: #7a3d05; } .warn { color: #7a3d05; }
.btn.disabled { opacity: .55; pointer-events: none; }
.bigcode { background: var(--brand-l); border-radius: 14px; padding: 16px; display: grid; justify-items: center; gap: 4px; margin: 12px 0; }
.bigcode small { font-weight: 700; letter-spacing: .06em; color: var(--brand-d); } .bigcode > b { font-size: 2.4rem; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.bigcode > span { font-size: .95rem; text-align: center; } .bigcode > span b { font-size: inherit; letter-spacing: normal; }
.slippage { background: #fff; width: 100%; max-width: 794px; margin: 0 auto; padding: 24px; box-shadow: var(--shadow); }
.sliphead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1.5px solid var(--ink); padding-bottom: 6px; margin-bottom: 10px; font-size: .8rem; }
.sliphead b { font-size: 1rem; }
.slipgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slip { border: 1.5px dashed #555; margin: -0.75px; padding: 10px 14px; min-height: 236px; display: grid; align-content: start; gap: 3px; font-size: 12.5px; break-inside: avoid; }
.slip .s1, .slip .s2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.slip .sname { font-size: 20px; } .slip .s1 span { font-size: 11.5px; color: #444; }
.slip .scode { display: flex; justify-content: space-between; align-items: center; border: 1.5px solid var(--ink); border-radius: 8px; padding: 2px 10px; }
.slip .scode span { font-size: 11px; font-weight: 700; } .slip .scode b { font-size: 24px; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.slip p { margin: 0; line-height: 1.35; } .slip .ar { font-size: 13px; line-height: 1.5; } .slip .s4 { font-size: 12px; }
@media print {
  @page { size: A4; margin: 10mm; }
  .slipsview { padding: 0; max-width: none; gap: 0; } .slipsview .top, .slipsview .noprint { display: none !important; }
  .slippage { box-shadow: none; padding: 0; max-width: none; break-after: page; } .slippage:last-child { break-after: auto; }
}
