:root {
  color-scheme: light;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #1f2329;
  background: #f2f3f5;
  font-synthesis: none;
  --page-bg: #f2f3f5;
  --surface: #ffffff;
  --surface-muted: #f8fafd;
  --border: #dee0e3;
  --primary: #3370ff;
  --primary-soft: #e8f0ff;
  --text: #1f2329;
  --muted: #646a73;
  --success: #00a870;
  --danger: #d83931;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 1180px;
  min-height: 100%;
  margin: 0;
  background: var(--page-bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  letter-spacing: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--page-bg);
}

.function-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  padding: 20px 16px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: visible;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 14px 18px 6px;
  border-bottom: 1px solid #edf0f4;
}

.function-sidebar-toggle {
  position: absolute;
  right: -25px;
  bottom: -16px;
  width: 24px;
  height: 34px;
  padding: 0;
  color: #7a8494;
  border: 1px solid #dce3ee;
  border-left-color: #edf1f7;
  border-radius: 0 10px 10px 0;
  background: #fff;
  box-shadow: 4px 4px 12px rgb(28 43 72 / 8%);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.function-sidebar-toggle:hover {
  color: var(--primary);
  border-color: #c8d7f5;
  border-left-color: #eef4ff;
  background: #f8fbff;
}

.brand-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--primary);
  font-size: 19px;
  line-height: 1;
  font-weight: 700;
}

.brand-name {
  margin-left: 12px;
  color: var(--text);
  font-size: 19px;
  line-height: 30px;
  font-weight: 700;
  white-space: nowrap;
}

.function-nav {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.function-group {
  padding: 10px 8px;
  border-radius: 8px;
}

.function-group.active {
  background: #fafcff;
}

.function-group-title {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
  color: #303a4d;
}

.function-group-title > span {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 6px;
  background: #17191d;
  font-size: 13px;
  font-weight: 700;
}

.function-group.active .function-group-title > span {
  background: var(--primary);
}

.function-group-title strong {
  font-size: 15px;
  white-space: nowrap;
}

.function-group-direct {
  min-height: 44px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.function-group-direct:hover { background: #edf1f7; }
.function-group-direct[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.function-group-direct:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.editor-document-type { display: flex; flex: 0 0 auto; gap: 4px; padding: 4px; border: 1px solid #dbe4f0; border-radius: 10px; background: #f4f7fc; }
.editor-document-type button { padding: 9px 16px; border: 0; border-radius: 7px; background: transparent; color: #66758c; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
.editor-document-type button:hover { color: var(--primary); background: #eaf0fc; }
.editor-document-type button[aria-pressed="true"] { color: var(--primary); background: #fff; box-shadow: 0 1px 4px #243a661a; }
.editor-document-type button:focus-visible, .lecture-draft-title:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.editor-lab.is-document-pack [data-insert-handout] { display: none !important; }
.lecture-draft-title { cursor: text; border-radius: 4px; }
.lecture-draft-rename { width: 100%; min-width: 120px; padding: 5px 8px; border: 1px solid var(--primary); border-radius: 5px; outline: 2px solid #3268ff1a; color: inherit; background: #fff; font: inherit; }

.function-group-items {
  display: grid;
  gap: 4px;
  margin: 6px 0 0 44px;
}

.function-link {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}

.function-link > span { display: none; }
.function-link > b { font: inherit; }

.function-link:hover {
  color: var(--text);
  background: #edf1f7;
}

.function-link.active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

.app-content {
  min-width: 0;
}

.app-shell.function-sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
.function-sidebar-collapsed .function-sidebar { padding: 20px 9px; overflow-x: visible; }
.function-sidebar-collapsed .brand { justify-content: center; padding: 0 0 18px; }
.function-sidebar-collapsed .brand-name,
.function-sidebar-collapsed .function-group-title strong,
.function-sidebar-collapsed .function-link > b { display: none; }
.function-sidebar-collapsed .brand-mark { width: 40px; height: 40px; }
.function-sidebar-collapsed .function-sidebar-toggle { right: -25px; }
.function-sidebar-collapsed .function-group { padding: 6px 5px; }
.function-sidebar-collapsed .function-group-title { justify-content: center; padding: 0; }
.function-sidebar-collapsed .function-group-items { margin: 4px 0 0; }
.function-sidebar-collapsed .function-link { justify-content: center; padding: 6px 0; }
.function-sidebar-collapsed .function-link > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; font-size: 12px; font-weight: 700; }
.function-sidebar-collapsed .function-link.active > span { background: #fff; }

.workspace {
  min-height: 100vh;
  padding: 22px 24px 31px;
}

.file-management-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: 14px 20px; }
.alpha-workspace .file-management-header { margin-bottom: 0; }
.file-management-header > div { min-width: 0; }
.file-management-header span { color: var(--primary); font-size: 12px; font-weight: 700; }
.file-management-header h1 { margin: 2px 0; font-size: 20px; }
.file-management-header p { margin: 0; color: var(--muted); font-size: 12px; }
.file-management-tabs { display: inline-flex; flex: none; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 8px; background: #f5f7fa; }
.file-management-tabs a { min-width: 104px; height: 38px; display: grid; place-items: center; padding: 0 16px; color: #586579; border-radius: 6px; text-decoration: none; font-size: 14px; font-weight: 600; }
.file-management-tabs a.active { color: var(--primary); background: #fff; box-shadow: 0 1px 4px rgba(31, 35, 41, .12); }

.top-grid {
  height: 268px;
  display: grid;
  grid-template-columns: minmax(390px, 31.7%) minmax(0, 1fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.panel-title {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}

.upload-panel {
  padding: 19px 27px 34px;
}

.dropzone {
  width: 100%;
  height: 171px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--primary);
  background: #f3f7ff;
}

.dropzone:focus-visible,
.button:focus-visible,
.icon-button:focus-visible,
.link-button:focus-visible,
.page-button:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid rgba(51, 112, 255, 0.35);
  outline-offset: 2px;
}

.dropzone-format {
  color: var(--primary);
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}

.dropzone-copy {
  margin-top: 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}

.pending-panel {
  padding: 19px 23px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pending-header,
.pending-actions {
  flex: none;
}

.pending-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pending-header > div { display: grid; gap: 2px; }
.pending-header span, .task-panel-heading span { color: var(--muted); font-size: 12px; }
.button-quiet { height: 32px; padding: 0 12px; border-radius: 5px; font-size: 13px; font-weight: 500; }
.current-batch-list { flex: 1; min-height: 0; margin-top: 10px; overflow: auto; }
.current-batch-row { min-height: 42px; display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(150px, .8fr) 100px minmax(100px, auto); align-items: center; gap: 10px; border-bottom: 1px solid #eef0f3; font-size: 13px; }
.current-batch-file { min-width: 0; display: flex; align-items: center; gap: 8px; }
.current-batch-file strong, .current-batch-stage { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.current-batch-stage { color: var(--muted); }
.current-batch-actions { display: flex; justify-content: flex-end; gap: 8px; }
.current-batch-empty { min-height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.task-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.task-panel-heading > div { display: grid; gap: 2px; }
.import-history-panel { margin-top: 16px; }

.import-upload-panel { padding: 18px 22px 22px; }
.import-upload-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.import-upload-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.import-upload-heading > span { color: var(--muted); font-size: 12px; }
.import-upload-panel .dropzone { height: 150px; margin-top: 14px; }
.import-unified-panel { margin-top: 16px; }
.import-unified-panel .task-body { max-height: 560px; overflow-y: auto; scrollbar-gutter: stable; }
.import-unified-panel .task-row { min-height: 52px; }
.import-unified-panel .task-cell { padding-top: 9px; padding-bottom: 9px; }
.import-record-table-wrap { max-height: 560px; overflow: auto; scrollbar-gutter: stable; }
.import-record-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.import-record-table th { position: sticky; top: 0; z-index: 2; height: 42px; padding: 0 14px; color: #657184; text-align: left; border-bottom: 1px solid var(--border); background: #f7f8fa; font-size: 12px; font-weight: 600; }
.import-record-table td { height: 52px; padding: 9px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid #e7eaf0; font-size: 13px; }
.import-record-table th:nth-child(1) { width: 7%; }
.import-record-table th:nth-child(2) { width: 39%; }
.import-record-table th:nth-child(3) { width: 18%; }
.import-record-table th:nth-child(4) { width: 21%; }
.import-record-table th:nth-child(5) { width: 15%; }
.import-record-table .task-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-record-table .task-operations { white-space: nowrap; }
.import-batch-row > td { height: auto; padding: 0; border-bottom: 0; }
.import-record-view-switch { display: inline-flex; flex: none; }
.import-record-view-switch button { min-width: 108px; height: 36px; padding: 0 14px; color: #667287; border: 1px solid #d6dfeb; border-radius: 9px; background: #fff; font-size: 12px; cursor: pointer; }
.import-record-view-switch button.active { color: var(--primary); border-color: #c3d4f2; background: #fff; box-shadow: none; font-weight: 600; }
.import-record-table tbody .import-record-row:hover { background: #fafcff; }
.import-batch-bar { min-height: 42px; display: grid; grid-template-columns: minmax(180px, 1fr) 150px minmax(260px, 1fr); align-items: center; gap: 18px; padding: 0 16px; color: #56647a; border-top: 1px solid #e2e8f1; border-bottom: 1px solid #e2e8f1; background: #fff; font-size: 12px; }
.import-batch-bar strong { color: #24344f; font-size: 13px; }
.import-batch-bar span:last-child { text-align: right; }
.import-task-empty { min-height: 160px; display: grid; place-items: center; color: var(--muted); }
.import-unified-row .task-cell:nth-child(4) { white-space: normal; }

.upload-list {
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  padding-right: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.upload-row {
  height: 38px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 136px 118px 30px;
  align-items: center;
  column-gap: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}

.upload-file,
.upload-meta,
.upload-state {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file {
  display: flex;
  align-items: center;
  gap: 6px;
}

.upload-check {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
}

.document-icon {
  position: relative;
  width: 10px;
  height: 12px;
  flex: none;
  border: 1.4px solid currentColor;
  border-radius: 2px;
  opacity: 0.7;
}

.document-icon::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 4px;
  height: 4px;
  background: var(--surface);
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.upload-meta {
  color: var(--muted);
}

.tone-primary {
  color: var(--primary);
}

.tone-success {
  color: var(--success);
}

.tone-danger {
  color: var(--danger);
}

.tone-muted {
  color: var(--muted);
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.icon-button {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--text);
  background: #f2f3f5;
}

.pending-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.button {
  height: 40px;
  padding: 0 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.button:hover:not(:disabled) {
  border-color: #b7bac0;
  background: #fafafa;
}

.button-primary {
  width: 133px;
  min-width: 133px;
  padding: 0 12px;
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.button-primary:hover:not(:disabled) {
  border-color: #245bdb;
  background: #245bdb;
}

.button-danger {
  border-color: var(--danger);
  color: #fff;
  background: var(--danger);
}

.button-danger:hover:not(:disabled) {
  border-color: #c92d25;
  background: #c92d25;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pending-actions > .button:not(.button-primary) {
  width: 112px;
  padding: 0 12px;
}

.task-panel {
  position: relative;
  height: calc(100vh - 406px);
  min-height: 520px;
  margin-top: 19px;
  padding: 20px 23px 24px;
}

.task-table {
  margin-top: 8px;
}

.task-header,
.task-row {
  display: grid;
  grid-template-columns: 6.25% 40.96% 17.95% 13.9% 20.94%;
  align-items: center;
}

.task-header {
  height: 39px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.task-row {
  height: 72px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}

.task-row:last-child {
  border-bottom-color: transparent;
}

.task-cell {
  min-width: 0;
  padding: 0 2px;
}

.task-name {
  padding-right: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-status {
  font-weight: 600;
}

.task-operations {
  display: flex;
  align-items: center;
  gap: 0;
}

.link-button {
  padding: 2px 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
}

.link-button:hover {
  color: #245bdb;
}

.link-button + .link-button::before {
  content: "|";
  margin: 0 8px;
  color: #b7bac0;
}

.no-operation {
  color: #bbbfc4;
}

.pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.page-button {
  min-width: 20px;
  height: 24px;
  padding: 0 5px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.page-button:hover,
.page-button:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
}

.page-button.active {
  color: var(--primary);
  background: transparent;
}

.page-button.nav-page {
  min-width: auto;
  padding: 0 3px;
}

.placeholder {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 18px;
  background: var(--page-bg);
}

.review-workspace {
  min-height: 100vh;
  padding: 16px 24px 20px;
  display: grid;
  grid-template-rows: auto auto;
  gap: 16px;
}

.review-queue-panel,
.source-preview-panel,
.review-editor-panel {
  min-height: 0;
  overflow: visible;
}

.review-queue-panel {
  padding: 14px 18px 10px;
  display: flex;
  flex-direction: column;
}

.review-panel-header,
.editor-topbar,
.detail-panel-heading,
.review-actions {
  flex: none;
}

.review-panel-header,
.review-panel-header > div,
.editor-topbar,
.detail-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-panel-header > div {
  justify-content: flex-start;
  gap: 10px;
}

.review-section-title {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
}

.review-count,
.filter-note {
  color: var(--muted);
  font-size: 13px;
}

.filter-note {
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-filters {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
}

.review-upload-button {
  width: auto;
  height: 32px;
  margin-left: auto;
  padding: 0 18px;
}

.review-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.review-filters select,
.editor-meta-grid input,
.review-editor-panel textarea {
  border: 1px solid #d6d9de;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
}

.review-filters select {
  width: 150px;
  height: 32px;
  padding: 0 30px 0 10px;
}

.review-queue-head,
.review-queue-row {
  display: grid;
  grid-template-columns: 6% minmax(260px, 38%) 17% minmax(220px, 27%) 12%;
  align-items: center;
  column-gap: 12px;
}

.review-queue-head {
  height: 30px;
  flex: none;
  margin-top: 7px;
  padding: 0 12px;
  color: var(--muted);
  background: #f7f8fa;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
}

.review-queue-scroll {
  flex: none;
  overflow: visible;
}

.review-queue-row {
  width: 100%;
  min-height: 54px;
  padding: 7px 12px;
  border: 0;
  border-bottom: 1px solid #eceef1;
  border-radius: 0;
  text-align: left;
  color: var(--text);
  background: #fff;
}

.review-queue-row:hover {
  background: #f8faff;
}

.review-queue-row.selected {
  background: #edf3ff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.review-queue-row > span {
  min-width: 0;
  overflow: hidden;
}

.review-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.danger-link {
  color: var(--danger) !important;
}

.review-queue-row strong,
.review-queue-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-queue-row strong {
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
}

.review-queue-row small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.pending-status {
  color: #b26a00;
  font-size: 13px;
  font-weight: 600;
}

.review-pagination {
  height: 28px;
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.review-pagination .page-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.review-empty,
.review-detail-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.review-detail-empty {
  align-content: center;
  gap: 8px;
}

.review-detail-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(440px, 44%) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.source-preview-panel,
.review-editor-panel {
  display: flex;
  flex-direction: column;
}

.detail-panel-heading,
.editor-topbar {
  min-height: 58px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.detail-panel-heading > div,
.editor-topbar > div:first-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.detail-panel-heading strong,
.editor-topbar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 20px;
}

.detail-panel-heading > span {
  flex: none;
  margin-left: 10px;
  color: var(--primary);
  font-size: 12px;
}

.section-kicker {
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.source-preview-scroll,
.review-editor-scroll {
  flex: none;
  min-height: 0;
  overflow-y: visible;
}

.source-preview-scroll {
  padding: 12px 14px 20px;
  overflow-x: auto;
  overflow-y: clip;
  background: #eef0f3;
}

.source-page-stack {
  margin: 0 auto;
}

.source-page-stack figure {
  margin: 0 0 12px;
  padding: 8px;
  border: 1px solid #d5d8dd;
  background: #fff;
  box-shadow: 0 1px 3px rgba(31, 40, 55, 0.08);
}

.source-page-stack img {
  display: block;
  width: 100%;
  height: auto;
}

.source-page-stack figcaption {
  padding-top: 6px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.source-preview-missing {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
}

.source-structured-original {
  margin: 14px auto;
  padding: 28px 32px;
  background: #fff;
  color: var(--text);
}

.source-structured-original section + section {
  margin-top: 22px;
}

.source-structured-original h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.source-option-list {
  display: grid;
  gap: 8px;
}

.source-option-list > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
}

.preview-zoom-controls {
  min-height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.preview-zoom-controls output {
  width: 48px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.question-block {
  padding: 14px 0;
  border-bottom: 1px solid #e7e9ec;
}

.question-block:last-child {
  border-bottom: 0;
}

.question-block > h3 {
  margin: 0 0 9px;
  color: var(--primary);
  font-size: 14px;
  line-height: 20px;
}

.markdown-body,
.child-preview-card,
.structured-options {
  color: #2b3038;
  font-size: 13px;
  line-height: 1.75;
}

.markdown-body p,
.child-preview-card p {
  margin: 0 0 9px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 14px 0 7px;
  color: var(--text);
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0;
}

.markdown-body ul {
  margin: 5px 0 10px;
  padding-left: 22px;
}

.markdown-body blockquote {
  margin: 8px 0;
  padding: 7px 10px;
  border-left: 3px solid #9bbaff;
  color: var(--muted);
  background: #f6f9ff;
}

.markdown-body hr {
  margin: 15px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.markdown-table-wrap {
  max-width: 100%;
  margin: 8px 0 14px;
  overflow-x: auto;
}

.markdown-table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.55;
}

.markdown-table th,
.markdown-table td {
  min-width: 92px;
  padding: 7px 8px;
  border: 1px solid #dfe2e7;
  text-align: left;
  vertical-align: top;
}

.markdown-table th {
  background: #f6f7f9;
}

.math-token {
  color: #1c2b46;
  font-family: "Times New Roman", serif;
}

.blank-token {
  position: relative;
  display: inline-flex;
  width: 70px;
  min-width: 54px;
  height: 1.35em;
  align-items: flex-end;
  justify-content: center;
  margin: 0 4px;
  border-bottom: 1px solid #344054;
  color: #344054;
  font-family: "Times New Roman", serif;
  line-height: 1;
  vertical-align: baseline;
}

.blank-token.current-blank {
  border-bottom-color: var(--primary);
  background: #eef4ff;
}

.blank-token.current-blank::after {
  content: "本题";
  padding-bottom: 2px;
  color: var(--primary);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 10px;
}

.blank-token.underline-fill {
  width: 92px;
}

.math-display {
  display: block;
  margin: 7px 0;
  overflow-x: auto;
}

.anchored-question-image {
  margin: 12px auto;
  text-align: center;
}

.anchored-question-image img,
.evidence-group img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.anchored-question-image img {
  max-height: 330px;
}

.anchored-question-image figcaption,
.evidence-group figcaption {
  margin-top: 5px;
  color: #8a8f98;
  font-size: 10px;
}

.structured-options,
.evidence-group {
  margin-top: 8px;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
  background: #fafbfc;
}

.structured-options summary,
.evidence-group summary {
  padding: 8px 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.structured-option-list {
  padding: 0 10px 8px;
}

.structured-option-list > div {
  padding: 3px 0;
}

.child-preview-card {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
}

.child-preview-title {
  margin-bottom: 6px;
  font-weight: 700;
}

.answer-line {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed #dfe2e7;
}

.answer-line strong {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.evidence-group {
  margin-top: 18px;
}

.evidence-group figure {
  margin: 0;
  padding: 10px;
  border-top: 1px solid #e3e5e8;
}

.editor-navigation {
  display: flex;
  gap: 6px;
}

.icon-button.bordered {
  border: 1px solid var(--border);
}

.icon-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.review-banner {
  min-height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-bottom: 1px solid;
  font-size: 12px;
}

.banner-info {
  color: #245bdb;
  border-color: #cbdcff;
  background: #f2f6ff;
}

.banner-danger,
.banner-warning {
  color: #a9322b;
  border-color: #f0c6c3;
  background: #fff4f3;
}

.editor-meta-grid {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr 1fr;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.editor-meta-grid > label,
.editor-meta-field,
.editor-label,
.child-editor label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.editor-meta-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.searchable-combobox {
  position: relative;
}

.search-combobox-control {
  position: relative;
}

.search-combobox-control input[type="text"] {
  padding-right: 34px;
}

.search-combobox-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-left: 1px solid #e4e7eb;
  background: transparent;
  color: #697386;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.search-combobox-toggle:hover,
.search-combobox-toggle:focus-visible {
  background: #f3f6fb;
  color: var(--primary);
}

.search-combobox-dropdown {
  position: absolute;
  z-index: 40;
  top: 57px;
  right: 0;
  left: 0;
  max-height: 208px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #d6dce6;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 8px 20px rgb(22 34 51 / 14%);
}

.search-combobox-dropdown[hidden] {
  display: none;
}

.search-combobox-dropdown button {
  width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.search-combobox-dropdown button:hover,
.search-combobox-dropdown button:focus-visible {
  background: #edf4ff;
  color: var(--primary);
}

.search-combobox-empty {
  padding: 8px 9px;
  color: #8a8f98;
  font-size: 12px;
}

.editor-meta-grid input[type="text"] {
  width: 100%;
  height: 34px;
  padding: 0 9px;
}

.editor-meta-grid small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a8f98;
  font-size: 10px;
  font-weight: 400;
}

.difficulty-field,
.editor-fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
}

.difficulty-field {
  padding: 0;
}

.difficulty-field legend,
.editor-fieldset legend {
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.difficulty-field > div {
  height: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 5px;
  border: 1px solid #d6d9de;
  border-radius: 5px;
  overflow: hidden;
}

.difficulty-field label {
  min-width: 0;
  display: grid;
  place-items: center;
  border-right: 1px solid #e2e4e8;
  cursor: pointer;
}

.difficulty-field label:last-child {
  border-right: 0;
}

.difficulty-field input {
  position: absolute;
  opacity: 0;
}

.difficulty-field span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
}

.difficulty-field input:checked + span {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 700;
}

.review-editor-scroll {
  padding: 13px 16px 18px;
}

.rich-toolbar {
  min-height: 42px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.rich-toolbar button,
.rich-toolbar select {
  height: 30px;
  border: 1px solid #d8dbe0;
  border-radius: 4px;
  color: var(--text);
  background: #fff;
  font-size: 12px;
}

.color-control {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  border: 1px solid #d8dbe0;
  border-radius: 4px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
}

.color-control input[type="color"] {
  width: 22px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.rich-toolbar button {
  min-width: 30px;
  padding: 0 8px;
  cursor: pointer;
}

.rich-toolbar button:hover {
  border-color: #9bb7f5;
  background: #f3f7ff;
}

.rich-toolbar select {
  padding: 0 24px 0 8px;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: #dfe2e7;
}

.rich-section {
  margin-bottom: 13px;
  border: 1px solid #dfe2e7;
  border-radius: 6px;
  background: #fff;
}

.rich-section > h3 {
  margin: 0;
  padding: 8px 11px;
  border-bottom: 1px solid #e6e8ec;
  color: #4a5260;
  background: #f8f9fb;
  font-size: 12px;
  line-height: 18px;
}

.rich-editable {
  min-height: 46px;
  padding: 10px 12px;
  color: #272d36;
  font-size: 13px;
  line-height: 1.7;
  outline: none;
  overflow-wrap: anywhere;
}

.rich-editable:focus {
  box-shadow: inset 0 0 0 2px rgba(51, 112, 255, 0.18);
}

.rich-editable p {
  margin: 0 0 8px;
}

.rich-option-list {
  padding: 8px 10px 10px;
}

.rich-option-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  margin-top: 6px;
}

.rich-option-row > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
}

.rich-option-row .rich-editable {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #e0e3e8;
  border-radius: 4px;
}

.editor-inline-image {
  margin: 8px 12px 12px;
  padding: 8px;
  border: 1px solid #e1e4e8;
  text-align: center;
  background: #fafbfc;
}

.editor-inline-image img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  margin: 0 auto;
  object-fit: contain;
}

.editor-inline-image figcaption,
.rich-field-caption {
  color: var(--muted);
  font-size: 10px;
}

.editor-inline-image figcaption {
  margin-top: 5px;
}

.rich-field-caption {
  padding: 8px 10px 0;
  font-weight: 600;
}

.child-editor .rich-editable {
  margin: 5px 9px 9px;
  border: 1px solid #e0e3e8;
  border-radius: 4px;
}

.child-option-list {
  margin: 0 9px 9px;
  padding: 4px 0;
}

.child-option-list .rich-editable {
  margin: 0;
  min-height: 34px;
  padding: 6px 8px;
}

.workbench-dialog {
  width: min(680px, calc(100vw - 48px));
  max-height: calc(100vh - 60px);
  padding: 0;
  border: 0;
  border-radius: 7px;
  box-shadow: 0 18px 60px rgba(22, 31, 48, 0.28);
}

.workbench-dialog::backdrop {
  background: rgba(27, 35, 49, 0.42);
}

.workbench-dialog form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.dialog-heading,
.workbench-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.workbench-dialog label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.workbench-dialog input,
.workbench-dialog select,
.workbench-dialog textarea {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #d6d9de;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
}

.workbench-dialog textarea {
  resize: vertical;
}

.workbench-dialog footer {
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.workbench-dialog footer .button {
  width: auto;
}

.formula-preview {
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid #e0e3e8;
  border-radius: 5px;
  background: #fafbfc;
}

.upload-question-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dialog-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
}

.review-editor-panel textarea {
  width: 100%;
  min-height: 62px;
  padding: 8px 10px;
  resize: vertical;
  color: #30343b;
  font-size: 13px;
  line-height: 1.6;
}

.review-editor-panel input:focus,
.review-editor-panel textarea:focus,
.review-filters select:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(51, 112, 255, 0.12);
}

.has-field-error {
  color: var(--danger) !important;
}

.has-field-error input[type="text"],
.has-field-error textarea,
.difficulty-field.has-field-error > div {
  border-color: var(--danger);
  background: #fff9f8;
}

.editor-label + .editor-label,
.editor-fieldset + .editor-label,
.editor-label + .editor-fieldset,
.editor-fieldset + .editor-fieldset {
  margin-top: 14px;
}

.editor-fieldset {
  padding: 10px;
  border: 1px solid #e0e3e8;
  border-radius: 6px;
}

.editor-option-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 8px;
}

.editor-option-row > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
}

.child-editor {
  margin-top: 9px;
  padding: 9px;
  border: 1px solid #e2e4e8;
  border-radius: 5px;
  background: #fafbfc;
}

.child-editor-heading {
  margin-bottom: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.child-editor label + label {
  margin-top: 7px;
}

.review-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.review-actions .button-danger {
  color: var(--danger);
  border-color: #efc2bf;
  background: #fff;
}

.review-actions .button-danger:hover {
  border-color: var(--danger);
  background: #fff5f4;
}

.review-actions .button {
  width: auto;
  min-width: 98px;
  padding: 0 18px;
}

.dirty-state {
  margin-right: auto;
  color: var(--success);
  font-size: 12px;
}

.dirty-state.is-dirty {
  color: #b26a00;
  font-weight: 600;
}

.review-approve {
  min-width: 112px !important;
}

@media (max-width: 1450px) {
  .topnav {
    gap: 6px;
    margin-left: 28px;
  }

  .nav-link {
    min-width: 88px;
    padding: 0 11px;
  }

  .brand-name {
    font-size: 20px;
  }

  .upload-row {
    grid-template-columns: minmax(250px, 1fr) 136px 118px 36px;
  }

  .button {
    padding: 0 21px;
  }

  .review-detail-grid {
    grid-template-columns: minmax(390px, 42%) minmax(0, 1fr);
  }

}

.knowledge-workspace {
  min-height: calc(100vh - 64px);
  padding: 20px 24px 48px;
  background: #f3f5f8;
}

.knowledge-course-panel {
  padding: 20px;
}

.knowledge-heading,
.knowledge-editor-heading,
.knowledge-actions,
.knowledge-linked,
.knowledge-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.knowledge-heading h1 {
  margin: 5px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.knowledge-version-state {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #647184;
}

.knowledge-version-state span,
.knowledge-version-state strong {
  padding: 6px 10px;
  border: 1px solid #dfe4eb;
  border-radius: 4px;
  background: #fff;
}

.knowledge-version-state strong { color: #16885f; }
.knowledge-version-state strong.dirty { color: #a65f00; background: #fff8e8; border-color: #efd49a; }

.knowledge-course-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.knowledge-course-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  min-height: 70px;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid #dfe4eb;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.knowledge-course-option.selected { border-color: #3975ee; box-shadow: inset 3px 0 #3975ee; background: #f5f8ff; }
.knowledge-course-option span { color: #526174; text-align: right; }
.knowledge-course-option small { grid-column: 1 / -1; color: #7a8595; }

.knowledge-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: #536174;
}

.knowledge-breadcrumb b { color: #a5aebb; font-weight: 400; }
.knowledge-open-note { margin-top: 12px; padding: 9px 11px; border-left: 3px solid #d99a24; background: #fff8e8; color: #74510e; font-size: 12px; line-height: 1.6; }

.knowledge-main-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(520px, 1fr) minmax(240px, 300px);
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.knowledge-card-list,
.knowledge-editor-panel,
.knowledge-published-panel { padding: 16px; }

.knowledge-list-heading { margin-bottom: 12px; }
.knowledge-list-heading > div { display: flex; align-items: baseline; gap: 8px; }
.knowledge-list-heading span,
.knowledge-list-heading small { color: #7a8595; font-size: 12px; }

.knowledge-card-stack { display: grid; gap: 8px; }
.knowledge-card-row {
  display: grid;
  grid-template-columns: 22px 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 58px;
  padding: 9px 10px;
  text-align: left;
  border: 1px solid #e0e5ec;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}
.knowledge-card-row.selected { border-color: #3975ee; background: #f2f6ff; }
.knowledge-card-row.dragging { opacity: .45; }
.knowledge-card-row small { display: block; margin-top: 4px; color: #7d8795; }
.drag-handle { color: #929cab; font-size: 18px; cursor: grab; }
.card-order { color: #647184; font-variant-numeric: tabular-nums; }

.knowledge-editor-heading { padding-bottom: 14px; border-bottom: 1px solid #e4e8ee; }
.knowledge-editor-heading > div { display: grid; gap: 4px; }
.knowledge-editor-heading > span { color: #6e7988; font-size: 12px; text-align: right; }
.knowledge-title-field { display: grid; gap: 7px; margin: 16px 0 12px; font-size: 13px; font-weight: 600; color: #48566a; }
.knowledge-title-field input { min-height: 40px; padding: 0 11px; border: 1px solid #d9dfe7; border-radius: 5px; font: inherit; }
.knowledge-rich-editable { min-height: 260px; padding: 18px; border: 1px solid #dfe4eb; border-top: 0; border-radius: 0 0 5px 5px; outline: none; background: #fff; line-height: 1.8; }
.knowledge-rich-editable:focus { box-shadow: inset 0 0 0 2px rgba(57, 117, 238, .16); }
.knowledge-linked { margin-top: 16px; padding: 14px; border: 1px solid #e2e7ed; border-radius: 5px; background: #f8f9fb; }
.knowledge-linked > div { display: grid; gap: 5px; min-width: 0; }
.knowledge-linked span { color: #667386; font-size: 12px; overflow-wrap: anywhere; }
.knowledge-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e4e8ee; }
.knowledge-actions span { color: #6b7788; font-size: 12px; }
.knowledge-published-panel p { color: #606d7e; font-size: 13px; line-height: 1.6; }
.knowledge-published-panel ol { padding-left: 22px; color: #3d4a5c; line-height: 1.8; font-size: 13px; }
.knowledge-empty,
.knowledge-editor-empty { display: grid; place-items: center; gap: 8px; min-height: 180px; padding: 24px; text-align: center; color: #778294; border: 1px dashed #cfd6df; border-radius: 5px; }

@media (max-width: 1280px) {
  .knowledge-main-grid { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
  .knowledge-published-panel { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .knowledge-workspace { padding: 12px; }
  .knowledge-course-options,
  .knowledge-main-grid { grid-template-columns: 1fr; }
  .knowledge-heading { align-items: flex-start; flex-direction: column; }
  .knowledge-version-state { flex-wrap: wrap; }
  .knowledge-published-panel { grid-column: auto; }
}

/* S03: RP structure with the same visual system as S01/S02. */
.knowledge-workspace {
  min-height: 100vh;
  padding: 22px 24px 32px;
  color: var(--text);
  background: var(--page-bg);
}

.knowledge-course-panel { padding: 18px 22px 20px; }
.knowledge-page-heading,
.knowledge-editor-heading,
.knowledge-canvas-heading,
.knowledge-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.knowledge-page-heading { margin-bottom: 18px; }
.knowledge-page-heading h1,
.knowledge-editor-heading h2,
.knowledge-canvas-heading h2 { margin: 0; letter-spacing: 0; }
.knowledge-page-heading h1 { font-size: 20px; line-height: 28px; }
.knowledge-page-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.knowledge-version-chip { padding: 5px 10px; color: var(--success); border: 1px solid #bce9d8; border-radius: 6px; background: #f1fbf7; font-size: 12px; }
.knowledge-version-chip.dirty { color: #a65f00; border-color: #efd49a; background: #fff8e8; }

.knowledge-filter-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.knowledge-filter-row > label { display: grid; gap: 6px; min-width: 126px; color: var(--muted); font-size: 12px; }
.knowledge-filter-row select,
.knowledge-filter-row input { width: 100%; height: 38px; padding: 0 10px; color: var(--text); border: 1px solid var(--border); border-radius: 6px; background: #fff; outline: none; }
.knowledge-filter-row select:focus,
.knowledge-filter-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(51, 112, 255, .12); }
.knowledge-filter-row .knowledge-lecture-filter { min-width: 250px; flex: 1; }
.knowledge-page-actions { display: flex; gap: 8px; margin-left: auto; }
.knowledge-page-actions .button { height: 38px; min-width: 88px; }
.knowledge-page-actions .button:nth-child(2) { color: #fff; border-color: var(--primary); background: var(--primary); }
.button-danger-quiet { color: var(--danger); border-color: #efc8c5; background: #fff; }
.button-compact { min-width: 58px; height: 30px; padding: 0 10px; font-size: 12px; }

.knowledge-main-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); align-items: start; gap: 16px; margin-top: 16px; }
.knowledge-card-list,
.knowledge-editor-panel { min-width: 0; overflow: visible; }
.knowledge-card-list { padding: 0 0 16px; }
.knowledge-canvas-heading { align-items: flex-start; padding: 16px 18px 13px; border-bottom: 1px solid var(--border); }
.knowledge-canvas-heading > div { min-width: 0; }
.knowledge-canvas-heading h2,
.knowledge-editor-heading h2 { font-size: 17px; line-height: 24px; }
.knowledge-canvas-heading span { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-canvas-heading > small { flex: none; padding-top: 3px; color: var(--muted); font-size: 12px; }

.knowledge-card-stack { display: grid; gap: 6px; padding: 12px 12px 4px; }
.knowledge-tree-node { position: relative; min-width: 0; }
.knowledge-tree-node[data-depth="1"] { margin-left: 28px; }
.knowledge-tree-node[data-depth="1"]::before { position: absolute; top: -9px; bottom: 50%; left: -15px; width: 12px; content: ""; border-bottom: 1px solid #cdd5df; border-left: 1px solid #cdd5df; }
.knowledge-tree-node.dragging { opacity: .45; }
.knowledge-card-row { width: 100%; min-height: 60px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 88px 9px 10px; color: var(--text); text-align: left; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; }
.knowledge-card-row:hover { border-color: #a9bfef; background: #f8faff; }
.knowledge-tree-node.selected .knowledge-card-row { border-color: var(--primary); box-shadow: inset 3px 0 var(--primary); background: var(--primary-soft); }
.knowledge-card-row > span:nth-child(2) { min-width: 0; }
.knowledge-card-row small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; }
.knowledge-card-row strong { display: block; overflow: hidden; font-size: 14px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-card-row em { position: absolute; right: 12px; color: var(--primary); font-size: 11px; font-style: normal; }
.knowledge-tree-marker { color: #8b95a3; font-size: 12px; text-align: center; }
.knowledge-tree-actions { position: absolute; top: 50%; right: 8px; z-index: 2; display: none; gap: 3px; transform: translateY(-50%); }
.knowledge-tree-node:hover .knowledge-tree-actions,
.knowledge-tree-node:focus-within .knowledge-tree-actions { display: flex; }
.knowledge-tree-node:hover .knowledge-card-row em { display: none; }
.knowledge-tree-actions button { width: 24px; height: 24px; padding: 0; color: #536174; border: 1px solid #cfd6df; border-radius: 4px; background: #fff; cursor: pointer; }
.knowledge-tree-actions button:hover { color: var(--primary); border-color: var(--primary); }
.knowledge-tree-actions button:disabled { color: #b8bec7; border-color: #e4e7eb; cursor: default; }
.knowledge-add-card { display: block; width: calc(100% - 24px); height: 38px; margin: 10px 12px 0; color: var(--primary); border: 1px dashed #9eb9f5; background: #f7f9ff; }
.knowledge-add-card span { font-size: 16px; }

.knowledge-editor-panel { padding: 0; }
.knowledge-editor-heading { padding: 16px 18px 13px; border-bottom: 1px solid var(--border); }
.knowledge-editor-heading > div span,
.knowledge-editor-heading > span { color: var(--muted); font-size: 12px; }
.knowledge-editor-heading > div span { display: block; margin-top: 3px; }
.knowledge-card-meta { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(260px, 1.2fr) minmax(250px, 1fr); gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.knowledge-card-meta > label,
.knowledge-category-field,
.knowledge-bind-control { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.knowledge-card-meta > label input,
.knowledge-category-trigger { width: 100%; height: 38px; padding: 0 11px; color: var(--text); text-align: left; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

.knowledge-category-picker { position: relative; min-width: 0; }
.knowledge-category-trigger { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.knowledge-category-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-category-trigger b { color: #8d96a3; font-weight: 400; }
.knowledge-category-menu { position: absolute; top: calc(100% + 5px); left: 0; z-index: 30; display: none; width: 176px; padding: 5px; border: 1px solid var(--border); border-radius: 6px; background: #fff; box-shadow: 0 8px 24px rgba(31, 35, 41, .14); }
.knowledge-category-picker.open .knowledge-category-menu { display: block; }
.knowledge-category-item { position: relative; }
.knowledge-category-item > button,
.knowledge-category-submenu button { width: 100%; min-height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; color: var(--text); text-align: left; border: 0; border-radius: 4px; background: #fff; cursor: pointer; }
.knowledge-category-item > button:hover,
.knowledge-category-submenu button:hover { color: var(--primary); background: var(--primary-soft); }
.knowledge-category-submenu { position: absolute; top: -5px; left: calc(100% + 5px); display: none; width: 154px; padding: 5px; border: 1px solid var(--border); border-radius: 6px; background: #fff; box-shadow: 0 8px 24px rgba(31, 35, 41, .14); }
.knowledge-category-item.has-children:hover .knowledge-category-submenu,
.knowledge-category-item.has-children:focus-within .knowledge-category-submenu { display: block; }

.knowledge-bind-control > div { display: flex; align-items: center; gap: 8px; }
.knowledge-mount-toggle { min-width: 0; height: 38px; display: flex; align-items: center; gap: 7px; flex: 1; padding: 0 10px; color: var(--text); border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.knowledge-mount-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.knowledge-mount-toggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-bind-control .button { height: 38px; flex: none; color: var(--primary); border-color: #9eb9f5; background: #fff; }

.knowledge-editor-panel .rich-toolbar { margin: 14px 18px 0; border: 1px solid var(--border); border-radius: 6px 6px 0 0; background: #f8f9fb; }
.knowledge-rich-editable { min-height: 510px; margin: 0 18px; padding: 22px; overflow: visible; color: #2f3847; line-height: 1.75; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 6px 6px; outline: none; background: #fff; }
.knowledge-rich-editable:focus { box-shadow: inset 0 0 0 2px rgba(51, 112, 255, .12); }
.knowledge-rich-editable h3 { margin: 22px 0 8px; font-size: 15px; }
.knowledge-rich-editable p { margin: 0 0 14px; }
.knowledge-formula-block { padding: 12px; text-align: center; border-radius: 4px; background: #f8f9fb; }
.knowledge-table-block { margin: 18px 0; }
.knowledge-table-block > figcaption { margin-bottom: 7px; color: #455267; font-size: 13px; font-weight: 600; }
.knowledge-table-scroll { max-width: 100%; overflow-x: auto; }
.editor-content-table { width: 100%; min-width: 560px; border-collapse: collapse; table-layout: fixed; }
.editor-content-table th,
.editor-content-table td { min-width: 100px; padding: 9px 11px; text-align: left; vertical-align: top; border: 1px solid #d7dde5; }
.editor-content-table th { color: #3e4b5f; background: #f5f7fa; font-weight: 600; }
.knowledge-content-image,
.knowledge-rich-editable .editor-inline-image { width: min(430px, 100%); margin: 18px auto; }
.knowledge-content-image img,
.knowledge-rich-editable .editor-inline-image img { display: block; max-width: 100%; max-height: 340px; margin: 0 auto; object-fit: contain; }
.knowledge-content-image figcaption,
.knowledge-rich-editable .editor-inline-image figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; text-align: center; }

.knowledge-actions { margin: 16px 18px 18px; }
.knowledge-actions > span { color: var(--muted); font-size: 12px; }
.knowledge-actions > div { display: flex; gap: 8px; }
.knowledge-actions .button { min-width: 92px; height: 38px; }
.knowledge-actions .button-primary { color: #fff; border-color: var(--primary); background: var(--primary); }
.knowledge-empty,
.knowledge-editor-empty { display: grid; place-items: center; gap: 8px; min-height: 220px; padding: 28px; color: var(--muted); text-align: center; }

.knowledge-preview-dialog { width: min(980px, calc(100vw - 48px)); }
.knowledge-preview-tabs { display: flex; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.knowledge-preview-tabs button { height: 38px; padding: 0 16px; border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.knowledge-preview-tabs button.active { color: var(--primary); border-color: #9eb9f5; background: var(--primary-soft); font-weight: 600; }
[data-knowledge-preview-content] { max-height: 70vh; padding: 20px; overflow: auto; }
[data-knowledge-preview-content] section { padding: 15px 0; border-bottom: 1px solid var(--border); line-height: 1.7; }

@media (max-width: 1360px) {
  .knowledge-main-grid { grid-template-columns: 320px minmax(0, 1fr); }
  .knowledge-card-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-bind-control { grid-column: 1 / -1; }
}

/* S04-S07: shared Alpha workbench surfaces. */
.alpha-workspace { min-height: 100vh; padding: 22px 24px 36px; color: var(--text); background: var(--page-bg); }
.alpha-workspace > section + section { margin-top: 16px; }
.alpha-heading,
.alpha-section-title,
.alpha-phase-header,
.alpha-panel-footer,
.alpha-bottom-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.alpha-heading h1,
.alpha-phase-header h1 { margin: 0; font-size: 20px; line-height: 28px; letter-spacing: 0; }
.alpha-heading p,
.alpha-phase-header p,
.alpha-section-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.alpha-heading > span,
.alpha-section-title > span { color: var(--muted); font-size: 13px; }
.alpha-filter-panel,
.alpha-phase-header,
.alpha-export-config { padding: 18px 22px; }
.alpha-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)) minmax(220px, 1.5fr); gap: 12px; margin-top: 18px; }
.alpha-filter-grid label,
.alpha-dialog-body label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.alpha-filter-grid select,
.alpha-filter-grid input,
.alpha-dialog-body select,
.alpha-dialog-body textarea,
.alpha-basket-item select { width: 100%; min-height: 38px; padding: 0 10px; color: var(--text); border: 1px solid var(--border); border-radius: 6px; background: #fff; outline: none; }
.alpha-dialog-body textarea { padding: 10px; resize: vertical; }
.alpha-filter-grid select:focus,
.alpha-filter-grid input:focus,
.alpha-dialog-body select:focus,
.alpha-dialog-body textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(51, 112, 255, .12); }
.alpha-context-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 9px 12px; color: #40506a; border: 1px solid #cddbf9; border-radius: 6px; background: #f3f7ff; font-size: 12px; }
.alpha-context-bar span { padding-left: 8px; border-left: 1px solid #cddbf9; }
.alpha-two-column { display: grid; grid-template-columns: minmax(420px, .85fr) minmax(0, 1.35fr); align-items: start; gap: 16px; }
.alpha-result-panel,
.alpha-detail-panel,
.alpha-basket-panel,
.alpha-version-workbench,
.alpha-toc,
.alpha-handout-paper,
.alpha-job-history,
.alpha-bottom-actions { min-width: 0; padding: 0; overflow: visible; }
.alpha-section-title { min-height: 60px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.alpha-section-title h2 { margin: 0; font-size: 17px; line-height: 24px; letter-spacing: 0; }
.alpha-section-title .button { min-width: 120px; }
.alpha-question-list { display: grid; }
.alpha-question-row { border-bottom: 1px solid var(--border); background: #fff; }
.alpha-question-row.expanded { box-shadow: inset 3px 0 var(--primary); background: #f8faff; }
.alpha-question-row-main { display: grid; grid-template-columns: 18px minmax(220px, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; }
.alpha-question-row-main > input { width: 16px; height: 16px; accent-color: var(--primary); }
.alpha-question-summary { min-width: 0; display: grid; gap: 4px; }
.alpha-question-row-main strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.alpha-question-stem-preview { display: -webkit-box; max-width: 760px; margin: 1px 0; overflow: hidden; color: #3f4b5e; font-size: 13px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.alpha-question-preview-missing { color: var(--muted); font-style: italic; }
.alpha-question-row-main span { color: var(--muted); font-size: 12px; }
.alpha-question-basic-info { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 3px; }
.alpha-question-basic-info label,
.alpha-question-basic-stars { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 8px; color: #536176; border: 1px solid #d9e1ee; border-radius: 999px; background: #fbfcff; font-size: 12px; line-height: 1; }
.alpha-question-basic-info label { cursor: pointer; }
.alpha-question-basic-info label:hover,
.alpha-question-basic-stars:hover { border-color: #a8bbdf; background: #f4f8ff; }
.alpha-question-basic-info b { color: #7b8494; font-weight: 500; }
.alpha-question-basic-info select { max-width: 156px; height: 22px; padding: 0 18px 0 4px; color: #31415b; border: 0; border-radius: 999px; background: transparent; font: inherit; font-weight: 600; cursor: pointer; }
.alpha-question-basic-info select:focus { outline: 1px solid #9db7f5; background: #fff; }
.alpha-question-basic-stars button { width: 16px; height: 20px; padding: 0; color: #c9d0db; border: 0; background: transparent; font-size: 14px; line-height: 1; cursor: pointer; }
.alpha-question-basic-stars button.active { color: #b7892e; }
.alpha-question-row-actions { display: flex; align-items: center; gap: 5px; }
.alpha-question-row-actions button { padding: 4px 7px; color: #3a6ed8; border: 0; background: transparent; font-size: 12px; white-space: nowrap; cursor: pointer; }
.alpha-question-row-actions button:disabled { color: #a8b0be; cursor: not-allowed; }
.alpha-question-row-actions button + button { border-left: 1px solid #d8dee8; }
.alpha-question-row-actions button.primary { color: #1598d0; }
.alpha-question-expansion { margin: 0 16px 16px 44px; padding: 16px 18px; border: 1px solid #dbe2ed; border-radius: 5px; background: #fff; }
.alpha-question-expansion-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.alpha-question-expansion-heading span { color: var(--muted); font-size: 12px; }
.alpha-question-expansion .alpha-question-content,
.alpha-question-expansion .alpha-question-answer-panel { padding-top: 4px; }
.alpha-question-answer-panel { color: #2f3847; line-height: 1.7; }
.alpha-child-selector { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 13px 44px; }
.alpha-child-selector label,
.alpha-version-checks label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; color: #4b5870; border: 1px solid #d8dee8; border-radius: 5px; background: #fff; font-size: 12px; }
.alpha-child-selector input,
.alpha-version-checks input { accent-color: var(--primary); }
.alpha-question-inline-settings { margin: -2px 16px 14px 44px; padding: 10px 12px; border: 1px solid #dce4f0; border-radius: 6px; background: #fbfcff; box-shadow: inset 3px 0 0 #dbe7ff; }
.alpha-question-setting-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(190px, auto); gap: 10px 12px; align-items: end; }
.alpha-question-setting-row + .alpha-question-setting-row { margin-top: 9px; padding-top: 9px; border-top: 1px dashed #d6deea; }
.alpha-question-setting-row.compact { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.alpha-question-setting-row > label { display: grid; gap: 5px; color: #657086; font-size: 12px; }
.alpha-question-setting-row select { width: 100%; height: 34px; padding: 0 9px; color: #243149; border: 1px solid #d2d9e5; border-radius: 5px; background: #fff; }
.alpha-question-difficulty-control { display: grid; gap: 5px; color: #657086; font-size: 12px; }
.alpha-question-difficulty-control > div { display: flex; align-items: center; gap: 2px; min-height: 34px; }
.alpha-question-difficulty-control button { width: 25px; height: 28px; padding: 0; color: #d2d6de; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; }
.alpha-question-difficulty-control button.active { color: #b7892e; }
.alpha-question-difficulty-control em { margin-left: 6px; color: var(--muted); font-style: normal; font-size: 11px; }
.alpha-question-setting-row.compact > span { color: #657086; font-size: 12px; }
.alpha-question-version-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.alpha-question-version-chips label { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; color: #596579; border: 1px solid #d8dee8; border-radius: 999px; background: #fff; cursor: pointer; }
.alpha-question-version-chips label.active { color: #205f56; border-color: #93c2b8; background: #eef8f5; font-weight: 700; }
.alpha-question-version-chips input { accent-color: #276c61; }
.alpha-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; background: #fff; }
.alpha-pagination span { color: var(--muted); font-size: 12px; }
.alpha-detail-panel > .alpha-question-content { padding: 18px; }
.alpha-question-content { min-width: 0; color: #2f3847; line-height: 1.7; }
.alpha-question-content h3 { margin: 0 0 16px; font-size: 18px; letter-spacing: 0; }
.alpha-question-content h4 { margin: 18px 0 8px; color: #4a576d; font-size: 13px; letter-spacing: 0; }
.alpha-question-content h5 { margin: 0 0 8px; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.alpha-rich-text p { margin: 0 0 10px; }
.content-blank { display: inline-block; min-width: 42px; color: var(--primary); text-align: center; border-bottom: 1px solid #90a9d9; }
.alpha-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 12px 0; padding: 0; list-style: none; }
.alpha-options li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 5px; padding: 8px 10px; border: 1px solid #e0e4ea; border-radius: 5px; background: #fafbfc; }
.alpha-options li p { margin: 0; }
.alpha-question-image { width: min(620px, 100%); margin: 16px auto; }
.alpha-question-image img { display: block; max-width: 100%; max-height: 520px; margin: 0 auto; object-fit: contain; }
.alpha-question-image figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; text-align: center; }
.alpha-child-group { margin-top: 18px; }
.alpha-child-question { padding: 16px 0; border-top: 1px solid var(--border); }
.alpha-answer,
.alpha-analysis { margin-top: 12px; padding: 10px 12px; border-radius: 5px; }
.alpha-answer { color: #236c51; background: #f0faf6; }
.alpha-analysis { color: #455267; background: #f7f8fa; }
.alpha-answer > b,
.alpha-analysis > b { display: block; margin-bottom: 4px; font-size: 12px; }
.alpha-answer p,
.alpha-analysis p { margin: 0; }
.alpha-actions { display: flex; align-items: center; gap: 8px; }
.alpha-save-state { color: var(--muted); font-size: 12px; }
.alpha-basket-list { display: grid; }
.alpha-basket-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) 110px 72px; align-items: center; gap: 12px; min-height: 74px; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.alpha-order-actions { display: flex; align-items: center; gap: 4px; }
.alpha-order-actions button { min-width: 26px; height: 28px; padding: 0 6px; color: #526076; border: 1px solid #d5dbe4; border-radius: 4px; background: #fff; cursor: pointer; }
.alpha-order-actions button:disabled { color: #b9c0ca; background: #f7f8fa; cursor: default; }
.alpha-basket-content { min-width: 0; }
.alpha-basket-content > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alpha-child-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.alpha-child-chips button { padding: 3px 6px; color: #49618c; border: 1px solid #cfdbf3; border-radius: 4px; background: #f5f8ff; font-size: 11px; cursor: pointer; }
.alpha-basket-item > label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.alpha-panel-footer,
.alpha-bottom-actions { min-height: 66px; padding: 13px 18px; }
.alpha-panel-footer > span,
.alpha-bottom-actions > span { color: var(--muted); font-size: 12px; }
.alpha-empty { display: grid; place-items: center; min-height: 160px; padding: 24px; color: var(--muted); text-align: center; }
.alpha-breadcrumb { display: block; margin-bottom: 5px; color: var(--primary); font-size: 12px; }
.alpha-phase-header { flex-wrap: wrap; }
.alpha-version-chip { padding: 5px 10px; color: var(--success); border: 1px solid #bce9d8; border-radius: 6px; background: #f1fbf7; font-size: 12px; }
.alpha-version-chip.dirty { color: #a65f00; border-color: #efd49a; background: #fff8e8; }
.alpha-version-tabs,
.alpha-segmented { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 6px; background: #f5f7fa; }
.alpha-version-tabs { margin: 15px 18px; }
.alpha-version-tabs button,
.alpha-segmented button { min-width: 88px; height: 34px; padding: 0 13px; color: #586579; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.alpha-version-tabs button.active,
.alpha-segmented button.active { color: var(--primary); box-shadow: 0 1px 3px rgba(31, 35, 41, .12); background: #fff; font-weight: 600; }
.alpha-s05-scope { padding: 0 24px 22px; overflow: hidden; }
.alpha-s05-heading { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 -24px 18px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: #fff; }
.alpha-s05-heading > div:first-child { min-width: 0; }
.alpha-s05-heading span { color: var(--primary); font-size: 12px; font-weight: 700; }
.alpha-s05-heading h1 { margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.alpha-s05-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.alpha-s05-save-state { flex: 0 0 auto; display: grid; justify-items: end; gap: 3px; }
.alpha-s05-save-state b { color: var(--success); font-size: 13px; }
.alpha-s05-save-state span { color: var(--muted); font-size: 11px; font-weight: 400; }
.alpha-s05-filter-row { display: grid; grid-template-columns: 146px 146px 146px minmax(220px, 1fr) auto; align-items: end; gap: 18px; }
.alpha-s05-filter-row label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
.alpha-s05-filter-row select { width: 100%; height: 38px; padding: 0 10px; color: var(--text); border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.alpha-s05-actions { display: flex; gap: 12px; justify-content: flex-end; }
.alpha-s05-actions .button { width: auto; min-width: 112px; }
.alpha-s05-title-row { min-height: 52px; display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; color: #4c586d; border-top: 1px solid #edf0f4; }
.alpha-s05-title-row strong { font-size: 14px; }
.alpha-s05-title-row span { color: var(--muted); font-size: 12px; }
.alpha-s05-title-row > .alpha-version-tabs { margin: 0 auto; }
.alpha-s05-knowledge-cards { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 2px; }
.alpha-s05-knowledge-cards button { min-width: 230px; min-height: 68px; padding: 11px 14px; text-align: left; border: 1px solid var(--border); border-radius: 5px; background: #fff; cursor: pointer; }
.alpha-s05-knowledge-cards button.active { border-color: #9bb5ef; background: #edf3ff; box-shadow: inset 3px 0 0 var(--primary); }
.alpha-s05-knowledge-cards strong { display: block; overflow: hidden; color: var(--text); font-size: 15px; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
.alpha-s05-knowledge-cards button.active strong { color: var(--primary); }
.alpha-s05-knowledge-cards span { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: #6a7485; font-size: 12px; }
.alpha-s05-knowledge-cards span span:first-child { color: #e43d30; }
.alpha-s05-main { display: grid; grid-template-columns: minmax(360px, 32%) minmax(0, 1fr); align-items: start; gap: 14px; }
.alpha-s05-pool,
.alpha-s05-detail { min-width: 0; padding: 0; overflow: visible; }
.alpha-selection-group { padding: 14px; border-top: 1px solid var(--border); }
.alpha-selection-group:first-of-type { border-top: 0; }
.alpha-selection-group > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: #3b4658; }
.alpha-selection-group > header strong { font-size: 13px; }
.alpha-selection-group > header span { min-width: 24px; height: 22px; display: grid; place-items: center; color: #647084; border-radius: 4px; background: #eef1f5; font-size: 11px; }
.alpha-selection-group.included > header strong { color: var(--primary); }
.alpha-selection-group.included > header span { color: var(--primary); background: var(--primary-soft); }
.alpha-selection-list { display: grid; gap: 10px; }
.alpha-selection-card { width: 100%; min-height: 112px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 10px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 5px; background: #fff; text-align: left; cursor: pointer; }
.alpha-selection-card:hover { border-color: #b8c9ee; }
.alpha-selection-card.selected { border-color: var(--primary); box-shadow: inset 3px 0 var(--primary); background: #f8fbff; }
.alpha-empty-compact { min-height: 74px; padding: 12px; border: 1px dashed #d9dee6; border-radius: 5px; }
.alpha-s05-state-dot { width: 26px; height: 26px; display: grid; place-items: center; color: #697587; border: 1px solid #cfd6e1; border-radius: 50%; background: #fff; font-weight: 700; }
.alpha-s05-state-dot.included { color: #fff; border-color: var(--primary); background: var(--primary); }
.alpha-s05-card-body { display: grid; gap: 5px; min-width: 0; }
.alpha-s05-card-body strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alpha-s05-card-body p { display: -webkit-box; margin: 0; overflow: hidden; color: #465269; font-size: 12px; line-height: 19px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.alpha-s05-card-body small { color: #607086; font-size: 12px; }
.alpha-s05-card-body em { color: #b56a00; font-size: 12px; font-style: normal; }
.alpha-s05-card-meta { color: #f29b16; font-size: 12px; font-weight: 600; }
.alpha-s05-detail-content { padding: 18px 26px; overflow: visible; }
.alpha-s05-assignment { display: grid; grid-template-columns: minmax(160px, 1fr) auto; align-items: center; gap: 16px; min-height: 76px; padding: 13px 26px; border-top: 1px solid var(--border); }
.alpha-s05-assignment > div:first-child { display: grid; gap: 4px; }
.alpha-s05-assignment span { color: var(--muted); font-size: 12px; }
.alpha-s05-assignment > .button { min-width: 132px; }
.alpha-s05-version-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.alpha-s05-version-buttons button { min-width: 112px; height: 42px; padding: 0 18px; color: #2f3b4f; border: 1px solid var(--border); border-radius: 5px; background: #fff; font-weight: 600; cursor: pointer; }
.alpha-s05-version-buttons button.active { color: #fff; border-color: var(--primary); background: var(--primary); }
.alpha-s05-child-assignment { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid #edf0f4; }
.alpha-s05-child-assignment label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #d8dee8; border-radius: 5px; background: #fff; font-size: 12px; }
.alpha-s05-detail > .alpha-return-record { margin: 0 26px 18px; }
.alpha-answer-divider { margin: 24px 0 14px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text); font-size: 16px; }
.knowledge-mounted-questions { margin: 0 24px 24px; padding: 18px; border: 1px solid var(--border); border-radius: 6px; background: #f8fafc; }
.knowledge-mounted-questions h3 { margin: 0 0 12px; font-size: 15px; }
.knowledge-mounted-questions details { margin-top: 10px; border: 1px solid #dce2ea; border-radius: 5px; background: #fff; }
.knowledge-mounted-questions summary { padding: 12px 14px; cursor: pointer; font-weight: 600; }
.knowledge-mounted-question-body { padding: 4px 18px 18px; border-top: 1px solid #edf0f4; }
.knowledge-mounted-question-body h4 { margin: 16px 0 8px; font-size: 14px; }
.knowledge-mounted-question-body .anchored-question-image img { max-width: min(100%, 620px); height: auto; object-fit: contain; }
.alpha-handout-columns { padding: 0 18px 18px; }
.alpha-handout-columns > article { min-width: 0; border: 1px solid var(--border); border-radius: 6px; }
.alpha-candidate-list,
.alpha-arrangement-list { display: grid; }
.alpha-candidate-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.alpha-candidate-card:last-child,
.alpha-arrangement-row:last-child { border-bottom: 0; }
.alpha-candidate-card > div:first-child { min-width: 0; }
.alpha-candidate-card strong,
.alpha-candidate-card span { display: block; }
.alpha-candidate-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alpha-candidate-card > div:first-child span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.alpha-version-checks { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.alpha-version-child-checks { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding-top: 10px; border-top: 1px solid #edf0f4; }
.alpha-version-child-checks b { margin-right: 3px; color: #536078; font-size: 12px; }
.alpha-version-child-checks label { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid #d8dee8; border-radius: 5px; background: #fff; font-size: 12px; }
.alpha-arrangement-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.alpha-arrangement-row > span { display: grid; place-items: center; width: 26px; height: 26px; color: #52617a; border-radius: 4px; background: #eef2f8; font-size: 12px; }
.alpha-arrangement-row > div:nth-child(2) { min-width: 0; }
.alpha-arrangement-row strong,
.alpha-arrangement-row small { display: block; }
.alpha-arrangement-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alpha-arrangement-row small { margin-top: 3px; color: var(--muted); }
.alpha-arrangement-preview { margin-top: 12px; padding: 12px; border: 1px solid #e3e7ed; border-radius: 5px; background: #fafbfd; }
.alpha-arrangement-preview .alpha-question-content h3 { font-size: 15px; }
.alpha-order-actions .text-danger { width: auto; padding: 0 7px; color: var(--danger); }
.alpha-return-record { display: grid; gap: 5px; margin-top: 9px; padding: 9px; color: #596579; border: 1px solid #e5d4b0; border-radius: 5px; background: #fffaf0; font-size: 12px; }
.alpha-return-record b { color: #8d620f; }
.alpha-return-record em { color: var(--success); font-style: normal; }
.alpha-return-record .button { justify-self: start; height: 30px; }
.alpha-dialog-body { display: grid; gap: 14px; padding: 18px 20px; }
.alpha-dialog-body p { margin: 0; color: var(--muted); font-size: 12px; }
.alpha-dialog-body dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px 16px; margin: 0; }
.alpha-dialog-body dt { color: var(--muted); }
.alpha-dialog-body dd { min-width: 0; margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.alpha-preview-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.alpha-preview-controls .alpha-version-tabs { margin: 0; }
.alpha-preview-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: start; gap: 16px; }
.alpha-toc { position: sticky; top: 82px; }
.alpha-toc-list { display: grid; padding: 8px; }
.alpha-toc-list button { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; min-height: 42px; padding: 7px 9px; color: #46536a; text-align: left; border: 0; border-radius: 5px; background: transparent; cursor: pointer; }
.alpha-toc-list button:hover { color: var(--primary); background: var(--primary-soft); }
.alpha-toc-list button.dragging { opacity: .4; }
.alpha-toc-list span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: #eef2f8; font-size: 11px; }
.alpha-toc-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.alpha-handout-paper { padding: 44px 60px 60px; background: #fff; }
.alpha-handout-paper > header { padding-bottom: 28px; text-align: center; border-bottom: 2px solid #27344a; }
.alpha-handout-paper > header span { color: var(--primary); font-size: 12px; }
.alpha-handout-paper > header h1 { margin: 8px 0; font-size: 28px; letter-spacing: 0; }
.alpha-handout-paper > header p { margin: 0; color: var(--muted); }
.alpha-handout-block { padding: 28px 0; scroll-margin-top: 82px; border-bottom: 1px solid #e5e8ed; line-height: 1.8; }
.alpha-handout-block:last-child { border-bottom: 0; }
.alpha-handout-block > h2 { margin: 0 0 16px; font-size: 20px; letter-spacing: 0; }
.alpha-handout-block > h3 { margin: 20px 0 8px; font-size: 16px; letter-spacing: 0; }
.alpha-handout-block ul { padding-left: 22px; }
.alpha-handout-block figure { margin: 18px auto; text-align: center; }
.alpha-handout-block figure img { max-width: 100%; max-height: 520px; object-fit: contain; }
.alpha-handout-block figcaption { margin-top: 7px; color: var(--muted); font-size: 12px; }
.alpha-formula { display: grid; gap: 8px; margin: 12px 0; padding: 14px; text-align: center; border-radius: 5px; background: #f8f9fb; }
.alpha-table-scroll { max-width: 100%; overflow-x: auto; }
.alpha-table-scroll table { width: 100%; min-width: 640px; border-collapse: collapse; }
.alpha-table-scroll th,
.alpha-table-scroll td { padding: 10px 12px; text-align: left; vertical-align: top; border: 1px solid #d8dee6; }
.alpha-table-scroll th { background: #f5f7fa; }
.alpha-export-options { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; padding: 18px; }
.alpha-export-options fieldset { min-width: 0; display: flex; align-content: flex-start; flex-wrap: wrap; gap: 8px; margin: 0; padding: 13px; border: 1px solid var(--border); border-radius: 6px; }
.alpha-export-options legend { padding: 0 5px; color: #4c5970; font-size: 12px; font-weight: 600; }
.alpha-export-options label { min-width: 112px; display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #dbe1ea; border-radius: 5px; background: #fff; }
.alpha-export-options label:has(input:checked) { color: var(--primary); border-color: #9eb9f5; background: #f4f7ff; }
.alpha-export-options input { accent-color: var(--primary); }
.alpha-export-options span { display: grid; font-size: 13px; }
.alpha-export-options small { margin-top: 2px; color: var(--muted); font-size: 11px; }

/* S04 follows the RP's basket / handout workbench composition. */
.wiki2-workspace { gap: 12px; }
.wiki2-header { display: grid; gap: 18px; padding: 20px 22px; }
.wiki2-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.wiki2-title > div:first-child { display: grid; gap: 3px; }
.wiki2-title span { color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.wiki2-title h1, .wiki2-title p { margin: 0; }
.wiki2-title h1 { font-size: 25px; }
.wiki2-title p { color: var(--muted); font-size: 13px; }
.wiki2-source-note { max-width: 420px; display: grid; justify-items: end; gap: 4px; text-align: right; }
.wiki2-source-note b { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.wiki2-source-note span { color: var(--muted); font-weight: 400; letter-spacing: 0; }
.wiki2-filters { display: grid; grid-template-columns: repeat(4, minmax(120px, .7fr)) minmax(280px, 1.5fr); gap: 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.wiki2-filters label, .wiki2-revision-bar label { display: grid; gap: 6px; color: #657185; font-size: 12px; }
.wiki2-filters select, .wiki2-revision-bar select, .wiki2-meta-row input { width: 100%; height: 38px; padding: 0 10px; color: var(--text); border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.wiki2-revision-bar { min-height: 66px; display: grid; grid-template-columns: minmax(260px, 1fr) 260px auto auto; align-items: center; gap: 14px; padding: 10px 18px; }
.wiki2-revision-bar > div { display: grid; gap: 3px; }
.wiki2-revision-bar > div span { color: var(--muted); font-size: 12px; }
.wiki2-revision-bar > div strong { font-size: 17px; }
.wiki2-revision-state { min-height: 30px; display: inline-flex; align-items: center; padding: 0 11px; border-radius: 15px; font-size: 12px; font-weight: 700; }
.wiki2-revision-state.current { color: #08785f; background: #e9f8f2; }
.wiki2-revision-state.history { color: #8b5d14; background: #fff5df; }
.wiki2-new-revision { min-height: 40px; justify-self: end; padding-inline: 18px; white-space: nowrap; background: #fff; }
.wiki2-grid { min-width: 0; display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 12px; align-items: start; }
.wiki2-tree-panel { min-width: 0; overflow: hidden; }
.wiki2-tree-panel > header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.wiki2-tree-panel h2, .wiki2-tree-panel p { margin: 0; }
.wiki2-tree-panel h2 { font-size: 16px; }
.wiki2-tree-panel p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.wiki2-tree { min-height: 560px; max-height: calc(100vh - 350px); overflow: auto; padding: 10px; background: #fbfcfe; }
.wiki2-tree-node { min-width: 0; }
.wiki2-tree-node > button { width: calc(100% - var(--wiki-depth) * 18px); min-height: 48px; display: grid; grid-template-columns: 14px minmax(0, 1fr); align-items: center; gap: 7px; margin: 3px 0 3px calc(var(--wiki-depth) * 18px); padding: 7px 9px; color: #2b374a; text-align: left; border: 1px solid transparent; border-radius: 5px; background: transparent; cursor: pointer; }
.wiki2-tree-node > button:hover { border-color: #bed0f5; background: #f3f7ff; }
.wiki2-tree-node.selected > button { color: #174fbc; border-color: #9db9f4; background: #edf3ff; box-shadow: inset 3px 0 #3975ee; }
.wiki2-tree-node > button > span { grid-row: 1 / span 2; color: #8793a5; text-align: center; }
.wiki2-tree-node > button strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.wiki2-tree-node > button small { grid-column: 2; overflow: hidden; color: #929bad; font: 10px/14px "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.wiki2-tree-panel > footer { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; color: var(--muted); border-top: 1px solid var(--border); font-size: 11px; }
.wiki2-empty, .wiki2-editor-empty { min-height: 260px; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.wiki2-editor-panel { min-width: 0; overflow: hidden; }
.wiki2-editor-heading { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.wiki2-editor-heading span, .wiki2-editor-heading h2, .wiki2-editor-heading p { margin: 0; }
.wiki2-editor-heading > div:first-child > span { color: var(--primary); font-size: 11px; font-weight: 700; }
.wiki2-editor-heading h2 { margin-top: 2px; font-size: 20px; }
.wiki2-editor-heading p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.wiki2-identity { display: grid; grid-template-columns: auto minmax(140px, 1fr); align-items: center; gap: 4px 8px; padding: 8px 10px; border: 1px solid #d7deea; border-radius: 5px; background: #f8fafc; }
.wiki2-identity span { color: #7a8596; font-size: 10px; }
.wiki2-identity code { max-width: 270px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.wiki2-history-banner { padding: 10px 18px; color: #835911; border-bottom: 1px solid #f0d79b; background: #fff7e4; font-size: 12px; }
.wiki2-meta-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.wiki2-meta-row label { display: grid; gap: 5px; color: #657185; font-size: 12px; }
.wiki2-node-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.wiki2-editable { min-height: 440px; padding: 34px 44px; outline: none; background: #fff; font-size: 16px; line-height: 1.85; }
.wiki2-editable.readonly { background: #fcfcfb; }
.wiki2-editor-footer { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--border); background: #fafbfd; }
.wiki2-editor-footer > div { min-width: 0; display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.wiki2-editor-footer code { overflow: hidden; color: #59667a; text-overflow: ellipsis; white-space: nowrap; }

.qm-workspace { gap: 12px; }
.qm-header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 22px; }
.qm-header > div:first-child { display: grid; gap: 2px; }
.qm-header span { color: var(--primary); font-size: 11px; font-weight: 700; }
.qm-header h1, .qm-header p { margin: 0; }
.qm-header h1 { font-size: 24px; }
.qm-header p { color: var(--muted); font-size: 13px; }
.qm-header-fact { display: grid; justify-items: end; gap: 4px; }
.qm-header-fact strong { font-size: 17px; }
.qm-header-fact span { color: var(--muted); font-size: 12px; font-weight: 400; }
.qm-toolbar { overflow: hidden; }
.qm-view-tabs { min-height: 54px; display: flex; align-items: stretch; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.qm-view-tabs button { min-width: 150px; padding: 0 18px; color: #586477; border: 0; border-bottom: 3px solid transparent; background: transparent; font-weight: 700; cursor: pointer; }
.qm-view-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); background: #f5f8ff; }
.qm-view-tabs b { min-width: 22px; display: inline-grid; place-items: center; margin-left: 6px; padding: 2px 6px; border-radius: 11px; background: #e9edf4; font-size: 11px; }
.qm-view-tabs button.active b { background: #dbe7ff; }
.qm-search-row { display: grid; grid-template-columns: minmax(230px, 1.35fr) repeat(4, minmax(110px, .65fr)) minmax(210px, 1.2fr) minmax(120px, .7fr) auto; gap: 9px; align-items: end; padding: 14px 16px; }
.qm-search-row label { min-width: 0; display: grid; gap: 5px; color: #647085; font-size: 11px; }
.qm-search-row input, .qm-search-row select { width: 100%; height: 38px; padding: 0 10px; color: var(--text); border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.qm-grid { min-width: 0; display: grid; grid-template-columns: 250px 380px minmax(520px, 1fr); gap: 12px; align-items: start; }
.qm-knowledge-panel { min-width: 0; overflow: hidden; }
.qm-knowledge-panel > header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.qm-knowledge-panel h2, .qm-knowledge-panel p { margin: 0; }
.qm-knowledge-panel h2 { font-size: 16px; }
.qm-knowledge-panel p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.qm-knowledge-panel > header > button { padding: 5px 9px; color: #5b6779; border: 1px solid var(--border); border-radius: 4px; background: #fff; cursor: pointer; }
.qm-knowledge-panel > header > button.active { color: var(--primary); border-color: #a7bff0; background: #edf3ff; }
.qm-knowledge-tree { min-height: 590px; max-height: calc(100vh - 345px); overflow-y: auto; padding: 9px 10px; background: #fafbfd; }
.qm-knowledge-root { margin-bottom: 10px; }
.qm-knowledge-root h3 { margin: 0 0 6px; padding: 7px 8px; color: #24324a; border-bottom: 1px solid #dce2eb; font-size: 13px; }
.qm-knowledge-root details { margin-bottom: 3px; }
.qm-knowledge-root summary { display: flex; align-items: center; gap: 7px; padding: 7px 8px; color: #4f5c70; cursor: pointer; font-size: 12px; font-weight: 700; }
.qm-knowledge-root summary span { flex: 1; }
.qm-knowledge-root summary em, .qm-knowledge-root button em, .qm-knowledge-panel > footer em { color: #8993a4; font-style: normal; font-size: 10px; }
.qm-knowledge-root details > div { display: grid; gap: 2px; padding-left: 12px; }
.qm-knowledge-root button, .qm-knowledge-panel > footer button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; color: #596579; text-align: left; border: 0; border-radius: 4px; background: transparent; cursor: pointer; font-size: 11px; }
.qm-knowledge-root button:hover, .qm-knowledge-panel > footer button:hover { color: var(--primary); background: #f1f5fd; }
.qm-knowledge-root button.active, .qm-knowledge-panel > footer button.active { color: var(--primary); background: #eaf1ff; box-shadow: inset 3px 0 var(--primary); }
.qm-knowledge-root button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qm-knowledge-panel > footer { padding: 9px 10px; border-top: 1px solid var(--border); }
.qm-list-panel { min-width: 0; overflow: hidden; }
.qm-list-panel > header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.qm-list-panel h2, .qm-list-panel p { margin: 0; }
.qm-list-panel h2 { font-size: 16px; }
.qm-list-panel p, .qm-list-panel > header > span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.qm-list { min-height: 590px; max-height: calc(100vh - 345px); overflow-y: auto; background: #fafbfd; }
.qm-list-item { width: 100%; display: grid; gap: 7px; padding: 13px 15px; color: var(--text); text-align: left; border: 0; border-bottom: 1px solid var(--border); background: #fff; cursor: pointer; }
.qm-list-item:hover { background: #f8faff; }
.qm-list-item.selected { background: #eef4ff; box-shadow: inset 4px 0 var(--primary); }
.qm-list-top { display: flex; align-items: center; gap: 8px; color: #b57712; font-size: 11px; }
.qm-list-top code { margin-right: auto; color: #5f6c80; }
.qm-list-top em { padding: 2px 7px; color: #c24135; border-radius: 9px; background: #fff0ee; font-style: normal; }
.qm-list-top em.voided { color: #667085; background: #eef0f3; }
.qm-list-item > strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.qm-list-item > p { max-height: 42px; margin: 0; overflow: hidden; color: #505c6f; font-size: 12px; line-height: 21px; }
.qm-list-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.qm-list-meta > span { max-width: 100%; overflow: hidden; padding: 3px 7px; color: #647085; border-radius: 3px; background: #f0f3f7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.qm-list-panel > footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); }
.qm-list-panel > footer span { color: var(--muted); font-size: 11px; }
.qm-empty { min-height: 300px; display: grid; place-items: center; color: var(--muted); }
.qm-detail-panel { min-width: 0; overflow: hidden; }
.qm-detail-panel > header { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.qm-detail-panel > header > div:first-child { min-width: 0; }
.qm-detail-panel > header span { color: var(--primary); font-size: 11px; font-weight: 700; }
.qm-detail-panel > header h2, .qm-detail-panel > header p { margin: 0; }
.qm-detail-panel > header h2 { overflow: hidden; margin-top: 2px; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.qm-detail-panel > header p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.qm-detail-panel > header > div:last-child { display: flex; gap: 7px; }
.qm-detail-scroll { max-height: calc(100vh - 285px); overflow-y: auto; padding: 16px; background: #f7f8fa; }
.qm-question-preview, .qm-maintain-card { margin-bottom: 12px; padding: 17px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.qm-question-preview .alpha-question-content { border: 0; }
.qm-maintain-card h3, .qm-maintain-card p { margin: 0; }
.qm-maintain-card h3 { font-size: 15px; }
.qm-maintain-card.issue { border-color: #efc0b9; background: #fffafa; }
.qm-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.qm-card-heading p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.qm-maintain-card > label { display: grid; gap: 5px; color: #606c80; font-size: 11px; }
.qm-maintain-card input { width: 100%; height: 38px; padding: 0 10px; color: var(--text); border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.qm-maintain-card > small { display: block; margin-top: 8px; color: var(--muted); }
.qm-index-grid { display: grid; grid-template-columns: minmax(260px, 1fr) 220px; gap: 16px; margin-top: 13px; }
.qm-index-grid > label { display: grid; gap: 5px; color: #606c80; font-size: 11px; }
.qm-index-card { overflow: visible; }
.qm-knowledge-field { display: grid; gap: 6px; margin-top: 13px; color: #606c80; font-size: 11px; }
.qm-index-secondary { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #d9e1ec; }
.qm-index-secondary > label { display: grid; gap: 5px; color: #606c80; font-size: 11px; }
.qm-knowledge-cascader, .editor-knowledge-cascader { position: relative; min-width: 0; }
.qm-cascade-trigger, .editor-cascade-trigger { width: 100%; height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 11px; overflow: hidden; color: #26364f; border: 1px solid #d4deec; border-radius: 7px; background: #fff; box-shadow: 0 1px 2px rgb(31 48 78 / 4%); cursor: pointer; text-align: left; }
.qm-cascade-trigger:hover, .qm-knowledge-cascader.open .qm-cascade-trigger, .editor-cascade-trigger:hover, .editor-knowledge-cascader.open .editor-cascade-trigger { border-color: #8baaf0; box-shadow: 0 0 0 3px rgb(47 109 246 / 8%); }
.qm-cascade-trigger i, .editor-cascade-trigger i { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; color: #2362d2; border-radius: 6px; background: #eaf1ff; font-style: normal; font-weight: 800; }
.qm-cascade-trigger > span, .editor-cascade-trigger > span { min-width: 0; display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
.qm-cascade-trigger em, .editor-cascade-trigger em { min-width: 0; overflow: hidden; color: #26364f; font-style: normal; font-weight: 700; text-overflow: ellipsis; }
.qm-cascade-trigger em:last-child, .editor-cascade-trigger em:last-child { color: #2563d6; }
.qm-cascade-trigger b, .editor-cascade-trigger b { flex: 0 0 auto; margin: 0 6px; color: #9aa6b8; }
.qm-cascade-trigger > strong, .editor-cascade-trigger > strong { margin-left: auto; color: #718099; transition: transform .16s ease; }
.qm-knowledge-cascader.open .qm-cascade-trigger > strong, .editor-knowledge-cascader.open .editor-cascade-trigger > strong { transform: rotate(180deg); }
.qm-cascade-panel, .editor-cascade-panel { position: absolute; z-index: 80; top: 48px; left: 0; width: min(860px, calc(100vw - 64px)); height: 286px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; border: 1px solid #d5deeb; border-radius: 8px; background: #fff; box-shadow: 0 18px 44px rgb(30 46 75 / 20%); }
.qm-cascade-panel[hidden], .editor-cascade-panel[hidden] { display:none!important; }
.qm-cascade-column, .editor-cascade-column { min-width: 0; padding: 9px 8px; overflow-y: auto; border-right: 1px solid #e4e9f1; scrollbar-width: thin; }
.qm-cascade-column:last-child, .editor-cascade-column:last-child { border-right: 0; }
.qm-cascade-column > span, .editor-cascade-column > span { display: block; padding: 4px 8px 9px; overflow: hidden; color: #8490a4; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.qm-cascade-column > em, .editor-cascade-column > em { display: block; padding: 10px 8px; color: #a0a9b7; font-size: 11px; font-style: normal; }
.qm-cascade-option, .editor-cascade-option { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 6px; padding: 8px; overflow: hidden; color: #40506a; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: left; }
.qm-cascade-option:hover, .editor-cascade-option:hover { background: #f3f6fb; }
.qm-cascade-option.selected, .editor-cascade-option.selected { color: #1f5dcc; background: #eaf1ff; font-weight: 700; }
.qm-cascade-option span, .editor-cascade-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qm-cascade-option b, .editor-cascade-option b { margin-left: auto; color: #8f9db1; }
.qm-difficulty-select { display: grid; gap: 6px; color: #606c80; font-size: 11px; }
.qm-difficulty-select select { width: 100%; height: 42px; padding: 0 38px 0 12px; color: #26364f; border: 1px solid #d4deec; border-radius: 7px; background-color: #fff; box-shadow: 0 1px 2px rgb(31 48 78 / 4%); font: 700 14px/1 "Microsoft YaHei", sans-serif; cursor: pointer; }
.qm-difficulty-select select:hover, .qm-difficulty-select select:focus { border-color: #8baaf0; outline: 0; box-shadow: 0 0 0 3px rgb(47 109 246 / 8%); }
.qm-source-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.qm-source-facts > div { min-width: 0; display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.qm-source-facts > div:nth-child(odd) { border-right: 1px solid var(--border); }
.qm-source-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.qm-source-facts dt { color: var(--muted); font-size: 11px; }
.qm-source-facts dd { min-width: 0; margin: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.qm-reference-list { display: grid; gap: 7px; margin-top: 12px; }
.qm-reference-list article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 5px; background: #fafbfd; }
.qm-reference-list article > div { display: grid; gap: 3px; }
.qm-reference-list span { color: var(--muted); font-size: 11px; }
.qm-reference-list code { color: #667085; font-size: 10px; }
.qm-normal-state { margin-top: 12px; padding: 15px; color: #617081; border: 1px dashed #cdd5df; border-radius: 5px; background: #fafbfd; text-align: center; }
.qm-repair-reason { display: grid; gap: 4px; margin-bottom: 12px; padding: 12px 14px; color: #8f3e32; border: 1px solid #efc5be; border-radius: 5px; background: #fff3f1; }
.qm-repair-reason strong { font-size: 13px; }
.qm-repair-reason span { font-size: 11px; }
.qm-detail-empty { min-height: 600px; display: grid; place-items: center; color: var(--muted); }
.qm-modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 28px; background: rgb(20 30 48 / 48%); }
.qm-modal { width: min(980px, 96vw); max-height: 92vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgb(17 26 43 / 28%); }
.qm-modal > header, .qm-modal > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.qm-modal > footer { border-top: 1px solid var(--border); border-bottom: 0; }
.qm-modal > header span { color: var(--primary); font-size: 11px; font-weight: 700; }
.qm-modal > header h2, .qm-modal > header p { margin: 0; }
.qm-modal > header h2 { font-size: 20px; }
.qm-modal > header p, .qm-modal > footer span { color: var(--muted); font-size: 11px; }
.qm-modal > form { display: grid; gap: 13px; overflow-y: auto; padding: 18px; }
.qm-modal-body { min-height: 0; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(500px, 1.1fr); overflow: hidden; }
.qm-modal-source { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border-right: 1px solid var(--border); background: #f5f7fa; }
.qm-modal-pane-title { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #fff; }
.qm-modal-pane-title > div { display: grid; gap: 3px; }
.qm-modal-pane-title strong { color: var(--text); font-size: 14px; }
.qm-modal-pane-title span, .qm-modal-pane-title em { color: var(--muted); font-size: 11px; font-style: normal; }
.qm-modal-source-scroll { min-height: 0; overflow: auto; padding: 16px; }
.qm-modal-source-scroll figure { margin: 0 0 14px; padding: 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.qm-modal-source-scroll figure img { display: block; width: 100%; height: auto; object-fit: contain; }
.qm-modal-source-scroll figcaption { margin-top: 8px; color: var(--muted); font-size: 11px; text-align: center; }
.qm-modal-rendered-question { padding: 18px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.qm-modal-body > form { min-width: 0; min-height: 0; display: grid; align-content: start; gap: 13px; overflow-y: auto; padding: 0 18px 18px; }
.qm-modal-body > form > .qm-modal-pane-title { margin: 0 -18px; position: sticky; top: 0; z-index: 1; }
.qm-modal-body form > label { display: grid; gap: 6px; color: #5e697b; font-size: 12px; }
.qm-modal form > label { display: grid; gap: 6px; color: #5e697b; font-size: 12px; }
.qm-modal input, .qm-modal textarea { width: 100%; padding: 9px 10px; color: var(--text); border: 1px solid var(--border); border-radius: 5px; background: #fff; font: inherit; }
.qm-modal fieldset { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 5px; }
.qm-modal fieldset label { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 8px; }
.qm-modal fieldset textarea { min-height: 56px; }
.qm-modal > footer { justify-content: flex-end; }
.qm-modal > footer span { margin-right: auto; }

@media (max-width: 1280px) {
  .wiki2-filters { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
  .wiki2-lesson { grid-column: 1 / -1; }
  .wiki2-grid { grid-template-columns: 310px minmax(0, 1fr); }
  .wiki2-revision-bar { grid-template-columns: minmax(220px, 1fr) 230px auto; }
  .wiki2-revision-bar > .button { grid-column: 3; }
  .qm-search-row { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
  .qm-keyword, .qm-source-filter { grid-column: span 2; }
  .qm-grid { grid-template-columns: 230px 330px minmax(460px, 1fr); }
}

@media (max-width: 1100px) {
  .qm-grid { grid-template-columns: minmax(320px, .8fr) minmax(460px, 1.2fr); }
  .qm-knowledge-panel { grid-column: 1 / -1; }
  .qm-knowledge-tree { min-height: 180px; max-height: 260px; display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 8px; }
}

@media (max-width: 820px) {
  .wiki2-title, .qm-header { align-items: flex-start; flex-direction: column; }
  .wiki2-source-note, .qm-header-fact { justify-items: start; text-align: left; }
  .wiki2-filters, .qm-search-row { grid-template-columns: 1fr 1fr; }
  .wiki2-lesson, .qm-keyword, .qm-source-filter { grid-column: 1 / -1; }
  .wiki2-revision-bar { grid-template-columns: 1fr; }
  .wiki2-revision-bar > .button { grid-column: auto; }
  .wiki2-grid, .qm-grid { grid-template-columns: 1fr; }
  .wiki2-tree { min-height: 300px; max-height: 420px; }
  .wiki2-meta-row, .qm-index-grid { grid-template-columns: 1fr; }
  .wiki2-node-actions { justify-content: flex-start; }
  .wiki2-editable { min-height: 360px; padding: 24px 20px; }
  .wiki2-editor-heading, .qm-detail-panel > header { align-items: flex-start; flex-direction: column; }
  .wiki2-identity { width: 100%; }
  .qm-view-tabs { overflow-x: auto; padding: 0 8px; }
  .qm-view-tabs button { min-width: 130px; }
  .qm-list { min-height: 380px; max-height: 480px; }
  .qm-detail-scroll { max-height: none; }
  .qm-source-facts { grid-template-columns: 1fr; }
  .qm-source-facts > div, .qm-source-facts > div:nth-child(odd) { border-right: 0; border-bottom: 1px solid var(--border); }
  .qm-source-facts > div:last-child { border-bottom: 0; }
  .qm-modal-backdrop { padding: 0; }
  .qm-modal { width: 100vw; max-height: 100vh; border-radius: 0; }
  .qm-modal-body { grid-template-columns: 1fr; overflow-y: auto; }
  .qm-modal-source { min-height: 420px; border-right: 0; border-bottom: 1px solid var(--border); }
  .qm-modal-body > form { overflow: visible; }
}

.editor-picker-filters { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 10px; padding: 12px 0; }
.editor-picker-filters label { display: grid; gap: 5px; color: #667085; font-size: 12px; }
.editor-picker-filters select { width: 100%; min-height: 38px; padding: 0 10px; color: #24324a; border: 1px solid #cfd7e5; border-radius: 6px; background: #fff; font: inherit; }
@media (max-width: 760px) { .editor-picker-filters { grid-template-columns: repeat(2, minmax(120px, 1fr)); } }

.alpha-s04-workspace { gap: 12px; }
.alpha-s04-header { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 18px; }
.alpha-s04-header > div:last-child { display: grid; justify-items: end; gap: 2px; color: var(--muted); font-size: 12px; }
.alpha-s04-header > div:last-child strong { color: var(--text); font-size: 14px; }
.alpha-s04-tabs { align-self: stretch; display: flex; align-items: stretch; gap: 4px; }
.alpha-s04-tabs button { min-width: 96px; padding: 0 18px; color: #4d596a; border: 0; border-bottom: 3px solid transparent; background: transparent; font-weight: 600; }
.alpha-s04-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); background: #f4f7ff; }
.alpha-s04-layout { min-width: 0; display: grid; grid-template-columns: 230px minmax(430px, .9fr) minmax(470px, 1.1fr); gap: 12px; align-items: start; }
.alpha-s04-layout.alpha-s04-library-layout { grid-template-columns: 230px minmax(0, 1fr); }
.alpha-s04-header > div:first-child { display: grid; gap: 2px; }
.alpha-s04-header h1 { margin: 0; font-size: 18px; }
.alpha-s04-header p { margin: 0; color: var(--muted); font-size: 12px; }
.alpha-s04-tree, .alpha-s04-side { min-width: 0; }
.alpha-s04-tree { padding: 0 0 14px; overflow: hidden; }
.alpha-s04-tree > .alpha-section-title, .alpha-s04-side > .alpha-section-title { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.alpha-s04-tree > input { width: calc(100% - 24px); height: 36px; margin: 12px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px; }
.alpha-s04-tree-summary { padding: 0 12px 10px; border-bottom: 1px solid var(--border); }
.alpha-s04-tree-summary > button, .alpha-s04-tag-list button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; color: #4d596a; border: 0; background: transparent; text-align: left; }
.alpha-s04-tree-summary > button.active, .alpha-s04-tag-list button.active { color: var(--primary); background: #edf3ff; }
.alpha-s04-tree-summary > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 8px 8px 0 22px; }
.alpha-s04-tree-summary b { grid-row: 1 / span 2; }
.alpha-s04-tree-summary span { display: flex; gap: 8px; color: var(--muted); font-size: 12px; }
.alpha-s04-tree-summary em, .alpha-s04-tag-list em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 11px; }
.alpha-s04-tag-list { padding: 8px 12px; overflow: visible; }
.alpha-s04-tag-list button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alpha-s04-taxonomy { display: grid; gap: 8px; padding: 8px 12px 2px; }
.alpha-knowledge-root,
.alpha-knowledge-branch { border: 0; }
.alpha-knowledge-root > h3,
.alpha-knowledge-branch > summary { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 7px 8px; color: #253047; cursor: pointer; list-style: none; }
.alpha-knowledge-branch > summary::-webkit-details-marker { display: none; }
.alpha-knowledge-branch > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid #7b8798; border-bottom: 1.5px solid #7b8798; transform: rotate(-45deg); transition: transform .16s ease; }
.alpha-knowledge-branch[open] > summary::before { transform: rotate(45deg); }
.alpha-knowledge-root > h3 { margin: 0; font-size: 14px; font-weight: 700; background: #f6f8fb; cursor: default; }
.alpha-knowledge-branch { margin-left: 10px; border-left: 1px solid #dfe5ee; }
.alpha-knowledge-branch > summary { color: #465267; font-weight: 600; }
.alpha-knowledge-branch summary span { min-width: 0; overflow-wrap: anywhere; }
.alpha-knowledge-branch summary em { margin-left: auto; color: var(--muted); font-size: 11px; font-style: normal; }
.alpha-knowledge-branch > div { display: grid; gap: 2px; padding: 2px 0 6px 18px; }
.alpha-knowledge-branch > div button { width: 100%; display: flex; align-items: flex-start; gap: 8px; padding: 8px; color: #536075; border: 0; background: transparent; text-align: left; line-height: 1.45; }
.alpha-knowledge-branch > div button.active { color: var(--primary); background: #edf3ff; }
.alpha-knowledge-branch > div button span { min-width: 0; overflow-wrap: anywhere; }
.alpha-knowledge-branch > div button em { margin-left: auto; color: var(--muted); font-size: 11px; font-style: normal; }
.alpha-selection-count { color: var(--primary); font-weight: 700; }
.alpha-handout-picker { display: grid; gap: 14px; padding: 16px; }
.alpha-handout-cascade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 14px; border: 1px solid var(--border); background: #f7f9fc; }
.alpha-handout-cascade h3,
.alpha-handout-cascade p { grid-column: 1 / -1; margin: 0; }
.alpha-handout-cascade h3 { font-size: 15px; }
.alpha-handout-cascade p { color: var(--muted); font-size: 12px; }
.alpha-handout-cascade label { display: grid; gap: 5px; color: #596476; font-size: 12px; }
.alpha-handout-cascade label:nth-of-type(4),
.alpha-handout-cascade label:nth-of-type(5) { grid-column: 1 / -1; }
.alpha-handout-cascade select { width: 100%; min-width: 0; height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.alpha-handout-picker dl { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px 12px; margin: 0; padding: 12px; background: #f7f9fc; }
.alpha-handout-picker dt { color: var(--muted); }
.alpha-handout-picker dd { min-width: 0; margin: 0; color: var(--text); overflow-wrap: anywhere; }
.alpha-handout-selection-list { display: grid; gap: 8px; }
.alpha-handout-selection-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) 30px; align-items: start; gap: 10px; padding: 12px; border: 1px solid var(--border); background: #fff; }
.alpha-handout-selection-item > span { display: grid; width: 24px; height: 24px; place-items: center; color: var(--primary); background: #edf3ff; font-size: 12px; font-weight: 700; }
.alpha-handout-selection-item > div { min-width: 0; display: grid; gap: 5px; }
.alpha-handout-selection-item strong { font-size: 13px; line-height: 1.45; }
.alpha-handout-selection-item p { display: -webkit-box; margin: 0; overflow: hidden; color: #344057; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-height: 1.55; overflow-wrap: anywhere; }
.alpha-handout-selection-item small { color: var(--muted); }
.alpha-handout-selection-item > button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: #7a8492; border: 1px solid var(--border); background: #fff; font-size: 17px; cursor: pointer; }
.alpha-handout-selection-item > button:hover { color: var(--danger); border-color: #f1b4ae; background: #fff6f5; }
.alpha-basket-preview-dialog { width: min(860px, calc(100vw - 48px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; background: #fff; }
.alpha-basket-paper-heading { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 36px; align-items: center; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); background: #fff; }
.alpha-basket-paper-heading input { justify-self: center; width: min(360px, 100%); height: 34px; border: 1px solid #8b95a5; text-align: center; font-size: 16px; font-weight: 700; }
.alpha-basket-preview-content { max-height: calc(100vh - 152px); padding: 18px 40px 24px; overflow-y: auto; background: #fff; }
.alpha-basket-preview-question { border: 1px solid #aeb6c2; background: #fff; }
.alpha-basket-preview-question > header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: #f8f9fb; }
.alpha-basket-preview-question > header span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; }
.alpha-basket-paper-part { padding: 14px 16px 18px; }
.alpha-basket-paper-part .alpha-answer-divider { margin-top: 14px; }
.alpha-basket-version-content.is-hidden { display: none; }
.alpha-source-preview-label { color: var(--primary); font-weight: 700; }
.alpha-visual-source-question > h3 { margin-bottom: 14px; }
.alpha-visual-source-question .alpha-source-image { margin: 0; border: 1px solid var(--border); background: #fff; }
.alpha-visual-source-question .alpha-source-image img,
.alpha-visual-source-answer .alpha-source-image img { display: block; width: 100%; height: auto; object-fit: contain; }
.alpha-visual-source-answer .alpha-source-image { margin-top: 14px; }
.alpha-basket-audience-switch { display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--border); background: #f5f7fa; }
.alpha-basket-audience-switch button { min-width: 70px; height: 32px; border: 0; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.alpha-basket-audience-switch button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgb(31 46 77 / 12%); }
.alpha-basket-blank-editor { min-height: calc(var(--blank-lines) * 22px); margin: 8px 0; padding: 0 10px; border: 1px solid #aeb6c2; background: repeating-linear-gradient(to bottom, #fff 0, #fff 21px, #edf0f4 22px); line-height: 22px; caret-color: var(--primary); outline: none; }
.alpha-basket-blank-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgb(55 113 255 / 12%); }
.alpha-basket-blank-editor:empty::before { color: #9aa3b1; content: "按 Enter 增加留白，Backspace 减少留白"; pointer-events: none; }
.alpha-basket-preview-dialog > footer { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); background: #fff; }
.alpha-basket-preview-dialog > footer span { color: var(--muted); font-size: 12px; }
.alpha-basket-preview-dialog > footer .button { grid-column: 2; min-width: 140px; }
.alpha-s04-center { min-width: 0; display: grid; gap: 12px; }
.alpha-s04-filter-panel { display: grid; gap: 12px; padding: 14px; }
.alpha-s04-core-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.alpha-s04-quick-filter { min-height: 48px; display: flex; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.alpha-s04-quick-filter > strong { flex: 0 0 auto; font-size: 13px; }
.alpha-s04-type-options { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.alpha-s04-type-options label { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; color: #536075; border: 1px solid var(--border); border-radius: 4px; background: #fff; cursor: pointer; }
.alpha-s04-type-options label.active { color: var(--primary); border-color: #9eb9f5; background: #edf3ff; }
.alpha-s04-type-options input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.alpha-s04-quick-filter > .button { flex: 0 0 auto; margin-left: auto; }
.alpha-s04-side { position: static; max-height: none; overflow: visible; }
.alpha-s04-side > .alpha-question-content { padding: 16px; }
.alpha-s04-side .alpha-basket-list { padding: 12px; }
.alpha-basket-content { display: grid; gap: 4px; }
.alpha-basket-content small { color: var(--muted); }
.alpha-s04-cart-rail { position: fixed; z-index: 45; right: 0; top: 142px; display: grid; gap: 8px; }
.alpha-s04-cart-rail button { position: relative; width: 68px; min-height: 62px; display: grid; place-items: center; gap: 2px; padding: 8px 6px; color: #32415a; border: 1px solid #cbd5e4; border-radius: 6px 0 0 6px; background: #fff; box-shadow: 0 5px 18px rgb(31 46 77 / 13%); cursor: pointer; }
.alpha-s04-cart-rail button:hover { color: var(--primary); border-color: #9eb9f5; background: #f5f8ff; }
.alpha-s04-cart-rail b { position: absolute; top: -8px; right: -5px; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 5px; color: #fff; border-radius: 11px; background: #ff4d4f; font-size: 11px; }
.alpha-s04-cart-rail span { font-size: 12px; font-weight: 700; }
.alpha-s04-drawer-backdrop { position: fixed; z-index: 70; inset: 0; visibility: hidden; opacity: 0; background: rgb(19 29 47 / 42%); transition: opacity .18s ease, visibility .18s ease; }
.alpha-s04-drawer-backdrop.open { visibility: visible; opacity: 1; }
.alpha-s04-drawer { position: fixed; z-index: 71; top: 0; right: 0; bottom: 0; width: min(780px, calc(100vw - 80px)); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; visibility: hidden; transform: translateX(100%); background: #fff; box-shadow: -12px 0 30px rgb(24 38 66 / 18%); transition: transform .22s ease, visibility .22s ease; }
.alpha-s04-drawer.open { visibility: visible; transform: translateX(0); }
.alpha-s04-drawer > header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.alpha-s04-drawer > header h2, .alpha-s04-drawer > header p { margin: 0; }
.alpha-s04-drawer > header h2 { font-size: 20px; }
.alpha-s04-drawer > header p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.alpha-s04-drawer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: #f8f9fb; }
.alpha-s04-drawer-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.alpha-s04-drawer > footer { min-height: 68px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); background: #fff; }
.alpha-s04-drawer > footer > span { margin-right: auto; color: var(--muted); font-size: 12px; }
.alpha-s04-basket-drawer .alpha-basket-list { padding: 14px 20px; }
.alpha-question-edit-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 18px; background: rgb(19 28 44 / 48%); backdrop-filter: blur(2px); }
.alpha-question-edit-modal { width: min(1560px, 97vw); height: min(960px, calc(100vh - 36px)); min-height: 640px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid #cbd2dd; border-radius: 6px; background: #fff; box-shadow: 0 22px 60px rgb(12 22 40 / 24%); }
.alpha-question-edit-modal > header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 20px; border-bottom: 1px solid var(--border); box-shadow: inset 4px 0 0 var(--primary); background: #fff; }
.alpha-question-edit-modal > header > div { min-width: 0; }
.alpha-question-edit-modal > header span { color: var(--primary); font-size: 12px; font-weight: 700; }
.alpha-question-edit-modal > header h2 { margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; }
.alpha-question-edit-modal > header p { margin: 0; color: var(--muted); font-size: 12px; }
.alpha-question-edit-modal > footer { min-height: 62px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 20px; border-top: 1px solid var(--border); background: #fff; }
.alpha-question-edit-modal > footer > span { margin-right: auto; color: var(--muted); font-size: 12px; }
.alpha-question-edit-modal > footer.review-actions { justify-content: flex-end; }
.alpha-question-edit-body { min-height: 0; display: grid; grid-template-columns: minmax(420px, 42%) minmax(560px, 58%); background: #fff; }
.alpha-question-source-pane, .alpha-question-structured-pane { min-width: 0; min-height: 0; }
.alpha-question-source-pane { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.alpha-question-source-pane { border-right: 1px solid #cfd6e2; background: #e9ecf1; }
.alpha-question-structured-pane { display: flex; flex-direction: column; background: #fff; }
.alpha-question-edit-pane-title { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.alpha-question-edit-pane-title > div { display: grid; gap: 2px; }
.alpha-question-edit-pane-title strong { font-size: 15px; }
.alpha-question-edit-pane-title span, .alpha-question-edit-pane-title em { color: var(--muted); font-size: 11px; font-style: normal; }
.alpha-question-source-pages { min-height: 0; padding: 22px; overflow-y: auto; overscroll-behavior: contain; }
.alpha-question-source-pages figure { width: min(100%, 760px); margin: 0 auto 18px; border: 1px solid #cfd5df; background: #fff; box-shadow: 0 5px 18px rgb(29 43 70 / 12%); }
.alpha-question-source-pages figure img { display: block; width: 100%; height: auto; }
.alpha-question-source-pages figcaption { padding: 8px 12px; color: var(--muted); border-top: 1px solid #e4e8ee; font-size: 11px; text-align: center; }
.alpha-question-source-document { width: min(100%, 760px); margin: 0 auto; padding: 22px; border: 1px solid #cfd5df; background: #fff; box-shadow: 0 5px 18px rgb(29 43 70 / 12%); }
.alpha-question-structured-pane { overflow-y: auto; overscroll-behavior: contain; }
.alpha-question-structured-pane > .alpha-question-edit-pane-title { position: sticky; z-index: 2; top: 0; }
.alpha-question-structured-pane > .rich-toolbar { position: static; flex: 0 0 auto; margin: 14px 20px 0; border: 1px solid var(--border); border-radius: 5px; background: #f8f9fb; box-shadow: none; }
.alpha-question-meta-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: #f8f9fb; }
.alpha-question-meta-grid > label { display: grid; gap: 6px; color: #596476; font-size: 12px; }
.alpha-question-meta-grid input, .alpha-question-meta-grid select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #d4dae4; border-radius: 4px; background: #fff; color: var(--text); }
.alpha-question-meta-grid > fieldset { display: flex; align-items: end; gap: 0; margin: 0; padding: 0; border: 0; }
.alpha-question-meta-grid > fieldset legend { margin-bottom: 6px; color: #596476; font-size: 12px; }
.alpha-question-meta-grid > fieldset label { min-width: 62px; height: 40px; display: grid; place-items: center; border: 1px solid #d4dae4; background: #fff; cursor: pointer; }
.alpha-question-meta-grid > fieldset label + label { border-left: 0; }
.alpha-question-meta-grid > fieldset input { position: absolute; opacity: 0; }
.alpha-question-meta-grid > fieldset label:has(input:checked) { color: var(--primary); background: #e9f0ff; font-weight: 700; }
.alpha-question-edit-fields { display: grid; flex: 0 0 auto; gap: 16px; padding: 20px; }
.alpha-question-edit-fields > label { display: grid; gap: 7px; }
.alpha-question-edit-fields > label > span, .alpha-question-option-editor legend { font-size: 13px; font-weight: 700; }
.alpha-question-edit-fields textarea { width: 100%; resize: vertical; padding: 12px 13px; color: var(--text); border: 1px solid #cfd6e1; border-radius: 4px; background: #fff; font: inherit; line-height: 1.7; }
.alpha-question-edit-fields textarea:focus, .alpha-question-meta-grid input:focus, .alpha-question-meta-grid select:focus { border-color: var(--primary); outline: 0; box-shadow: 0 0 0 2px rgb(55 113 255 / 10%); }
.alpha-question-option-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; margin: 0; padding: 12px; border: 1px solid #d9dfe8; background: #fff; }
.alpha-question-option-editor legend { padding: 0 5px; }
.alpha-question-option-editor label { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 7px; }
.alpha-question-option-editor b { width: 28px; height: 28px; display: grid; place-items: center; color: var(--primary); border-radius: 4px; background: #edf3ff; }
.alpha-question-option-editor textarea { min-height: 62px; resize: vertical; }
.alpha-handout-drawer-context { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)) auto; gap: 10px 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); background: #f7f9fc; }
.alpha-handout-drawer-context > label { display: grid; gap: 5px; color: #5e6879; font-size: 12px; }
.alpha-handout-drawer-context select { min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.alpha-handout-draft-select { grid-column: 1 / 4; }
.alpha-create-handout-button { align-self: end; height: 38px; white-space: nowrap; }
.alpha-handout-version-tabs { display: flex; align-items: end; gap: 5px; }
.alpha-handout-version-tabs button { min-width: 78px; height: 38px; display: flex; align-items: center; justify-content: center; gap: 5px; color: #536075; border: 1px solid var(--border); background: #fff; cursor: pointer; }
.alpha-handout-version-tabs button.active { color: var(--primary); border-color: #91aff3; background: #edf3ff; }
.alpha-handout-version-tabs em { color: var(--muted); font-size: 11px; font-style: normal; }
.alpha-handout-drawer-context fieldset { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 9px 12px; border: 1px solid #dbe1ea; background: #fff; }
.alpha-handout-drawer-context legend { padding: 0 5px; color: #596476; font-size: 12px; }
.alpha-handout-drawer-context fieldset label { display: inline-flex; align-items: center; gap: 6px; }
.alpha-handout-drawer-context input[type="checkbox"] { accent-color: var(--primary); }
.alpha-handout-drawer-context > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; }
.alpha-handout-drawer-context > p strong { color: var(--primary); }
.alpha-handout-document-editor { display: grid; align-content: start; gap: 12px; padding: 18px 22px 28px; background: #f4f6f9; }
.alpha-handout-title-input { width: 100%; height: 46px; padding: 0 14px; color: var(--text); border: 1px solid var(--border); background: #fff; font-size: 18px; font-weight: 700; text-align: center; }
.alpha-handout-drawer-block { padding: 14px 16px 18px; border: 1px solid var(--border); background: #fff; }
.alpha-handout-drawer-block.active { border-color: #8eacf0; box-shadow: inset 3px 0 0 var(--primary); }
.alpha-handout-drawer-block > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.alpha-handout-drawer-block > header > div { display: inline-flex; align-items: center; gap: 6px; }
.alpha-handout-block-readonly-title { width: 100%; min-height: 38px; display: flex; align-items: center; padding: 0 12px; margin-bottom: 10px; border: 1px solid var(--border); background: #f8fafc; font-weight: 700; }
.alpha-handout-block-target { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 0; color: var(--text); border: 0; background: transparent; text-align: left; cursor: pointer; }
.alpha-handout-block-target > span { width: 26px; height: 26px; display: grid; place-items: center; color: var(--primary); background: #edf3ff; font-size: 11px; }
.alpha-handout-block-target b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alpha-handout-block-target em { color: var(--muted); font-size: 11px; font-style: normal; }
.alpha-handout-block-title-input { width: 100%; height: 36px; margin-bottom: 10px; padding: 0 10px; border: 1px solid #dbe1ea; background: #f8f9fb; font-weight: 700; }
.alpha-handout-editable-copy { min-height: 88px; padding: 12px; border: 1px solid transparent; line-height: 1.75; outline: none; }
.alpha-handout-editable-copy:hover { border-color: #dbe1ea; }
.alpha-handout-editable-copy:focus { border-color: var(--primary); background: #fbfcff; box-shadow: 0 0 0 2px rgb(55 113 255 / 10%); }
.alpha-handout-editable-copy p { margin: 4px 0; }
.alpha-handout-drawer-block figure { margin: 8px 0; text-align: center; }
.alpha-handout-drawer-block figure img { max-width: 100%; max-height: 420px; object-fit: contain; }
.alpha-handout-drawer-block figcaption { margin-top: 6px; color: var(--muted); outline: none; }
.alpha-handout-drawer-block th[contenteditable], .alpha-handout-drawer-block td[contenteditable] { outline: none; }
.alpha-handout-drawer-block th[contenteditable]:focus, .alpha-handout-drawer-block td[contenteditable]:focus { background: #edf3ff; box-shadow: inset 0 0 0 1px var(--primary); }
.alpha-knowledge-edit-backdrop { position: fixed; z-index: 92; inset: 0; display: grid; place-items: center; padding: 18px; background: rgb(19 28 44 / 48%); backdrop-filter: blur(2px); }
.alpha-knowledge-edit-modal { width: min(1480px, 96vw); height: min(920px, calc(100vh - 36px)); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid #cbd2dd; border-radius: 6px; background: #fff; box-shadow: 0 22px 60px rgb(12 22 40 / 24%); }
.alpha-knowledge-edit-modal > header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 20px; border-bottom: 1px solid var(--border); box-shadow: inset 4px 0 0 var(--primary); background: #fff; }
.alpha-knowledge-edit-modal > header span { color: var(--primary); font-size: 12px; font-weight: 700; }
.alpha-knowledge-edit-modal > header h2 { margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; }
.alpha-knowledge-edit-modal > header p { margin: 0; color: var(--muted); font-size: 12px; }
.alpha-knowledge-modal-body { min-height: 0; overflow-y: auto; background: #f2f4f7; }
.alpha-knowledge-modal-body .knowledge-editor-panel { min-height: 100%; border: 0; border-radius: 0; }
.alpha-knowledge-modal-body .knowledge-card-meta { grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr) minmax(340px, 1.2fr); }
.alpha-knowledge-modal-body .knowledge-card-meta label { display: grid; gap: 6px; color: #596476; font-size: 12px; }
.alpha-knowledge-modal-body .knowledge-card-meta input,
.alpha-knowledge-modal-body .knowledge-card-meta select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: var(--text); }
.alpha-knowledge-modal-body .knowledge-rich-editable { min-height: 520px; }
.alpha-knowledge-modal-actions { position: sticky; bottom: 0; background: #fff; }
.alpha-handout-mounted-questions { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #cbd3df; }
.alpha-handout-mounted-questions h4 { margin: 0 0 2px; font-size: 13px; }
.alpha-handout-mounted-questions article { display: grid; grid-template-columns: 24px minmax(0, 1fr) 28px; gap: 9px; align-items: start; padding: 9px; border: 1px solid #e0e5ec; background: #fafbfc; }
.alpha-handout-mounted-questions article > span { color: var(--primary); font-weight: 700; }
.alpha-handout-mounted-questions article p { display: -webkit-box; margin: 4px 0 0; overflow: hidden; color: var(--muted); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.alpha-handout-mounted-questions article > button { width: 28px; height: 28px; padding: 0; color: #7d8795; border: 1px solid var(--border); background: #fff; cursor: pointer; }
.alpha-handout-mounted-questions article > button:hover { color: var(--danger); border-color: #efb3ad; }
.alpha-job-history .alpha-table-scroll { overflow-x: auto; }
.alpha-job-history table { width: 100%; min-width: 960px; border-collapse: collapse; }
.alpha-job-history th,
.alpha-job-history td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.alpha-job-history th { color: #657184; background: #f7f8fa; font-size: 12px; font-weight: 600; }
.alpha-job-history td { font-size: 13px; }
.alpha-job-history td strong,
.alpha-job-history td small { display: block; }
.alpha-job-history td small { max-width: 330px; margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.alpha-status { display: inline-block; padding: 3px 7px; border-radius: 4px; font-size: 12px; }
.status-processing { color: #245fc7; background: #edf3ff; }
.status-failed { color: var(--danger); background: #fff0ef; }
.status-completed { color: var(--success); background: #edfaf5; }
.status-cancelled { color: #7a8492; background: #f1f3f5; }
.alpha-link-button { display: inline-flex; margin-right: 10px; padding: 0; color: var(--primary); border: 0; background: transparent; font: inherit; text-decoration: none; cursor: pointer; }
.alpha-link-button.danger { color: var(--danger); }
.content-filled-answer { padding: 0 2px; border-bottom: 1px solid #8794a8; background: #f3f6fb; }

.editor-lab { --editor-zoom: 1; --editor-paper-width: 840px; --editor-paper-height: 1120px; --editor-paper-padding: 58px; min-height: 100vh; padding: 18px 24px 26px; background: #eef1f5; color: var(--text); }
.editor-lab-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; border: 1px solid var(--border); background: #fff; }
.editor-lab-header span { color: var(--primary); font-size: 12px; font-weight: 700; }
.editor-lab-header h1 { margin: 2px 0 0; font-size: 20px; line-height: 28px; }
.editor-lab-status { display: grid; justify-items: end; gap: 3px; }
.editor-lab-status b { color: var(--success); font-size: 13px; }
.editor-lab-status small { color: var(--muted); font-size: 11px; }
.editor-lab-toolbar { position: sticky; top: 0; z-index: 12; min-height: 50px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--border); background: #fff; box-shadow: 0 6px 18px rgb(33 45 69 / 8%); }
.editor-lab-toolgroup { min-height: 34px; display: inline-flex; align-items: center; gap: 4px; padding-right: 8px; border-right: 1px solid #e2e7ef; }
.editor-lab-toolgroup:last-child { padding-right: 0; border-right: 0; }
.editor-lab-toolbar button,
.editor-lab-toolbar select,
.editor-lab-toolbar input[type="color"] { height: 32px; min-width: 34px; padding: 0 9px; border: 1px solid #d5dbe5; border-radius: 4px; color: #273244; background: #fff; font-size: 12px; cursor: pointer; }
.editor-lab-toolbar input[type="color"] { width: 36px; padding: 2px; }
.editor-lab-toolbar button:hover,
.editor-lab-toolbar select:hover { border-color: #9eb9f5; background: #f5f8ff; }
.editor-lab-toolbar [data-table-tools] { min-width: 76px; padding: 0 10px; color: #334155; background: #f8fafc; }
.editor-lab-primary-actions { gap: 8px; padding-left: 2px; }
.editor-lab-primary-actions button { height: 42px; min-width: 72px; padding: 0 16px; border-color: #c9d4e5; background: #fbfdff; color: #1f2a3d; font-size: 15px; font-weight: 600; }
.editor-lab-primary-actions button[data-insert-question],
.editor-lab-primary-actions button[data-insert-knowledge] { border-color: #98b3ef; background: #edf3ff; color: #2457c5; }
.editor-lab-primary-actions button[data-insert-temp-knowledge] { border-color: #94d0b6; background: #eefaf5; color: #0f766e; }
.editor-lab-primary-actions button[data-insert-temp-question] { border-color: #f0c36a; background: #fff8e6; color: #8a5a00; }
.editor-insert-target { height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #d8e0ed; border-radius: 4px; background: #fff; color: #536075; font-size: 12px; }
.editor-insert-target select { height: 30px; min-width: 102px; border: 1px solid #cbd5e1; border-radius: 4px; background: #f8fafc; color: #263244; }
.editor-lab-document-actions button[data-save-draft] { border-color: #8fd5bd; background: #effaf6; color: #107656; }
.editor-lab-document-actions button[data-toggle-inspector] { min-width: 86px; color: #586579; background: #fff; }
.editor-lab-document-actions button[data-preview-mode] { border-color: #9eb9f5; background: #edf3ff; color: #2457c5; }
.editor-lab-document-actions button[data-preview-audience] { min-width: 64px; }
.editor-lab-document-actions button[data-preview-audience].active { border-color: #2457c5; background: #2457c5; color: #fff; }
.editor-preview-return-bar { display: none; }
.editor-lab-zoom-tools { margin-left: auto; }
.editor-lab-zoom-tools output { min-width: 42px; color: var(--muted); font-size: 12px; text-align: right; }
.editor-lab-body { display: grid; grid-template-columns: minmax(720px, 1fr); gap: 14px; margin-top: 12px; align-items: start; }
.editor-lab-editor-column { min-width: 0; border: 1px solid #d7dee9; background: #dfe4ec; }
.editor-version-bar { position: sticky; top: 68px; z-index: 8; display: grid; grid-template-columns: minmax(210px, 1fr) auto minmax(190px, auto); align-items: center; gap: 18px; padding: 10px 16px; border-bottom: 1px solid #ccd6e5; background: #f8fafc; box-shadow: 0 6px 14px rgb(31 45 72 / 7%); }
.editor-version-bar > div:first-child { display: grid; gap: 2px; }
.editor-version-bar strong { color: #24334d; font-size: 14px; }
.editor-version-bar span { color: #64748b; font-size: 12px; }
.editor-version-bar b { color: var(--primary); }
.editor-version-tabs { display: inline-flex; align-items: center; gap: 6px; }
.editor-version-tabs button { min-height: 34px; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #334155; cursor: pointer; }
.editor-version-tabs button.active { border-color: #3370ff; background: #edf3ff; color: #2457c5; font-weight: 700; box-shadow: 0 0 0 3px rgb(51 112 255 / 12%); }
.editor-version-bar label { display: inline-grid; grid-template-columns: auto minmax(150px, 1fr); align-items: center; gap: 8px; color: #64748b; font-size: 12px; }
.editor-version-bar select { height: 34px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #263244; }
.editor-master-heading { display: grid; gap: 2px; }
.editor-version-summary { display: inline-flex; align-items: center; gap: 8px; }
.editor-version-summary > div { min-width: 104px; display: grid; grid-template-columns: auto auto; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid #cad7ea; border-radius: 7px; background: #fff; }
.editor-version-summary span { color: #526176; }
.editor-version-summary b { color: #245fc4; font-size: 13px; }
.editor-master-hint { display: grid; justify-items: end; gap: 2px; }
.editor-master-hint span { color: #245fc4; font-weight: 700; }
.editor-master-hint em { color: #758196; font-size: 11px; font-style: normal; }
.editor-lab-paper-viewport { min-height: calc(100vh - 174px); overflow: auto; padding: 28px; }
.editor-master-workspace { width: var(--editor-paper-width); min-height: var(--editor-paper-height); margin: 0 auto; padding-bottom: 54px; }
.editor-master-paper { margin: 0; overflow: visible; }
.editor-master-paper .editor-lab-prosemirror { min-height: calc(var(--editor-paper-height) - var(--editor-paper-padding) * 2); }
.editor-auto-page-gap, .editor-page-break { width: calc(100% + var(--editor-paper-padding) * 2); height: calc(var(--editor-page-gap-fill, 0px) + var(--editor-paper-padding) * 2 + 34px); display: grid; place-items: center; margin: 0 calc(var(--editor-paper-padding) * -1); background: linear-gradient(to bottom, #fff 0 calc(var(--editor-page-gap-fill, 0px) + var(--editor-paper-padding)), #dfe4ec calc(var(--editor-page-gap-fill, 0px) + var(--editor-paper-padding)) calc(var(--editor-page-gap-fill, 0px) + var(--editor-paper-padding) + 34px), #fff calc(var(--editor-page-gap-fill, 0px) + var(--editor-paper-padding) + 34px) 100%); color: #8a96a8; font-size: 10px; user-select: none; }
.editor-auto-page-gap span, .editor-page-break span { align-self: center; padding: 2px 8px; border-radius: 10px; background: #edf1f6; }
.editor-auto-page-gap { position:relative; display:block; }
.editor-auto-page-gap span, .editor-page-break span { position:absolute; top:calc(var(--editor-page-gap-fill, 0px) + var(--editor-page-padding, var(--editor-paper-padding)) + 7px); left:50%; transform:translateX(-50%); }
.editor-has-internal-page-gap { overflow:visible!important; }
.editor-question-page-gap { position:relative; left:0; width:100%; height:calc(var(--editor-page-gap-fill, 0px) + var(--editor-page-padding, var(--editor-paper-padding)) * 2 + 34px); display:block; grid-column:1 / -1; margin:0; background:#fff; color:#8a96a8; font-size:10px; user-select:none; }
.editor-question-page-gap::before { content:""; position:absolute; top:calc(var(--editor-page-gap-fill, 0px) + var(--editor-page-padding, var(--editor-paper-padding))); left:calc(var(--editor-page-gap-left, 16px) * -1); width:var(--editor-page-gap-width, calc(100% + 32px)); height:34px; background:#dfe4ec; }
.editor-question-page-gap span { position:absolute; z-index:1; top:calc(var(--editor-page-gap-fill, 0px) + var(--editor-page-padding, var(--editor-paper-padding)) + 7px); left:50%; padding:2px 8px; border-radius:10px; background:#edf1f6; transform:translateX(-50%); white-space:nowrap; }
.editor-lab.is-master-document .editor-ref-config-bottom, .editor-lab.is-master-document .editor-ref-config-layers { display: flex; }
.editor-version-workspace { position: relative; width: calc(var(--editor-paper-width) + 210px); min-height: calc(var(--editor-paper-height) + 80px); margin: 0 auto; padding: 22px 0 56px 140px; }
.editor-lab-paper { width: var(--editor-paper-width); min-height: var(--editor-paper-height); margin: 0 auto; padding: var(--editor-paper-padding); border: 1px solid #d9dee8; background: #fff; box-shadow: 0 10px 28px rgb(26 39 62 / 10%); zoom: var(--editor-zoom); }
.editor-version-stack-item { position: absolute; top: 22px; left: 140px; width: var(--editor-paper-width); border: 2px solid #a9c0ff; border-radius: 4px; background: #fff; box-shadow: 0 12px 30px rgb(26 39 62 / 12%); overflow: hidden; transition: transform .2s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease; }
.editor-version-stack-item[data-stack-rank="1"] { transform: translate(-44px, 20px); }
.editor-version-stack-item[data-stack-rank="2"] { transform: translate(-88px, 42px); }
.editor-version-stack-item[data-stack-rank="0"] { transform: translate(0, 0); }
.editor-version-stack-item.active { z-index: 6; border-color: #1688ff; box-shadow: 0 0 0 3px rgb(22 136 255 / 18%), 0 20px 46px rgb(26 39 62 / 18%); transform: translate(0, 0); }
.editor-version-stack-item:not(.active) { cursor: pointer; opacity: .9; }
.editor-version-stack-item:not(.active) .editor-version-pane-paper { max-height: var(--editor-paper-height); overflow: hidden; opacity: .88; pointer-events: none; }
.editor-version-paper-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.editor-version-paper-header button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.editor-version-paper-header strong { color: #1e293b; font-size: 14px; }
.editor-version-paper-header span { color: #64748b; font-size: 12px; }
.editor-version-pane-paper { position: relative; margin: 0 auto; border: 0; box-shadow: none; transition: max-height .2s ease, opacity .2s ease; }
.editor-lab:not(.is-sync-versions):not(.is-preview-mode) .editor-version-workspace { width: var(--editor-paper-width); min-height: var(--editor-paper-height); padding: 0; }
.editor-lab:not(.is-sync-versions):not(.is-preview-mode) .editor-version-stack-item { position: static; width: var(--editor-paper-width); border: 0; box-shadow: none; transform: none; opacity: 1; overflow: visible; }
.editor-lab:not(.is-sync-versions):not(.is-preview-mode) .editor-version-stack-item:not(.active) { display: none; }
.editor-lab:not(.is-sync-versions):not(.is-preview-mode) .editor-version-stack-item:not(.active) .editor-version-pane-paper { pointer-events: none; }
.editor-lab:not(.is-sync-versions):not(.is-preview-mode) .editor-version-pane-paper { box-shadow: 0 10px 28px rgb(26 39 62 / 10%); }
.editor-lab.is-preview-mode .editor-lab-toolbar,
.editor-lab.is-preview-mode .editor-version-bar,
.editor-lab.is-preview-mode .editor-version-paper-header,
.editor-lab.is-preview-mode .editor-ref-heading,
.editor-lab.is-preview-mode .editor-ref-config-panel,
.editor-lab.is-preview-mode .editor-question-usage-tabs,
.editor-lab.is-preview-mode .editor-ref-actions,
.editor-lab.is-preview-mode .editor-temp-question-actions { display: none; }
.editor-lab.is-preview-mode .editor-preview-return-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 46px; padding: 8px 20px; border-bottom: 1px solid #e2e8f0; background: rgb(255 255 255 / 88%); backdrop-filter: blur(8px); }
.editor-preview-return-bar strong { margin-right: auto; color: #1e293b; font-size: 14px; }
.editor-preview-return-bar button { height: 32px; padding: 0 13px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #334155; cursor: pointer; }
.editor-preview-return-bar button.active { border-color: #2457c5; background: #2457c5; color: #fff; }
.editor-preview-return-bar button[data-preview-mode] { border-color: #86b7a4; background: #eefaf5; color: #0f766e; font-weight: 700; }
.editor-lab.is-preview-mode { background: #f7f7f4; }
.editor-lab.is-preview-mode .editor-lab-editor-column { border: 0; background: transparent; }
.editor-lab.is-preview-mode .editor-lab-paper-viewport { min-height: 100vh; padding-top: 32px; }
.editor-lab.is-preview-mode .editor-version-workspace { width: var(--editor-paper-width); min-height: var(--editor-paper-height); padding: 0; }
.editor-lab.is-preview-mode .editor-version-stack-item { position: static; width: var(--editor-paper-width); transform: none; border: 0; box-shadow: none; }
.editor-lab.is-preview-mode .editor-version-stack-item:not(.active) { display: none; }
.editor-lab.is-preview-mode .editor-version-pane-paper { border: 0; box-shadow: 0 10px 32px rgb(26 39 62 / 10%); }
.editor-lab.is-preview-mode .editor-master-workspace { width: var(--editor-paper-width); min-height: var(--editor-paper-height); padding: 0; }
.editor-lab.is-preview-mode .editor-master-paper { border: 0; box-shadow: 0 10px 32px rgb(26 39 62 / 10%); }
.editor-lab.is-preview-mode .editor-ref-card,
.editor-lab.is-preview-mode .editor-ref-card.ProseMirror-selectednode { border: 0; outline: 0; box-shadow: none; margin: 12px 0; }
.editor-lab.is-preview-mode .editor-ref-body { padding: 0; }
.editor-lab.is-preview-mode .editor-ref-body h3,
.editor-lab.is-preview-mode .editor-ref-meta { display: none; }
.editor-lab.is-student-preview .editor-ref-extra,
.editor-lab.is-student-preview .editor-temp-question-extra { display: none; }
.editor-lab-prosemirror { min-height: 980px; outline: none; color: #1f2937; font-size: 16px; line-height: 1.82; }
.editor-lab-prosemirror p { margin: 0 0 13px; }
.editor-lab-prosemirror h1,
.editor-lab-prosemirror h2,
.editor-lab-prosemirror h3 { margin: 18px 0 10px; line-height: 1.35; color: #172033; }
.editor-lab-prosemirror h1 { font-size: 30px; }
.editor-lab-prosemirror h2 { font-size: 24px; }
.editor-lab-prosemirror h3 { font-size: 20px; }
.editor-lab-prosemirror ul,
.editor-lab-prosemirror ol { margin: 8px 0 14px; padding-left: 28px; }
.editor-lab-prosemirror blockquote { margin: 12px 0; padding: 10px 14px; border-left: 4px solid #8aa7ec; background: #f6f8fc; color: #435068; }
.editor-lab-prosemirror table { width: 100%; margin: 16px 0; border-collapse: collapse; table-layout: fixed; }
.editor-lab-prosemirror th,
.editor-lab-prosemirror td { min-width: 80px; padding: 8px 10px; border: 1px solid #cfd6e2; vertical-align: top; }
.editor-lab-prosemirror th { background: #f4f6fa; font-weight: 700; }
.editor-lab-prosemirror img { max-width: 100%; height: auto; }
.editor-lab-inspector { display: none; max-height: 460px; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--border); background: #101722; color: #d7e1ef; }
.editor-lab-inspector.is-open { display: grid; }
.editor-lab-inspector header { padding: 12px 14px; border-bottom: 1px solid rgb(255 255 255 / 12%); }
.editor-lab-inspector strong,
.editor-lab-inspector small { display: block; }
.editor-lab-inspector small { margin-top: 4px; color: #98a8bc; font-size: 11px; }
.editor-lab-inspector pre { min-height: 0; margin: 0; padding: 14px; overflow: auto; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.editor-ref-card { margin: 18px 0; overflow: hidden; border: 1px solid #cfd8e6; border-radius: 6px; background: #fff; box-shadow: 0 4px 12px rgb(22 35 58 / 8%); }
.editor-ref-card.ProseMirror-selectednode { outline: 0; }
.editor-ref-card--knowledge { position: relative; border-color: #b8decf; }
.editor-ref-card--missing { padding: 14px; color: var(--danger); background: #fff4f2; }
.editor-ref-heading { min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #e2e7ef; background: #f5f8ff; color: #26395f; }
.editor-ref-heading--knowledge { background: #f0faf6; color: #176348; }
.editor-ref-grip { color: #748299; cursor: grab; font-size: 15px; }
.editor-ref-heading code { margin-left: auto; color: #5c6b82; font-size: 11px; }
.editor-ref-body { padding: 13px 16px 15px; }
.editor-ref-body h3 { margin: 0 0 8px; font-size: 16px; line-height: 24px; }
.editor-ref-body p { margin: 0 0 10px; }
.editor-ref-markdown h3,
.editor-ref-markdown h4,
.editor-ref-markdown h5,
.editor-knowledge-content h3,
.editor-knowledge-content h4,
.editor-knowledge-content h5,
.editor-ref-extra h3,
.editor-ref-extra h4,
.editor-ref-extra h5 { margin: 10px 0 6px; font-size: 14px; line-height: 22px; color: #253148; }
.editor-ref-markdown ul,
.editor-ref-markdown ol,
.editor-knowledge-content ul,
.editor-knowledge-content ol,
.editor-ref-extra ul,
.editor-ref-extra ol { margin: 7px 0 10px; padding-left: 22px; }
.editor-ref-markdown blockquote,
.editor-knowledge-content blockquote,
.editor-ref-extra blockquote { margin: 8px 0; padding: 7px 10px; border-left: 3px solid #9bbaff; background: #f6f9ff; color: #556174; }
.editor-ref-markdown code,
.editor-knowledge-content code,
.editor-ref-extra code { padding: 1px 4px; border-radius: 3px; background: #eef2f7; color: #26334c; font-family: Consolas, "Courier New", monospace; }
.editor-ref-image-wrap { display: grid; justify-items: start; gap: 6px; margin: 12px 0; }
.editor-ref-image { max-width: 100%; max-height: 360px; border: 1px solid #d9e1ec; border-radius: 6px; background: #fff; object-fit: contain; box-shadow: 0 8px 22px rgb(30 45 72 / 8%); }
.editor-ref-image-wrap figcaption { color: #7b8798; font-size: 12px; }
.editor-ref-card--question .editor-ref-image-wrap figcaption { display:none; }
.editor-ref-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 10px 0; padding-left: 20px; }
.editor-ref-options li { padding-left: 3px; }
.editor-ref-meta { margin-top: 9px; color: var(--muted); font-size: 12px; }
.editor-ref-meta-rich { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.editor-ref-meta-rich span { display: inline-flex; min-height: 24px; align-items: center; padding: 0 8px; border-radius: 999px; background: #f1f5f9; color: #526173; }
.editor-ref-meta-rich .tag { background: #edf7ff; color: #2463ad; }
.editor-ref-meta-rich .difficulty { background: #fff8e6; color: #a15c00; letter-spacing: 1px; }
.editor-ref-meta-rich .difficulty.muted { color: #8a94a6; background: #f6f7f9; letter-spacing: 0; }
.editor-ref-extra { margin-top: 10px; padding: 10px 12px; border: 1px dashed #cbd5e4; background: #fafbfc; }
.editor-ref-extra strong { display: block; margin-bottom: 4px; color: #344054; }
.editor-inline-active-field { display:inline-flex; min-height:32px; align-items:center; gap:6px; padding:0 10px; border:1px solid #dbe4f0; border-radius:7px; background:#f7f9fc; color:#77859a; font-size:11px; white-space:nowrap; }
.editor-inline-active-field strong { color:#2f6df6; font-size:12px; }
.editor-inline-question-field { position:relative; min-height:34px; padding:6px 8px; border:1px solid transparent; border-radius:7px; outline:none; cursor:text; user-select:text; transition:border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.editor-inline-question-field:hover { border-color:#dbe5f2; background:#fcfdff; }
.editor-inline-question-field:focus { border-color:#8eb0ff; background:#fff; box-shadow:0 0 0 3px rgb(47 109 246 / 9%); }
.editor-inline-question-field:focus::before { content:attr(data-inline-question-label); position:absolute; top:-10px; left:8px; z-index:2; padding:0 5px; background:#fff; color:#2f6df6; font-size:11px; font-weight:800; line-height:18px; }
.editor-inline-question-title { margin:0 0 6px; font-size:16px; font-weight:700; line-height:24px; }
.editor-inline-question-stem { font-size:15px; line-height:1.8; }
.editor-inline-question-options { display:grid; grid-template-columns:1fr 1fr; gap:5px 18px; margin:7px 0; padding:0; list-style:none; }
.editor-inline-question-options.is-collapsed { grid-template-columns:1fr; }
.editor-inline-question-option { min-width:0; }
.editor-ref-extra > .editor-inline-question-field { margin-top:5px; }
.editor-inline-knowledge-title { display:block; margin:0 0 6px; font-size:16px; font-weight:700; line-height:24px; }
.editor-inline-knowledge-text-field:empty::after { content:attr(data-inline-empty-label); color:#9aa6b5; font-weight:400; }
.editor-inline-knowledge-meta-fields { display:inline-flex; min-width:0; align-items:center; gap:2px; }
.editor-inline-knowledge-meta-fields > i { color:#9aa6b5; font-style:normal; }
.editor-inline-knowledge-meta-field { min-height:24px; padding:2px 4px; border-radius:4px; line-height:18px; }
.editor-inline-knowledge-content { min-height:72px; line-height:1.75; }
.editor-inline-question-hint { margin:10px 0 0!important; color:#8390a3; font-size:11px; }
.editor-question-usage-tabs { display:flex; gap:8px; padding:10px 16px; border-bottom:1px solid #e3e9f1; background:#fbfcfe; }
.editor-question-usage-tabs button { display:flex; min-width:132px; min-height:38px; align-items:center; justify-content:space-between; gap:12px; padding:0 12px; border:1px solid #d7e0ec; border-radius:8px; background:#fff; color:#465a75; cursor:pointer; }
.editor-question-usage-tabs button.active { border-color:#7da4fb; background:#eef4ff; color:#245dcc; box-shadow:0 0 0 2px rgb(51 112 255 / 7%); }
.editor-question-usage-tabs strong { font-size:13px; }
.editor-question-usage-tabs span { color:#8190a5; font-size:11px; }
.editor-question-parent-blank { display:inline-flex; min-width:32px; justify-content:center; color:#245dcc; font-weight:800; }
.editor-ref-body--children { padding:12px 14px 16px; background:#f8faff; }
.editor-question-children-intro { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; padding:9px 11px; border:1px solid #dbe4f0; border-radius:8px; background:#fff; }
.editor-question-children-intro strong { display:block; color:#24364f; font-size:13px; }
.editor-question-children-intro span { display:block; margin-top:2px; color:#7d8ba0; font-size:11px; }
.editor-question-children-intro > b { color:#2762d5; font-size:11px; }
.editor-question-child-picker { margin-bottom:11px; }
.editor-question-child-picker > header { display:flex; align-items:baseline; gap:8px; margin-bottom:8px; }
.editor-question-child-picker > header strong { color:#24364f; font-size:13px; }
.editor-question-child-picker > header span { color:#7d8ba0; font-size:10px; }
.editor-question-child-picker > div { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.editor-question-child-picker > div > label { display:flex; min-width:0; min-height:58px; align-items:center; gap:8px; padding:9px 10px; border:1px solid #d8e2ee; border-radius:8px; background:#fff; cursor:pointer; }
.editor-question-child-picker > div > label.selected { border-color:#7fa6fa; background:#eef4ff; box-shadow:0 0 0 2px rgb(51 112 255 / 6%); }
.editor-question-child-picker input { width:16px; height:16px; flex:none; accent-color:#3370ff; }
.editor-question-child-picker span { min-width:0; }
.editor-question-child-picker b,.editor-question-child-picker em { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.editor-question-child-picker b { color:#263a57; font-size:12px; }
.editor-question-child-picker em { margin-top:2px; color:#8491a4; font-size:9px; font-style:normal; }
.editor-question-child-picker label.selected em { color:#2762d5; }
.editor-question-children-list { display:grid; gap:11px; }
.editor-question-children-empty { display:grid; min-height:108px; place-content:center; border:1px dashed #cbd8e8; border-radius:9px; background:#fbfcff; text-align:center; }
.editor-question-children-empty strong { color:#405774; font-size:12px; }
.editor-question-children-empty span { margin-top:4px; color:#8491a4; font-size:10px; }
.editor-question-child-card { overflow:hidden; border:1px solid #d1dbe8; border-radius:9px; background:#fff; }
.editor-question-child-card.selected { border-color:#87aaf8; box-shadow:0 0 0 2px rgb(51 112 255 / 6%); }
.editor-question-child-heading { display:flex; min-height:42px; align-items:center; gap:9px; padding:7px 11px; border-bottom:1px solid #e0e7f0; background:#f6f9fd; }
.editor-question-child-check { display:grid; width:24px; place-items:center; }
.editor-question-child-check input { width:16px; height:16px; accent-color:#3370ff; }
.editor-question-child-heading > b { display:grid; width:28px; height:28px; place-items:center; border-radius:7px; background:#e6efff; color:#245dcc; font-size:12px; }
.editor-question-child-heading > strong { color:#263b58; font-size:13px; }
.editor-question-child-heading > span { margin-left:auto; color:#8190a5; font-size:11px; }
.editor-question-child-card.selected .editor-question-child-heading > span { color:#0f766e; font-weight:700; }
.editor-question-child-config { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:12px 13px; border-bottom:1px solid #dce5f2; background:linear-gradient(180deg,#f7fbff 0%,#fafdff 100%); }
.editor-question-child-knowledge-row { display:grid; grid-column:1/-1; gap:6px; color:#64748b; font-size:12px; font-weight:600; }
.editor-question-child-knowledge-row .editor-cascade-panel { right:auto; left:0; width:100%; }
.editor-question-child-config > label,.editor-question-child-layers { display:flex; min-width:0; flex-direction:column; gap:6px; color:#64748b; font-size:12px; font-weight:600; }
.editor-question-child-config select { width:100%; height:36px; padding:0 10px; border:1px solid #d5e0ef; border-radius:8px; background:#fff; color:#1e3a5f; font-size:12px; font-weight:700; }
.editor-question-child-layers > div { display:flex; min-height:36px; align-items:center; gap:6px; }
.editor-question-child-layers { grid-column:1/-1; padding-top:9px; border-top:1px dashed #d6dfec; }
.editor-question-child-layers label { display:flex; height:34px; align-items:center; gap:5px; padding:0 10px; border:1px solid #91c9c0; border-radius:17px; background:#eefaf7; color:#0f766e; font-size:11px; font-weight:700; white-space:nowrap; }
.editor-question-child-layers input { width:14px; height:14px; accent-color:#0f766e; }
.editor-lab.is-single-version .editor-question-child-layers { display:none; }
.editor-question-child-body { padding:11px 12px 12px; }
.editor-question-child-blank { display:inline-block; min-width:92px; margin:0 3px; border-bottom:1px solid #425873; color:#245dcc; font-weight:800; text-align:center; }
.editor-question-child-filled { padding:1px 3px; border-radius:4px; background:#edf3fb; color:#536982; text-decoration:underline dotted; }
.editor-question-child-options { margin-top:5px; }
.editor-question-child-actions { display:flex; justify-content:flex-end; gap:6px; padding:8px 11px; border-top:1px solid #e8edf4; background:#fbfcfe; }
.editor-question-child-actions button { height:29px; padding:0 9px; border:1px solid #d4deea; border-radius:6px; background:#fff; color:#405673; font-size:11px; font-weight:700; cursor:pointer; }
.editor-lab.is-preview-mode .editor-question-child-config,.editor-lab.is-preview-mode .editor-question-child-actions,.editor-lab.is-preview-mode .editor-question-children-intro,.editor-lab.is-preview-mode .editor-question-child-picker { display:none; }
.editor-lab.is-preview-mode .editor-ref-body--children { padding:0; background:transparent; }
.editor-lab.is-preview-mode .editor-question-child-card { border:0; border-radius:0; box-shadow:none; }
.editor-lab.is-preview-mode .editor-question-child-card + .editor-question-child-card { margin-top:14px; padding-top:14px; border-top:1px solid #e5e7eb; }
.editor-lab.is-preview-mode .editor-question-child-heading { min-height:34px; padding:0 0 6px; border:0; background:transparent; }
.editor-lab.is-preview-mode .editor-question-child-check,.editor-lab.is-preview-mode .editor-question-child-heading > span { display:none; }
.editor-lab.is-preview-mode .editor-question-child-body { padding:0; }
.editor-inline-field-image { position:relative; display:block; width:max-content; max-width:100%; margin:10px 0; padding:6px; border:1px solid #d8e1ec; border-radius:9px; background:#fff; }
.editor-inline-field-image img { display:block; width:auto; max-width:min(100%,520px); max-height:420px; border-radius:5px; }
.editor-inline-field-image button { position:absolute; top:8px; right:8px; min-height:28px; padding:0 8px; border:1px solid #e0c6c3; border-radius:7px; background:rgb(255 255 255 / 95%); color:#b44842; font-size:11px; font-weight:700; opacity:0; transition:opacity .15s ease; }
.editor-inline-field-image:hover button,.editor-inline-field-image:focus-within button { opacity:1; }
.editor-lab.is-preview-mode .editor-inline-question-field { padding:0; border-color:transparent; background:transparent; box-shadow:none; cursor:default; }
.editor-lab.is-preview-mode .editor-inline-question-hint { display:none; }
.editor-ref-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 9px 12px; border-top: 1px solid #edf0f5; background: #fbfcfe; }
.editor-ref-config-panel { display: grid; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #dce5f2; background: linear-gradient(180deg, #f7fbff 0%, #fafdff 100%); }
.editor-ref-knowledge-row { display: grid; gap: 6px; color: #64748b; font-size: 12px; font-weight: 600; }
.editor-ref-knowledge-row .editor-cascade-panel { right:auto; left:0; width:100%; }
.editor-ref-config-pills { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.editor-ref-config-pills label { display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #d5e0ef; border-radius: 999px; background: #fff; color: #64748b; font-size: 13px; }
.editor-ref-config-pills select { min-width: 110px; height: 28px; border: 0; background: transparent; color: #1e3a5f; font-weight: 700; outline: none; }
.editor-ref-config-pills > button { margin-left: auto; height: 36px; padding: 0 14px; border: 1px solid #cfd6e2; border-radius: 5px; background: #fff; color: #334155; cursor: pointer; }
.editor-ref-config-bottom { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 10px; border-top: 1px dashed #d6dfec; }
.editor-lab.is-single-version .editor-ref-config-bottom { display: none; }
.editor-ref-config-layers { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.editor-lab.is-single-version .editor-ref-config-layers { display: none; }
.editor-ref-config-layers > span { color: #64748b; font-size: 13px; }
.editor-ref-config-layers label { display: inline-flex; min-height: 34px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #91c9c0; border-radius: 999px; background: #eefaf7; color: #0f766e; font-weight: 700; }
.editor-ref-config-layers input { width: 15px; height: 15px; accent-color: #0f766e; }
.editor-ref-actions button,
.editor-picker-item button,
.editor-lab-dialog footer button { height: 30px; padding: 0 12px; border: 1px solid #cfd6e2; border-radius: 4px; background: #fff; color: #2f3b4f; font-size: 12px; cursor: pointer; }
.editor-ref-actions button:hover,
.editor-picker-item button:hover,
.editor-lab-dialog footer button:hover { color: var(--primary); border-color: #9eb9f5; background: #f5f8ff; }
.editor-knowledge-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.editor-knowledge-meta > span:first-child { min-width: 0; }
.editor-knowledge-blank-count { display: inline-flex; min-height: 22px; align-items: center; padding: 0 8px; border-radius: 999px; background: #fff8e6; color: #8a5a00; font-size: 11px; }
.editor-knowledge-content { margin-top: 10px; }
.editor-knowledge-content section + section { margin-top: 10px; }
.editor-knowledge-blank-region { cursor: text; user-select: text; }
.editor-knowledge-student-blank { padding: 1px 2px; border-radius: 3px; background: #fff3c9; color: inherit; box-shadow: inset 0 -2px 0 #d39b24; }
.editor-knowledge-student-blank.selected { background: #dce9ff; box-shadow: 0 0 0 2px rgb(51 112 255 / 32%); }
.editor-knowledge-blank-popover { position: absolute; z-index: 12; display: flex; min-height: 42px; max-width: 430px; align-items: center; gap: 9px; padding: 6px 7px 6px 10px; border: 1px solid #c8d7eb; border-radius: 9px; background: #fff; box-shadow: 0 10px 28px rgb(32 49 77 / 20%); }
.editor-knowledge-blank-popover[hidden] { display: none; }
.editor-knowledge-blank-popover span { max-width: 260px; overflow: hidden; color: #6f7e92; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.editor-knowledge-blank-popover b { color: #233c61; }
.editor-knowledge-blank-popover button { min-height: 30px; padding: 0 10px; border: 1px solid #3370ff; border-radius: 6px; background: #3370ff; color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.editor-student-blank { padding: 1px 2px; border-radius: 3px; background: #fff3c9; color: inherit; box-shadow: inset 0 -2px 0 #d39b24; }
.editor-student-blank-popover { position: fixed; z-index: 96; display: flex; min-height: 42px; width: max-content; max-width: 318px; align-items: center; gap: 9px; padding: 6px 7px 6px 10px; border: 1px solid #c8d7eb; border-radius: 9px; background: #fff; box-shadow: 0 10px 28px rgb(32 49 77 / 20%); }
.editor-student-blank-popover[hidden] { display: none; }
.editor-student-blank-popover span { max-width: 190px; overflow: hidden; color: #6f7e92; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.editor-student-blank-popover b { color: #233c61; }
.editor-student-blank-popover button { min-height: 30px; padding: 0 10px; border: 1px solid #3370ff; border-radius: 6px; background: #3370ff; color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.editor-lab.is-preview-mode .editor-knowledge-blank-count,
.editor-lab.is-preview-mode .editor-knowledge-blank-popover,
.editor-lab.is-preview-mode .editor-student-blank-popover { display: none !important; }
.editor-lab.is-preview-mode:not(.is-student-preview) .editor-knowledge-student-blank { padding: 0; background: transparent; box-shadow: none; }
.editor-lab.is-preview-mode:not(.is-student-preview) .editor-student-blank { padding: 0; background: transparent; box-shadow: none; }
.editor-lab.is-student-preview .editor-knowledge-student-blank,
.editor-lab.is-student-preview .editor-student-blank { display: inline-block; min-width: 4em; padding: 0 2px; border-bottom: 1px solid #33465e; border-radius: 0; background: transparent; color: transparent !important; line-height: 1.15; box-shadow: none; user-select: none; }
.editor-formula { display: inline-flex; align-items: baseline; padding: 0 1px; border-radius: 3px; background: transparent; box-shadow: none; vertical-align: baseline; font-style: italic; cursor: text; }
.editor-formula.has-formula-background { padding: 2px 4px; }
.editor-formula:hover { background: #eef4ff; box-shadow: 0 0 0 1px #bfd2f4; }
.editor-lab-dialog.editor-lab-formula-dialog { width: min(1180px, calc(100vw - 32px)) !important; max-height: min(820px, calc(100vh - 32px)); }
.editor-lab-formula-dialog form { width: 100%; max-height: min(820px, calc(100vh - 32px)); overflow: hidden !important; }
.editor-lab-formula-dialog header > div { display: grid; gap: 2px; }
.editor-lab-formula-dialog header small { color: #738096; font-size: 11px; font-weight: 400; }
.editor-formula-workspace { height: min(590px, calc(100vh - 170px)); min-height: 450px; display: grid; grid-template-columns: 350px minmax(0, 1fr); overflow: hidden; }
.editor-formula-palette { min-height: 0; display: grid; grid-template-rows: minmax(180px, 43%) minmax(0, 1fr); gap: 0; padding: 0; border-right: 1px solid #dce3ed; background: #f7f9fc; overflow: hidden; }
.editor-formula-palette-tabs { min-height: 0; display: grid; align-content: start; gap: 12px; overflow-y: auto; padding: 14px; border-bottom: 1px solid #dce3ed; scrollbar-color: #aeb9c8 transparent; scrollbar-width: thin; }
.editor-formula-tab-family { display: grid; gap: 7px; }
.editor-formula-tab-family > strong { color: #7a8799; font-size: 10px; font-weight: 700; }
.editor-formula-tab-family > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.editor-formula-palette-tabs button { min-height: 34px; padding: 0 7px; border: 1px solid #d7dfeb; border-radius: 6px; background: #fff; color: #617086; font-size: 11px; cursor: pointer; }
.editor-formula-palette-tabs button.active { color: #1f5fc8; border-color: #8fb0ef; background: #eaf1ff; font-weight: 700; }
.editor-formula-library { min-height: 0; overflow-y: auto; padding: 14px; scrollbar-color: #aeb9c8 transparent; scrollbar-width: thin; }
.editor-formula-category { display: none; gap: 9px; }
.editor-formula-category.active { display: grid; }
.editor-formula-template-section { display: grid; gap: 9px; }
.editor-formula-template-section + .editor-formula-template-section { padding-top: 5px; border-top: 1px solid #e3e8f0; }
.editor-formula-palette h4 { margin: 0; color: #334155; font-size: 13px; }
.editor-formula-template-grid, .editor-formula-symbol-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.editor-formula-template-grid button, .editor-formula-symbol-grid button { min-height: 54px; padding: 4px; border: 1px solid #d3dce9; border-radius: 8px; background: #fff; color: #25364e; font: inherit; font-size: 14px; cursor: pointer; }
.editor-formula-template-grid button:hover, .editor-formula-symbol-grid button:hover { color: #205cc8; border-color: #8fb0ef; background: #f2f6ff; }
.editor-formula-template-grid [data-formula-template-preview] { display: grid; place-items: center; min-width: 0; min-height: 30px; }
.editor-formula-canvas { min-width: 0; display: grid; grid-template-rows: auto minmax(310px, 1fr) auto; align-content: stretch; gap: 12px; padding: 18px 20px; background: #fff; }
.editor-formula-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.editor-formula-field-heading > div { display: grid; gap: 2px; }
.editor-formula-field-heading strong { color: #22324a; font-size: 14px; }
.editor-formula-field-heading span { color: #7b8798; font-size: 11px; }
.editor-formula-field-heading button { min-height: 32px; padding: 0 12px; border: 1px solid #d4dde9; border-radius: 7px; background: #fff; color: #526176; cursor: pointer; }
.editor-formula-canvas math-field { min-height: 310px; display: block; padding: 26px; border: 1px solid #aebed3; border-radius: 10px; background: #fff; color: #17243a; font-size: 32px; box-shadow: inset 0 1px 2px rgb(20 35 58 / 5%); --caret-color: #246bdb; --selection-background-color: #dce9ff; }
.editor-formula-canvas math-field::part(virtual-keyboard-toggle) { display: none; }
.editor-formula-canvas math-field:focus-within { border-color: #3974de; box-shadow: 0 0 0 3px rgb(57 116 222 / 12%); }
.editor-formula-result { display: grid; gap: 7px; }
.editor-formula-result > span { color: #526176; font-size: 12px; }
.editor-lab-formula-dialog .editor-formula-preview { min-height: 76px; display: grid; place-items: center; padding: 14px; border: 1px solid #e0e6ef; border-radius: 7px; background: #fafbfd; font-size: 22px; }
.editor-formula-source { overflow: hidden; border: 1px solid #e2e8f0; border-radius: 8px; background: #fbfcfe; }
.editor-formula-source summary { padding: 11px 13px; color: #64748b; font-size: 12px; cursor: pointer; }
.editor-formula-source textarea { width: 100%; margin-top: 10px; resize: vertical; font-family: "SFMono-Regular", Consolas, monospace; }
.editor-formula-source[open] textarea { box-sizing: border-box; margin: 0; padding: 12px 13px; border: 0; border-top: 1px solid #e2e8f0; border-radius: 0; outline: none; }
.editor-lab-formula-dialog footer { gap: 9px; }
.editor-formula-footer-meta { display: flex; min-width: 0; flex: 1; align-items: center; gap: 14px; margin-right: auto; }
[data-formula-status] { overflow: hidden; color: #7b8798; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
[data-formula-status][data-state="valid"] { color: #17815f; }
[data-formula-status][data-state="invalid"] { color: #c2413a; }
.editor-lab-formula-dialog [data-formula-confirm]:disabled { border-color: #d7dde6; background: #e8edf4; color: #98a4b4; cursor: not-allowed; }
.editor-lab-formula-dialog header { min-height: 52px !important; padding: 9px 18px !important; }
.editor-lab-formula-dialog header button { width: 32px !important; height: 32px !important; }
.editor-lab-formula-dialog footer { padding: 10px 18px 12px !important; }
.editor-lab-formula-dialog footer button { height: 36px !important; min-width: 76px; border-radius: 8px !important; }
@media (max-width: 860px) { .editor-formula-workspace { grid-template-columns: 1fr; overflow: auto; } .editor-formula-palette { min-height: 390px; border-right: 0; border-bottom: 1px solid #dce3ed; } .editor-formula-template-grid, .editor-formula-symbol-grid { grid-template-columns: repeat(6, 1fr); } .editor-formula-canvas math-field { min-height: 220px; } }
.editor-formula figcaption { color: var(--muted); font-size: 11px; }
.editor-page-break { position:relative; display:block; margin:0 calc(var(--editor-paper-padding) * -1); border:0; text-align:center; }
.editor-page-break.ProseMirror-selectednode { outline:0; }
.editor-page-break.ProseMirror-selectednode span { color:#245dcc; background:#eaf1ff; box-shadow:0 0 0 1px #7fa6fa; }
.editor-formula--inline { display:inline-flex; align-items:center; margin:0 2px; padding:1px 3px; border:1px solid transparent; border-radius:4px; cursor:pointer; }
.editor-formula--inline:hover { border-color:#a9c2f5; background:#f5f8ff; }
.editor-formula--inline.ProseMirror-selectednode { border-color:#3370ff; background:#eaf1ff; outline:2px solid rgb(51 112 255 / 20%); outline-offset:1px; }
.editor-formula--block.ProseMirror-selectednode { outline:2px solid #3370ff; outline-offset:2px; }
.editor-ref-math { border:1px solid transparent; border-radius:4px; font-style:italic; cursor:pointer; }
.editor-ref-math:hover { border-color:#a9c2f5; background:#f5f8ff; }
.editor-ref-math.is-selected { border-color:#3370ff; background:#eaf1ff; outline:2px solid rgb(51 112 255 / 20%); outline-offset:1px; }
.editor-lab.is-preview-mode .editor-ref-math { border-color:transparent; background:transparent; cursor:default; outline:0; }
.editor-lab.is-preview-mode .editor-formula--inline { margin:0 2px; padding:0; border-color:transparent; background:transparent; cursor:default; outline:0; }
.editor-textbox-node { margin: 16px 0; padding: 14px 16px; border: 1px dashed #95aad0; border-left: 5px solid #5274c9; border-radius: 6px; background: #fbfdff; }
.editor-textbox-node.ProseMirror-selectednode { outline: 2px solid #3370ff; outline-offset: 2px; }
.editor-textbox-node strong { display: block; margin-bottom: 7px; color: #284476; }
.editor-textbox-node p { margin: 0 0 8px; }
.editor-textbox-node small { display: block; margin-top: 8px; color: #7a8798; font-size: 11px; }
.editor-temp-question { margin: 18px 0; overflow: hidden; border: 1px solid #f0d38a; border-radius: 6px; background: #fff; box-shadow: 0 4px 12px rgb(76 56 20 / 8%); }
.editor-temp-question.ProseMirror-selectednode { outline: 0; }
.editor-temp-question-heading { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 13px; border-bottom: 1px solid #f3dfaa; background: #fff8e6; }
.editor-temp-question-heading strong { color: #7a4e00; font-size: 14px; }
.editor-temp-question-heading span { color: #927641; font-size: 11px; }
.editor-temp-question-body { padding: 14px 16px; }
.editor-temp-question-body p { margin: 0 0 10px; }
.editor-temp-question-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 10px 0; padding-left: 20px; }
.editor-temp-question-extra { margin-top: 10px; padding: 10px 12px; border: 1px dashed #e9ca76; background: #fffaf0; }
.editor-temp-question-extra strong { display: block; margin-bottom: 4px; color: #6d4b12; }
.editor-temp-question-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 9px 12px; border-top: 1px solid #f3dfaa; background: #fffdf7; }
.editor-temp-question-actions button { height: 30px; padding: 0 12px; border: 1px solid #e2c36f; border-radius: 4px; background: #fff; color: #6f520f; font-size: 12px; cursor: pointer; }
.editor-temp-question-actions button:hover { border-color: #d99a00; background: #fff8e6; }
.editor-mindmap { position: relative; margin: 18px 0; overflow: hidden; border: 1px solid #c8d7ec; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgb(22 35 58 / 9%); }
.editor-mindmap.ProseMirror-selectednode { outline: 0; }
.editor-mindmap-heading { position:absolute; z-index:8; top:10px; left:10px; right:10px; min-height:52px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 12px; border:1px solid #d9e5f4; border-radius:10px; background:rgb(250 252 255 / 96%); box-shadow:0 8px 24px rgb(22 35 58 / 14%); opacity:0; visibility:hidden; transform:translateY(-6px); pointer-events:none; transition:opacity .16s ease,transform .16s ease,visibility .16s; }
.editor-mindmap-heading>div:first-child { display:grid; gap:3px; }
.editor-mindmap-heading span { color:#71819a; font-size:10px; font-weight:800; letter-spacing:.04em; }
.editor-mindmap-heading strong { color: #193b6a; font-size: 15px; }
.editor-mindmap-heading-actions { display:flex; align-items:center; gap:7px; }
.editor-mindmap-heading button { min-height:30px; padding:0 10px; border:1px solid #b9cff7; border-radius:7px; background:#fff; color:#245dcc; font-size:11px; font-weight:700; cursor:pointer; }
.editor-mindmap-heading .editor-mindmap-blank-mode { border-color:#e3c169; background:#fffaf0; color:#8b5d00; }
.editor-mindmap-heading .editor-mindmap-blank-mode.active { border-color:#e0a927; background:#fff1bf; box-shadow:0 0 0 3px rgb(224 169 39 / 14%); }
.editor-mindmap:hover .editor-mindmap-heading,
.editor-mindmap:focus-within .editor-mindmap-heading { opacity:1; visibility:visible; transform:none; pointer-events:auto; }
.editor-lab:not(.is-preview-mode) .editor-mindmap:not(:hover):not(:focus-within) { border-color:transparent; box-shadow:none; }
.editor-lab.is-preview-mode .editor-mindmap { border-color:transparent; outline:0!important; box-shadow:none; }
.editor-lab.is-preview-mode .editor-mindmap-heading { display:none!important; }
.editor-mindmap-preview { position:relative; width:100%; height:320px; overflow:hidden; background:radial-gradient(circle at 18px 18px,#e7edf6 1px,transparent 1px) 0 0/18px 18px,#fbfdff; }
.editor-mindmap-preview .map-container { --bgcolor:transparent!important; --root-bgcolor:#243f6b; --root-color:#fff; --root-radius:18px; --main-radius:12px; --main-color:#35557b; --main-bgcolor:#fff; --selected:#3370ff; --node-gap-y:14px; --main-gap-x:68px; --main-gap-y:42px; --map-padding:48px 70px; }
.editor-mindmap-preview .map-container me-root me-tpc { min-width:132px; padding:11px 19px; border:0; box-shadow:0 9px 24px rgb(36 63 107 / 18%); font-size:16px; font-weight:900; text-align:center; }
.editor-mindmap-preview .map-container me-main>me-wrapper>me-parent>me-tpc { min-width:104px; padding:7px 12px; border:1px solid #bcd0e9; border-radius:11px; background:#fff; color:#254c77; font-size:12px; font-weight:800; text-align:center; box-shadow:0 4px 12px rgb(36 60 92 / 7%); }
.editor-mindmap-preview .map-container me-children me-children me-tpc { padding:5px 8px; border-radius:7px; color:#40556e; font-size:11px; }
.editor-mindmap-preview.is-blank-mode me-tpc.editor-mindmap-node--blank-target { cursor:pointer; }
.editor-mindmap-preview.is-blank-mode me-tpc.editor-mindmap-node--blank-target:hover { outline:3px solid rgb(224 169 39 / 25%); outline-offset:3px; }
.editor-mindmap-preview me-tpc.editor-mindmap-node--student-blank { position:relative; border-color:#dda832!important; background:#fff6d9!important; color:#7b5300!important; box-shadow:inset 0 -2px 0 #d39b24!important; }
.editor-mindmap-preview me-tpc.editor-mindmap-node--student-blank::after { content:"空"; position:absolute; top:-8px; right:-8px; display:grid; width:18px; height:18px; place-items:center; border-radius:50%; background:#d99a00; color:#fff; font-size:9px; font-weight:900; }
.editor-mindmap-canvas { padding: 18px; overflow: auto; }
.editor-mindmap-canvas ul,
.editor-mindmap-live ul { display: flex; align-items: flex-start; gap: 22px; margin: 0; padding: 0; list-style: none; }
.editor-mindmap-canvas li,
.editor-mindmap-live li { display: grid; justify-items: center; gap: 14px; position: relative; }
.editor-mindmap-canvas li ul,
.editor-mindmap-live li ul { padding-top: 12px; }
.editor-mindmap-node { display: inline-flex; min-height: 32px; max-width: 210px; align-items: center; justify-content: center; padding: 6px 12px; border: 1px solid #c9d8ee; border-radius: 999px; background: #fff; color: #23324a; line-height: 1.35; text-align: center; box-shadow: 0 3px 10px rgb(31 46 77 / 8%); }
.editor-mindmap-node[data-depth="0"] { border-color: #7aa3ef; background: #eaf2ff; color: #164ca1; font-weight: 700; }
.editor-mindmap-node--student-blank { border-color: #dda832; background: #fff6d9; box-shadow: inset 0 -2px 0 #d39b24; cursor: pointer; }
.editor-mindmap-blank-popover { position: absolute; z-index: 12; display: flex; min-height: 42px; max-width: 330px; align-items: center; gap: 9px; padding: 6px 7px 6px 10px; border: 1px solid #c8d7eb; border-radius: 9px; background: #fff; box-shadow: 0 10px 28px rgb(32 49 77 / 20%); }
.editor-mindmap-blank-popover[hidden] { display: none; }
.editor-mindmap-blank-popover span { max-width: 190px; overflow: hidden; color: #233c61; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.editor-mindmap-blank-popover button { min-height: 30px; padding: 0 10px; border: 1px solid #3370ff; border-radius: 6px; background: #3370ff; color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.editor-lab.is-preview-mode .editor-mindmap-blank-popover { display: none !important; }
.editor-lab.is-preview-mode:not(.is-student-preview) .editor-mindmap-node--student-blank { border-color: #c9d8ee; background: #fff; box-shadow: 0 3px 10px rgb(31 46 77 / 8%); }
.editor-lab.is-preview-mode:not(.is-student-preview) .editor-mindmap-node--student-blank[data-depth="0"] { border-color: #7aa3ef; background: #eaf2ff; }
.editor-lab.is-student-preview .editor-mindmap-node--student-blank { min-width: 6em; color: transparent !important; background: #fff; border-color: #526176; box-shadow: none; user-select: none; }
.editor-lab.is-preview-mode:not(.is-student-preview) .editor-mindmap-preview me-tpc.editor-mindmap-node--student-blank { border-color:#bcd0e9!important; background:#fff!important; color:#254c77!important; box-shadow:0 4px 12px rgb(36 60 92 / 7%)!important; }
.editor-lab.is-preview-mode:not(.is-student-preview) .editor-mindmap-preview me-tpc.editor-mindmap-node--student-blank::after { display:none; }
.editor-lab.is-student-preview .editor-mindmap-preview me-tpc.editor-mindmap-node--student-blank { min-width:7em; color:transparent!important; background:#fff!important; border-color:#65758b!important; box-shadow:inset 0 -1px 0 #65758b!important; user-select:none; }
.editor-lab.is-student-preview .editor-mindmap-preview me-tpc.editor-mindmap-node--student-blank::after { display:none; }
.editor-slash-menu { position: fixed; z-index: 80; width: 250px; max-height: 340px; overflow: auto; padding: 7px; border: 1px solid #cfd6e2; border-radius: 6px; background: #fff; box-shadow: 0 16px 36px rgb(19 31 54 / 18%); }
.editor-slash-menu button { width: 100%; min-height: 34px; display: flex; align-items: center; padding: 0 10px; border: 0; border-radius: 4px; background: #fff; color: #263244; text-align: left; cursor: pointer; }
.editor-slash-menu button.active,
.editor-slash-menu button:hover { color: var(--primary); background: #edf3ff; }
.editor-slash-group { padding: 8px 8px 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.editor-lab-dialog { width: min(760px, calc(100vw - 48px)); max-height: min(780px, calc(100vh - 48px)); padding: 0; border: 1px solid #c8d0dc; border-radius: 6px; background: #fff; box-shadow: 0 22px 58px rgb(16 27 48 / 24%); }
.editor-lab-dialog::backdrop { background: rgb(16 24 40 / 42%); }
.editor-lab-dialog form { display: grid; gap: 0; margin: 0; }
.editor-lab-dialog header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.editor-lab-dialog header button { width: 30px; height: 30px; border: 0; background: transparent; font-size: 18px; cursor: pointer; }
.editor-lab-dialog input[type="search"],
.editor-lab-dialog textarea { margin: 14px 16px 0; padding: 10px 12px; border: 1px solid #cfd6e2; border-radius: 4px; font: inherit; }
.editor-picker-list { max-height: 560px; padding: 12px 16px 16px; overflow: auto; }
.editor-picker-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 12px 0; border-bottom: 1px solid #edf0f5; }
.editor-picker-item strong,
.editor-picker-item p,
.editor-picker-item small { min-width: 0; margin: 0; }
.editor-picker-item p { color: #4d596a; line-height: 1.6; }
.editor-picker-item small { color: var(--muted); font-size: 11px; }
.editor-picker-item button { grid-row: 1 / span 3; grid-column: 2; align-self: center; }
.editor-empty { margin: 0; padding: 20px; color: var(--muted); text-align: center; }
.editor-formula-preview { min-height: 72px; display: grid; place-items: center; margin: 14px 16px; padding: 16px; overflow: auto; border: 1px solid #dfe4ec; background: #f8fafc; }
.editor-lab-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 16px; }
.editor-table-picker { display: grid; grid-template-columns: 120px 120px minmax(180px, 1fr); gap: 14px; align-items: start; padding: 16px; }
.editor-table-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; }
.editor-table-tools button { min-height: 38px; border: 1px solid #cfd6e2; border-radius: 4px; background: #fff; color: #263244; cursor: pointer; }
.editor-table-tools button:hover { color: var(--primary); border-color: #9eb9f5; background: #f5f8ff; }
.editor-table-tools button.danger { grid-column: 1 / -1; color: #b42318; border-color: #efc5c0; background: #fff8f7; }
.editor-table-picker label,
.editor-mindmap-editor label,
.editor-textbox-editor label,
.editor-find-grid label { display: grid; gap: 6px; color: #5b6678; font-size: 12px; }
.editor-table-picker input,
.editor-mindmap-editor input,
.editor-mindmap-editor textarea,
.editor-textbox-editor input,
.editor-textbox-editor textarea,
.editor-find-grid input { min-height: 36px; padding: 8px 10px; border: 1px solid #cfd6e2; border-radius: 4px; color: var(--text); background: #fff; font: inherit; }
.editor-table-preview { display: grid; gap: 3px; align-content: start; padding: 10px; border: 1px solid #dbe3ef; background: #f8fafc; }
.editor-table-preview span { width: 18px; height: 18px; border: 1px solid #9eb9f5; background: #edf3ff; }
.editor-mindmap-dialog { width: min(1040px, calc(100vw - 48px)); }
.editor-mindmap-editor { display: grid; gap: 10px; padding: 12px 16px; }
.editor-mindmap-title-row { display:flex!important; max-width:none; align-items:center; gap:10px!important; }
.editor-mindmap-title-row input { width:280px; }
.editor-mindmap-commandbar { display: flex; flex-wrap: wrap; align-items:center; gap: 7px; padding: 0; border: 0; background: transparent; }
.editor-mindmap-commandbar button { min-height: 34px; padding: 0 12px; border: 1px solid #d5deea; border-radius: 7px; background: #fff; color: #344b68; font-size:12px; font-weight:700; cursor: pointer; }
.editor-mindmap-commandbar button:hover { color: var(--primary); border-color: #9eb9f5; background: #edf3ff; }
.editor-mindmap-commandbar button.danger { color: #b42318; border-color: #efc5c0; background: #fff8f7; }
.editor-mindmap-command-separator { width:1px; height:24px; margin:0 2px; background:#dfe5ed; }
.editor-mindmap-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.editor-mindmap-live { min-height: 500px; overflow: hidden; padding: 0; border: 1px solid #dbe3ef; border-radius: 8px; background: radial-gradient(circle at 20px 20px, #e6edf8 1px, transparent 1px) 0 0 / 18px 18px, #fbfdff; outline: none; }
.editor-mindmap-live:focus { border-color: #8fb1ef; box-shadow: 0 0 0 3px rgb(51 112 255 / 12%); }
.editor-mindelixir-canvas { position:relative; width:100%; height:500px; }
.editor-mindelixir-canvas .map-container { --bgcolor:transparent!important; --root-bgcolor:#243f6b; --root-color:#fff; --root-radius:18px; --main-radius:12px; --main-color:#35557b; --main-bgcolor:#fff; --selected:#3370ff; --node-gap-y:14px; --main-gap-x:70px; --main-gap-y:50px; --map-padding:70px 100px; }
.editor-mindelixir-canvas .map-container me-root me-tpc { min-width:145px; padding:13px 22px; border:0; box-shadow:0 9px 24px rgb(36 63 107 / 18%); font-size:18px; font-weight:900; text-align:center; }
.editor-mindelixir-canvas .map-container me-main>me-wrapper>me-parent>me-tpc { min-width:110px; padding:8px 14px; border:1px solid #bcd0e9; border-radius:11px; background:#fff; color:#254c77; font-size:13px; font-weight:800; text-align:center; box-shadow:0 4px 12px rgb(36 60 92 / 7%); }
.editor-mindelixir-canvas .map-container me-children me-children me-tpc { padding:5px 8px; border-radius:7px; color:#40556e; font-size:11px; }
.editor-mindelixir-canvas .map-container me-tpc.selected { outline:3px solid rgb(51 112 255 / 30%); outline-offset:3px; }
.editor-mindelixir-canvas .map-container me-tpc { cursor:grab; touch-action:none; }
.editor-mindelixir-canvas .map-container me-tpc:active { cursor:grabbing; }
.editor-mindelixir-canvas .map-container .insert-preview.show { opacity:.9; background:#5a9bff; }
.editor-mindelixir-canvas me-tpc.editor-mindmap-dragging { opacity:.42; }
.editor-mindelixir-canvas me-tpc.editor-mindmap-drop-in { outline:3px solid rgb(15 159 110 / 35%); outline-offset:4px; background:#ecfdf5!important; }
.editor-mindelixir-canvas me-tpc.editor-mindmap-drop-before::before,.editor-mindelixir-canvas me-tpc.editor-mindmap-drop-after::after { content:""; position:absolute; right:0; left:0; height:3px; border-radius:2px; background:#3370ff; }
.editor-mindelixir-canvas me-tpc.editor-mindmap-drop-before::before { top:-7px; }
.editor-mindelixir-canvas me-tpc.editor-mindmap-drop-after::after { bottom:-7px; }
.editor-mindelixir-canvas.editor-mindmap-side-left::before,
.editor-mindelixir-canvas.editor-mindmap-side-right::after { position:absolute; z-index:30; top:14px; bottom:14px; display:grid; width:calc(50% - 94px); place-items:center; border:2px dashed #7ca4f5; border-radius:14px; background:rgb(235 243 255 / 76%); color:#245fc4; font-size:13px; font-weight:800; pointer-events:none; }
.editor-mindelixir-canvas.editor-mindmap-side-left::before { content:"放到左侧"; left:14px; }
.editor-mindelixir-canvas.editor-mindmap-side-right::after { content:"放到右侧"; right:14px; }
.editor-jsmind-canvas { width: 100%; height: 460px; min-width: 720px; }
.jsmind-inner { position: relative; width: 100%; height: 100%; overflow: auto; outline: none; user-select: none; }
.editor-mindmap-links { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: visible; }
.editor-mindmap-links path { fill: none; stroke: #7fa0d7; stroke-width: 4; stroke-linecap: round; opacity: .92; filter: drop-shadow(0 3px 4px rgb(58 91 154 / 12%)); }
.jsmind-inner canvas,
.jsmind-inner svg.jsmind,
.jsmind-inner canvas.jsmind { position: absolute; z-index: 1; }
.jsmind-inner jmnodes { position: absolute; z-index: 3; background-color: rgb(0 0 0 / 0%); }
.jsmind-inner jmnode { position: absolute; max-width: 260px; padding: 9px 14px; border: 1px solid #bcd0ef; border-radius: 16px; background: #fff; color: #1d2b46; box-shadow: 0 7px 18px rgb(30 48 84 / 12%); font: 15px/1.35 "Microsoft YaHei", Arial, sans-serif; cursor: pointer; transition: box-shadow .16s ease, transform .16s ease, background .16s ease; }
.jsmind-inner jmnode:hover { transform: translateY(-1px); border-color: #82a8ee; background: #f5f8ff; box-shadow: 0 10px 24px rgb(30 48 84 / 18%); }
.jsmind-inner jmnode.selected { border-color: #2563eb; background: #eaf2ff; color: #164ca1; box-shadow: 0 0 0 3px rgb(37 99 235 / 18%), 0 12px 26px rgb(30 48 84 / 16%); }
.jsmind-inner jmnode.root { padding: 13px 22px; border-radius: 22px; background: linear-gradient(135deg, #1d4ed8, #2563eb); color: #fff; font-size: 20px; font-weight: 700; box-shadow: 0 16px 34px rgb(37 99 235 / 24%); }
.jsmind-inner jmexpander { position: absolute; width: 16px; height: 16px; display: block; overflow: hidden; border: 1px solid #9db5dc; border-radius: 999px; background: #fff; color: #315a9f; line-height: 14px; font-size: 11px; text-align: center; cursor: pointer; z-index: 3; }
.jsmind-draggable-shadow-node { opacity: .72; }
.editor-mindmap-edit-node { display: inline-flex; min-height: 34px; max-width: 220px; align-items: center; justify-content: center; gap: 7px; padding: 7px 13px; border: 1px solid #c9d8ee; border-radius: 999px; background: #fff; color: #23324a; line-height: 1.35; text-align: center; box-shadow: 0 3px 10px rgb(31 46 77 / 8%); cursor: grab; }
.editor-mindmap-edit-node:active { cursor: grabbing; }
.editor-mindmap-edit-node:hover { border-color: #8fb1ef; background: #f5f8ff; }
.editor-mindmap-edit-node.selected { border-color: #3370ff; background: #eaf2ff; color: #164ca1; box-shadow: 0 0 0 3px rgb(51 112 255 / 16%), 0 8px 18px rgb(31 46 77 / 12%); }
.editor-mindmap-edit-node.dragging { opacity: .48; }
.editor-mindmap-edit-node.drop-target { border-color: #0f9f6e; background: #ecfdf5; box-shadow: 0 0 0 4px rgb(16 185 129 / 16%); }
.editor-mindmap-edit-node small { display: inline-grid; min-width: 18px; height: 18px; place-items: center; padding: 0 4px; border-radius: 999px; background: #edf3ff; color: #315a9f; font-size: 11px; line-height: 1; }
.editor-mindmap-inline-input { width: 180px; min-height: 34px; padding: 6px 10px; border: 2px solid #3370ff; border-radius: 999px; color: #163b76; text-align: center; box-shadow: 0 0 0 3px rgb(51 112 255 / 14%); }
.editor-mindmap-cheatsheet { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 10px 12px; border: 1px solid #dbe3ef; border-radius: 6px; background: #fff; color: #5b6678; font-size: 12px; }
.editor-mindmap-cheatsheet strong { color: #263244; font-size: 13px; }
.editor-mindmap-status { display:none; }
.editor-mindmap-dialog { width:min(1040px,calc(100vw - 48px))!important; }
.editor-mindmap-dialog form { overflow:hidden!important; }
.editor-mindmap-title-row { flex:0 0 auto; white-space:nowrap; }
.editor-mindmap-title-row input { min-width:280px; }
.editor-mindmap-live { min-height:clamp(320px,calc(100vh - 350px),460px); }
.editor-mindelixir-canvas { height:clamp(320px,calc(100vh - 350px),460px); }
.editor-textbox-editor,
.editor-temp-question-editor,
.editor-find-grid { display: grid; gap: 12px; padding: 16px; }
.editor-reference-dialog { width: min(980px, calc(100vw - 48px)); }
.editor-question-source-dialog { width:min(1480px,calc(100vw - 40px)); max-height:calc(100vh - 32px); }
.editor-question-source-dialog > form { height:min(900px,calc(100vh - 32px)); display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; }
.editor-question-source-dialog header p { margin:3px 0 0; color:#748197; font-size:12px; font-weight:400; }
.editor-question-source-grid { min-height:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.08fr); overflow:hidden; }
.editor-question-source-grid > section { min-width:0; padding:26px 30px; overflow:auto; color:#28364c; line-height:1.75; }
.editor-question-source-grid > section:first-child { border-right:1px solid #e1e7ef; background:#f6f8fb; }
.editor-question-source-grid > section > span { display:inline-flex; padding:3px 8px; border-radius:999px; background:#eaf0f8; color:#607089; font-size:11px; font-weight:800; }
.editor-question-source-grid h3 { margin:12px 0 10px; color:#172a46; font-size:17px; }
.editor-question-source-grid aside { margin-top:12px; padding:10px 12px; border:1px dashed #ccd7e5; border-radius:8px; background:#fff; }
.editor-question-source-grid aside > strong { display:block; margin-bottom:4px; color:#4a5b72; }
.editor-question-source-images { display:grid; gap:18px; margin-top:16px; }
.editor-question-source-images figure { margin:0; padding:12px; border:1px solid #dfe6ef; border-radius:12px; background:#fff; box-shadow:0 8px 24px rgb(31 46 77 / 7%); }
.editor-question-source-images img { width:100%; height:auto; display:block; border-radius:7px; object-fit:contain; }
.editor-question-source-images figcaption { margin-top:9px; color:#7b8799; font-size:11px; text-align:center; }
.editor-question-source-fallback { margin-top:16px; padding:18px; border:1px dashed #cdd7e5; border-radius:10px; background:#fff; }
.editor-question-source-options { display:grid; grid-template-columns:1fr 1fr; gap:6px 18px; margin-top:9px; }
@media (max-width:760px) { .editor-inline-question-options,.editor-question-source-options,.editor-question-source-grid { grid-template-columns:1fr; } .editor-question-source-grid > section:first-child { border-right:0; border-bottom:1px solid #e1e7ef; } }
.editor-reference-field-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; padding: 16px; }
.editor-reference-field-editor label { display: grid; gap: 6px; color: #5b6678; font-size: 12px; }
.editor-reference-field-editor [hidden] { display: none !important; }
.editor-reference-field-editor input,
.editor-reference-field-editor select,
.editor-reference-field-editor textarea { min-height: 36px; padding: 8px 10px; border: 1px solid #cfd6e2; border-radius: 4px; color: var(--text); background: #fff; font: inherit; }
.editor-reference-field-editor textarea { resize: vertical; line-height: 1.6; }
.editor-reference-field-wide { grid-column: 1 / -1; }
.editor-reference-answer textarea { min-height: 110px; }
.editor-reference-analysis textarea { min-height: 300px; }
.editor-textbox-editor textarea { resize: vertical; line-height: 1.6; }
.editor-temp-question-editor { grid-template-columns: 1fr 1fr; }
.editor-temp-question-editor label { display: grid; gap: 6px; color: #5b6678; font-size: 12px; }
.editor-temp-question-editor label:first-child,
.editor-temp-question-editor label:nth-child(2),
.editor-temp-question-editor label:last-child { grid-column: 1 / -1; }
.editor-temp-question-editor input,
.editor-temp-question-editor textarea { min-height: 36px; padding: 8px 10px; border: 1px solid #cfd6e2; border-radius: 4px; color: var(--text); background: #fff; font: inherit; }
.editor-temp-question-editor textarea { resize: vertical; line-height: 1.6; }
.editor-symbol-grid { display: grid; grid-template-columns: repeat(10, 42px); gap: 8px; padding: 16px; }
.editor-symbol-grid button { width: 42px; height: 38px; border: 1px solid #cfd6e2; border-radius: 4px; background: #fff; color: #1f2937; font-size: 18px; cursor: pointer; }
.editor-symbol-grid button:hover { color: var(--primary); border-color: #9eb9f5; background: #f5f8ff; }
.editor-find-grid output { color: var(--muted); font-size: 12px; }

@media (max-width: 1280px) {
  .editor-lab-body { grid-template-columns: 1fr; }
  .editor-lab-inspector { position: static; max-height: 460px; }
  .editor-lab-zoom-tools { margin-left: 0; }
}

@media (max-width: 860px) {
  .editor-lab { padding: 12px; }
  .editor-lab-header { align-items: flex-start; flex-direction: column; }
  .editor-lab-status { justify-items: start; }
  .editor-version-bar { position: static; grid-template-columns: 1fr; }
  .editor-lab-paper-viewport { padding: 16px; }
  .editor-lab-paper { width: min(var(--editor-paper-width), 760px); }
  .editor-ref-options { grid-template-columns: 1fr; }
  .editor-temp-question-options { grid-template-columns: 1fr; }
  .editor-table-picker,
  .editor-mindmap-editor,
  .editor-temp-question-editor,
  .editor-reference-field-editor { grid-template-columns: 1fr; }
  .editor-mindmap-workspace { grid-template-columns: 1fr; }
}

.alpha-s06-topbar { min-height: 66px; display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 0 20px; }
.alpha-s06-topbar > div:nth-child(2) { display: grid; justify-items: center; gap: 3px; }
.alpha-s06-topbar > div:nth-child(2) strong { font-size: 18px; }
.alpha-s06-topbar > div:nth-child(2) span { color: var(--muted); font-size: 12px; }
.alpha-back-link { justify-self: start; padding: 8px 0; color: #4f5968; border: 0; background: transparent; font-size: 14px; }
.alpha-s06-topbar .alpha-version-tabs { justify-content: flex-end; }
.alpha-audience-select { display: grid; gap: 6px; padding: 14px 16px 0; color: var(--muted); font-size: 12px; }
.alpha-audience-select select { height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.alpha-toc-note { margin: 8px 16px 4px; color: var(--muted); font-size: 11px; }

.alpha-export-title { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.alpha-export-title h1 { margin: 0; font-size: 20px; }
.alpha-export-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.alpha-export-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; border-radius: 5px; background: var(--primary); font-size: 22px; }
.alpha-pending-export .alpha-table-scroll, .alpha-job-history .alpha-table-scroll { overflow-x: auto; }
.alpha-pending-export table { width: 100%; min-width: 1020px; border-collapse: collapse; }
.alpha-pending-export th, .alpha-pending-export td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.alpha-pending-export th { color: #657184; background: #f7f8fa; font-size: 12px; }
.alpha-pending-export td:first-child { display: grid; grid-template-columns: 32px minmax(220px, 1fr); align-items: center; gap: 4px 8px; }
.alpha-pending-export td:first-child b { grid-row: 1 / span 2; }
.alpha-pending-export td:first-child input { height: 34px; padding: 0 8px; border: 1px solid var(--border); }
.alpha-pending-export td:first-child small { grid-column: 2; color: var(--muted); }
.alpha-pending-export select { min-width: 118px; height: 34px; border: 1px solid var(--border); background: #fff; }
.alpha-pending-export .alpha-pagination, .alpha-job-history .alpha-pagination { padding: 10px 14px; }
.alpha-job-history td:first-child { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 8px; }
.alpha-job-history td:first-child b { grid-row: 1 / span 2; }
.alpha-job-history td:first-child small { grid-column: 2; }

.alpha-lecture-files .alpha-section-title { padding: 16px 18px; }
.alpha-lecture-files table { width: 100%; min-width: 1080px; border-collapse: collapse; }
.alpha-lecture-files th, .alpha-lecture-files td { padding: 13px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.alpha-lecture-files th { color: #657184; background: #f7f8fa; font-size: 12px; }
.alpha-lecture-files select { min-width: 138px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.alpha-lecture-file-row > td:first-child { display: grid; grid-template-columns: 28px minmax(260px, 1fr); align-items: center; gap: 2px 8px; }
.alpha-lecture-file-row > td:first-child div { min-width: 0; display: grid; gap: 4px; }
.alpha-lecture-file-row > td:first-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alpha-lecture-file-row small, .alpha-export-history-item small { color: var(--muted); font-size: 11px; }
.alpha-lecture-file-row > td:last-child { white-space: nowrap; }
.alpha-download-button { width: auto; min-width: 72px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: 5px; font-size: 13px; }
.alpha-lecture-history-row > td { padding: 0; background: #f8faff; }
.alpha-lecture-history { padding: 14px 24px 16px 52px; }
.alpha-lecture-history-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: #4d5a70; }
.alpha-lecture-history-title span { color: var(--muted); font-size: 12px; }
.alpha-export-history-item { min-height: 48px; display: grid; grid-template-columns: minmax(360px, 1fr) 100px minmax(180px, auto); align-items: center; gap: 18px; border-top: 1px solid #e3e8f2; }
.alpha-export-history-item > div:first-child { min-width: 0; display: grid; gap: 3px; }
.alpha-export-history-item > div:last-child { display: flex; justify-content: flex-end; gap: 8px; }
.alpha-export-history-empty { padding: 20px 0; color: var(--muted); text-align: center; font-size: 13px; border-top: 1px solid #e3e8f2; }
.alpha-export-history-panel { overflow: hidden; }
.alpha-export-history-panel .alpha-lecture-history { padding: 16px 20px 18px; }
.alpha-export-history-panel .alpha-lecture-history-title { min-height: 38px; margin-bottom: 8px; }
.alpha-export-history-columns { min-height: 34px; display: grid; grid-template-columns: minmax(360px, 1fr) 100px minmax(180px, auto); align-items: center; gap: 18px; padding: 0 10px; color: #657184; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #f7f8fa; font-size: 12px; font-weight: 600; }
.alpha-export-history-item { padding: 0 10px; }

.alpha-file-filter-panel { padding: 14px 18px 16px; }
.alpha-file-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.alpha-file-filter-heading > div { display: grid; gap: 3px; }
.alpha-file-filter-heading span { color: var(--muted); font-size: 12px; }
.alpha-file-filter-heading strong { font-size: 14px; }
.alpha-file-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, .7fr)) minmax(280px, 1.5fr); gap: 12px; }
.alpha-file-filter-grid label { min-width: 0; display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.alpha-file-filter-grid select, .alpha-file-filter-grid input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 13px; }
.alpha-file-search { grid-template-columns: minmax(0, 1fr) auto; }
.alpha-file-search > input { grid-column: 1; }
.alpha-file-search .button { width: auto; min-width: 70px; height: 34px; padding: 0 14px; border-radius: 6px; font-size: 13px; }
.alpha-lecture-files table { min-width: 0; table-layout: fixed; }
.alpha-lecture-files th:nth-child(1) { width: 34%; }
.alpha-lecture-files th:nth-child(2) { width: 17%; }
.alpha-lecture-files th:nth-child(3) { width: 14%; }
.alpha-lecture-files th:nth-child(4) { width: 12%; }
.alpha-lecture-files th:nth-child(5) { width: 23%; }
.alpha-lecture-files select { width: 100%; min-width: 0; }
.alpha-lecture-file-row > td:first-child { grid-template-columns: 26px minmax(0, 1fr); }
.alpha-lecture-file-row > td:last-child { white-space: normal; }
.alpha-lecture-file-row > td:last-child > * { margin: 2px 4px 2px 0; vertical-align: middle; }
.alpha-lecture-file-row > td:last-child .alpha-link-button { min-height: 30px; display: inline-flex; align-items: center; padding: 0 8px; color: #4169bd; border: 1px solid #d8e1f2; border-radius: 5px; background: #f8faff; font-size: 12px; text-decoration: none; }
.alpha-lecture-file-row > td:last-child .alpha-link-button:hover { border-color: #9db4e4; background: #eef4ff; }
.alpha-lecture-file-row > td:last-child [data-action="s07-toggle-file-history"] { display: none; }
.alpha-file-filter-heading .button { min-width: 82px; }
.alpha-lecture-files th, .alpha-lecture-files td { padding-top: 10px; padding-bottom: 10px; }
.alpha-lecture-file-row strong { font-size: 14px; }
.alpha-global-history-button { margin-left: auto; }
.alpha-global-export-history { overflow: hidden; }
.alpha-global-export-heading { min-height: 72px; display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.alpha-global-export-heading > div { margin-right: auto; }
.alpha-global-export-heading h2 { margin: 0; font-size: 18px; }
.alpha-global-export-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.alpha-global-export-heading > span { color: var(--muted); font-size: 12px; }
.alpha-global-export-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.alpha-global-export-table th, .alpha-global-export-table td { padding: 10px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.alpha-global-export-table th { color: #657184; background: #f7f8fa; font-size: 12px; }
.alpha-global-export-table th:nth-child(1) { width: 7%; }
.alpha-global-export-table th:nth-child(2) { width: 43%; }
.alpha-global-export-table th:nth-child(3) { width: 16%; }
.alpha-global-export-table th:nth-child(4) { width: 14%; }
.alpha-global-export-table th:nth-child(5) { width: 20%; }
.alpha-global-export-table td:nth-child(2) { display: grid; gap: 3px; }
.alpha-global-export-table td:nth-child(2) small { color: var(--muted); font-size: 11px; }
.alpha-global-export-table td:last-child { white-space: nowrap; }

@media (max-width: 1280px) {
  .alpha-file-filter-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .alpha-file-search { grid-column: 1 / -1; }
  .alpha-s04-layout { grid-template-columns: 210px minmax(420px, 1fr); }
  .alpha-s04-side { position: static; grid-column: 2; max-height: none; }
  .alpha-filter-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .alpha-two-column { grid-template-columns: 1fr; }
  .alpha-s05-filter-row,
  .alpha-s05-main { grid-template-columns: 1fr; }
  .alpha-s05-knowledge-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alpha-s05-assignment { grid-template-columns: 1fr; }
  .alpha-s05-actions { justify-content: flex-start; }
  .alpha-preview-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .alpha-handout-paper { padding: 38px 40px 50px; }
  .alpha-export-options { grid-template-columns: 1fr 1fr; }
  .alpha-export-options fieldset:first-child { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .file-management-header { align-items: stretch; flex-direction: column; }
  .file-management-tabs { width: 100%; }
  .file-management-tabs a { flex: 1; }
  .current-batch-row { grid-template-columns: minmax(180px, 1fr) 100px; padding: 8px 0; }
  .current-batch-stage, .current-batch-status { grid-column: 1; }
  .current-batch-actions { grid-column: 2; grid-row: 1 / span 2; }
  .import-upload-heading { align-items: flex-start; flex-direction: column; }
  .import-batch-bar { grid-template-columns: 1fr; gap: 3px; padding: 9px 14px; }
  .import-batch-bar span:last-child { text-align: left; }
  .alpha-file-filter-grid { grid-template-columns: 1fr; }
  .alpha-file-search { grid-column: auto; }
  .alpha-question-edit-backdrop { padding: 0; }
  .alpha-question-edit-modal { width: 100vw; height: 100vh; min-height: 0; border: 0; border-radius: 0; }
  .alpha-question-edit-body { grid-template-columns: 1fr; overflow-y: auto; }
  .alpha-question-source-pane, .alpha-question-structured-pane { min-height: 70vh; overflow: visible; }
  .alpha-question-source-pane { border-right: 0; border-bottom: 1px solid var(--border); }
  .alpha-question-source-pages, .alpha-question-structured-pane { overflow: visible; }
  .alpha-question-meta-grid, .alpha-question-option-editor { grid-template-columns: 1fr; }
}

.editor-version-summary { display: none !important; }
.editor-single-version-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.editor-single-version-tabs button b { min-width: 34px; color: #2965d6; font-size: 12px; font-weight: 800; }
.editor-single-version-tabs button.active b { color: #1f58c5; }

.editor-color-spectrum {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 7px 4px 11px;
  color: #42516a;
  border: 1px solid #d4deeb;
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.editor-color-spectrum:hover { color: #245fc4; border-color: #a9bee8; background: #f7f9ff; }
.editor-color-spectrum input[type="color"] { width: 29px; height: 29px; padding: 2px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }
.editor-color-spectrum input[type="color"]::-webkit-color-swatch-wrapper { padding: 1px; }
.editor-color-spectrum input[type="color"]::-webkit-color-swatch { border: 1px solid #cbd6e5; border-radius: 5px; }
.import-unified-panel { height: auto !important; min-height: 0; overflow: visible !important; }
.import-record-pagination { position: static; margin-top: 0; border-top: 1px solid #e3e9f1; background: #fff; }

.editor-preflight-backdrop { position: fixed; z-index: 500; inset: 0; display: grid; place-items: center; padding: 24px; background: rgb(18 28 46 / 52%); backdrop-filter: blur(5px); }
.editor-preflight-dialog { box-sizing: border-box; width: min(560px, calc(100vw - 48px)); display: block; overflow: hidden; color: #17243a; border: 1px solid #dce4ef; border-radius: 20px; background: #fff; box-shadow: 0 28px 90px rgb(18 31 54 / 30%); writing-mode: horizontal-tb; }
.editor-preflight-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; border-bottom: 1px solid #e6ebf2; background: linear-gradient(180deg, #fff, #fbfcff); }
.editor-preflight-dialog > header > div { min-width: 0; display: grid; gap: 4px; }
.editor-preflight-dialog > header span { color: #2d6be3; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.editor-preflight-dialog > header h2 { margin: 0; font-size: 21px; white-space: normal; }
.editor-preflight-dialog > header p { margin: 0; color: #6c7890; font-size: 13px; white-space: normal; }
.editor-preflight-dialog > header button { width: 34px; height: 34px; flex: 0 0 auto; color: #647188; border: 0; border-radius: 9px; background: #f2f5f9; font-size: 20px; cursor: pointer; }
.editor-preflight-check-list { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 22px 24px; }
.editor-preflight-check-list label { width: auto; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 15px 16px; border: 1px solid #dbe3ee; border-radius: 12px; background: #fbfcfe; cursor: pointer; writing-mode: horizontal-tb; }
.editor-preflight-check-list label:has(input:checked) { border-color: #8db2ef; background: #f1f6ff; box-shadow: 0 0 0 3px rgb(55 111 238 / 8%); }
.editor-preflight-check-list input { width: 18px; height: 18px; margin-top: 2px; accent-color: #3473eb; }
.editor-preflight-check-list span { min-width: 0; display: grid; gap: 4px; }
.editor-preflight-check-list strong { font-size: 14px; white-space: normal; }
.editor-preflight-check-list small { color: #6d7990; font-size: 12px; line-height: 1.55; white-space: normal; }
.editor-preflight-dialog > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 24px; border-top: 1px solid #e6ebf2; background: #fbfcfe; }
.editor-preflight-dialog > footer .button { min-height: 42px; padding-inline: 19px; border-radius: 10px; }
.editor-preflight-dialog > footer .button:disabled { color: #9aa6b8; background: #e9edf3; box-shadow: none; cursor: not-allowed; }
[data-qm-cascade-panel][hidden],
[data-ref-cascade-panel][hidden] { display: none !important; }
@media (max-width: 620px) { .editor-preflight-backdrop { padding: 12px; } .editor-preflight-dialog { width: 100%; } .editor-preflight-dialog > footer { flex-direction: column-reverse; } }

@media (max-width: 860px) {
  .alpha-s04-layout { grid-template-columns: 1fr; }
  .alpha-s04-layout.alpha-s04-library-layout { grid-template-columns: 1fr; }
  .alpha-s04-drawer { width: 100vw; }
  .alpha-s04-cart-rail { right: 6px; top: auto; bottom: 18px; grid-auto-flow: column; }
  .alpha-handout-drawer-context { grid-template-columns: 1fr; }
  .alpha-handout-version-tabs, .alpha-handout-drawer-context fieldset, .alpha-handout-drawer-context > p { grid-column: 1; }
  .alpha-s04-side { grid-column: auto; }
  .alpha-question-row-main { grid-template-columns: 18px minmax(0, 1fr); }
  .alpha-question-row-actions { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .alpha-question-expansion { margin-left: 16px; }
  .alpha-workspace { padding: 12px; }
  .alpha-filter-grid,
  .alpha-preview-layout,
  .alpha-export-options { grid-template-columns: 1fr; }
  .alpha-export-options fieldset:first-child { grid-column: auto; }
  .alpha-toc { position: static; }
  .alpha-handout-paper { padding: 28px 20px 40px; }
  .alpha-basket-item { grid-template-columns: 50px minmax(0, 1fr); }
  .alpha-basket-item > label,
  .alpha-basket-item > .button { grid-column: 2; }
  .alpha-candidate-card { grid-template-columns: 1fr; }
  .alpha-version-checks { justify-content: flex-start; }
  .alpha-options { grid-template-columns: 1fr; }
}


/* Master document and per-version editing */
.editor-version-bar {
  grid-template-columns: minmax(210px, 1fr) auto minmax(300px, auto) auto;
  align-items: center;
  gap: 12px 18px;
}

.editor-mode-switch,
.editor-single-version-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d7dfec;
  border-radius: 12px;
  background: #f5f8fc;
}

.editor-mode-switch button,
.editor-single-version-tabs button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #526078;
  font-weight: 700;
  cursor: pointer;
}

.editor-mode-switch button.active,
.editor-single-version-tabs button.active {
  background: #fff;
  color: #245eea;
  box-shadow: 0 2px 8px rgba(30, 67, 135, 0.13);
}

.editor-single-version-tabs {
  display: none;
  grid-column: 1 / -1;
  justify-self: center;
  padding: 5px;
}

.editor-lab.is-single-version .editor-single-version-tabs {
  display: inline-flex;
}

.editor-lab.is-single-version .editor-master-heading strong {
  color: #205bcf;
}

.editor-paper-mode-label {
  margin: calc(var(--editor-paper-padding, 64px) * -0.55) 0 26px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e1e6ef;
  color: #6d7890;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.editor-lab.is-single-version .editor-paper-mode-label {
  color: #1f5fd4;
}

@media (max-width: 1180px) {
  .editor-version-bar {
    grid-template-columns: 1fr auto;
  }

  .editor-version-summary,
  .editor-master-hint {
    grid-column: 1 / -1;
  }
}



/* Versioned preview and export snapshot flow */
.editor-lab-status {
  display: flex;
  align-items: center;
  gap: 14px;
}

.editor-lab-status [data-direct-export],
.editor-lab-status [data-preview-entry] {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #2f6df6;
  border-radius: 10px;
  background: #2f6df6;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.editor-preview-return-bar {
  gap: 12px;
  flex-wrap: wrap;
}

.editor-preview-return-bar > strong {
  margin-right: auto;
  white-space: nowrap;
}

.editor-preview-control-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d7dfec;
  border-radius: 12px;
  background: #f5f8fc;
}

.editor-preview-control-group > span {
  padding: 0 8px;
  color: #718097;
  font-size: 13px;
  font-weight: 700;
}

.editor-preview-control-group button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.editor-preview-control-group button.active {
  background: #fff;
  color: #245eea;
  box-shadow: 0 2px 8px rgba(30, 67, 135, 0.13);
}

.editor-preview-return-bar .editor-preview-export {
  border-color: #2f6df6;
  background: #2f6df6;
  color: #fff;
  font-weight: 800;
}

.editor-export-dialog {
  width: min(760px, calc(100vw - 40px));
}

.editor-export-dialog form {
  padding: 0;
}

.editor-export-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #e0e6ef;
}

.editor-export-dialog header small {
  color: #2f6df6;
  font-weight: 800;
}

.editor-export-dialog header h2 {
  margin: 5px 0 0;
}

.editor-export-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 22px 28px;
}

.editor-export-summary > div,
.editor-export-summary > label {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: #f8fafc;
}

.editor-export-summary span {
  color: #6f7b90;
  font-size: 13px;
}

.editor-export-summary select {
  min-height: 34px;
  border: 0;
  background: transparent;
  font-weight: 800;
}

.editor-export-check-result {
  margin: 0 28px;
  padding: 18px 20px;
  border: 1px solid #b9d3ff;
  border-radius: 12px;
  background: #f2f7ff;
}

.editor-export-check-result p {
  margin: 7px 0 0;
  color: #526078;
  line-height: 1.65;
}

.editor-export-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 28px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #f6f8fb;
  font-weight: 700;
  line-height: 1.5;
}

.editor-export-confirm input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.editor-export-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px 24px;
  border-top: 1px solid #e0e6ef;
}

.editor-export-dialog footer button {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #d4dce8;
  border-radius: 9px;
  background: #fff;
  font-weight: 800;
}

.editor-export-dialog footer [data-export-confirm-submit] {
  border-color: #2f6df6;
  background: #2f6df6;
  color: #fff;
}

.editor-export-dialog footer [data-export-confirm-submit]:disabled {
  border-color: #d9dfE9;
  background: #e8ecf2;
  color: #98a2b3;
}

@media (max-width: 900px) {
  .editor-export-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .editor-preview-control-group {
    width: 100%;
    overflow-x: auto;
  }
}

/* Lecture workspace: the asset layer above the rich editor. */
.lecture-home { padding: 18px; background: #eef2f6; }
.lecture-home-shell { min-height: calc(100vh - 36px); display: grid; grid-template-columns: 230px minmax(0, 1fr); padding: 0; overflow: hidden; border-radius: 14px; }
.lecture-home-sidebar { position: relative; min-height: 760px; padding: 22px 16px; border-right: 1px solid #e1e6ee; background: #fafbfd; }
.lecture-home-new { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #2f6df6; border-radius: 10px; background: #2f6df6; color: #fff; font-size: 16px; font-weight: 800; cursor: pointer; }
.lecture-home-new span { font-size: 22px; font-weight: 400; }
.lecture-home-nav-title { margin: 26px 13px 8px; color: #9aa4b3; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.lecture-home-nav { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: #536176; text-align: left; cursor: pointer; }
.lecture-home-nav:hover { background: #f0f4fa; }
.lecture-home-nav.active { background: #e5eefc; color: #205fd5; }
.lecture-home-nav span { width: 22px; color: #66758a; font-size: 15px; text-align: center; }
.lecture-home-nav b { font-weight: 700; }
.lecture-home-nav em { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: #edf1f6; color: #7b8798; font-size: 11px; font-style: normal; }
.lecture-home-retention { position: absolute; right: 16px; bottom: 20px; left: 16px; padding: 13px; border: 1px solid #dfe5ed; border-radius: 10px; background: #fff; color: #718096; font-size: 11px; line-height: 1.6; }
.lecture-home-main { min-width: 0; padding: 26px 30px 36px; background: #fff; }
.lecture-home-heading { min-height: 64px; display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.lecture-home-heading span { color: #2f6df6; font-size: 12px; font-weight: 800; }
.lecture-home-heading h1 { margin: 3px 0 0; color: #162238; font-size: 28px; letter-spacing: -.03em; }
.lecture-home-heading p { margin: 5px 0 0; color: #6f7b8e; font-size: 13px; }
.lecture-home-notice { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 13px 16px; border-radius: 9px; background: #edf4ff; color: #53627a; font-size: 12px; }
.lecture-home-notice b { color: #205fd5; }
.lecture-home-filters { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(110px, .55fr)) auto; gap: 10px; align-items: end; margin-bottom: 18px; padding: 14px; border: 1px solid #e0e6ee; border-radius: 10px; background: #fafbfd; }
.lecture-home-filters label { display: grid; gap: 6px; color: #748095; font-size: 11px; }
.lecture-home-filters input, .lecture-home-filters select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid #d5dde8; border-radius: 8px; background: #fff; color: #344159; outline: none; }
.lecture-home-filters input:focus, .lecture-home-filters select:focus { border-color: #6e98ef; box-shadow: 0 0 0 3px rgb(47 109 246 / 9%); }
.lecture-home-filters > button { height: 40px; padding: 0 14px; border: 1px solid #d5dde8; border-radius: 8px; background: #fff; color: #40506a; font-weight: 700; cursor: pointer; }
.lecture-home-list { border-top: 1px solid #e7ebf1; }
.lecture-home-list-head, .lecture-home-row { display: grid; grid-template-columns: minmax(330px, 1.7fr) minmax(100px, .65fr) minmax(130px, .75fr) 130px 100px 46px; gap: 12px; align-items: center; }
.lecture-home-list-head { min-height: 42px; padding: 0 12px; border-bottom: 1px solid #e1e6ed; color: #758095; font-size: 11px; }
.lecture-home-row { min-height: 72px; padding: 9px 12px; border-bottom: 1px solid #edf0f4; border-radius: 8px; }
.lecture-home-row:hover { background: #f6f9fd; }
.lecture-home-name { min-width: 0; display: flex; align-items: center; gap: 12px; }
.lecture-home-name > div { min-width: 0; }
.lecture-home-icon { width: 38px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px 7px 10px 7px; background: #e8f0ff; color: #2466dc; font-size: 11px; font-weight: 800; }
.lecture-home-icon.pack { background: #fff4d8; color: #996000; }
.lecture-home-mode { display: inline-flex; width: fit-content; min-height: 26px; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.lecture-home-mode.sync { background: #eaf2ff; color: #286be6; }
.lecture-home-mode.pack { background: #fff4d8; color: #996000; }
.lecture-home-name strong { display: block; overflow: hidden; color: #172238; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.lecture-home-name small { display: block; margin-top: 5px; color: #758095; font-size: 11px; }
.lecture-home-cell { color: #59667a; font-size: 12px; }
.lecture-home-state { display: inline-flex; width: fit-content; min-height: 26px; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.lecture-home-state.synced { background: #e8f7f2; color: #087c61; }
.lecture-home-state.changed, .lecture-home-state.pending, .lecture-home-state.draft { background: #fff2da; color: #9b5c00; }
.lecture-home-state.deleted { background: #fff0ee; color: #c83f36; }
.lecture-home-state.running { background: #eaf2ff; color: #286be6; }
.lecture-home-dots { width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent; color: #5e6c82; font-size: 17px; cursor: pointer; }
.lecture-home-dots:hover { background: #e9eef6; }
.lecture-home-link { min-height: 32px; padding: 0 10px; border: 1px solid #d5dde8; border-radius: 7px; background: #fff; color: #286be6; font-size: 12px; cursor: pointer; }
.lecture-home-empty { padding: 80px 20px; color: #788498; text-align: center; }
.lecture-home-menu { position: fixed; z-index: 80; width: 220px; padding: 7px; border: 1px solid #d8e0ea; border-radius: 11px; background: #fff; box-shadow: 0 16px 42px rgb(25 42 70 / 18%); }
.lecture-home-menu[hidden] { display: none; }
.lecture-home-menu button { width: 100%; min-height: 39px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: #26344a; text-align: left; cursor: pointer; }
.lecture-home-menu button:hover { background: #f1f5fb; }
.lecture-home-menu button.danger { color: #ca4038; }
.lecture-home-menu hr { height: 1px; margin: 5px 3px; border: 0; background: #e7ebf1; }
.lecture-home-dialog { width: min(620px, calc(100vw - 40px)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 28px 80px rgb(19 33 57 / 28%); }
.lecture-home-dialog::backdrop { background: rgb(22 31 48 / 46%); backdrop-filter: blur(2px); }
.lecture-home-dialog header { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 25px 16px; border-bottom: 1px solid #e1e6ed; }
.lecture-home-dialog header small { color: #2a67da; font-weight: 800; }
.lecture-home-dialog header h2 { margin: 5px 0 0; }
.lecture-home-dialog header button { border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.lecture-home-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 22px 25px; }
.lecture-home-form label { display: grid; gap: 7px; color: #5d687b; font-size: 12px; }
.lecture-home-form label:first-child { grid-column: 1 / -1; }
.lecture-home-form input, .lecture-home-form select { height: 42px; padding: 0 11px; border: 1px solid #d4dce7; border-radius: 8px; }
.lecture-home-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 25px 20px; border-top: 1px solid #e1e6ed; }
.lecture-home-dialog footer button, .lecture-asset-card button { min-height: 34px; padding: 0 12px; border: 1px solid #d4dce7; border-radius: 7px; background: #fff; color: #34435a; cursor: pointer; }
.lecture-home-dialog footer button.primary, .lecture-asset-card button.primary { border-color: #2f6df6; background: #2f6df6; color: #fff; }
.lecture-home-dialog footer button.primary:disabled { cursor: not-allowed; border-color: #dce2ea; background: #e8ecf2; color: #9ba5b4; }
.lecture-create-dialog { width: min(760px, calc(100vw - 40px)); }
.lecture-create-dialog header h2 { margin: 0; }
.lecture-create-dialog header p { margin: 5px 0 0; color: #788498; font-size: 12px; }
.lecture-create-form { gap: 14px 16px; padding: 20px 25px; }
.lecture-create-mode-label, .lecture-create-mode-grid, .lecture-create-title, .lecture-create-versions { grid-column: 1 / -1; }
.lecture-create-mode-label { margin-bottom: -4px; color: #5d687b; font-size: 12px; font-weight: 800; }
.lecture-create-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lecture-create-mode { position: relative; min-height: 126px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 13px; padding: 16px 18px; border: 2px solid #dfe5ed; border-radius: 12px; background: #fff; color: #172238; text-align: left; cursor: pointer; }
.lecture-create-mode:hover { border-color: #aebdd2; }
.lecture-create-mode.selected { border-color: #2f6df6; box-shadow: 0 0 0 3px rgb(47 109 246 / 10%); }
.lecture-create-mode i { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; align-self: center; border-radius: 10px; background: #eef4ff; color: #2466dc; font-style: normal; font-weight: 900; }
.lecture-create-mode[data-document-mode="pack"] i { background: #fff4d8; color: #996000; }
.lecture-create-mode strong { align-self: end; font-size: 17px; }
.lecture-create-mode span { align-self: start; margin-top: 5px; color: #748095; font-size: 12px; }
.lecture-create-mode b { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #ccd6e3; border-radius: 50%; background: #fff; color: transparent; font-size: 12px; }
.lecture-create-mode.selected b { border-color: #2f6df6; background: #2f6df6; color: #fff; }
.lecture-create-versions { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #dce5f2; border-radius: 9px; background: #fafcff; }
.lecture-create-versions[hidden] { display: none; }
.lecture-create-versions strong { margin-right: 3px; font-size: 12px; }
.lecture-create-versions span { padding: 5px 8px; border: 1px solid #cfdaeb; border-radius: 999px; background: #fff; color: #315d9e; font-size: 11px; font-weight: 800; }
.lecture-create-dialog footer { align-items: center; justify-content: space-between; }
.lecture-create-dialog footer > span { color: #7c8798; font-size: 11px; }
.lecture-create-dialog footer > div { display: flex; gap: 8px; }
.lecture-assets-dialog { width: min(760px, calc(100vw - 40px)); max-height: calc(100vh - 48px); overflow: auto; }
.lecture-assets-section { padding: 18px 25px; border-bottom: 1px solid #e8ecf2; }
.lecture-assets-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.lecture-assets-title h3 { margin: 0; font-size: 15px; }
.lecture-assets-title span { color: #788498; font-size: 11px; }
.lecture-asset-card { min-height: 62px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #e0e6ee; border-radius: 9px; background: #fbfcfe; }
.lecture-asset-card + .lecture-asset-card { margin-top: 8px; }
.lecture-asset-card > div { min-width: 0; flex: 1; }
.lecture-asset-card strong, .lecture-asset-card small { display: block; }
.lecture-asset-card small { margin-top: 4px; color: #788498; font-size: 11px; }
.lecture-export-list { border: 1px solid #e1e6ed; border-radius: 10px; overflow: hidden; }
.lecture-export-head, .lecture-export-row { display: grid; grid-template-columns: minmax(320px, 1.5fr) 130px 130px 80px; gap: 14px; align-items: center; padding: 0 16px; }
.lecture-export-head { min-height: 42px; background: #f7f9fc; color: #758095; font-size: 11px; }
.lecture-export-row { min-height: 68px; border-top: 1px solid #e8ecf2; }
.lecture-export-row strong, .lecture-export-row small { display: block; }
.lecture-export-row small { margin-top: 4px; color: #788498; font-size: 11px; }
@media (max-width: 1100px) { .lecture-home-shell { grid-template-columns: 200px minmax(0, 1fr); } .lecture-home-main { padding: 22px 20px; } .lecture-home-filters { grid-template-columns: minmax(230px, 1fr) repeat(2, minmax(100px, .5fr)) auto; } .lecture-home-filters label:nth-of-type(4) { display: none; } .lecture-home-list-head, .lecture-home-row { grid-template-columns: minmax(280px, 1.5fr) 120px 120px 46px; } .lecture-home-list-head span:nth-child(2), .lecture-home-list-head span:nth-child(5), .lecture-home-row > :nth-child(2), .lecture-home-row > :nth-child(5) { display: none; } }
@media (max-width: 760px) { .lecture-home { padding: 0; } .lecture-home-shell { min-height: 100vh; display: block; border-radius: 0; } .lecture-home-sidebar { min-height: auto; display: flex; gap: 7px; padding: 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid #e1e6ee; } .lecture-home-new { min-width: 128px; width: auto; } .lecture-home-nav-title, .lecture-home-retention, .lecture-home-nav:not(.active) { display: none; } .lecture-home-nav { min-width: 118px; width: auto; } .lecture-home-main { padding: 18px 13px; } .lecture-home-notice { align-items: flex-start; flex-direction: column; } .lecture-home-filters { grid-template-columns: 1fr 1fr; } .lecture-home-search { grid-column: 1 / -1; } .lecture-home-list-head { display: none; } .lecture-home-row { grid-template-columns: minmax(0, 1fr) 42px; } .lecture-home-row > :not(.lecture-home-name):not(.lecture-home-dots):not(.lecture-home-link) { display: none; } .lecture-home-form { grid-template-columns: 1fr; } .lecture-home-form label:first-child { grid-column: auto; } .lecture-create-mode-label, .lecture-create-mode-grid, .lecture-create-title, .lecture-create-versions { grid-column: 1; } .lecture-create-mode-grid { grid-template-columns: 1fr; } .lecture-create-dialog footer { align-items: flex-end; flex-direction: column; } }

/* Unified full-page business filters. Keep compact editor and dialog controls untouched. */
.lecture-home-filters,
.knowledge-filter-row,
.wiki2-filters,
.alpha-s04-filter-panel,
.alpha-file-filter-panel,
.qm-search-row,
.alpha-s05-filter-row,
.review-filters {
  padding: 20px 22px;
  border: 1px solid #d9e3f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(31, 42, 68, .055);
}

.lecture-home-filters label,
.knowledge-filter-row > label,
.wiki2-filters label,
.alpha-s04-filter-panel .alpha-filter-grid label,
.alpha-file-filter-grid label,
.qm-search-row label,
.alpha-s05-filter-row label,
.review-filters label {
  gap: 9px;
  color: #5f6d84;
  font-size: 13px;
  font-weight: 700;
}

.lecture-home-filters input,
.lecture-home-filters select,
.knowledge-filter-row input,
.knowledge-filter-row select,
.wiki2-filters input,
.wiki2-filters select,
.alpha-s04-filter-panel .alpha-filter-grid input,
.alpha-s04-filter-panel .alpha-filter-grid select,
.alpha-file-filter-grid input,
.alpha-file-filter-grid select,
.qm-search-row input,
.qm-search-row select,
.alpha-s05-filter-row input,
.alpha-s05-filter-row select,
.review-filters input,
.review-filters select {
  height: 56px;
  padding: 0 16px;
  border: 1px solid #cfdbea;
  border-radius: 14px;
  background: #fff;
  color: #172138;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.lecture-home-filters input:focus,
.lecture-home-filters select:focus,
.knowledge-filter-row input:focus,
.knowledge-filter-row select:focus,
.wiki2-filters input:focus,
.wiki2-filters select:focus,
.alpha-s04-filter-panel .alpha-filter-grid input:focus,
.alpha-s04-filter-panel .alpha-filter-grid select:focus,
.alpha-file-filter-grid input:focus,
.alpha-file-filter-grid select:focus,
.qm-search-row input:focus,
.qm-search-row select:focus,
.alpha-s05-filter-row input:focus,
.alpha-s05-filter-row select:focus,
.review-filters input:focus,
.review-filters select:focus {
  border-color: #6f98ee;
  box-shadow: 0 0 0 4px rgba(47, 109, 246, .09);
}

.lecture-home-filters > button,
.alpha-s04-filter-panel .button,
.alpha-file-filter-panel .button,
.qm-search-row > .button,
.alpha-s05-filter-row .button,
.review-filters .button {
  min-height: 56px;
  padding: 0 20px;
  border-radius: 14px;
}

.alpha-file-filter-grid,
.qm-search-row,
.lecture-home-filters {
  gap: 14px;
}

@media (max-width: 980px) {
  .lecture-home-filters,
  .knowledge-filter-row,
  .wiki2-filters,
  .alpha-s04-filter-panel,
  .alpha-file-filter-panel,
  .qm-search-row,
  .alpha-s05-filter-row,
  .review-filters { padding: 16px; border-radius: 16px; }
}
.editor-lab-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.editor-lab-back {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #d3ddea;
  border-radius: 10px;
  background: #fff;
  color: #34445d;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.editor-lab-back:hover {
  border-color: #9eb8ee;
  color: #245fd7;
  background: #f7faff;
}

.editor-lab-status {
  position: relative;
}

.editor-lab-status > button,
.editor-lab-exit-menu > button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #d3ddea;
  border-radius: 10px;
  background: #fff;
  color: #263751;
  font-weight: 700;
  cursor: pointer;
}

.editor-lab-status > [data-direct-export],
.editor-lab-status > [data-preview-entry] {
  border-color: #2f6ff0;
  background: #2f6ff0;
  color: #fff;
}

.editor-lab-exit-menu {
  position: relative;
}

.editor-lab-exit-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 8px;
  border: 1px solid #d7dee9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(26, 41, 66, 0.16);
}

.editor-lab-exit-popover[hidden] {
  display: none;
}

.editor-lab-exit-popover button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: #fff3f1;
  color: #c9362b;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 980px) {
  .editor-lab-header,
  .editor-lab-heading,
  .editor-lab-status {
    align-items: flex-start;
  }

  .editor-lab-header {
    flex-direction: column;
  }

  .editor-lab-status {
    flex-wrap: wrap;
  }
}
.qm-knowledge-cascade-menu[hidden],
.editor-knowledge-cascade-menu[hidden] {
  display: none !important;
}

.qm-cascade-panel[hidden],
[data-qm-cascade-panel][hidden] {
  display: none !important;
}

/* Structured-field merge: keep old editor nodes/libs, clean their default chrome. */
.editor-page-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: -24px 0 26px;
}

.editor-page-brand .editor-page-rule {
  height: 1px;
  flex: 0 1 540px;
  max-width: 540px;
  background: #222;
}

.editor-page-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #fff;
  color: #172033;
  white-space: nowrap;
}

.editor-page-logo img {
  display: block;
  width: 180px;
  max-height: 54px;
  object-fit: contain;
}

.editor-page-logo b {
  font-size: 13px;
}

.editor-lab:not(.is-preview-mode) .editor-ref-card,
.editor-lab:not(.is-preview-mode) .editor-temp-question {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.editor-lab:not(.is-preview-mode) .editor-ref-card:hover,
.editor-lab:not(.is-preview-mode) .editor-ref-card:focus-within,
.editor-lab:not(.is-preview-mode) .editor-temp-question:hover,
.editor-lab:not(.is-preview-mode) .editor-temp-question:focus-within {
  border-color: #cfd8e6;
  background: #fff;
  box-shadow: 0 4px 12px rgb(22 35 58 / 8%);
}

.editor-lab:not(.is-preview-mode) .editor-ref-card:not(:hover):not(:focus-within) .editor-ref-heading,
.editor-lab:not(.is-preview-mode) .editor-ref-card:not(:hover):not(:focus-within) .editor-ref-config-panel,
.editor-lab:not(.is-preview-mode) .editor-ref-card:not(:hover):not(:focus-within) .editor-ref-actions,
.editor-lab:not(.is-preview-mode) .editor-temp-question:not(:hover):not(:focus-within) .editor-temp-question-heading,
.editor-lab:not(.is-preview-mode) .editor-temp-question:not(:hover):not(:focus-within) .editor-temp-question-actions {
  display: none;
}

.editor-lab:not(.is-preview-mode) .editor-ref-card:not(:hover):not(:focus-within) .editor-ref-body,
.editor-lab:not(.is-preview-mode) .editor-temp-question:not(:hover):not(:focus-within) .editor-temp-question-body {
  padding-left: 0;
  padding-right: 0;
}

.editor-lab.is-preview-mode .editor-page-brand {
  margin-top: -18px;
}

/* Editor header polish after structured merge. */
.editor-lab-header {
  min-height: 68px;
  padding: 12px 22px;
  border-color: #dde5f0;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 4px 14px rgb(31 45 72 / 6%);
}

.editor-lab-heading {
  gap: 14px;
}

.editor-lab-back {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 18px;
  color: #40516d;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 80%);
}

.editor-lab-back:hover {
  background: #edf4ff;
}

.editor-lab-header span {
  color: #3370ff;
  font-size: 12px;
  letter-spacing: .02em;
}

.editor-lab-header h1 {
  margin-top: 3px;
  font-size: 22px;
  letter-spacing: -.02em;
}

.editor-lab-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-lab-status b {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #069668;
  font-size: 13px;
  font-weight: 800;
}

.editor-lab-status > button,
.editor-lab-exit-menu > button {
  min-height: 38px;
  border-radius: 16px;
}

.editor-lab-status > [data-direct-export],
.editor-lab-status > [data-preview-entry] {
  min-height: 46px;
  padding: 0 26px;
  border-radius: 14px;
  background: linear-gradient(180deg, #3478ff 0%, #2364e8 100%);
  box-shadow: 0 10px 22px rgb(35 100 232 / 22%);
  font-size: 16px;
}

.editor-lab-exit-menu > button {
  min-width: 92px;
  background: #f8fafc;
}

.editor-lab-exit-popover {
  border-radius: 14px;
}

.editor-lab-toolbar {
  align-items: stretch;
  gap: 0;
  padding: 10px 12px;
  border-color: #dbe3ef;
  background: #fff;
  box-shadow: 0 8px 22px rgb(31 45 72 / 7%);
}

.editor-lab-toolgroup {
  min-height: 42px;
  gap: 5px;
  padding: 0 11px;
  border-right-color: #e6ebf3;
}

.editor-lab-toolgroup:first-child {
  padding-left: 0;
}

.editor-lab-toolbar button,
.editor-lab-toolbar select,
.editor-lab-toolbar input[type="color"] {
  height: 34px;
  border-radius: 8px;
  border-color: #d8e0ec;
  background: #fff;
  color: #334155;
}

.editor-lab-toolbar button:hover,
.editor-lab-toolbar select:hover {
  border-color: #adc3f4;
  background: #f6f9ff;
}

.editor-lab-primary-actions {
  gap: 10px;
  padding-right: 12px;
}

.editor-lab-primary-actions button {
  height: 46px;
  min-width: 112px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
}

.editor-lab-primary-actions button[data-insert-question],
.editor-lab-primary-actions button[data-insert-knowledge] {
  border-color: #b9cdfb;
  background: #eef4ff;
  color: #2457c5;
}

.editor-lab-primary-actions button[data-insert-temp-knowledge] {
  border-color: #9bd7c3;
  background: #effaf6;
  color: #0b7a64;
}

.editor-lab-primary-actions button[data-insert-temp-question] {
  border-color: #efc96f;
  background: #fff7e3;
  color: #8a5a00;
}

.editor-lab-page-tools,
.editor-lab-document-actions,
.editor-lab-zoom-tools {
  background: #fbfcfe;
  border-radius: 10px;
  margin-left: 8px;
  padding-left: 10px;
}

/* Editor layout polish: borrow the structured lab layout without replacing old logic. */
.editor-lab-toolbar {
  min-height: 0;
  align-items: center;
  row-gap: 8px;
  column-gap: 0;
  margin-top: 8px;
  padding: 8px 12px;
}

.editor-lab-primary-actions button {
  height: 40px;
  min-width: 104px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 15px;
}

.editor-lab-toolgroup {
  min-height: 38px;
  padding: 0 9px;
}

.editor-lab-toolbar button,
.editor-lab-toolbar select,
.editor-lab-toolbar input[type="color"] {
  height: 32px;
  border-radius: 6px;
}

.editor-lab-page-tools,
.editor-lab-document-actions,
.editor-lab-zoom-tools {
  min-height: 38px;
  background: transparent;
  border-radius: 0;
  margin-left: 0;
}

.editor-version-bar {
  top: 62px;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 22px;
  background: #f8fafc;
  border-bottom: 1px solid #dbe3ef;
  box-shadow: 0 6px 14px rgb(31 45 72 / 6%);
}

.editor-master-heading {
  min-width: 260px;
  margin-right: auto;
}

.editor-master-heading strong {
  font-size: 15px;
}

.editor-master-heading span {
  margin-top: 2px;
  color: #708097;
}

.editor-mode-switch,
.editor-single-version-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #eef3fa;
}

.editor-mode-switch button,
.editor-single-version-tabs button {
  min-height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #40516d;
  font-weight: 800;
}

.editor-mode-switch button.active,
.editor-single-version-tabs button.active {
  background: #fff;
  color: #2457c5;
  box-shadow: 0 4px 12px rgb(31 74 160 / 12%);
}

.editor-version-summary {
  display: inline-flex;
  gap: 8px;
}

.editor-version-summary > div {
  min-width: 112px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}

.editor-master-hint {
  min-width: 86px;
}

.editor-lab-paper-viewport {
  padding: 42px 28px 56px;
}

.editor-master-workspace {
  padding-bottom: 0;
}

.editor-lab-paper {
  padding-top: 52px;
}

.editor-page-brand {
  margin: 0 0 30px;
}

.editor-page-logo {
  padding: 3px 7px;
}

.editor-page-logo img {
  width: 138px;
  max-height: 42px;
}

.editor-paper-mode-label {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  margin: 0 0 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #72829a;
  font-size: 13px;
  font-weight: 800;
}

.editor-paper-mode-label::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-left: 14px;
  background: #e7edf5;
}

.editor-lab-prosemirror h1:first-child {
  margin-top: 0;
}

.editor-lab-prosemirror h1 {
  font-size: 28px;
  letter-spacing: -.02em;
}

/* Strong visual merge pass: make the formal editor inherit the isolated page layout language. */
.editor-lab {
  padding: 14px 18px 22px;
  background: linear-gradient(180deg, #eef2f7 0%, #e6edf6 100%);
}

.editor-lab-header {
  min-height: 64px;
  padding: 12px 22px;
  border: 1px solid #dbe4ef;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 1px 0 rgb(15 23 42 / 4%);
}

.editor-lab-heading {
  gap: 16px;
}

.editor-lab-back {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  background: #fff;
  color: #334155;
}

.editor-lab-heading > div {
  display: grid;
  gap: 2px;
}

.editor-lab-header h1 {
  font-size: 21px;
  line-height: 26px;
}

.editor-lab-status {
  gap: 8px;
}

.editor-lab-status b {
  background: transparent;
  padding: 0;
}

.editor-lab-status::before {
  content: "当前状态";
  color: #64748b;
  font-size: 12px;
}

.editor-lab-status > [data-direct-export],
.editor-lab-status > [data-preview-entry] {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: none;
}

.editor-lab-exit-menu > button {
  min-height: 38px;
  border-radius: 8px;
}

.editor-lab-toolbar {
  position: sticky;
  top: 0;
  z-index: 14;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid #dbe4ef;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 6px 16px rgb(31 45 72 / 6%);
}

.editor-lab-toolbar::before,
.editor-lab-toolbar::after {
  display: none;
}

.editor-lab-toolgroup {
  min-height: 48px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
  border-right: 0;
  border-bottom: 1px solid #e7edf5;
}

.editor-lab-toolgroup:last-child {
  border-bottom: 0;
}

.editor-lab-primary-actions {
  position: relative;
  gap: 10px;
  padding-left: 46px;
}

.editor-lab-primary-actions::before {
  content: "内容";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.editor-lab-primary-actions button {
  height: 42px;
  min-width: 118px;
  border-radius: 8px;
  font-size: 15px;
}

.editor-lab-toolgroup:not(.editor-lab-primary-actions):not(.editor-lab-page-tools):not(.editor-lab-document-actions):not(.editor-lab-zoom-tools):first-of-type,
.editor-lab-primary-actions + .editor-lab-toolgroup {
  padding-left: 46px;
}

.editor-lab-primary-actions + .editor-lab-toolgroup::before {
  content: "历史";
  width: 34px;
  margin-left: -46px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.editor-lab-primary-actions + .editor-lab-toolgroup + .editor-lab-toolgroup::before {
  content: "文本";
  width: 34px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.editor-lab-toolbar button,
.editor-lab-toolbar select,
.editor-lab-toolbar input[type="color"] {
  height: 34px;
  border-radius: 7px;
  border-color: #d8e0ec;
  background: #fff;
}

.editor-lab-toolbar button:hover,
.editor-lab-toolbar select:hover {
  transform: none;
}

.editor-lab-page-tools,
.editor-lab-document-actions,
.editor-lab-zoom-tools {
  display: none;
}

.editor-version-bar {
  position: sticky;
  top: 160px;
  z-index: 9;
  min-height: 58px;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid #dbe4ef;
  box-shadow: none;
}

.editor-version-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-bottom: 1px solid #e7edf5;
}

.editor-master-heading {
  min-width: 260px;
}

.editor-master-heading strong {
  font-size: 15px;
}

.editor-mode-switch,
.editor-single-version-tabs {
  border-radius: 12px;
  background: #eef3fa;
}

.editor-version-summary > div {
  min-width: 104px;
}

.editor-lab-editor-column {
  margin-top: 18px;
  border: 1px solid #dbe4ef;
  background: #dfe6ef;
}

.editor-lab-paper-viewport {
  min-height: calc(100vh - 260px);
  padding: 44px 28px 64px;
}

.editor-master-paper,
.editor-lab-paper {
  box-shadow: 0 18px 44px rgb(26 39 62 / 12%);
}

.editor-page-brand {
  justify-content: center;
  gap: 10px;
  margin: -6px 0 30px;
}

.editor-page-brand .editor-page-rule {
  flex: 0 1 500px;
  max-width: 500px;
  background: #222;
}

.editor-page-logo img {
  width: 148px;
  max-height: 44px;
}

.editor-page-logo b {
  font-size: 15px;
  color: #172033;
}

.editor-paper-mode-label {
  display: block;
  min-height: 0;
  margin: 0 0 22px;
  padding: 0 0 12px;
  border-bottom: 1px solid #e7edf5;
  color: #64748b;
  font-size: 14px;
}

.editor-paper-mode-label::after {
  display: none;
}

@media (max-width: 1100px) {
  .editor-version-bar {
    top: 0;
    flex-wrap: wrap;
  }
}

/* Formal editor visual merge repair: keep old functions, but make layout follow the isolated A4 editor. */
.editor-lab {
  padding: 14px 18px 24px;
  background: #e8eef6;
}

.editor-lab-header {
  min-height: 72px;
  padding: 14px 24px;
  border: 1px solid #dbe4ef;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
}

.editor-lab-heading {
  gap: 16px;
}

.editor-lab-back {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  box-shadow: inset 0 0 0 1px #dbe4ef;
}

.editor-lab-heading > div {
  display: grid;
  gap: 2px;
}

.editor-lab-header h1 {
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.02em;
}

.editor-lab-status {
  gap: 8px;
}

.editor-lab-status::before {
  content: "\5F53\524D\72B6\6001";
  color: #64748b;
  font-size: 12px;
}

.editor-lab-status b {
  padding: 0;
  background: transparent;
}

.editor-lab-status > [data-direct-export],
.editor-lab-status > [data-preview-entry],
.editor-lab-exit-menu > button {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: none;
}

.editor-lab-toolbar {
  position: sticky;
  top: 0;
  z-index: 14;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid #dbe4ef;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31, 45, 72, 0.07);
}

.editor-lab-toolbar::before,
.editor-lab-toolbar::after {
  display: none;
}

.editor-lab-toolgroup {
  min-height: 48px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 0;
  border-right: 0;
  border-bottom: 1px solid #e7edf5;
}

.editor-lab-toolgroup:last-child {
  border-bottom: 0;
}

.editor-lab-primary-actions {
  position: relative;
  gap: 10px;
  padding-left: 48px;
}

.editor-lab-primary-actions::before {
  content: "\5185\5BB9";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.editor-lab-primary-actions button {
  height: 44px;
  min-width: 126px;
  border-radius: 8px;
  font-size: 15px;
}

.editor-lab-primary-actions + .editor-lab-toolgroup,
.editor-lab-primary-actions + .editor-lab-toolgroup + .editor-lab-toolgroup,
.editor-lab-page-tools,
.editor-lab-document-actions,
.editor-lab-zoom-tools {
  display: flex;
}

.editor-lab-primary-actions + .editor-lab-toolgroup {
  position: relative;
  padding-left: 48px;
}

.editor-lab-primary-actions + .editor-lab-toolgroup::before {
  content: "\6392\7248";
  width: 34px;
  margin-left: -48px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.editor-lab-toolbar button,
.editor-lab-toolbar select,
.editor-lab-toolbar input[type="color"] {
  height: 36px;
  border-radius: 8px;
  border-color: #d8e0ec;
  background: #fff;
}

.editor-lab-toolbar button:hover,
.editor-lab-toolbar select:hover {
  transform: none;
  border-color: #b8c7dc;
  background: #f8fbff;
}

.editor-lab-toolbar button.is-active,
.editor-lab-toolbar button[aria-pressed="true"] {
  color: #1d4ed8;
  border-color: #93b4ff;
  background: #edf4ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.editor-lab-page-tools {
  position: relative;
  padding-left: 48px;
}

.editor-lab-page-tools::before {
  content: "\9875\9762";
  width: 34px;
  margin-left: -48px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.editor-lab-document-actions,
.editor-lab-zoom-tools {
  margin-left: auto;
  border-bottom: 0;
}

.editor-version-bar {
  position: sticky;
  top: 164px;
  z-index: 9;
  min-height: 64px;
  padding: 10px 22px;
  background: #fff;
  border: 1px solid #dbe4ef;
  border-top: 0;
  box-shadow: 0 8px 20px rgba(31, 45, 72, 0.05);
}

.editor-master-heading {
  min-width: 280px;
}

.editor-master-heading strong {
  font-size: 16px;
}

.editor-mode-switch,
.editor-single-version-tabs {
  border-radius: 14px;
  background: #eef3fa;
}

.editor-version-summary > div {
  min-width: 112px;
  border-radius: 10px;
  background: #fff;
}

.editor-lab-editor-column {
  margin-top: 18px;
  border: 1px solid #dbe4ef;
  border-radius: 0;
  background: #dfe6ef;
}

.editor-lab-paper-viewport {
  min-height: calc(100vh - 266px);
  padding: 42px 28px 68px;
}

.editor-master-paper,
.editor-lab-paper {
  box-shadow: 0 20px 48px rgba(26, 39, 62, 0.14);
}

.editor-page-brand {
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: -4px 0 30px;
}

.editor-page-brand .editor-page-rule {
  flex: 0 1 500px;
  max-width: 500px;
  height: 1px;
  background: #222;
}

.editor-page-logo {
  padding: 0;
  background: #fff;
}

.editor-page-logo img {
  width: 164px;
  max-height: 48px;
  object-fit: contain;
}

.editor-page-logo b {
  font-size: 16px;
  color: #172033;
}

.editor-paper-mode-label {
  display: block;
  min-height: 0;
  margin: 0 0 22px;
  padding: 0 0 12px;
  border-bottom: 1px solid #e7edf5;
  color: #64748b;
  font-size: 14px;
}

.editor-paper-mode-label::after {
  display: none;
}

@media (max-width: 1100px) {
  .editor-version-bar {
    top: 0;
    flex-wrap: wrap;
  }

  .editor-lab-document-actions,
  .editor-lab-zoom-tools {
    margin-left: 0;
  }
}
/* Formal editor compact ribbon pass: one readable toolbar instead of a vertical button wall. */
.editor-lab-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 18px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.editor-lab-toolgroup {
  min-height: 42px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 0 12px 0 0;
  border-bottom: 0;
  border-right: 1px solid #e7edf5;
}

.editor-lab-toolgroup:last-child {
  border-right: 0;
}

.editor-lab-primary-actions {
  padding-left: 0;
  padding-right: 14px;
}

.editor-lab-primary-actions::before,
.editor-lab-primary-actions + .editor-lab-toolgroup::before,
.editor-lab-page-tools::before {
  display: none;
}

.editor-lab-primary-actions button {
  height: 42px;
  min-width: 132px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
}

.editor-lab-primary-actions button:nth-child(1),
.editor-lab-primary-actions button:nth-child(2),
.editor-lab-primary-actions button:nth-child(3) {
  color: #245fca;
  background: #eef4ff;
  border-color: #bcd0ff;
}

.editor-lab-primary-actions button:nth-child(4) {
  color: #078467;
  background: #edfdf7;
  border-color: #a7e6d1;
}

.editor-lab-primary-actions button:nth-child(5) {
  color: #9a5b00;
  background: #fff8e7;
  border-color: #f0ce87;
}

.editor-lab-primary-actions + .editor-lab-toolgroup,
.editor-lab-primary-actions + .editor-lab-toolgroup + .editor-lab-toolgroup,
.editor-lab-page-tools {
  padding-left: 0;
}

.editor-lab-toolbar button,
.editor-lab-toolbar select,
.editor-lab-toolbar input[type="color"] {
  height: 38px;
  min-width: 38px;
}

.editor-lab-toolbar select {
  min-width: 86px;
}

.editor-lab-toolbar button[data-action="setTextAlignLeft"],
.editor-lab-toolbar button[data-action="setTextAlignCenter"],
.editor-lab-toolbar button[data-action="setTextAlignRight"] {
  min-width: 76px;
}

.editor-lab-document-actions {
  margin-left: auto;
  padding-left: 12px;
}

.editor-lab-zoom-tools {
  margin-left: 0;
  gap: 7px;
  padding-right: 0;
}

.editor-version-bar {
  top: 84px;
  min-height: 58px;
  margin-top: 12px;
  border-top: 1px solid #dbe4ef;
}

.editor-lab-editor-column {
  margin-top: 0;
}

.editor-lab-paper-viewport {
  padding-top: 54px;
}

@media (max-width: 1280px) {
  .editor-lab-toolbar {
    flex-wrap: wrap;
    overflow-x: visible;
    white-space: normal;
  }

  .editor-lab-document-actions,
  .editor-lab-zoom-tools {
    margin-left: 0;
  }

  .editor-version-bar {
    top: 0;
  }
}
/* Formal editor compact ribbon fix: never collapse the toolbar into a vertical wall. */
.editor-lab-toolbar {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  min-height: 66px !important;
  max-height: 72px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin;
}

.editor-lab-toolgroup,
.editor-lab-primary-actions + .editor-lab-toolgroup,
.editor-lab-primary-actions + .editor-lab-toolgroup + .editor-lab-toolgroup,
.editor-lab-page-tools,
.editor-lab-document-actions,
.editor-lab-zoom-tools {
  display: flex !important;
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  min-height: 42px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.editor-lab-toolbar button,
.editor-lab-toolbar select,
.editor-lab-toolbar input[type="color"] {
  flex: 0 0 auto !important;
}

.editor-lab-document-actions,
.editor-lab-zoom-tools {
  margin-left: 0 !important;
}

.editor-version-bar {
  top: 90px !important;
}

@media (max-width: 1280px) {
  .editor-lab-toolbar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }

  .editor-version-bar {
    top: 90px !important;
  }
}
/* Referenced image material picker, migrated from the isolated editor idea. */
.editor-lab-image-picker-dialog form {
  width: min(760px, 92vw);
}

.editor-image-picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 14px;
  max-height: 58vh;
  overflow: auto;
  padding: 4px;
}

.editor-image-picker-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d9e4f2;
  border-radius: 14px;
  background: #fff;
  color: #213047;
  text-align: left;
  cursor: pointer;
}

.editor-image-picker-item:hover {
  border-color: #7ba7ff;
  background: #f5f9ff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.editor-image-picker-item img {
  width: 100%;
  height: 94px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
}

.editor-image-picker-item span {
  font-size: 13px;
  font-weight: 800;
}
/* Formal editor grouped two-row toolbar: content row + formatting row, matching the isolated mock direction. */
.editor-lab-back {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  border-radius: 11px !important;
  font-size: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
}

.editor-lab-back::before {
  content: "\2190";
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  color: #334155;
}

.editor-lab-toolbar {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  min-height: 132px !important;
  max-height: none !important;
  padding: 0 16px !important;
  overflow: visible !important;
  white-space: normal !important;
}

.editor-lab-primary-actions,
.editor-lab-primary-actions + .editor-lab-toolgroup,
.editor-lab-primary-actions + .editor-lab-toolgroup + .editor-lab-toolgroup,
.editor-lab-page-tools,
.editor-lab-document-actions,
.editor-lab-zoom-tools {
  min-height: 58px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin;
}

.editor-lab-primary-actions {
  grid-row: 1 !important;
  width: 100% !important;
  padding: 8px 0 8px 48px !important;
  border-right: 0 !important;
  border-bottom: 1px solid #e7edf5 !important;
  position: relative !important;
}

.editor-lab-primary-actions::before {
  display: block !important;
  content: "\5185\5BB9" !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.editor-lab-primary-actions button {
  height: 42px !important;
  min-width: 126px !important;
  border-radius: 7px !important;
}

.editor-lab-primary-actions + .editor-lab-toolgroup {
  grid-row: 2 !important;
  padding-left: 48px !important;
  position: relative !important;
}

.editor-lab-primary-actions + .editor-lab-toolgroup::before {
  display: block !important;
  content: "\6392\7248" !important;
  width: 34px !important;
  margin-left: -48px !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.editor-lab-primary-actions + .editor-lab-toolgroup,
.editor-lab-primary-actions + .editor-lab-toolgroup + .editor-lab-toolgroup,
.editor-lab-toolbar .editor-lab-toolgroup:nth-of-type(4),
.editor-lab-toolbar .editor-lab-toolgroup:nth-of-type(5),
.editor-lab-page-tools,
.editor-lab-document-actions,
.editor-lab-zoom-tools {
  grid-row: 2 !important;
  border-bottom: 0 !important;
}

.editor-lab-toolbar .editor-lab-toolgroup:nth-of-type(4),
.editor-lab-toolbar .editor-lab-toolgroup:nth-of-type(5),
.editor-lab-page-tools,
.editor-lab-document-actions,
.editor-lab-zoom-tools {
  min-height: 58px !important;
}

.editor-lab-document-actions,
.editor-lab-zoom-tools {
  margin-left: 0 !important;
}

.editor-lab-toolbar button,
.editor-lab-toolbar select,
.editor-lab-toolbar input[type="color"] {
  height: 38px !important;
  min-width: 38px !important;
}

.editor-version-bar {
  top: 150px !important;
}

@media (max-width: 900px) {
  .editor-lab-toolbar {
    min-height: 138px !important;
  }

  .editor-version-bar {
    top: 156px !important;
  }
}
/* Stable two-row toolbar structure: content row + formatting row. */
.editor-lab-toolbar {
  display: block !important;
  min-height: 136px !important;
  max-height: none !important;
  padding: 0 16px !important;
  overflow: visible !important;
  white-space: normal !important;
}

.editor-lab-primary-actions {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 64px !important;
  padding: 10px 0 10px 48px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border-right: 0 !important;
  border-bottom: 1px solid #e7edf5 !important;
  scrollbar-width: thin;
}

.editor-lab-format-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
  min-height: 64px !important;
  padding: 9px 0 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin;
}

.editor-lab-format-row > .editor-lab-toolgroup,
.editor-lab-format-row > .editor-lab-page-tools,
.editor-lab-format-row > .editor-lab-document-actions,
.editor-lab-format-row > .editor-lab-zoom-tools {
  display: flex !important;
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 42px !important;
  padding: 0 12px 0 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  border-bottom: 0 !important;
  border-right: 1px solid #e7edf5 !important;
}

.editor-lab-format-row > .editor-lab-toolgroup:last-child {
  border-right: 0 !important;
}

.editor-lab-format-row > .editor-lab-toolgroup::before,
.editor-lab-format-row > .editor-lab-page-tools::before {
  display: none !important;
}

.editor-lab-primary-actions::before {
  display: block !important;
  content: "\5185\5BB9" !important;
}

.editor-lab-format-row::before {
  content: "\6392\7248";
  flex: 0 0 auto;
  margin-right: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

/* Formal editor ribbon order and Word-like canvas controls. */
.editor-lab-format-row > .editor-lab-toolgroup:nth-of-type(1) { order: 1; }
.editor-lab-format-row > .editor-lab-toolgroup:nth-of-type(2) { order: 2; }
.editor-lab-format-row > .editor-lab-toolgroup:nth-of-type(3) { order: 3; }
.editor-lab-format-row > .editor-lab-toolgroup:nth-of-type(4) { order: 4; }
.editor-lab-format-row > .editor-lab-toolgroup:nth-of-type(5) { order: 5; }
.editor-lab-format-row > .editor-lab-document-actions { order: 6; }

.editor-lab-format-row > .editor-lab-toolgroup:nth-of-type(2) [data-editor-font] { order: 1; }
.editor-lab-format-row > .editor-lab-toolgroup:nth-of-type(2) [data-editor-size] { order: 2; }
.editor-lab-format-row > .editor-lab-toolgroup:nth-of-type(2) [data-editor-heading="1"] { order: 3; }
.editor-lab-format-row > .editor-lab-toolgroup:nth-of-type(2) [data-editor-heading="2"] { order: 4; }
.editor-lab-format-row > .editor-lab-toolgroup:nth-of-type(2) [data-editor-heading="3"] { order: 5; }

.editor-lab-format-row > .editor-lab-page-tools,
.editor-lab-format-row > .editor-lab-zoom-tools {
  position: fixed !important;
  bottom: 18px !important;
  z-index: 40 !important;
  min-height: 46px !important;
  padding: 6px 8px !important;
  border: 1px solid #d7e0ed !important;
  border-radius: 10px !important;
  background: rgb(255 255 255 / 96%) !important;
  box-shadow: 0 8px 24px rgb(34 55 86 / 14%) !important;
  backdrop-filter: blur(8px);
}

.editor-lab-format-row > .editor-lab-page-tools {
  right: 132px !important;
  gap: 6px !important;
}

.editor-lab-format-row > .editor-lab-page-tools::before {
  display: none !important;
}

.editor-lab-format-row > .editor-lab-zoom-tools {
  right: 18px !important;
  gap: 5px !important;
}

.editor-lab-format-row > .editor-lab-zoom-tools select {
  min-width: 88px !important;
}

.editor-lab-primary-actions button[data-insert-subheading] {
  color: #43536b !important;
  background: #f7f9fc !important;
  border-color: #d6deea !important;
}

.editor-lab-primary-actions button[data-insert-temp-knowledge] {
  color: #078467 !important;
  background: #edfdf7 !important;
  border-color: #a7e6d1 !important;
}

.editor-lab-primary-actions button[data-insert-temp-question] {
  color: #9a5b00 !important;
  background: #fff8e7 !important;
  border-color: #f0ce87 !important;
}

.editor-page-logo {
  display: inline-flex !important;
  align-items: center !important;
  min-width: 224px !important;
  background: #fff !important;
}

.editor-page-logo img {
  display: block !important;
  width: 224px !important;
  height: auto !important;
  max-height: 44px !important;
  object-fit: contain !important;
  object-position: right center !important;
  background: #fff !important;
}

.editor-page-logo img[hidden],
.editor-page-logo b {
  display: none !important;
}

@media (max-width: 980px) {
  .editor-lab-format-row > .editor-lab-page-tools {
    right: 18px !important;
    bottom: 72px !important;
  }
}

/* Workspace identity uses the real brand artwork. */
.brand-mark {
  width: 106px !important;
  height: 42px !important;
  overflow: hidden;
  border-radius: 0 !important;
  background: #fff !important;
}

.brand-mark img {
  display: block;
  width: 106px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
}

.brand-name {
  margin-left: 10px !important;
}

.function-sidebar-collapsed .brand-mark {
  width: 40px !important;
  height: 40px !important;
}

.function-sidebar-collapsed .brand-mark img {
  width: 106px;
  height: 40px;
  max-width: none;
  object-fit: contain;
  object-position: left center;
}

/* File import progress replaces verbose status labels. */
.import-progress {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.import-progress > span {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf6;
}

.import-progress > span > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f6bff;
  transition: width 220ms ease;
}

.import-progress > b {
  color: #315fca;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.import-progress.tone-success > span > i { background: #16a36a; }
.import-progress.tone-success > b { color: #117e55; }
.import-progress.tone-danger > span > i { background: #dc4b4b; }
.import-progress.tone-danger > b { color: #c23939; }

/* Stacked workspace brand: artwork above product name. */
.brand {
  align-items: flex-start !important;
  flex-direction: column;
  gap: 5px;
}

.brand-mark {
  width: 148px !important;
  height: 54px !important;
}

.brand-mark img {
  width: 148px !important;
  height: 54px !important;
}

.brand-name {
  margin: 0 !important;
  padding-left: 4px;
  font-size: 18px !important;
  line-height: 26px !important;
}

.function-sidebar-collapsed .brand {
  align-items: center !important;
  gap: 0;
}

.function-sidebar-collapsed .brand-mark {
  width: 40px !important;
  height: 40px !important;
}

.function-sidebar-collapsed .brand-mark img {
  width: 106px !important;
  height: 40px !important;
}

.editor-lab-toolbar button,
.editor-lab-toolbar select,
.editor-lab-toolbar input[type="color"] {
  flex: 0 0 auto !important;
}

.editor-version-bar {
  top: 154px !important;
}

@media (max-width: 900px) {
  .editor-lab-toolbar {
    min-height: 136px !important;
  }

  .editor-version-bar {
    top: 154px !important;
  }
}

/* Editor refinement: compact text boxes, explicit edit mode, closed table cards and unified dialogs. */
.editor-textbox-node {
  min-height: 34px !important;
  margin: 8px 0 !important;
  padding: 5px 8px !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  background: transparent !important;
  transition: border-color .16s ease, background .16s ease;
}
.editor-textbox-node:hover,
.editor-textbox-node.ProseMirror-selectednode {
  border-color: #b9c9e3 !important;
  background: #fbfdff !important;
  outline: 0 !important;
}
.editor-textbox-node:focus-within {
  border-color: #7da2ec !important;
  background: #fbfdff !important;
  box-shadow: 0 0 0 2px rgb(51 112 255 / 10%);
}
.editor-textbox-content {
  min-height: 22px;
  outline: 0;
  cursor: text;
  line-height: 1.65;
  white-space: normal;
}
.editor-textbox-content:empty::before {
  content: "输入文本内容";
  color: #a0aec0;
  pointer-events: none;
}
.editor-textbox-content p { margin: 0 0 6px !important; }
.editor-textbox-content p:last-child { margin-bottom: 0 !important; }
.editor-textbox-content h2,
.editor-textbox-content h3 { margin: 4px 0 6px; }
.editor-textbox-content ul,
.editor-textbox-content ol,
.editor-textbox-content blockquote { margin: 6px 0; }

.editor-version-bar {
  grid-template-columns: minmax(170px,.75fr) auto minmax(255px,1fr) auto !important;
  grid-template-areas: "heading switch status hint" "summary tabs tabs tabs" !important;
  gap: 10px 16px !important;
  padding: 12px 18px !important;
  background: #fff !important;
}
.editor-master-heading { grid-area: heading; }
.editor-mode-switch { grid-area: switch; }
.editor-edit-mode-status { grid-area: status; min-height: 46px; display: grid; align-content: center; gap: 2px; padding: 7px 13px 7px 35px; position: relative; border: 1px solid #c8d8f7; border-radius: 12px; background: #f3f7ff; }
.editor-edit-mode-status::before { content: ""; position: absolute; left: 14px; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: #3370ff; transform: translateY(-50%); box-shadow: 0 0 0 5px rgba(51,112,255,.11); }
.editor-edit-mode-status.is-single { border-color: #d9e0ea; background: #f8fafc; }
.editor-edit-mode-status.is-single::before { background: #64748b; box-shadow: 0 0 0 5px rgba(100,116,139,.1); }
.editor-edit-mode-status strong { color: #245fc4 !important; font-size: 13px !important; }
.editor-edit-mode-status.is-single strong { color: #36445a !important; }
.editor-edit-mode-status span { color: #65738a !important; font-size: 11px !important; }
.editor-version-summary { grid-area: summary; }
.editor-single-version-tabs { grid-area: tabs; justify-self: start; }
.editor-master-hint { grid-area: hint; }
.editor-version-tabs-bar {
  position: relative;
  top: auto !important;
  display: grid !important;
  margin-top: 0 !important;
  grid-template-columns: minmax(190px, 1fr) minmax(165px, .5fr) auto !important;
  grid-template-areas: "copy . versions" !important;
  gap: 16px !important;
  align-items: center !important;
}
.editor-version-mode-copy {
  grid-area: copy;
  display: grid;
  gap: 2px;
}
.editor-version-mode-copy strong { color: #263a55; font-size: 14px; }
.editor-version-mode-copy span { color: #8390a3; font-size: 11px; }
.editor-layered-master-trigger {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  min-height: 38px;
  padding: 0 19px;
  border: 1px solid #d7e0ec;
  border-radius: 10px;
  background: #edf1f6;
  color: #8490a1;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  transform: translate(-50%, -50%);
}
.editor-layered-master-trigger strong { color: inherit !important; font-size: 13px !important; }
.editor-layered-master-trigger span { margin-left: 7px; color: #7b8ba1; font-size: 10px; font-weight: 800; }
.editor-layered-master-trigger.active span { color: #5f7fb8; }
.editor-layered-master-trigger:hover { border-color: #b6c6df; background: #e8edf4; color: #62718a; }
.editor-layered-master-trigger.active {
  border-color: #c7d8f4;
  background: #fff;
  color: #2866d8;
  box-shadow: 0 2px 8px rgb(31 74 160 / 12%), 0 0 0 4px #edf3fc;
}
.editor-version-view-tabs {
  grid-area: versions;
  display: inline-flex;
  justify-self: end;
  gap: 2px;
  padding: 4px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #edf2f8;
}
.editor-version-view-tabs button {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #52617a;
  font: inherit;
  cursor: pointer;
}
.editor-version-view-tabs button:hover { background: #f7f9fc; color: #36557e; }
.editor-version-view-tabs button.active {
  background: #fff;
  color: #2866d8;
  box-shadow: 0 2px 8px rgb(31 74 160 / 12%);
}
.editor-version-view-tabs strong { font-size: 12px; }
.editor-version-view-tabs .editor-version-metrics { display: inline-flex; align-items: center; gap: 4px; color: #4773c9; font-size: 10px; font-weight: 800; white-space: nowrap; }
.editor-version-metrics b { font: inherit; }
.editor-version-metrics i { color: #a2aec0; font-style: normal; }
.editor-version-view-tabs button.active .editor-version-metrics { color: #4773c9; }
@media (max-width: 1120px) {
  .editor-version-tabs-bar {
    grid-template-columns: minmax(170px, 1fr) auto !important;
    grid-template-areas: "copy copy" "master versions" !important;
    row-gap: 12px !important;
  }
  .editor-layered-master-trigger {
    position: static;
    grid-area: master;
    justify-self: start;
    transform: none;
  }
  .editor-version-view-tabs { justify-self: end; }
}
@media (max-width: 720px) {
  .editor-version-tabs-bar { grid-template-columns: 1fr auto !important; grid-template-areas: "copy copy" "master master" "versions versions" !important; }
  .editor-version-view-tabs { width: 100%; }
  .editor-version-view-tabs button { flex: 1; padding: 0 8px; }
}

.editor-document-mode-badge { display: inline-flex; min-height: 24px; align-items: center; margin-left: 10px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 800; vertical-align: middle; }
.editor-document-mode-badge.sync { background: #eaf2ff; color: #286be6; }
.editor-document-mode-badge.pack { background: #fff4d8; color: #996000; }

/* Compact editor identity bar: document first, secondary state stays quiet. */
.editor-lab-header {
  min-height: 76px !important;
  padding: 12px 20px !important;
  align-items: center !important;
  background: #fff !important;
}

.editor-lab-heading {
  flex: 1 1 auto;
  min-width: 0;
  gap: 14px !important;
}

.editor-lab-document-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.editor-lab-document-identity h1 {
  max-width: min(760px, 55vw);
  margin: 0 !important;
  overflow: hidden;
  color: #17233a;
  font-size: 20px !important;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-lab-document-identity small {
  color: #7a879b;
  font-size: 12px;
  font-weight: 500;
}

.editor-lab-status {
  flex: 0 0 auto;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end;
  gap: 18px !important;
}

.editor-lab-status small[data-editor-lab-save-status] {
  min-width: 116px;
  color: #7a879b !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-align: right;
  white-space: nowrap;
}

.editor-lab-status > [data-preview-entry] {
  min-height: 42px !important;
  padding: 0 20px !important;
  border-radius: 10px !important;
}

.editor-lab-status .editor-lab-exit-menu > button {
  min-height: 42px !important;
  border-radius: 10px !important;
}

.editor-lab-primary-actions button[data-insert-handout],
.editor-lab-primary-actions button[data-insert-question],
.editor-lab-primary-actions button[data-insert-knowledge],
.editor-lab-primary-actions button[data-insert-image-reference] {
  color: #245fca !important;
  background: #eef4ff !important;
  border-color: #bcd0ff !important;
}

.editor-lab-primary-actions button[data-editor-command="textBox"],
.editor-lab-primary-actions button[data-insert-temp-knowledge] {
  color: #078467 !important;
  background: #edfdf7 !important;
  border-color: #a7e6d1 !important;
}

.editor-lab-primary-actions button[data-insert-temp-question] {
  color: #9a5b00 !important;
  background: #fff8e7 !important;
  border-color: #f0ce87 !important;
}

@media (max-width: 980px) {
  .editor-lab-document-identity h1 { max-width: calc(100vw - 120px); }
  .editor-lab-status { width: 100%; }
  .editor-lab-status small[data-editor-lab-save-status] { margin-right: auto; text-align: left; }
}
.editor-lab.is-document-pack .editor-pack-bar { min-height: 58px; grid-template-columns: minmax(180px, 1fr) auto !important; grid-template-areas: "heading hint" !important; }
.editor-lab.is-document-pack .editor-pack-bar .editor-master-hint { align-self: center; }
.editor-lab.is-document-pack .editor-ref-config-bottom,
.editor-lab.is-document-pack .editor-ref-config-layers { display: none !important; }

.import-unified-panel { overflow: hidden; background: #fff; }
.import-record-table-wrap { max-height: none; overflow: visible; background: #fff; scrollbar-gutter: auto; }
.import-record-table tbody tr,
.import-record-table tbody td { background: #fff !important; }
.import-record-pagination { margin: 0; padding: 16px 20px 18px; border-top: 1px solid #e3e8f0; background: #fff; }

.editor-lab-dialog {
  width: min(860px, calc(100vw - 48px)) !important;
  max-height: calc(100vh - 48px) !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 28px 80px rgba(16,27,48,.25) !important;
}
.editor-lab-dialog::backdrop { background: rgba(16,24,40,.46) !important; backdrop-filter: blur(3px); }
.editor-lab-dialog form { max-height: calc(100vh - 48px); overflow: auto; background: #fff; }
.editor-lab-dialog header { position: sticky; top: 0; z-index: 4; min-height: 68px !important; padding: 16px 22px !important; border-bottom: 1px solid #e1e7ef !important; background: #fff; }
.editor-lab-dialog header > div { display: grid; gap: 4px; }
.editor-lab-dialog header small { color: #718096; font-size: 11px; font-weight: 500; }
.editor-lab-dialog header button { width: 34px !important; height: 34px !important; border-radius: 9px !important; background: #f4f6f9 !important; color: #536176; }
.editor-lab-dialog footer { position: sticky; bottom: 0; z-index: 4; padding: 15px 22px 19px !important; border-top: 1px solid #e1e7ef; background: #fbfcfe; }
.editor-lab-dialog footer button { min-width: 82px; height: 42px !important; padding: 0 16px !important; border-radius: 10px !important; font-weight: 700; }
.editor-lab-dialog footer button[value="default"],
.editor-lab-dialog footer button[data-temp-confirm],
.editor-lab-dialog footer button[data-textbox-confirm] { border-color: #3370ff; background: #3370ff; color: #fff; }
.editor-lab-dialog input:not([type="checkbox"]):not([type="radio"]),
.editor-lab-dialog select,
.editor-lab-dialog textarea { width: 100%; min-height: 44px; margin: 0 !important; padding: 10px 12px; border: 1px solid #ced8e6; border-radius: 10px; background: #fff; color: #24324a; outline: none; }
.editor-lab-dialog textarea { line-height: 1.7; resize: vertical; }
.editor-lab-dialog input:focus,
.editor-lab-dialog select:focus,
.editor-lab-dialog textarea:focus { border-color: #4d7fe6; box-shadow: 0 0 0 3px rgba(51,112,255,.1); }
.editor-lab-dialog.editor-mindmap-dialog { width:min(1040px,calc(100vw - 48px))!important; }
.editor-lab-dialog.editor-mindmap-dialog form { overflow:hidden!important; }
.editor-dialog-richbar { position: sticky; top: 68px; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 22px; border-bottom: 1px solid #e3e8f0; background: #f7f9fc; }
.editor-dialog-richbar > span { margin-right: 4px; color: #66738a; font-size: 11px; font-weight: 800; }
.editor-dialog-richbar button { min-height: 32px; padding: 0 10px; border: 1px solid #d1dbe8; border-radius: 8px; background: #fff; color: #34435a; font-weight: 700; cursor: pointer; }
.editor-dialog-richbar button:hover { color: #245fc4; border-color: #a9c0ed; background: #f4f7ff; }
.editor-dialog-markdown-preview { margin: 14px 22px 0; padding: 14px 16px; border: 1px solid #d9e3f0; border-radius: 12px; background: #fbfcfe; color: #2c3a51; line-height: 1.75; }
.editor-textbox-editor,
.editor-temp-question-editor,
.editor-reference-field-editor { padding: 20px 22px !important; gap: 15px !important; }
.editor-temp-question-editor { grid-template-columns: 1fr 1fr !important; }
.editor-temp-question-wide,
.editor-temp-question-editor label:last-child { grid-column: 1 / -1 !important; }
.editor-temp-question-editor > .editor-temp-question-type-row,
.editor-temp-question-editor > .editor-temp-question-title-row { grid-column:auto!important; align-content:start; }
.editor-temp-question-type-row [data-temp-type-hint] { visibility:hidden; }
.editor-temp-question-editor label { gap: 8px !important; color: #58667d !important; font-size: 12px !important; font-weight: 700; }
.editor-lab-dialog.editor-lab-temp-question-dialog { width: min(1120px, calc(100vw - 48px)) !important; }
.editor-temp-question-formatbar { position: sticky; top: 68px; z-index: 7; margin: 0 !important; padding: 10px 22px !important; border-width: 0 0 1px !important; border-radius: 0 !important; background: #f7f9fc; }
.editor-temp-question-meta-row { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(210px, .3fr) minmax(420px, 1fr); gap: 15px; }
.editor-temp-question-meta-row > label { margin: 0 !important; }
.editor-temp-star-picker { display: flex; align-items: center; gap: 3px; box-sizing: border-box; height: 44px; padding: 0 12px; border: 1px solid #ced8e6; border-radius: 10px; background: #fff; }
.editor-temp-star-picker button { padding: 0; border: 0; background: transparent; color: #c8d1df; font-size: 24px; line-height: 1; cursor: pointer; }
.editor-temp-star-picker button.active { color: #e5a000; }
.editor-temp-question-editor .qm-tiptap-surface { width: 100%; min-height: 150px; max-height: 360px; overflow: auto; border: 1px solid #ced8e6; border-radius: 10px; background: #fff; }
.editor-temp-question-editor .qm-tiptap-surface[data-field="stem"],
.editor-temp-question-editor .qm-tiptap-surface[data-field^="option_"] { min-height: 220px; }
.editor-temp-question-editor .qm-tiptap-surface[data-field="analysis"] { min-height: 190px; }
.editor-temp-question-editor .qm-tiptap-surface[data-field="stem"] { height:230px; min-height:230px; max-height:230px; overflow-y:auto; }
.editor-temp-question-editor .qm-tiptap-surface[data-field="answer"] { height:150px; min-height:150px; max-height:150px; overflow-y:auto; }
.editor-temp-question-editor .qm-tiptap-surface[data-field="analysis"] { height:210px; min-height:210px; max-height:210px; overflow-y:auto; }
.editor-temp-question-editor .qm-tiptap-surface .qm-question-prosemirror { min-height: inherit; padding: 14px 16px; font-size: 16px; line-height: 1.75; outline: 0; }

@media (max-width: 900px) {
  .editor-version-bar { grid-template-columns: 1fr auto !important; grid-template-areas: "heading switch" "status status" "summary hint" "tabs tabs" !important; }
  .editor-lab-dialog { width: 100vw !important; max-height: 100vh !important; border-radius: 0 !important; }
  .editor-lab-dialog form { max-height: 100vh; }
  .editor-temp-question-editor,
  .editor-reference-field-editor { grid-template-columns: 1fr !important; }
  .editor-temp-question-editor > *,
  .editor-reference-field-editor > * { grid-column: 1 !important; }
}

/* Unified workbench dialogs: one visual and interaction language across question, module and utility editors. */
.alpha-question-edit-backdrop,
.alpha-knowledge-edit-backdrop { padding: 28px; background: rgb(18 28 46 / 55%); backdrop-filter: blur(5px); }
.alpha-question-edit-modal,
.alpha-knowledge-edit-modal {
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 90px rgb(15 28 50 / 28%);
}
.alpha-question-edit-modal { width: min(1320px, 94vw); height: min(900px, calc(100vh - 56px)); min-height: 620px; }
.alpha-knowledge-edit-modal { width: min(1180px, 94vw); height: min(860px, calc(100vh - 56px)); }
.alpha-question-edit-modal > header,
.alpha-knowledge-edit-modal > header {
  min-height: 86px;
  padding: 18px 26px;
  border-bottom: 1px solid #e5eaf1;
  box-shadow: none;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}
.alpha-question-edit-modal > header span,
.alpha-knowledge-edit-modal > header span { font-size: 12px; letter-spacing: .04em; }
.alpha-question-edit-modal > header h2,
.alpha-knowledge-edit-modal > header h2 { margin: 4px 0 3px; font-size: 21px; }
.alpha-question-edit-modal > header .icon-button,
.alpha-knowledge-edit-modal > header .icon-button { width: 38px; height: 38px; border-radius: 10px; background: #f3f6fa; }
.alpha-question-edit-body { grid-template-columns: minmax(360px, 38%) minmax(560px, 62%); background: #fff; }
.alpha-question-source-pane { border-right-color: #e1e7f0; background: #f4f7fb; }
.alpha-question-edit-pane-title { min-height: 62px; padding: 12px 20px; border-bottom-color: #e5eaf1; background: #fff; }
.alpha-question-source-pages { padding: 22px; }
.alpha-question-source-pages figure,
.alpha-question-source-document { overflow: hidden; border: 1px solid #dfe5ee; border-radius: 12px; box-shadow: 0 8px 24px rgb(30 46 72 / 8%); }
.alpha-question-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px 22px; border-bottom: 0; background: #fff; }
.alpha-question-meta-grid > label { gap: 7px; color: #56647a; font-size: 12px; font-weight: 700; }
.alpha-question-meta-grid input,
.alpha-question-meta-grid select { height: 44px; padding: 0 12px; border-color: #d4dce8; border-radius: 10px; }
.alpha-question-meta-grid > fieldset { align-self: end; }
.alpha-question-meta-grid > fieldset label { height: 44px; border-color: #d4dce8; }
.alpha-question-meta-grid > fieldset label:first-of-type { border-radius: 10px 0 0 10px; }
.alpha-question-meta-grid > fieldset label:last-of-type { border-radius: 0 10px 10px 0; }
.alpha-question-formatbar {
  position: sticky;
  z-index: 4;
  top: 62px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 22px;
  padding: 10px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #f7f9fc;
}
.alpha-question-formatbar > span { margin-right: 4px; color: #65738a; font-size: 12px; font-weight: 800; }
.alpha-question-formatbar button { min-height: 32px; padding: 0 10px; border: 1px solid #d1dbe8; border-radius: 8px; background: #fff; color: #34435a; font-weight: 700; cursor: pointer; }
.alpha-question-formatbar button:hover { color: #245fc4; border-color: #a9c0ed; background: #f4f7ff; }
.alpha-question-edit-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 18px 22px 26px; }
.alpha-question-edit-fields > label:first-child,
.alpha-question-option-editor { grid-column: 1 / -1; }
.alpha-question-edit-fields > label { padding: 15px; border: 1px solid #e1e7ef; border-radius: 13px; background: #fbfcfe; }
.alpha-question-edit-fields textarea { border-color: #d5dce7; border-radius: 10px; background: #fff; }
.alpha-question-edit-fields > label:first-child textarea { min-height: 190px; }
.alpha-question-edit-fields > label:not(:first-child) textarea { min-height: 130px; }
.alpha-question-option-editor { gap: 12px 14px; padding: 16px; border-color: #e1e7ef; border-radius: 13px; background: #fbfcfe; }
.alpha-question-option-editor[hidden] { display: none !important; }
.alpha-question-edit-modal > footer { min-height: 72px; padding: 13px 26px; border-top-color: #e5eaf1; background: #fbfcfe; }
.alpha-question-edit-modal > footer .button { min-height: 42px; border-radius: 10px; }
.alpha-knowledge-modal-body { padding: 18px; background: #f4f7fb; }
.alpha-knowledge-modal-body .knowledge-editor-panel { overflow: hidden; border: 1px solid #e0e6ef; border-radius: 14px; background: #fff; }
.alpha-knowledge-modal-body .knowledge-card-meta input,
.alpha-knowledge-modal-body .knowledge-card-meta select { height: 44px; border-radius: 10px; }
.alpha-knowledge-modal-body .knowledge-rich-editable { margin: 0 20px 20px; border-radius: 12px; }
.alpha-knowledge-modal-actions { padding: 14px 20px; border-top: 1px solid #e5eaf1; }

dialog.workbench-dialog {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 26px 80px rgb(15 28 50 / 26%);
}
dialog.workbench-dialog::backdrop { background: rgb(18 28 46 / 52%); backdrop-filter: blur(4px); }
dialog.workbench-dialog > form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(84vh, 780px); }
dialog.workbench-dialog .dialog-heading { min-height: 68px; padding: 16px 20px; border-bottom: 1px solid #e4e9f1; background: linear-gradient(180deg, #fff, #fbfcfe); }
dialog.workbench-dialog > form > footer { padding: 14px 20px; border-top: 1px solid #e4e9f1; background: #fbfcfe; }

/* Production question editor: same visual language as the structured editor dialogs. */
.qm-modal-backdrop { padding: 24px; background: rgb(18 28 46 / 54%); backdrop-filter: blur(5px); }
.qm-modal { width: min(1320px, calc(100vw - 48px)); max-height: min(920px, calc(100vh - 48px)); border: 1px solid rgb(220 227 238 / 90%); border-radius: 20px; box-shadow: 0 30px 90px rgb(20 32 54 / 30%); }
.qm-modal > header { min-height: 82px; padding: 16px 24px; background: linear-gradient(180deg, #fff 0%, #fbfcff 100%); }
.qm-modal > header > div { display: grid; gap: 3px; }
.qm-modal > header span { font-size: 12px; letter-spacing: .04em; }
.qm-modal > header h2 { font-size: 22px; line-height: 1.2; }
.qm-modal > header p, .qm-modal > footer span { font-size: 12px; }
.qm-modal > header .icon-button { width: 36px; height: 36px; border-radius: 10px; color: #66758a; background: #f4f7fb; }
.qm-modal-body { grid-template-columns: minmax(380px, .82fr) minmax(610px, 1.18fr); }
.qm-modal-source { background: #f5f7fb; }
.qm-modal-pane-title { min-height: 66px; padding: 13px 20px; }
.qm-modal-pane-title strong { font-size: 15px; }
.qm-modal-pane-title span, .qm-modal-pane-title em { font-size: 12px; }
.qm-modal-source-scroll { padding: 20px; }
.qm-modal-source-scroll figure, .qm-modal-rendered-question { border-color: #dce4ef; border-radius: 12px; box-shadow: 0 7px 22px rgb(28 47 78 / 5%); }
.qm-modal-body > form { gap: 16px; padding: 0 22px 24px; background: #fff; }
.qm-modal-body > form > .qm-modal-pane-title { margin: 0 -22px; padding-inline: 22px; }
.qm-edit-meta { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(150px, .7fr) minmax(150px, .7fr); gap: 14px; padding-top: 2px; }
.qm-edit-meta label, .qm-answer-grid label, .qm-rich-field { min-width: 0; display: grid; gap: 7px; color: #536177; font-size: 12px; font-weight: 650; }
.qm-edit-meta .qm-edit-title { grid-column: span 2; }
.qm-edit-meta .qm-edit-related { grid-column: span 2; }
.qm-modal input, .qm-modal select, .qm-modal textarea { width: 100%; padding: 10px 12px; color: #152238; border: 1px solid #d1dae8; border-radius: 9px; background: #fff; font: inherit; font-weight: 400; transition: border-color .15s ease, box-shadow .15s ease; }
.qm-modal input, .qm-modal select { min-height: 42px; }
.qm-modal input:focus, .qm-modal select:focus, .qm-modal textarea:focus { outline: 0; border-color: #5d86e6; box-shadow: 0 0 0 3px rgb(55 111 238 / 12%); }
.qm-formatbar { position: sticky; top: 66px; z-index: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 9px; border: 1px solid #dbe3ef; border-radius: 11px; background: rgb(248 250 253 / 96%); backdrop-filter: blur(8px); }
.qm-formatbar > span { margin: 0 5px 0 2px; color: #68768b; font-size: 12px; font-weight: 750; }
.qm-formatbar button { min-height: 31px; padding: 0 9px; color: #344258; border: 1px solid #d2dbe8; border-radius: 7px; background: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.qm-formatbar button:hover { color: #245fc4; border-color: #a8bee9; background: #f3f7ff; }
.qm-color-control { min-height:31px; display:inline-flex; align-items:center; gap:6px; padding:0 8px; border:1px solid #d2dbe8; border-radius:7px; background:#fff; color:#344258; font-size:12px; font-weight:700; cursor:pointer; }
.qm-color-control input { width:20px; height:20px; padding:0; border:0; border-radius:4px; background:transparent; cursor:pointer; }
.qm-font-size { display:flex; align-items:center; gap:6px; min-height:31px; padding:0 7px; border:1px solid #d2dbe8; border-radius:7px; background:#fff; color:#526078; font-size:12px; font-weight:700; }
.qm-font-size select { width:60px; min-height:27px!important; padding:2px 20px 2px 5px!important; border:0!important; border-radius:5px!important; background-color:transparent!important; box-shadow:none!important; font-size:12px; }
.qm-table-control { position:relative; display:inline-flex; }
.qm-table-menu { position:absolute; z-index:12; top:calc(100% + 8px); right:0; width:254px; display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:12px; border:1px solid #d7e1ef; border-radius:12px; background:#fff; box-shadow:0 16px 38px rgb(30 50 82 / 18%); }
.qm-table-menu[hidden] { display:none!important; }
.qm-table-menu label { display:grid; gap:5px; color:#67758a; font-size:11px; font-weight:700; }
.qm-table-menu input { min-height:32px!important; padding:5px 8px!important; border-radius:7px!important; }
.qm-table-menu button { width:100%; min-height:32px; }
.qm-table-menu button[data-qm-table-action="insert"],.qm-table-menu-divider { grid-column:1 / -1; }
.qm-table-menu button[data-qm-table-action="insert"] { border-color:#3370ff; background:#3370ff; color:#fff; }
.qm-table-menu-divider { height:1px; background:#e6ebf2; }
.qm-modal fieldset { gap: 10px; padding: 14px; border-color: #d7e0ec; border-radius: 11px; background: #fafcff; }
.qm-modal fieldset[hidden] { display: none; }
.qm-modal fieldset legend { padding: 0 7px; color: #536177; font-size: 12px; font-weight: 750; }
.qm-modal fieldset label { grid-template-columns: 34px minmax(0, 1fr); align-items: center; }
.qm-modal fieldset label b { display: grid; place-items: center; width: 30px; height: 30px; color: #315fbd; border-radius: 8px; background: #edf3ff; }
.qm-answer-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.qm-modal textarea[name="stem"] { min-height: 150px; }
.qm-modal textarea[name="answer"] { min-height: 86px; }
.qm-modal textarea[name="analysis"] { min-height: 320px; }
.qm-modal > footer { min-height: 70px; padding: 13px 24px; background: #fbfcfe; }
.qm-modal > footer .button { min-height: 42px; padding-inline: 22px; border-radius: 10px; }

/* Keep every question-editor formatting control on one consistent 38px grid. */
.qm-formatbar > button,
.qm-formatbar > .qm-font-size,
.qm-formatbar > .qm-table-control > button {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
}
.qm-formatbar > .qm-color-control {
  position: relative;
  flex: 0 0 auto;
  display: block;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
}
.qm-align-control {
  flex: 0 0 auto;
  display: block;
  width: 112px;
  min-width: 112px;
  height: 38px;
  margin: 0;
}
.qm-align-control select {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  min-height: 38px !important;
  padding: 0 28px 0 10px !important;
  border: 1px solid #d2dbe8 !important;
  border-radius: 7px !important;
  background-color: #fff !important;
  color: #344258;
  box-shadow: none !important;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.qm-color-control summary,
.editor-lab-color-control summary {
  box-sizing: border-box;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #d2dbe8;
  border-radius: inherit;
  background: #fff;
  color: #344258;
  font: inherit;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.qm-color-control summary::-webkit-details-marker,
.editor-lab-color-control summary::-webkit-details-marker { display: none; }
.qm-color-control summary i,
.editor-lab-color-control summary i {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid #bdc8d8;
  border-radius: 4px;
  background: var(--color-swatch);
  box-shadow: inset 0 0 0 2px #fff;
}
.qm-color-control summary i.is-default::after,
.editor-lab-color-control summary i.is-default::after {
  content: "";
  position: absolute;
  inset: 2px 8px;
  background: #d4473d;
  transform: rotate(45deg);
}
.qm-color-menu,
.editor-lab-color-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: 150px;
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #d8e0eb;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(31 50 80 / 18%);
}
details:not([open]) > .qm-color-menu,
details:not([open]) > .editor-lab-color-menu { display: none; }
.qm-color-menu label,
.editor-lab-color-menu label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #5b687b;
  font-size: 11px;
  font-weight: 700;
}
.qm-color-menu input[type="color"],
.editor-lab-color-menu input[type="color"] {
  width: 54px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 2px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 5px !important;
  box-shadow: none !important;
}
.qm-color-menu button,
.editor-lab-color-menu button {
  width: 100%;
  height: 30px !important;
  min-height: 30px !important;
  color: #3e5778;
  border: 1px solid #d5dfec;
  border-radius: 6px !important;
  background: #f7f9fc;
  font-size: 11px !important;
  font-weight: 700;
  cursor: pointer;
}
.qm-formatbar > .qm-font-size select {
  height: 30px !important;
  min-height: 30px !important;
}

/* Each category owns its own two rows, matching a conventional document ribbon. */
.editor-lab-format-row {
  position: relative;
  z-index: 50;
  display: flex !important;
  align-items: center !important;
  min-height: 64px !important;
  height: 64px !important;
  padding: 4px 0 !important;
  gap: 10px !important;
  overflow: visible !important;
}
.editor-lab-format-row::before { content: none !important; }
.editor-lab-format-label {
  box-sizing: border-box;
  flex: 0 0 112px;
  padding-left: 24px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}
.editor-lab-format-groups {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
}
.editor-lab-ribbon-group {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 auto !important;
  display: grid;
  grid-template-rows: repeat(2, 26px);
  align-content: center;
  gap: 4px;
  height: 56px;
  margin: 0 !important;
  padding: 0 18px 0 0 !important;
  border-right: 1px solid #e1e7f0 !important;
}
.editor-lab-ribbon-group:last-child {
  margin-right: 0 !important;
  padding-right: 0 !important;
  border-right: 0 !important;
}
.editor-lab-ribbon-subrow {
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 6px;
}
.editor-lab-history-group { grid-template-rows: 26px; align-content: center; }
.editor-lab-insert-group {
  min-width: 0;
  flex: 0 0 auto !important;
  grid-template-rows: 26px;
  align-content: center;
}
.editor-lab-insert-group .editor-lab-ribbon-subrow {
  width: auto;
  min-width: max-content;
  justify-content: flex-start;
  gap: 10px;
}
.editor-lab-ribbon-subrow button,
.editor-lab-ribbon-subrow select,
.editor-lab-color-control {
  box-sizing: border-box;
  height: 26px !important;
  min-height: 26px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
}
.editor-lab-ribbon-subrow button { min-width: 28px !important; padding: 0 7px !important; }
.editor-lab-ribbon-subrow select { padding: 0 22px 0 7px !important; }
.editor-lab-ribbon-subrow [data-editor-font] { width: 110px !important; }
.editor-lab-ribbon-subrow [data-editor-size] { width: 58px !important; }
.editor-lab-color-control {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 4px !important;
  background: transparent !important;
}
.editor-lab-color-control summary { padding: 0 6px; border-radius: 6px; }
.editor-lab-color-menu { top: calc(100% + 5px); left: 0; right: auto; }

/* Preserve the original KaTeX font and only add an optical slant to digits/CJK glyphs. */
.editor-formula-glyph-italic {
  display: inline-block;
  transform: skewX(-11deg);
  transform-origin: 50% 80%;
}

/* September UI alignment pass: one shared baseline, polished selectors and centred zoom. */
.editor-lab-primary-actions::before,
.editor-lab-format-label {
  box-sizing: border-box !important;
  width: 112px !important;
  flex: 0 0 112px !important;
  padding-left: 24px !important;
  text-align: left !important;
}
.editor-lab-primary-actions {
  padding-left: 0 !important;
}
.editor-lab-primary-actions::before {
  position: static !important;
  transform: none !important;
}
.editor-lab-ribbon-subrow [data-editor-size] {
  width: 76px !important;
  min-width: 76px !important;
}
.editor-lab-insert-group .editor-lab-ribbon-subrow button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}
.editor-lab-insert-group .editor-lab-ribbon-subrow {
  gap: 8px !important;
}
.editor-lab-color-menu--swatch-only {
  min-width: 132px;
  align-items: stretch;
}
.editor-lab-color-menu--swatch-only > input[type="color"] {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  appearance: none;
  -webkit-appearance: none;
  padding: 3px !important;
  border: 1px solid #d6e0ed !important;
  border-radius: 8px !important;
  background: #fff !important;
}
.editor-lab-color-menu--swatch-only > input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.editor-lab-color-menu--swatch-only > input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.editor-document-type {
  gap: 3px;
  min-height: 48px;
  padding: 5px;
  border-color: #d6e0ed;
  border-radius: 13px;
  background: #edf2f8;
  box-shadow: inset 0 1px 2px rgb(31 50 80 / 5%);
}
.editor-document-type button {
  min-width: 92px;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 750;
}
.editor-document-type button[aria-pressed="true"] {
  color: #245fdb;
  background: #fff;
  box-shadow: 0 3px 10px rgb(34 67 122 / 14%), inset 0 0 0 1px #d9e5ff;
}
.editor-preview-control-group {
  min-height: 46px;
  gap: 3px;
  padding: 4px;
  border: 1px solid #d9e3ef;
  border-radius: 13px;
  background: #eef3f9;
  box-shadow: inset 0 1px 2px rgb(31 50 80 / 4%);
}
.editor-preview-control-group > span {
  padding: 0 10px;
  color: #64758e;
  font-size: 13px;
  font-weight: 800;
}
.editor-preview-control-group button {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
}
.editor-preview-control-group button.active {
  border-color: #dce7ff;
  background: #fff;
  color: #2362de;
  box-shadow: 0 3px 9px rgb(35 73 134 / 13%);
}
.editor-master-workspace {
  box-sizing: content-box;
  width: var(--editor-scaled-paper-width, var(--editor-paper-width)) !important;
}
.editor-lab:not(.is-sync-versions) .editor-version-workspace,
.editor-lab.is-preview-mode .editor-version-workspace {
  box-sizing: content-box;
  width: var(--editor-scaled-paper-width, var(--editor-paper-width)) !important;
}
.editor-lab-paper-viewport {
  scroll-behavior: smooth;
  overflow-x: auto !important;
}
.editor-lab.is-preview-mode .editor-lab-header {
  position: relative;
}
.editor-lab.is-preview-mode .editor-file-classification {
  position: static;
  transform: none;
  flex-wrap: nowrap;
}
.qm-reference-disclosure {
  padding: 0;
  overflow: hidden;
}
.qm-reference-disclosure > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 17px;
  list-style: none;
  cursor: pointer;
}
.qm-reference-disclosure > summary::-webkit-details-marker { display: none; }
.qm-reference-disclosure > summary > span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #d6e0ed;
  border-radius: 9px;
  background: #f8faff;
  color: #3e5778;
  font-size: 12px;
  font-weight: 750;
}
.qm-reference-disclosure > summary i {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}
.qm-reference-disclosure[open] > summary i {
  transform: translateY(2px) rotate(225deg);
}
.qm-reference-disclosure[open] > summary {
  border-bottom: 1px solid #e6ebf2;
}
.qm-reference-disclosure-body { padding: 0 17px 17px; }

/* Sidebar brand: centre the complete mark and give the workspace name a calm academic navy. */
.app-shell:not(.function-sidebar-collapsed) .brand {
  width: 100%;
  align-items: center !important;
  justify-content: center;
  gap: 7px;
  padding: 2px 8px 22px !important;
  text-align: center;
}
.app-shell:not(.function-sidebar-collapsed) .brand-mark {
  width: 176px !important;
  height: 62px !important;
}
.app-shell:not(.function-sidebar-collapsed) .brand-mark img {
  width: 176px !important;
  height: 62px !important;
  object-position: center !important;
}
.app-shell:not(.function-sidebar-collapsed) .brand-name {
  margin: 0 !important;
  padding: 0 !important;
  color: #173b67;
  font-size: 22px !important;
  line-height: 30px !important;
  font-weight: 800;
  letter-spacing: .015em;
}

@media (max-width: 1180px) {
  .editor-lab.is-preview-mode .editor-file-classification {
    position: static;
    transform: none;
  }
}
@media (max-width: 980px) {
  .qm-modal-backdrop { padding: 0; }
  .qm-modal { width: 100vw; max-height: 100vh; border-radius: 0; }
  .qm-modal-body { grid-template-columns: 1fr; overflow-y: auto; }
  .qm-modal-source { min-height: 360px; border-right: 0; border-bottom: 1px solid var(--border); }
  .qm-modal-body > form { overflow: visible; }
  .qm-edit-meta, .qm-answer-grid { grid-template-columns: 1fr; }
  .qm-edit-meta .qm-edit-title, .qm-edit-meta .qm-edit-related { grid-column: auto; }
  .qm-formatbar { top: 0; }
}

@media (max-width: 900px) {
  .alpha-question-edit-backdrop,
  .alpha-knowledge-edit-backdrop { padding: 0; }
  .alpha-question-edit-modal,
  .alpha-knowledge-edit-modal { width: 100vw; height: 100vh; min-height: 0; border-radius: 0; }
  .alpha-question-edit-body { grid-template-columns: 1fr; overflow-y: auto; }
  .alpha-question-meta-grid,
  .alpha-question-edit-fields { grid-template-columns: 1fr; }
  .alpha-question-edit-fields > * { grid-column: 1 !important; }
}
.editor-lab-status::before { content:none!important; display:none!important; }
.draft-save-status { display:inline-flex; align-items:center; min-height:24px; color:#7a879b!important; font-size:12px!important; font-weight:500!important; white-space:nowrap; }
.draft-save-status[data-state="saving"] { color:#7a879b!important; }
.draft-recovery-banner { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:10px 18px 0; padding:10px 12px; border:1px solid #cfe0ff; border-radius:12px; background:#f7faff; box-shadow:0 8px 24px rgba(46,94,170,.07); }
.draft-recovery-copy,.draft-recovery-actions { display:flex; align-items:center; }
.draft-recovery-copy { gap:10px; color:#20324f; }
.draft-recovery-copy>span:last-child { display:grid; gap:2px; }
.draft-recovery-copy small { color:#71809a; font-size:12px; }
.draft-recovery-icon { display:grid; width:30px; height:30px; place-items:center; border-radius:9px; background:#e7efff; color:#2f6df6; font-size:19px; }
.draft-recovery-actions { gap:7px; }
.draft-recovery-actions button,.draft-history-menu-entry,.draft-history-item button { min-height:34px; padding:0 13px; border:1px solid #d4deec; border-radius:9px; background:#fff; color:#32445f; font:inherit; font-weight:700; cursor:pointer; }
.draft-recovery-actions .is-primary,.draft-history-item button { border-color:#2f6df6; background:#2f6df6; color:#fff; }
.draft-recovery-actions .is-danger-text { border-color:transparent; background:transparent; color:#b44a42; }
.draft-history-menu-entry { display:flex; align-items:center; justify-content:space-between; gap:18px; width:calc(100% - 12px); margin:6px; text-align:left; }
.draft-history-menu-entry small { color:#8997ab; font-size:11px; font-weight:500; }
.draft-history-backdrop { position:fixed; z-index:10030; inset:0; display:grid; place-items:center; padding:24px; background:rgba(22,35,55,.38); backdrop-filter:blur(3px); }
.draft-history-dialog { width:min(560px,100%); max-height:min(680px,calc(100vh - 48px)); overflow:hidden; border:1px solid #dce4ef; border-radius:18px; background:#fff; box-shadow:0 24px 70px rgba(24,45,77,.2); }
.draft-history-header { display:flex; align-items:flex-start; justify-content:space-between; padding:22px 24px 18px; border-bottom:1px solid #e8edf4; }
.draft-history-header span { color:#2f6df6; font-size:12px; font-weight:800; }
.draft-history-header h2 { margin:3px 0 4px; color:#172a46; font-size:22px; }
.draft-history-header p,.draft-history-footer { margin:0; color:#77859a; font-size:13px; }
.draft-history-close { display:grid; width:34px; height:34px; padding:0; place-items:center; border:0; border-radius:9px; background:#f2f5f9; color:#64748b; font-size:22px; cursor:pointer; }
.draft-history-list { display:grid; gap:8px; max-height:430px; overflow:auto; padding:14px 18px; }
.draft-history-item { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:66px; padding:10px 12px 10px 16px; border:1px solid #e2e8f1; border-radius:12px; background:#fbfcfe; }
.draft-history-item>div,.draft-history-empty { display:grid; gap:4px; }
.draft-history-item strong,.draft-history-empty strong { color:#233752; }
.draft-history-item span,.draft-history-empty span { color:#7a889d; font-size:12px; }
.draft-history-empty { justify-items:center; padding:42px 20px; text-align:center; }
.draft-history-footer { padding:13px 24px 17px; border-top:1px solid #edf1f6; }
@media (max-width:760px) { .draft-recovery-banner,.draft-recovery-actions { align-items:stretch; flex-direction:column; } .draft-recovery-actions { display:grid; grid-template-columns:1fr 1fr; } .draft-recovery-actions .is-danger-text { grid-column:1/-1; } }
.editor-single-mode-hidden { display:none!important; }
.editor-layer-mode-center {
  position:absolute!important;
  left:50%!important;
  z-index:3;
  transform:translateX(-50%);
}
.editor-layer-status-hidden { display:none!important; }
.editor-format-toolbar-wrap { display:flex!important; flex-wrap:wrap!important; overflow:visible!important; white-space:normal!important; }
.editor-toolbar-overflow-clean { overflow-x:hidden!important; }
@media (max-width:900px) {
  .editor-layer-mode-center {
    position:static!important;
    transform:none;
  }
}
.editor-title-textbox { position:relative; display:flex; align-items:baseline; gap:3px; width:100%; margin:14px 0 10px; color:#172a46; line-height:1.45; }
.editor-title-textbox::after { content:""; position:absolute; right:0; bottom:-7px; left:0; height:2px; border-radius:2px; background:linear-gradient(90deg,#2f6df6 0,#8fb4ff 38%,#e5ecf7 76%,transparent 100%); }
.editor-title-textbox-level-1 { padding-bottom:7px; font-size:24px; font-weight:800; }
.editor-title-textbox-level-2 { padding-bottom:5px; font-size:20px; font-weight:750; }
.editor-title-textbox-level-2::after { right:30%; height:2px; }
.editor-title-textbox-level-3 { gap:5px; padding:1px 0 3px 11px; font-size:17px; font-weight:700; }
.editor-title-textbox-level-3::before { content:""; position:absolute; top:3px; bottom:3px; left:0; width:3px; border-radius:4px; background:#2f6df6; }
.editor-title-textbox-level-3::after { display:none; }
.editor-title-number { color:#2f6df6; white-space:pre; }
.title-textbox-backdrop { position:fixed; z-index:10040; inset:0; display:grid; place-items:center; padding:24px; background:rgba(22,35,55,.38); backdrop-filter:blur(3px); }
.title-textbox-dialog { width:min(620px,100%); overflow:hidden; border:1px solid #dce4ef; border-radius:18px; background:#fff; box-shadow:0 24px 70px rgba(24,45,77,.2); }
.title-textbox-dialog>header { display:flex; align-items:flex-start; justify-content:space-between; padding:22px 24px 18px; border-bottom:1px solid #e8edf4; }
.title-textbox-dialog>header span { color:#2f6df6; font-size:12px; font-weight:800; }
.title-textbox-dialog>header h2 { margin:3px 0 4px; color:#172a46; font-size:22px; }
.title-textbox-dialog>header p { margin:0; color:#77859a; font-size:13px; }
.title-textbox-dialog>header button { display:grid; width:34px; height:34px; padding:0; place-items:center; border:0; border-radius:9px; background:#f2f5f9; color:#64748b; font-size:22px; cursor:pointer; }
.title-textbox-form { display:grid; gap:18px; padding:20px 24px; }
.title-textbox-form label>span,.title-textbox-form legend { display:block; margin-bottom:7px; color:#43546d; font-size:13px; font-weight:700; }
.title-textbox-form input[type="text"] { width:100%; height:44px; padding:0 13px; border:1px solid #d4deec; border-radius:10px; color:#172a46; font:inherit; outline:none; }
.title-textbox-form input[type="text"]:focus { border-color:#2f6df6; box-shadow:0 0 0 3px rgba(47,109,246,.12); }
.title-textbox-form input.is-invalid { border-color:#d64f48; }
.title-textbox-form fieldset { min-width:0; margin:0; padding:0; border:0; }
.title-textbox-levels { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.title-textbox-levels button { display:grid; gap:3px; padding:12px 13px; border:1px solid #dbe3ee; border-radius:11px; background:#fbfcfe; color:#33465f; text-align:left; cursor:pointer; }
.title-textbox-levels button.is-active { border-color:#2f6df6; background:#f3f7ff; box-shadow:inset 0 0 0 1px #2f6df6; color:#1f5ed7; }
.title-textbox-levels small { color:#8794a7; }
.title-textbox-numbering { display:flex!important; align-items:center; gap:10px; padding:11px 13px; border:1px solid #e0e7f0; border-radius:11px; background:#fafbfd; cursor:pointer; }
.title-textbox-numbering input { width:18px; height:18px; accent-color:#2f6df6; }
.title-textbox-numbering>span { display:grid!important; gap:2px; margin:0!important; }
.title-textbox-numbering small { color:#8794a7; font-weight:500; }
.title-textbox-preview { padding:13px 16px 15px; border:1px dashed #cdd9eb; border-radius:12px; background:#fbfcff; }
.title-textbox-preview>span { color:#8794a7; font-size:12px; }
.title-textbox-preview .editor-title-textbox { margin:8px 0 4px; }
.title-textbox-dialog>footer { display:flex; justify-content:flex-end; gap:9px; padding:14px 24px 20px; border-top:1px solid #edf1f6; }
.title-textbox-dialog>footer button { min-height:38px; padding:0 17px; border:1px solid #d4deec; border-radius:9px; background:#fff; color:#32445f; font:inherit; font-weight:700; cursor:pointer; }
.title-textbox-dialog>footer .is-primary { border-color:#2f6df6; background:#2f6df6; color:#fff; }
@media (max-width:640px) { .title-textbox-levels { grid-template-columns:1fr; } .title-textbox-dialog { max-height:calc(100vh - 32px); overflow:auto; } }
.title-textbox-modes { display:inline-flex; width:max-content; padding:4px; border-radius:11px; background:#edf2f8; }
.title-textbox-modes button { min-height:34px; padding:0 16px; border:0; border-radius:8px; background:transparent; color:#586982; font:inherit; font-weight:700; cursor:pointer; }
.title-textbox-modes button.is-active { background:#fff; color:#2462db; box-shadow:0 3px 10px rgba(48,78,120,.12); }
.title-textbox-form.is-free-mode fieldset,
.title-textbox-form.is-free-mode .title-textbox-numbering { display:none!important; }
.editor-free-textbox { width:100%; min-height:42px; margin:10px 0; padding:9px 12px; border:1px solid #d8e1ed; border-radius:8px; background:#fff; color:#243750; font-size:16px; line-height:1.65; box-shadow:inset 3px 0 0 #8eaff2; }
.title-textbox-preview .editor-free-textbox { margin:8px 0 2px; }
.module-split-action { display:inline-flex; align-items:stretch; vertical-align:middle; }
.module-split-action>button:first-child { border-top-right-radius:0!important; border-bottom-right-radius:0!important; }
.module-split-action .module-split-create { display:grid; width:42px; min-width:42px; padding:0!important; place-items:center; border-left:0!important; border-top-left-radius:0!important; border-bottom-left-radius:0!important; background:#f2f7ff!important; color:#2162dc!important; font-size:22px!important; font-weight:500!important; }
.module-split-action .module-split-create:hover { background:#e6efff!important; }
.module-create-source-trigger { display:none!important; }
.module-create-inside-reference { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:38px; padding:0 15px; border:1px solid #9fdac8; border-radius:9px; background:#eefaf6; color:#167a61; font:inherit; font-weight:700; cursor:pointer; }
.module-create-inside-reference:hover { background:#e1f6ef; }
.module-create-inside-reference>span { font-size:18px; font-weight:500; }

dialog.editor-lab-dialog.editor-mindmap-dialog,
dialog.editor-lab-dialog.editor-mindmap-dialog form { overflow:hidden!important; scrollbar-width:none; }
dialog.editor-lab-dialog.editor-mindmap-dialog::-webkit-scrollbar,
dialog.editor-lab-dialog.editor-mindmap-dialog form::-webkit-scrollbar { display:none; }

/* Preview is a clean paged reading surface; editing chrome must not reappear through later overrides. */
.editor-lab.is-preview-mode .editor-lab-toolbar,
.editor-lab.is-preview-mode .editor-version-bar { display:none!important; }
.editor-lab.is-preview-mode .editor-auto-page-gap,
.editor-lab.is-preview-mode .editor-question-page-gap,
.editor-lab.is-preview-mode .editor-page-break { visibility:visible!important; opacity:1!important; }
.editor-lab.is-preview-mode .editor-auto-page-gap { display:block!important; }

/* File properties stay editable on both the editing and preview surfaces. */
.editor-file-identity-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; min-width:0; }
.editor-file-identity-row > h1 { min-width:120px; cursor:text; border-radius:5px; }
.editor-file-classification { display:flex; flex-wrap:wrap; gap:6px; }
.editor-file-classification select { height:32px; max-width:145px; padding:0 24px 0 8px; border:1px solid #dce4f0; border-radius:6px; background:#f8faff; color:#52627a; font:inherit; font-size:12px; }
.editor-file-name-input { box-sizing:border-box; width:100%; min-width:180px; padding:3px 7px; border:1px solid var(--primary); border-radius:5px; color:inherit; background:#fff; font:inherit; line-height:1.25; }
.editor-file-name-input:focus-visible, [data-editor-file-title]:focus-visible, .editor-file-classification select:focus-visible { outline:2px solid #b5cafa; outline-offset:2px; }
.editor-lab-header [hidden] { display:none!important; }
.editor-lab.is-preview-mode .editor-document-type,
.editor-lab.is-preview-mode [data-preview-entry] { display:none!important; }
.editor-lab:not(.is-preview-mode) .editor-lab-header [data-direct-export] { display:none!important; }
.editor-lab-header [data-direct-export] { min-height:42px!important; padding:0 20px!important; border:1px solid var(--primary); border-radius:10px!important; background:var(--primary); color:#fff; font:inherit; font-weight:700; cursor:pointer; }

/* The native popover top layer places More above sticky preview/tool bars. */
.editor-lab-exit-popover[popover] { position:fixed; inset:auto; margin:0; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; }
.editor-lab-exit-popover[popover]:not(:popover-open) { display:none!important; }
.editor-lab-exit-popover[popover]:popover-open { display:grid; }

/* Preview-only presentation: keep the editing surface and other pages unchanged. */
.editor-lab:not(.is-preview-mode) .editor-file-classification,
.editor-lab:not(.is-preview-mode) .editor-preview-back,
.editor-lab.is-preview-mode .editor-lab-back,
.editor-lab.is-preview-mode .editor-lab-exit-menu { display:none!important; }
.editor-lab.is-preview-mode .editor-file-classification { gap:10px; }
.editor-lab.is-preview-mode .editor-file-select { position:relative; display:flex; align-items:center; gap:8px; height:42px; padding:0 13px; border:1px solid #cfdbea; border-radius:10px; background:#fff; transition:border-color .18s ease, box-shadow .18s ease; }
.editor-lab.is-preview-mode .editor-file-select > span { color:#172138; font-size:13px; font-weight:400; white-space:nowrap; }
.editor-lab.is-preview-mode .editor-file-select::after { content:""; position:absolute; right:14px; top:16px; width:6px; height:6px; border-right:1.5px solid #70809b; border-bottom:1.5px solid #70809b; transform:rotate(45deg); pointer-events:none; }
.editor-lab.is-preview-mode .editor-file-select select { appearance:none; height:40px; min-width:76px; max-width:none; padding:0 23px 0 0; border:0; border-radius:0; background:transparent; color:#172138; font-size:14px; font-weight:400; cursor:pointer; outline:0; box-shadow:none; }
.editor-lab.is-preview-mode .editor-file-select.is-empty select { color:#8a96a8; }
.editor-lab.is-preview-mode .editor-file-select select option { color:#172138; font-weight:400; }
.editor-lab.is-preview-mode .editor-file-select select option[value=""] { color:#8a96a8; }
.editor-lab.is-preview-mode .editor-file-select select[data-editor-file-season] { min-width:119px; }
.editor-lab.is-preview-mode .editor-file-select:hover { border-color:#99b4df; }
.editor-lab.is-preview-mode .editor-file-select:focus-within { border-color:#6f98ee; box-shadow:0 0 0 3px rgb(47 109 246 / 9%); }
.editor-lab.is-preview-mode .editor-preview-back { min-height:42px; padding:0 20px; border:1px solid #cfdbea; border-radius:10px; background:#f8faff; color:#344159; font:inherit; font-weight:600; cursor:pointer; transition:background .18s ease,border-color .18s ease; }
.editor-lab.is-preview-mode .editor-preview-back:hover { border-color:#99b4df; background:#edf3ff; }
.editor-lab.is-preview-mode .editor-preview-back:focus-visible { outline:2px solid #6f98ee; outline-offset:3px; }
.editor-lab.is-preview-mode .editor-ref-extra,
.editor-lab.is-preview-mode .editor-temp-question-extra { margin:14px 0 0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.editor-lab.is-preview-mode .editor-ref-extra > .editor-inline-question-field { border:0; outline:0; background:transparent; box-shadow:none; }

/* Highlight the reference label only; selection keeps its original appearance. */
.qm-list .qm-list-item.is-referenced .qm-list-meta > span:last-child { color:#186447; background:#e8f5ed; }
#editor-lab-export-confirm .editor-export-confirm { align-items:flex-start; gap:10px; }
#editor-lab-export-confirm .editor-export-confirm input { flex:none; margin-top:4px; }
#editor-lab-export-confirm .editor-export-confirm span { line-height:1.7; }

/* Question-management knowledge tree: grouped cards and clear nesting. */
.qm-workspace .qm-knowledge-panel { border:1px solid #dce4ef; border-radius:16px; background:#f3f6fa; box-shadow:0 6px 20px rgb(42 64 101 / 4%); }
.qm-workspace .qm-knowledge-panel > header { min-height:80px; padding:16px; background:#f8fafd; border-bottom-color:#dbe4f0; }
.qm-workspace .qm-knowledge-panel h2 { display:flex; align-items:center; gap:10px; color:#14253c; font-size:18px; font-weight:700; }
.qm-workspace .qm-knowledge-icon { flex:none; width:18px; height:18px; color:#7c8da8; }
.qm-workspace .qm-knowledge-panel > header p { margin-top:6px; color:#72829c; font-size:12px; }
.qm-workspace .qm-knowledge-panel > header > button { flex:none; min-height:36px; padding:0 11px; border-radius:8px; font-size:16px; font-weight:600; }
.qm-workspace .qm-knowledge-tree { padding:14px 12px 22px; background:#f3f6fa; scrollbar-width:thin; }
.qm-workspace .qm-knowledge-root { margin:0 0 12px; padding:10px; border:1px solid #d6e2f2; border-radius:13px; background:#fff; box-shadow:0 6px 16px rgb(46 69 105 / 3%); }
.qm-workspace .qm-knowledge-root:last-child { margin-bottom:0; }
.qm-workspace .qm-knowledge-root h3 { display:flex; align-items:center; gap:9px; margin:0 0 8px; padding:10px 9px 13px; border-bottom:1px solid #e0e8f3; color:#172a42; font-size:16px; line-height:1.4; }
.qm-workspace .qm-knowledge-root h3::before { content:""; flex:none; width:4px; height:21px; border-radius:3px; background:#3370ff; }
.qm-workspace .qm-knowledge-root h3 > span { flex:1; }
.qm-workspace .qm-knowledge-root h3 > small { flex:none; color:#8492a6; font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; }
.qm-workspace .qm-knowledge-root details { margin:0 0 3px; }
.qm-workspace .qm-knowledge-root summary { min-height:40px; padding:9px 10px; border-radius:9px; color:#4f6079; font-size:13px; line-height:1.55; transition:background .15s ease,color .15s ease; }
.qm-workspace .qm-knowledge-root summary::-webkit-details-marker { display:none; }
.qm-workspace .qm-knowledge-root summary:hover { color:#2864db; background:#f3f7ff; }
.qm-workspace .qm-knowledge-root details[open] > summary { color:#4f6079; background:transparent; }
.qm-workspace .qm-knowledge-root details > div { gap:2px; padding:4px 0 4px 12px; }
.qm-workspace .qm-knowledge-root button { min-height:35px; padding:7px 10px; border-radius:6px; font-size:12px; line-height:1.6; }
.qm-workspace .qm-knowledge-root button span { white-space:normal; overflow-wrap:anywhere; }
.qm-workspace .qm-knowledge-root button.active { color:#145fe2; background:#eaf1ff; box-shadow:inset 3px 0 #3370ff; font-weight:800; }
.qm-workspace .qm-knowledge-root summary em,
.qm-workspace .qm-knowledge-root button em { flex:none; color:#8494ab; font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; }
.qm-workspace .qm-knowledge-root summary:focus-visible,
.qm-workspace .qm-knowledge-root button:focus-visible,
.qm-workspace .qm-knowledge-panel > header > button:focus-visible { outline:2px solid #91b2f5; outline-offset:2px; }

/* Multi-reference selection and independent read-only preview. */
#editor-lab-picker { width:min(1240px,calc(100vw - 40px))!important; }
#editor-lab-picker form { height:min(850px,calc(100dvh - 48px)); overflow:hidden; grid-template-rows:auto auto auto minmax(0,1fr) auto; }
#editor-lab-picker .reference-picker-search { display:flex; gap:12px; padding:18px 22px 12px; }
#editor-lab-picker .reference-picker-search input { flex:1; min-width:0; background:#f7f9fc; }
#editor-lab-picker .reference-picker-search button { flex:none; padding:0 16px; border:1px solid #dce5f1; border-radius:10px; color:#526581; background:#fff; }
#editor-lab-picker .editor-picker-filters { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; padding:0 22px 18px; border-bottom:1px solid #e5ebf3; }
#editor-lab-picker .editor-picker-filters label { display:grid; gap:7px; min-width:0; color:#657690; font-size:12px; font-weight:600; }
#editor-lab-picker select { min-width:0; font-size:13px; text-overflow:ellipsis; }
#editor-lab-picker .reference-picker-workspace { display:grid; min-height:0; grid-template-columns:minmax(0,1fr); }
#editor-lab-picker.has-reference-preview .reference-picker-workspace { grid-template-columns:minmax(260px,0.9fr) minmax(0,1.3fr); }
#editor-lab-picker .editor-picker-list { min-height:0; max-height:none; padding:8px 18px; overflow:auto; }
#editor-lab-picker .reference-pick-row { display:flex; gap:12px; align-items:flex-start; padding:14px 10px; border-bottom:1px solid #edf1f6; border-radius:8px; }
#editor-lab-picker .reference-pick-row:hover { background:#f7f9fd; }
#editor-lab-picker .reference-pick-row.is-checked { background:#f2f7ff; }
#editor-lab-picker .reference-pick-row.is-previewing { box-shadow:inset 3px 0 #3370ff; }
#editor-lab-picker input[type=checkbox] { width:18px; height:18px; flex:none; margin:4px 0 0; accent-color:#3370ff; cursor:pointer; }
#editor-lab-picker [data-picker-preview-id] { display:grid; gap:7px; flex:1; min-width:0; padding:0; border:0; background:transparent; text-align:left; color:#263952; cursor:pointer; font:inherit; }
#editor-lab-picker [data-picker-preview-id] strong { font-size:15px; line-height:1.6; }
#editor-lab-picker [data-picker-preview-id] span { color:#61738d; font-size:12px; line-height:1.6; }
#editor-lab-picker [data-picker-preview-id] small { font-size:11px; color:#8391a5; overflow-wrap:anywhere; }
#editor-lab-picker .reference-pick-repair { display:inline-flex; align-items:center; min-height:22px; margin-left:8px; padding:0 7px; border:1px solid #ffd2c9; border-radius:999px; background:#fff2ef; color:#c54e39; font-size:11px; font-weight:800; vertical-align:middle; }
#editor-lab-picker .reference-pick-record { display:block; padding:6px 9px; border-radius:7px; background:#f4f7fb; color:#61738d!important; }
#editor-lab-picker [data-picker-preview] { display:flex; flex-direction:column; min-width:0; min-height:0; border-left:1px solid #e0e8f2; background:#f6f8fc; }
#editor-lab-picker [data-picker-preview][hidden] { display:none; }
#editor-lab-picker .reference-preview-heading { display:flex; align-items:center; justify-content:space-between; padding:10px 20px; border-bottom:1px solid #e2e9f2; color:#3b5579; font-size:13px; }
#editor-lab-picker .reference-preview-heading button { border:0; border-radius:6px; background:#eaf0f9; font-size:20px; color:#566985; width:30px; height:30px; }
#editor-lab-picker .reference-preview-content { overflow:auto; min-height:0; margin:12px; padding:20px; background:white; color:#24344b; font-size:14px; line-height:1.85; overflow-wrap:anywhere; }
#editor-lab-picker .reference-preview-content h2 { font-size:19px; margin:0 0 18px; }
#editor-lab-picker .reference-preview-content h3 { font-size:15px; }
#editor-lab-picker .reference-preview-content section { margin:16px 0; }
#editor-lab-picker .reference-preview-content img { max-width:100%; height:auto; }
#editor-lab-picker .reference-preview-content .editor-ref-body { padding:0; }
#editor-lab-picker .reference-preview-content [contenteditable=false] { min-height:0; outline:0; border:0; }
#editor-lab-picker .reference-preview-options > div { display:flex; align-items:baseline; gap:8px; }
#editor-lab-picker .reference-preview-options p { margin:4px 0; }
#editor-lab-picker footer { align-items:center; flex-wrap:wrap; }
#editor-lab-picker [data-picker-count] { margin-right:auto; font-size:12px; color:#6d7c92; }
#editor-lab-picker [data-picker-confirm] { background:#3370ff; border:1px solid #3370ff; color:#fff; }
#editor-lab-picker [data-picker-confirm]:disabled { background:#e6ecf5; color:#96a3b5; border-color:#dce4ef; cursor:not-allowed; }
#editor-lab-picker button:focus-visible { outline:2px solid #3370ff; outline-offset:2px; }

/* Account sits in each existing page corner; no extra top navigation row. */
workbench-account { display:block; flex:none; color:#263852; }
.account-control { position:relative; }
.account-trigger { display:flex; align-items:center; gap:10px; min-width:136px; min-height:54px; padding:7px 12px 7px 8px; border:1px solid transparent; border-radius:14px; background:transparent; cursor:pointer; color:#334a68; font:inherit; text-align:left; transition:background .16s ease,border-color .16s ease,box-shadow .16s ease; }
.account-trigger:hover,.account-trigger[aria-expanded="true"] { border-color:#dce6f3; background:#fff; box-shadow:0 8px 22px rgb(35 58 91 / 10%); }
.account-avatar { display:grid; flex:none; place-items:center; width:40px; height:40px; border-radius:50%; background:linear-gradient(145deg,#edf4ff,#dce9ff); color:#285fb7; font-size:17px; font-weight:750; border:1px solid #d3e1f7; box-shadow:inset 0 1px 0 rgb(255 255 255 / 80%); }
.account-identity { min-width:0; height:42px; display:flex; align-items:center; }
.account-identity strong { overflow:hidden; color:#263b58; font-size:14px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.account-identity small { display:none; }
.account-dropdown { position:absolute; top:calc(100% + 8px); right:0; width:174px; padding:8px; border:1px solid #e0e7f0; border-radius:12px; background:#fff; box-shadow:0 12px 30px #24395d24; }
.account-dropdown[hidden] { display:none; }
.account-dropdown > small { display:block; padding:7px 10px; color:#8491a6; font-size:11px; }
.account-dropdown > button { width:100%; display:block; padding:11px 12px; border:0; border-radius:7px; background:transparent; text-align:left; color:#334b6a; font:inherit; font-size:13px; cursor:pointer; }
.account-dropdown > button:hover { background:#eff4fc; }
.account-dropdown > button[data-account-action=logout] { color:#b34545; }
.account-dropdown > button:disabled { opacity:.45; cursor:default; }
.account-dialog { width:min(420px,calc(100vw - 32px)); padding:0; border:1px solid #dfe7f1; border-radius:16px; color:#2c415c; box-shadow:0 20px 70px #23375538; }
.account-dialog::backdrop { background:#21324b66; }
.account-dialog header,.account-dialog footer { display:flex; align-items:center; justify-content:space-between; padding:18px 22px; background:#f8faff; }
.account-dialog header button { width:30px; height:30px; border:0; background:#eaf0f8; color:#5d708d; border-radius:7px; }
.account-dialog footer { justify-content:flex-end; }
.account-dialog footer button { padding:9px 20px; border:1px solid #d6e1ef; border-radius:8px; background:#fff; color:#425d80; }
.account-dialog [data-account-body] { padding:20px 22px; font-size:13px; line-height:1.8; }
.account-dialog dl { display:grid; grid-template-columns:90px 1fr; gap:12px; }
.account-dialog dt { color:#78879b; }
.account-dialog dd { margin:0; }
.account-dialog p { color:#7b899d; }
.account-choices { display:grid; gap:10px; }
.account-choices > button { display:flex; align-items:center; gap:14px; border:1px solid #dce6f4; border-radius:10px; background:#fff; padding:13px; text-align:left; cursor:pointer; color:#2d476b; }
.account-choices > button:hover { background:#f3f7ff; border-color:#aac3ec; }
.account-choices small { display:block; margin-top:4px; color:#8291a5; }
workbench-account button:focus-visible { outline:2px solid #3370ff; outline-offset:2px; }
@media(max-width:1000px) { #editor-lab-picker .editor-picker-filters { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 12px; } }
@media(max-width:620px) {
  #editor-lab-picker { width:calc(100vw - 16px)!important; }
  #editor-lab-picker .editor-picker-filters { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0 14px 12px; }
  #editor-lab-picker.has-reference-preview .reference-picker-workspace { grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); }
  #editor-lab-picker .reference-preview-content { margin:4px; padding:10px; }
  #editor-lab-picker [data-picker-count] { flex-basis:100%; }
}
@media print { .page-account { display:none!important; } }

.app-content { position:relative; }
.has-page-account { position:relative!important; }
.page-account { position:absolute!important; top:24px!important; right:26px!important; z-index:45!important; transform:none!important; }
.has-page-account > .page-account { position:absolute!important; }
.app-content .editor-lab-header { padding-right:176px!important; min-height:88px; }
.app-content .editor-lab-header .editor-lab-status { flex-wrap:wrap; }
.app-content .lecture-home-heading { padding-right:164px; min-height:74px; }
.app-content .qm-search-row { padding-right:176px!important; }
.app-content .import-upload-heading { padding-right:164px; min-height:68px; }
.app-content[data-route="s02"] .review-filters { padding-right:176px!important; }
.app-content[data-route="s05"] .alpha-s05-filter-row,
.app-content[data-route="s06"] .alpha-file-filter-panel { padding-right:176px!important; }

/* Question management: fixed navigation columns with a page-scrolling preview. */
.app-content[data-route="s04"] .qm-toolbar { position:sticky; top:0; z-index:38; border-radius:16px; box-shadow:0 5px 20px rgb(34 52 80 / 7%); }
.app-content[data-route="s04"] .qm-search-row { grid-template-columns:minmax(205px,1.2fr) minmax(165px,.95fr) repeat(3,minmax(120px,.7fr)) minmax(190px,1.08fr) minmax(135px,.78fr) auto; gap:12px; padding:16px 190px 16px 18px!important; align-items:end; }
.app-content[data-route="s04"] .qm-search-row label { gap:7px; color:#435774; font-size:12px; font-weight:700; }
.app-content[data-route="s04"] .qm-search-row input,
.app-content[data-route="s04"] .qm-search-row select { height:44px; padding:0 13px; border-color:#cfdbea; border-radius:10px; font-size:13px; font-weight:650; }
.app-content[data-route="s04"] .qm-search-row > .button { width:96px; min-width:0!important; height:44px!important; min-height:44px!important; padding:0 13px!important; align-self:end; justify-self:start; border:1px solid #cfdbea; border-radius:10px!important; background:#fff; color:#253750; box-shadow:none; font-weight:650; }
.app-content[data-route="s04"] .qm-search-row > .button::before { content:none; }
.app-content[data-route="s04"] .qm-search-row > .button:hover { border-color:#91afe0; background:#fff; color:#253750; box-shadow:0 0 0 3px rgb(51 112 255 / 8%); }
.app-content[data-route="s04"] .qm-grid { align-items:start; }
.app-content[data-route="s04"] .qm-knowledge-panel,
.app-content[data-route="s04"] .qm-list-panel { position:sticky; top:126px; height:calc(100vh - 142px); min-height:620px; display:grid; }
.app-content[data-route="s04"] .qm-knowledge-panel { grid-template-rows:auto minmax(0,1fr); }
.app-content[data-route="s04"] .qm-list-panel { grid-template-rows:auto minmax(0,1fr) auto; }
.app-content[data-route="s04"] .qm-knowledge-tree,
.app-content[data-route="s04"] .qm-list { min-height:0; height:auto; max-height:none; overflow-y:auto; }
.app-content[data-route="s04"] .qm-detail-panel { overflow:visible; }
.app-content[data-route="s04"] .qm-detail-scroll { height:auto; min-height:calc(100vh - 216px); max-height:none; overflow:visible; }
.app-content[data-route="s04"] .qm-detail-empty { min-height:calc(100vh - 216px); }
.app-content[data-route="s04"] .qm-index-layout { display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:18px; align-items:end; margin-top:13px; }
.app-content[data-route="s04"] .qm-index-layout .qm-knowledge-field { margin-top:0; }

/* Roomier structured question editor with source imagery as the primary reference. */
.qm-modal { width:min(1500px,calc(100vw - 32px)); max-height:calc(100vh - 32px); }
.qm-modal-body { grid-template-columns:minmax(500px,.95fr) minmax(650px,1.05fr); }
.qm-modal-source-scroll figure img { max-height:none; background:#fff; }
.qm-edit-meta { grid-template-columns:minmax(0,1fr) minmax(190px,.32fr); gap:10px 12px; }
.qm-edit-meta .qm-edit-title { grid-column:auto; }
.qm-formatbar { position:static; }
.qm-modal textarea[name="stem"] { min-height:440px; line-height:1.75; }
.qm-modal textarea[name="answer"] { min-height:120px; line-height:1.7; }
.qm-modal textarea[name="analysis"] { min-height:600px; line-height:1.75; }
.qm-question-switcher { display:flex; align-items:center; gap:8px; }
.qm-question-switcher button { height:34px; min-width:68px; padding:0 12px; border:1px solid #d5dfed; border-radius:8px; background:#fff; color:#365171; font:inherit; font-weight:700; cursor:pointer; }
.qm-question-switcher button:hover:not(:disabled) { border-color:#8fb0eb; background:#f4f7ff; color:#2464dc; }
.qm-question-switcher button:disabled { color:#a6b1c0; background:#f5f7fa; cursor:not-allowed; }
.qm-question-switcher span { min-width:52px; color:#78879c; text-align:center; font-size:12px; font-weight:700; }

.qm-rich-source { display:none!important; }
.qm-tiptap-surface { width:100%; overflow:auto; border:1px solid #d1dae8; border-radius:10px; background:#fff; box-shadow:inset 0 1px 2px rgb(26 45 72 / 3%); transition:border-color .15s ease,box-shadow .15s ease; }
.qm-tiptap-surface:focus-within { border-color:#5d86e6; box-shadow:0 0 0 3px rgb(55 111 238 / 12%); }
.qm-tiptap-surface .qm-question-prosemirror { min-height:100%; padding:16px 18px; color:#172840; font-size:14px; font-weight:400; line-height:1.8; outline:0; }
.qm-tiptap-surface[data-field="stem"] { min-height:440px; max-height:620px; }
.qm-tiptap-surface[data-field="analysis"] { min-height:600px; max-height:760px; }
.qm-tiptap-surface[data-field="answer"] { min-height:130px; max-height:300px; }
.qm-tiptap-surface[data-field^="option_"] { min-height:92px; max-height:220px; }
.qm-tiptap-surface .ProseMirror p { margin:0 0 10px; }
.qm-tiptap-surface .ProseMirror h2 { margin:16px 0 10px; font-size:20px; }
.qm-tiptap-surface .ProseMirror h3 { margin:14px 0 8px; font-size:17px; }
.qm-tiptap-surface .ProseMirror blockquote { margin:12px 0; padding:8px 14px; border-left:3px solid #7fa5ea; background:#f5f8fe; color:#425775; }
.qm-tiptap-surface .ProseMirror table { width:100%; border-collapse:collapse; margin:12px 0; }
.qm-tiptap-surface .ProseMirror th,.qm-tiptap-surface .ProseMirror td { min-width:90px; padding:8px; border:1px solid #d4deec; }
.qm-tiptap-surface .ProseMirror img { display:block; max-width:100%; max-height:520px; margin:14px auto; border-radius:8px; object-fit:contain; cursor:pointer; pointer-events:auto; user-select:none; }
.editor-lab-prosemirror img { display:block; cursor:pointer; pointer-events:auto; user-select:none; }
.editor-lab-prosemirror img.ProseMirror-selectednode,
.qm-tiptap-surface .ProseMirror img.ProseMirror-selectednode { outline:2px solid #3370ff; outline-offset:3px; box-shadow:0 0 0 5px rgb(51 112 255 / 12%); }
.editor-inline-question-field img { cursor:pointer; pointer-events:auto; user-select:none; }
.editor-inline-question-field img.is-selected { outline:2px solid #3370ff; outline-offset:3px; box-shadow:0 0 0 5px rgb(51 112 255 / 12%); }
.editor-lab-prosemirror img[style*="text-align: left"],
.qm-tiptap-surface .ProseMirror img[style*="text-align: left"] { margin-left:0; margin-right:auto; }
.editor-lab-prosemirror img[style*="text-align: center"],
.qm-tiptap-surface .ProseMirror img[style*="text-align: center"] { margin-left:auto; margin-right:auto; }
.editor-lab-prosemirror img[style*="text-align: right"],
.qm-tiptap-surface .ProseMirror img[style*="text-align: right"] { margin-left:auto; margin-right:0; }
.editor-lab-prosemirror img[style*="text-align: justify"],
.qm-tiptap-surface .ProseMirror img[style*="text-align: justify"] { width:100%; }
.editor-lab-prosemirror table[style*="text-align: left"],
.qm-tiptap-surface .ProseMirror table[style*="text-align: left"] { width:fit-content; min-width:60%; margin-left:0; margin-right:auto; }
.editor-lab-prosemirror table[style*="text-align: center"],
.qm-tiptap-surface .ProseMirror table[style*="text-align: center"] { width:fit-content; min-width:60%; margin-left:auto; margin-right:auto; }
.editor-lab-prosemirror table[style*="text-align: right"],
.qm-tiptap-surface .ProseMirror table[style*="text-align: right"] { width:fit-content; min-width:60%; margin-left:auto; margin-right:0; }
.editor-lab-prosemirror table[style*="text-align: justify"],
.qm-tiptap-surface .ProseMirror table[style*="text-align: justify"] { width:100%; }
.qm-tiptap-surface .editor-formula { margin:0 3px; border-radius:5px; }

/* The source comparison is deliberately landscape: source pages and the
   structured result both need readable line lengths at the same time. */
dialog.editor-lab-dialog.editor-question-source-dialog { width:min(1500px,calc(100vw - 32px))!important; max-width:none!important; max-height:calc(100vh - 32px)!important; border-radius:20px!important; }
dialog.editor-lab-dialog.editor-question-source-dialog > form { width:100%; height:min(920px,calc(100vh - 32px)); }

@media (max-width:1600px) {
  .app-content[data-route="s04"] .qm-search-row { grid-template-columns:repeat(4,minmax(0,1fr)); padding-right:190px!important; }
  .app-content[data-route="s04"] .qm-keyword,
  .app-content[data-route="s04"] .qm-source-filter { grid-column:auto; }
}

/* Stable, viewport-bottom document status and view controls. */
.editor-lab { padding-bottom:76px!important; }
.editor-document-status { position:fixed; left:248px; right:0; bottom:0; z-index:42; min-height:54px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 20px; border-top:1px solid #dce5f0; background:#f8fafd; color:#73829a; box-shadow:0 -3px 12px #233f6508; font-size:12px; }
.function-sidebar-collapsed .editor-document-status { left:76px; }
.editor-document-metrics { display:flex; align-items:center; flex-wrap:wrap; gap:12px; min-width:0; }
.editor-document-metrics > strong:first-child { color:#2f6de2; white-space:nowrap; }
.editor-document-metrics > strong:nth-child(2) { color:#18785f; }
.editor-document-view { display:flex; align-items:center; gap:7px; flex:none; }
.editor-document-view > span { margin:0 3px 0 8px; font-weight:600; }
.editor-document-view button,.editor-document-view select { height:34px; min-width:34px; padding:0 10px; border:1px solid #d7e1ef; border-radius:7px; background:#fff; color:#3d4e68; font:inherit; cursor:pointer; }
.editor-document-view select { min-width:82px; font-size:14px; }
.editor-document-view button:hover { background:#edf3ff; color:#2863ce; }
.editor-document-view button:disabled { opacity:.45; cursor:not-allowed; }
.editor-document-view button:focus-visible,.editor-document-view select:focus-visible { outline:2px solid #7ea5f3; outline-offset:2px; }
.editor-lab.is-preview-mode .editor-document-view [data-editor-command="pageBreak"] { display:none; }
.editor-lab.is-document-pack .editor-document-metrics > span { display:none; }
@media(max-width:1050px) { .editor-document-metrics > span { display:none; } }
@media(max-width:650px) { .editor-document-status { padding:7px 10px; flex-wrap:wrap; gap:7px; } .editor-document-metrics { gap:8px; } }
@media print { .editor-document-status { display:none!important; } }

/* My files: compact pale filter surface and a clear table header. */
.lecture-home .lecture-home-filters { grid-template-columns:minmax(210px,2.3fr) repeat(3,minmax(95px,.85fr)) auto; gap:12px; padding:16px; border:1px solid #dce5f1; border-radius:11px; box-shadow:none; background:#f8faff; margin-bottom:22px; }
.lecture-home .lecture-home-filters label { gap:8px; color:#4b607c; font-size:13px; font-weight:650; }
.lecture-home .lecture-home-filters input,
.lecture-home .lecture-home-filters select { height:44px; min-height:44px; padding:0 12px; border:1px solid #cad7e9; border-radius:8px; background:#fff; color:#223751; font-size:14px; }
.lecture-home .lecture-home-filters > button { height:44px; min-height:44px; padding:0 16px; border:1px solid #d0dced; border-radius:8px; font-size:14px; color:#425877; }
.lecture-home .lecture-home-list-head { min-height:48px; padding:0 16px; border-top:1px solid #dce4ef; border-bottom:1px solid #d4deeb; border-radius:8px 8px 0 0; background:#f0f4f9; color:#415b7d; font-size:14px; font-weight:700; }
.lecture-home .lecture-home-row { min-height:78px; padding:12px 16px; background:#fff; border-bottom:1px solid #e7edf5; }
.lecture-home .lecture-home-row:hover { background:#f5f8fd; }
.lecture-home .lecture-home-name strong { font-size:14px; color:#162c47; }
.lecture-home .lecture-home-name small { font-size:12px; margin-top:5px; }
.lecture-home .lecture-home-cell { color:#647b9a; font-size:13px; }
.lecture-home .lecture-export-list { border:0; border-radius:8px; overflow:hidden; }
.lecture-home .lecture-export-head,.lecture-home .lecture-export-row { grid-template-columns:minmax(0,2.8fr) minmax(78px,.65fr) minmax(96px,.8fr) 72px; gap:16px; padding:0 16px; }
.lecture-home .lecture-export-head { min-height:48px; border-top:1px solid #dce4ef; border-bottom:1px solid #d4deeb; border-radius:8px 8px 0 0; background:#f0f4f9; color:#415b7d; font-size:14px; font-weight:700; }
.lecture-home .lecture-export-row { min-height:78px; padding-top:12px; padding-bottom:12px; border-top:0; border-bottom:1px solid #e7edf5; border-radius:0 0 8px 8px; background:#fff; color:#647b9a; font-size:13px; }
.lecture-home .lecture-export-row:hover { background:#f5f8fd; }
.lecture-home .lecture-export-row > div { min-width:0; display:grid; grid-template-columns:42px minmax(0,1fr); column-gap:12px; align-items:center; }
.lecture-home .lecture-export-row > div::before { content:"文件"; grid-row:1 / 3; display:grid; place-items:center; width:42px; min-height:48px; border-radius:9px; background:#e8efff; color:#2d69e6; font-size:12px; font-weight:700; }
.lecture-home .lecture-export-row strong { grid-column:2; min-width:0; color:#162c47; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.lecture-home .lecture-export-row small { grid-column:2; margin-top:5px; color:#7b8da5; font-size:12px; line-height:1.5; }
.lecture-home .lecture-export-row > span:not(.lecture-home-state) { font-size:13px; line-height:1.6; font-variant-numeric:tabular-nums; }
.lecture-home .lecture-export-row > .lecture-home-link { min-height:34px; padding:6px 12px; border:1px solid #d5e0f0; border-radius:8px; background:#fff; color:#356dcc; font-size:13px; }
.lecture-home .lecture-export-row > .lecture-home-link:hover { background:#edf3ff; border-color:#adc5ee; }
@media(max-width:1000px) {
  .lecture-home .lecture-export-head,.lecture-home .lecture-export-row { grid-template-columns:minmax(150px,1fr) 66px 82px 56px; gap:8px; padding-left:10px; padding-right:10px; }
  .lecture-home .lecture-export-row > div { grid-template-columns:32px minmax(0,1fr); column-gap:8px; }
  .lecture-home .lecture-export-row > div::before { width:32px; min-height:40px; font-size:11px; }
  .lecture-home .lecture-export-row > .lecture-home-link { padding:6px 8px; }
}
.lecture-home .lecture-home-list-head,.lecture-home .lecture-home-row { grid-template-columns:minmax(220px,2.3fr) minmax(85px,.85fr) minmax(105px,1fr) minmax(92px,.8fr) minmax(58px,.55fr) 32px; gap:12px; }
@media(max-width:1200px) {
  .lecture-home .lecture-home-filters { grid-template-columns:repeat(3,minmax(0,1fr)) auto; }
  .lecture-home .lecture-home-search { grid-column:1 / -1; }
  .lecture-home .lecture-home-filters label:nth-of-type(4) { display:grid; }
  .lecture-home .lecture-home-list-head,.lecture-home .lecture-home-row { grid-template-columns:minmax(170px,1.6fr) minmax(95px,1fr) minmax(85px,.8fr) 30px; }
  .lecture-home .lecture-home-list-head > :nth-child(2),.lecture-home .lecture-home-list-head > :nth-child(5),.lecture-home .lecture-home-row > :nth-child(2),.lecture-home .lecture-home-row > :nth-child(5) { display:none; }
}

/* Unified line icons for the main workspace and My Files navigation. */
.ui-outline-icon { display:block; width:20px; height:20px; }
.function-group-title > span { display:grid; place-items:center; width:38px; height:38px; flex:0 0 38px; border-radius:9px; background:#eef3fa; color:#526985; }
.function-group.active > .function-group-title > span,
.function-group-title.function-group-direct[aria-current="page"] > span { color:#2d6df0; background:#eaf1ff; }
.function-group-title > span .ui-outline-icon { width:21px; height:21px; }
.function-link > span { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; color:#6c7f99; }
.function-link > span .ui-outline-icon { width:18px; height:18px; }
.function-link.active > span { color:#2d6df0; }
.function-group-items { margin:6px 0 0 12px; }
.function-link { gap:10px; padding-left:6px; padding-right:8px; }
.function-group-title strong,
.function-link > b { text-align:left; }
.function-sidebar-collapsed .function-group-title > span { width:38px; height:38px; }
.function-sidebar-collapsed .function-link > span { width:30px; height:30px; }

.lecture-home-nav > span { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; color:#667b98; }
.lecture-home-nav > span .ui-outline-icon { width:20px; height:20px; }
.lecture-home-nav.active > span { color:#2468e8; }
.lecture-home-icon { display:grid!important; place-items:center; width:44px!important; height:50px!important; flex:0 0 44px; border-radius:9px!important; background:#edf3ff!important; color:#2c6be5!important; font-size:0!important; }
.lecture-home-icon.pack { background:#fff4dd!important; color:#a96705!important; }
.lecture-home-icon .ui-outline-icon { width:22px; height:22px; }

/* Import tasks: grouped recent batch and a separate chronological history view. */
.import-unified-panel { border:1px solid #d9e3f0; border-radius:12px; }
.import-record-section-heading { min-height:66px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:0 20px; border-bottom:1px solid #cfdbea; background:#edf4fd; color:#284463; }
.import-record-section-copy { display:flex; align-items:baseline; gap:14px; min-width:0; }
.import-record-section-copy strong { color:#183a60; font-size:16px; font-weight:750; }
.import-record-section-copy span { color:#6d82a1; font-size:13px; }
.import-record-section-meta { display:flex; align-items:center; justify-content:flex-end; gap:16px; color:#486381; font-size:13px; font-variant-numeric:tabular-nums; }
.import-record-section-meta button { min-height:36px; padding:0 14px; border:1px solid #bfcfe4; border-radius:8px; background:#fff; color:#2d64bd; font:inherit; font-weight:650; cursor:pointer; transition:background .18s ease,border-color .18s ease; }
.import-record-section-meta button:hover { background:#f5f8ff; border-color:#8fadd7; }
.import-record-section-meta button:focus-visible { outline:2px solid #3370ff; outline-offset:2px; }
.import-record-table th { height:56px; padding:0 20px; background:#f3f6fa; color:#294767; font-size:14px; font-weight:700; }
.import-record-table td { height:68px; padding:11px 20px; color:#233c59; font-size:14px; }
.import-record-table th:nth-child(1) { width:7%; }
.import-record-table th:nth-child(2) { width:39%; }
.import-record-table th:nth-child(3) { width:18%; }
.import-record-table th:nth-child(4) { width:21%; }
.import-record-table th:nth-child(5) { width:15%; }
.import-record-status { font-weight:700; font-variant-numeric:tabular-nums; }
.import-record-status.tone-primary,
.import-record-status.tone-running,
.import-record-status.tone-warning { color:#2469ef; }
.import-record-status.tone-success { color:#087f5b; }
.import-record-status.tone-danger { color:#d53a32; }
.import-record-table .task-operations .link-button { color:#2369ef; font-size:14px; font-weight:650; }
.import-record-pagination { min-height:70px; border-top:1px solid #e3eaf3; background:#fff; }
@media(max-width:760px) {
  .import-record-section-heading { align-items:flex-start; flex-direction:column; padding:14px; }
  .import-record-section-meta { width:100%; justify-content:space-between; }
  .import-record-table th,.import-record-table td { padding-left:10px; padding-right:10px; font-size:12px; }
}

/* The file name is part of the lecture/exam paper and follows header renaming. */
.editor-paper-document-title { margin:28px 0 32px; color:#122844; font-size:27px; font-weight:750; line-height:1.35; letter-spacing:-.02em; text-align:center; text-wrap:balance; }
.editor-lab.is-preview-mode .editor-paper-document-title { margin-top:30px; }
.editor-duplicate-document-title { display:none!important; }

/* Handout picker: search and filtering match the multi-reference picker. */
#editor-lab-handout-picker { width:min(980px,calc(100vw - 40px))!important; }
#editor-lab-handout-picker form { max-height:min(760px,calc(100dvh - 48px)); display:grid; grid-template-rows:auto auto auto minmax(0,1fr); overflow:hidden; }
#editor-lab-handout-picker .handout-picker-search { padding:18px 22px 10px; }
#editor-lab-handout-picker .handout-picker-search label,
#editor-lab-handout-picker .handout-picker-filters label { display:grid; gap:7px; min-width:0; color:#60738f; font-size:12px; font-weight:650; }
#editor-lab-handout-picker .handout-picker-search input { background:#f8fafd; }
#editor-lab-handout-picker .handout-picker-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; align-items:end; gap:12px; padding:0 22px 18px; border-bottom:1px solid #e3eaf3; }
#editor-lab-handout-picker .handout-picker-filters button { min-height:44px; padding:0 17px; border:1px solid #d0dbea; border-radius:10px; background:#fff; color:#47607f; font:inherit; font-weight:650; cursor:pointer; }
#editor-lab-handout-picker .handout-picker-filters button:hover { border-color:#9cb7de; background:#f4f7fd; }
#editor-lab-handout-picker [data-handout-picker-list] { min-height:0; max-height:none; padding:4px 22px 18px; overflow:auto; }
#editor-lab-handout-picker .editor-handout-picker-item { min-height:104px; align-items:center; padding:16px 10px; border-radius:9px; }
#editor-lab-handout-picker .editor-handout-picker-item:hover { background:#f7f9fd; }
#editor-lab-handout-picker .editor-handout-picker-item > div { display:grid; gap:5px; min-width:0; }
#editor-lab-handout-picker .editor-handout-picker-item strong { color:#18304d; font-size:16px; line-height:1.5; }
#editor-lab-handout-picker .editor-handout-picker-item p { color:#566a85; font-size:13px; }
#editor-lab-handout-picker .editor-handout-picker-item small { color:#8794a7; font-size:12px; }
#editor-lab-handout-picker .editor-handout-picker-item button { min-width:94px; height:40px; border-color:#bcd0ef; border-radius:9px; color:#2865d2; font-size:13px; font-weight:650; }
.editor-handout-empty { display:grid; place-items:center; min-height:220px; color:#8795a9; font-size:14px; }
@media(max-width:700px) {
  #editor-lab-handout-picker .handout-picker-filters { grid-template-columns:1fr 1fr; }
  #editor-lab-handout-picker .editor-handout-picker-item { grid-template-columns:1fr; }
  #editor-lab-handout-picker .editor-handout-picker-item button { grid-column:1; grid-row:auto; justify-self:start; }
}

/* Current upload batch and completed import records. */
.app-shell:not(.function-sidebar-collapsed) { grid-template-columns: 208px minmax(0, 1fr); }
.app-shell:not(.function-sidebar-collapsed) .function-sidebar { padding-left: 10px; padding-right: 10px; }
.app-shell:not(.function-sidebar-collapsed) .function-group-items { margin-left: 0; }
.app-shell:not(.function-sidebar-collapsed) .function-link { gap: 6px; }
.function-link > b, .function-group-title strong { white-space: nowrap; }
.import-record-table.is-current-batch th:nth-child(1) { width:7%; }
.import-record-table.is-current-batch th:nth-child(2) { width:48%; }
.import-record-table.is-current-batch th:nth-child(3) { width:23%; }
.import-record-table.is-current-batch th:nth-child(4) { width:22%; }
.import-record-table.is-completed-history th:nth-child(2) { width:43%; }
.import-record-table.is-completed-history th:nth-child(3) { width:18%; }
.import-record-table.is-completed-history th:nth-child(4) { width:24%; }
.import-record-table.is-completed-history th:nth-child(5) { width:8%; }
.import-upload-progress { display:flex; align-items:center; gap:12px; color:#2469ef; }
.import-upload-progress progress { width:140px; height:8px; border:0; border-radius:4px; overflow:hidden; accent-color:#3370ff; }
.import-upload-progress progress::-webkit-progress-bar { background:#e7edf7; border-radius:4px; }
.import-upload-progress progress::-webkit-progress-value { background:#3370ff; border-radius:4px; }

.import-record-status .tone-success { color:#087f5b; }
.import-record-status .tone-danger { color:#d53a32; }

.app-shell:not(.function-sidebar-collapsed) .function-sidebar-toggle { right:0; }
.import-record-table th { white-space:nowrap; }
.import-record-table.is-completed-history td.import-record-status { font-weight:400; }

/* My files: shared grade/year/season filters and simplified headings. */
.lecture-home .lecture-home-heading { margin-bottom:20px; }
.lecture-home .lecture-home-filters label { font-size:14px; }
.lecture-home .lecture-home-filters input,
.lecture-home .lecture-home-filters select,
.lecture-home .lecture-home-filters input::placeholder { font-size:13px; }
.lecture-home .is-all-lectures .lecture-home-list-head,
.lecture-home .is-all-lectures .lecture-home-row { grid-template-columns:minmax(220px,2.3fr) minmax(85px,.85fr) minmax(92px,.8fr) minmax(58px,.55fr) 32px; }
.lecture-home .is-all-lectures .lecture-home-list-head > *,
.lecture-home .is-all-lectures .lecture-home-row > * { display:block; }
.lecture-home .is-all-lectures .lecture-home-row > .lecture-home-name { display:flex; }
@media(max-width:1100px) {
  .lecture-home .is-all-lectures .lecture-home-list-head,
  .lecture-home .is-all-lectures .lecture-home-row { grid-template-columns:minmax(170px,1.6fr) minmax(85px,.8fr) minmax(58px,.55fr) 30px; }
  .lecture-home .is-all-lectures .lecture-home-list-head > :nth-child(2),
  .lecture-home .is-all-lectures .lecture-home-row > :nth-child(2) { display:none; }
}

.app-content .lecture-home .lecture-home-heading { min-height:0; margin-bottom:16px; }
.lecture-home .lecture-home-heading h1 { margin:0; line-height:1.25; }
.lecture-home .is-all-lectures .lecture-home-row > .lecture-home-mode { display:inline-flex; align-items:center; justify-self:start; align-self:center; width:fit-content; }
.lecture-file-versions { font-size:12px; font-weight:400; color:#6f7b8e; }
.lecture-home .is-all-lectures .lecture-home-list-head,
.lecture-home .is-all-lectures .lecture-home-row { grid-template-columns:minmax(220px,2.3fr) minmax(85px,.85fr) minmax(92px,.8fr) minmax(58px,.55fr) 32px; }
.lecture-home .is-all-lectures .lecture-home-list-head > :nth-child(2) { display:block; }
.lecture-home .is-all-lectures .lecture-home-row > .lecture-home-mode { display:inline-flex; }
.lecture-home .is-all-lectures .lecture-home-name strong { white-space:normal; overflow:visible; text-overflow:clip; line-height:1.5; }
.lecture-file-versions { display:inline; white-space:normal; }

/* File actions stay within the existing column proportions. */
.lecture-home .lecture-type-cell { display:flex !important; align-items:center; gap:8px; }
.lecture-eye { display:inline-flex; flex-shrink:0; padding:2px; border:0; background:none; color:#6280a7; cursor:pointer; }
.lecture-eye svg { width:18px; height:18px; }
.lecture-file-actions { display:flex !important; align-items:center; gap:8px; }
.lecture-home .lecture-home-list-head,.lecture-home .lecture-home-row { grid-template-columns:minmax(220px,2.3fr) minmax(115px,.85fr) minmax(105px,1fr) minmax(92px,.8fr) minmax(58px,.55fr) 80px; }
.lecture-home .is-all-lectures .lecture-home-list-head,.lecture-home .is-all-lectures .lecture-home-row { grid-template-columns:minmax(220px,2.3fr) minmax(115px,.85fr) minmax(92px,.8fr) minmax(58px,.55fr) 80px; }

.lecture-file-actions { gap:6px; white-space:nowrap; }
.lecture-file-actions .lecture-home-dots { flex:0 0 24px; width:24px; padding:0; }
.lecture-file-actions .lecture-home-link { flex:0 0 auto; min-width:48px; white-space:nowrap; word-break:keep-all; padding:4px 8px; }
.lecture-file-pagination { margin-top:0; padding:18px; }
.lecture-file-pagination button { min-width:90px; padding:9px 16px; background:white; border:1px solid #dce4ef; border-radius:6px; cursor:pointer; }
.lecture-file-pagination button:disabled { opacity:.4; cursor:default; }
.lecture-file-preview { position:fixed; z-index:90; right:20px; top:110px; width:min(460px,calc(100vw - 40px)); max-height:calc(100vh - 140px); background:#fff; border:1px solid #dce4ef; border-radius:12px; box-shadow:0 12px 40px #20395730; overflow:hidden; }
.lecture-file-preview[hidden] { display:none; }
.lecture-file-preview header { display:flex; align-items:center; gap:12px; padding:16px; border-bottom:1px solid #e3eaf3; }
.lecture-file-preview header strong { flex:1; min-width:0; color:#16304d; font-size:15px; }
.lecture-file-preview header button { border:0; background:none; font-size:24px; cursor:pointer; }
.lecture-preview-body { padding:20px; overflow:auto; max-height:calc(100vh - 230px); font-size:14px; line-height:1.8; color:#243b53; overflow-wrap:anywhere; }
.lecture-preview-body img { max-width:100%; height:auto; }
.lecture-preview-body table { width:100%; border-collapse:collapse; }
.lecture-preview-body td,.lecture-preview-body th { border:1px solid #dce4ef; padding:5px; }
.lecture-eye[aria-expanded="true"] { color:#2f69ff; background:#eaf1ff; border-radius:4px; }

/* Compact, eye-anchored document preview; no list layout changes. */
.lecture-file-preview { right:auto; top:auto; width:360px; max-width:calc(100vw - 20px); max-height:440px; border-radius:8px; box-shadow:0 6px 24px #223b5926; }
.lecture-file-preview header { padding:10px 12px; gap:8px; }
.lecture-file-preview header strong { font-size:12px; line-height:1.5; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.lecture-file-preview header button { font-size:18px; padding:0 3px; flex-shrink:0; }
.lecture-preview-body { padding:10px; height:370px; max-height:calc(100vh - 95px); overflow:auto; overscroll-behavior:contain; background:#edf0f4; scrollbar-width:thin; }
.lecture-preview-paper { box-sizing:border-box; width:794px; min-height:1123px; padding:56px 58px; background:white; box-shadow:0 1px 5px #243b5320; zoom:.41; }
.lecture-preview-paper .editor-lab-prosemirror { min-height:0; font-family:Arial,"Microsoft YaHei",sans-serif; }
.lecture-preview-paper .editor-lab-prosemirror img { max-width:100%; height:auto; }
.lecture-preview-paper .editor-lab-prosemirror td,.lecture-preview-paper .editor-lab-prosemirror th { padding:8px 10px; }

/* Content-only lecture preview. */
.lecture-file-preview { border:0; border-radius:5px; background:#fff; box-shadow:0 5px 22px rgba(25,45,75,.16); overflow:hidden; }
.lecture-file-preview .lecture-preview-body { height:400px; max-height:calc(100vh - 24px); background:#fff; }

/* Align the column heading with the type badge after the eye icon. */
.lecture-home .lecture-type-cell > .lecture-eye { box-sizing:border-box; width:22px; flex:0 0 22px; }
.lecture-home .lecture-home-list-head > span:nth-child(2) { padding-left:30px; }
.lecture-file-preview > header { display:none!important; }

.editor-export-metadata {display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:12px;padding:20px 26px 0;}
.editor-export-metadata label,.editor-export-summary label {display:grid;gap:8px;min-width:0;}
.editor-export-metadata span {color:#718098;font-size:13px;}
.editor-export-metadata input,.editor-export-metadata select {width:100%;min-width:0;box-sizing:border-box;border:1px solid #d8e2f0;border-radius:8px;padding:10px;background:#fff;}
.editor-export-summary {grid-template-columns:repeat(auto-fit,minmax(130px,1fr));}
.editor-title-textbox {color:var(--title-color,#2f6df6)!important;background:var(--title-background,#eef4ff);padding:8px 12px;box-sizing:border-box;}
.editor-title-textbox .editor-title-number {color:inherit!important;}
.editor-title-textbox::after {background:var(--title-color,#2f6df6)!important;bottom:-3px;}
.editor-title-textbox::before {background:var(--title-color,#2f6df6)!important;}
.title-color-controls {display:flex;gap:24px;}.title-color-controls label {display:flex;align-items:center;gap:10px;}
.title-color-controls input[type=color],.textbox-color-tools input[type=color] {width:32px;height:26px;padding:0;border:0;cursor:pointer;}
.editor-textbox-node {position:relative;}
.textbox-color-tools {display:none;position:absolute;right:0;top:-30px;gap:10px;padding:3px 6px;background:white;border:1px solid #dce4ef;border-radius:5px;font-size:11px;z-index:4;}
.editor-textbox-node:hover .textbox-color-tools,.textbox-color-tools:focus-within {display:flex;}
.textbox-color-tools label {display:flex;gap:4px;align-items:center;}
/* Lecture is the primary document type; common/layered is a contextual mode. */
.editor-lecture-mode-bar {
  grid-template-columns: minmax(220px, 1fr) auto minmax(500px, auto) !important;
  grid-template-areas: "copy mode versions" !important;
  gap: 18px !important;
}
.editor-lecture-mode-bar .editor-version-mode-copy { grid-area: copy; }
.editor-lecture-mode-switch {
  grid-area: mode;
  display: inline-flex;
  justify-self: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #edf2f8;
}
.editor-lecture-mode-switch button {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #52617a;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.editor-lecture-mode-switch button:hover { color: #2866d8; background: #f7f9fc; }
.editor-lecture-mode-switch button.active { background: #fff; color: #2866d8; box-shadow: 0 2px 8px rgb(31 74 160 / 12%); }
.editor-lecture-mode-switch button:focus-visible { outline: 2px solid #7ea5f3; outline-offset: 2px; }
.editor-lecture-mode-bar .editor-version-view-tabs { grid-area: versions; }
.editor-lecture-mode-bar .editor-layered-master-trigger {
  position: static;
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  transform: none;
  box-shadow: none;
}
.editor-lecture-mode-bar .editor-layered-master-trigger.active { box-shadow: 0 2px 8px rgb(31 74 160 / 12%); }
.editor-common-mode-status {
  grid-area: versions;
  display: flex;
  justify-self: end;
  align-items: baseline;
  gap: 8px;
  color: #64748b;
  white-space: nowrap;
}
.editor-common-mode-status strong { color: #52617a !important; font-size: 12px !important; }
.editor-common-mode-status span { color: #8794a7 !important; font-size: 11px !important; }
.editor-lab.is-lecture-common .editor-ref-config-bottom,
.editor-lab.is-lecture-common .editor-ref-config-layers,
.editor-lab.is-lecture-common .editor-question-child-layers { display: none !important; }
.editor-lab.is-lecture-common .editor-lecture-mode-bar {
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr) !important;
  grid-template-areas: "copy mode versions" !important;
}
@media (max-width: 1380px) {
  .editor-lecture-mode-bar,
  .editor-lab.is-lecture-common .editor-lecture-mode-bar {
    grid-template-columns: 1fr auto !important;
    grid-template-areas: "copy mode" "versions versions" !important;
  }
  .editor-lecture-mode-bar .editor-version-view-tabs { width: 100%; justify-self: stretch; }
  .editor-lecture-mode-bar .editor-version-view-tabs button { flex: 1; }
  .editor-common-mode-status { justify-self: end; }
}
@media (max-width: 760px) {
  .editor-lecture-mode-bar,
  .editor-lab.is-lecture-common .editor-lecture-mode-bar {
    grid-template-columns: 1fr !important;
    grid-template-areas: "copy" "mode" "versions" !important;
  }
  .editor-lecture-mode-switch { justify-self: stretch; }
  .editor-lecture-mode-switch button { flex: 1; }
.editor-common-mode-status { justify-self: start; }
}

/* Refined full-document preview: calmer hierarchy, stronger paper focus. */
.editor-lab.is-preview-mode {
  --preview-ink: #16243a;
  --preview-muted: #718198;
  --preview-line: #dce5f0;
  --preview-accent: #2d67df;
  min-height: 100dvh;
  padding-bottom: 68px !important;
  background:
    radial-gradient(circle at 18% 4%, rgb(255 255 255 / 92%) 0, rgb(255 255 255 / 0%) 28rem),
    radial-gradient(circle at 86% 20%, rgb(214 228 250 / 46%) 0, rgb(214 228 250 / 0%) 34rem),
    #eef3f8 !important;
}
.editor-lab.is-preview-mode .editor-lab-header {
  position: sticky !important;
  top: 0;
  z-index: 41;
  min-height: 104px !important;
  padding: 15px 188px 15px 24px !important;
  border: 0 !important;
  border-bottom: 1px solid rgb(204 216 232 / 82%) !important;
  background: rgb(250 252 255 / 91%) !important;
  box-shadow: 0 9px 28px rgb(31 52 82 / 7%) !important;
  backdrop-filter: blur(18px) saturate(1.15);
}
.editor-lab.is-preview-mode .editor-lab-heading {
  flex: 1 1 auto;
  align-items: center;
  gap: 18px !important;
}
.editor-lab.is-preview-mode .editor-lab-document-identity {
  position: relative;
  display: grid;
  gap: 5px;
  padding-left: 14px;
}
.editor-lab.is-preview-mode .editor-lab-document-identity::before {
  content: "讲义预览";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 4px;
  background: var(--preview-accent);
  box-shadow: 0 0 0 4px rgb(45 103 223 / 7%);
  font-size: 0;
}
.editor-lab.is-preview-mode .editor-file-identity-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.editor-lab.is-preview-mode .editor-lab-document-identity h1 {
  max-width: min(520px, 38vw);
  color: var(--preview-ink);
  font-size: 22px !important;
  font-weight: 760;
  letter-spacing: -.025em;
}
.editor-lab.is-preview-mode .editor-lab-document-identity > small {
  color: var(--preview-muted);
  font-size: 12px;
  font-weight: 560;
}
.editor-lab.is-preview-mode .editor-file-classification {
  gap: 8px;
  margin-left: 4px;
}
.editor-lab.is-preview-mode .editor-file-select {
  height: 40px;
  padding: 0 12px !important;
  border-color: #d5e0ed !important;
  border-radius: 9px !important;
  background: #fff !important;
  box-shadow: 0 3px 10px rgb(31 58 96 / 5%);
}
.editor-lab.is-preview-mode .editor-file-select > span {
  color: #8795a8 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .02em;
}
.editor-lab.is-preview-mode .editor-file-select select {
  color: #273a55 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}
.editor-lab.is-preview-mode .editor-lab-status {
  gap: 12px !important;
}
.editor-lab.is-preview-mode .editor-lab-status small[data-editor-lab-save-status] {
  position: relative;
  min-width: 128px;
  padding-left: 15px;
  color: #657790 !important;
  font-variant-numeric: tabular-nums;
}
.editor-lab.is-preview-mode .editor-lab-status small[data-editor-lab-save-status]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #32a57a;
  box-shadow: 0 0 0 4px rgb(50 165 122 / 11%);
  transform: translateY(-50%);
}
.editor-lab.is-preview-mode .editor-lab-header [data-direct-export] {
  min-height: 44px !important;
  padding: 0 22px !important;
  border-color: #2d67df !important;
  border-radius: 9px !important;
  background: #2d67df !important;
  box-shadow: 0 7px 16px rgb(45 103 223 / 20%);
  font-weight: 750;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.editor-lab.is-preview-mode .editor-lab-header [data-direct-export]:hover {
  background: #2459c7 !important;
  box-shadow: 0 9px 20px rgb(45 103 223 / 27%);
  transform: translateY(-1px);
}
.editor-lab.is-preview-mode .editor-lab-header [data-direct-export]:active,
.editor-lab.is-preview-mode .editor-preview-back:active { transform: translateY(1px); }
.editor-lab.is-preview-mode .editor-preview-back {
  min-height: 44px;
  padding: 0 18px;
  border-color: #d5e0ed;
  border-radius: 9px;
  background: #fff;
  color: #31445f;
  box-shadow: 0 3px 10px rgb(31 58 96 / 5%);
}
.editor-lab.is-preview-mode .editor-preview-return-bar { display: none !important; }
.editor-lab.is-preview-mode .editor-lab-body {
  position: relative;
  background: transparent;
}
.editor-lab.is-preview-mode .editor-lab-paper-viewport {
  min-height: calc(100dvh - 104px) !important;
  padding: 46px 40px 94px !important;
  background:
    linear-gradient(rgb(117 141 173 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(117 141 173 / 5%) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  scrollbar-color: #b9c7d8 transparent;
}
.editor-lab.is-preview-mode .editor-master-workspace,
.editor-lab.is-preview-mode .editor-version-workspace {
  position: relative;
  margin-inline: auto !important;
}
.editor-lab.is-preview-mode .editor-master-workspace::before,
.editor-lab.is-preview-mode .editor-version-workspace::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 18px -22px -24px;
  border-radius: 5px;
  background: rgb(255 255 255 / 48%);
  box-shadow: 0 26px 74px rgb(35 57 89 / 12%);
}
.editor-lab.is-preview-mode .editor-master-paper,
.editor-lab.is-preview-mode .editor-version-pane-paper {
  border: 1px solid rgb(255 255 255 / 86%) !important;
  border-radius: 2px !important;
  box-shadow:
    0 1px 2px rgb(26 47 77 / 7%),
    0 18px 50px rgb(35 57 89 / 13%) !important;
}
.editor-lab.is-preview-mode .editor-page-brand { margin-top: -8px; }
.editor-lab.is-preview-mode .editor-document-status {
  min-height: 58px;
  padding: 9px 22px;
  border-top-color: rgb(204 216 232 / 88%);
  background: rgb(250 252 255 / 91%);
  box-shadow: 0 -10px 30px rgb(31 52 82 / 7%);
  backdrop-filter: blur(18px) saturate(1.1);
}
.editor-lab.is-preview-mode .editor-document-metrics {
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
}
.editor-lab.is-preview-mode .editor-document-metrics > * {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
}
.editor-lab.is-preview-mode .editor-document-metrics > * + * { border-left: 1px solid #e3e9f1; }
.editor-lab.is-preview-mode .editor-document-metrics > strong:first-child { color: #2d67df; }
.editor-lab.is-preview-mode .editor-document-metrics > strong:nth-child(2) { color: #287c65; }
.editor-lab.is-preview-mode .editor-document-view > span { color: #75849a; font-size: 11px; letter-spacing: .06em; }
.editor-lab.is-preview-mode .editor-document-view button,
.editor-lab.is-preview-mode .editor-document-view select {
  height: 36px;
  border-color: #d7e1ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 7px rgb(31 58 96 / 4%);
}
@media (max-width: 1280px) {
  .editor-lab.is-preview-mode .editor-lab-header { padding-right: 166px !important; }
  .editor-lab.is-preview-mode .editor-lab-document-identity h1 { max-width: 330px; }
  .editor-lab.is-preview-mode .editor-file-select > span { display: none; }
}
@media (max-width: 900px) {
  .editor-lab.is-preview-mode .editor-lab-header { position: relative !important; padding: 14px 18px !important; }
  .editor-lab.is-preview-mode .editor-lab-heading { width: 100%; }
  .editor-lab.is-preview-mode .editor-lab-document-identity h1 { max-width: calc(100vw - 70px); }
  .editor-lab.is-preview-mode .editor-lab-status { width: 100%; }
  .editor-lab.is-preview-mode .editor-lab-paper-viewport { padding: 28px 16px 82px !important; }
}

/* Export field hierarchy and one shared file settings container. */
#editor-lab-export-confirm .editor-export-file-group {margin:22px 26px 0;padding:18px;border:1px solid #dce4ef;border-radius:10px;background:#f8fafc;}
#editor-lab-export-confirm .editor-export-file-group h3 {margin:0 0 16px;font-size:16px;font-weight:700;color:#203550;}
#editor-lab-export-confirm .editor-export-summary {padding:0;gap:14px;}
#editor-lab-export-confirm .editor-export-summary > label,#editor-lab-export-confirm .editor-export-summary > div {padding:0;border:0;border-radius:0;background:transparent;align-content:start;}
#editor-lab-export-confirm .editor-export-summary span,#editor-lab-export-confirm .editor-export-metadata span {font-size:14px;font-weight:600;color:#40536c;}
#editor-lab-export-confirm .editor-export-summary select,#editor-lab-export-confirm .editor-export-metadata select,#editor-lab-export-confirm .editor-export-metadata input {font-size:14px;font-weight:400;color:#263b54;background:#fff;min-height:42px;}
#editor-lab-export-confirm .editor-export-summary strong {display:flex;align-items:center;min-height:42px;font-size:14px;font-weight:400;color:#263b54;}

/* Preview header and unobtrusive document metrics. */
.editor-lab.is-preview-mode [data-editor-file-meta] {display:none!important;}
.editor-lab.is-preview-mode .editor-file-identity-row {align-items:center;gap:28px;}
.editor-lab.is-preview-mode .editor-file-select > span::after {content:"：";}
.editor-lab.is-preview-mode .editor-file-select {gap:0;}
.editor-lab.is-preview-mode .editor-document-metrics,.editor-lab.is-preview-mode .editor-document-metrics > * {border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important;}
.editor-lab.is-preview-mode .editor-document-metrics > span {display:none!important;}
workbench-account .account-avatar {display:grid!important;place-items:center;flex:0 0 40px;width:40px!important;height:40px!important;border-radius:50%!important;background:linear-gradient(145deg,#edf4ff,#dce9ff)!important;color:#285fb7!important;font-size:17px!important;font-weight:750!important;border:1px solid #d3e1f7!important;}

/* UI refinement only: compact headers, clear select labels, quieter editor chrome. */
.editor-lab.is-preview-mode [data-editor-lab-save-status] {display:none!important;}
.editor-lab .editor-lab-header {min-height:68px!important;padding-top:10px!important;padding-bottom:10px!important;box-shadow:none!important;background:#fff!important;}
.editor-lab.is-preview-mode .editor-lab-document-identity {padding-left:0;}
.editor-lab.is-preview-mode .editor-lab-document-identity::before {display:none;}
.editor-lab.is-preview-mode .editor-file-identity-row {gap:22px;}
.editor-lab.is-preview-mode .editor-file-select {height:38px;padding:0 12px;border:1px solid #d9e2ee;border-radius:7px;box-shadow:none;background:#fff;}
.editor-lab.is-preview-mode .editor-file-select > span {display:inline!important;color:#344963!important;font-size:13px!important;font-weight:600!important;}
.editor-lab.is-preview-mode .editor-file-select select {font-size:13px!important;font-weight:400!important;color:#53647c!important;height:36px;min-width:84px;}
.editor-lab.is-preview-mode .editor-file-select:focus-within {box-shadow:0 0 0 2px #eaf0fd;}
.editor-lab.is-preview-mode .editor-lab-header [data-direct-export],.editor-lab.is-preview-mode .editor-preview-back {min-height:38px!important;box-shadow:none!important;border-radius:7px!important;}
.editor-lab .editor-lab-header h1 {font-size:22px!important;line-height:1.4;}
.editor-lab:not(.is-preview-mode) {background:#f3f5f8;}
.editor-lab:not(.is-preview-mode) .editor-lab-toolbar {background:#fff;border-color:#e2e8f0;box-shadow:none;}
.editor-lab:not(.is-preview-mode) .editor-version-bar {background:#f8fafc;border-color:#e2e8f0;box-shadow:none;}
.editor-lab:not(.is-preview-mode) .editor-lab-paper-viewport {background:#f3f5f8;}
.editor-lab:not(.is-preview-mode) .editor-document-status {background:#fafbfd;box-shadow:none;border-top:1px solid #e2e8f0;}
.app-shell:not(.function-sidebar-collapsed) .function-group-title,.app-shell:not(.function-sidebar-collapsed) .function-link {position:relative;}
.app-shell:not(.function-sidebar-collapsed) .function-group-title > strong,.app-shell:not(.function-sidebar-collapsed) .function-link > b {position:absolute;left:62px;right:2px;text-align:left;}
.lecture-home .lecture-home-mode.is-layered {color:#8056b4!important;background:#f1eafa!important;}
@supports (appearance:base-select) {
 .editor-lab select,.editor-lab select::picker(select) {appearance:base-select!important;}
 .editor-lab select::picker(select) {border:1px solid #dbe3ee;border-radius:9px;padding:5px;background:#fff;box-shadow:0 8px 24px #24395420;min-width:140px;margin-top:6px;}
 .editor-lab select option {min-height:34px;padding:7px 10px;border-radius:5px;gap:9px;font-size:13px;font-weight:400;color:#344963;background:#fff;cursor:pointer;}
 .editor-lab select option:hover {background:#f3f6fc;}
 .editor-lab select option:checked {background:#edf3ff;color:#2f63c6;}
 .editor-lab select::picker-icon {color:#8391a6;width:10px;}
 .editor-lab .editor-file-select::after {display:none!important;}
 .editor-lab.is-preview-mode .editor-file-select select {padding-right:0;}
}
.editor-lab.is-preview-mode .editor-lab-header {min-height:68px!important;padding-top:10px!important;padding-bottom:10px!important;box-shadow:none!important;background:#fff!important;}
.editor-lab.is-preview-mode .editor-file-select select {display:inline-flex;align-items:center;justify-content:space-between;line-height:1.4;padding-top:0!important;padding-bottom:0!important;}

/* Let the preview header meet the workspace edges; soften title highlights. */
.editor-lab.is-preview-mode {padding-top:0!important;padding-left:0!important;padding-right:0!important;}
.editor-lab.is-preview-mode .editor-lab-header {margin:0!important;border-radius:0!important;}
.editor-title-textbox {
  background:linear-gradient(100deg,var(--title-background,#eef4ff) 0%,color-mix(in srgb,var(--title-background,#eef4ff) 55%,white) 52%,transparent 100%);
  border-radius:6px 6px 0 0;
  padding:7px 12px;
}
.editor-title-textbox::after {bottom:-3px;}
.app-content:has(> .editor-lab.is-preview-mode) > .page-account {top:5px!important;}
.editor-lab select {align-items:center;}
