/* Namida Lumina maths layer · styles. Uses the site's custom properties from static/css/site.css
   (--void --deep --panel --panel2 --line --line2 --ink --mist --dim --violet --magenta --light --mono --sans --serif --r).
   Fallbacks are given so the demo pages work stand-alone. No inline styles are needed (CSP style-src 'self'). */
.nlm{--nlm-sci:#8cc0ff;--nlm-model:var(--violet,#b29aff);--nlm-fic:var(--magenta,#ec8fd8);--nlm-clue:var(--light,#ffe2b8);
  --nlm-ok:#7fe0b0;--nlm-bad:#ff7a8a;color:var(--ink,#ede7f4);font-family:var(--sans,system-ui,sans-serif)}
.nlm-panel{background:var(--panel,#1b1734);border:1px solid var(--line,#352f5e);border-radius:var(--r,14px);padding:18px 20px;margin:18px 0;max-width:var(--max,1180px)}
.nlm-panel h3{font-family:var(--display,var(--serif,serif));font-weight:500;letter-spacing:.04em;margin:.1em 0 .4em;font-size:1.25rem}
.nlm-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-bottom:8px}
.nlm-chips{display:inline-flex;flex-wrap:wrap;gap:6px;vertical-align:middle}
.nlm-copy{color:var(--mist,#c0b9d6);max-width:72ch;line-height:1.55;font-size:.95rem}
.nlm-copy p{margin:.5em 0}
.nlm-mono,.nlm-readout{font-family:var(--mono,ui-monospace,monospace);font-size:.82rem;letter-spacing:.02em}
.nlm-readout{color:var(--mist,#c0b9d6);background:var(--deep,#141128);border:1px solid var(--line,#352f5e);border-radius:8px;padding:8px 10px;margin:8px 0;white-space:pre-wrap;overflow-x:auto}
.nlm-controls{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin:10px 0}
.nlm-controls label{font-size:.85rem;color:var(--mist,#c0b9d6);display:inline-flex;gap:6px;align-items:center}
.nlm-btn{font:500 .8rem/1 var(--mono,monospace);color:var(--ink,#ede7f4);background:var(--panel2,#221d42);border:1px solid var(--line2,#4a4280);border-radius:99px;padding:.55em .95em;cursor:pointer}
.nlm-btn:hover{border-color:var(--violet,#b29aff)}
.nlm-btn[aria-pressed="true"]{background:rgba(178,154,255,.18);border-color:var(--violet,#b29aff)}
.nlm :focus-visible{outline:2px solid var(--light,#ffe2b8);outline-offset:2px}
.nlm-figure{width:100%;height:auto;display:block;background:var(--void,#0d0b18);border:1px solid var(--line,#352f5e);border-radius:10px}
.nlm-todo{border:1px dashed var(--line2,#4a4280);color:var(--dim,#9a93b8);border-radius:8px;padding:8px 10px;font:400 .8rem/1.4 var(--mono,monospace);margin:8px 0}
.nlm-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.nlm-ok{color:var(--nlm-ok)}.nlm-bad{color:var(--nlm-bad)}.nlm-dim{color:var(--dim,#9a93b8)}

/* ---------- P2 science-label chip (C14) ---------- */
.nlm-chip-wrap{position:relative;display:inline-block}
.nlm-chip{display:inline-flex;align-items:center;gap:.45em;font:500 .66rem/1 var(--mono,monospace);letter-spacing:.08em;text-transform:uppercase;
  padding:.38em .7em .38em .5em;border-radius:99px;background:transparent;color:var(--ink,#ede7f4);border:1px solid;cursor:pointer;white-space:nowrap}
.nlm-chip svg{width:11px;height:11px;flex:none}
.nlm-chip--science{border-color:rgba(140,192,255,.6);background:rgba(140,192,255,.10)}
.nlm-chip--model{border-color:rgba(178,154,255,.6);background:rgba(178,154,255,.10)}
.nlm-chip--fiction{border-color:rgba(236,143,216,.6);border-style:dashed;background:rgba(236,143,216,.08)}
.nlm-chip--clue{border-color:rgba(255,226,184,.55);border-style:dotted;background:transparent}
.nlm-chip[aria-expanded="true"]{box-shadow:0 0 0 2px rgba(178,154,255,.25)}
.nlm-tip{position:absolute;z-index:20;left:0;top:calc(100% + 6px);width:min(300px,80vw);background:var(--deep,#141128);color:var(--mist,#c0b9d6);
  border:1px solid var(--line2,#4a4280);border-radius:10px;padding:10px 12px;font:400 .8rem/1.45 var(--sans,system-ui,sans-serif);text-transform:none;letter-spacing:0;box-shadow:0 8px 24px rgba(0,0,0,.45)}
.nlm-tip b{color:var(--ink,#ede7f4);font-weight:600}
.nlm-tip[hidden]{display:none}

/* ---------- SVG classes (presentation via CSS, no inline style) ---------- */
.nlm svg text{font-family:var(--mono,monospace);fill:var(--mist,#c0b9d6)}
.nlm .ax{stroke:var(--line2,#4a4280);stroke-width:1}
.nlm .grid{stroke:var(--line,#352f5e);stroke-width:.5;opacity:.6}
.nlm .cone{fill:rgba(178,154,255,.08);stroke:var(--violet,#b29aff);stroke-width:1;opacity:.85}
.nlm .cone-past{fill:rgba(140,192,255,.05);stroke:#8cc0ff;stroke-width:.8;opacity:.6;stroke-dasharray:3 3}
.nlm .wl{fill:none;stroke:var(--ink,#ede7f4);stroke-width:2;stroke-linejoin:round}
.nlm .wl.bad{stroke:var(--nlm-bad)}
.nlm .wl-hidden{fill:none;stroke:var(--ink,#ede7f4);stroke-width:1.2;stroke-dasharray:2 4;opacity:.45}
.nlm .ev{fill:var(--light,#ffe2b8)}
.nlm .ev.start{fill:#ffd166}.nlm .ev.end{fill:var(--magenta,#ec8fd8)}
.nlm .ev.sel{stroke:var(--ink,#ede7f4);stroke-width:2}
.nlm .ev.timelike{fill:var(--nlm-ok)}.nlm .ev.spacelike{fill:var(--nlm-bad)}.nlm .ev.null{fill:var(--light,#ffe2b8)}
.nlm .g-node{fill:var(--panel2,#221d42);stroke:var(--line2,#4a4280);stroke-width:1.5}
.nlm .g-node.cyc{stroke:var(--light,#ffe2b8);stroke-width:2.5}
.nlm .g-node.bad{stroke:var(--nlm-bad);stroke-width:2.5}
.nlm .g-edge{fill:none;stroke:var(--mist,#c0b9d6);stroke-width:1.5}
.nlm .g-edge.interp{stroke:var(--magenta,#ec8fd8);stroke-dasharray:6 4}
.nlm .g-edge.jump{stroke:#8cc0ff}
.nlm .g-edge.cyc{stroke:var(--light,#ffe2b8);stroke-width:2.5}
.nlm .g-edge.bad{stroke:var(--nlm-bad);stroke-width:2.5}
.nlm .g-label{font-size:11px;text-anchor:middle;dominant-baseline:central;fill:var(--ink,#ede7f4)}
.nlm .hover-mark{stroke:var(--light,#ffe2b8);stroke-width:1;stroke-dasharray:2 2}
.nlm-c-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));gap:14px}
.nlm-iso{font:500 1rem/1.2 var(--mono,monospace);letter-spacing:.04em;color:var(--mist,#c0b9d6)}
.nlm-iso .pick{color:var(--violet,#b29aff);font-weight:700;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.nlm canvas{width:100%;height:auto;display:block;background:var(--void,#0d0b18);border:1px solid var(--line,#352f5e);border-radius:10px}
.nlm svg.nlm-figure{max-height:520px}
.nlm canvas{max-height:520px;object-fit:contain}
