/* Course editor (admin only). Uses the site colour variables, so dark mode works. */
.ce-main { background: var(--canvas); padding: 28px 16px 90px; min-height: 80vh; }
.ce-wrap { max-width: 980px; margin: 0 auto; color: var(--body-text); }
.ce-wrap h1 { font-family: var(--font-serif); color: var(--maroon); margin: 4px 0 8px; font-size: clamp(24px, 5vw, 34px); }
.ce-wrap h2 { color: var(--maroon); font-size: 20px; margin: 26px 0 10px; }
.ce-wrap h3 { font-size: 16px; margin: 0 0 6px; }
.ce-muted { color: var(--muted); font-size: 14px; }
.ce-crumb { font-size: 14px; margin: 0 0 8px; }
.ce-crumb a { color: var(--maroon); }
.ce-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 12px; }
.ce-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ce-row.grow > :first-child { flex: 1; min-width: 160px; }
.ce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.ce-field { display: block; margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.ce-field small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.ce-field input[type=text], .ce-field input[type=number], .ce-field input[type=url], .ce-field select, .ce-field textarea,
.ce-in { width: 100%; padding: 9px 10px; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--body-text); font: inherit; font-weight: 400; box-sizing: border-box; }
.ce-field textarea { min-height: 96px; resize: vertical; }
.ce-field.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.ce-field.check input { width: auto; margin: 0; }
.ce-btn { display: inline-block; border: 1px solid var(--maroon); background: var(--maroon); color: #fff; padding: 8px 14px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; }
.ce-btn.alt { background: transparent; color: var(--maroon); }
.ce-btn.danger { background: transparent; color: #b33a2e; border-color: #b33a2e; }
.ce-btn.small { padding: 4px 9px; font-size: 13px; }
.ce-btn:disabled { opacity: .5; cursor: default; }
.ce-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--row-tint); color: var(--muted); }
.ce-pill.live { background: #dcefdc; color: #1d5a24; }
.ce-pill.warn { background: #fbe7c4; color: #7a4b00; }
body.dark-mode .ce-pill.live { background: #1d3a22; color: #a6dfae; }
body.dark-mode .ce-pill.warn { background: #4a3510; color: #f3d89a; }
.ce-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #2a1f23; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; max-width: 90vw; font-size: 14px; }
.ce-toast.bad { background: #8b1f14; }
.ce-lesson { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ce-lesson a.t { flex: 1; min-width: 150px; color: inherit; font-weight: 600; text-decoration: none; }
.ce-block { border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; margin: 0 0 10px; background: var(--card); }
.ce-block > summary { cursor: pointer; padding: 10px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; list-style: none; }
.ce-block > summary::-webkit-details-marker { display: none; }
.ce-block .ce-body { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.ce-type { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--maroon); }
.ce-prev { flex: 1; min-width: 120px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-opt { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.ce-opt input[type=text] { flex: 1; }
.ce-warn { background: #fbe7c4; color: #5c3900; padding: 10px 12px; border-radius: 8px; font-size: 14px; margin: 0 0 12px; }
body.dark-mode .ce-warn { background: #4a3510; color: #f3d89a; }
.ce-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; min-height: 220px; }
