/* The curriculum map builder: the approved AI Labs look (see CLAUDE.md). */
.cm-setup { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cm-start { border: 0; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cm-start legend { font-weight: 700; margin-bottom: 6px; }
.cm-status { min-height: 1.5em; font-weight: 700; color: var(--deep); }
.cm-layout { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
.cm-library { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 22px; padding: 14px; }
.cm-library h3 { font-family: var(--font-display); font-size: 1.1rem; color: var(--deep); margin: 4px 0 8px; }
.cm-count { font-family: var(--font-body); font-size: .9rem; color: var(--muted); font-weight: 400; }
.cm-cards { display: grid; gap: 8px; align-content: start; }
#library { min-height: 70px; border: 2px dashed var(--line); border-radius: 16px; padding: 8px; margin-bottom: 14px; }
.cm-empty { margin: 8px; }
.cm-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; text-align: left; width: 100%; border-radius: 14px; padding: 8px; border: 2px solid transparent; background: var(--surface); box-shadow: 0 3px 0 rgb(0 0 0 / .08); cursor: grab; font-size: .95rem; line-height: 1.3; }
.cm-card.unit { background: var(--deep); color: #FFFFFF; }
.cm-card.extra.g-assess { background: #FFF6D6; border-color: var(--chalk); color: var(--ink); }
.cm-card.extra.g-review { background: var(--soft); border-color: var(--mint); color: var(--ink); }
.cm-card.extra.g-unitlike { background: var(--accent); color: #FFFFFF; }
.cm-card.extra.g-wider { background: #FFFFFF; border-color: var(--deep); color: var(--deep); }
.cm-card.picked { outline: 4px solid var(--chalk); outline-offset: 2px; box-shadow: 0 0 0 8px rgb(244 200 66 / .3); }
.cm-card:focus-within { outline: 3px solid var(--chalk); outline-offset: 2px; }
.cm-new { grid-template-columns: auto minmax(0, 1fr); min-height: 44px; }
.cm-pick { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 12px; display: grid; place-items: center; background: rgb(255 255 255 / .2); border: 0; color: inherit; font-size: 1.2rem; }
.cm-card.extra .cm-pick { background: rgb(14 77 62 / .08); }
.cm-pick[aria-pressed="true"] { background: var(--chalk); }
.cm-icon { font-size: 1.15rem; }
.cm-text { display: grid; gap: 2px; min-width: 0; }
.cm-text b { font-weight: 700; overflow-wrap: anywhere; }
.cm-meta { font-size: .8rem; opacity: .85; }
.cm-note { font-size: .82rem; opacity: .9; overflow-wrap: anywhere; }
.cm-card [contenteditable="true"] { border-radius: 4px; cursor: text; }
.cm-card [contenteditable="true"]:hover, .cm-card [contenteditable="true"]:focus { background: rgb(255 255 255 / .6); outline: 2px solid var(--chalk); }
.cm-x { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; border: 0; background: rgb(0 0 0 / .1); color: inherit; }
.cm-card.unit .cm-x { background: rgb(255 255 255 / .2); }
.cm-board { display: grid; gap: 18px; min-width: 0; }
.cm-year { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 14px; box-shadow: 0 10px 26px rgb(14 77 62 / .06); }
.cm-year h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--deep); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.cm-year h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--chalk); }
.cm-grid { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.cm-zone { display: grid; gap: 8px; align-content: start; min-height: 170px; background: var(--bg); border: 2px dashed var(--line); border-radius: 18px; padding: 8px; }
.cm-zone.over { border-color: #B3261E; }
.cm-drop.hover { border-color: var(--chalk); background: #FFFBEA; }
.cm-dragging .cm-drop { border-style: solid; }
.cm-zhead { margin: 0; display: grid; }
.cm-zhead b { color: var(--deep); }
.cm-zhead span { font-size: .75rem; color: var(--muted); }
.cm-load { margin: 0; font-size: .8rem; color: var(--muted); display: grid; gap: 3px; }
.cm-load.over { color: #B3261E; font-weight: 700; }
.cm-bar { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.cm-bar i { display: block; height: 100%; background: var(--mint); }
.cm-load.over .cm-bar i { background: #B3261E; }
.cm-place { min-height: 44px; border-radius: 12px; border: 2px dashed var(--deep); background: #FFFBEA; color: var(--deep); font-weight: 700; }
.cm-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.cm-checks li { display: flex; gap: 8px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.cm-checks li.todo { background: #FFFBEA; border-color: var(--chalk); }
.cm-checks li.cm-score { grid-column: 1 / -1; background: var(--soft); border-color: var(--mint); font-size: 1.05rem; }
.cm-checks em { display: block; font-style: normal; color: var(--muted); font-size: .92rem; }
@media (max-width: 1100px) {
  .cm-layout { grid-template-columns: minmax(0, 1fr); }
  .cm-library { position: static; max-height: none; }
  #extras { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .cm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
}
@media (max-width: 600px) {
  .cm-grid { grid-template-columns: minmax(0, 1fr); }
  .cm-zone { min-height: 0; }
  .cm-checks { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .cm-card { transition: none; } }
/* Cards in the half-terms are narrow: icon and ✕ on top, the words below. */
.cm-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; }
.cm-zone .cm-card { grid-template-columns: auto 1fr auto; grid-template-areas: "pick . x" "text text text"; gap: 4px 6px; padding: 6px; }
.cm-zone .cm-pick { grid-area: pick; width: 34px; height: 34px; min-height: 34px; }
.cm-zone .cm-x { grid-area: x; width: 32px; height: 32px; min-height: 32px; }
.cm-zone .cm-text { grid-area: text; }
.cm-zone .cm-text b { font-size: .88rem; overflow-wrap: break-word; word-break: normal; hyphens: auto; }
.cm-zone .cm-note { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .76rem; }
.cm-zone .cm-note:focus { -webkit-line-clamp: unset; display: block; }
@media (max-width: 1100px) { .cm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cm-grid { grid-template-columns: minmax(0, 1fr); } }
