/* Arabic with Nana Classroom
   Look: the poster's navy, saffron and cream + the lesson pages' teal and gold. */
:root {
  --navy: #1b2440;
  --navy-2: #26325a;
  --saffron: #e9a23b;
  --saffron-soft: #fbecd2;
  --cream: #f6f1e6;
  --paper: #fffdf8;
  --teal: #0e746d;
  --teal-soft: #d8ece9;
  --gold: #b9781c;
  --rose: #b0435a;
  --rose-soft: #f5dde2;
  --ink: #1b2233;
  --muted: #4c5366;
  --line: #e2dccd;
  --ok: #1f7a3f;
  --ok-soft: #dcefe2;
  --bad: #b23a3a;
  --bad-soft: #f6dcdc;
  --f-ui: "Archivo", "Segoe UI", system-ui, sans-serif;
  --f-ar: "Noto Naskh Arabic", "Geeza Pro", "Arial", serif;
  --f-kufi: "Reem Kufi", "Noto Naskh Arabic", serif;
  --r: 14px;
  /* roles (these change in night mode) */
  --field: #ffffff;           /* inside of boxes you type in */
  --field-ink: #111827;       /* what you type: strong, near-black */
  --field-line: #b9b2a2;      /* box outline */
  --placeholder: #7b8192;
  --primary-bg: var(--navy);  --primary-ink: #ffffff;
  --selected-bg: var(--navy); --selected-ink: #ffffff;
  --strong-line: var(--navy);
  --stage: var(--navy);
  --on-color: #ffffff;        /* text/icons on teal, rose etc. */
  --on-navy: #f6f1e6;         /* text on the navy bars and live screen: same in day and night */
  color-scheme: light;
}

/* ---------- night mode ---------- */
:root[data-theme="dark"] {
  --cream: #10151f;  --paper: #19202e;  --ink: #f2eee6;  --muted: #b8bfcc;  --line: #323c52;
  --saffron-soft: #3a2c14;  --teal: #5cc8bc;  --teal-soft: #143c39;  --gold: #f0bd62;
  --rose: #ee8aa1;  --rose-soft: #47212c;  --ok: #74d394;  --ok-soft: #173823;  --bad: #ff8f8f;  --bad-soft: #4a2020;
  --field: #0b1019;  --field-ink: #ffffff;  --field-line: #4b5672;  --placeholder: #8d95a8;
  --primary-bg: var(--saffron);  --primary-ink: #1b2440;
  --selected-bg: var(--saffron); --selected-ink: #1b2440;
  --strong-line: var(--saffron);
  --stage: #0a0f1c;  --on-color: #0d121c;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #10151f;  --paper: #19202e;  --ink: #f2eee6;  --muted: #b8bfcc;  --line: #323c52;
    --saffron-soft: #3a2c14;  --teal: #5cc8bc;  --teal-soft: #143c39;  --gold: #f0bd62;
    --rose: #ee8aa1;  --rose-soft: #47212c;  --ok: #74d394;  --ok-soft: #173823;  --bad: #ff8f8f;  --bad-soft: #4a2020;
    --field: #0b1019;  --field-ink: #ffffff;  --field-line: #4b5672;  --placeholder: #8d95a8;
    --primary-bg: var(--saffron);  --primary-ink: #1b2440;
    --selected-bg: var(--saffron); --selected-ink: #1b2440;
    --strong-line: var(--saffron);
    --stage: #0a0f1c;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body, body[dir="rtl"] { font-family: var(--f-ar), var(--f-ui); }
:lang(ar), .ar { font-family: var(--f-ar); }
h1, h2, h3 { line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 22px; font-weight: 750; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
a { color: var(--teal); }
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--navy); color: var(--on-navy);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--saffron); color: var(--navy);
  display: grid; place-items: center; font-family: var(--f-kufi); font-weight: 700; font-size: 24px; line-height: 1;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-weight: 800; font-stretch: 85%; letter-spacing: 0.01em; text-transform: uppercase; font-size: 15px; }
.brand-text small { color: var(--saffron); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.topnav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.topnav a, .topnav button {
  color: var(--on-navy); background: transparent; border: 0; text-decoration: none;
  padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.topnav a:hover, .topnav button:hover { background: var(--navy-2); }
.topnav a.on { background: var(--saffron); color: var(--navy); }
.topnav .lang, .topnav .theme { border: 1.5px solid #ffffff40; }
.topnav .theme { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- layout ---------- */
.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  padding-block: 24px calc(64px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 20px;
}
.wrap:focus { outline: none; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack > *, .row > * { min-width: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13.5px; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
.hero-title { display: flex; flex-direction: column; gap: 6px; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
}
.card.navy { background: var(--navy); color: var(--on-navy); border-color: transparent; }
.card.navy .muted { color: #c9cbd6; }
.card.flat { background: transparent; border-style: dashed; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: 12px; padding: 10px 18px; font-weight: 650; cursor: pointer; min-height: 48px; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn:hover { border-color: var(--strong-line); }
.btn.primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.accent { background: var(--saffron); border-color: var(--saffron); color: var(--navy); }
.btn.teal { background: var(--teal); border-color: var(--teal); color: var(--on-color); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 40px; padding: 6px 13px; font-size: 15px; border-radius: 10px; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn.block { width: 100%; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px;
  font-size: 12.5px; font-weight: 700; background: var(--cream); color: var(--muted); white-space: nowrap;
}
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.todo { background: var(--saffron-soft); color: var(--gold); }
.chip.late { background: var(--rose-soft); color: var(--rose); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.teal { background: var(--teal-soft); color: var(--teal); }
.chip.live { background: var(--rose); color: var(--on-color); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.6; } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 700; font-size: 16px; }
.field .hint { font-size: 14.5px; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=datetime-local], input[type=url], select, textarea {
  border: 2px solid var(--field-line); background: var(--field); border-radius: 12px; padding: 12px 14px; min-height: 52px; width: 100%;
  /* what people type: strong and clear on every phone (iOS included) */
  color: var(--field-ink); -webkit-text-fill-color: var(--field-ink); opacity: 1; font-size: 18px; font-weight: 500;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); -webkit-text-fill-color: var(--placeholder); opacity: 1; font-weight: 400; }
input:disabled, textarea:disabled, select:disabled { -webkit-text-fill-color: var(--muted); color: var(--muted); }
textarea { min-height: 120px; resize: vertical; line-height: 1.8; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 4px var(--teal-soft); }
select { cursor: pointer; }
.pin { letter-spacing: 0.4em; font-size: 22px; text-align: center; }
.error { color: var(--bad); font-weight: 700; font-size: 15.5px; }
.error:empty { display: none; }
.checkrow { display: flex; gap: 8px; align-items: center; }
.checkrow input { width: 22px; height: 22px; accent-color: var(--teal); }

/* ---------- auth ---------- */
.auth { max-width: 440px; margin: 20px auto; width: 100%; }
.auth .card { padding: 24px; gap: 16px; }
.auth-hero { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.auth-hero .ar-big { font-family: var(--f-kufi); font-size: 34px; color: var(--gold); }

/* ---------- sessions & activities ---------- */
.session { display: flex; flex-direction: column; gap: 10px; }
.session-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.session.current .session-title::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--saffron); margin-inline-end: 8px; vertical-align: middle; }
.acts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.act {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; align-items: start;
  text-decoration: none; color: inherit; position: relative;
}
.act:hover { border-color: var(--strong-line); }
.act .kind {
  grid-row: span 3; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--on-color);
}
.act .kind svg { width: 22px; height: 22px; }
.kind.quiz { background: var(--teal); } .kind.assignment { background: var(--navy); }
.kind.poll, .kind.wordcloud { background: var(--rose); } .kind.race { background: var(--saffron); color: var(--navy); }
.kind.game { background: var(--gold); }
.act h3 { font-size: 17px; }
.act .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
details.session-fold > summary { cursor: pointer; list-style: none; }
details.session-fold > summary::-webkit-details-marker { display: none; }
details.session-fold > summary .chev { transition: transform .2s; display: inline-block; }
details.session-fold[open] > summary .chev { transform: rotate(90deg); }
details.session-fold > summary .session-head h2 { flex: 1; font-size: 1.15rem; }

/* ---------- quiz ---------- */
.q { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.q .q-num { font-size: 14px; font-weight: 700; color: var(--teal); }
.q .prompt { font-size: 20px; line-height: 1.7; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  border: 2px solid var(--field-line); background: var(--field); color: var(--field-ink); border-radius: 12px; padding: 8px 16px; cursor: pointer; min-height: 52px;
  font-size: 19px; line-height: 1.5; font-family: var(--f-ar), var(--f-ui);
}
.opt:hover { border-color: var(--strong-line); }
.opt[aria-pressed="true"] { border-color: var(--selected-bg); background: var(--selected-bg); color: var(--selected-ink); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 10px; align-items: center; }
.pair .left { font-size: 19px; font-family: var(--f-ar), var(--f-ui); }
.sort-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 6px 0; border-top: 1px dashed var(--line); }
.sort-row:first-child { border-top: 0; }
.sort-row .item { font-size: 21px; font-family: var(--f-ar), var(--f-ui); }
.seg-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg-btns .opt { font-size: 16px; min-height: 40px; padding: 4px 12px; }
.fill input { font-size: 22px; font-family: var(--f-ar), var(--f-ui); }
.result-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 15px; }
.result-line.good { color: var(--ok); } .result-line.badl { color: var(--bad); }
.explain { background: var(--saffron-soft); border-radius: 10px; padding: 8px 12px; font-size: 16px; }

/* ---------- score panel ---------- */
.score-hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.score-ring { width: 110px; height: 110px; }
.compare { display: flex; flex-direction: column; gap: 10px; }
.bar { height: 14px; background: #ffffff1f; border-radius: 999px; overflow: hidden; }
.card:not(.navy) .bar { background: var(--cream); }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--saffron); }
.bar.class > i { background: var(--teal); }
.bar-label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }

/* ---------- badges ---------- */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge { border-radius: var(--r); padding: 12px; text-align: center; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.badge .medal { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--saffron); color: var(--navy); font-family: var(--f-kufi); font-size: 22px; font-weight: 700; }
.badge.locked { opacity: 0.45; filter: grayscale(1); }
.badge b { font-size: 14px; }

/* ---------- assignment tools ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 2px solid var(--field-line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 9px 16px; min-height: 46px; cursor: pointer; font-weight: 650; display: inline-flex; align-items: center; gap: 6px; }
.tab[aria-selected="true"] { background: var(--selected-bg); color: var(--selected-ink); border-color: var(--selected-bg); }
.pad-wrap { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; touch-action: none; }
.pad-wrap canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.pad-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--strong-line); }
.rec { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bad); animation: pulse 1s infinite; }
.filelist { display: flex; flex-direction: column; gap: 8px; }
.fileitem { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--cream); border-radius: 10px; padding: 8px 12px; flex-wrap: wrap; }
.fileitem img { max-height: 120px; border-radius: 8px; }
audio { width: 100%; max-width: 420px; }
.feedback { border-inline-start: 4px solid var(--saffron); background: var(--saffron-soft); border-radius: 0 var(--r) var(--r) 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.text-answer { white-space: pre-wrap; font-size: 19px; line-height: 1.9; font-family: var(--f-ar), var(--f-ui); background: var(--field); color: var(--field-ink); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--cream); }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; }

/* ---------- live ---------- */
.live-stage { background: var(--stage); border: 1px solid var(--line); color: var(--on-navy); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 18px; min-height: 340px; }
.live-stage .question { font-size: clamp(24px, 4vw, 40px); line-height: 1.5; font-family: var(--f-ar), var(--f-ui); font-weight: 700; }
.live-stage .muted { color: #c9cbd6; }
.live-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.live-opt { border: 0; border-radius: 14px; padding: 18px; font-size: 22px; font-weight: 700; cursor: pointer; min-height: 70px; color: var(--navy); font-family: var(--f-ar), var(--f-ui); text-align: start; }
.live-opt:nth-child(4n+1) { background: var(--saffron); } .live-opt:nth-child(4n+2) { background: #7fd1c6; }
.live-opt:nth-child(4n+3) { background: #f2b8c4; } .live-opt:nth-child(4n+4) { background: #f6f1e6; }
.live-opt.chosen { outline: 4px solid #fff; }
.live-opt.correct { box-shadow: 0 0 0 4px var(--ok-soft) inset; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars .bar { height: 30px; background: #ffffff1a; }
.bars .bar > i { display: flex; align-items: center; padding-inline: 10px; color: var(--navy); font-weight: 800; min-width: 2.5em; }
.cloud { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; align-items: center; padding: 10px; }
.cloud span { font-family: var(--f-ar), var(--f-ui); font-weight: 700; line-height: 1.3; }
.bignum { font-size: 52px; font-weight: 800; color: var(--saffron); font-variant-numeric: tabular-nums; line-height: 1; }
.top5 { display: flex; flex-direction: column; gap: 6px; }
.top5 div { display: flex; justify-content: space-between; background: #ffffff14; border-radius: 10px; padding: 8px 12px; font-weight: 700; }

/* ---------- games ---------- */
.mu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mu-col { display: flex; flex-direction: column; gap: 8px; }
.mu { border: 2px solid var(--field-line); background: var(--field); color: var(--field-ink); border-radius: 12px; padding: 10px 14px; cursor: pointer; font-size: 18px; min-height: 52px; font-family: var(--f-ar), var(--f-ui); }
.mu.sel { border-color: var(--teal); background: var(--teal-soft); }
.mu.done { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); cursor: default; }
.mu.no { animation: shake .3s; border-color: var(--bad); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.wheel-box { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.wheel-box canvas { width: min(360px, 90vw); height: auto; }
.wheel-result { font-family: var(--f-kufi); font-size: 48px; color: var(--gold); min-height: 1.4em; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; direction: rtl; }
.tile { width: 56px; height: 56px; border-radius: 12px; border: 2px solid var(--field-line); background: var(--field); color: var(--field-ink); font-size: 30px; font-family: var(--f-ar); cursor: pointer; }
.tile.used { opacity: .3; }
.answer-line { min-height: 64px; display: flex; gap: 6px; justify-content: center; align-items: center; background: var(--cream); border-radius: 12px; padding: 6px; direction: rtl; font-size: 34px; font-family: var(--f-ar); }

/* ---------- editor ---------- */
.qed { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
.qed-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.optrow { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center; }
.optrow input[type=radio] { width: 22px; height: 22px; accent-color: var(--teal); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .two, .pair, .mu-grid, .score-hero { grid-template-columns: 1fr; } .score-ring { margin: 0 auto; } }

/* ---------- marking ---------- */
.mark-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .mark-grid { grid-template-columns: 1fr; } }
.ai-box { border: 2px dashed var(--teal); border-radius: var(--r); padding: 14px; background: var(--teal-soft); display: flex; flex-direction: column; gap: 8px; }
.ai-box li { margin-bottom: 4px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--navy); color: var(--on-navy); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 50;
  box-shadow: 0 8px 30px #0003; max-width: calc(100vw - 32px);
}
.toast.err { background: var(--bad); }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* dialogs opened inside a page (copy, reset, new session) */
.card.dlg { border: 2px solid var(--strong-line); }
/* the drawing pad stays white in night mode so ink colours read the same for teacher and student */
.pad-wrap { background: #fff; }
.btn.big { min-height: 56px; font-size: 18px; padding: 12px 26px; }
.nudge { background: var(--saffron-soft); color: var(--ink); border-radius: 10px; padding: 10px 14px; font-weight: 650; }
.pin[type=text] { letter-spacing: 0.4em; }
@media (max-width: 480px) {
  .topnav a, .topnav button { padding: 7px 10px; font-size: 14.5px; }
}
.kind.assignment { background: var(--navy); }
:root[data-theme="dark"] .kind.assignment { background: #4a5a8f; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kind.assignment { background: #4a5a8f; color: #fff; } }

/* ---------- class materials ---------- */
.mats { display: flex; flex-direction: column; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-inline-start: 5px solid var(--saffron); border-radius: var(--r); padding: 14px 16px; }
.mats-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }
.mat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.mat { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-decoration: none; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 12px; min-height: 60px; }
.mat:hover { border-color: var(--strong-line); }
.mat-ico { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; font-weight: 800; background: var(--saffron-soft); color: var(--gold); }
.mat-ico.pdf { background: var(--rose-soft); color: var(--rose); font-size: 13px; letter-spacing: .04em; }
.mat-ico.video, .mat-ico.audio { background: var(--teal-soft); color: var(--teal); }
.mat-text { display: flex; flex-direction: column; min-width: 0; }
.mat-text b { overflow-wrap: anywhere; }
.mat-open { font-weight: 750; color: var(--teal); white-space: nowrap; }
.session.current .mats { margin-bottom: 4px; }
