/*! © 2026 VertexStudio, Inc. — All rights reserved. */
/* Shared course catalog and field-guide reader. All colors follow the site theme. */
#classroom-app [hidden] { display: none !important; }
.cx-library { border: 0; background: none; color: var(--text-2); font: 600 13px var(--font-sans); cursor: pointer; padding: 10px 0; }
.cx-cover { min-height: 190px; display: grid; grid-template-columns: 1fr 1fr; padding: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--bg-2)), var(--bg-2)); color: var(--brand); }
.cx-cover::before, .cx-cover::after { display: none; }
.cx-cover-num { font: 500 64px var(--font-display); opacity: .55; line-height: 1; }
.cx-cover-map { justify-self: end; width: 100%; max-width: 230px; height: 100px; stroke: currentColor; stroke-width: 1.5; }
.cx-cover-label { grid-column: 1 / -1; align-self: end; font: 500 10px var(--font-mono); letter-spacing: .16em; }
.cx-grid { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); gap: 16px; }
.cx-list { border-radius: 12px; box-shadow: none; padding: 12px 6px; }
.cx-ch-t small { display: none; }
.cx-ch-btn { padding-block: 11px; }
.cx-ch-t b, .cx-ls-t b { font-size: 13px; line-height: 1.45; }
.cx-home-h { font-size: 1.05rem; }
.cx-ls { padding-block: 10px; }
.cx-view { padding: clamp(16px, 1.8vw, 26px); box-shadow: none; border-radius: 12px; }
.cx-lhead { padding-bottom: 10px; }
.cx-title { font-size: clamp(25px, 2.2vw, 34px); letter-spacing: -.04em; line-height: 1.12; margin: 16px 0 8px; }
.cx-tag { max-width: 62ch; font-size: 15.5px; line-height: 1.65; }
.cx-reader-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 20px; }
.cx-mode { display: inline-flex; padding: 4px; gap: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-1); }
.cx-mode button { border: 0; background: transparent; color: var(--muted); padding: 9px 12px; border-radius: 5px; font: 600 12px var(--font-sans); cursor: pointer; }
.cx-mode button[aria-pressed="true"] { background: var(--bg-2); color: var(--text); box-shadow: 0 1px 4px #0001; }
.cx-steps { padding: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bg-2); }
.cx-steps-head { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.cx-dia { border: 0; border-radius: 0; margin: 0; min-width: 0; }
.cx-dia svg { min-height: 280px; }
.cx-step-meter { width: 100%; height: 3px; border-radius: 0; }
.cx-step { padding: 22px 24px; min-height: 145px; margin: 0; border-top: 1px solid var(--line); }
.cx-step p { font-size: 15px; line-height: 1.85; max-width: 65ch; margin: 0; color: var(--text-2); }
.cx-step b, .cx-reading b { color: var(--text); font-weight: 650; }
.cx-flows { margin-top: 16px; }
.cx-dots { padding: 16px 20px; margin: 0; gap: 7px; flex-wrap: wrap; border-top: 1px solid var(--line); background: var(--bg-2); }
.cx-dot { width: 32px; flex: 0 0 32px; height: 32px; max-width: none; border: 1px solid var(--line-2); border-radius: 6px; font: 500 11px var(--font-mono); color: var(--muted); background: transparent; }
.cx-dot.on { color: var(--on-brand); border-color: var(--brand); }
.cx-dot.seen { color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.cx-reading { display: none; max-width: 72ch; margin: 24px auto; padding: 0; }
.cx-reading h4 { font: 600 22px/1.3 var(--font-display); letter-spacing: -.02em; margin: 12px 0 28px; }
.cx-reading ol { list-style: none; padding: 0; margin: 0; }
.cx-reading li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.cx-reading-num { color: var(--brand); font: 500 12px var(--font-mono); padding-top: 5px; }
.cx-reading p { color: var(--text-2); font-size: 15.5px; line-height: 1.9; margin: 0 0 14px; }
.cx-view[data-mode="read"] .cx-reading { display: block; }
.cx-view[data-mode="read"] .cx-steps { display: none; }
.cx-ltabs { margin-top: 28px; }
.cx-lpanel .cx-box { padding: 24px; }
.cx-lpanel .cx-box p, .cx-lpanel .cx-box li { font-size: 15px; line-height: 1.85; max-width: 68ch; }
.cx-lbar { border-radius: 10px; margin-top: 32px; }
.cx button:focus-visible, .cl-catalog [role="button"]:focus-visible, .cl-cat-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
@media (min-width: 1400px) {
  .cx-steps { grid-template-columns: minmax(0, 1.5fr) minmax(230px, 1fr); }
  .cx-steps-head, .cx-dots { grid-column: 1 / -1; }
  .cx-dia { grid-column: 1; grid-row: 2; align-self: center; }
  .cx-step { grid-column: 2; grid-row: 2 / 4; border-top: 0; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
  .cx-step-meter { grid-row: 3; grid-column: 1; }
}
@media (max-width: 900px) {
  .cx-grid { grid-template-columns: minmax(0, 1fr); }
  .cx-view { padding: 22px; }
  .cx-title { margin-top: 20px; }
}
@media (max-width: 560px) {
  .cx-view { padding: 16px; }
  .cx-tabs { width: 100%; overflow-x: auto; }
  .cx-tab { padding: 8px 12px; flex-shrink: 0; }
  .cx-reader-tools > .cx-count { display: none; }
  .cx-mode { width: 100%; }
  .cx-mode button { flex: 1; padding: 10px 8px; }
  .cx-steps-head { flex-wrap: wrap; padding: 12px; }
  .cx-step { padding: 18px; }
  .cx-dia { overflow-x: auto; }
  .cx-dia svg { width: 640px; max-width: none; min-height: 0; }
  .cx-legend { position: sticky; bottom: 0; left: 0; padding: 8px 12px; background: var(--bg-2); width: max-content; }
  .cx-reading li { grid-template-columns: 25px minmax(0, 1fr); gap: 8px; }
  .cx-lpanel .cx-box { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cx *, .cx *::before, .cx *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* The open course uses the viewport; the library retains its catalog heading. */
.kh-views > #classroom.course-open {
  padding: calc(var(--nav-h) + 12px) clamp(12px, 1.6vw, 28px) 32px;
}
#classroom.course-open > .learn-section-head { display: none; }
#classroom.course-open #classroom-app { max-width: none; }
.cx { gap: 10px; }
.cx-bar { justify-content: flex-start; gap: 12px; }
.cx-search { margin-left: auto; }
.cx-toc-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 12px; font-size: 12px; border-radius: 7px; }
.cx-progress { gap: 8px 14px; padding-bottom: 4px; }
.cx-home-head { margin-bottom: 16px; }
.cx-home-head .btn-lg { font-size: 13px; padding: 11px 18px; }
@media (min-width: 901px) {
  .cx.tree-collapsed .cx-grid { grid-template-columns: minmax(0, 1fr); }
  .cx.tree-collapsed .cx-list { display: none; }
}
@media (max-width: 560px) {
  .cx-bar { gap: 8px 14px; }
  .cx-search { flex-basis: 100%; max-width: none; }
  .cx-view { padding: 14px; }
  .cx-title { font-size: 25px; }
}

/* Interactive 3D objects and the accessible 2D fallback share the same stage. */
.cx-model-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.cx-model-switch, .cx-model-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.cx-model-toolbar button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg-2); color: var(--text-2); cursor: pointer; font: 500 11px var(--font-sans); }
.cx-model-switch button[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--bg-2)); color: var(--brand); }
.cx-scene { position: relative; width: 100%; height: clamp(340px, 34vw, 510px); overflow: hidden; }
.cx-scene-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.cx-scene-canvas:active { cursor: grabbing; }
.cx-scene-canvas:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.cx-scene-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cx-scene-label { position: absolute; transform: translate(-50%, -100%); max-width: 135px; pointer-events: auto; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 5px; padding: 4px 7px; font: 500 11px/1.35 var(--font-sans); box-shadow: 0 2px 8px #0001; cursor: pointer; text-wrap: balance; }
.cx-scene-label[data-state="active"] { border-color: var(--brand); color: var(--brand); }
.cx-scene-label[data-state="failed"] { border-color: var(--rose); color: var(--rose); }
.cx-scene-label.selected { box-shadow: 0 0 0 2px var(--brand); }
.cx-svg-stage { position: relative; }
.cx-scene-status { padding: 10px 14px; color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; }
.cx-scene-status:empty { display: none; }
.cx-node-info { min-height: 46px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font-size: 12px; line-height: 1.6; }
@media (max-width: 560px) {
  .cx-dia { overflow-x: hidden; }
  .cx-svg-stage { overflow-x: auto; }
  .cx-scene { height: 360px; }
  .cx-scene-label { max-width: 100px; font-size: 10px; }
  .cx-model-toolbar button { min-height: 36px; }
}

/* The diagram uses the same neutral surface as its reader, in either theme. */
.cx-dia, .cx-scene, .cx-svg-stage { background: var(--bg-2); }
.cx-scene-canvas { background: transparent; }
