.academy-shell-header {
  position: relative;
  z-index: 10002;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 48px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border, var(--border-light, #334155));
  background: var(--bg, var(--bg-primary, #0d1117));
  color: var(--text-secondary, var(--text-dim, #94a3b8));
  font: 500 12px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.academy-shell-header a, .academy-shell-footer a { color: inherit; text-decoration: none; }
.academy-shell-header a:hover, .academy-shell-footer a:hover { color: var(--accent, #58a6ff); }
.academy-shell-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-light, #334155);
  color: var(--text, var(--text-primary, #e6edf3)) !important;
  font: 400 17px/1 Georgia, serif;
}
.academy-shell-all { white-space: nowrap; }
.academy-shell-track { min-width: 0; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.academy-shell-track span { opacity: 0.65; }
.academy-shell-track a { color: var(--text, var(--text-primary, #e6edf3)); }
.academy-shell-ask { color: var(--accent, #58a6ff) !important; white-space: nowrap; }
.academy-shell-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto 40px;
  padding: 24px;
  border: 1px solid var(--border, var(--border-light, #334155));
  background: var(--bg-secondary, var(--bg-card, #111827));
  color: var(--text-secondary, var(--text-dim, #94a3b8));
  font: 400 14px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.academy-shell-footer-label { display: block; margin-bottom: 5px; color: var(--accent, #58a6ff); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.academy-shell-footer-title { color: var(--text, var(--text-primary, #e6edf3)); }
.academy-shell-footer-action { flex-shrink: 0; color: var(--accent, #58a6ff) !important; white-space: nowrap; }
/* --academy-shell-offset is the visible height of the header (academy-shell.js).
   These pages put the progress bar at the top and their fixed nav 4px below it. */
.academy-has-shell .top-nav { top: calc(var(--academy-shell-offset, 48px) + 4px) !important; }
.academy-has-shell #progress-bar-container { top: var(--academy-shell-offset, 48px) !important; }
html[data-cf-theme="light"] .academy-shell-header { background: #fff; color: #57606a; }
html[data-cf-theme="light"] .academy-shell-footer { background: #f6f8fa; }
@media (max-width: 640px) {
  .academy-shell-header { flex-wrap: wrap; gap: 8px 14px; padding: 8px 14px; }
  .academy-shell-track { order: 3; flex-basis: 100%; }
  .academy-shell-ask { margin-left: auto; }
  .academy-shell-footer { align-items: flex-start; flex-direction: column; margin: 0 16px 28px; padding: 20px; }
}
@media print { .academy-shell-header, .academy-shell-footer { display: none; } }
