:root {
  --bg: #0a0c0f;
  --bg2: #0f1216;
  --panel: #12161b;
  --panel2: #171c22;
  --line: #232b34;
  --line2: #2e3843;
  --text: #e6e9ed;
  --text2: #a9b2bc;
  --muted: #6c7783;
  --amber: #f5a524;
  --amber-dim: rgba(245, 165, 36, .14);
  --teal: #2fd3c0;
  --blue: #6aa8ff;
  --green: #3ddc84;
  --green-dim: rgba(61, 220, 132, .13);
  --red: #ff5f56;
  --red-dim: rgba(255, 95, 86, .13);
  --yellow: #ffc94a;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "JetBrains Mono", "Liberation Mono", monospace;
  --r: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.5; }
body { min-height: 100vh; }
.hidden { display: none !important; }
.mono, .num, td.num, th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
a { color: var(--teal); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px; height: 54px;
  background: rgba(10, 12, 15, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.chip { width: 24px; height: 24px; color: var(--text2); flex: none; }
.brand-title { font-family: var(--mono); font-weight: 700; letter-spacing: .02em; font-size: 15px; white-space: nowrap; }
.tabs { display: flex; gap: 2px; height: 100%; flex: 1; }
.tab {
  background: none; border: 0; color: var(--text2); cursor: pointer; font: inherit; font-size: 13.5px;
  padding: 0 14px; height: 100%; border-bottom: 2px solid transparent; display: flex; align-items: center; white-space: nowrap;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,.02); }
.tab.on { color: var(--text); border-bottom-color: var(--amber); font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border: 1px solid var(--line2); border-radius: 999px; font-family: var(--mono); font-size: 11.5px; color: var(--text2); white-space: nowrap;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.ok .dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.pill.bad .dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-dim); }
.userbar { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.userbar .who { font-family: var(--mono); color: var(--text2); font-size: 12px; }

/* ---------- layout ---------- */
main { max-width: 1360px; margin: 0 auto; padding: 20px 24px 36px; }
.pane { display: none; }
.pane.on { display: block; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; margin-bottom: 16px;
}
.card-tight { padding: 0; overflow: hidden; }
.card-tight .table-wrap { border: 0; border-radius: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
h2 { margin: 0; font-size: 14px; font-weight: 650; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }

/* ---------- buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: 7px 14px; border-radius: 5px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text);
  transition: background .12s, border-color .12s, color .12s; white-space: nowrap;
}
.btn:hover { border-color: #3d4a57; background: #1c232a; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-amber { background: var(--amber); color: #15100a; border-color: var(--amber); }
.btn-amber:hover { background: #ffb63f; border-color: #ffb63f; color: #15100a; }
.btn-ghost { background: transparent; color: var(--text2); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.mini {
  font: inherit; font-size: 11.5px; padding: 3px 8px; border-radius: 4px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line2); background: transparent; color: var(--text2);
}
.mini:hover { color: var(--text); border-color: #45525f; }
.mini.amber { color: var(--amber); border-color: rgba(245,165,36,.45); }
.mini.teal { color: var(--teal); border-color: rgba(47,211,192,.4); }
.mini.red { color: var(--red); border-color: rgba(255,95,86,.4); }
.mini:disabled { opacity: .4; cursor: not-allowed; }
input[type=text], input[type=password], input[type=number], input[type=search], input:not([type]), select {
  width: 100%; font: inherit; font-size: 13px; color: var(--text); background: var(--bg2);
  border: 1px solid var(--line2); border-radius: 5px; padding: 7px 10px; outline: none;
}
input:focus, select:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim); }
select { cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field label { font-size: 12px; color: var(--text2); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); cursor: pointer; }
.err-box { background: var(--red-dim); border: 1px solid rgba(255,95,86,.4); color: #ffb0ab; padding: 8px 10px; border-radius: 5px; font-size: 12.5px; margin-bottom: 12px; white-space: pre-wrap; word-break: break-word; }

/* segmented */
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 5px; overflow: hidden; background: var(--bg2); }
.seg button {
  font: inherit; font-size: 12.5px; background: none; border: 0; color: var(--text2); padding: 6px 12px; cursor: pointer;
  border-right: 1px solid var(--line); white-space: nowrap;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--text); background: rgba(255,255,255,.03); }
.seg button.on { background: var(--text); color: #0a0c0f; font-weight: 600; }
.seg-full { display: flex; width: 100%; margin-bottom: 16px; }
.seg-full button { flex: 1; }
.seg-group { display: flex; align-items: center; gap: 8px; }
.seg-group > label { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- controls ---------- */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 0 0 14px; }
.controls #lbRefresh { margin-left: auto; }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 5px; }
.table-wrap.tall { max-height: 580px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.grid th {
  position: sticky; top: 0; z-index: 1; background: #151a20; text-align: left; font-weight: 600; color: var(--text2);
  font-size: 11.5px; padding: 9px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap;
}
.grid td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover td { background: rgba(255,255,255,.022); }
.grid .num { text-align: right; }
.grid th.sorted { color: var(--amber); }
.grid td.sorted { color: var(--text); font-weight: 700; background: rgba(245,165,36,.035); }
.sortable th { cursor: pointer; user-select: none; }
.sortable th:hover { color: var(--text); }
.sortable th.asc::after { content: " ▲"; color: var(--amber); }
.sortable th.desc::after { content: " ▼"; color: var(--amber); }
.empty { text-align: center; color: var(--muted); padding: 26px 10px !important; }
.c-rank { width: 48px; }
.rank { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank.r1 { color: var(--amber); }
.entry { display: flex; align-items: center; gap: 8px; }
.entry-name { font-weight: 600; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.entry-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tagc { font-family: var(--mono); font-size: 10.5px; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line2); color: var(--text2); }
.tagc.gate { color: #15100a; background: var(--amber); border-color: var(--amber); font-weight: 700; }
.tagc.me { color: #04201c; background: var(--teal); border-color: var(--teal); font-weight: 700; }
.tagc.champ { color: #9bc4ff; background: rgba(106,168,255,.14); border-color: rgba(106,168,255,.45); font-weight: 700; }
.row-ref td { background: rgba(106,168,255,.025); color: var(--text2); }
.row-ref td:first-child { box-shadow: inset 2px 0 0 var(--blue); }
.row-gate td { background: rgba(245,165,36,.065) !important; border-top: 1px dashed rgba(245,165,36,.5); border-bottom: 1px dashed rgba(245,165,36,.5); color: var(--text); }
.row-gate td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.row-me td { background: rgba(47,211,192,.06); }
.row-me td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.w1c { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 3px; font-variant-numeric: tabular-nums; border: 1px solid transparent; }
.w1c.ok { color: var(--text2); }
.w1c.warn { color: var(--yellow); background: rgba(255,201,74,.1); border-color: rgba(255,201,74,.35); }
.w1c.bad { color: var(--red); background: var(--red-dim); border-color: rgba(255,95,86,.4); }
.pos { color: var(--green); } .neg { color: var(--red); }

/* ---------- submit ---------- */
.upload-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.upload-meta { display: flex; flex-direction: column; justify-content: space-between; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center;
  border: 1.5px dashed var(--line2); border-radius: 6px; padding: 20px 16px; cursor: pointer; color: var(--text2);
  background: var(--bg2); transition: border-color .12s, background-color .12s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--amber); color: var(--text); background: var(--amber-dim); }
.dropzone.has { border-style: solid; border-color: var(--teal); color: var(--text); }
.dz-title { font-size: 13.5px; font-weight: 600; }
.dz-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.badge { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 3px; border: 1px solid var(--line2); color: var(--text2); white-space: nowrap; }
.st { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 3px; font-weight: 600; white-space: nowrap; border: 1px solid; }
.st-SCORED { color: var(--green); border-color: rgba(61,220,132,.45); background: var(--green-dim); }
.st-FAILED { color: var(--red); border-color: rgba(255,95,86,.45); background: var(--red-dim); cursor: pointer; }
.st-CANCELLED { color: var(--muted); border-color: var(--line2); }
.st-QUEUED { color: var(--text2); border-color: var(--line2); }
.st-run { color: var(--amber); border-color: rgba(245,165,36,.45); background: var(--amber-dim); }
.pin-flag { color: var(--amber); font-family: var(--mono); font-size: 11px; margin-left: 5px; }
.live-head-r { display: flex; align-items: center; gap: 8px; }
.progress { height: 5px; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--amber); transition: width .35s ease; }
.progress-bar.running { background-image: repeating-linear-gradient(-45deg, rgba(0,0,0,.18) 0 6px, transparent 6px 12px); background-size: 17px 17px; animation: stripes .7s linear infinite; }
.progress-bar.ok { background: var(--green); } .progress-bar.fail { background: var(--red); }
@keyframes stripes { to { background-position: 17px 0; } }
.live-detail { font-size: 12px; color: var(--text2); margin: 8px 0; min-height: 18px; white-space: pre-wrap; word-break: break-word; }
.log { background: #07090b; border: 1px solid var(--line); border-radius: 5px; height: 190px; overflow-y: auto; padding: 8px 10px; font-size: 11.5px; line-height: 1.65; }
.log-line { white-space: pre-wrap; word-break: break-word; color: var(--text2); }
.log-line .lt { color: var(--muted); } .log-line .ls { color: var(--teal); }
.log-line.err .ls, .log-line.err { color: var(--red); }
.log-line.ok .ls { color: var(--green); }
.acts { display: flex; gap: 5px; flex-wrap: nowrap; }
.note-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: var(--text2); }
.prog-mini { font-family: var(--mono); font-size: 10.5px; color: var(--muted); display: block; margin-top: 2px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.gate-box { text-align: center; padding: 48px 20px; border: 1px dashed var(--line2); border-radius: var(--r); background: var(--panel); }
.gate-box h3 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }

/* ---------- compare ---------- */
.prof-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.prof-controls .field { flex: 1 1 260px; margin-bottom: 0; }
.prof-controls .field.narrow { flex: 0 0 130px; }
.prof-controls .swap { padding: 7px 10px; }
.tag-a, .tag-b { font-family: var(--mono); font-weight: 700; font-size: 10.5px; padding: 1px 6px; border-radius: 3px; }
.tag-a { background: var(--teal); color: #04201c; } .tag-b { background: var(--blue); color: #061428; }
.cmp-title { font-size: 13px; color: var(--text2); margin: 0 0 10px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cmp-title b.a { color: var(--teal); } .cmp-title b.b { color: var(--blue); }
.kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 11px; min-width: 0; }
.kpi-l { font-family: var(--mono); font-size: 10.5px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.kpi-v { font-family: var(--mono); font-size: 18px; font-weight: 700; margin: 3px 0 1px; font-variant-numeric: tabular-nums; color: var(--teal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-b { font-family: var(--mono); font-size: 11px; color: var(--text2); font-variant-numeric: tabular-nums; }
.kpi-b .bv { color: var(--blue); }
.delta { font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: 3px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--green); background: var(--green-dim); } .delta.down { color: var(--red); background: var(--red-dim); } .delta.flat { color: var(--muted); background: rgba(255,255,255,.04); }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters input, .filters select { width: auto; min-width: 150px; padding: 5px 9px; font-size: 12px; }

/* ---------- admin ---------- */
.sys-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px 16px; margin-bottom: 16px; font-size: 12.5px; color: var(--text2);
}
.sys-item { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.sys-item .sk { color: var(--muted); }
.sys-item b { color: var(--text); font-weight: 600; }
.sys-item b.ok { color: var(--green); } .sys-item b.warn { color: var(--yellow); } .sys-item b.bad { color: var(--red); }
.sys-sep { color: var(--line2); user-select: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.form-grid .check, .form-grid .form-actions { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.queue { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.q-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg2); font-size: 12px; }
.q-item .qid { font-family: var(--mono); font-weight: 700; }
.q-item .qd { color: var(--muted); font-family: var(--mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-empty { color: var(--muted); padding: 24px 10px; text-align: center; font-size: 13px; }

/* ---------- modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(4,5,7,.72); display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-card { position: relative; width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 20px 22px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.6); max-height: 90vh; overflow-y: auto; }
.modal-card.wide { max-width: 720px; }
.modal-card h3 { margin: 0 0 14px; font-size: 16px; }
.modal-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-x:hover { color: var(--text); }
#authForm:not(.reg) .reg-only { display: none; }
.err-pre { background: #07090b; border: 1px solid rgba(255,95,86,.35); color: #ffc2bd; border-radius: 5px; padding: 12px; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 55vh; overflow: auto; margin: 0; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 300; background: #0d1014; border: 1px solid var(--line2); border-left: 3px solid var(--green); padding: 8px 16px; border-radius: 5px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.toast.err { border-left-color: var(--red); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 16px; gap: 8px 16px; }
  .tabs { order: 3; flex-basis: 100%; height: 38px; overflow-x: auto; }
  .top-right { margin-left: auto; }
  .two-col, .upload-row { grid-template-columns: 1fr; }
  main { padding: 16px; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .sys-sep { display: none; }
}

.king-eff { font-size: 11px; color: var(--muted); margin-left: 4px; }

/* ---------- notice bar ---------- */
.notice-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--line2); border-left: 3px solid var(--amber);
  border-radius: var(--r); font-size: 13px; color: var(--text2);
}
.notice-bar strong { color: var(--text); }
.notice-tag {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245, 165, 36, .35);
  white-space: nowrap;
}

/* ---------- docs & math ---------- */
.doc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-body { max-width: 980px; color: var(--text); font-size: 14px; line-height: 1.72; }
.doc-body h1 { font-size: 20px; font-weight: 700; margin: 4px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc-body h2 { font-size: 16px; font-weight: 700; margin: 24px 0 10px; color: var(--amber); }
.doc-body h3 { font-size: 14.5px; font-weight: 650; margin: 16px 0 8px; color: var(--text); }
.doc-body h4 { font-size: 13.5px; font-weight: 650; margin: 12px 0 6px; color: var(--text2); }
.doc-body p { margin: 8px 0; color: var(--text2); }
.doc-body strong { color: var(--text); }
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.doc-body blockquote {
  margin: 12px 0; padding: 10px 14px;
  background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--amber);
  border-radius: var(--r);
}
.doc-body blockquote p { margin: 4px 0; color: var(--text2); }
.doc-body ul, .doc-body ol { margin: 8px 0; padding-left: 22px; color: var(--text2); }
.doc-body li { margin: 5px 0; }
.doc-body li > ul, .doc-body li > ol { margin: 4px 0 6px; }
.doc-body code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 5px; color: var(--teal);
}
.doc-pre {
  margin: 10px 0 14px; padding: 12px 14px; overflow-x: auto;
  background: #080a0d; border: 1px solid var(--line); border-radius: var(--r);
  line-height: 1.5;
}
.doc-pre code { background: none; border: 0; padding: 0; color: var(--text); font-size: 12.5px; }
.doc-body .table-wrap { margin: 10px 0 14px; border: 1px solid var(--line); border-radius: var(--r); }
.doc-table th.align-right, .doc-table td.align-right { text-align: right; font-variant-numeric: tabular-nums; }
.doc-table th.align-center, .doc-table td.align-center { text-align: center; }
.doc-table th.align-left, .doc-table td.align-left { text-align: left; }
.doc-table td { white-space: normal; }

.math-inline {
  font-family: "STIX Two Math", "Cambria Math", "Times New Roman", Georgia, serif;
  font-size: 1.03em; color: var(--text); white-space: nowrap;
}
.math-block {
  font-family: "STIX Two Math", "Cambria Math", "Times New Roman", Georgia, serif;
  font-size: 1.08em; color: var(--text);
  margin: 12px 0; padding: 12px 16px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r);
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px;
  overflow-x: auto; line-height: 1.5;
}
.math-inline i, .math-block i { font-style: italic; }
.math-inline sub, .math-block sub, .math-inline sup, .math-block sup { font-size: 0.74em; line-height: 0; }
.mtxt { font-family: var(--sans); font-size: 0.88em; font-style: normal; }
.mfn { font-style: normal; padding: 0 2px; }
.mbold { font-weight: 700; font-style: normal; }
.mop-bin { padding: 0 4px; }
.mquad { display: inline-block; width: 1em; }
.mqquad { display: inline-block; width: 2.2em; }
.mdel { display: inline-flex; align-items: center; padding: 0 1px; }
.mdel-lg { font-size: 1.45em; font-weight: 300; line-height: 1; }
.mfrac {
  display: inline-flex; flex-direction: column; align-items: center;
  vertical-align: middle; margin: 0 3px; font-size: 0.92em; line-height: 1.2;
}
.mnum { padding: 0 4px 2px; border-bottom: 1px solid var(--text2); text-align: center; }
.mden { padding: 2px 4px 0; text-align: center; }
.mcases { display: inline-flex; align-items: stretch; vertical-align: middle; margin-left: 2px; }
.mbrace {
  display: inline-flex; align-items: center; font-size: 2.4em; font-weight: 300;
  line-height: 0.85; padding-right: 4px; color: var(--text2);
}
.mcases-grid { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; text-align: left; }
.mcase-row { display: flex; align-items: center; gap: 16px; }
.mcase-val { min-width: 60px; }
.mcase-cond { color: var(--text2); }
.mop { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 4px; line-height: 1.05; }
.mop-top, .mop-bot { font-size: 0.7em; color: var(--text2); }
.mop-sym { font-size: 1.45em; line-height: 1; }
