
.function-group-title[data-nav-toggle] { width:100%; border:0; background:transparent; text-align:left; cursor:pointer; font:inherit; }
.function-group-items[hidden] { display:none !important; }
.nav-chevron { margin-left:auto; width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; }
.nav-chevron::before { content:''; width:6px; height:6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); margin-top:-3px; }
[data-nav-toggle][aria-expanded=false] .nav-chevron::before { transform:rotate(-45deg); margin-top:0; }
.function-group-title:focus-visible { outline:2px solid #3169ab; outline-offset:2px; }
.app-content[data-route="editor-lab"] .editor-lab .editor-lab-status .generate-layered-button { display:inline-flex; align-items:center; gap:6px; border:0; background:transparent; color:#52677e; border-radius:6px; padding:8px 10px; min-height:34px; box-shadow:none; cursor:pointer; font-size:13px !important; font-weight:500; white-space:nowrap; }
.app-content[data-route="editor-lab"] .editor-lab .editor-lab-status .generate-layered-button:hover { background:#eef4fc; color:#3169ab; }
.generate-layered-button svg { width:16px; height:16px; }
.is-preview-mode .generate-layered-button { display:none !important; }
.app-content[data-route="editor-lab"] .editor-lab:not(.is-preview-mode) .editor-lecture-mode-bar { display:flex !important; justify-content:flex-end; min-height:46px !important; gap:12px; }
.app-content[data-route="editor-lab"] .editor-lab .editor-version-view-tabs { flex:1; justify-content:flex-start; }
.layered-generated-label { color:#52677e; font-size:13px; white-space:nowrap; }
.textbox-style-controls { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:12px 0; }
.textbox-style-controls label { display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:500; color:#344961; }
.textbox-style-controls input,.textbox-style-controls select { width:100%; height:34px; min-width:0; border:1px solid #dbe4ef; background:#fff; border-radius:5px; color:#24364b; }
.textbox-style-controls input[type=color] { padding:3px; cursor:pointer; }
.textbox-style-panel { margin:6px 0; padding:6px 12px; border:1px solid #dbe4ef; border-radius:6px; background:#f8faff; font-family:inherit; }
.textbox-style-panel summary { cursor:pointer; font-size:13px; color:#3169ab; }
.is-preview-mode .textbox-style-panel { display:none !important; }
.title-textbox-dialog { max-height:90vh; display:flex; flex-direction:column; }
.title-textbox-form { overflow:auto; min-height:0; }
.title-textbox-dialog header,.title-textbox-dialog footer { flex-shrink:0; }
@media(max-width:650px) { .textbox-style-controls { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media print { .textbox-style-panel { display:none; } }
.layer-mode-dialog { width:min(440px,calc(100vw - 40px)); padding:24px; border:1px solid #dce5f0; border-radius:12px; color:#24364b; box-shadow:0 16px 50px #152b4926; }
.layer-mode-dialog::backdrop { background:#172b4955; }
.layer-mode-dialog h2 { margin:0 0 12px; font-size:19px; }
.layer-mode-dialog p { font-size:14px; line-height:1.8; margin:0 0 24px; color:#53657b; }
.layer-mode-dialog footer { display:flex; justify-content:flex-end; gap:10px; }
.layer-mode-dialog button { padding:8px 16px; border:1px solid #dce5f0; background:white; border-radius:6px; cursor:pointer; color:inherit; }
.layer-mode-dialog button.primary { background:#3169ab; color:white; border-color:#3169ab; }
.layer-mode-feedback { position:fixed; z-index:10000; bottom:60px; left:50%; transform:translateX(-50%); display:flex; gap:18px; align-items:center; padding:12px 18px; background:#fff; color:#24364b; border:1px solid #dce5f0; border-radius:8px; box-shadow:0 4px 24px #152b491c; font-size:14px; }
.layer-mode-feedback button { background:none; border:0; color:#3169ab; cursor:pointer; }
.textbox-style-controls { display:block; }
.textbox-style-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.textbox-style-controls > .textbox-style-row { grid-template-columns:1fr 1fr; }
.textbox-style-controls .textbox-style-section { display:block !important; margin:12px 0 0; padding:10px 12px 12px; border:1px solid #dce5f0; border-radius:6px; }
.textbox-style-section legend { font-size:13px; color:#344961; font-weight:600; padding:0 4px; }
.textbox-style-section legend small { font-weight:400; color:#687b91; margin-left:6px; }
/* Only the requested controls and reference badges. */
.lecture-style-switch { display:inline-flex; gap:2px; padding:3px; background:#f1f5fa; border:1px solid #dce5ef; border-radius:7px; }
.app-content[data-route="editor-lab"] .editor-lab .editor-lab-status .lecture-style-switch button { padding:6px 12px; border:0; border-radius:4px; background:transparent; box-shadow:none; color:#64748b; font-size:13px !important; font-weight:500; }
.app-content[data-route="editor-lab"] .editor-lab .editor-lab-status .lecture-style-switch button[aria-pressed=true] { background:#fff; color:#3169ab; box-shadow:0 1px 3px #23446715; }
.is-preview-mode .lecture-style-switch { display:none; }
.editor-title-textbox[data-text-style]::after,.editor-title-textbox[data-text-style]::before { content:none !important; display:none !important; }
.editor-textbox-node { position:relative; }
.editor-textbox-node .textbox-style-panel { position:absolute; top:-25px; right:0; z-index:4; margin:0; padding:0; border:0; background:transparent; }
.editor-textbox-node .textbox-style-panel summary { display:block; padding:2px 7px; color:#64748b; font-size:12px; border-radius:4px; cursor:pointer; list-style:none; }
.editor-textbox-node .textbox-style-panel summary:hover { background:#eef4fc; color:#3169ab; }
.editor-textbox-node .textbox-style-panel > div { position:absolute; right:0; top:26px; width:360px; max-width:65vw; padding:14px; background:white; border:1px solid #dce5ef; border-radius:8px; box-shadow:0 6px 24px #20385820; }
.editor-textbox-node .textbox-style-panel:not([open]) > div { display:none; }
[data-export-metrics] { margin:16px 0; font-size:13px; color:#41556e; }
[data-export-metrics] p { font-size:12px; margin:8px 0; color:#697b90; }
[data-export-metrics] table { width:100%; border-collapse:collapse; }
[data-export-metrics] th,[data-export-metrics] td { padding:8px 12px; text-align:left; border-bottom:1px solid #e8eef5; }
[data-export-metrics] th { background:#f5f8fc; font-weight:600; }
#editor-lab-export-confirm { max-height:90vh; overflow:auto; }
.app-shell .question-reference-badge.has-references,.app-shell .reference-pick-record.is-referenced { color:#16804a !important; background:#eaf7ef !important; }
.app-shell .question-reference-badge.no-references,.app-shell .reference-pick-record:not(.is-referenced),.app-shell .qm-normal-state.no-references { color:#c43d3d !important; background:#fff0f0 !important; }
#editor-lab-export-confirm [data-export-metrics] { margin:14px 26px; }
#editor-lab-export-confirm .editor-export-summary { grid-template-columns:1fr 1.5fr 1fr 1fr 1fr; }
#editor-lab-export-confirm .editor-export-summary label:nth-child(2) { min-width:175px; }
@media (max-width:760px) { #editor-lab-export-confirm .editor-export-summary { grid-template-columns:1fr 1fr; } }
