@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #f5f7f9;
  --card: #ffffff;
  --ink: #17293b;
  --muted: #6a7a8a;
  --line: #e7edf2;
  --teal: #0ea5b0;
  --teal-deep: #0b7f88;
  --cta: #2563eb;        /* biru — tombol utama */
  --cta-ink: #ffffff;
  --cta-hover: #1d4ed8;
  --purple-bg: #efedfd;
  --purple-ink: #6d5ce6;
  --pill-bg: #eef3f6;
  --track: #e6ecf1;
  --code-bg: #14232f;
  --danger: #d64545;
  --ok: #1c9e6b;
  --nav-h: 62px;   /* tinggi header (sticky) */
  --bar-h: 55px;   /* tinggi toolbar reader */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-body { flex: 1 0 auto; }

a { color: var(--teal-deep); text-decoration: none; }
a:hover { color: var(--teal); }

/* judul global — skala mengikuti lebar layar (mode HP proporsional) */
h1 { font-size: clamp(22px, 5.4vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.18; margin: 0; }
h2 { font-size: clamp(17px, 3.6vw, 20px); font-weight: 700; letter-spacing: -.01em; margin: 0; }
h3 { font-size: clamp(14.5px, 3vw, 16px); font-weight: 700; margin: 0; }

.mono, .code, code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: var(--muted); }
.small { font-size: clamp(12px, 2.9vw, 13px); }
.center { text-align: center; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 16px; } .mt3 { margin-top: 24px; } .mt4 { margin-top: 36px; }

.eyebrow {
  font-size: clamp(10.5px, 2.7vw, 12px); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal);
}

/* ---- layout ---- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; background: var(--card); border-bottom: 1px solid var(--line);
  flex-wrap: wrap; gap: 12px;
  position: sticky; top: 0; z-index: 40;
}
.nav-toggle {
  display: none; border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle:hover { background: #eef2f7; }
.nav-logout-form { display: inline-flex; }
.nav-logout { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; font-weight: 600; padding: 0; }
@media (max-width: 720px) { .nav-who { display: none; } }
.brand { display: flex; align-items: center; gap: 11px; letter-spacing: -.01em; color: var(--ink); min-width: 0; }
.brand-txt { display: flex; align-items: baseline; gap: 8px; min-width: 0; max-width: min(62vw, 560px); }
.brand-txt b { font-size: 16px; font-weight: 800; color: var(--ink); flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-sub { font-size: 13.5px; font-weight: 600; color: var(--muted); flex-shrink: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-sub::before { content: "|"; margin-right: 8px; color: #c8d3dd; font-weight: 400; }
@media (max-width: 720px) { .brand-sub { display: none; } }
.site-foot-brand strong { max-width: min(70vw, 520px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand .logo {
  display: inline-flex; width: 32px; height: 32px; border-radius: 9px; background: var(--cta); flex-shrink: 0;
  align-items: center; justify-content: center; color: var(--cta-ink); font-weight: 800; font-size: 13px; letter-spacing: 0;
}
.brand b { color: var(--teal); }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.nav-links .who { color: var(--ink); }

/* Layout fluid: mengisi lebar layar, dengan padding yang menyesuaikan */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: clamp(22px, 6vw, 40px) clamp(14px, 4vw, 56px) clamp(56px, 12vw, 90px); }
.container.narrow { max-width: 480px; }          /* form auth / unggah */
.container.md     { max-width: 760px; }          /* halaman fokus (intro kuis, dsb) */
.container.md9    { max-width: 1180px; }         /* form & halaman baca */
.container.wide   { max-width: 1720px; padding-left: clamp(16px, 4vw, 72px); padding-right: clamp(16px, 4vw, 72px); }  /* halaman data dosen — tampak lebar */

.grid-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px, 360px); gap: clamp(24px, 3vw, 48px); align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---- card ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(15px, 4.5vw, 22px);
}
.card + .card { margin-top: 20px; }
.card-tight { padding: 16px 18px; }

/* ---- buttons ---- */
/* Selektor sengaja hanya .btn (tanpa button.btn/a.btn) supaya varian .btn-cta dkk
   yang datang setelahnya tidak kalah spesifisitas. */
.btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 14px;
  padding: 11px 18px; border-radius: 11px; border: 1.5px solid #dde6ee;
  background: #eef2f7; color: var(--ink); line-height: 1; text-decoration: none;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { background: #e2e9f1; border-color: #cbd7e2; color: var(--ink); }
.btn.btn-cta { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.btn.btn-cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-ink); }
.btn.btn-dark { background: #334155; border-color: #334155; color: #fff; }   /* abu-abu tua */
.btn.btn-dark:hover { background: #1e293b; border-color: #1e293b; color: #fff; }
/* biru muda — aksi sekunder (mis. Preview) */
.btn.btn-soft { background: #e8f0fe; border-color: #c3d8fb; color: #1d4ed8; }
.btn.btn-soft:hover { background: #d8e6fd; border-color: #a9c6f7; color: #1d4ed8; }
/* hijau — aksi lihat hasil / jawaban */
.btn.btn-view { background: #e5f5ee; border-color: #b9e3d0; color: #12805a; }
.btn.btn-view:hover { background: #d5efe2; border-color: #9fd8bf; color: #12805a; }
.btn.btn-danger { color: var(--danger); border-color: #f0d4d4; background: #fdf5f5; }
.btn.btn-danger:hover { background: #fbeaea; border-color: #e6bcbc; color: var(--danger); }
/* kuning — aksi ubah */
.btn.btn-warn { background: #f5b40e; border-color: #f5b40e; color: #3a2c00; }
.btn.btn-warn:hover { background: #e0a300; border-color: #e0a300; color: #3a2c00; }
/* merah pekat — aksi hapus */
.btn.btn-del { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn.btn-del:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- kartu kelas (tiap kelas dibedakan warna aksen) ---- */
.klass-card {
  position: relative; border: 1px solid var(--line); border-left: 5px solid var(--kc, #2563eb);
  border-radius: 12px; padding: 13px 14px; background: linear-gradient(180deg, var(--kc-tint, #eff4ff), #fff 46px);
}
.klass-card .kc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--kc, #2563eb); margin-right: 7px; vertical-align: middle; }
.klass-card--0 { --kc: #2563eb; --kc-tint: #eaf1ff; }
.klass-card--1 { --kc: #0ea5b0; --kc-tint: #e4f6f7; }
.klass-card--2 { --kc: #d97706; --kc-tint: #fdf1e3; }
.klass-card--3 { --kc: #7c3aed; --kc-tint: #f1eafe; }
.klass-card--4 { --kc: #db2777; --kc-tint: #fdeaf3; }
.klass-card--5 { --kc: #16a34a; --kc-tint: #e6f6ec; }
/* aksi di kartu kelas: aksi utama besar (baris 1), ubah/hapus sejajar (baris 2) */
.klass-primary { width: 100%; justify-content: center; margin-top: 13px; padding: 12px 18px; }
.klass-sub { display: flex; gap: 6px; margin-top: 7px; }
.klass-sub > * { flex: 1 1 0; min-width: 0; }
.klass-sub form { display: flex; }
.klass-sub .btn { width: 100%; justify-content: center; }
.klass-sub .klass-note { display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.3; }
.klass-rename-panel { margin-top: 7px; }

/* ---- pills / tags ---- */
.pill {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--pill-bg); padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.pill-xp { color: var(--purple-ink); background: var(--purple-bg); font-weight: 700; }
.pill-ok { color: var(--ok); background: #e7f6ef; }
.pill-bad { color: var(--danger); background: #fbeaea; }

.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 6px;
}
.tag-materi  { color: #5a6b7a; background: #eef3f6; }
.tag-video   { color: #0b7f88; background: #e6f5f4; }
.tag-latihan { color: #3f6bd6; background: #eaf1ff; }
.tag-tugas   { color: #b5701b; background: #fdf1e3; }
.tag-kuis    { color: #6d5ce6; background: #f3edfd; }

/* ---- week accordion ---- */
.weeks { display: flex; flex-direction: column; gap: 10px; }
.week { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.week-head {
  display: flex; align-items: center; gap: 16px; padding: 15px 18px; cursor: pointer;
  width: 100%; background: none; border: 0; font-family: inherit; text-align: left; color: var(--ink);
}
.week-head .wk-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.week-head .wk-title { margin-top: 2px; font-size: 15px; font-weight: 600; }
.week-head .chev { transition: transform .15s ease; flex-shrink: 0; }
.week[open] .week-head .chev, .week.is-open .week-head .chev { transform: rotate(180deg); }
.week-body { border-top: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.week-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-toolbar .spacer { flex: 1; }
[data-toggle].is-active { box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); }

.week-edit-panel {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fbfcfe;
}
.week-edit-panel textarea { min-height: 0; }

.week-lessons { display: flex; flex-direction: column; }
.week-lessons .lesson-row + .lesson-row { border-top: 1px solid var(--line); }

.lesson-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 10px 12px; border-radius: 9px; color: var(--ink); flex-wrap: wrap;
}
.lesson-row .ln-head { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; }
.lesson-row .ln-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-row .lesson-row-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lesson-row:hover { background: #f7fafb; }
.lesson-row .dot { flex-shrink: 0; width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--track); display: inline-flex; align-items: center; justify-content: center; }
.lesson-row .dot.done { background: var(--teal); border-color: var(--teal); color: #fff; }
.lesson-row .ln-title { flex: 1; font-size: 14px; }
.lesson-row.is-current { background: #edfafa; }
.lesson-row.is-current .ln-title { font-weight: 700; color: var(--teal-deep); }

/* ---- progress card ---- */
.big-pct { font-size: clamp(30px, 9vw, 40px); font-weight: 800; color: var(--teal); letter-spacing: -.02em; }
.bar { height: 7px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--teal); }
.stat-line { display: flex; justify-content: space-between; font-size: 13px; }
.stat-line + .stat-line { margin-top: 10px; }

/* ---- leaderboard ---- */
.board-list {
  display: flex; flex-direction: column; gap: 4px;
  /* tinggi pas untuk 10 mahasiswa (3 baris podium 45px + 7 baris 44px + 9 jarak 4px) */
  max-height: 482px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin;
}
.board-list::-webkit-scrollbar { width: 6px; }
.board-list::-webkit-scrollbar-thumb { background: var(--track); border-radius: 3px; }
.board-row {
  display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 10px;
  background: var(--card);
}
.board-row.me { box-shadow: inset 0 0 0 1.5px var(--teal); }

.board-rank { width: 16px; flex-shrink: 0; text-align: center; font-size: 12.5px; font-weight: 800; color: var(--ink); }
/* lencana 3 besar (di samping nama, sebelum poin): emas / perak / perunggu */
.board-badge {
  width: 21px; height: 21px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}
.board-badge--1 { background: linear-gradient(145deg, #f8d976, #d69e2e); }
.board-badge--2 { background: linear-gradient(145deg, #e2e7ec, #97a3af); }
.board-badge--3 { background: linear-gradient(145deg, #e9b68d, #b06a30); }
.board-avatar {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; color: #fff; font-size: 10.5px; box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.board-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.board-name { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-role { font-size: 10px; color: var(--muted); line-height: 1.3; font-family: "JetBrains Mono", ui-monospace, monospace; }
.board-pts { flex-shrink: 0; text-align: right; line-height: 1.2; }
.board-pts strong { display: block; font-size: 12.5px; font-weight: 800; color: var(--teal-deep); }
.board-pts-label { font-size: 8.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* podium 3 besar — aksen warna emas / perak / perunggu */
.board-row--1 { background: linear-gradient(120deg, #fff9e3, #ffe9ac); box-shadow: 0 1px 3px rgba(214,158,46,.18); }
.board-row--2 { background: linear-gradient(120deg, #f8f9fb, #e2e6eb); box-shadow: 0 1px 3px rgba(100,116,139,.14); }
.board-row--3 { background: linear-gradient(120deg, #fff2e6, #ffd4ab); box-shadow: 0 1px 3px rgba(194,101,45,.16); }
.board-row--1 .board-rank { color: #92650b; }
.board-row--2 .board-rank { color: #475569; }
.board-row--3 .board-rank { color: #9a4a1c; }
.board-row--plain { border-bottom: 1px solid var(--line); border-radius: 0; padding: 5px 10px; }
.board-row--plain:last-child { border-bottom: 0; }

/* ---- prose / lesson content ---- */
.prose { font-size: clamp(13.5px, 3.7vw, 15.5px); line-height: 1.72; color: #35485a; }
.prose p, .prose li { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }
.prose p { margin: 0 0 15px; }
.prose ul, .prose ol { margin: 0 0 15px; padding-left: 22px; }
.prose code { background: #eef3f6; color: #0b6570; font-size: .88em; padding: 2px 6px; border-radius: 5px; }
.prose blockquote { margin: 0 0 15px; padding: 8px 16px; border-left: 3px solid var(--line); color: var(--muted); font-style: italic; }
/* bab / sub-bab / poin — hierarki heading materi (skala mengikuti lebar layar) */
.prose h2 {
  font-size: clamp(16.5px, 3.8vw, 20px); font-weight: 800; color: var(--ink); letter-spacing: -.01em;
  margin: clamp(24px, 5vw, 34px) 0 11px; padding-bottom: 7px; border-bottom: 2px solid var(--line); text-align: left;
}
.prose h3 {
  font-size: clamp(14.5px, 3.3vw, 16.5px); font-weight: 700; color: var(--ink);
  margin: clamp(20px, 4vw, 26px) 0 9px; padding-left: 11px; border-left: 3px solid var(--teal); text-align: left;
}
.prose h4 {
  font-size: clamp(12px, 2.9vw, 13.5px); font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--teal-deep); margin: 20px 0 7px; text-align: left;
}
.prose > :first-child { margin-top: 0; }
pre.code {
  background: var(--code-bg); color: #d7e3ea; font-size: 13px; line-height: 1.7;
  padding: 16px 18px; border-radius: 12px; overflow-x: auto; margin: 0 0 15px; white-space: pre;
}
.callout {
  border-left: 3px solid var(--teal); background: #edfafa; padding: 13px 16px;
  border-radius: 0 10px 10px 0; font-size: 14px; color: #2a4c50; margin: 0 0 15px;
}

/* ---- forms ---- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
textarea.code-area { font-family: "JetBrains Mono", monospace; font-size: 13px; min-height: 160px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field-err { display: block; font-size: 12px; font-weight: 600; color: var(--danger); margin-top: 5px; }
.imp-sum { display: flex; flex-wrap: wrap; gap: 8px; }

/* logo/ikon mata kuliah (dibuat acak dari id, tetap sama tiap dibuka) */
.mk-logo {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px; box-shadow: 0 3px 10px rgba(20, 40, 60, .18);
}
@media (max-width: 560px) {
  .mk-logo { width: 38px; height: 38px; border-radius: 11px; font-size: 16px; }
}
@media print {
  .nav, .site-foot, .imp-sum, .btn, .table-wrap { display: none !important; }
  .pw-reveal { border: 1px solid #999; }
}
.field.has-err input { border-color: var(--danger); }

/* ---- table ---- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
table.data th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
table.data tr:hover td { background: #f9fbfc; }

/* ---- quiz ---- */
.quiz-opt {
  display: flex; align-items: center; gap: 13px; padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: 11px; cursor: pointer; background: #fff;
}
.quiz-opt:hover { border-color: #cfdbe2; }
.quiz-opt input { accent-color: var(--teal); width: 18px; height: 18px; }
.quiz-opt.chosen { border-color: var(--teal); background: #edfafa; }
.qnav { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.qnav a { height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; border: 1.5px solid var(--line); color: var(--muted); background: #f1f5f8; }
.qnav a.answered { background: var(--teal); border-color: var(--teal); color: #fff; }
.qnav a.current { background: #fff; border-color: var(--teal); color: var(--teal-deep); }

/* ---- flash (toast melayang, hilang sendiri) ---- */
.flash-wrap {
  position: fixed; top: 74px; right: clamp(12px, 3vw, 28px); z-index: 60;
  display: flex; flex-direction: column; gap: 8px; max-width: min(380px, 90vw);
  pointer-events: none;
}
.flash {
  padding: 12px 16px; border-radius: 11px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(20, 40, 60, .14); border: 1px solid rgba(0,0,0,.04);
  pointer-events: auto; animation: flash-in .22s ease;
}
.flash.is-hiding { animation: flash-out .3s ease forwards; }
@keyframes flash-in { from { opacity: 0; transform: translateX(20px); } }
@keyframes flash-out { to { opacity: 0; transform: translateX(20px); } }
.flash.success { background: #e7f6ef; color: #14603f; }
.flash.error { background: #fbeaea; color: #8f2b2b; }
.flash.info { background: #e8f3f5; color: #1c5a63; }

.divider { height: 1px; background: var(--line); margin: 22px 0; }

/* details / summary */
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
details > summary.btn { display: inline-flex; }

/* zona berbahaya (hapus mata kuliah) */
.danger-zone { border-top: 1px solid var(--line); padding-top: 16px; }
.danger-zone > details[open] > summary { margin-bottom: 4px; }
.danger-zone p { line-height: 1.55; }

/* kotak tampil sandi sementara (hasil reset) — sekali tampil, jangan hilang sendiri */
.pw-reveal {
  border: 1.5px solid #f0c96b; background: #fffaf0; border-radius: 12px; padding: 14px 16px;
}
.pw-reveal-head { font-size: 12.5px; font-weight: 800; color: #92650b; }
.pw-reveal-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.pw-reveal-code {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 17px; font-weight: 700;
  color: var(--ink); background: #fff; border: 1px solid #f0c96b; border-radius: 8px;
  padding: 7px 14px; letter-spacing: .02em; user-select: all;
}

/* ---- lesson media ---- */
.prose figure.lesson-img { margin: 18px 0; }
.prose figure.lesson-img img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; margin: 0 auto; }
.prose figure.lesson-img figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
.prose img.lesson-img-inline { max-width: 100%; height: auto; border-radius: 10px; vertical-align: middle; }
.prose img.lesson-img-inline[data-broken] { border: 1px dashed var(--line); background: #f7f9fb; padding: 10px; font-size: 12px; color: var(--muted); }
/* placeholder gambar hilang */
.img-missing-note { display: none; }
.prose figure.lesson-img.img-missing { border: 1px dashed #cbd7e2; background: #f7f9fb; border-radius: 12px; padding: 20px 18px; text-align: center; }
.prose figure.lesson-img.img-missing img { display: none; }
.prose figure.lesson-img.img-missing .img-missing-note { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }
.prose figure.lesson-img.img-missing figcaption { margin-top: 6px; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 18px 0; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }
.dartpad { width: 100%; height: 460px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dartpad iframe { width: 100%; height: 100%; border: 0; }

/* ---- reader (halaman baca pelajaran, gaya modul) ---- */
.reader-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px clamp(16px, 4vw, 40px); background: var(--card); border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.reader-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.reader-back:hover { color: var(--ink); }
@media (max-width: 720px) { .hide-sm { display: none; } }

.reader { display: grid; grid-template-columns: 340px minmax(0, 1fr); align-items: stretch; width: 100%; margin: 0; min-height: calc(100vh - var(--nav-h) - var(--bar-h)); transition: grid-template-columns .18s ease; overflow-x: clip; position: relative; }
.reader.is-collapsed { grid-template-columns: 0 1fr; }
.reader.is-collapsed .reader-side { transform: translateX(-100%); pointer-events: none; }

/* kolom sidebar: latar + border penuh sampai footer */
.reader-side {
  position: relative; min-width: 0;
  border-right: 1px solid var(--line); background: var(--card); transition: transform .18s ease;
}
/* panel isi yang menempel (sticky) di dalam kolom */
.reader-side-sticky {
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  display: flex; flex-direction: column; overflow: hidden;
}
.reader-side-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.rs-course { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--muted); line-height: 1.4; }
.rs-toggle { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 4px; display: inline-flex; }
.rs-toggle:hover { color: var(--ink); }
.reader-side-scroll { overflow-y: auto; padding: 16px 12px 60px; flex: 1; }

.rs-progress { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.rs-progress-title { font-size: 14px; font-weight: 700; margin-top: 2px; line-height: 1.35; }
.rs-progress-label { font-size: 12px; color: var(--muted); margin-top: 12px; }
.rs-progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.rs-progress-meta strong { color: var(--teal-deep); }

.rs-section-title { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--ink); padding: 4px 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }

/* accordion minggu */
.rs-section { margin-bottom: 4px; }
.rs-section > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  padding: 11px 8px; border-radius: 10px; color: var(--ink);
  font-size: 13.5px; font-weight: 700; line-height: 1.35;
}
.rs-section > summary::-webkit-details-marker { display: none; }
.rs-section > summary:hover { background: #f4f7f9; }
.rs-section-name { flex: 1; min-width: 0; }
.rs-section-count { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--muted); }
.rs-lock { flex-shrink: 0; font-size: 12px; }
.rs-chev { flex-shrink: 0; color: #9aa9b6; transition: transform .16s ease; }
.rs-section[open] > summary .rs-chev { transform: rotate(180deg); }
.rs-section.is-locked > summary { color: #9aa7b1; cursor: default; }
.rs-section.is-locked > summary:hover { background: none; }
.rs-section-body { display: flex; flex-direction: column; gap: 8px; padding: 6px 2px 10px; }

/* kartu materi (gaya Dicoding) */
.rs-card {
  display: flex; align-items: center; gap: 10px; padding: 10px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.rs-card:hover { border-color: #cfdae2; box-shadow: 0 2px 10px rgba(20,40,60,.06); }
.rs-card.is-current { border-color: var(--teal); background: #eefafa; box-shadow: inset 3px 0 0 var(--teal); }
.rs-card.is-done { background: #f7fbf9; }
.rs-card.is-locked { opacity: .55; }
.rs-card.is-locked:hover { border-color: var(--line); box-shadow: none; }
.rs-card-ic {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; background: var(--pill-bg);
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.rs-card-ic svg { width: 16px; height: 16px; }
.rs-card.is-current .rs-card-ic { background: var(--teal); color: #fff; }
.rs-card.is-done .rs-card-ic { background: #e2f3ea; color: var(--ok); }
.rs-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rs-card-title { font-size: 13px; font-weight: 600; line-height: 1.35; }
.rs-card.is-current .rs-card-title { font-weight: 700; }
.rs-card-meta { font-size: 11px; color: var(--muted); }
.rs-done { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; color: #fff; background: var(--ok); }
.rs-empty { font-size: 12px; color: var(--muted); padding: 4px 8px; }

.reader-main { padding: 36px clamp(16px, 3.5vw, 44px) 64px; min-width: 0; }
.reader-card {
  max-width: 1000px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: clamp(28px, 4.5vw, 60px);
}
.reader-title { font-size: clamp(21px, 4.6vw, 30px); line-height: 1.22; }

/* dokumen materi (pratinjau dosen) — lebar penuh, hanya jarak tepi yang dilegakan */
.lesson-doc {
  padding: clamp(24px, 4vw, 56px);
}
.reader-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
}

/* article typography — ukuran menyesuaikan lebar layar (mobile → desktop) */
.reader-main .prose { font-size: clamp(13.5px, 3.9vw, 16px); line-height: 1.75; color: #34424f; }
.reader-main .prose h2 { font-size: clamp(17.5px, 4vw, 22px); margin: clamp(28px, 6vw, 44px) 0 12px; }
.reader-main .prose h3 { font-size: clamp(15px, 3.4vw, 18px); margin: clamp(22px, 4.5vw, 32px) 0 9px; }
.reader-main .prose h4 { font-size: clamp(12.5px, 3vw, 13.5px); margin: 24px 0 8px; }
.reader-main .prose p { margin: 0 0 16px; }
.reader-main .prose ul, .reader-main .prose ol { margin: 0 0 18px; padding-left: 24px; }
.reader-main .prose li { margin-bottom: 8px; }

@media (max-width: 900px) {
  .nav { padding: 12px 18px; gap: 8px 14px; }
  .nav-links { gap: 14px; font-size: 13px; }
  .reader { grid-template-columns: 1fr; min-height: 0; align-items: start; }
  .reader.is-collapsed { grid-template-columns: 1fr; }
  .reader-side { border-right: 0; border-bottom: 1px solid var(--line); transform: none !important; }
  .reader-side-sticky { position: static; height: auto; max-height: 62vh; overflow-y: auto; }
  .reader.is-collapsed .reader-side { display: none; }
  .reader-main { padding: 20px 14px 90px; }
  .reader-card { max-width: none; padding: 22px 18px; border-radius: 14px; }
}

/* ---- kunci minggu (belum dibuka dosen) ---- */
.week.locked { opacity: .62; }
.week.locked .week-head { cursor: default; }
.lock-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--muted); }
.nav-week.locked .nav-week-head::after { content: " 🔒"; }

/* ---- panel status buka/tutup di sisi dosen ---- */
.week-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.week-status.open { color: var(--ok); background: #e7f6ef; }
.week-status.closed { color: var(--muted); background: var(--pill-bg); }

/* ---- submission tugas ---- */
.submission-box { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fafcfd; }
.grade-cell input[type=number] { width: 78px; }

/* ---- rekap nilai akhir (gradebook grid) ---- */
.w-num { width: 90px; }
table.gradebook { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
table.gradebook th, table.gradebook td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 8px 10px; text-align: center; background: var(--card); }
table.gradebook thead th { position: sticky; top: 0; z-index: 3; background: var(--ink); color: #fff; font-size: 11px; line-height: 1.35; vertical-align: middle; }
table.gradebook thead th.auto { background: #3a4a5a; }
table.gradebook td.auto { background: #f4f6f8; color: var(--muted); }
table.gradebook .wnote { font-weight: 600; opacity: .85; }
table.gradebook th.stick, table.gradebook td.stick { position: sticky; z-index: 2; text-align: left; }
table.gradebook thead th.stick { z-index: 4; }
table.gradebook .s0 { left: 0; width: 44px; text-align: center; }
table.gradebook .s1 { left: 44px; width: 120px; }
table.gradebook .s2 { left: 164px; min-width: 170px; box-shadow: 2px 0 0 var(--line); }
table.gradebook td.stick { background: var(--card); }
table.gradebook tbody tr:hover td { background: #f9fbfc; }
table.gradebook tbody tr:hover td.auto { background: #eef1f4; }
.cell-in { width: 68px; text-align: center; padding: 5px 4px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.cell-in:focus { outline: none; border-color: var(--teal); }

/* ---- mode present (proyektor / tampil di kelas) — latar putih, kontras tinggi ---- */
.present { min-height: 100vh; background: #ffffff; color: var(--ink); }
.present-bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
  padding: 12px clamp(14px, 4vw, 22px); background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.present-bar .pb-title { font-weight: 700; font-size: clamp(13px, 3.4vw, 15px); color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.present-bar .pb-step { font-size: 13px; color: var(--muted); }
.present-bar a, .present-bar button {
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #f4f7fa; color: var(--ink); display: inline-flex; align-items: center; gap: 7px;
}
.present-bar a:hover, .present-bar button:hover { background: #e9eef4; }
.present-bar .pb-exit { background: transparent; color: var(--danger); border-color: #f0d0d0; }
.present-stage { max-width: 1080px; margin: 0 auto; padding: clamp(28px, 6vw, 46px) clamp(20px, 5vw, 40px) 120px; }
.present-stage .eyebrow { color: var(--teal-deep); letter-spacing: .12em; }
.present-stage h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.14; color: var(--ink); margin: 10px 0 26px; }
.present-prose { font-size: clamp(17px, 2.4vw, 21px); line-height: 1.75; color: #2a3947; }
.present-prose h2 { font-size: clamp(22px, 3.6vw, 30px); color: var(--ink); margin: 40px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.present-prose h3 { font-size: clamp(19px, 3vw, 24px); color: var(--ink); margin: 30px 0 10px; padding-left: 12px; border-left: 3px solid var(--teal); }
.present-prose h4 { font-size: clamp(14px, 2vw, 16px); letter-spacing: .04em; text-transform: uppercase; color: var(--teal-deep); margin: 26px 0 8px; }
.present-prose p, .present-prose li { color: #2a3947; }
.present-prose p, .present-prose li { text-align: justify; hyphens: auto; }
.present-prose pre, .present-prose .code { font-size: clamp(14px, 1.9vw, 17px); background: var(--code-bg); color: #d7e3ea; border: 1px solid #24333d; border-radius: 12px; padding: 16px 18px; overflow: auto; }
.present-prose code { background: #eef3f6; color: #0b6570; padding: 2px 6px; border-radius: 6px; }
.present-prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: clamp(15px, 2vw, 18px); }
.present-prose th, .present-prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.present-prose th { background: #f4f7fa; }
.present-prose img { border-radius: 12px; }
.present-prose a { color: var(--cta); }
.present-embed { margin: 26px 0; aspect-ratio: 16/9; }
.present-embed iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }
.present-q { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 16px 0; font-size: clamp(16px, 2.1vw, 19px); }
.present-q .opt { padding: 8px 12px; border-radius: 8px; margin-top: 8px; background: #f1f5f8; }
.present-q .opt.key { background: #e9f7ef; color: #12805a; font-weight: 700; }
.present-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 12px;
  justify-content: space-between; padding: 14px clamp(14px, 4vw, 22px); background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
}
.present-nav a, .present-nav span {
  font-weight: 700; font-size: clamp(13px, 3.4vw, 15px); padding: 12px 20px; border-radius: 10px;
  background: #f4f7fa; color: var(--ink); border: 1.5px solid var(--line);
}
.present-nav a:hover { background: #e9eef4; }
.present-nav .is-off { opacity: .4; pointer-events: none; }
@media (max-width: 720px) {
  .present-stage { padding: 26px 18px 120px; }
}

/* ---- notebook: kartu per sel ---- */
.nb-card {
  margin: 0 0 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); overflow: hidden; box-shadow: 0 1px 2px rgba(20, 40, 60, .04);
}
.nb-card:last-child { margin-bottom: 0; }
.nb-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; background: #f6f9fc; border-bottom: 1px solid var(--line);
}
.nb-card-ic { font-size: 14px; line-height: 1; }
.nb-card-label {
  font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.nb-card-body { padding: 16px 18px; }
.nb-card-body > :first-child { margin-top: 0; }
.nb-card-body > :last-child { margin-bottom: 0; }
.nb-card-title { display: block; font-size: 15px; margin-bottom: 2px; }
.reader-main .nb-card { max-width: 940px; }

/* aksen kepala kartu per jenis */
.nb-card--code .nb-card-head { background: #eef1f6; }
.nb-card--practice .nb-card-head { background: #eef4ff; }
.nb-card--practice .nb-card-label { color: #2f5fd0; }
.nb-card--quiz .nb-card-head,
.nb-card--assignment .nb-card-head { background: #eef7f4; }
.nb-card--quiz .nb-card-label,
.nb-card--assignment .nb-card-label { color: var(--teal-deep); }

/* callout: warnai kartu sesuai varian */
.nb-card--co-info    { --ka: #2563eb; --kb: #eef4ff; --kc: #cfe0fb; }
.nb-card--co-tip     { --ka: #12805a; --kb: #e9f7ef; --kc: #c3e8d5; }
.nb-card--co-warning { --ka: #b7791f; --kb: #fdf6e7; --kc: #f0e0b8; }
.nb-card--co-danger  { --ka: #dc2626; --kb: #fdeeee; --kc: #f3c9c9; }
.nb-card--callout { border-color: var(--kc); }
.nb-card--callout .nb-card-head { background: var(--kb); border-bottom-color: var(--kc); }
.nb-card--callout .nb-card-label { color: var(--ka); }

/* ---- notebook: editor ---- */
.nb-editor-wrap { border-top: 1px solid var(--line); padding-top: 16px; }
.nb-editor { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.nb-empty { color: var(--muted); font-size: 13px; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; }
.nb-e-cell { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.nb-e-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 8px 12px; background: #f4f7fa; border-bottom: 1px solid var(--line);
}
.nb-e-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nb-e-tools { display: flex; gap: 4px; }
.nb-e-btn {
  width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--card); cursor: pointer; font-size: 13px; line-height: 1; color: var(--ink);
}
.nb-e-btn:hover { background: #eef2f7; }
.nb-e-rm:hover { background: #fbeaea; border-color: #e6bcbc; color: var(--danger); }
.nb-e-body { padding: 12px; }
.nb-e-body .field { margin-bottom: 10px; }
.nb-e-body textarea, .nb-e-body input[type=text], .nb-e-body input[type=url], .nb-e-body input[type=number] { width: 100%; }
.nb-e-imgprev { display: block; max-width: 260px; margin-top: 10px; border-radius: 8px; border: 1px solid var(--line); }
.nb-add {
  display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; margin-top: 12px;
  overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin;
}
.nb-add::-webkit-scrollbar { height: 6px; }
.nb-add::-webkit-scrollbar-thumb { background: var(--track); border-radius: 3px; }
.nb-add > .btn { flex: 0 0 auto; white-space: nowrap; padding: 7px 11px; }
.nb-add-label { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--muted); }

/* ---- intro kuis ---- */
.quiz-intro { max-width: 600px; margin-inline: auto; }
.quiz-intro .qi-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.quiz-intro h1 { font-size: clamp(20px, 5.6vw, 26px); line-height: 1.22; margin-top: 6px; }
.qi-card { padding: clamp(16px, 5vw, 24px); margin-top: 22px; }

.qi-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qi-tile { background: var(--bg); border: 1px solid var(--line); border-radius: 13px; padding: 15px 10px; text-align: center; }
.qi-tile b { display: block; font-size: clamp(18px, 5.4vw, 22px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.qi-tile span { display: block; font-size: clamp(10.5px, 2.8vw, 11.5px); font-weight: 600; color: var(--muted); margin-top: 3px; }

.qi-rows { margin-top: 16px; display: flex; flex-direction: column; }
.qi-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; font-size: clamp(13px, 3.4vw, 14px); }
.qi-row + .qi-row { border-top: 1px solid var(--line); }
.qi-row > span { color: var(--muted); }
.qi-row > .qi-val { color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.qi-dots { display: inline-flex; gap: 4px; }
.qi-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--track); display: block; }
.qi-dots i.on { background: var(--cta); }

.qi-best { margin-top: 16px; border: 1px solid var(--line); border-radius: 13px; padding: 15px 16px; background: #fbfdff; }
.qi-best .qi-best-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.qi-best .qi-best-head b { font-size: clamp(17px, 5vw, 20px); font-weight: 800; }
.qi-best .qi-best-head b small { font-size: 12px; font-weight: 600; color: var(--muted); }
.qi-best .bar { margin-top: 12px; height: 10px; position: relative; overflow: visible; }
.qi-best .bar > span { background: var(--cta); }
.qi-best .bar .pass-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); }
.qi-best .bar .pass-mark::after { content: "lulus"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: var(--muted); }
.qi-best .qi-best-foot { font-size: 12px; color: var(--muted); margin-top: 12px; }

.qi-cta { margin-top: 20px; }
.qi-cta .btn { width: 100%; justify-content: center; font-size: 15px; padding: 14px 20px; }
.qi-empty { margin-top: 18px; text-align: center; color: var(--muted); font-size: 14px; padding: 8px 0; }

.qi-rules { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.qi-rules li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.5; }
.qi-rules li svg { flex-shrink: 0; margin-top: 1px; color: var(--teal); }

@media (max-width: 480px) {
  .qi-tiles { grid-template-columns: 1fr 1fr; }
  .qi-tile:last-child { grid-column: span 2; }
}

/* ---- footer situs ---- */
.site-foot { flex-shrink: 0; border-top: 1px solid var(--line); background: var(--card); }
.site-foot-in {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap;
  padding: 22px clamp(16px, 4vw, 40px);
}
.site-foot-brand { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.site-foot-brand strong { font-size: 13px; color: var(--ink); }
.site-foot-brand .foot-detail, .site-foot-brand .foot-year { color: var(--muted); }
.site-foot-brand > * + *::before { content: "·"; margin-right: 8px; color: #c8d3dd; font-weight: 400; }
.site-foot-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 12.5px; }
.site-foot-links a { color: var(--muted); font-weight: 600; }
.site-foot-links a:hover { color: var(--ink); }
@media (max-width: 720px) {
  .site-foot-in { justify-content: center; text-align: center; padding: 16px; }
  .site-foot-links { display: none; }
  .site-foot-brand .foot-detail { display: none; }
}

/* ---- notebook: isi blok tambahan (callout / latihan) ---- */
.nb-callout-body > :last-child { margin-bottom: 0; }
.nb-callout-body p { margin: 0 0 8px; }

.nb-practice-prompt > :last-child { margin-bottom: 0; }
.nb-practice-sol { margin-top: 10px; }
.nb-practice-sol > summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--cta);
  list-style: none; padding: 8px 0;
}
.nb-practice-sol > summary::-webkit-details-marker { display: none; }
.nb-practice-sol > summary::before { content: "▸ "; }
.nb-practice-sol[open] > summary::before { content: "▾ "; }

.nb-embed { width: 100%; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.nb-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- blok dokumen (unduh berkas) — di dalam kartu, tanpa bingkai ganda ---- */
.nb-file { display: flex; align-items: center; gap: 13px; }
.nb-file-ic {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 10px; font-weight: 800; letter-spacing: .02em;
  background: var(--fk-bg, #eef2f7); color: var(--fk, #5a6b7a);
}
.nb-file--pdf { --fk: #c0392b; --fk-bg: #fdeeec; }
.nb-file--doc { --fk: #2563eb; --fk-bg: #eaf1ff; }
.nb-file--ppt { --fk: #d97706; --fk-bg: #fdf1e3; }
.nb-file--xls { --fk: #12805a; --fk-bg: #e5f5ee; }
.nb-file--zip { --fk: #7c3aed; --fk-bg: #f1eafe; }
.nb-file-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nb-file-name { font-size: 14px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-file-meta { font-size: 12px; color: var(--muted); }

/* ---- kartu sel di mode Present ---- */
.present-prose .nb-card { margin-bottom: 22px; }
.present-prose .nb-card-body { padding: clamp(16px, 2.4vw, 22px); }

/* ---- modal pratinjau PDF ---- */
.pdf-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: clamp(8px, 3vw, 40px); }
.pdf-modal[hidden] { display: none; }
.pdf-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.pdf-modal-box {
  position: relative; z-index: 1; background: var(--card); border-radius: 14px;
  width: min(1000px, 100%); height: min(92vh, 100%); display: flex; flex-direction: column;
  overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
.pdf-modal-head { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 16px; border-bottom: 1px solid var(--line); }
.pdf-modal-head strong { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-modal-x { width: 34px; height: 34px; border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); border-radius: 8px; flex-shrink: 0; }
.pdf-modal-x:hover { background: #eef2f7; color: var(--ink); }
.pdf-modal iframe { flex: 1; width: 100%; border: 0; background: #525659; }

/* ---- baris aksi form (Simpan / Hapus) ---- */
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-actions > .btn-del { margin-left: auto; }

/* ---- gerbang materi berurutan ---- */
.rs-locked-ic { flex-shrink: 0; font-size: 12px; opacity: .8; }
.lesson-row.is-locked { opacity: .55; }
.lesson-row.is-locked .dot { border-color: transparent; background: none; font-size: 12px; }
.reader-nav-hint { font-size: 13px; color: var(--muted); font-style: italic; text-align: right; }

/* ---- detail progres mahasiswa (sisi dosen) ---- */
.sd-wprog { display: flex; align-items: center; gap: 12px; }
.sd-lesson { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.sd-lesson.is-done { background: #f7fbf9; border-color: #d6eadf; }
.sd-mark {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; margin-top: 1px;
  border: 2px solid var(--track); display: inline-flex; align-items: center; justify-content: center;
}
.sd-mark.done { background: var(--ok); border-color: var(--ok); }
.sd-status { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sd-lesson.is-done .sd-status { color: var(--ok); }

/* ---- form impor ---- */
.imp-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .imp-modes { grid-template-columns: 1fr; } }
.imp-mode {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer; line-height: 1.45;
}
.imp-mode:has(input:checked) { border-color: var(--cta); background: #eff4ff; }
.imp-mode:has(input:disabled) { opacity: .5; cursor: not-allowed; }

/* ---- navigasi mode HP: tombol menu di kanan ---- */
@media (max-width: 720px) {
  .nav { flex-wrap: nowrap; padding: 12px 16px; gap: 10px; }
  .nav-toggle { display: inline-flex; flex-shrink: 0; }
  .nav .nav-links {
    display: none;
    position: absolute; top: calc(100% + 6px); right: 12px; z-index: 60;
    flex-direction: column; align-items: stretch; gap: 2px; flex-wrap: nowrap;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 6px; min-width: 190px; font-size: 14px;
    box-shadow: 0 12px 34px rgba(20,40,60,.16);
  }
  .nav .nav-links.is-open { display: flex; }
  .nav .nav-links .nav-logout-form { display: block; width: 100%; }
  .nav .nav-links > a,
  .nav .nav-links .nav-logout {
    display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px;
    color: var(--ink); font-weight: 600; line-height: 1.3;
  }
  .nav .nav-links > a:hover,
  .nav .nav-links .nav-logout:hover { background: #eef2f7; }
  .nav .nav-links .nav-logout { color: var(--danger); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 2px; }
}
