/* /code/circuits (Circuit Builder), /code/labs and /code/labs/<course>/<lab> (Physics Labs). */
.cx-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: #94a3b8; margin-bottom: 1rem; }
.cx-crumbs a { color: #cbd5e1; } .cx-crumbs a:hover { color: #fff; }
.cx-app { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cx-app { grid-template-columns: 15rem minmax(0, 1fr); align-items: start; } .cx-levels { position: sticky; top: 5rem; } }
.cx-levels { border: 1px solid rgba(148, 163, 184, .18); border-radius: 1rem; padding: .75rem; background: rgba(15, 23, 42, .5); }
.cx-levels ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
@media (max-width: 899px) { .cx-levels ol { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); } .cx-name { white-space: normal; line-height: 1.25; font-size: .85rem; } }
.cx-progress { margin: 0 0 .5rem; font-size: .85rem; font-weight: 600; color: #a7f3d0; }
.cx-level { display: flex; align-items: center; gap: .55rem; padding: .4rem .5rem; border-radius: .6rem; color: #cbd5e1; font-size: .9rem; text-decoration: none; }
.cx-level:hover { background: rgba(148, 163, 184, .1); color: #fff; }
.cx-level.is-current { background: rgba(16, 185, 129, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .45); }
.cx-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: rgba(148, 163, 184, .16); font-size: .78rem; font-weight: 700; }
.cx-level.is-done .cx-num { background: #10b981; color: #052e16; }
.cx-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-level.is-done .cx-tick::before { content: "✓"; color: #34d399; font-weight: 700; }
.cx-main { min-width: 0; }
.cx-title { margin: 0; font-size: 1.35rem; font-weight: 700; color: #fff; }
.cx-intro { margin: .4rem 0 .9rem; color: #cbd5e1; line-height: 1.6; max-width: 46rem; }
.cx-lab-sec { margin: 0; }
.cx-next { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .9rem; padding: .7rem .9rem; border-radius: .8rem; background: rgba(16, 185, 129, .14); border: 1px solid rgba(52, 211, 153, .4); color: #d1fae5; font-weight: 600; }
.cx-next[hidden] { display: none; }
.cx-next-btn { text-decoration: none; }
.cx-more { margin-top: 1.5rem; font-size: .95rem; } .cx-more a { color: #7dd3fc; }
.cx-feature { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin-bottom: 1.25rem; padding: 1rem 1.2rem; border-radius: 1rem; text-decoration: none;
  background: linear-gradient(120deg, rgba(16, 185, 129, .18), rgba(14, 165, 233, .12)); border: 1px solid rgba(52, 211, 153, .4); color: #e2e8f0; }
.cx-feature strong { font-size: 1.1rem; color: #fff; } .cx-feature span { flex: 1 1 20rem; color: #cbd5e1; font-size: .92rem; }
.cx-feature .cx-feature-go { flex: none; font-size: 1.3rem; color: #6ee7b7; }
.cx-jump { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; }
.cx-jump a { padding: .3rem .7rem; border-radius: 999px; border: 1px solid rgba(148, 163, 184, .25); color: #e2e8f0; font-size: .85rem; text-decoration: none; }
.cx-jump a:hover { border-color: #a78bfa; } .cx-jump span { color: #94a3b8; font-variant-numeric: tabular-nums; }
.cx-course { margin-bottom: 2rem; scroll-margin-top: 5rem; }
.cx-course h2 { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 0 0 .5rem; }
.cx-count { font-size: .85rem; font-weight: 500; color: #94a3b8; margin-left: .4rem; }
.cx-course h3 { font-size: .95rem; font-weight: 600; margin: 1rem 0 .45rem; } .cx-course h3 a { color: #c4b5fd; }
.cx-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.cx-card { display: flex; align-items: center; gap: .6rem; height: 100%; padding: .65rem .8rem; border-radius: .8rem; border: 1px solid rgba(148, 163, 184, .2); background: rgba(15, 23, 42, .5); color: #e2e8f0; text-decoration: none; font-size: .92rem; }
.cx-card:hover { border-color: rgba(167, 139, 250, .6); color: #fff; }
.cx-card-title { flex: 1; min-width: 0; } .cx-card-go { color: #a78bfa; }
.cx-topic { color: #94a3b8; font-size: .9rem; margin-bottom: .5rem; } .cx-topic a { color: #c4b5fd; }
.cx-lab .lx-visualization { margin-top: 0; }
.cx-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; font-size: .9rem; }
.cx-pager a { color: #7dd3fc; max-width: 48%; }
html[data-theme="light"] .cx-levels, html[data-theme="light"] .cx-card { background: #fff; border-color: #cbd5e1; }
html[data-theme="light"] .cx-level, html[data-theme="light"] .cx-intro, html[data-theme="light"] .cx-card, html[data-theme="light"] .cx-crumbs a { color: #334155; }
html[data-theme="light"] .cx-title, html[data-theme="light"] .cx-course h2, html[data-theme="light"] .cx-feature strong { color: #0f172a; }
html[data-theme="light"] .cx-level.is-current { color: #064e3b; }
html[data-theme="light"] .cx-progress { color: #047857; }
html[data-theme="light"] .cx-feature, html[data-theme="light"] .cx-feature span, html[data-theme="light"] .cx-jump a { color: #334155; }
html[data-theme="light"] .cx-next { color: #065f46; }
