/* Free courses: the hub (/courses/), course pages and lesson pages. Same dark design and tokens as site.css. */
:root { --mono: ui-monospace, "Cascadia Code", "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace }

/* ---------- shared pieces ---------- */
.chip.amber .dot { background: var(--amber-2); box-shadow: 0 0 12px var(--amber-2) }
.cc-tag, .badge-soon { display: inline-block; font: 700 11.5px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; padding: 7px 11px; border-radius: 999px; background: rgba(245, 158, 11, .15); color: var(--amber-2); border: 1px solid rgba(245, 158, 11, .35) }
.cc-tag.open { background: rgba(20, 184, 166, .14); color: var(--teal-2); border-color: rgba(45, 212, 191, .38) }
.badge-soon { margin-bottom: 14px }

/* lesson rows (course curriculum and the lesson page's side list) */
.lrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 12px; color: #dbe4ef; font-size: 14.5px; line-height: 1.35; transition: background .25s, color .25s }
a.lrow:hover { background: rgba(45, 212, 191, .09); color: #fff }
.lrow .ln { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 700 12.5px/1 var(--head); background: rgba(20, 184, 166, .14); color: var(--teal-2); border: 1px solid rgba(45, 212, 191, .3) }
.lrow b { display: block; font-weight: 600; color: inherit }
.lrow small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px }
.lrow i { display: grid; place-items: center; color: var(--teal-2); opacity: .55; transition: opacity .25s, transform .25s }
.lrow i svg { width: 14px; height: 14px }
a.lrow:hover i { opacity: 1; transform: translateX(2px) }
.lrow.on { background: rgba(245, 158, 11, .12); color: #fff }
.lrow.on .ln { background: var(--amber); color: var(--ink); border-color: var(--amber) }
.lrow.on small { color: var(--amber-2) }
.lrow.soon { grid-template-columns: 34px minmax(0, 1fr); color: #8fa1b8 }
.lrow.soon .ln { background: rgba(255, 255, 255, .04); color: #74859c; border-color: var(--line) }
.lrow.soon small { color: #74859c }

/* lesson cards (video thumbnails) */
.lesson-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px }
.lesson-card { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text); transition: transform .45s var(--ease), border-color .3s, box-shadow .45s }
.lesson-card:hover { transform: translateY(-6px); border-color: rgba(45, 212, 191, .5); color: #fff; box-shadow: 0 30px 60px -30px rgba(20, 184, 166, .45) }
.lc-img { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--navy); overflow: hidden }
.lc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease) }
.lesson-card:hover .lc-img img { transform: scale(1.05) }
.lc-play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; display: grid; place-items: center; background: rgba(4, 11, 22, .72); border: 1px solid rgba(255, 255, 255, .35); color: #fff; backdrop-filter: blur(6px); opacity: 0; transform: scale(.8); transition: opacity .35s, transform .35s var(--ease) }
.lc-play svg { width: 22px; height: 22px; margin-left: 3px }
.lesson-card:hover .lc-play { opacity: 1; transform: none }
.lc-time { position: absolute; right: 10px; bottom: 10px; padding: 5px 8px; border-radius: 8px; background: rgba(2, 6, 17, .85); font: 600 12px/1 var(--head); color: #fff }
.lc-body { display: block; padding: 16px 18px 18px }
.lc-body small { display: block; font: 700 11.5px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--teal-2); margin-bottom: 9px }
.lc-body b { display: block; font: 600 1.02rem/1.35 var(--head); color: #fff }

/* course cards (hub "Coming soon", "Start learning while you wait") */
.course-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 980px; margin-inline: auto }
.course-cards.one { grid-template-columns: minmax(0, 480px); justify-content: center }
.course-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02)); border: 1px solid var(--line); color: var(--text); transition: transform .45s var(--ease), border-color .3s }
.course-card:hover { transform: translateY(-6px); border-color: rgba(45, 212, 191, .5); color: var(--text) }
.cc-img { display: block; aspect-ratio: 1200 / 630; background: var(--navy); overflow: hidden }
.cc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease) }
.course-card:hover .cc-img img { transform: scale(1.04) }
.cc-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px 24px 24px; flex: 1 }
.cc-body b { font: 600 1.3rem/1.25 var(--head); color: #fff }
.cc-ex { color: var(--muted); font-size: 15.5px; flex: 1 }
.cc-body .more { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--teal-2) }

/* hub: an open course, picture and facts side by side */
.course-features { display: grid; gap: 28px }
.course-feature { display: grid; grid-template-columns: 1.05fr 1fr; border-radius: 30px; overflow: hidden; border: 1px solid rgba(45, 212, 191, .3); background: linear-gradient(135deg, rgba(20, 184, 166, .13), rgba(11, 31, 58, .7)); box-shadow: var(--shadow) }
.cf-img { display: flex; align-items: center; background: #050d1b; overflow: hidden }
.cf-img img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; transition: transform .8s var(--ease) }
.course-feature:hover .cf-img img { transform: scale(1.03) }
.cf-body { padding: clamp(26px, 4vw, 48px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px }
.cf-body h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 14px 0 10px }
.cf-body h2 a { color: #fff }
.cf-body h2 a:hover { color: var(--teal-2) }
.cf-stats { list-style: none; padding: 0; margin: 14px 0 26px; display: flex; flex-wrap: wrap; gap: 12px }
.cf-stats li { padding: 12px 18px; border-radius: 16px; background: rgba(4, 11, 22, .45); border: 1px solid var(--line); min-width: 100px }
.cf-stats b { display: block; font: 700 1.6rem/1 var(--head); color: #fff; margin-bottom: 4px }
.cf-stats span { font-size: 13.5px; color: var(--muted) }

/* email sign-up for new lessons */
.notify .news { margin-top: 0 }
.notify .news input { padding: 13px 16px; border-radius: 14px; font-size: 15.5px }
.notify .form-note { margin-top: 10px }
.notify-band .notify { max-width: 560px; margin-top: 26px }
.notify-band .lead a { color: var(--teal-2); text-decoration: underline; text-underline-offset: 3px }

/* ---------- course page ---------- */
.course-facts .cf-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid rgba(45, 212, 191, .3); margin-bottom: 18px }
.course-facts .cf-icon svg { width: 34px; height: 34px }
.course-facts h3 { margin-bottom: 6px }
.fact { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line) }
.fact b { color: #fff; font-family: var(--head); font-weight: 600; text-align: right }
.card .when { font: 600 13px/1.4 var(--head); color: var(--teal-2); margin: -2px 0 10px }
.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: start }
.module { position: relative; padding: 26px 24px 22px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015)); border: 1px solid var(--line); overflow: hidden }
.module::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad) }
.module .mnum { display: block; font: 700 12.5px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--amber-2); margin-bottom: 10px }
.module h3 { font-size: 1.3rem; margin-bottom: 6px }
.module > p { color: var(--muted); font-size: 15.5px; margin-bottom: 14px }
.module .lrows { display: grid; gap: 2px; margin: 0 -10px }
.module .mproj { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14.5px; color: #cbd5e1 }
.module .mproj b { color: var(--amber-2) }

/* ---------- lesson page ---------- */
.lesson-hero { padding-bottom: 72px }
.lesson-head { max-width: 900px }
.lesson-hero h1 { font-size: clamp(2rem, 4.2vw, 3.3rem) }
.lesson-hero .lead { margin-bottom: 32px }
.player-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start }
.player-grid.solo { grid-template-columns: minmax(0, 1fr); max-width: 980px }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #020611; border: 1px solid rgba(45, 212, 191, .28); box-shadow: 0 40px 90px -40px rgba(20, 184, 166, .45), var(--shadow) }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0 }
.player.soon { display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted) }
.player.soon b { color: #fff; font-family: var(--head) }
.player-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px }
.player-meta .textlink { margin-left: auto; font-size: 15px }
.player-meta .textlink svg { width: 16px; height: 16px }
.chapters-panel { border-radius: 22px; background: rgba(7, 20, 39, .72); border: 1px solid var(--line); padding: 16px 8px 8px; max-height: calc((min(1200px, 100vw - 40px) - 344px) * .5625); overflow-y: auto; backdrop-filter: blur(10px) }
.chapters-panel > strong { display: block; font: 700 12px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--teal-2); padding: 0 10px 10px }
.chapters { list-style: none; margin: 0; padding: 0 }
.chapters a { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 9px 10px; border-radius: 12px; color: #dbe4ef; font-size: 14.5px; line-height: 1.4; transition: background .2s, color .2s }
.chapters a:hover, .chapters a.on { background: rgba(45, 212, 191, .1); color: #fff }
.chapters .ct { font: 600 13px/1.45 var(--head); color: var(--amber-2); font-variant-numeric: tabular-nums }

.lesson-body { padding-top: clamp(48px, 7vw, 80px) }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 56px; align-items: start }
.lesson-main { min-width: 0; display: grid; gap: 44px }
.lesson-main > * { min-width: 0 }
.learn h2 { font-size: 1.2rem; margin-bottom: 16px }
.learn .card:hover { transform: none }
.learn .ticks { gap: 10px; font-size: 15.5px; color: #cbd5e1 }
.lesson-block > h2, .lesson-notes h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); scroll-margin-top: 100px }
.lesson-block > .muted { margin-top: -6px }
.lesson-main .faq { max-width: none }

/* notes from the block editor (dark version of the article text) */
.lesson-notes { font-size: 17px; line-height: 1.75; color: #cbd5e1 }
.lesson-notes > :first-child { margin-top: 0 }
.lesson-notes h2 { margin: 1.9em 0 .6em }
.lesson-notes h3 { font-size: 1.25rem; margin: 1.6em 0 .5em }
.lesson-notes p { margin: 0 0 1em }
.lesson-notes a { color: var(--teal-2); text-decoration: underline; text-underline-offset: 3px }
.lesson-notes ul, .lesson-notes ol { padding-left: 1.3em; margin: 0 0 1.2em }
.lesson-notes li { margin: .35em 0 }
.lesson-notes li::marker { color: var(--teal-2) }
.lesson-notes strong { color: #fff }
.lesson-notes :not(pre) > code { font-family: var(--mono); font-size: .86em; padding: 2px 7px; border-radius: 7px; background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .2); color: #99f6e4; overflow-wrap: anywhere }
.lesson-notes table { width: 100%; border-collapse: collapse; margin: 1.1em 0 1.6em; font-size: 15px; display: block; overflow-x: auto }
.lesson-notes th, .lesson-notes td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top }
.lesson-notes th { background: rgba(255, 255, 255, .05); color: #fff; font-family: var(--head); font-weight: 600 }
.lesson-notes td { background: rgba(255, 255, 255, .015) }
.lesson-notes .wp-block-details { margin: 1.2em 0 0; border-radius: 18px; border: 1px solid rgba(45, 212, 191, .3); background: rgba(20, 184, 166, .06); padding: 0 20px }
.lesson-notes .wp-block-details > summary { cursor: pointer; padding: 16px 0; font: 600 16px/1.3 var(--head); color: #fff; list-style: none }
.lesson-notes .wp-block-details > summary::-webkit-details-marker { display: none }
.lesson-notes .wp-block-details > summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: rgba(45, 212, 191, .16); color: var(--teal-2); font-weight: 700 }
.lesson-notes .wp-block-details[open] > summary::before { content: "\2212" }
.lesson-notes .wp-block-details[open] { padding-bottom: 6px }

/* code samples */
.code-file { margin: 1.6em 0 0 !important; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 11px 16px; border-radius: 14px 14px 0 0; background: #0d1b30; border: 1px solid rgba(45, 212, 191, .22); border-bottom: 0; font-size: 14px; line-height: 1.45; color: var(--muted) }
.lesson-notes .code-file code { background: none; border: 0; padding: 0; color: var(--amber-2); font-weight: 600; font-size: 13.5px }
.code-wrap { position: relative; margin: 0 0 1.6em }
.wp-block-code { margin: 0 0 1.6em; padding: 18px 20px; border-radius: 14px; background: #020817; border: 1px solid rgba(45, 212, 191, .22); overflow-x: auto; font: 13.5px/1.7 var(--mono); color: #e2e8f0; tab-size: 2 }
.code-wrap .wp-block-code { margin: 0; padding-top: 22px }
.code-file + .wp-block-code, .code-file + .code-wrap .wp-block-code { border-radius: 0 0 14px 14px }
.wp-block-code code { font: inherit; white-space: pre; background: none; border: 0; padding: 0; color: inherit }
/* WordPress adds the code block's own CSS (wrapping lines) after this file: code scrolls sideways instead. */
.lesson-notes .wp-block-code code { white-space: pre; overflow-wrap: normal }
/* Code shows every character as typed: no programming ligatures (Cascadia Code draws "<!--" like a dash).
   This comes after the font shorthands above, which would reset it. */
.lesson-notes code, .wp-block-code, .wp-block-code code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0 }
.copy-btn { position: absolute; top: 10px; right: 10px; padding: 6px 11px; border-radius: 9px; border: 1px solid rgba(148, 163, 184, .3); background: rgba(13, 27, 48, .92); color: #cbd5e1; font: 600 12.5px/1 var(--head); cursor: pointer; opacity: .75; transition: opacity .2s, border-color .2s }
.code-wrap:hover .copy-btn, .copy-btn:focus-visible { opacity: 1 }
.copy-btn:hover { border-color: var(--teal-2); color: #fff }
.hl-t { color: #7dd3fc } .hl-a { color: #fbbf24 } .hl-s { color: #86efac } .hl-c { color: #64748b; font-style: italic }
.hl-p { color: #94a3b8 } .hl-k { color: #c4b5fd } .hl-n { color: #fda4af }

/* quick quiz */
.quiz { display: grid; gap: 16px }
.qz { padding: 24px; border-radius: 22px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line) }
.qq { font: 600 1.1rem/1.45 var(--head); color: #fff; margin: 0 0 16px }
.qq span { display: block; font: 700 12px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--amber-2); margin-bottom: 10px }
.qo { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px }
.qo button { width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; text-align: left; padding: 11px 14px; border-radius: 14px; border: 1px solid rgba(148, 163, 184, .28); background: rgba(4, 11, 22, .45); color: #e2e8f0; font: 500 15.5px/1.45 var(--body); cursor: pointer; transition: border-color .25s, background .25s }
.qo button b { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); font: 700 14px/1 var(--head); color: #cbd5e1 }
.qo button:hover:not(:disabled) { border-color: var(--teal-2); background: rgba(20, 184, 166, .08) }
.qo button:disabled { cursor: default }
.qo button.right { border-color: #34d399; background: rgba(16, 185, 129, .14); color: #fff }
.qo button.right b { background: #10b981; color: #04221f }
.qo button.wrong { border-color: #f87171; background: rgba(248, 113, 113, .12) }
.qo button.wrong b { background: #f87171; color: #2a0909 }
.qr { margin: 12px 0 0; font: 600 15px/1.4 var(--head) }
.qr:empty { display: none }
.qr.ok { color: #6ee7b7 } .qr.no { color: #fca5a5 }
.qa { margin-top: 12px }
.qa summary { cursor: pointer; display: inline-block; font-size: 14.5px; font-weight: 600; color: var(--teal-2) }
.qa p { margin: 10px 0 0; padding: 14px 16px; border-radius: 14px; background: rgba(20, 184, 166, .08); border: 1px solid rgba(45, 212, 191, .25); color: #cbd5e1; font-size: 15.5px }
.qa p strong { color: #fff }

/* transcript */
.transcript { border-radius: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03) }
.transcript > summary { cursor: pointer; list-style: none; padding: 18px 22px; font: 600 17px/1.3 var(--head); color: #fff; position: relative }
.transcript > summary::-webkit-details-marker { display: none }
.transcript > summary::after { content: "+"; position: absolute; right: 20px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: var(--teal-2); font-weight: 700 }
.transcript[open] > summary::after { content: "\2212" }
.transcript .tx { padding: 0 22px 20px; max-height: 560px; overflow-y: auto; color: #cbd5e1; font-size: 16px; line-height: 1.75 }
.tx h3 { display: flex; gap: 10px; align-items: baseline; font-size: 1.02rem; margin: 1.3em 0 .4em }
.tx h3 a { font: 600 13px/1 var(--head); color: var(--amber-2); font-variant-numeric: tabular-nums }
.tx p { margin: 0 0 .9em }

/* previous / next lesson */
.lesson-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px }
.lesson-pn > * { display: block; padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text) }
.lesson-pn a:hover { border-color: rgba(45, 212, 191, .5); color: #fff }
.lesson-pn small { display: block; font: 700 11.5px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--teal-2); margin-bottom: 9px }
.lesson-pn b { font: 600 1rem/1.35 var(--head); color: #fff }
.lesson-pn .next { grid-column: 2; text-align: right }
.lesson-pn .soon { opacity: .65 }

/* side: the course's lessons and the sign-up */
.lesson-side { position: sticky; top: 100px; display: grid; gap: 18px }
.course-nav { border-radius: 22px; background: linear-gradient(180deg, rgba(19, 41, 75, .7), rgba(7, 20, 39, .88)); border: 1px solid rgba(45, 212, 191, .22); overflow: hidden }
.cn-head { padding: 20px 20px 16px; border-bottom: 1px solid var(--line) }
.cn-head small { display: block; font: 700 11.5px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--teal-2); margin-bottom: 8px }
.cn-head a { font: 700 1.08rem/1.3 var(--head); color: #fff }
.cn-head a:hover { color: var(--teal-2) }
.cn-prog { height: 6px; border-radius: 6px; background: rgba(148, 163, 184, .2); margin: 14px 0 9px; overflow: hidden }
.cn-prog i { display: block; height: 100%; border-radius: inherit; background: var(--grad) }
.cn-head span { font-size: 13px; color: var(--muted) }
.cn-list { position: relative; max-height: min(52vh, 480px); overflow-y: auto; padding: 4px 8px 12px; scrollbar-width: thin; scrollbar-color: rgba(148, 163, 184, .35) transparent }
.cn-mod { font: 700 11px/1.3 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 16px 10px 6px }
.side-notify { padding: 20px; border-radius: 22px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line) }
.side-notify > b { display: block; font: 600 1rem/1.35 var(--head); color: #fff; margin-bottom: 12px }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .player-grid { grid-template-columns: minmax(0, 1fr) }
  .chapters-panel { max-height: none }
  .chapters { columns: 2; column-gap: 8px }
  .chapters li { break-inside: avoid }
  .lesson-grid { grid-template-columns: minmax(0, 1fr) }
  .lesson-side { position: static }
  .lesson-cards { grid-template-columns: repeat(2, 1fr) }
  .course-feature { grid-template-columns: 1fr }
}
@media (max-width: 960px) {
  .modules { grid-template-columns: 1fr }
}
@media (max-width: 680px) {
  .chapters { columns: 1 }
  .lesson-cards, .course-cards { grid-template-columns: 1fr }
  .lesson-pn { grid-template-columns: 1fr }
  .lesson-pn .next { grid-column: auto; text-align: left }
  .player { border-radius: 14px }
  .player-meta .textlink { margin-left: 0 }
  .qz { padding: 18px 16px }
  .wp-block-code { font-size: 12.5px; padding: 16px }
  .cf-stats li { min-width: 0; flex: 1 }
}
@media print { .player, .chapters-panel, .lesson-side, .copy-btn { display: none !important } }

/* Lessons quote code such as <!-- --> and "->" in plain text too (quiz answers, notes). Inter's and
   Cascadia's contextual alternates would draw those as arrows and long dashes, so they are off here.
   !important because many elements reset these with the font shorthand. */
.lesson-hero *, .lesson-main *, .lesson-side * { font-variant-ligatures: none !important; font-feature-settings: "calt" 0, "liga" 0 !important }
