/* Courses + Quest Path pages. Uses the colours/fonts of styles.css. */
main.cat { display: block; max-width: 1180px; margin: 0 auto; padding: 12px 16px 30px; }
.cat nav.sitenav, nav.sitenav { text-align: center; margin: 6px 0; font-size: 18px; }
nav.sitenav a { display: inline-block; min-height: 44px; line-height: 44px; padding: 0 12px; color: #3a5a99; }
nav.sitenav a[aria-current] { font-weight: bold; text-decoration: none; }
.cat .filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.cat .filters select, .cat .filters input { font-family: inherit; font-size: 18px; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 2px solid #cfd8e6; box-sizing: border-box; max-width: 100%; }
.cat .filters input { width: 280px; }
.cat h2.grade { color: #3a5a99; margin: 22px 0 8px; }
.cat h3.subj { margin: 12px 0 6px; color: #2a4a7a; font-size: 20px; }
.cat .clist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cat .course { background: #fff; border-radius: 14px; box-shadow: 0 4px 0 #e8dcc0; padding: 12px 14px; scroll-margin-top: 12px; }
.cat .course:target { outline: 4px solid #e0a800; }
.cat .course .code { font-size: 14px; color: #666; font-family: ui-monospace, monospace; }
.cat .course h4 { margin: 2px 0 4px; font-size: 19px; }
.cat .course p { margin: 0 0 6px; font-size: 16px; }
.cat .needs { font-size: 15px; color: #666; }
.chip { display: inline-block; font-size: 14px; padding: 2px 8px; margin: 2px 2px 0 0; border-radius: 10px; background: #eef3fb; color: #2a4a7a; text-decoration: none; border: 1px solid #cfd8e6; }
.chip.cross { background: #fff1c9; border-color: #e0a800; }
.cat .count { font-size: 16px; color: #666; }
/* Quest Path: rows = grades, columns = subjects */
.qp-wrap { overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; height: auto; max-height: none; -webkit-overflow-scrolling: touch; max-width: 100%; }
/* Top horizontal scrollbar for the Quest Path, kept in sync with .qp-wrap (js/quest-page.js); hidden when nothing scrolls. */
.qp-top { overflow-x: auto; overflow-y: hidden; height: 16px; max-width: 100%; margin-bottom: 4px; }
.qp-top[hidden] { display: none; }
.qp-top > div { height: 1px; }
.qp { display: grid; gap: 6px; min-width: max-content; }
.qp .hd { position: sticky; top: 0; background: #fff8e7; font-weight: bold; color: #2a4a7a; font-size: 15px; padding: 4px; text-align: center; width: 190px; z-index: 1; }
.qp .gl { font-weight: bold; color: #3a5a99; font-size: 15px; padding: 6px 4px; position: sticky; left: 0; background: #fff8e7; z-index: 1; width: 92px; }
.qp .cell { width: 190px; position: relative; }
.qp .cell.on::before { content: ""; position: absolute; left: 50%; top: -6px; bottom: -6px; border-left: 3px dotted #cfd8e6; z-index: 0; }
.qp a.node { position: relative; z-index: 1; display: block; background: #fff; border-radius: 12px; box-shadow: 0 3px 0 #e8dcc0; padding: 6px 8px; color: #2b2b2b; text-decoration: none; font-size: 14px; line-height: 1.3; border: 2px solid #3a7bd5; }
.qp a.node:hover, .qp a.node:focus-visible { background: #eef3fb; }
.qp a.node .code { display: block; font-size: 12px; color: #666; font-family: ui-monospace, monospace; }
.qp .node .chip { font-size: 12px; padding: 0 6px; }
.qp .key { font-size: 15px; }
@media (max-width: 640px) {
  .qp .hd, .qp .cell { width: calc(100vw - 140px); }
  .qp .gl { width: 70px; font-size: 14px; }
  .qp a.node { font-size: 15px; }
  .cat .filters input { width: 100%; }
  .cat .clist { grid-template-columns: 1fr; }
}
h1 a.home { color: inherit; text-decoration: none; }
.cat .course h3.subj { margin: 0; font-size: 15px; }
.cat .viewnav { font-size: 18px; margin: 0 0 12px; }
.cat .viewnav a { display: inline-block; min-height: 44px; line-height: 44px; color: #3a5a99; }
#path-view { margin-top: 30px; scroll-margin-top: 8px; }
.cat .course a.play { display: inline-block; min-height: 44px; line-height: 44px; color: #2e7d32; font-weight: bold; }

.cat .course .objectives h5 { margin: 6px 0 2px; font-size: 16px; color: #2a4a7a; }
.cat .course .objectives ol { margin: 0 0 6px; padding-inline-start: 22px; font-size: 15px; }
.readings h5 { margin: 6px 0 2px; font-size: 16px; color: #2a4a7a; }
.readings .rl-h { margin: 2px 0; font-weight: bold; font-size: 14px; color: #555; }
.readings ul { margin: 0 0 6px; padding-inline-start: 20px; font-size: 15px; }
.rl-pd { background: #fff1c9; border: 1px solid #e0a800; border-radius: 8px; padding: 0 6px; }
.rl-alt { margin: 2px 0 4px; color: #2a5a2a; }
