/* CLL Courses 2.2 — course player (full application screen). Loaded only on lesson pages when the player is on. */
html, body.cllp-app { margin: 0; padding: 0; background: #0b1220; }
body.cllp-app { --cllp-bar: 56px; --cllp-nav: 320px; --cllp-side: 300px; --cllp-ink: #0b1220; --cllp-ink-2: #3b4457; --cllp-muted: #6b7280; --cllp-line: #e6e9f0; --cllp-rail: #0e1628; --cllp-rail-2: #141f36; --cllp-rail-ink: #dfe6f5; --cllp-rail-muted: #8b97b3; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--cllp-ink); overflow-x: hidden; }
body.cllp-app.admin-bar .cllp-bar { top: 32px; } body.cllp-app.admin-bar .cllp-body { padding-top: calc(var(--cllp-bar) + 32px); }
body.cllp-app > *:not(.cllp):not(script):not(style):not(#wpadminbar):not(#cllacc-source):not(.cllc-toast):not(.cllc-celebrate):not(.cllc-confetti):not(.amp-wallet-modal):not([class*="amp-"]) { display: none !important; } /* theme leftovers printed by wp_footer hooks */
.cllp { min-height: 100vh; display: flex; flex-direction: column; }
.cllp *, .cllp *::before, .cllp *::after { box-sizing: border-box; }

/* ---- app bar ---- */
.cllp-bar { position: fixed; top: 0; left: 0; right: 0; height: var(--cllp-bar); z-index: 1000; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: linear-gradient(90deg, var(--cllc-deep), #0b1220 60%); color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.cllp-iconbtn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; padding: 0; }
.cllp-iconbtn span { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.cllp-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none !important; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.cllp-brand img { height: 26px; width: auto; }
.cllp-course { flex: 1; min-width: 0; text-align: center; }
.cllp-course a { color: rgba(255,255,255,.85) !important; text-decoration: none !important; font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%; }
.cllp-progress { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.cllp-progress-bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.cllp-progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cllc-primary), var(--cllc-accent)); border-radius: 999px; transition: width .4s; }
.cllp-progress b { font-variant-numeric: tabular-nums; font-size: .9rem; }
.cllp-bar-right { display: flex; align-items: center; gap: 12px; }
.cllp-exit { color: rgba(255,255,255,.75) !important; text-decoration: none !important; font-size: .9rem; padding: 7px 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); white-space: nowrap; }
.cllp-exit:hover { background: rgba(255,255,255,.08); color: #fff !important; }

/* ---- body grid ---- */
.cllp-body { display: grid; grid-template-columns: var(--cllp-nav) minmax(0, 1fr) var(--cllp-side); padding-top: var(--cllp-bar); min-height: 100vh; background: #f3f5f9; transition: grid-template-columns .2s; }
.cllp.nav-collapsed .cllp-body { grid-template-columns: 0 minmax(0, 1fr) var(--cllp-side); }
.cllp.nav-collapsed .cllp-nav { transform: translateX(-100%); }

/* ---- curriculum rail ---- */
.cllp-nav { background: var(--cllp-rail); color: var(--cllp-rail-ink); position: sticky; top: var(--cllp-bar); height: calc(100vh - var(--cllp-bar)); overflow: hidden; transition: transform .2s; }
body.admin-bar .cllp-nav, body.admin-bar .cllp-side { top: calc(var(--cllp-bar) + 32px); height: calc(100vh - var(--cllp-bar) - 32px); }
.cllp-nav-inner { height: 100%; overflow-y: auto; padding: 18px 14px 40px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.cllp-nav .cllc-side-course { display: block; color: var(--cllp-rail-muted) !important; text-decoration: none !important; font-size: .85rem; margin-bottom: 14px; }
.cllp-nav .cllc-ring { --size: 72px; width: var(--size); height: var(--size); border-radius: 50%; background: conic-gradient(var(--cllc-primary) calc(var(--p) * 1%), rgba(255,255,255,.1) 0); display: grid; place-items: center; margin: 0 0 18px; }
.cllp-nav .cllc-ring span { width: calc(var(--size) - 14px); height: calc(var(--size) - 14px); border-radius: 50%; background: var(--cllp-rail); display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.cllp-nav details { border-top: 1px solid rgba(255,255,255,.07); }
.cllp-nav summary { list-style: none; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 12px 6px; cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--cllp-rail-ink); }
.cllp-nav summary::-webkit-details-marker { display: none; }
.cllp-nav .cllc-num { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.cllp-nav .cllc-num.done { background: var(--cllc-primary); color: #fff; }
.cllp-nav .cllc-sum-meta { font-size: .75rem; color: var(--cllp-rail-muted); font-variant-numeric: tabular-nums; }
.cllp-nav ol { list-style: none; margin: 0 0 8px; padding: 0 0 0 4px; }
.cllp-nav li { position: relative; }
.cllp-nav li a, .cllp-nav li > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px 9px 34px; border-radius: 9px; color: var(--cllp-rail-muted) !important; text-decoration: none !important; font-size: .88rem; line-height: 1.35; }
.cllp-nav li a:hover { background: rgba(255,255,255,.05); color: #fff !important; }
.cllp-nav li a em { font-style: normal; font-size: .72rem; opacity: .7; }
.cllp-nav li::before { content: ""; position: absolute; left: 12px; top: 12px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); }
.cllp-nav li.done::before { background: #22c55e; border-color: #22c55e; }
.cllp-nav li.done::after { content: ""; position: absolute; left: 15.5px; top: 14px; width: 4px; height: 7px; border: solid #0b1220; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cllp-nav li.current a { background: var(--cllc-primary); color: #fff !important; font-weight: 600; }
.cllp-nav li.current::before { border-color: #fff; background: #fff; }
.cllp-nav li.locked > span { opacity: .5; }
.cllp-nav li.cllc-quizrow span { font-size: .8rem; color: var(--cllc-accent) !important; }
.cllp-nav li.cllc-quizrow.done span { color: #22c55e !important; }

/* ---- reading column ---- */
.cllp-main { min-width: 0; position: relative; }
.cllp-banner { height: 160px; background-size: cover; background-position: center; position: relative; }
.cllp-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,18,32,.25), #f3f5f9 100%); }
.cllp-article { max-width: 880px; margin: 0 auto; padding: 24px 40px 80px; background: #fff; border-radius: 18px 18px 0 0; position: relative; margin-top: -72px; box-shadow: 0 -8px 40px rgba(10,20,50,.08); min-height: calc(100vh - var(--cllp-bar) - 90px); }
.cllp-main:not(:has(.cllp-banner)) .cllp-article { margin-top: 24px; border-radius: 18px; }
.cllp-article .cllc-lesson-head { padding: 12px 0 8px; border-bottom: 1px solid var(--cllp-line); margin-bottom: 24px; }
.cllp-article .cllc-crumb { display: flex; gap: 8px; flex-wrap: wrap; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cllp-muted); font-weight: 600; }
.cllp-article h1 { font-size: clamp(1.7rem, 2.6vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; margin: 10px 0 0; }
.cllp-article .cllc-body { font-size: 1.06rem; line-height: 1.75; color: #1f2937; }
.cllp-article .cllc-body h2 { font-size: 1.45rem; margin: 2.2em 0 .6em; letter-spacing: -.01em; scroll-margin-top: calc(var(--cllp-bar) + 20px); }
.cllp-article .cllc-body h3 { font-size: 1.15rem; margin: 1.8em 0 .5em; scroll-margin-top: calc(var(--cllp-bar) + 20px); }
.cllp-article .cllc-body pre { background: #0e1628; color: #dfe6f5; padding: 16px 18px; border-radius: 12px; overflow: auto; font-size: .9rem; }
.cllp-article .cllc-body code { font-size: .92em; }
.cllp-article .cllc-body :not(pre) > code { background: #eef2ff; color: var(--cllc-deep); padding: 2px 6px; border-radius: 6px; }
.cllp-article .cllc-body blockquote { border-left: 4px solid var(--cllc-primary); margin: 1.4em 0; padding: 10px 18px; background: #f6f8ff; border-radius: 0 12px 12px 0; }
.cllp-article .cllc-body table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cllp-article .cllc-body th, .cllp-article .cllc-body td { padding: 10px 12px; border-bottom: 1px solid var(--cllp-line); text-align: left; }
.cllp-article .cllc-body img { max-width: 100%; height: auto; border-radius: 12px; }
.cllp-article .cllc-quiz { margin-top: 48px; scroll-margin-top: calc(var(--cllp-bar) + 20px); }
.cllp-article .cllc-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); margin: 40px -40px 0; padding: 14px 40px; border-top: 1px solid var(--cllp-line); display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.cllp-article .cllc-actions > a:last-child { justify-self: end; }
.cllp-article .cllc-actions .cllc-btn-ghost span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

/* ---- context rail ---- */
.cllp-side { position: sticky; top: var(--cllp-bar); height: calc(100vh - var(--cllp-bar)); overflow-y: auto; padding: 24px 20px 40px 8px; scrollbar-width: thin; }
.cllp-panel { display: block; background: #fff; border: 1px solid var(--cllp-line); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; text-decoration: none !important; color: inherit !important; }
.cllp-panel h4 { margin: 0 0 10px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cllp-muted); font-weight: 700; }
.cllp-outline ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--cllp-line); }
.cllp-outline li a { display: block; padding: 6px 0 6px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--cllp-ink-2) !important; text-decoration: none !important; font-size: .88rem; line-height: 1.35; }
.cllp-outline li.lvl-3 a { padding-left: 24px; font-size: .82rem; color: var(--cllp-muted) !important; }
.cllp-outline li a:hover, .cllp-outline li.active a { color: var(--cllc-primary) !important; border-left-color: var(--cllc-primary); }
.cllp-outline-quiz a { color: var(--cllc-deep) !important; font-weight: 600; }
.cllp-stats dl { margin: 0; display: grid; gap: 8px; }
.cllp-stats dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cllp-stats dt { color: var(--cllp-muted); font-size: .85rem; }
.cllp-stats dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.cllp-stats dd small { font-weight: 500; color: var(--cllp-muted); }
.cllp-stats dd.ok { color: #15803d; }
.cllp-next { background: linear-gradient(135deg, var(--cllc-deep), var(--cllc-primary)); color: #fff !important; border: 0; transition: transform .12s; }
.cllp-next:hover { transform: translateY(-2px); }
.cllp-next small { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.cllp-next strong { display: block; margin: 6px 0 2px; font-size: 1rem; line-height: 1.3; }
.cllp-next span { font-size: .8rem; opacity: .8; }
.cllp-cert p { margin: 0 0 10px; font-size: .9rem; color: var(--cllp-ink-2); }
.cllp-cert .cllc-btn { width: 100%; }
.cllp-help p { margin: 0; font-size: .85rem; color: var(--cllp-muted); }

/* ---- responsive ---- */
@media (max-width: 1280px) { body.cllp-app { --cllp-side: 260px; --cllp-nav: 290px; } .cllp-article { padding: 20px 28px 80px; } .cllp-article .cllc-actions { margin: 40px -28px 0; padding: 14px 28px; } }
@media (max-width: 1100px) { .cllp-body { grid-template-columns: var(--cllp-nav) minmax(0, 1fr); } .cllp-side { display: none; } .cllp.nav-collapsed .cllp-body { grid-template-columns: 0 minmax(0, 1fr); } }
@media (max-width: 820px) {
  body.cllp-app { --cllp-nav: 300px; }
  .cllp-course, .cllp-progress { display: none; }
  .cllp-body { grid-template-columns: minmax(0, 1fr); }
  .cllp.nav-collapsed .cllp-body { grid-template-columns: minmax(0, 1fr); }
  .cllp-nav { position: fixed; left: 0; top: var(--cllp-bar); bottom: 0; width: var(--cllp-nav); z-index: 900; transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.35); }
  .cllp.nav-collapsed .cllp-nav { transform: translateX(-100%); box-shadow: none; }
  .cllp-article { margin-top: -40px; padding: 16px 18px 80px; border-radius: 14px 14px 0 0; }
  .cllp-banner { height: 120px; }
  .cllp-article .cllc-actions { margin: 32px -18px 0; padding: 12px 18px; grid-template-columns: 1fr 1fr; }
  .cllp-article .cllc-actions .cllc-complete { grid-column: 1 / -1; order: -1; }
  .cllp-article .cllc-actions .cllc-btn-ghost span { max-width: 110px; }
  .cllp-exit { display: none; }
}
