/* CHW Academy add-on styles (loaded after styles.css). Course colors come from the content package. */
.centered { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.centered { max-width: 820px; }
.chw-hero .hero-grid { grid-template-columns: 1.3fr .7fr; }
.crumb, .crumbs { font-size: .9rem; font-weight: 700; display: inline-block; margin-bottom: 10px; }
.crumbs span { color: var(--ink-soft); margin: 0 6px; }
.chw-stats .stat { border-top: 6px solid var(--sc); }
.chw-stats .stat b { color: var(--sc); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1d2a2f; }
.btn.gold:hover { background: #e6a400; border-color: #e6a400; color: #1d2a2f; }
.btn.ghost.light { color: #fff; border-color: rgba(255,255,255,.6); }
.btn.ghost.light:hover { background: rgba(255,255,255,.12); color: #fff; }
.small-btn { padding: 8px 14px; font-size: .9rem; margin-top: 8px; }
.tint-teal { background: var(--teal-tint); border-color: transparent; }
.tint-gold { background: var(--gold-tint); border-color: transparent; }
.tint-clay { background: var(--clay-tint); border-color: transparent; }
.tint-leaf { background: var(--leaf-tint); border-color: transparent; }
.tint-plum { background: var(--plum-tint); border-color: transparent; }
.tint-c { background: color-mix(in srgb, var(--cc) 10%, #fff); border-color: transparent; border-top: 6px solid var(--cc); }
.pubs.two-col { columns: 2; column-gap: 32px; }
.pubs.two-col li { break-inside: avoid; padding: 8px 0; }
@media (max-width: 760px) { .pubs.two-col { columns: 1; } }
.build { display: block; margin-top: 6px; opacity: .7; }

/* Pathway cards */
.pw-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1080px) { .pw-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .pw-grid { grid-template-columns: 1fr; } }
.pw-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.pw-card:hover { transform: translateY(-3px); color: inherit; }
.pw-head { background: var(--pc); color: #fff; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 128px; }
.pw-head h3 { color: #fff; font-size: 1.15rem; margin: 0; }
.pw-letter { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.22); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.pw-card p { padding: 14px 18px 0; font-size: .95rem; color: var(--ink-soft); flex: 1; margin: 0; }
.pw-card .more { padding: 12px 18px 18px; color: var(--pc); }
.pw-hero { border-top: 8px solid var(--pc); }
.pw-hero .eyebrow { color: var(--pc); }
.pw-hero .btn { background: var(--pc); border-color: var(--pc); }
.pw-hero .btn.ghost { background: transparent; color: var(--pc); }
.pw-mini-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pw-mini { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--paper); border: 2px solid var(--pc); color: var(--ink); text-decoration: none; font-weight: 700; }
.pw-mini .pw-letter { background: var(--pc); width: 32px; height: 32px; font-size: 1rem; }
.pw-mini:hover { background: var(--pc); color: #fff; }
.share-row, .finish-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .share-row, .finish-row { grid-template-columns: repeat(2, 1fr); } }
.share, .finish { text-align: center; padding: 16px 10px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.share b, .finish b { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--teal); line-height: 1.1; }
.share span, .finish span { font-size: .9rem; color: var(--ink-soft); }
.finish-row { margin-top: 20px; }
.finish:nth-child(1) b { color: #0a7cc2; } .finish:nth-child(2) b { color: #f2542d; } .finish:nth-child(3) b { color: #1fa463; } .finish:nth-child(4) b { color: #e08f00; }

/* Course tiles */
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.course-grid.vi { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.course { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.course-head { background: var(--cc); color: #fff; padding: 16px 18px; }
.course-head .code { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.course-head h3 { color: #fff; margin: 4px 0 2px; font-size: 1.2rem; }
.course-head .hrs { font-size: .88rem; opacity: .92; }
.course-head .lock { display: inline-block; margin-top: 8px; background: rgba(0,0,0,.25); padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.course-body { padding: 16px 18px 18px; }
.course-body .lbl { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cc); margin-bottom: 6px; }
.course-body .check li::before { background: var(--cc); }
.course-body details { margin-top: 10px; }
.course-body summary, .docs-more summary, .instr summary { cursor: pointer; font-weight: 700; color: var(--cc, var(--teal)); }
.modlist { list-style: none; padding: 0; margin: 10px 0 0; }
.modlist li { margin: 0; }
.modlist a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .95rem; }
.modlist a:hover { background: color-mix(in srgb, var(--cc) 10%, #fff); }
.mc { display: inline-block; min-width: 58px; text-align: center; font-size: .75rem; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 6px; background: var(--cc, var(--teal)); color: #fff; }
.mc.big { font-size: 1rem; vertical-align: middle; padding: 4px 12px; margin-right: 6px; background: var(--cc); }
.course.learn { margin-bottom: 22px; }
.modlist.big { padding: 6px 10px 10px; }
.modlist.big a { padding: 10px 10px; border-bottom: 1px solid var(--line); border-radius: 0; }
.modlist.big li:last-child a { border-bottom: 0; }
.modlist.big .mt { flex: 1; font-weight: 600; }
.modlist.big .mh { font-size: .85rem; color: var(--ink-soft); white-space: nowrap; }
.modlist.big .done { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.modlist.big li.passed .done { background: #1fa463; border-color: #1fa463; position: relative; }
.modlist.big li.passed .done::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.modtable .mc { min-width: 70px; }
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.dl { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--teal-tint); color: var(--teal-deep); font-weight: 700; font-size: .9rem; text-decoration: none; }
.dl:hover { background: var(--teal); color: #fff; }
.card.doc h3 { font-size: 1.1rem; }
.docs-more { margin-top: 20px; }

/* Lesson pages */
.mod-hero { border-top: 8px solid var(--cc); }
.mod-hero .eyebrow { color: var(--cc); }
.mod-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mod-meta span { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .88rem; font-weight: 600; }
.mod-meta .lock { background: var(--clay); color: #fff; border-color: var(--clay); }
.mod-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .mod-top { grid-template-columns: 1fr; } }
.hookcard { border-left: 6px solid var(--cc); }
.hookcard .hook { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.15rem; font-style: normal; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; justify-content: center; }
.jump a { text-decoration: none; font-weight: 700; font-size: .9rem; padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.jump a:hover { background: var(--teal-tint); }
.sect-h { text-align: center; margin-bottom: 28px; position: relative; }
.sect-h::after { content: ""; display: block; width: 72px; height: 5px; background: var(--cc); margin: 10px auto 0; border-radius: 3px; }
.lesson { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .lesson { grid-template-columns: 1fr; } }
.lesson-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.lesson-card h3 { font-size: 1.15rem; margin-bottom: .5em; }
.lesson-card p:last-child, .lesson-card ul:last-child, .lesson-card ol:last-child { margin-bottom: 0; }
.lesson-card .table-wrap { margin: 8px 0; }
.lesson-card table { font-size: .92rem; } .lesson-card th, .lesson-card td { padding: 8px 10px; }
ul.md, ol.md { padding-left: 22px; margin: 0 0 .8em; }
ul.md li, ol.md li { margin-bottom: .35em; }
.src { font-size: .85rem; color: var(--ink-soft); }
.study { max-width: 860px; margin: 0 auto; }
.study p b:first-child { color: var(--teal-deep); }
.sit .lesson-card { border-left: 5px solid var(--gold); }
blockquote.hook { margin: 0 0 .8em; padding: 0; }
.sources ul.md { columns: 2; column-gap: 32px; list-style: none; padding: 0; }
.sources ul.md li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .sources ul.md { columns: 1; } }
.prevnext { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
@media (max-width: 760px) { .prevnext { grid-template-columns: 1fr; } }
.pn { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.pn span { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); font-weight: 700; }
.pn.next { text-align: right; } .pn.mid { text-align: center; justify-content: center; }
.pn:hover { border-color: var(--teal); color: var(--teal-deep); }

/* Quiz */
.quiz { max-width: 820px; margin: 0 auto; }
.q { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.q p.qt { font-weight: 700; margin-bottom: 10px; }
.q label { display: block; padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.q label:hover { background: var(--teal-tint); }
.q input { margin-right: 8px; }
.q.right { border-color: #1fa463; } .q.wrong { border-color: #B42318; }
.q .why { margin: 8px 0 0; font-size: .92rem; padding: 8px 10px; border-radius: 8px; background: var(--gold-tint); }
.q.right .why { background: #dcf7e8; } .q.wrong .why { background: #fbe7e4; }
.q label.correct { background: #dcf7e8; border-color: #1fa463; }
.q label.chosen.incorrect { background: #fbe7e4; border-color: #B42318; }
.quiz-result { text-align: center; padding: 20px; border-radius: var(--radius); margin: 10px 0 18px; font-weight: 700; font-size: 1.1rem; }
.quiz-result.pass { background: #dcf7e8; color: #146c43; } .quiz-result.fail { background: #fbe7e4; color: #7d2418; } .quiz-result.info { background: var(--teal-tint); color: var(--teal-deep); }
.quiz-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Gate */
.gate[hidden], #portal[hidden] { display: none; }
.gate { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.gate-box { max-width: 520px; width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.gate-box .form button { justify-self: start; }
