/* This tool uses the same surfaces and palette as the knowledge library. */
.function-visualizer-page .math-workspace-bar { padding:12px 0; gap:12px; }
.function-visualizer-page .math-workspace-bar > strong { font-size:clamp(1.1rem,2vw,1.4rem); }
.function-visualizer-page .math-workspace-links { gap:8px; }
.function-visualizer-page .math-workspace-links a,
.function-visualizer-page .math-workspace-links button { display:inline-flex; align-items:center; min-height:40px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); font:700 .85rem/1.3 Arial,Helvetica,sans-serif; text-decoration:none; }
.function-visualizer-page .math-frame-shell { background:transparent; box-shadow:none; border:0; }
.function-visualizer-page .math-tool-section { padding-bottom:12px; }
.le-math-embed--visualizer {
  --fv-paper:var(--le-paper,#fff); --fv-soft:var(--le-soft,#f5f8fb);
  --fv-ink:var(--le-ink,#20242a); --fv-muted:var(--le-muted,#5f6975); --fv-line:var(--le-line,#e3e8ee);
  --fv-accent:#167c73; --fv-accent-soft:#e8f6f3; --fv-plot-bg:#fff;
  --fv-plot-grid:#e3e8ee; --fv-plot-axis:#8097a0; --fv-plot-text:#5f6975;
  --fv-plot-line:#dc6d62; --fv-plot-zero:#167c73;
  font-family:Arial,Helvetica,sans-serif; padding:0; color:var(--fv-ink);
}
.le-math-embed--visualizer .container { display:block; width:100%; max-width:none; height:100%; padding:0; overflow:hidden; }
.le-math-embed--visualizer .hero { position:absolute; width:1px; height:1px; padding:0!important; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.le-math-embed--visualizer .app-grid { display:grid; height:100%; min-height:0; grid-template-columns:minmax(340px,.85fr) minmax(0,1.15fr); grid-template-rows:minmax(0,1fr); gap:18px; }
.le-math-embed--visualizer .panel { min-width:0; min-height:0; height:100%; padding:24px; border:1px solid var(--fv-line)!important; border-radius:8px!important; background:var(--fv-paper)!important; box-shadow:0 10px 24px #1d2a380a!important; overflow:auto; }
.le-math-embed--visualizer .fv-editor { display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:0; overflow:hidden; }
.le-math-embed--visualizer .fv-editor-top { padding-bottom:12px; }
.le-math-embed--visualizer .fv-editor-controls { min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 6px 12px 0; scrollbar-width:thin; }
.le-math-embed--visualizer .fv-editor-actions { padding-top:10px; border-top:1px solid var(--fv-line); }
.le-math-embed--visualizer .graph-panel { order:0; }
.le-math-embed--visualizer h2 { display:block; border:0; margin:0 0 8px; padding:0; font:800 1.35rem/1.25 Arial,Helvetica,sans-serif; color:var(--fv-ink); }
.le-math-embed--visualizer .fv-eyebrow { font-size:.72rem; font-weight:800; line-height:1.5; color:var(--fv-accent); text-transform:uppercase; margin-bottom:5px; }
.le-math-embed--visualizer .fv-description { font-size:.88rem; color:var(--fv-muted); line-height:1.55; margin:0 0 16px; }
.le-math-embed--visualizer .fv-edit-link { display:none; }
.le-math-embed--visualizer .expr-display { position:relative; top:auto; min-height:70px; padding:14px; margin-bottom:8px; border:1px solid var(--fv-line); border-radius:8px; background:var(--fv-soft)!important; box-shadow:none; color:var(--fv-ink); font-size:1.35rem; }
.le-math-embed--visualizer .expr-display:focus-visible { outline:3px solid var(--fv-accent); outline-offset:2px; }
.le-math-embed--visualizer .expr-display .fprefix { color:var(--fv-accent); }
.le-math-embed--visualizer .expr-empty-hint { font: .85rem/1.4 Arial,Helvetica,sans-serif; }
.le-math-embed--visualizer .mslot.active { background:var(--fv-accent-soft); border-color:var(--fv-accent); }
.le-math-embed--visualizer .mslot.active::after { background:var(--fv-accent); }
.le-math-embed--visualizer :is(.mfrac .fnum,.msqrt .sqrt-inner) { border-color:currentColor; }
.le-math-embed--visualizer .nav-hint { padding:0; background:transparent; text-align:left; color:var(--fv-muted); font-size:.75rem; }
.le-math-embed--visualizer :is(.kb-section-label,.struct-group-header) { font:700 .8rem/1.4 Arial,Helvetica,sans-serif; text-transform:none; letter-spacing:0; color:var(--fv-muted); background:transparent; margin:14px 0 8px; padding:0; }
.le-math-embed--visualizer .examples-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:0 0 18px; }
.le-math-embed--visualizer :is(.ex-btn,.struct-btn,.kb-btn,.preset-btn) { min-width:0; min-height:44px; border:1px solid var(--fv-line)!important; border-radius:8px; background:var(--fv-paper)!important; color:var(--fv-ink)!important; box-shadow:none; font-family:Arial,Helvetica,sans-serif; }
.le-math-embed--visualizer .ex-btn { padding:8px; font-size:.9rem; }
.le-math-embed--visualizer :is(.ex-btn,.struct-btn,.kb-btn,.preset-btn):hover { border-color:var(--fv-accent)!important; background:var(--fv-soft)!important; }
.le-math-embed--visualizer :is(.ex-btn,.struct-btn,.kb-btn,.preset-btn):active { transform:none; }
.le-math-embed--visualizer .mode-toggle { gap:4px; padding:4px; background:var(--fv-soft); border:1px solid var(--fv-line); border-radius:8px; margin:0 0 12px; }
.le-math-embed--visualizer .mode-btn { min-height:40px; padding:8px; font:700 .85rem/1.3 Arial,Helvetica,sans-serif; color:var(--fv-muted); border:1px solid transparent; border-radius:6px; }
.le-math-embed--visualizer .mode-btn.active { background:var(--fv-paper); border-color:var(--fv-line); color:var(--fv-accent); box-shadow:0 2px 8px #1425360a; }
.le-math-embed--visualizer .struct-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.le-math-embed--visualizer .struct-btn { min-height:68px; padding:8px 4px; gap:6px; }
.le-math-embed--visualizer .struct-label { font:700 .72rem/1.3 Arial,Helvetica,sans-serif; letter-spacing:0; text-transform:none; }
.le-math-embed--visualizer .struct-preview { font-size:1.05rem; }
.le-math-embed--visualizer :is(.kb-op,.kb-fn,.kb-spec,.kb-x) { color:var(--fv-accent)!important; background:var(--fv-accent-soft)!important; }
.le-math-embed--visualizer :is(.kb-del,.kb-clear) { background:var(--le-tint)!important; color:var(--fv-ink)!important; }
.le-math-embed--visualizer .range-presets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.le-math-embed--visualizer .preset-btn { padding:6px; font-size:.75rem; }
.le-math-embed--visualizer .range-row { gap:12px; margin-bottom:10px; }
.le-math-embed--visualizer .range-group label { color:var(--fv-muted); font-size:.8rem; }
.le-math-embed--visualizer .range-group input { min-height:44px; }
.le-math-embed--visualizer .panel > .kb-grid:last-child { position:static; }
.le-math-embed--visualizer .kb-plot { height:46px; border-color:var(--le-coral-dark)!important; background:var(--le-coral)!important; color:#20242a!important; font-size:.95rem; }
.le-math-embed--visualizer .canvas-wrap { border:1px solid var(--fv-line); border-radius:8px; background:var(--fv-plot-bg); box-shadow:none; }
.le-math-embed--visualizer #fnCanvas { background:var(--fv-plot-bg); }
.le-math-embed--visualizer .canvas-placeholder { padding:24px; background:var(--fv-plot-bg); color:var(--fv-muted); font-size:.9rem; line-height:1.6; }
.le-math-embed--visualizer .canvas-placeholder .icon { font-family:Georgia,serif; color:var(--fv-accent); opacity:1; }
.le-math-embed--visualizer .results-panel { margin-top:20px; }
.le-math-embed--visualizer .sub-note { color:var(--fv-muted); font-size:.85rem; line-height:1.65; }
.le-math-embed--visualizer .result-card { border:1px solid var(--fv-line)!important; border-left:3px solid var(--fv-accent)!important; background:var(--fv-soft)!important; padding:16px; margin:14px 0 0; box-shadow:none!important; }
.le-math-embed--visualizer .result-card h4 { color:var(--fv-ink)!important; font:800 .95rem/1.4 Arial,Helvetica,sans-serif; text-transform:none; letter-spacing:0; margin-bottom:8px; }
.le-math-embed--visualizer .result-card p { color:var(--fv-muted); font-size:.9rem; line-height:1.65; }
.le-math-embed--visualizer .result-card.error { border-left-color:var(--le-error)!important; }
html[data-theme=dark] .le-math-embed--visualizer { --fv-accent:#91e0d0; --fv-accent-soft:#244b48; --fv-plot-bg:#192a36; --fv-plot-grid:#304956; --fv-plot-axis:#8aa3b3; --fv-plot-text:#bdced9; --fv-plot-line:#f3a49a; --fv-plot-zero:#91e4b9; }
@media(min-width:1100px) { .le-math-embed--visualizer .range-presets { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:859px) {
  .le-math-embed--visualizer .container { overflow:auto; overscroll-behavior:contain; }
  .le-math-embed--visualizer .app-grid { display:grid; height:auto; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto; gap:14px; padding-bottom:8px; }
  .le-math-embed--visualizer .panel { height:auto; overflow:visible; padding:18px; }
  .le-math-embed--visualizer .fv-editor { display:block; }
  .le-math-embed--visualizer .fv-editor-controls { overflow:visible; padding-right:0; }
  .le-math-embed--visualizer .graph-panel { scroll-margin-top:8px; }
  .le-math-embed--visualizer .fv-edit-link { display:inline-flex; align-items:center; min-height:44px; margin:0 0 14px; padding:8px 14px; border:1px solid var(--fv-line); border-radius:8px; background:var(--fv-paper); color:var(--fv-ink); font:700 .85rem/1.3 Arial,Helvetica,sans-serif; cursor:pointer; }
  .function-visualizer-page .math-workspace-bar { padding:6px 0; }
  .function-visualizer-page .math-workspace-links a,.function-visualizer-page .math-workspace-links button { padding:6px 8px; font-size:.75rem; }
}
