/* Least squares from the matrix page (matlsq.js): its look, scoped to the
   element it is mounted in (class matlsq), so it neither changes the host page
   nor is changed by it. The colours come from the site's main.css variables;
   the matrix page's own tokens (--pm-w and the like) are set on .matlsq. */
.matlsq {
  --ga: 0 0 10px rgba(74,124,63,.3);
  --gb: 0 0 10px rgba(157,0,6,.3);
  --gr: 0 0 10px rgba(181,118,20,.3);
  --tab-active-bg:     var(--accent);
  --tab-active-color:  var(--canvas-bg);
  --tab-active-shadow: 0 0 12px rgba(124,106,85,.25);
  --radius-card: 12px;
  --radius-btn:  8px;
  --zoom: 1;
}
html.dark .matlsq {
  --ga: 0 0 14px rgba(152,151,26,.4);
  --gb: 0 0 14px rgba(204,36,29,.4);
  --gr: 0 0 14px rgba(215,153,33,.4);
  --tab-active-bg:     var(--accent);
  --tab-active-color:  var(--canvas-bg);
  --tab-active-shadow: 0 0 14px rgba(215,153,33,.3);
  --radius-card: 12px;
  --radius-btn:  8px;
  --zoom: 1;
}
html.dark .matlsq body::before {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(215,153,33,.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(181,118,20,.03) 0%, transparent 50%);
}
.matlsq .tab-btn.active { background: var(--tab-active-bg); color: var(--tab-active-color); box-shadow: var(--tab-active-shadow); }
.matlsq .tab-btn:hover:not(.active) { color: var(--body); }
.matlsq .module-panel.active { display: block; }
.matlsq .config-panel {
  background: var(--surface); border: 1px solid var(--panel-border-inner);
  border-radius: var(--radius-card); padding: 16px 20px;
  margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end;
  overflow: visible;
}
.matlsq .controls-row { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.matlsq .btn-run { background: linear-gradient(135deg, var(--accent), var(--cyan-vis)); color: var(--tab-active-color); box-shadow: 0 0 14px rgba(124,106,85,.25); }
.matlsq .btn-run:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 0 22px rgba(124,106,85,.4); }
.matlsq .btn-secondary { background: var(--tag-bg); color: var(--muted); border: 1px solid var(--panel-border-inner); }
.matlsq .btn-secondary:hover:not(:disabled) { color: var(--body); border-color: var(--accent); }
.matlsq .speed-group { display: flex; flex-direction: column; gap: 4px; }
.matlsq .speed-group input[type=range] { width:calc(100px * var(--fs, 1)); accent-color: var(--accent); }
.matlsq .config-label { font-size: .62rem; letter-spacing: .17em; text-transform: uppercase; color: var(--muted); }
.matlsq .stage {
  background: var(--surface); border: 1px solid var(--panel-border-inner);
  border-radius: var(--radius-card); padding: 26px 20px;
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; min-height:calc(320px * var(--fs, 1)); position: relative; overflow: hidden;
}
.matlsq .stage::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .4;
}
.matlsq .progress-wrap { width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 4px; }
.matlsq .progress-bar-bg { height: 3px; background: var(--tag-bg); border-radius: 2px; overflow: hidden; }
.matlsq .progress-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--cyan-vis));
  border-radius: 2px; transition: width .4s ease; box-shadow: 0 0 6px rgba(124,106,85,.3);
}
.matlsq .progress-label { font-size: .62rem; letter-spacing: .13em; color: var(--muted); text-align: center; text-transform: uppercase; }
.matlsq .status-line { font-size: .69rem; letter-spacing: .1em; color: var(--accent); text-align: center; min-height: 1.1em; text-transform: uppercase; }
.matlsq .matrices-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; flex: 1; overflow: visible; }
.matlsq .matrix-editor { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.matlsq .matrix-title { font-size: .68rem; letter-spacing: .15em; color: var(--accent); text-transform: uppercase; }
.matlsq .matrix-title.b { color: var(--red); }
.matlsq .t-btn.active { color: var(--body); opacity: 1; }
.matlsq .dim-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 3px; }
.matlsq .matrix-editor > .matrix-title { min-height:20px; display:flex; align-items:center; gap:4px; }
.matlsq .matrix-editor > .dim-controls { min-height:28px; }
.matlsq .matrix-editor { max-width: 100%; }
.matlsq .dim-controls label, .matlsq .dim-lbl { font-size: .67rem; color: var(--muted); }
.matlsq .styled-select-wrap { position: relative; display: inline-block; }
.matlsq .styled-select-wrap select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background: var(--tag-bg); border: 1px solid var(--panel-border-inner); border-radius: 6px;
  color: var(--body); font-family:var(--mono);
  font-size: .77rem; padding: 4px 24px 4px 8px; outline: none; cursor: pointer;
  transition: border-color .15s;
}
.matlsq .styled-select-wrap select:focus { border-color: var(--accent); }
.matlsq .styled-select-wrap::after {
  content: '▾'; position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; font-size: .7rem;
}
.matlsq .matrix-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.matlsq .matrix-label { font-family:var(--sans); font-size: .58rem; letter-spacing: .19em; color: var(--muted); text-transform: uppercase; }
.matlsq .cell {
  min-width:calc(58px * var(--fs, 1)); width: max-content; max-width: 160px; height:calc(36px * var(--fs, 1));
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 600; border-radius: 6px;
  padding: 0 6px;
  background: var(--tag-bg); border: 1px solid var(--panel-border-inner); color: var(--body);
  transition: background .23s ease, border-color .23s ease, color .23s ease, box-shadow .23s ease;
  cursor: default; user-select: none;
  white-space: nowrap;
}
.matlsq .cell.result-empty { background: rgba(128,128,128,.04); border: 1px dashed var(--panel-border-inner); color: transparent; }
.matlsq .cell.result-current { background: rgba(181,118,20,.08); border: 2px solid var(--accent); box-shadow: var(--gr); color: var(--accent); animation: mlq-pulse-r 1s ease infinite; }
.matlsq .cell.result-done { background: rgba(124,106,85,.08); border-color: rgba(124,106,85,.4); color: var(--accent); }
.matlsq .cell.pop { animation: mlq-pop-in .36s cubic-bezier(.34,1.56,.64,1) forwards; }
.matlsq .dp-cell.dp-orphan { border:2px dashed var(--red); color:var(--red); }
.matlsq .dp-sum.dp-undef { color:var(--red); font-size:.78rem; }
.matlsq .matrix-grid.mul-undef .cell { opacity:.35; border-style:dashed; }
.matlsq .inp-row { border-color:var(--green)!important; background:rgba(74,124,63,.1)!important;   color:var(--green)!important; }
.matlsq .inp-col { border-color:var(--red)!important;   background:rgba(157,0,6,.1)!important;    color:var(--red)!important; }
.matlsq .inp-pair-row { border-color:var(--green)!important; background:rgba(74,124,63,.25)!important;  color:var(--green)!important; box-shadow:0 0 0 2px var(--green)!important; transform:scale(1.08); z-index:3; position:relative; }
.matlsq .inp-pair-col { border-color:var(--red)!important;   background:rgba(157,0,6,.22)!important;   color:var(--red)!important;   box-shadow:0 0 0 2px var(--red)!important;   transform:scale(1.08); z-index:3; position:relative; }
.matlsq .dp-panel {
  background:var(--tag-bg); border:1px solid var(--panel-border-inner); border-radius:var(--radius-card);
  padding:15px 18px; display:flex; flex-direction:column; gap:10px;
  min-width:calc(210px * var(--fs, 1)); max-width:420px; flex:1; transition:border-color .3s, box-shadow .3s;
}
.matlsq .dp-panel.active { border-color:var(--accent); box-shadow:0 0 14px rgba(124,106,85,.12); }
.matlsq .dp-header { font-family:var(--sans); font-size:.58rem; letter-spacing:.17em; text-transform:uppercase; color:var(--accent); text-align:center; }
.matlsq .dp-cell {
  width:calc(40px * var(--fs, 1)); height:calc(34px * var(--fs, 1)); display:flex; align-items:center; justify-content:center;
  font-size:.86rem; font-weight:700; border-radius:7px; border:1px solid var(--panel-border-inner);
  background:var(--surface); color:var(--muted); transition:all .2s ease; user-select:none;
}
.matlsq .dp-cell.lit-a { background:rgba(74,124,63,.18);  border-color:var(--green); color:var(--green); box-shadow:var(--ga); transform:scale(1.1); }
.matlsq .dp-cell.lit-b { background:rgba(157,0,6,.15);    border-color:var(--red);   color:var(--red);   box-shadow:var(--gb); transform:scale(1.1); }
.matlsq .dp-sum { font-size:.88rem; font-weight:700; text-align:center; min-height:1.2em; color:var(--muted); transition:color .3s; }
.matlsq .dp-sum.final { color:var(--accent); font-size:.96rem; }
.matlsq .subtabs, .matlsq .gj-subtabs {
  display:flex; gap:4px; margin-bottom:18px; padding-bottom:2px; border-bottom:1px solid var(--panel-border-inner);
}
.matlsq .subtab-btn, .matlsq .gj-subtab-btn {
  font-family:var(--sans); font-size:.63rem; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; border:1px solid var(--panel-border-inner);
  border-radius:7px; padding:7px 16px; cursor:pointer;
  background:var(--tag-bg); color:var(--muted); transition:all .2s;
}
.matlsq .subtab-btn.active, .matlsq .gj-subtab-btn.active { background:var(--accent); color:var(--tab-active-color); border-color:var(--accent); box-shadow:0 0 10px rgba(124,106,85,.22); }
.matlsq .subtab-btn:hover:not(.active), .matlsq .gj-subtab-btn:hover:not(.active) { color:var(--body); border-color:var(--accent); }
.matlsq .gj-card { background:var(--surface); border:1px solid var(--panel-border-inner); border-radius:10px; padding:14px; margin-bottom:14px; }
.matlsq .gj-card-label { font-family:var(--sans); font-size:.65rem; letter-spacing:.1em; color:var(--muted); text-transform:uppercase; margin-bottom:10px; }
.matlsq .gj-explain-box {
  background:var(--tag-bg); border-left:3px solid var(--accent); border-radius:0 8px 8px 0;
  padding:12px 16px; margin-bottom:14px; min-height:calc(52px * var(--fs, 1)); font-size:.82rem; line-height:1.6;
}
.matlsq .gj-explain-phase { font-family:var(--sans); font-size:.6rem; color:var(--accent); text-transform:uppercase; letter-spacing:.1em; margin-bottom:5px; }
.matlsq .gj-explain-box b { color:var(--accent); font-weight:700; }
.matlsq .gj-explain-box em { color:var(--green); font-style:normal; font-weight:500; }
.matlsq .aug-inner { display:inline-flex; align-items:center; }
.matlsq .matrix-block { display:inline-flex; flex-direction:column; gap:2px; }
.matlsq .matrix-block.left { border-left:2px solid var(--accent); border-top:2px solid var(--accent); border-bottom:2px solid var(--accent); border-radius:6px 0 0 6px; padding:8px 4px 8px 10px; }
.matlsq .matrix-block.right { border-right:2px solid var(--accent); border-top:2px solid var(--accent); border-bottom:2px solid var(--accent); border-radius:0 6px 6px 0; padding:8px 10px 8px 4px; }
.matlsq .aug-sep { width:2px; background:var(--panel-border-inner); align-self:stretch; margin:0 6px; }
.matlsq .mat-row { display:flex; gap:4px; align-items:center; height:calc(28px * var(--fs, 1)); padding:3px 0; border-radius:4px; transition:background .3s; }
.matlsq .mat-row.hl-cyan { background:rgba(124,106,85,.12); }
.matlsq .mat-row.hl-gold { background:rgba(181,118,20,.12); }
.matlsq .mat-row.hl-green { background:rgba(74,124,63,.12); }
.matlsq .mat-cell { width:calc(72px * var(--fs, 1)); text-align:right; font-size:.88rem; padding:2px 6px; border-radius:4px; transition:color .3s; font-variant-numeric:tabular-nums; }
.matlsq .mat-cell.pivot { color:var(--accent); font-weight:700; }
.matlsq .mat-cell.changed { color:var(--green); }
.matlsq .row-label { font-family:var(--sans); font-size:.6rem; color:var(--muted); width:calc(28px * var(--fs, 1)); text-align:right; padding-right:6px; display:flex; align-items:center; justify-content:flex-end; height:calc(28px * var(--fs, 1)); }
.matlsq .history-wrap { overflow-x:auto; overflow-y:hidden; white-space:nowrap; padding-bottom:6px; min-height:calc(38px * var(--fs, 1)); }
.matlsq .history-wrap::-webkit-scrollbar { height:4px; }
.matlsq .history-wrap::-webkit-scrollbar-track { background:var(--tag-bg); border-radius:2px; }
.matlsq .history-wrap::-webkit-scrollbar-thumb { background:var(--panel-border-inner);   border-radius:2px; }
.matlsq .op-chip { display:inline-flex; align-items:center; background:var(--tag-bg); border:1px solid var(--panel-border-inner); border-radius:20px; padding:4px 12px; font-size:.75rem; margin-right:6px; color:var(--body); white-space:nowrap; transition:opacity .2s, box-shadow .2s; }
.matlsq .op-chip.op-swap { border-color:var(--accent);   color:var(--accent); }
.matlsq .op-chip.op-scale { border-color:var(--accent);  color:var(--accent); }
.matlsq .op-chip.op-add { border-color:var(--green);   color:var(--green); }
.matlsq .op-chip.op-future { opacity:.3; }
.matlsq .op-chip-btn.op-current { box-shadow:0 0 8px color-mix(in srgb, var(--accent) 28%, transparent); }
.matlsq .op-chip.op-current { box-shadow:0 0 8px rgba(124,106,85,.28); }
html:not(.dark) .matlsq .int-right-row { background:rgba(212,206,197,.45); }
.matlsq .replace-opt.active { background:var(--accent); color:#000; font-weight:700; }
.matlsq .success-overlay.show { display:block; }
.matlsq .info-card { background:var(--tag-bg); border:1px solid var(--panel-border-inner); border-radius:8px; padding:10px 14px; font-size:.78rem; }
.matlsq .info-card-title { font-family:var(--sans); font-size:.58rem; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; margin-bottom:5px; }
.matlsq .info-val { color:var(--accent); font-size:.9rem; }
.matlsq .hint-text { color:var(--muted); font-size:.73rem; margin-top:6px; line-height:1.5; }
.matlsq { --pm-w: 46px; --pm-h: 36px; --pm-cw: 58px; }
.matlsq .pm-hints { display:flex; flex-wrap:wrap; align-items:center; gap:6px 18px; width:100%;
  border-top:1px solid var(--panel-border-inner); padding-top:12px; }
.matlsq .pm-switch { display:inline-flex; align-items:center; gap:8px; background:none; border:none;
  padding:4px 2px; color:var(--muted); font-size:.6rem; letter-spacing:.14em; box-shadow:none; }
.matlsq .pm-switch .sw { width:36px; height:18px; border-radius:9px; background:var(--panel-border-inner);
  position:relative; flex-shrink:0; transition:background .2s; }
.matlsq .pm-switch .sw::after { content:''; position:absolute; top:3px; left:3px; width:12px; height:12px;
  border-radius:50%; background:var(--muted); transition:left .2s, background .2s; }
.matlsq .pm-switch.on { color:var(--body); }
.matlsq .pm-switch.on .sw { background:var(--accent); }
.matlsq .pm-switch.on .sw::after { left:21px; background:var(--canvas-bg); }
.matlsq .pm-switch:hover { color:var(--body); }
.matlsq .pm-switch:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }
.matlsq .pm-rate { font-size:.66rem; color:var(--muted); margin-left:auto; }
.matlsq .pm-score { display:flex; flex-wrap:wrap; gap:10px; flex:1; }
.matlsq .pm-score .info-card { min-width:calc(96px * var(--fs, 1)); }
.matlsq .mlq-pm-delta { display:inline-block; margin-left:6px; font-size:.62rem; font-weight:700; vertical-align:super;
  padding:0 5px; border-radius:8px; animation:mlq-pm-delta 1.6s ease forwards; }
.matlsq .mlq-pm-delta.up { background:color-mix(in srgb, var(--green) 16%, transparent); }
.matlsq .mlq-pm-delta.down { background:color-mix(in srgb, var(--red) 16%, transparent); }
.matlsq .mlq-pm-delta.up { color:var(--green); }
.matlsq .mlq-pm-delta.down { color:var(--red); }
.matlsq .pm-stage-row { display:flex; align-items:center; justify-content:center; gap:16px; flex-wrap:wrap; width:100%; }
.matlsq .pm-op { font-family:var(--mono); font-size:1.3rem; color:var(--muted); user-select:none; }
.matlsq .pm-mat { display:grid; grid-template-columns:auto auto; grid-template-rows:auto auto; }
.matlsq .pm-body { grid-column:2; grid-row:2; position:relative; padding:4px 10px; }
.matlsq .pm-body::before, .matlsq .pm-body::after { content:''; position:absolute; top:0; bottom:0; width:7px;
  border:2px solid var(--muted); opacity:.55; pointer-events:none; }
.matlsq .pm-body::before { left:0;  border-right:none; border-radius:4px 0 0 4px; }
.matlsq .pm-body::after { right:0; border-left:none;  border-radius:0 4px 4px 0; }
.matlsq .pm-cells { display:grid; gap:3px; }
.matlsq .cell.pm-cell { width:auto; min-width:var(--pm-w); height:var(--pm-h); padding:0 .45em; white-space:nowrap; box-sizing:border-box; }
.matlsq .cell.pm-out { width:var(--pm-cw); min-width:var(--pm-cw); height:var(--pm-h); }
.matlsq .pm-prod > .pm-body, .matlsq .pm-prod > .pm-shape { margin-top:19px; }
.matlsq .pm-selecting .pm-cell { cursor:cell; touch-action:none; }
.matlsq .cell.pm-preview { outline:2px dashed var(--accent); outline-offset:1px; }
.matlsq .pm-in, .matlsq .pm-num {
  width:var(--pm-cw); height:var(--pm-h);
  background:var(--tag-bg); border:1px solid var(--panel-border-inner); border-radius:6px;
  color:var(--body); font-family:var(--mono); font-size:.82rem; text-align:center;
  outline:none; transition:border-color .15s, box-shadow .15s;
}
.matlsq .pm-in:focus, .matlsq .pm-num:focus { border-color:var(--accent); box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.matlsq .pm-in.pm-target { border:2px solid var(--accent); box-shadow:var(--gr); }
.matlsq .pm-in.bad, .matlsq .pm-num.bad { border-color:var(--red); color:var(--red); }
.matlsq .pm-num.ok { border-color:var(--green); color:var(--green); }
.matlsq .pm-num::placeholder, .matlsq .pm-in::placeholder { color:var(--muted); opacity:.6; font-size:.62rem; }
.matlsq .pm-undef-btn.ok { color:var(--green); border-color:var(--green); }
.matlsq .pm-undef-btn.bad { color:var(--red);   border-color:var(--red); }
.matlsq .pm-reveal.out { animation:mlq-pm-go .3s ease forwards; }
.matlsq .pm-feedback { width:100%; max-width:620px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:8px 14px; background:var(--tag-bg); border-left:3px solid var(--accent); border-radius:0 8px 8px 0;
  padding:10px 14px; font-size:.82rem; line-height:1.6; }
.matlsq .pm-feedback.ok { border-left-color:var(--green); }
.matlsq .pm-feedback.bad { border-left-color:var(--red); }
.matlsq .pm-feedback b { color:var(--accent); font-weight:700; }
.matlsq .pm-feedback.ok b { color:var(--green); }
.matlsq .pm-feedback.bad b { color:var(--red); }
.matlsq .pm-fb-msg { flex:1 1 260px; }
.matlsq .pm-fb-actions { display:flex; gap:6px; flex-wrap:wrap; }
.matlsq .pm-prompt { font-size:.78rem; color:var(--accent); text-align:center; margin-top:-10px; }
.matlsq .pm-prompt:empty { display:none; }
.matlsq .pm-in:hover:not(:focus) { border-color:var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .matlsq .pm-reveal, .matlsq .pm-reveal.out, .matlsq .cell.pop, .matlsq .mlq-pm-delta { animation-duration:.01s !important; }
}
.matlsq .dp-lbl, .matlsq .dp-op { font-family:var(--mono); color:var(--muted); line-height:var(--pm-h); white-space:nowrap; }
.matlsq .dp-lbl { color:var(--body); font-size:.85rem; margin-right:2px; }
.matlsq .dp-pair.hot, .matlsq .dp-term.hot { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 8%, transparent); }
.matlsq .pm-in.dp-sm, .matlsq .cell.dp-sm { width:calc(40px * var(--fs, 1)); min-width:calc(40px * var(--fs, 1)); height:var(--pm-h); }
.matlsq .pm-in.dp-md, .matlsq .cell.dp-md { width:var(--pm-w); min-width:var(--pm-w); height:var(--pm-h); }
.matlsq .pm-in.dp-lg, .matlsq .cell.dp-lg { width:var(--pm-cw); min-width:var(--pm-cw); height:var(--pm-h); }
.matlsq .pm-in.dp-active { border:2px dashed var(--accent); }
.matlsq .cell.dp-skip { background:transparent; border:1px dashed var(--panel-border-inner); color:var(--muted); }
.matlsq .dp-q-note { font-size:.72rem; color:var(--muted); text-align:center; }
.matlsq .dp-sign-btn.ok { color:var(--green); border-color:var(--green); opacity:1; }
.matlsq .dp-sign-btn.bad { color:var(--red);   border-color:var(--red);   opacity:1; }
.matlsq .btn-secondary.dp-go { color:var(--accent); border-color:var(--accent); }
.matlsq .mini-cell.dp-chart.neg { color:var(--red); }
.matlsq .cell.dp-cell { position:relative; }
.matlsq .dp-sgn.neg { color:var(--red); }
.matlsq .pm-mat.dp-sarrus { grid-template-columns:auto auto auto; }
.matlsq .cell.dp-ghost { opacity:.45; border-style:dashed; }
.matlsq .cell.dp-ghost.inp-row, .matlsq .cell.dp-ghost.inp-col { opacity:1; }
.matlsq .pm-selecting .cell.dp-ghost { cursor:default; }
.matlsq .cell.dp-sel { outline:2px solid var(--accent); outline-offset:1px; background:color-mix(in srgb, var(--accent) 20%, var(--tag-bg)); }
.matlsq .cell.dp-circ { border-radius:18px !important; box-shadow:0 0 0 2px var(--accent) !important; font-weight:800; transform:scale(1.08); z-index:2; }
.matlsq .dp-signpick.bad button { border-color:var(--red); }
.matlsq .gj-card .pm-hints { margin-top:12px; }
.matlsq .int-cell.gjb-cell { border-radius:6px; transition:box-shadow .15s, background .15s, color .15s; }
.matlsq .gjb-pickmode .int-cell.gjb-cell { cursor:cell; }
.matlsq .gjb-pickmode .int-cell.gjb-cell:hover { box-shadow:inset 0 0 0 1px var(--accent); }
.matlsq .gjb-pv.ok { color:var(--green); box-shadow:0 0 0 1px var(--green); }
.matlsq .gjb-pv.bad { color:var(--red);   box-shadow:0 0 0 1px var(--red); }
.matlsq .op-input.ok { border-color:var(--green); color:var(--green); }
.matlsq .op-input.bad { border-color:var(--red);   color:var(--red); }
.matlsq .mil-host { position:relative; }
.matlsq .mil-run { position:absolute; pointer-events:none; z-index:6; }
.matlsq .mil-run svg { display:block; overflow:visible; shape-rendering:geometricPrecision;
  filter:drop-shadow(0 0 2.5px color-mix(in srgb, var(--green) 60%, transparent)); }
.matlsq .mil-run rect { fill:none; stroke:color-mix(in srgb, var(--green) 62%, #ffffff); stroke-linecap:butt; opacity:0; }
:root[data-theme="dark"] .matlsq .mil-run rect { stroke:var(--green); }
.matlsq .mat-cell.pivot { color:var(--accent); font-weight:800; box-shadow:inset 0 0 0 1.5px var(--accent); border-radius:14px; }
.matlsq .mat-cell.pivot.fresh { animation:mlq-piv-in .9s ease; }
.matlsq .mat-cell.pivot.active, .matlsq .gjb-cell.gjb-pivact { background:color-mix(in srgb, var(--accent) 14%, transparent); }
.matlsq .mat-cell.shade { background:color-mix(in srgb, var(--red) 13%, transparent); }
.matlsq .mat-cell.clearing { box-shadow:inset 0 0 0 1.5px var(--red); border-radius:14px; color:var(--red); }
.matlsq .gjb-cell.gjb-piv { box-shadow:inset 0 0 0 1.5px var(--accent); border-radius:16px; color:var(--accent); font-weight:800; }
.matlsq .gjb-cell.gjb-shade { background:color-mix(in srgb, var(--red) 13%, transparent); }
.matlsq .gjb-cell.gjb-clearing { box-shadow:inset 0 0 0 1.5px var(--red); border-radius:16px; color:var(--red); }
.matlsq .eg-mat .eg-cell { min-width:calc(58px * var(--fs, 1)); justify-content:center; white-space:nowrap; }
.matlsq .eg-cell .eg-lam { color:var(--accent); font-weight:700; }
.matlsq .eg-cell.eg-diag { background:color-mix(in srgb, var(--accent) 8%, var(--tag-bg)); }
.matlsq .eg-cell.eg-piv { box-shadow:inset 0 0 0 1.5px var(--accent); border-radius:16px; color:var(--accent); font-weight:700; }
.matlsq .eg-cell.eg-free { background:color-mix(in srgb, var(--green) 16%, var(--tag-bg)); color:var(--green); font-weight:700; }
.matlsq .eg-sec { margin:10px 0; }
.matlsq .eg-sec + .eg-sec { border-top:1px solid var(--panel-border-inner); padding-top:10px; }
.matlsq .eg-sec-t { font-family:var(--sans); font-size:.56rem; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin-bottom:6px; }
.matlsq .eg-matside .matrix-label { text-align:center; }
.matlsq .qz-answer { display:flex; justify-content:center; margin:14px 0 4px; }
.matlsq .qz-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:center; }
.matlsq .qz-note { font-size:.78rem; color:var(--muted); margin-top:5px; }
.matlsq .qz-pick .pm-cell { cursor:cell; }
.matlsq .qz-pick .pm-cell:hover { background:color-mix(in srgb, var(--accent) 16%, var(--tag-bg)); color:var(--accent); }
.matlsq .pm-pop-layer { position:fixed; inset:0; z-index:1000; display:flex; align-items:flex-start; justify-content:center; padding-top:18vh; background:transparent; }
.matlsq .pm-pop { position:relative; max-width:440px; width:calc(100% - 32px); background:var(--surface); border:1px solid var(--panel-border-inner);
  border-left:3px solid var(--red); border-radius:0 var(--radius-card) var(--radius-card) 0; padding:16px 18px 14px;
  box-shadow:0 12px 36px color-mix(in srgb, var(--body) 22%, transparent); animation:mlq-gj-fadeIn .18s ease; }
.matlsq .pm-pop-title { font-family:var(--sans); font-size:.62rem; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:var(--red); margin:0 26px 8px 0; }
.matlsq .pm-pop-body { font-size:.82rem; line-height:1.6; color:var(--body); }
.matlsq .pm-pop-body b { color:var(--accent); }
.matlsq .pm-pop-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.matlsq .pm-pop-x { position:absolute; top:8px; right:8px; background:none; border:none; box-shadow:none; color:var(--muted); font-size:.9rem; padding:2px 6px; letter-spacing:0; }
.matlsq .pm-pop-x:hover { color:var(--body); }
.matlsq { --rd-w: 52px; }
.matlsq .rd-arrow.on { opacity:1; color:var(--tab-active-color); background:var(--accent); border-color:var(--accent); }
.matlsq .cell.rd-cell { width:var(--rd-w); min-width:var(--rd-w); height:var(--pm-h); padding:0; font-size:.78rem; }
.matlsq .cell.rd-cell.rd-zero { color:var(--muted); }
.matlsq .cell.rd-cell.rd-line { background:color-mix(in srgb, var(--accent) 9%, var(--tag-bg)); border-color:color-mix(in srgb, var(--accent) 45%, var(--panel-border-inner)); }
.matlsq .cell.rd-cell.rd-rowcell.rd-sel { box-shadow:inset 0 0 0 1px var(--accent); }
.matlsq .cell.rd-cell.rd-rowcell.rd-rowhot { background:color-mix(in srgb, var(--green) 12%, var(--tag-bg)); }
.matlsq .cell.rd-cell.rd-rowcell.rd-rowdone { background:color-mix(in srgb, var(--green) 16%, var(--tag-bg)); color:var(--green); }
.matlsq .cell.rd-cell.rd-diag { box-shadow:0 0 0 2px var(--accent); font-weight:800; color:var(--accent); }
.matlsq .cell.rd-cell.gjb-target { box-shadow:0 0 0 2px var(--accent); border-radius:18px; font-weight:800; color:var(--accent); }
.matlsq .cell.rd-cell.gjb-source { background:color-mix(in srgb, var(--green) 18%, var(--tag-bg)); color:var(--green); font-weight:700; }
.matlsq .cell.rd-cell.gjb-picked { outline:2px dashed var(--accent); outline-offset:-2px; }
.matlsq .cell.rd-cell.gjb-bad { box-shadow:0 0 0 2px var(--red); border-radius:18px; color:var(--red); font-weight:800; }
.matlsq .gjb-pickmode .cell.rd-cell:not(.dp-ghost) { cursor:cell; }
.matlsq .rd-final .dp-lbl { color:var(--accent); }
.matlsq .rd-hops .dim-controls { margin:0; }
.matlsq .dim-controls .pm-switch.rd-combine { margin-left:8px; }
.matlsq .dp-ans .op-chip { align-self:center; }
@media (max-width:640px) {
  .matlsq { --rd-w: 42px; }
}
.matlsq { --ik-w: 46px; --ik-h: 32px; --ik-lw: 26px; --ik-yellow: #b57614; }
.matlsq html.dark, .matlsq :root[data-theme="dark"] { --ik-yellow: #fabd2f; }
.matlsq .ik-grid { position:relative; display:flex; flex-direction:column; gap:3px; padding:4px 10px 4px 0; }
.matlsq .ik-nolbl .ik-grid { padding-left:10px; }
.matlsq .ik-grid::before, .matlsq .ik-grid::after { content:''; position:absolute; top:0; bottom:0; width:7px;
  border:2px solid var(--muted); opacity:.55; pointer-events:none; }
.matlsq .ik-grid::before { left:calc(var(--ik-lw) + 2px); border-right:none; border-radius:4px 0 0 4px; }
.matlsq .ik-nolbl .ik-grid::before { left:0; }
.matlsq .ik-grid::after { right:0; border-left:none; border-radius:0 4px 4px 0; }
.matlsq .cell.ik-cell { width:var(--ik-w); min-width:var(--ik-w); height:var(--ik-h); padding:0 4px; font-size:.78rem;
  transition:background .6s ease, box-shadow .6s ease, color .6s ease, opacity .6s ease; }
.matlsq .cell.ik-cell.ik-zero { color:var(--muted); }
.matlsq .cell.ik-cell.ik-expr { width:auto; min-width:calc(92px * var(--fs, 1)); max-width:none; justify-content:flex-start; padding:0 10px;
  font-family:var(--mono); font-weight:500; color:var(--accent); background:transparent; border-style:dashed; }
.matlsq .cell.ik-cell.ik-sel1, .matlsq .cell.ik-cell.ik-sel2 { border-color:var(--accent); }
.matlsq .ikp-tools { width:100%; max-width:760px; display:flex; flex-direction:column; gap:10px; }
.matlsq .ikp-toolrow .history-wrap { flex:1 1 200px; min-width:0; }
.matlsq .cell.dp-out.ikp-fixed { color:var(--green); background:color-mix(in srgb, var(--green) 8%, var(--tag-bg)); }
.matlsq .ikp-final { overflow-x:auto; }
.matlsq .ik-panel .eg-sec-t { text-align:left; }
.matlsq .ik-stage .pm-prompt { margin-top:-6px; }
.matlsq .cell.ikp-off { background:transparent; color:var(--muted); border-style:dashed; }
.matlsq .cell.ik-cell.ik-piv { box-shadow:inset 0 0 0 1.5px var(--accent); border-radius:14px; color:var(--accent); font-weight:800; }
.matlsq .cell.ik-cell.ik-piv.fresh { animation:mlq-piv-in .9s ease; }
.matlsq .cell.ik-cell.ik-active { background:color-mix(in srgb, var(--accent) 14%, var(--tag-bg)); }
.matlsq .cell.ik-cell.ik-shade { background:color-mix(in srgb, var(--red) 13%, var(--tag-bg)); }
.matlsq .cell.ik-cell.ik-clearing { box-shadow:inset 0 0 0 1.5px var(--red); border-radius:14px; color:var(--red); }
.matlsq .cell.ik-cell.ik-colhot, .matlsq .cell.ik-cell.ik-rowhot { background:color-mix(in srgb, var(--accent) 12%, var(--tag-bg)); color:var(--accent); }
.matlsq .cell.ik-cell.ik-dim { opacity:.35; }
.matlsq .cell.ik-cell.ik-feed { background:color-mix(in srgb, var(--green) 15%, var(--tag-bg)); color:var(--green); font-weight:700; }
.matlsq .cell.ik-cell.ik-feedcol { background:color-mix(in srgb, var(--green) 8%, var(--tag-bg)); }
.matlsq .cell.ik-cell.ik-srcline { box-shadow:inset 0 -1.5px 0 color-mix(in srgb, var(--green) 55%, transparent); }
.matlsq .cell.ik-cell.ik-swapline { background:color-mix(in srgb, var(--accent) 8%, var(--tag-bg)); }
.matlsq .cell.ik-cell.ik-zeroline { background:color-mix(in srgb, var(--green) 10%, var(--tag-bg)); }
.matlsq .cell.ik-cell.ik-zeroline.ik-rb, .matlsq .cell.ik-cell.ik-expr.ik-zeroline { color:var(--green); font-weight:700; }
.matlsq .cell.ik-cell.ik-target { box-shadow:0 0 0 2px var(--accent); border-radius:14px; font-weight:800; color:var(--accent); }
.matlsq .cell.ik-cell.ik-source { background:color-mix(in srgb, var(--green) 18%, var(--tag-bg)); color:var(--green); font-weight:700; }
.matlsq .cell.ik-cell.ik-picked { outline:2px dashed var(--accent); outline-offset:-2px; }
.matlsq .cell.ik-cell.ik-bad { box-shadow:0 0 0 2px var(--red); border-radius:14px; color:var(--red); font-weight:800; }
.matlsq .cell.ik-cell.ik-locate { box-shadow:0 0 0 2px var(--accent); border-radius:14px; color:var(--accent); font-weight:800; }
.matlsq .ik-vec { position:relative; display:flex; flex-direction:column; gap:3px; padding:4px 9px; }
.matlsq .ik-vec::before, .matlsq .ik-vec::after { content:''; position:absolute; top:0; bottom:0; width:6px; border:2px solid var(--muted); opacity:.55; }
.matlsq .ik-vec::before { left:0; border-right:none; border-radius:4px 0 0 4px; }
.matlsq .ik-vec::after { right:0; border-left:none; border-radius:0 4px 4px 0; }
.matlsq .ik-vcell { min-width:var(--ik-w); height:var(--ik-h); padding:0 6px; display:flex; align-items:center; justify-content:center;
  font-size:.78rem; font-weight:600; border-radius:6px; background:var(--tag-bg); border:1px solid var(--panel-border-inner); white-space:nowrap; }
.matlsq .ik-vec.ik-res .ik-vcell { color:var(--accent); background:color-mix(in srgb, var(--accent) 7%, var(--tag-bg)); }
.matlsq .ik-vec.ik-exprvec .ik-vcell { font-family:var(--mono); font-weight:500; font-size:.74rem; justify-content:flex-start; }
.matlsq .ik-vec.ik-colhot .ik-vcell, .matlsq .ik-vec.ik-colpiv .ik-vcell { border-color:color-mix(in srgb, var(--accent) 55%, var(--panel-border-inner)); color:var(--accent); }
.matlsq .ik-vec.ik-colfree .ik-vcell { border-color:color-mix(in srgb, var(--green) 55%, var(--panel-border-inner)); color:var(--green); }
.matlsq .ik-mul, .matlsq .ik-comb { display:flex; align-items:center; gap:8px; flex-wrap:nowrap; }
.matlsq .ik-mul > .matrix-wrap { position:relative; }
.matlsq .ik-mul > .matrix-wrap > .matrix-label { position:absolute; bottom:100%; left:50%; transform:translateX(-50%); margin-bottom:4px; white-space:nowrap; }
.matlsq .ik-mul:has(> .matrix-wrap > .matrix-label) { padding-top:1.4em; }
.matlsq .ik-liftzone .ik-vec { --ik-w:calc(30px * var(--fs, 1)); --ik-h:calc(22px * var(--fs, 1)); }
.matlsq .ik-liftzone .ik-vcell { font-size:.8em; }
.matlsq .ik-dimmed .cell.ik-cell:not(.ik-lit) { opacity:.25; }
.matlsq .cell.ik-cell.ik-colfreehot { background:color-mix(in srgb, var(--green) 14%, var(--tag-bg)); color:var(--green); font-weight:700; }
.matlsq .cell.ik-cell.ik-gone { opacity:.14; }
.matlsq .cell.ik-cell.ik-unit { box-shadow:inset 0 0 0 1.5px var(--accent); font-weight:700; }
.matlsq .ik-canvas.ik-movie .ik-panel { display:none; }
.matlsq .ik-canvas.ik-movie .ik-leftside { flex:1 1 100%; width:100%; overflow:visible; }
.matlsq .ik-canvas:has(.svd-host) .ik-leftside { flex:1 1 100%; width:100%; overflow:visible; }
.matlsq .pm-hints.svd-starts { flex-wrap:nowrap; white-space:nowrap; align-self:flex-start; }
.matlsq .svd-prod .dp-cell { font-size:.95rem; width:auto; min-width:calc(40px * var(--fs, 1)); padding:0 .35em; box-sizing:border-box; }
.matlsq .svd-prod .dp-sum { font-size:1rem; }
.matlsq .svd-prod .dp-sum.final { font-size:1.1rem; }
.matlsq .svd-prod .matrix-label { font-size:.66rem; }
.matlsq .svd-step.on { background:color-mix(in srgb, var(--accent) 10%, transparent); border-color:color-mix(in srgb, var(--accent) 50%, transparent); }
.matlsq .svd-step.on .svd-step-n { background:var(--accent); border-color:var(--accent); color:var(--bg); }
.matlsq .svd-step.on .svd-step-d { max-height:9em; opacity:1; }
.matlsq .svd-step.done .svd-step-t { color:var(--muted); font-weight:600; }
.matlsq .svd-step.done .svd-step-n { border-color:color-mix(in srgb, var(--green) 70%, transparent); color:var(--green); }
.matlsq .ik-canvas:has(.svd-host) .sp-right:empty { display:none; }
.matlsq .mv-name .sp-ml { text-transform:none; letter-spacing:.04em; font-family:var(--mono); font-size:1.15em; }
.matlsq .sp-choice-timer { height:3px; margin:.55em auto 0; width:min(16em, 80%); border-radius:2px; background:color-mix(in srgb, var(--muted) 20%, transparent); overflow:hidden; }
.matlsq .sp-choice-timer i { display:block; height:100%; width:100%; background:var(--accent); transform-origin:left; animation:mlq-spTimer linear forwards; }
.matlsq .ik-param .ik-pvec .ik-vcell { justify-content:flex-start; gap:.35em; font-family:var(--mono); font-size:.78rem; white-space:nowrap; min-width:calc(46px * var(--fs, 1)); }
.matlsq .ik-pgrid .ik-vcell { min-width:calc(40px * var(--fs, 1)); }
.matlsq .ik-stage { gap:18px; }
.matlsq .ik-canvas { display:flex; align-items:center; justify-content:center; gap:22px; flex-wrap:wrap; width:100%; }
.matlsq .ik-leftside { flex:0 1 auto; max-width:100%; overflow-x:auto; padding:6px 4px; display:flex; }
.matlsq .ik-leftside > * { margin:0 auto; flex-shrink:0; }
.matlsq .ik-panel { flex:0 1 auto; min-width:calc(260px * var(--fs, 1)); max-width:460px; text-align:left; gap:4px; }
.matlsq .ik-line { font-size:.82rem; line-height:1.65; color:var(--body); margin:3px 0; }
.matlsq .ik-line.ik-head { font-family:var(--mono); color:var(--accent); font-size:.86rem; }
.matlsq .ik-line.ik-hot { color:var(--accent); }
.matlsq .ik-line.eqa { font-family:var(--mono); }
.matlsq .ik-eq.ik-head { color:var(--accent); }
.matlsq .ik-stage .ik-canvas { transition:opacity 1.1s ease, filter 1.1s ease; }
.matlsq .ik-stage.ik-veiled .ik-canvas { opacity:.12; filter:blur(1.5px); }
.matlsq .pm-switch.mlq-ik-glow .sw { box-shadow:0 0 0 2px color-mix(in srgb, var(--ik-yellow) 55%, transparent), 0 0 12px color-mix(in srgb, var(--ik-yellow) 45%, transparent);
  animation:mlq-ik-glow 2.4s ease-in-out infinite; }
.matlsq .pm-switch.mlq-ik-glow span:last-child { color:var(--ik-yellow); transition:color .6s; }
.matlsq .ik-dot .dp-cell { width:auto; min-width:calc(40px * var(--fs, 1)); padding:0 6px; white-space:nowrap; }
.matlsq .cell.ik-rcell { min-width:var(--ik-w); width:auto; height:var(--ik-h); padding:0 6px; font-size:.78rem; }
.matlsq .ik-vcell.inp-pair-col, .matlsq .ik-vcell.inp-col { border-style:solid; }
.matlsq .ik-overlay.show { opacity:1; }
.matlsq .ik-try.in { opacity:1; }
.matlsq .ik-try.out { opacity:0; }
@media (prefers-reduced-motion: reduce) {
  .matlsq .ik-try span, .matlsq .pm-switch.mlq-ik-glow .sw { animation:none; }
}
@media (max-width:640px) {
  .matlsq { --ik-w: 38px; --ik-h: 28px; --ik-lw: 20px; }
  .matlsq .cell.ik-cell, .matlsq .ik-vcell { font-size:.72rem; }
  .matlsq .ik-mul { gap:5px; }
  .matlsq .ik-panel { min-width:0; width:100%; }
}
.matlsq .eg-stage2 { gap:16px; }
.matlsq .eg-steplbl { position:absolute; top:12px; left:18px; font-family:var(--sans); font-size:.54rem; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); }
.matlsq .eg-layer { width:100%; display:none; }
.matlsq .eg-v-eq .eg-eqlayer, .matlsq .eg-v-work .eg-worklayer { display:block; animation:mlq-eg-in .7s ease; }
.matlsq .eg-eqrow { display:flex; align-items:center; justify-content:center; gap:28px; flex-wrap:wrap; padding-top:14px; }
.matlsq .eg-eqbox { flex:1 1 380px; max-width:720px; min-width:0; }
.matlsq .eg-eq { position:relative; width:100%; height:1.9em; font-family:var(--serif); font-size:clamp(1.6rem, 5.2vw, 2.7rem); color:var(--body); }
.matlsq .eg-eq-m { position:absolute; left:0; top:0; visibility:hidden; white-space:nowrap; pointer-events:none; }
.matlsq .eg-t { position:absolute; left:0; bottom:calc(.35em + var(--dy, 0em)); line-height:1; white-space:nowrap; font-style:italic; opacity:0;
  transition:left 1.15s cubic-bezier(.45,.05,.25,1), bottom 1.15s cubic-bezier(.45,.05,.25,1), opacity .8s ease, font-size .9s ease, color .8s ease; }
.matlsq .eg-eq-m .eg-t { position:static; display:inline-block; opacity:1; transition:none; }
.matlsq .eg-eq > .eg-t { margin:0 !important; }
.matlsq .eg-t.on { opacity:1; }
.matlsq .eg-t.lift { bottom:calc(.43em + var(--dy, 0em)); }
.matlsq .eg-t[data-t="v1"], .matlsq .eg-t[data-t="v2"] { font-style:normal; font-weight:700; }
.matlsq .eg-t.big { font-size:1.15em; }
.matlsq .eg-t[data-t="minus"], .matlsq .eg-t[data-t="eq"], .matlsq .eg-t[data-t="lp"], .matlsq .eg-t[data-t="rp"], .matlsq .eg-t[data-t="zero"], .matlsq .eg-t[data-t="det"] { font-style:normal; }
.matlsq .eg-t[data-t="minus"], .matlsq .eg-t[data-t="eq"] { margin:0 .28em; }
.matlsq .eg-t[data-t="det"] { margin-right:.1em; }
.matlsq .eg-t[data-t="vne"] { font-size:.46em; margin-left:1.4em; color:var(--muted); font-style:normal; bottom:calc(.8em + var(--dy, 0em)); }
.matlsq .eg-t.hot { color:var(--accent); }
.matlsq .eg-cap { font-family:var(--serif); font-style:italic; color:var(--muted); font-size:1.05rem; min-height:1.7em; text-align:center; margin-top:4px; }
.matlsq .eg-right .ik-panel { min-width:calc(260px * var(--fs, 1)); }
.matlsq .eg-poly { font-family:var(--serif); font-size:1.45rem; color:var(--body); padding:8px 18px; border:1px solid var(--panel-border-inner); border-radius:var(--radius-card); background:var(--tag-bg); white-space:nowrap; width:max-content; max-width:100%; box-sizing:border-box; }
.matlsq .eg-cand.cur { border-color:var(--accent); color:var(--accent); }
.matlsq .eg-cand.miss { opacity:.4; text-decoration:line-through; }
.matlsq .eg-cand.more { border-style:dashed; }
.matlsq .ik-line.eg-hitline { color:var(--green); }
.matlsq .ik-line.eg-missline { color:var(--muted); }
.matlsq .eg-lc { text-transform:none; }
.matlsq .op-chip.eg-chipdone { border-color:color-mix(in srgb, var(--green) 60%, transparent); color:var(--green); }
@media (prefers-reduced-motion: reduce) {
  .matlsq .eg-t { transition:none; }
  .matlsq .eg-v-eq .eg-eqlayer, .matlsq .eg-v-work .eg-worklayer { animation:none; }
}
@media (max-width:640px) {
  .matlsq .eg-poly { font-size:1.1rem; padding:6px 10px; }
  .matlsq .eg-right .ik-panel { min-width:0; width:100%; }
  .matlsq .eg-steplbl { position:static; }
}
.matlsq { --gjx-w: 64px; }
.matlsq .eg-lamcard .ik-canvas { align-items:flex-start; }
.matlsq .pm-srcwrap .matrix-title { margin-bottom:0; }
.matlsq .styled-select-wrap.mlq-ik-glow select { box-shadow:0 0 0 2px color-mix(in srgb, var(--ik-yellow) 55%, transparent), 0 0 12px color-mix(in srgb, var(--ik-yellow) 45%, transparent);
  border-color:var(--ik-yellow); animation:mlq-ik-glowsel 2.4s ease-in-out infinite; }
@media (max-width:640px) {
  .matlsq { --gjx-w: 48px; }
}
.matlsq .sectabs .subtab-btn { font-size:.68rem; padding:8px 20px; }
.matlsq .matrix-block.re-solo { border:2px solid var(--accent); border-radius:6px; padding:8px 10px; }
.matlsq .mat-row.re-head { height:calc(22px * var(--fs, 1)); }
.matlsq .re-labs .row-label:first-child { height:calc(22px * var(--fs, 1)); }
.matlsq .mat-cell.re-v { font-family:var(--mono); font-size:.8rem; color:var(--muted); letter-spacing:.04em; }
.matlsq .mat-cell.re-v.re-piv { color:var(--accent); font-weight:700; }
.matlsq .mat-cell.re-v.re-free { color:var(--green); font-weight:700; }
.matlsq .mat-cell.re-zero { color:var(--muted); }
.matlsq .mat-cell.re-feed { color:var(--green); font-weight:700; background:color-mix(in srgb, var(--green) 14%, transparent); }
.matlsq .mat-cell.re-feedpiv { background:color-mix(in srgb, var(--accent) 12%, transparent); }
.matlsq .re-vecwrap { display:flex; flex-direction:column; align-items:center; gap:4px; position:relative; }
.matlsq .re-vecwrap > .matrix-label { position:absolute; bottom:100%; left:50%; transform:translateX(-50%); margin-bottom:4px; white-space:nowrap; }
.matlsq .ik-mul:has(.re-vecwrap > .matrix-label) { padding-top:1.4em; }
.matlsq .ik-mul.og-row { padding-top:1.4em; align-items:center; }
.matlsq .ik-mul.og-row > .re-vecwrap, .matlsq .ik-mul.og-row > .ik-vec { align-self:center; }
.matlsq .ik-vec.re-faded { opacity:.4; }
@media(max-width:640px) {
  .matlsq .cell {width:calc(34px * var(--fs, 1));height:calc(28px * var(--fs, 1));font-size:.74rem;}
  .matlsq .dp-cell {width:calc(34px * var(--fs, 1));height:calc(28px * var(--fs, 1));font-size:.76rem;}
  .matlsq .mat-cell, .matlsq .int-cell, .matlsq .int-right-cell {width:calc(54px * var(--fs, 1));font-size:.8rem;}
  .matlsq {--pm-w:34px;--pm-h:28px;--pm-cw:44px;}
  .matlsq .pm-rate {margin-left:0;}
}
.matlsq .lu-panel .matrix-wrap, .matlsq .lu-eq .matrix-wrap { display:flex; flex-direction:column; align-items:center; gap:4px; }
.matlsq .lu-grid { display:grid; gap:4px; }
.matlsq .lu-grid > * { width:calc(52px * var(--fs, 1)) !important; min-width:calc(52px * var(--fs, 1)); height:calc(36px * var(--fs, 1)); box-sizing:border-box; display:flex; align-items:center; justify-content:center; text-align:center; }
.matlsq .eg-cell.lu-unk, .matlsq .cell.lu-unk { color:var(--muted); }
.matlsq .sp-stage { position:relative; }
.matlsq .sp-choice { display:flex; flex-direction:column; align-items:center; gap:8px; margin:6px auto 4px; padding:12px 18px; border:1px solid var(--accent);
  border-radius:10px; background:color-mix(in srgb, var(--accent) 7%, var(--surface)); max-width:640px; animation:mlq-eg-in .5s ease; }
.matlsq .sp-choice[hidden] { display:none; }
.matlsq .sp-choice-q { font-size:.9rem; color:var(--body); text-align:center; }
.matlsq .sp-choice-row { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.matlsq .sp-choice-note { font-size:.76rem; color:var(--muted); text-align:center; }
.matlsq .sp-opt.sp-def { border-color:var(--accent); color:var(--accent); }
.matlsq .sp-opt.sp-on { background:var(--accent); color:var(--tab-active-color); border-color:var(--accent); }
.matlsq .sp-hero { font-family:var(--serif); font-style:italic; font-size:2.1rem; color:var(--body); padding:18px 26px; border-radius:10px; white-space:nowrap; }
.matlsq .mlq-sp-pulse { animation:mlq-sp-pulse 1.6s ease 1; border-radius:8px; }
.matlsq .matrix-label .sp-ml { text-transform:none; font-family:var(--mono); letter-spacing:.04em; font-size:.74rem; }
.matlsq .sp-lc { text-transform:none; letter-spacing:.04em; }
.matlsq .tab-btn .sp-lc, .matlsq .gj-explain-phase .sp-lc, .matlsq .pm-switch .sp-lc, .matlsq .eg-sec-t .sp-lc, .matlsq .subtab-btn .sp-lc {
  font-family:var(--serif); font-style:italic; font-size:1.3em; letter-spacing:0; line-height:0; vertical-align:baseline; position:relative; top:-0.02em; }
.matlsq .sp-geo { margin:6px auto 0; max-width:720px; font-size:.74rem; color:var(--muted); text-align:center; opacity:.85; }
.matlsq .sp-geo[hidden] { display:none; }
.matlsq .ls-host { position:relative; }
.matlsq .ls-big { width:min(860px, calc(100vw - 90px)); height:440px; }
.matlsq .ls-mid { width:min(680px, calc(100vw - 90px)); height:360px; }
.matlsq .ls-plot { position:relative; width:100%; height:100%; }
.matlsq .ls-plot canvas { width:100%; height:100%; display:block; touch-action:none; border-radius:8px; outline:none; border:1px solid var(--panel-border-inner); }
.matlsq .ls-count { position:absolute; left:12px; top:calc(26px * var(--fs, 1)); padding:6px 10px; border-radius:8px; border:1px solid var(--panel-border-inner);
  background:color-mix(in srgb, var(--surface) 88%, transparent); pointer-events:none; }
.matlsq .ls-count[hidden] { display:none; }
.matlsq .ls-cnt-l { font-size:.6rem; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.matlsq .ls-cnt-v { font-family:var(--mono); font-size:1.15rem; color:var(--accent); font-weight:700; }
.matlsq .ls-cnt-b { font-family:var(--mono); font-size:1rem; color:var(--green); font-weight:700; }
.matlsq .ls-tip { display:none; }
.matlsq .ls-pts { width:240px; max-width:100%; font-family:var(--mono); font-size:.8rem; background:var(--tag-bg); color:var(--body);
  border:1px solid var(--panel-border-inner); border-radius:6px; padding:6px 8px; margin-top:8px; resize:vertical; }
.matlsq .ls-num { width:64px; font-family:var(--mono); background:var(--tag-bg); color:var(--body); border:1px solid var(--panel-border-inner); border-radius:6px; padding:3px 6px; }
.matlsq .ls-editor .dim-controls { flex-wrap:wrap; row-gap:6px; }
.matlsq .ls-ed { display:flex; gap:14px; align-items:flex-start; }
.matlsq .ls-ed-l { display:flex; flex-direction:column; gap:6px; width:380px; max-width:100%; }
.matlsq .ls-ed-l .dim-controls { margin-bottom:0; }
.matlsq .ls-ed-l .cf-eqrow { margin-top:0; }
.matlsq .ls-ed-l .dp-q-note { max-width:380px; text-align:left; margin:0; }
.matlsq .ls-ed-l .ls-msg:empty { display:none; }
.matlsq .ls-ed .ls-pts { width:170px; flex-shrink:0; }
.matlsq .ls-ed-l .pm-hints { border:0; padding:0; margin:2px 0 0; }
.matlsq .ls-cpanel .matrices-row { flex:0 1 auto; }
.matlsq .ls-cpanel .controls-row { flex:1 1 300px; }
@media (max-width:760px) {
  .matlsq .ls-ed { flex-wrap:wrap; }
  .matlsq .ls-editor, .matlsq .ls-cpanel .matrices-row { min-width:0; max-width:100%; }
  .matlsq .ls-ed-l { width:100%; }
  .matlsq .ls-ed .ls-pts { width:100%; flex-shrink:1; }
  .matlsq .cf-editor { min-width:0; }
}
.matlsq .cf-editor .cf-eqin { width:auto; }
.matlsq .ls-editor .dp-q-note { max-width:330px; }
.matlsq .ba-c.ba-in > input, .matlsq .ba-c.ba-in > .cell { width:3.6em; min-width:0; margin:0; text-align:center; }
.matlsq .ba-c.ba-in.og-wide > input, .matlsq .ba-c.ba-in.og-wide > .cell { width:4.8em; }
.matlsq .ba-c.ba-in > .cell, .matlsq .ba-c.ba-in.og-wide > .cell, .matlsq .sp-padv .cell.dp-sm { width:max-content; min-width:3.6em; flex-shrink:0; padding:0 .4em; box-sizing:border-box; }
.matlsq .ba-c.ba-in:has(> .cell) { width:auto; }
.matlsq .og-box > input, .matlsq .og-box > .cell { width:4em; margin:0; }
.matlsq .ba-sumrow > .ik-line { margin:0; }
.matlsq .cf-wrap { display:flex; gap:18px; align-items:flex-start; justify-content:center; flex-wrap:wrap; width:min(1080px, calc(100vw - 90px)); }
.matlsq .cf-cv { flex:1 1 420px; max-width:520px; height:400px; }
.matlsq .cf-board { flex:1 1 400px; max-width:560px; display:flex; flex-direction:column; gap:12px; align-items:center; min-height:120px; }
.matlsq .cf-tpl { font-family:var(--serif); font-size:1.35rem; color:var(--body); text-align:center; padding:6px 12px; }
.matlsq .cf-tpl.cf-small { font-size:1.05rem; }
.matlsq .cf-u { color:var(--accent); font-weight:700; font-style:italic; }
.matlsq .cf-v { font-style:italic; }
.matlsq .cf-n { color:var(--green); font-weight:600; display:inline-block; }
.matlsq .cf-c { display:inline-block; }
.matlsq .cf-tpl-lin .cf-u { text-decoration:underline; text-decoration-color:color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset:4px; }
.matlsq .cf-eqs { display:flex; flex-direction:column; gap:4px; font-family:var(--mono); font-size:.8rem; width:100%; }
.matlsq .cf-eq { padding:3px 8px; border-radius:6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex-shrink:0; }
.matlsq .cf-eq[hidden], .matlsq .cf-eqsum[hidden] { display:none; }
.matlsq .cf-dots { text-align:center; color:var(--muted); line-height:1; }
.matlsq .cf-eqsum { margin-top:4px; padding:2px 8px; font-size:.7rem; color:var(--muted); border-top:1px solid var(--panel-border-inner); text-align:right; }
.matlsq .cf-eq.cf-hot { background:color-mix(in srgb, var(--accent) 12%, transparent); }
.matlsq .cf-eq .cf-u { font-family:var(--serif); font-size:.95rem; }
.matlsq .cf-row { flex-wrap:wrap; row-gap:8px; justify-content:center; }
.matlsq .cf-mat .eg-cell { min-width:52px; font-size:.78rem; }
.matlsq .cf-small2 .cf-mat .eg-cell { min-width:40px; font-size:.68rem; padding:2px 4px; }
.matlsq .cf-mat .eg-cell.cf-bar { margin-left:10px; position:relative; }
.matlsq .cf-sol { display:flex; flex-direction:column; gap:4px; font-family:var(--mono); align-items:center; }
.matlsq .cf-fitted { font-family:var(--mono); font-size:.78rem; text-align:center; }
.matlsq .cf-editor { min-width:280px; }
.matlsq .cf-eqrow { display:flex; gap:8px; align-items:center; margin-top:8px; }
.matlsq .cf-eqin { flex:1; min-width:200px; width:260px; font-family:var(--mono); font-size:.76rem; background:var(--tag-bg); color:var(--body); border:1px solid var(--panel-border-inner); border-radius:6px; padding:5px 8px; }
.matlsq .la-top { display:flex; gap:18px; align-items:flex-start; justify-content:center; flex-wrap:wrap; width:100%; }
.matlsq .la-cv { flex:0 1 420px; width:min(420px, calc(100vw - 90px)); height:340px; }
.matlsq .la-work { flex:1 1 460px; display:flex; flex-direction:column; gap:14px; align-items:center; }
.matlsq .la-boardwrap { margin-top:14px; position:relative; }
.matlsq .la-work .la-hotrow { box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
.matlsq .la-help { display:flex; flex-direction:column; align-items:center; gap:4px; margin-bottom:6px; }
.matlsq .la-help .cf-row { transform-origin:top center; }
.matlsq .la-help .la-say { text-align:center; }
.matlsq .la-help .la-calc { font-family:var(--mono); font-size:.8rem; color:var(--accent); min-height:1.2em; }
.matlsq .la-pick .la-hc { cursor:pointer; }
.matlsq .la-pick .la-hc:hover { border-color:var(--accent); }
.matlsq .la-copy { position:absolute; z-index:20; transform:translate(-50%, -100%); display:flex; gap:6px; padding:6px; border-radius:9px; background:var(--surface); border:1px solid var(--panel-border-inner); box-shadow:0 6px 18px rgba(0,0,0,.14); animation:mlq-fadein .15s ease; }
.matlsq .la-copy[hidden] { display:none; }
.matlsq .la-copy .btn-secondary { white-space:nowrap; text-transform:none; letter-spacing:.02em; font-family:var(--sans); font-size:.78rem; padding:5px 10px; }
.matlsq .la-board .gjx-rb { cursor:pointer; }
.matlsq .sp-pad .sp-padvs { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; }
.matlsq .sp-padv { cursor:pointer; padding:4px 6px; border-radius:9px; border:1px dashed var(--panel-border-inner); transition:border-color .2s, background .2s; }
.matlsq .sp-padv:hover, .matlsq .sp-padv:focus-visible { border-color:var(--accent); outline:none; }
.matlsq .sp-padv.on { border:1px solid var(--accent); background:color-mix(in srgb, var(--accent) 10%, transparent); }
.matlsq .sp-pad-log { display:flex; flex-direction:column; gap:3px; align-items:center; font-family:var(--mono); font-size:.8rem; margin-top:6px; }
.matlsq .sp-pad-e { color:var(--muted); }
.matlsq .sp-pad-e:first-child { color:var(--body); }
.matlsq .sp-pad-new .sp-pad-t { animation:mlq-fadein .35s ease both; }
.matlsq .sps-grid { display:flex; flex-direction:column; gap:16px; align-items:center; width:100%; }
.matlsq .sps-step { min-width:320px; max-width:760px; }
.matlsq .sps-step .ik-mul, .matlsq .sps-step .lu-mats, .matlsq .sps-step .qz-row { justify-content:center; }
.matlsq .dp-in.sps-wide, .matlsq .cell.sps-wide { width:calc(84px * var(--fs, 1)); min-width:calc(84px * var(--fs, 1)); }
.matlsq .sps-wgrid > * { width:calc(84px * var(--fs, 1)) !important; min-width:calc(84px * var(--fs, 1)); height:34px; box-sizing:border-box; display:flex; align-items:center; justify-content:center; }
.matlsq .mat-cell.re-bar { margin-left:16px; position:relative; }
.matlsq .mat-cell.re-bar::before { content:''; position:absolute; left:-10px; top:-4px; bottom:-4px; border-left:2px solid var(--panel-border-inner); }
.matlsq .mat-cell.sx-freecol { background:color-mix(in srgb, var(--green) 12%, transparent); }
.matlsq .ik-vcell.sx-hot { border-color:var(--green)!important; background:rgba(74,124,63,.16); color:var(--green); font-weight:700; }
.matlsq .ik-vcell.sx-mute { color:var(--muted); }
.matlsq .sx-col { display:flex; flex-direction:column; gap:4px; }
.matlsq .sx-col > * { width:calc(56px * var(--fs, 1)) !important; min-width:calc(56px * var(--fs, 1)); height:34px; box-sizing:border-box; display:flex; align-items:center; justify-content:center; text-align:center; }
.matlsq .sp-padv .sx-col > .cell { width:max-content !important; padding:0 .4em; }
.matlsq .btn-secondary.sx-on { background:var(--accent); color:var(--tab-active-color); border-color:var(--accent); }
.matlsq .btn-secondary.sx-on:disabled { opacity:1; }
.matlsq .pm-in.sx-focus { box-shadow:0 0 0 2px var(--green); }
.matlsq .ba-cases .replace-opt.active { color:var(--tab-active-color); }
.matlsq .pm-ctl-line .gj-ctrl-group, .matlsq .pm-ctl-line .speed-group { flex-direction:row; align-items:center; gap:6px; }
.matlsq .stage-mode .aug-wrap, .matlsq .stage-mode .int-aug-outer, .matlsq .stage-mode .ikp-final, .matlsq .stage-mode .ik-leftside { overflow:visible; }
.matlsq .aug-wrap, .matlsq .history-wrap, .matlsq .int-aug-outer, .matlsq .ikp-final, .matlsq .ik-leftside { scrollbar-width:thin; scrollbar-color:color-mix(in srgb, var(--muted) 35%, transparent) transparent; }
.matlsq .stage-mode { background:var(--bg); overflow-y:auto; padding:18px 24px 96px; box-sizing:border-box; border-radius:0; display:flex; flex-direction:column; gap:14px; }
.matlsq .stage-mode.pm-fixed { position:fixed; inset:0; z-index:900; visibility:visible; }
html.pm-embed .matlsq .container .stage-mode { visibility:visible; }
.matlsq .stage-mode .pm-fsm-card, .matlsq .stage-mode > .hint-text, .matlsq .stage-mode > .subtabs, .matlsq .stage-mode .config-panel { display:none !important; }
.matlsq .stage-mode .pm-fsm-card[data-fsm-keep] { display:flex !important; justify-content:center; background:none; border:0; flex-wrap:wrap; }
.matlsq .stage-mode .pm-fsm-card[data-fsm-keep] > .controls-row, .matlsq .stage-mode .pm-fsm-card[data-fsm-keep] > .pm-hints { display:none !important; }
.matlsq .stage-mode > * { flex-shrink:0; margin-top:0 !important; margin-bottom:0 !important; }
.matlsq .stage-mode > *:not(.pm-fsbar):not(.pm-swap):not(.pm-pop-layer):not(.pm-hintdrop):not(.pm-pdfask) { zoom:var(--smz, 1); }
.matlsq .stage-mode .pm-fsm-card[data-fsm-keep] > * { flex:0 0 auto !important; margin-left:0 !important; }
.matlsq .stage-mode .pm-grow { display:flex; flex-direction:column; flex:1 0 auto; }
.matlsq .stage-mode .pm-grow-stage { flex:1 0 auto; justify-content:center; border-radius:0; }
.matlsq .stage-mode .gj-card.pm-grow-stage { display:flex; flex-direction:column; }
.matlsq .stage-mode .stage { border-radius:0; }
.matlsq .stage-mode::backdrop, .matlsq .ls-plot::backdrop { background:var(--bg); }
.matlsq .stage-mode .cf-wrap { width:min(calc(1080px * var(--fsk, 1)), calc((100vw - 90px) / var(--smz, 1))); }
.matlsq .stage-mode .cf-cv { height:min(calc(400px * var(--fsk, 1)), var(--fsmax, 400px)); max-width:calc(520px * var(--fsk, 1)); flex-basis:calc(420px * var(--fsk, 1)); }
.matlsq .stage-mode .cf-board { max-width:calc(560px * var(--fsk, 1)); }
.matlsq .stage-mode .ls-big { width:min(calc(860px * var(--fsk, 1)), calc((100vw - 90px) / var(--smz, 1))); height:min(calc(440px * var(--fsk, 1)), var(--fsmax, 440px)); }
.matlsq .stage-mode .ls-mid { width:min(calc(680px * var(--fsk, 1)), calc((100vw - 90px) / var(--smz, 1))); height:min(calc(360px * var(--fsk, 1)), var(--fsmax, 360px)); }
.matlsq .stage-mode .la-cv { width:min(calc(420px * var(--fsk, 1)), calc((100vw - 90px) / var(--smz, 1))); flex-basis:calc(420px * var(--fsk, 1)); height:min(calc(340px * var(--fsk, 1)), var(--fsmax, 340px)); }
.matlsq .stage-mode.pm-swapped { padding:0; }
.matlsq .stage-mode.pm-sm-land { padding:8px calc(27vw + 14px) 58px 10px; gap:8px; }
.matlsq .stage-mode.pm-sm-land > .gj-explain-box { position:fixed; top:calc(8px / var(--smz, 1)); right:calc(10px / var(--smz, 1)); width:calc(26vw / var(--smz, 1)); max-height:calc((100vh - 70px) / var(--smz, 1)); overflow-y:auto; box-sizing:border-box; z-index:2; }
.matlsq .stage-mode.pm-sm-port { padding:8px 8px 84px; gap:8px; }
.matlsq .stage-mode.pm-sm-port > .gj-explain-box { order:20; max-height:calc(28vh / var(--smz, 1)); overflow-y:auto; flex-shrink:0; }
.matlsq .stage-mode.pm-sm-port > .pm-grow, .matlsq .stage-mode.pm-sm-port > .pm-grow-stage { order:10; }
.matlsq .stage-mode.pm-sm-land .ik-canvas, .matlsq .stage-mode.pm-sm-port .ik-canvas { padding-left:6px; padding-right:6px; }
.matlsq .stage-mode.pm-swapped > .pm-fsm-card, .matlsq .stage-mode.pm-swapped > .pm-fsbar, .matlsq .stage-mode.pm-swapped > .pm-hintdrop { display:none !important; }
.matlsq .pm-scrub .progress-bar-fill, .matlsq .pm-scrub .gj-progress-bar { position:relative; }
.matlsq .pm-scrubbing .progress-bar-fill, .matlsq .pm-scrubbing .gj-progress-bar { transition:none !important; }
.matlsq .pm-hd-panel .pm-hints { border:0 !important; padding:0 !important; margin:0 !important; justify-content:center; width:100%; }
.matlsq .stage-mode > .pm-swap { flex:1 1 auto; min-height:0; border:0; border-radius:0; height:auto; }
html.pm-tex-now .matlsq *, html.pm-tex-now .matlsq *::before, html.pm-tex-now .matlsq *::after { transition:none !important; animation:none !important; }
.matlsq .pm-switch[disabled] { opacity:.45; cursor:default; }
.matlsq .stage-mode .pm-cvfs { opacity:.45; }
.matlsq .ls-plot:fullscreen { background:var(--bg); padding:16px; box-sizing:border-box; }
.matlsq .btn-run:focus-visible, .matlsq .btn-secondary:focus-visible, .matlsq .gj-btn:focus-visible, .matlsq .tab-btn:focus-visible, .matlsq .subtab-btn:focus-visible, .matlsq .pm-fsb:focus-visible, .matlsq .replace-opt:focus-visible, .matlsq select:focus-visible, .matlsq input[type=range]:focus-visible { outline:2px solid var(--head); outline-offset:2px; }
html[data-theme="a11y-hc"] .matlsq .btn-run:focus-visible, html[data-theme="a11y-hc"] .matlsq .btn-secondary:focus-visible, html[data-theme="a11y-hc"] .matlsq .gj-btn:focus-visible, html[data-theme="a11y-hc"] .matlsq .tab-btn:focus-visible, html[data-theme="a11y-hc"] .matlsq .subtab-btn:focus-visible, html[data-theme="a11y-hc"] .matlsq .pm-fsb:focus-visible { outline-width:3px; }
.matlsq .gj-explain-box, .matlsq .pm-pop-body, .matlsq .hint-text { line-height:var(--lh, 1.6); }
@keyframes mlq-eg-in { from { opacity:0; } to { opacity:1; } }
@keyframes mlq-fadein { from { opacity:0; } to { opacity:1; } }
@keyframes mlq-gj-fadeIn { from{opacity:0;transform:translateY(-5px);}to{opacity:1;transform:translateY(0);} }
@keyframes mlq-ik-glow { 0%,100% { box-shadow:0 0 0 1px color-mix(in srgb, var(--ik-yellow) 35%, transparent), 0 0 6px color-mix(in srgb, var(--ik-yellow) 25%, transparent); }
  50% { box-shadow:0 0 0 2px color-mix(in srgb, var(--ik-yellow) 60%, transparent), 0 0 14px color-mix(in srgb, var(--ik-yellow) 45%, transparent); } }
@keyframes mlq-ik-glowsel { 0%,100% { box-shadow:0 0 0 1px color-mix(in srgb, var(--ik-yellow) 35%, transparent), 0 0 6px color-mix(in srgb, var(--ik-yellow) 25%, transparent); }
  50% { box-shadow:0 0 0 2px color-mix(in srgb, var(--ik-yellow) 60%, transparent), 0 0 14px color-mix(in srgb, var(--ik-yellow) 45%, transparent); } }
@keyframes mlq-piv-in { from { box-shadow:inset 0 0 0 1.5px transparent; } to { box-shadow:inset 0 0 0 1.5px var(--accent); } }
@keyframes mlq-pm-delta { 0%{opacity:0;transform:translateY(4px)} 15%{opacity:1;transform:none} 75%{opacity:1} 100%{opacity:0} }
@keyframes mlq-pm-go { to{transform:scale(.9);opacity:0} }
@keyframes mlq-pop-in { 0%{transform:scale(.5);opacity:0}70%{transform:scale(1.1)}100%{transform:scale(1);opacity:1} }
@keyframes mlq-pulse-r { 0%,100%{box-shadow:var(--gr);}50%{box-shadow:0 0 22px rgba(181,118,20,.5);} }
@keyframes mlq-sp-pulse { 0% { box-shadow:0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70% { box-shadow:0 0 0 10px transparent; } 100% { box-shadow:0 0 0 0 transparent; } }
@keyframes mlq-spTimer { from { transform:scaleX(1); } to { transform:scaleX(0); } }
