/* course.css — module-viewer styles for courses.html.
   Scoped under .course-shell so nothing leaks into the shared site system (site.css).
   Uses site.css :root tokens; defines no colours of its own. */

/* top padding clears the fixed site nav (65px) from site.css */
.course-shell { max-width: 820px; margin: 0 auto; padding: 89px 16px 40px; }

.course-shell .course-head { text-align: center; padding: 30px 20px 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.course-shell .course-head h1 {
  font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.1rem); margin-bottom: 8px;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.course-shell .course-head p { color: var(--grey); font-size: .95rem; }

.mod-nav { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; margin-bottom: 20px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.mod-nav::-webkit-scrollbar { display: none; }
.mod-btn {
  flex-shrink: 0; padding: 10px 16px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; color: var(--grey); font-family: var(--sans); font-size: .85rem; cursor: pointer;
  white-space: nowrap; transition: background .2s, color .2s, border-color .2s;
}
.mod-btn:hover, .mod-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.mod-btn.free { border-color: var(--blue-bright); }
.mod-btn.free:hover, .mod-btn.free.active { background: var(--blue-bright); color: var(--bg); }

.module { display: none; }
.module.active { display: block; }

.module .mod-title { font-family: var(--display); font-size: 1.6rem; margin: 30px 0 15px; color: var(--blue-bright); border-bottom: none; padding-bottom: 0; }
.module h2 { font-family: var(--display); font-size: 1.3rem; margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--white); }
.module h3 { font-size: 1.1rem; margin: 22px 0 10px; color: var(--blue); }
.module h4 { font-size: 1rem; margin: 18px 0 8px; color: var(--grey); }
.module p { margin: 12px 0; font-size: 1rem; }
.module strong { color: #fff; }
.module em { color: var(--blue-bright); font-style: normal; }
.module code { background: var(--panel2); padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: .9rem; color: var(--blue-bright); }
.module hr { border: none; border-top: 1px solid var(--line); margin: 25px 0; }
.module a { color: var(--blue); text-decoration: none; }
.module a:hover { text-decoration: underline; }
.module ul, .module ol { margin: 12px 0 12px 20px; }
.module li { margin: 6px 0; font-size: .95rem; }

.table-wrapper { overflow-x: auto; margin: 15px 0; -webkit-overflow-scrolling: touch; }
.table-wrapper table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 300px; }
.table-wrapper th, .table-wrapper td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table-wrapper th { background: var(--panel2); color: var(--blue-bright); font-weight: 600; white-space: nowrap; }
.table-wrapper tr:hover { background: rgba(47, 128, 237, .06); }

.bottom-nav { display: flex; justify-content: space-between; padding: 20px 0; margin-top: 30px; border-top: 1px solid var(--line); }
.bottom-nav button {
  padding: 12px 20px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; color: var(--white); font-family: var(--sans); font-size: .9rem; cursor: pointer;
}
.bottom-nav button:hover { background: var(--blue); color: #fff; }
.bottom-nav button:disabled { opacity: .3; cursor: default; }

.course-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--grad); transition: width .3s; z-index: 100; }

.cta-box {
  background: linear-gradient(135deg, var(--panel2), var(--panel));
  border: 1px solid var(--blue); border-radius: 12px; padding: 24px; margin: 30px 0; text-align: center;
}
.cta-box h3 { font-family: var(--display); color: var(--blue-bright); margin: 0 0 10px; }
.cta-box a { display: inline-block; margin-top: 12px; padding: 12px 28px; background: var(--blue); color: #fff; border-radius: 8px; font-weight: 600; text-decoration: none; }
.cta-box a:hover { background: var(--blue-deep); }

@media (prefers-reduced-motion: reduce) {
  .course-progress, .mod-btn, .bottom-nav button { transition: none; }
}
