/* LaTeX Equation Editor — chalkboard green + chalk yellow */
.lx-palette { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raised); padding: 10px; margin-bottom: 14px; }
.lx-cats { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.lx-cats::-webkit-scrollbar { display: none; }
.lx-cats button { flex: none; font: 650 13px var(--body); padding: 6px 11px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.lx-cats button:hover { background: color-mix(in oklab, var(--accent) 8%, transparent); }
.lx-cats button[aria-selected=true] { background: var(--accent); color: #fff; }
.lx-syms { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; min-height: 52px; }
.lx-syms button {
  min-width: 42px; height: 40px; padding: 0 8px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 20px/1 "Cambria Math", "STIX Two Math", "Times New Roman", serif;
}
.lx-syms button small { font: 600 12px var(--body); color: var(--ink-2); }
.lx-syms button:hover { border-color: var(--accent); background: var(--tint); }

.lx-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; }
@media (max-width: 820px) { .lx-editor { grid-template-columns: minmax(0, 1fr); } }
.lx-in { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; border: 1px solid #1f3a2b; background: #11231a; }
.lx-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px 7px 14px; background: #183024; }
.lx-head label { color: #9fc3ad; font: 600 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.lx-head select { width: auto; min-height: 32px; padding: 4px 30px 4px 10px; font-size: 13px; background-color: #11231a; color: #d6e9dd; border-color: #2b4d3a; }
#lxSrc { flex: 1; min-height: 210px; border: 0; border-radius: 0; background: #11231a; color: #eaf6ee; font: 15px/1.6 var(--mono); padding: 12px 14px; resize: vertical; }
#lxSrc:focus { box-shadow: inset 0 0 0 2px var(--accent-2); }
.lx-err { margin: 0; padding: 8px 14px; background: #3b1515; color: #fecaca; font: 13px var(--mono); }
.lx-out { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lx-preview {
  flex: 1; min-height: 210px; display: grid; place-items: center; overflow: auto; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: repeating-conic-gradient(color-mix(in oklab, var(--line) 60%, transparent) 0 25%, var(--surface) 0 50%) 0 0/16px 16px;
}
.lx-preview.white { background: #fff; }
.lx-preview mjx-container { margin: 0 !important; }
.lx-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; }
.lx-opts .check { margin: 0; }
.lx-opt { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); }
.lx-opt input[type=range] { width: 110px; }
.lx-opt input[type=color] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: none; cursor: pointer; }
.lx-btns { margin-top: 16px; }
