:root {
  --paper:   #f4f6fa;
  --card:    #ffffff;
  --ink:     #17263e;
  --muted:   #5a6577;
  --line:    #dde3ec;
  --accent:  #1e4f8f;
  --accent-ink: #153a6b;
  --gold:    #b7823f;
  --danger:  #a4442f;
  --radius:  10px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- shared bits ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.4rem;
}
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.9rem; }
a { color: var(--accent-ink); }

button, .btn {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
button:hover, .btn:hover { background: var(--accent-ink); }
button:active { transform: translateY(1px); }
button.ghost {
  background: transparent;
  color: var(--accent-ink);
}
button.ghost:hover { background: rgba(30,79,143,0.08); }
button:disabled { opacity: 0.5; cursor: default; }

textarea { resize: vertical; min-height: 60px; }
input, select, textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  width: 100%;
}
/* checkboxes/radios must size to themselves — the width:100% above
   was stretching them and making their labels overlap buttons */
input[type="checkbox"], input[type="radio"] {
  width: auto;
  padding: 0;
  accent-color: var(--accent);
}
input:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
label { display: block; font-size: 0.82rem; color: var(--muted); margin: 0 0 0.3rem; }

/* ---- login page ---- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1e4f8f, #132743);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  box-shadow: 0 12px 40px -24px rgba(28,43,43,0.45);
  animation: rise 0.4s ease;
}
.field { margin-bottom: 1rem; }
.msg { font-size: 0.85rem; margin: 0.75rem 0 0; min-height: 1.1em; }
.msg.err { color: var(--danger); }

/* ---- app shell ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: #17263e;
  color: #fff;
}
.topbar .brand { font-family: var(--serif); font-size: 1.15rem; display: inline-flex; align-items: center; gap: 0.55rem; }
.topbar .brand img { width: 27px; height: 27px; border-radius: 7px; flex: none; }
.topbar .who { font-size: 0.85rem; opacity: 0.8; margin-right: 0.9rem; }
.topbar button.ghost { color: #fff; border-color: rgba(255,255,255,0.35); }
.topbar button.ghost:hover { background: rgba(255,255,255,0.12); }

.container { max-width: 900px; margin: 0 auto; padding: 1.75rem 1.25rem 4rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.1rem;
}

/* ---- lesson list ---- */
.lesson {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.lesson:last-child { border-bottom: none; }
.lesson .meta { flex: 1; min-width: 0; }
.lesson .title { font-weight: 600; }
.lesson .kind {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.pill.done { background: rgba(30,79,143,0.14); color: var(--accent-ink); }
.pill.todo { background: rgba(183,130,63,0.16); color: var(--gold); }
.pill.bad  { background: rgba(164,68,47,0.14);  color: var(--danger); }
.pill.off  { background: rgba(90,101,119,0.14); color: var(--muted); }
tr.row-off td { background: rgba(164,68,47,0.045); }
.alert-bar {
  border: 1px solid var(--gold);
  background: rgba(183,130,63,0.09);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

/* ---- admin table ---- */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line); }
th { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.form-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; }
.form-row .field { flex: 1; min-width: 140px; margin: 0; }

.empty { color: var(--muted); font-size: 0.9rem; padding: 0.5rem 0; }

/* ---- drag & drop upload ---- */
.dropzone {
  margin-top: 0.85rem;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(30,79,143,0.07);
  color: var(--accent-ink);
}
.dropzone .file-picked { color: var(--ink); font-weight: 600; }
.dropzone .file-remove {
  margin-left: 0.6rem;
  color: var(--danger);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* ---- progress bars & celebration ---- */
.progress {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.4rem 0 0.9rem;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.congrats {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  background: rgba(30,79,143,0.08);
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  margin-top: 0.85rem;
}
.lesson .icon { font-size: 1.15rem; flex: none; width: 1.5rem; text-align: center; }
.topbar .badge {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; margin-right: 0.6rem;
  overflow: hidden; flex: none; vertical-align: middle;
}
.topbar .badge img { width: 100%; height: 100%; object-fit: cover; }

/* ---- learning roadmap ---- */
.roadmap { position: relative; }
.roadmap .lesson { position: relative; padding-left: 2.4rem; }
.roadmap .lesson::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--line);
}
.roadmap .lesson:first-child::before { top: 50%; }
.roadmap .lesson:last-child::before { bottom: 50%; }
.roadmap .lesson:only-child::before { display: none; }
.node {
  position: absolute;
  left: 0.85rem; top: 50%;
  transform: translate(-50%, -50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  background: var(--card);
  border: 2px solid var(--line);
  color: var(--muted);
  z-index: 1;
}
.node.done { color: #fff; }
.node.current { color: var(--accent-ink); box-shadow: 0 0 0 4px rgba(30,79,143,0.14); }
.lesson.locked { opacity: 0.55; }
.badges { display: flex; align-items: center; gap: 0.45rem; margin: 0.1rem 0 0.7rem; font-size: 1.1rem; }
.badges .b { opacity: 0.22; filter: grayscale(0.6); transition: opacity 0.3s ease; }
.badges .b.earned { opacity: 1; filter: none; }

/* ---- rich text editor ---- */
.rte-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.4rem;
  background: var(--paper);
}
.rte-bar button {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  border-radius: 6px;
  min-width: 32px;
  font-weight: 500;
}
.rte-bar button:hover { border-color: var(--accent); background: var(--card); color: var(--accent-ink); }
.rte-bar select { width: auto; padding: 0.3rem 0.35rem; font-size: 0.85rem; }
.rte-bar input[type="color"] { width: 34px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); cursor: pointer; }
.rte-bar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 0.2rem; }
.rte-area {
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--card);
  min-height: 170px;
  padding: 0.85rem;
  font-size: 0.95rem;
  overflow: auto;
}
.rte-area:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.rte-area img.sel { outline: 3px solid var(--accent); }
.img-tools { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.45rem; align-items: center; }

.ann-body img, .rte-area img { max-width: 100%; height: auto; border-radius: 6px; }
.ann-body blockquote, .rte-area blockquote {
  border-left: 3px solid var(--accent);
  margin: 0.5rem 0;
  padding: 0.3rem 0.85rem;
  color: var(--muted);
  background: rgba(30,79,143,0.05);
}
.ann-body pre, .rte-area pre {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: pre-wrap;
}
.ann-body a { color: var(--accent-ink); }
.ann-body h1, .ann-body h2, .ann-body h3 { margin: 0.4rem 0 0.3rem; }

/* ---- collapsible course categories ---- */
.cat { margin-bottom: 1rem; }
.cat-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.cat-head:hover { border-color: var(--accent); background: var(--card); color: var(--ink); }
.cat-head .chev { transition: transform 0.25s ease; color: var(--accent); flex: none; }
.cat:not(.collapsed) .cat-head .chev { transform: rotate(90deg); }
.cat-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.3s ease; }
.cat.collapsed .cat-body { grid-template-rows: 0fr; }
.cat-body > div { overflow: hidden; }
.cat-body .card:first-child { margin-top: 0.8rem; }

/* ---- global search ---- */
.search-wrap { position: relative; margin: 0 0 1.2rem; }
.search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px -18px rgba(23,38,62,0.45);
  max-height: 320px;
  overflow: auto;
}
.search-results .res {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.8rem;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}
.search-results .res:last-child { border-bottom: none; }
.search-results .res:hover { background: rgba(30,79,143,0.06); }
.search-results mark { background: rgba(183,130,63,0.35); border-radius: 3px; padding: 0 1px; }

/* ---- swatch picker & flash highlight ---- */
.swatches { display: flex; gap: 0.35rem; margin-top: 0.4rem; flex-wrap: wrap; }
.swatches button {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  padding: 0;
}
@keyframes flashCard { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: none; } }
.card.flash { animation: flashCard 1.3s ease; }

.hub-footer { text-align: center; color: var(--muted); font-size: 0.82rem; padding: 1.6rem 0 0; }

/* ---- student dashboard: filter chips + study chart ---- */
.chip-row { display: flex; gap: 0.4rem; margin: 0 0 1rem; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.38rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.chip:hover { border-color: var(--accent); background: var(--card); color: var(--accent-ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mini-chart { display: flex; gap: 6px; align-items: flex-end; height: 76px; margin: 0.4rem 0 0.5rem; }
.mini-chart .bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  height: 100%;
  min-width: 0;
}
.mini-chart .bar span {
  display: block;
  width: 100%;
  max-width: 36px;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 3px;
}
.mini-chart .bar i {
  font-style: normal;
  font-size: 0.62rem;
  color: var(--muted);
  font-family: var(--mono);
  white-space: nowrap;
}
.creds { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.45rem 0 0.75rem; }
.cred-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgba(183,130,63,0.13);
  color: #8a5f27;
  border: 1px solid rgba(183,130,63,0.35);
  white-space: nowrap;
}

/* ---- analytics ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  min-width: 0;
}
.stat .v { font-size: 1.25rem; font-weight: 700; color: var(--accent-ink); font-family: var(--serif); overflow-wrap: anywhere; }
.stat .k { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--mono); }
.stat .sub { font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
a.pf-link { color: var(--accent-ink); text-decoration: none; border-bottom: 1px dotted var(--accent); cursor: pointer; }
a.pf-link:hover { border-bottom-style: solid; }
.eng-detail {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  margin: 0.2rem 0 0.6rem;
  font-size: 0.85rem;
}
.eng-detail .kind { display: block; margin-top: 0.2rem; }

/* ---- admin tabs ---- */
.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0 0 1.15rem;
}
.tabs button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
  padding: 0.5rem 0.95rem;
}
.tabs button:hover { background: rgba(30,79,143,0.06); color: var(--accent-ink); }
.tabs button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tabpane { display: none; }
.tabpane.show { display: block; animation: rise 0.25s ease; }

/* ---- phones ---- */
@media (max-width: 640px) {
  .container { padding: 1.25rem 0.9rem 3rem; }
  h1 { font-size: 1.45rem; }
  .form-row { flex-direction: column; align-items: stretch; }
  .form-row .field { max-width: none !important; }
  .lesson { flex-wrap: wrap; row-gap: 0.5rem; }
  .lesson .meta { flex-basis: 100%; }
  .lesson a.btn, .lesson button { padding: 0.55rem 0.9rem; }
  .card { overflow-x: auto; }
  .topbar .who { display: none; }
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* ============================================================
   PHASE 1 ADDITIONS — design tokens, toasts, modals, skeletons,
   sticky header, seat bars, mobile stacked tables
   ============================================================ */

:root {
  --success:      #1e7f4f;
  --success-bg:   rgba(30,127,79,0.12);
  --warning:      #b45309;
  --warning-bg:   rgba(180,83,9,0.10);
  --info-bg:      rgba(30,79,143,0.08);
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px;
  --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --shadow-pop: 0 18px 50px -20px rgba(23,38,62,0.45);
}

/* semantic pills: green = done, amber = warning */
.pill.done { background: var(--success-bg); color: var(--success); }
.pill.todo { background: var(--warning-bg); color: var(--warning); }

/* sticky header */
.topbar { position: sticky; top: 0; z-index: 40; }

/* icons align with text */
i[data-lucide], svg.lucide { vertical-align: -3px; flex: none; }
button i[data-lucide] { margin-right: 4px; }

/* ---- toasts ---- */
#toast-box {
  position: fixed; right: 16px; bottom: 16px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; max-width: min(92vw, 380px);
}
.toast {
  background: #17263e; color: #fff;
  border-radius: var(--radius); padding: 0.7rem 1rem;
  font-size: 0.9rem; box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  border-left: 4px solid var(--success);
}
.toast.err  { border-left-color: #e06c4f; }
.toast.info { border-left-color: var(--accent); }
.toast.show { opacity: 1; transform: none; }

/* ---- modal dialogs ---- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(23,38,62,0.42);
  display: grid; place-items: center; padding: 1rem;
  opacity: 0; transition: opacity 0.2s ease;
}
.modal-wrap.show { opacity: 1; }
.modal {
  background: var(--card); border-radius: 14px;
  padding: 1.4rem 1.5rem; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-pop);
  transform: translateY(10px); transition: transform 0.2s ease;
}
.modal-wrap.show .modal { transform: none; }
.modal h3 { font-family: var(--serif); margin: 0 0 0.5rem; font-size: 1.2rem; }
.modal p { color: var(--muted); font-size: 0.92rem; margin: 0 0 1rem; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.1rem; }
button.danger-btn { background: var(--danger); border-color: var(--danger); }
button.danger-btn:hover { background: #8a3a28; }

/* ---- skeleton loading ---- */
.sk {
  background: linear-gradient(90deg, var(--line) 25%, var(--paper) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: skshine 1.2s linear infinite;
  border-radius: 6px;
}
.sk-title { height: 20px; width: 40%; margin-bottom: 0.8rem; }
.sk-line  { height: 12px; width: 90%; margin-bottom: 0.55rem; }
@keyframes skshine { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---- seat usage bars ---- */
.seatbar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 5px; max-width: 260px; }
.seatbar > span { display: block; height: 100%; border-radius: 3px; background: var(--success); }
.seatbar.warn > span { background: var(--warning); }
.seatbar.full > span { background: var(--danger); }

/* ---- attention banner ---- */
.attention {
  border: 1px solid var(--warning); background: var(--warning-bg);
  border-radius: var(--radius); padding: 0.75rem 1rem;
  font-size: 0.9rem; margin-bottom: 1rem;
}
.attention b { color: var(--warning); }
.attention ul { margin: 0.35rem 0 0 1.1rem; padding: 0; }

/* ---- card section headers with actions ---- */
.card-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.card-head h2 { margin: 0; flex: 1; }

/* ---- staff shell nav ---- */
.topnav { display: flex; gap: 0.25rem; margin-left: 1rem; flex: 1; min-width: 0; overflow-x: auto; }
.topnav a {
  color: rgba(255,255,255,0.75); text-decoration: none;
  font-size: 0.88rem; font-weight: 600; padding: 0.35rem 0.7rem;
  border-radius: 8px; white-space: nowrap;
}
.topnav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.topnav a.on { background: rgba(255,255,255,0.16); color: #fff; }

/* ---- mobile: tables become stacked cards ---- */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; row-gap: 0.4rem; }
  table.stackable thead { display: none; }
  table.stackable tr { display: block; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 0.7rem; padding: 0.4rem 0.7rem; }
  table.stackable td { display: flex; justify-content: space-between; gap: 0.8rem; border-bottom: none; padding: 0.35rem 0; font-size: 0.9rem; }
  table.stackable td::before {
    content: attr(data-th);
    font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--muted); align-self: center; flex: none;
  }
  button, .btn { min-height: 44px; }
  .tabs button { min-height: 40px; }
}

/* ---- Phase 2b: discussions + printable report card ---- */
.post {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.6rem 0.85rem; margin-bottom: 0.55rem; background: var(--card);
}
.post .kind { display: block; margin-bottom: 0.25rem; }
.post p { margin: 0; font-size: 0.92rem; white-space: pre-wrap; }
.thread-row { cursor: pointer; }
.thread-row:hover .title { color: var(--accent-ink); text-decoration: underline; }

@media print {
  body.print-report .topbar, body.print-report .tabs,
  body.print-report .no-print, body.print-report #toast-box { display: none !important; }
  body.print-report .tabpane { display: none !important; }
  body.print-report .tabpane.show { display: block !important; }
  body.print-report .tabpane.show > :not(#report-pane) { display: none !important; }
  body.print-report #report-pane { border: none; }
}

/* ---- Phase 2c: notification bell + certificates + detail print ---- */
.bell-wrap { position: relative; display: inline-block; }
#bell-btn { position: relative; }
.bell-badge {
  position: absolute; top: -6px; right: -7px;
  background: var(--danger); color: #fff; border-radius: 999px;
  font-size: 0.65rem; font-weight: 700; padding: 1px 5px; line-height: 1.3;
}
.bell-panel {
  position: absolute; right: 0; top: calc(100% + 6px);
  width: min(88vw, 330px); background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); z-index: 120;
  max-height: 360px; overflow: auto; text-align: left;
}
.bell-head { font-weight: 700; padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.bell-item { padding: 0.55rem 0.85rem; border-bottom: 1px solid var(--line); font-size: 0.87rem; }
.bell-item:last-child { border-bottom: none; }
.bell-item.unread { background: var(--info-bg); }
.bell-item .kind { display: block; margin-top: 2px; }

.cert-overlay {
  position: fixed; inset: 0; z-index: 180;
  background: rgba(23,38,62,0.55);
  display: grid; place-items: center; padding: 1rem; overflow: auto;
}
.cert {
  background: #fffdf7; border: 3px double var(--gold);
  outline: 6px solid var(--accent-ink); outline-offset: -14px;
  padding: 2.6rem 2.2rem; width: 100%; text-align: center;
  font-family: var(--serif); color: var(--ink);
}
.cert .c-eyebrow { font-family: var(--mono); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.7rem; color: var(--gold); }
.cert h1 { font-size: 1.9rem; margin: 0.4rem 0 1rem; }
.cert .c-name { font-size: 1.6rem; font-weight: 700; border-bottom: 2px solid var(--gold); display: inline-block; padding: 0 1.2rem 0.2rem; margin: 0.5rem 0; }
.cert .c-course { font-size: 1.15rem; font-weight: 600; margin: 0.5rem 0 1.2rem; }
.cert .c-foot { display: flex; justify-content: space-between; margin-top: 2rem; font-size: 0.85rem; color: var(--muted); }

@media print {
  body.print-cert > :not(.cert-overlay) { display: none !important; }
  body.print-cert .cert-overlay { position: static; background: none; padding: 0; display: block; }
  body.print-cert .cert-overlay .no-print { display: none !important; }
  /* nested-element printing (teacher student detail) */
  body.print-report2 * { visibility: hidden; }
  body.print-report2 .print-target, body.print-report2 .print-target * { visibility: visible; }
  body.print-report2 .print-target { position: absolute; left: 0; top: 0; width: 100%; }
  body.print-report2 .print-target button { display: none !important; }
}


/* ---- Phase 3b: visual identity — section tones, banners, card polish ---- */
:root {
  --tone-purple: #6d28d9;   /* assignments */
  --tone-teal:   #0f766e;   /* discussions / community */
  --tone-cyan:   #0891b2;   /* schedule */
  --tone-amber:  #b45309;   /* materials / reports */
  --tone-rose:   #be123c;   /* review / attention */
  --tone-green:  #1e7f4f;   /* people / success */
}
.card {
  box-shadow: 0 1px 2px rgba(23,38,62,0.05), 0 6px 18px -14px rgba(23,38,62,0.18);
}
.course-card { padding-top: 0; overflow: hidden; }
.course-banner {
  height: 108px;
  margin: 0 -1.25rem 0.9rem;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
@media (max-width: 640px) { .course-banner { height: 84px; font-size: 2rem; } }
.brand-swatches { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.5rem 0; }
.brand-swatches button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line);
  padding: 0; min-height: 0;
}
.brand-swatches button.on { box-shadow: 0 0 0 3px var(--gold); }


/* ============================================================
   PHASE 4 — membership theming, premium highlighting,
   hero course banners, modern lesson cards
   ============================================================ */

:root {
  --navy:        #1e293b;                    /* organization theme */
  --prem:        #a16207;                    /* premium gold text */
  --prem-bg:     linear-gradient(135deg, #fdf3d8, #f7e3ae);
  --prem-row:    rgba(212, 164, 62, 0.10);   /* premium row tint */
  --teacher:     #6d28d9;                    /* teacher theme (purple) */
}

/* ---- membership badges (consistent on every page) ---- */
.mb {
  display: inline-flex; align-items: center; gap: 0.25em;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  white-space: nowrap; vertical-align: middle;
  border: 1px solid transparent;
}
.mb-free         { background: rgba(30,79,143,0.10);  color: var(--accent-ink); border-color: rgba(30,79,143,0.25); }
.mb-premium      { background: var(--prem-bg); color: var(--prem); border-color: #d9b45c; box-shadow: 0 1px 4px -2px rgba(161,98,7,0.5); }
.mb-teacher      { background: rgba(109,40,217,0.10); color: var(--teacher); border-color: rgba(109,40,217,0.30); }
.mb-teacher-prem { background: var(--prem-bg); color: #7c3aed; border-color: #d9b45c; }
.mb-org          { background: rgba(30,41,59,0.92);   color: #fff; border-color: var(--navy); }
.mb-owner        { background: var(--navy); color: #fcd34d; border-color: #b7823f; }

/* ---- premium row highlighting in management tables ---- */
tr.row-premium td {
  background: var(--prem-row);
}
tr.row-premium td:first-child { box-shadow: inset 3px 0 0 #d4a43e; }
tr.row-premium + tr.st-panel td { background: var(--prem-row); }

/* ---- hero course banner ---- */
.course-banner {
  position: relative;
  height: 240px;                 /* was 108px — real hero banner */
  margin: 0 -1.25rem 0.9rem;
  overflow: hidden;
  display: block;
  font-size: 3rem;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.course-banner .cb-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  display: grid; place-items: center;
  transition: transform 0.6s ease;
}
.course-card:hover .course-banner .cb-bg { transform: scale(1.045); }
.course-banner .cb-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.18) 0%,
              rgba(15,23,42,0.05) 35%, rgba(15,23,42,0.72) 100%);
}
.course-banner .cb-tag {
  position: absolute; top: 0.8rem; left: 0.9rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; font-family: var(--mono);
  background: rgba(255,255,255,0.88); color: var(--ink);
  padding: 0.22rem 0.6rem; border-radius: 999px; text-shadow: none;
}
.course-banner .cb-prem {
  position: absolute; top: 0.8rem; right: 0.9rem;
  font-size: 0.74rem; font-weight: 800;
  background: linear-gradient(135deg, #fde68a, #d9a53c); color: #713f12;
  padding: 0.26rem 0.7rem; border-radius: 999px; text-shadow: none;
  box-shadow: 0 3px 10px -4px rgba(0,0,0,0.5);
}
.course-banner .cb-info {
  position: absolute; left: 1.1rem; right: 1.1rem; bottom: 0.85rem;
  color: #fff;
}
.course-banner .cb-title {
  font-family: var(--serif); font-weight: 700;
  font-size: 1.45rem; line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.course-banner .cb-stats {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  align-items: center; margin-top: 0.35rem;
  font-size: 0.8rem; font-weight: 600;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.course-banner .cb-bar {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.30);
  overflow: hidden; margin-top: 0.5rem;
}
.course-banner .cb-bar > span {
  display: block; height: 100%; border-radius: 3px;
  background: #fff; transition: width 0.3s ease;
}
@media (max-width: 640px) {
  .course-banner { height: 170px; font-size: 2.2rem; }
  .course-banner .cb-title { font-size: 1.15rem; }
  .course-banner .cb-stats { font-size: 0.72rem; gap: 0.3rem 0.7rem; }
}

/* ---- modern lesson cards ---- */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.9rem;
  margin: 0.4rem 0 0.6rem;
}
.lcard {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.lcard:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -16px rgba(23,38,62,0.38);
  border-color: rgba(30,79,143,0.35);
}
@media (prefers-reduced-motion: reduce) { .lcard:hover { transform: none; } }
.lcard.current { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(30,79,143,0.22); }
.lcard.done .lc-thumb::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: var(--success);
}
.lcard.locked { opacity: 0.62; }
.lcard.prem { border-color: #d9b45c; }
.lc-thumb {
  position: relative;
  height: 108px; flex: none;
  background-size: cover; background-position: center;
  display: grid; place-items: center;
  font-size: 2rem; color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
/* type-colored placeholders when no image is uploaded
   (background-image only, so an uploaded cover — set inline — always
    wins and keeps the cover/center sizing; unknown types get slate;
    also colors the small admin thumbnails) */
.lc-thumb, .adm-thumb   { background-image: linear-gradient(135deg, #475569, #94a3b8); }
.lc-thumb.lk-html,       .adm-thumb.lk-html       { background-image: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.lc-thumb.lk-link,       .adm-thumb.lk-link       { background-image: linear-gradient(135deg, #334155, #64748b); }
.lc-thumb.lk-quiz,       .adm-thumb.lk-quiz       { background-image: linear-gradient(135deg, #15803d, #4ade80); }
.lc-thumb.lk-pdf,        .adm-thumb.lk-pdf        { background-image: linear-gradient(135deg, #b91c1c, #ef4444); }
.lc-thumb.lk-video,      .adm-thumb.lk-video      { background-image: linear-gradient(135deg, #6d28d9, #a78bfa); }
.lc-thumb.lk-audio,      .adm-thumb.lk-audio      { background-image: linear-gradient(135deg, #0f766e, #2dd4bf); }
.lc-thumb.lk-word,       .adm-thumb.lk-word       { background-image: linear-gradient(135deg, #1e40af, #60a5fa); }
.lc-thumb.lk-powerpoint, .adm-thumb.lk-powerpoint { background-image: linear-gradient(135deg, #c2410c, #fb923c); }
.lc-thumb.lk-excel,      .adm-thumb.lk-excel      { background-image: linear-gradient(135deg, #166534, #4ade80); }
.lc-thumb.lk-image,      .adm-thumb.lk-image      { background-image: linear-gradient(135deg, #b45309, #fbbf24); }
.lc-thumb.lk-text,       .adm-thumb.lk-text,
.lc-thumb.lk-file,       .adm-thumb.lk-file       { background-image: linear-gradient(135deg, #475569, #94a3b8); }
.lc-num {
  position: absolute; top: 0.5rem; left: 0.5rem;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--ink);
  display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800; text-shadow: none;
}
.lc-num.n-done { background: var(--success); color: #fff; }
.lc-num.n-current { background: var(--accent); color: #fff; }
.lc-state {
  position: absolute; top: 0.5rem; right: 0.5rem;
  font-size: 0.9rem; line-height: 1;
  background: rgba(255,255,255,0.92); color: var(--success);
  border-radius: 999px; padding: 0.22rem 0.45rem;
  font-weight: 800; text-shadow: none;
}
.lc-state.s-lock { color: #a16207; }
.lc-body { padding: 0.65rem 0.8rem 0.5rem; flex: 1; min-width: 0; }
.lc-title {
  font-weight: 700; font-size: 0.92rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.lc-kind {
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted); margin-top: 0.25rem; display: block;
}
.lc-foot {
  display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
  padding: 0 0.8rem 0.7rem;
}
.lc-foot button, .lc-foot a.btn {
  padding: 0.4rem 0.75rem; font-size: 0.82rem; min-height: 0;
}
.lc-prem-btn {
  background: linear-gradient(135deg, #fde68a, #d9a53c) !important;
  border-color: #d9a53c !important; color: #713f12 !important;
  font-weight: 800;
}
@media (max-width: 640px) {
  .lesson-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.6rem; }
  .lc-thumb { height: 84px; font-size: 1.6rem; }
}

/* ---- collapsible course cards (Phase 9) ---- */
.course-toggle {
  width: 100%;
  display: flex; align-items: center; gap: 0.5rem;
  background: none; border: none;
  color: var(--muted); font-weight: 600; font-size: 0.88rem;
  padding: 0.1rem 0 0.6rem; cursor: pointer; min-height: 0;
}
.course-toggle:hover { background: none; color: var(--accent-ink); }
.course-toggle .chev { transition: transform 0.25s ease; color: var(--accent); flex: none; }
.course-card:not(.collapsed) .course-toggle .chev { transform: rotate(90deg); }
.course-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.3s ease; }
.course-card.collapsed .course-body { grid-template-rows: 0fr; }
.course-body > div { overflow: hidden; }

/* collapsed course = one compact strip, so many courses read as a list */
.course-banner { transition: height 0.3s ease; }
.course-card.collapsed .course-banner { height: 64px; margin-bottom: 0.35rem; cursor: pointer; }
.course-card.collapsed .cb-bg { font-size: 1.5rem; }
.course-card.collapsed .cb-shade {
  background: linear-gradient(90deg, rgba(15,23,42,0.72) 0%, rgba(15,23,42,0.35) 60%, rgba(15,23,42,0.15) 100%);
}
.course-card.collapsed .cb-info { bottom: 50%; transform: translateY(50%); }
.course-card.collapsed .cb-title { font-size: 1.05rem; text-shadow: 0 1px 6px rgba(0,0,0,0.55); }
.course-card.collapsed .cb-stats,
.course-card.collapsed .cb-bar,
.course-card.collapsed .cb-tag { display: none; }
.course-card.collapsed .cb-prem { top: 50%; transform: translateY(-50%); right: 0.8rem; }
@media (max-width: 640px) {
  .course-card.collapsed .course-banner { height: 56px; }
  .course-card.collapsed .cb-title { font-size: 0.95rem; }
}

/* ---- HSK level pills (same palette as the Reading Hub) ---- */
.hsk-pill {
  font-size: 0.72rem; font-weight: 800;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  white-space: nowrap; flex: none;
}
.hsk-1 { background: #e2f4e9; color: #178a4c; }
.hsk-2 { background: #e4edfb; color: #1d5fc2; }
.hsk-3 { background: #faf3d0; color: #9a7b00; }
.hsk-4 { background: #fdeadc; color: #c05600; }
.hsk-5 { background: #fde3e3; color: #c62f2f; }
.hsk-6 { background: #f1e5fb; color: #7c3aad; }
:root[data-theme="dark"] .hsk-1 { background: #173226; color: #4cc98a; }
:root[data-theme="dark"] .hsk-2 { background: #1c2b47; color: #6ea8ff; }
:root[data-theme="dark"] .hsk-3 { background: #33301a; color: #e8c74a; }
:root[data-theme="dark"] .hsk-4 { background: #38281c; color: #ffa05e; }
:root[data-theme="dark"] .hsk-5 { background: #3a2020; color: #ff7b7b; }
:root[data-theme="dark"] .hsk-6 { background: #30203f; color: #cfa0f0; }

/* ---- admin lesson thumbnails ---- */
.adm-thumb {
  width: 58px; height: 34px; border-radius: 6px; flex: none;
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 1rem;
  color: rgba(255,255,255,0.95);
}

/* ============================================================
   PHASE 8 — dark mode
   Activated by <html data-theme="dark"> (set by a tiny script in
   each page's head: saved choice first, otherwise the device's
   own light/dark preference).
   ============================================================ */
:root[data-theme="dark"] {
  --paper:  #0f1725;
  --card:   #172233;
  --ink:    #e7edf8;
  --muted:  #97a4bb;
  --line:   #2a3650;
  --accent: #3d78c8;
  --accent-ink: #9dbfe8;
  --gold:   #d9ab5c;
  --danger: #e07a5f;
  --success:    #4ec98a;
  --success-bg: rgba(78,201,138,0.14);
  --warning:    #e0a35c;
  --warning-bg: rgba(224,163,92,0.12);
  --info-bg:    rgba(61,120,200,0.16);
  --prem:       #e8c477;
  --prem-bg:    linear-gradient(135deg, #3a2f14, #57431c);
  --prem-row:   rgba(217,171,92,0.10);
  --teacher:    #b79df1;
}
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .stat { box-shadow: none; }
:root[data-theme="dark"] button.ghost:hover { background: rgba(120,160,220,0.12); }
:root[data-theme="dark"] .pill.done { background: rgba(78,201,138,0.14); color: var(--success); }
:root[data-theme="dark"] .cred-badge { color: #e3b95c; background: rgba(217,171,92,0.12); }
:root[data-theme="dark"] .search-results { box-shadow: 0 14px 34px -14px rgba(0,0,0,0.7); }
:root[data-theme="dark"] .mb-free { background: rgba(96,148,220,0.16); color: #9dbfe8; border-color: rgba(96,148,220,0.4); }
:root[data-theme="dark"] .mb-premium { color: var(--prem); }
:root[data-theme="dark"] .mb-teacher-prem { color: #c9aef5; }
:root[data-theme="dark"] .lp-quote { background: #1c1710; border-color: #3a2f1a; }
:root[data-theme="dark"] .lp-quote .vi { color: #e3b95c; }
:root[data-theme="dark"] .cb-tag { background: rgba(23,38,62,0.85); color: #e7edf8; }
/* the certificate always prints on cream paper */
:root[data-theme="dark"] .cert { color: #17263e; }

/* theme toggle button in the topbar / landing header */
.theme-btn { padding: 0.45rem 0.6rem !important; min-width: 0; line-height: 1; }

/* ============================================================
   PHASE 9 — left sidebar navigation
   The body gets .sb-nav when UI.initNav runs; content shifts
   right, the sidebar is fixed. .sb-min = collapsed to icons.
   On phones the sidebar becomes an off-canvas drawer (.sb-open).
   ============================================================ */
.topbar { position: static; }
body.sb-nav { padding-left: 232px; transition: padding-left 0.25s ease; }
body.sb-nav.sb-min { padding-left: 64px; }
#subnav {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 80;
  width: 232px;
  background: #111c2e; color: #c3cfe2;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.07);
  transition: width 0.25s ease, transform 0.25s ease;
  overflow-y: auto; overflow-x: hidden;
}
body.sb-min #subnav { width: 64px; }
.sn-head { display: flex; align-items: center; gap: 0.55rem; padding: 0.9rem 0.8rem 0.6rem; flex: none; }
.sn-head img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.sn-name { font-family: var(--serif); font-weight: 700; color: #fff; font-size: 1.02rem; flex: 1; white-space: nowrap; }
.sn-min {
  background: none; border: 1px solid rgba(255,255,255,0.22); color: #c3cfe2;
  border-radius: 7px; padding: 0.1rem 0.45rem; min-height: 0; cursor: pointer;
  font-size: 0.85rem; flex: none;
}
.sn-min:hover { background: rgba(255,255,255,0.1); }
.sn-items { display: flex; flex-direction: column; gap: 2px; padding: 0.4rem 0.55rem 1.2rem; flex: 1; }
.sn-group {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: #66799a;
  padding: 0.95rem 0.55rem 0.3rem; white-space: nowrap;
}
.sn-item {
  display: flex; align-items: center; gap: 0.6rem;
  background: none; border: none; color: #b9c6dc;
  font-weight: 600; font-size: 0.89rem; text-align: left;
  padding: 0.52rem 0.6rem; border-radius: 9px;
  cursor: pointer; white-space: nowrap; text-decoration: none; min-height: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.sn-item i[data-lucide], .sn-item svg.lucide { flex: none; }
.sn-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sn-item.on { background: var(--accent); color: #fff; }
.sn-item.sn-action { border: 1px dashed rgba(255,255,255,0.28); color: #e3b95c; }
body.sb-min .sn-name, body.sb-min .sn-item span, body.sb-min .sn-group { display: none; }
body.sb-min .sn-head { flex-direction: column; padding: 0.8rem 0 0.4rem; gap: 0.5rem; }
body.sb-min .sn-items { padding: 0.4rem 0.5rem 1rem; }
body.sb-min .sn-item { justify-content: center; padding: 0.6rem 0; }
body.sb-nav .topbar .brand { display: none; }
body.sb-nav .topbar { justify-content: flex-end; }
.sn-burger {
  display: none; background: none; border: none; color: #fff;
  font-size: 1.35rem; padding: 0 0.6rem 0 0; min-height: 0; cursor: pointer;
}
.sn-backdrop { display: none; position: fixed; inset: 0; background: rgba(10,16,28,0.55); z-index: 75; }
@media (max-width: 768px) {
  body.sb-nav, body.sb-nav.sb-min { padding-left: 0; }
  #subnav { transform: translateX(-102%); width: 250px !important; }
  body.sb-open #subnav { transform: none; box-shadow: 24px 0 60px -30px rgba(0,0,0,0.65); }
  body.sb-open .sn-backdrop { display: block; }
  /* the drawer always shows full labels, even if desktop was collapsed */
  body.sb-min .sn-name, body.sb-min .sn-item span, body.sb-min .sn-group { display: initial; }
  body.sb-min .sn-head { flex-direction: row; padding: 0.9rem 0.8rem 0.6rem; }
  body.sb-min .sn-item { justify-content: flex-start; padding: 0.52rem 0.6rem; }
  .sn-min { display: none; }
  .sn-burger { display: inline-flex; }
  body.sb-nav .topbar { justify-content: space-between; }
  body.sb-nav .topbar .brand { display: inline-flex; }
}
@media print {
  #subnav, .sn-burger, .sn-backdrop { display: none !important; }
  body.sb-nav, body.sb-nav.sb-min { padding-left: 0; }
}
