/* Adopt › Classes. The screen is built from the demo lifecycle's pieces
   (pursue-demo-lifecycle.css, which alone styles them); the cls-* hooks here only keep every panel off its own edge. */

/* A card with no padding role of its own (a slice's detail box, a form, a
   <details>) gets the section padding, so no text ever sits on a border. */
.cls .cls-box { padding: var(--sp-4) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
/* A card inside a section is a quiet inset, not a second raised card. */
.cls .cls-sec .cls-box { box-shadow: none; background: var(--bg-secondary); }
.cls details.cls-box > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-primary); }
.cls .cls-sec > .pursuit-table, .cls .cls-box > .pursuit-table { margin: 0; }
.cls .cls-sec .empty-state { margin: 0; }

/* The eight phases on the landing: the workflow before any class exists. Not buttons. */
.cls-preview > * { cursor: default; }
.cls-preview > *:hover { transform: none; box-shadow: none; border-color: var(--border); }
.cls-preview > * > span:last-child { white-space: normal; }
@media (max-width: 1100px) { .cls .cls-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* A write in flight: the panel says so and its buttons wait, so nothing reads as a dead button. */
.cls[aria-busy="true"] { cursor: progress; }
.cls[aria-busy="true"] :is(.cls-panel, .cls-sec) button { pointer-events: none; opacity: .55; }
.cls .cls-steps { position: relative; }
.cls[aria-busy="true"] .cls-steps::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: cls-busy 1.1s linear infinite; }
@keyframes cls-busy { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { .cls[aria-busy="true"] .cls-steps::after { animation: none; background: var(--accent); opacity: .5; } }

/* A panel a slice left empty (or hid) takes no room; display:flex must not defeat [hidden]. */
.cls [hidden] { display: none !important; }
.cls [data-cls-panel]:empty { display: none; }

/* Labelled inline inputs: a number box with no name is a guess. */
.cls .cls-addrow { align-items: flex-end; }
.cls-inline { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.cls-inline input { width: 84px; }
.cls-grow { flex: 1 1 220px; }
.cls-grow input { width: 100%; }

/* The read-only environment line sits above the intake fields. */
.cls .cls-envline { margin: 0 0 14px; }

/* A wide grid (the Run phase has a column per exercise) scrolls inside its own panel instead of sliding under the rail. */
.cls .cls-panel { min-width: 0; }
.cls .cls-scroll { overflow-x: auto; max-width: 100%; }
.cls .cls-scroll th:first-child, .cls .cls-scroll td:first-child { position: sticky; left: 0; background: var(--bg-card); z-index: 1; }

/* Ask Tiva: a box to type in on the rail. */
.cls-ask { display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; }
.cls-ask textarea { width: 100%; resize: vertical; font: inherit; font-size: 12.5px; padding: var(--sp-2); border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text-primary); }

/* Configure: one box per layer, a tick list inside it. */
.cls-layers { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-3); }
.cls-layer { border: 1px solid var(--border); border-radius: 12px; padding: var(--sp-3); margin: 0; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.cls-layer > legend { font-size: 13px; font-weight: 700; color: var(--text-primary); padding: 0 var(--sp-1); }
.cls-picks { display: flex; flex-direction: column; gap: var(--sp-1); }
.cls-pick { display: flex; gap: var(--sp-2); align-items: flex-start; padding: var(--sp-2); border-radius: 10px; background: var(--bg-secondary); font-size: 12.5px; color: var(--text-primary); cursor: pointer; }
.cls-pick input { margin-top: 3px; flex: none; }
.cls-pick .pursuit-caption { display: block; }
.cls-add select { width: 100%; }

/* Grade: the class at a glance, and the report card. */
.cls-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-2); }
.cls-tile { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3); border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); }
.cls-tile-v { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.cls-tile-k { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; }
.cls-rc { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--border); border-radius: 12px; background: var(--bg-secondary); }
.cls-rc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-3); }
.cls-fold > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-primary); margin-bottom: var(--sp-2); }

/* Curriculum, how each exercise is graded: one block per exercise, one line per check. */
.cls-chks { display: flex; flex-direction: column; gap: var(--sp-3); }
.cls-chk { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--border); border-radius: 12px; }
.cls-chk-head { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.cls-chk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.cls-chk-line { display: flex; gap: var(--sp-3); align-items: center; justify-content: space-between; padding: var(--sp-2); border-radius: 10px; background: var(--bg-secondary); font-size: 12.5px; color: var(--text-primary); }
.cls-chk-what .pursuit-caption { display: block; }
.cls-chk-add { display: flex; gap: var(--sp-2); align-items: flex-end; }
.cls-chk-add select { width: 100%; }

/* Run: how far along the class, each student and each exercise are. */
.cls-prog .cls-meter { width: 100%; height: 10px; }
.cls-prog-cell { display: flex; gap: var(--sp-2); align-items: center; white-space: nowrap; }
.cls-prog-cell .cls-meter { width: 72px; }
