/* MIX-ED — KS3 Library (ks3.html, unit.html) */
.c-pink   { --u: var(--accent-pink); }
.c-blue   { --u: var(--accent-blue); }
.c-purple { --u: var(--accent-purple); }
.c-green  { --u: var(--accent-green); }
.c-amber  { --u: var(--accent-amber); }

.ks3-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.ks3-jump a { padding: 6px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.ks3-jump a:hover { border-color: var(--border-strong); }

/* unit tiles */
.ks3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.ks3-tile { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--text);
  box-shadow: var(--shadow); border-top: 6px solid var(--u, var(--accent)); transition: transform .15s, box-shadow .15s; }
.ks3-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ks3-tile-img { position: relative; aspect-ratio: 16 / 7; background: #f6f1e4 center top / cover no-repeat; }   /* the top of the poster: its caption is cropped off */
.ks3-tile-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ks3-tile h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; letter-spacing: .01em; margin: 0; text-transform: uppercase; color: var(--u, var(--text)); }
.ks3-tile p { margin: 0; color: var(--text-dim); font-size: .95rem; line-height: 1.45; }
.ks3-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--u, var(--accent)); color: #fff; font-weight: 700; font-size: .75rem; letter-spacing: .03em; text-transform: uppercase; }
.ks3-tile-img .ks3-tag { position: absolute; left: 10px; bottom: 10px; }
.ks3-meta { margin-top: auto; color: var(--text-muted); font-size: .85rem; font-weight: 600; }

/* cover, warm-ups, tools */
.ks3-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ks3-cover-card, .ks3-warm, .ks3-panel { background: var(--surface-2); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.ks3-cover-card h3, .ks3-warm h3 { margin: 0 0 6px; font-size: 1.05rem; }
.ks3-cover-card p { margin: 0 0 10px; color: var(--text-dim); line-height: 1.45; }
.ks3-warm { padding: 10px 10px 14px; }
.ks3-warm h3 { margin: 10px 4px 4px; }
.ks3-warm .ks3-link { margin-left: 4px; }
.ks3-note { color: var(--text-muted); font-size: .88rem; margin: 10px 0 0; }
.ks3-link { font-weight: 700; color: var(--u, var(--accent-blue)); text-decoration: none; }
.ks3-link:hover { text-decoration: underline; }

/* file buttons */
.ks3-files { display: flex; flex-wrap: wrap; gap: 10px; }
.ks3-file { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 10px; cursor: pointer; text-align: left;
  background: var(--surface-1); border: 1px solid var(--border); color: var(--text); font: inherit; min-width: 180px; }
.ks3-file b { font-size: .95rem; }
.ks3-file small { color: var(--text-muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.ks3-file:hover { border-color: var(--border-strong); }
.ks3-file.is-busy { opacity: .6; cursor: progress; }
.ks3-file.is-soon { cursor: default; opacity: .55; border-style: dashed; }

/* unit page */
.ks3-head { margin: 8px 0 18px; padding: 22px 22px 18px; border-radius: 16px; background: var(--surface-2); box-shadow: var(--shadow); border-left: 8px solid var(--u, var(--accent)); }
.ks3-head .home-h1 { margin: 10px 0 8px; }
.ks3-summary { margin: 0 0 8px; font-size: 1.05rem; line-height: 1.55; color: var(--text-dim); max-width: 60em; }
.ks3-words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ks3-words span { padding: 3px 10px; border-radius: 999px; background: var(--surface-3); font-size: .85rem; font-weight: 600; }
.ks3-words.small span { font-size: .8rem; padding: 2px 8px; }
.ks3-panel { margin: 0 0 16px; }
.ks3-panel h2 { margin: 0 0 10px; font-size: 1.15rem; }
.ks3-teacher { border: 2px dashed var(--border); box-shadow: none; }
.ks3-setclass { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 14px; }
.ks3-setclass label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.ks3-setclass select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text); font: inherit; min-width: 200px; }
.ks3-status { font-size: .9rem; color: var(--text-dim); }
.ks3-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ks3-tool { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--surface-1); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.ks3-tool b { color: var(--u, var(--accent-blue)); }
.ks3-tool small { color: var(--text-muted); }
.ks3-tool:hover { border-color: var(--border-strong); }

.ks3-lessons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }
.ks3-lesson { background: var(--surface-2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 80px; }
.ks3-lesson summary { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.ks3-lesson summary::-webkit-details-marker { display: none; }
.ks3-lesson summary::after { content: "+"; margin-left: auto; font-weight: 700; font-size: 1.3rem; color: var(--text-muted); }
.ks3-lesson[open] summary::after { content: "–"; }
.ks3-n { flex: none; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--u, var(--accent)); min-width: 70px; }
.ks3-lt { font-weight: 700; font-size: 1.08rem; }
.ks3-lbody { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.ks3-lbody h4 { margin: 0 0 6px; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.ks3-lbody ul, .ks3-lbody ol { margin: 0 0 12px; padding-left: 20px; line-height: 1.5; }
.ks3-lcols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ks3-box { background: var(--surface-1); border-radius: 10px; padding: 12px 14px; }
.ks3-box p { margin: 0 0 6px; line-height: 1.5; }
.ks3-refs { margin: 0; color: var(--text-muted); font-size: .9rem; }
.ks3-quizzes { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.ks3-quizzes h4 { width: 100%; }
.ks3-medals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ks3-medals p { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-1); font-size: .92rem; line-height: 1.4; }
.ks3-medals b { display: block; text-transform: uppercase; font-size: .78rem; letter-spacing: .05em; }
.ks3-medals .m-bronze b { color: #a0602a; } .ks3-medals .m-silver b { color: #6f7680; } .ks3-medals .m-gold b { color: #b8860b; }

/* videos */
.ks3-video { max-width: 820px; }
.ks3-video .video-wrap { border-radius: 12px; overflow: hidden; background: #000; }
.ks3-video video, .ks3-warm video { width: 100%; display: block; aspect-ratio: 16 / 9; background: #f6f1e4; }
.ks3-warm .video-wrap { border-radius: 10px; overflow: hidden; }
.ks3-vcap { margin: 6px 2px 0; color: var(--text-muted); font-size: .88rem; font-weight: 600; }
.ks3-playlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ks3-vbtn { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text); font: inherit; cursor: pointer; }
.ks3-vbtn b { font-size: .88rem; } .ks3-vbtn small { color: var(--text-muted); font-size: .75rem; }
.ks3-vbtn.is-on { border-color: var(--u, var(--accent)); box-shadow: inset 0 0 0 1px var(--u, var(--accent)); }

@media (max-width: 720px) {
  .ks3-lcols, .ks3-medals { grid-template-columns: 1fr; }
  .ks3-file { min-width: 0; flex: 1 1 100%; }
  .ks3-head { padding: 16px; }
  .ks3-lesson summary { flex-wrap: wrap; gap: 2px 10px; }
}

/* ---------------- slide player (present.html) ---------------- */
.pr-body { margin: 0; height: 100vh; display: flex; flex-direction: column; background: #111114; color: #f4f4f6; overflow: hidden; }
.pr-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #1c1c24; flex-wrap: wrap; }
.pr-back { color: #f4f4f6; text-decoration: none; font-weight: 700; }
.pr-title { font-size: .95rem; }
.pr-spacer { flex: 1; }
.pr-select { background: #2a2a34; color: #f4f4f6; border: 1px solid #3a3a46; border-radius: 8px; padding: 5px 8px; font: inherit; font-size: .88rem; }
.pr-btn { background: #2a2a34; color: #f4f4f6; border: 1px solid #3a3a46; border-radius: 8px; padding: 5px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.pr-btn:hover { background: #343440; }
.pr-count { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.pr-main { position: relative; flex: 1; width: 100%; max-width: none; margin: 0; padding: 0; box-sizing: border-box; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr auto; min-height: 0; }
.pr-stage { grid-row: 1; display: grid; place-items: center; min-height: 0; cursor: pointer; user-select: none; -webkit-user-select: none; padding: 8px; }
.pr-canvas { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; pointer-events: none; }
.pr-notes { display: none; grid-row: 2; max-height: 26vh; overflow: auto; padding: 10px 16px; background: #1c1c24; border-top: 1px solid #2e2e38; font-size: 1rem; line-height: 1.5; }
.pr-show-notes .pr-notes { display: block; }
.pr-side { display: none; }
.pr-video { background: var(--accent-pink); color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 800; cursor: pointer; }
.pr-msg { position: absolute; inset: 40% 10% auto; text-align: center; font-size: 1.1rem; }
.pr-player[hidden], .pr-video[hidden], .pr-msg[hidden] { display: none; }
.pr-player { position: absolute; inset: 0; background: rgba(0,0,0,.92); display: grid; place-items: center; z-index: 5; }
.pr-player-in { width: min(1100px, 94vw); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pr-player video { width: 100%; max-height: 80vh; background: #000; border-radius: 10px; }
/* presenter window: this slide, the next one, notes and a timer */
.pr-presenter .pr-main { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 34vh; }
.pr-presenter .pr-stage { grid-column: 1; }
.pr-presenter .pr-side { display: flex; flex-direction: column; gap: 14px; grid-column: 2; grid-row: 1; padding: 10px; min-height: 0; }
.pr-presenter .pr-notes { grid-column: 1 / 3; max-height: none; font-size: 1.2rem; }
.pr-next-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pr-next { flex: 1; display: grid; place-items: center; min-height: 0; }
.pr-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #a0a0b0; font-weight: 700; }
.pr-timer { background: none; border: 0; color: #f4f4f6; font: 800 2.4rem/1 var(--font); cursor: pointer; padding: 4px 0; text-align: left; }
@media print { body * { display: none !important; } }
.ks3-file.is-view { text-decoration: none; border-color: var(--u, var(--accent)); }
.ks3-present { align-self: flex-start; }
