/* Scoped to the existing control-plane shell; no fonts or CDN dependencies. */
.math-workspace { --math-accent:#315ed5; --math-soft:#eef3ff; --math-good:#116d51; }
.math-workspace [hidden] { display:none !important; }
.math-workspace { min-width:0; }
.math-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.math-intro h1 { margin-bottom:8px; }
.math-builder,.math-evidence,.math-history { margin-bottom:20px; }
.math-workspace .context-hint { line-height:1.6; }
.math-curve-inputs { display:grid;grid-template-columns:1fr 1fr;gap:18px; }
.math-curve-inputs fieldset { margin:0;padding:15px;border:1px solid var(--line,#e1e6f1);border-radius:12px;min-width:0; }
.math-curve-inputs legend { padding:0 6px;font-size:12px;font-weight:650;color:var(--muted,#687b96); }
.math-coefficients { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px; }
.math-workspace label { font-size:12px;font-weight:600;display:flex;flex-direction:column;gap:6px; }
.math-workspace input { min-width:0;width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid var(--line,#e1e6f1);border-radius:7px;background:#fff;color:var(--ink,#14223d);font:inherit; }
.math-bounds { display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:12px;align-items:end; }
.math-import-row { display:flex;align-items:end;gap:12px;flex-wrap:wrap;border-top:1px solid var(--line,#e1e6f1);padding-top:16px;margin-top:16px; }
.math-file-label { max-width:330px; }
.math-import-row .context-hint { flex:1;min-width:160px; }
.math-work-grid { display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;margin:20px 0;align-items:stretch; }
.math-path-panel,.math-inspector { min-width:0; }
.math-metrics { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px; }
.math-metric { background:#f6f8fd;padding:13px;border-radius:10px; }
.math-metric span { display:block;color:var(--muted,#687b96);font-size:11px;line-height:1.5; }
.math-metric strong { display:block;font-size:25px;line-height:1.4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere; }
.math-path-graph { display:flex;align-items:center;gap:0;overflow-x:auto;min-height:215px;padding:18px 3px 15px; }
.math-node { flex:0 0 158px;min-height:124px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;padding:17px;text-align:left;background:#f8faff;border:1px solid #d5e0f5;border-radius:12px;color:var(--ink,#14223d);cursor:pointer; }
.math-node strong { font-size:18px; }
.math-node .math-equation { font-size:13px;line-height:1.6;overflow-wrap:anywhere;max-width:100%; }
.math-node small,.math-edge small { color:var(--muted,#687b96);font-size:10px; }
.math-edge { flex:0 0 84px;border:0;background:transparent;color:var(--math-accent);padding:10px 4px;min-height:90px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:7px;border-radius:9px; }
.math-edge .math-arrow { width:70px;font-size:30px;line-height:1; }
.math-edge .math-edge-title { font-size:11px;font-weight:650; }
.math-node[aria-pressed="true"],.math-edge[aria-pressed="true"] { outline:2px solid var(--math-accent);outline-offset:0;background:var(--math-soft); }
.math-workspace button:focus-visible,.math-workspace input:focus-visible { outline:3px solid #6487ef;outline-offset:3px; }
.math-workspace button:disabled { opacity:.5;cursor:not-allowed; }
.math-inspector h2 { font-size:18px;margin:8px 0 16px; }
.math-inspector-body { font-size:12px;max-height:390px;overflow:auto;padding-right:6px; }
.math-facts { display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,2fr);gap:10px 14px;font-size:12px;line-height:1.6; }
.math-facts dt { color:var(--muted,#687b96); }
.math-facts dd { margin:0;overflow-wrap:anywhere;min-width:0; }
.math-inspector .math-facts { grid-template-columns:1fr;gap:4px; }
.math-inspector .math-facts dd { margin-bottom:9px; }
.math-formula { background:#f2f5fc;border-left:3px solid var(--math-accent);padding:12px;border-radius:5px;white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.7 ui-monospace,monospace; }
.math-tabs { display:flex;gap:8px;border-bottom:1px solid var(--line,#e1e6f1);overflow:auto;margin-top:10px; }
.math-tabs button { background:none;border:0;border-bottom:3px solid transparent;padding:13px 14px;color:var(--muted,#687b96);font:inherit;white-space:nowrap;cursor:pointer; }
.math-tabs button[aria-selected="true"] { border-bottom-color:var(--math-accent);color:var(--math-accent);font-weight:650; }
.math-tab-panel { padding:18px 0 3px;font-size:13px;line-height:1.7; }
.math-tab-panel details { margin-top:16px; }
.math-tab-panel summary { cursor:pointer;font-weight:600; }
.math-json { background:#f6f8fc;border:1px solid var(--line,#e1e6f1);padding:14px;max-height:330px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.6 ui-monospace,monospace; }
.math-check-row { padding:10px 0;border-bottom:1px solid var(--line,#e1e6f1);display:flex;align-items:start;justify-content:space-between;gap:12px; }
.math-check-row strong { color:var(--math-good);font-size:12px; }
.math-check-row .math-unattached { color:var(--muted,#687b96);font-weight:400; }
.math-job-row { display:flex;align-items:center;gap:12px;border:0;border-top:1px solid var(--line,#e1e6f1);width:100%;padding:13px 10px;background:transparent;color:var(--ink,#14223d);text-align:left;cursor:pointer; }
.math-job-row[aria-current="true"] { background:var(--math-soft);border-radius:7px; }
.math-job-row .math-job-copy { flex:1;min-width:0; }
.math-job-row small { display:block;overflow-wrap:anywhere;font-size:10px;color:var(--muted,#687b96);margin-top:5px; }
.math-status-good { color:var(--math-good);background:#ebf7f1; }
.math-status-failed { color:#9b2d3f;background:#fff0f2; }
.math-status-running { color:#705319;background:#fff6db; }
@media(max-width:1150px) { .math-work-grid{grid-template-columns:minmax(0,1fr)} .math-inspector .math-facts{grid-template-columns:minmax(100px,1fr) minmax(0,3fr)} .math-bounds{grid-template-columns:repeat(4,minmax(0,1fr))} .math-bounds>.button{grid-column:1/-1} }
@media(max-width:620px) { .math-curve-inputs{grid-template-columns:1fr} .math-bounds{grid-template-columns:1fr 1fr} .math-metrics{grid-template-columns:1fr 1fr} .math-intro{flex-direction:column} .math-workspace .panel-heading{flex-wrap:wrap;gap:14px} .math-import-row{align-items:stretch} .math-file-label{max-width:100%;width:100%} .math-tabs button{font-size:12px;padding:12px 9px} .math-node{flex-basis:150px} .math-facts{grid-template-columns:1fr} .math-facts dd{margin-bottom:8px} }
@media(prefers-reduced-motion:reduce) { .math-workspace * { scroll-behavior:auto !important;transition:none !important; } }

@media(max-width:620px) { .console-shell[data-active-view="math"] .console-topbar { height:auto;min-height:62px;flex-wrap:wrap;padding:10px 19px; } .console-shell[data-active-view="math"] .topbar-actions { max-width:100%;flex-wrap:wrap; } .console-shell[data-active-view="math"] .topbar-leading { min-width:0; } }
/* Curated public examples are separate from account-owned job evidence. */
.math-library,.math-point-lab { margin-bottom:20px; }
.math-status-preview { background:#fff4d8;color:#73530e; }
.math-library summary,.math-builder>summary { cursor:pointer;font-weight:650;font-size:14px;line-height:1.5; }
.math-builder[open]>summary { margin-bottom:24px; }
.math-library details { margin-top:14px;border-top:1px solid var(--line,#e1e6f1);padding-top:14px; }
.math-workspace select { border:1px solid var(--line,#e1e6f1);background:#fff;border-radius:7px;padding:10px;color:var(--ink,#14223d);font:inherit;max-width:100%;min-width:0; }
.math-sample-toolbar { display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:end;margin-top:16px; }
.math-sample-toolbar label { min-width:0; }
.math-sample-description { display:flex;justify-content:space-between;gap:24px;margin-top:18px; }
.math-sample-description h3 { font-size:19px;margin:0 0 10px; }
.math-sample-description p { font-size:13px;line-height:1.7;max-width:760px;margin:0; }
.math-sample-tags { display:flex;flex-wrap:wrap;gap:6px;align-content:flex-start;justify-content:flex-end;min-width:110px; }
.math-experiment-prompt { font-size:13px;line-height:1.7;padding:12px 16px;border-left:3px solid var(--math-accent);background:var(--math-soft);border-radius:5px; }
.math-catalog { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px; }
.math-gallery-search { max-width:460px;margin-top:14px; }
.math-sample-card { text-align:left;background:#fff;border:1px solid var(--line,#e1e6f1);border-radius:10px;padding:13px;display:flex;gap:8px;flex-direction:column;color:var(--ink,#14223d);font:inherit;cursor:pointer;min-width:0; }
.math-sample-card[aria-pressed=true] { border-color:var(--math-accent);background:var(--math-soft); }
.math-sample-card small { color:var(--math-accent);font-size:10px;text-transform:uppercase;letter-spacing:.5px; }
.math-sample-card strong { font-size:13px; }
.math-sample-card span { font-size:11px;line-height:1.6;color:var(--muted,#687b96); }
.math-point-presets { display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px; }
.math-point-form { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto;gap:12px;align-items:end; }
.math-point-form .math-infinity-label { display:flex;flex-direction:row;align-items:center;height:40px; }
.math-point-form input[type=checkbox] { width:16px;height:16px;flex-shrink:0; }
.math-point-result { display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:16px; }
.math-point-image { background:#f3f6fc;border:1px solid var(--line,#e1e6f1);border-radius:8px;padding:12px;min-width:0; }
.math-point-image small { color:var(--muted,#687b96);display:block;margin-bottom:8px; }
.math-point-image strong { font:13px/1.7 ui-monospace,monospace;overflow-wrap:anywhere; }
.math-point-error { padding:12px;border-radius:8px;background:#fff0f2;color:#9b2d3f;font-size:13px;line-height:1.6; }
.math-scalar-row { display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-top:16px; }
.math-scalar-row output { font:12px/1.7 ui-monospace,monospace;overflow-wrap:anywhere;flex:1;min-width:200px; }
.math-point-lab .context-hint { font-size:12px; }
.math-workspace .math-inspector-body { max-height:570px; }
.math-workspace .text-button { text-align:left; }
@media(max-width:1100px) { .math-sample-toolbar{grid-template-columns:minmax(0,1fr) auto}.math-sample-toolbar>.button{grid-column:1/-1}.math-point-form{grid-template-columns:1fr 1fr}.math-catalog{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media(max-width:620px) { .math-sample-toolbar{grid-template-columns:minmax(0,1fr)}.math-sample-description{flex-direction:column;gap:10px}.math-sample-tags{justify-content:flex-start}.math-catalog{grid-template-columns:minmax(0,1fr)}.math-point-form>.button{grid-column:1/-1}.math-point-form .math-infinity-label{grid-column:1/-1}.math-library .inline-actions{flex-wrap:wrap}.math-workspace select{width:100%} }
.math-path-panel>.math-point-lab { padding:18px 0 0;border:0;border-top:1px solid var(--line,#e1e6f1);border-radius:0;box-shadow:none;background:none;margin-top:18px;margin-bottom:0; }
.math-path-panel .math-point-form { grid-template-columns:1fr 1fr; }
.math-path-panel .math-point-form .math-infinity-label { grid-column:1/-1; }
.math-path-panel .math-point-form>.button { grid-column:1/-1; }
.math-path-panel .math-point-result { grid-template-columns:repeat(2,minmax(0,1fr)); }
.math-path-panel .panel-heading { flex-wrap:wrap;gap:12px; }
.math-path-panel .math-node { flex-basis:140px;padding:14px; }
.math-path-panel .math-edge { flex-basis:70px; }
.math-real-plot { margin:16px 0;padding:10px;background:#f6f8fc;border:1px solid var(--line,#e1e6f1);border-radius:8px; }
.math-real-plot svg { display:block;width:100%;height:auto; }
.math-real-plot figcaption { font-size:10px;color:var(--muted,#687b96);line-height:1.6; }
.math-real-axis { stroke:#bdc9dc;stroke-width:1; }
.math-real-locus { stroke:var(--math-accent);stroke-width:2;fill:none; }
.math-real-plot text { fill:#687b96;font-size:14px; }
.math-path-panel .math-edge-title { white-space:nowrap;font-size:10px; }
.math-inspector-body summary { cursor:pointer;font-weight:600; }

/* Source-only exploration remains inside the existing dashboard shell. */
.math-mode-row { display:flex;gap:18px;align-items:end;flex-wrap:wrap; }
.math-mode-row select { padding:10px;border:1px solid #d5ddea;border-radius:8px;color:#14223d;background:#fff;font:inherit;max-width:100%; }
.math-workspace select:focus-visible { outline:3px solid #6487ef;outline-offset:3px; }
.math-curve-inputs:has(#mathTargetFields[hidden]) { grid-template-columns:1fr; }
.math-bounds { grid-template-columns:repeat(5,minmax(0,1fr)); }
.math-bounds>.button { grid-column:1/-1;justify-self:start; }
.math-exploration { margin:20px 0; }
.math-workspace .math-filter { display:flex;flex-direction:row;align-items:center;margin:18px 0;line-height:1.6; }
.math-filter input { width:auto; }
.math-explore-results { display:grid;grid-template-columns:1fr 1fr;gap:9px;max-height:370px;overflow:auto;padding:3px; }
.math-explore-row { display:flex;gap:12px;align-items:center;justify-content:space-between;background:#f8faff;border:1px solid #d5e0f5;border-radius:10px;padding:14px;text-align:left;cursor:pointer;color:#14223d;min-width:0; }
.math-explore-copy { min-width:0;overflow-wrap:anywhere; }
.math-explore-copy strong { font-size:13px; }
.math-explore-copy small { display:block;margin-top:8px;color:#687b96;font-size:10px; }
.math-explore-row[aria-pressed="true"] { outline:2px solid #315ed5;outline-offset:0;background:#eef3ff; }
.math-relation-different,.math-relation-same { flex:0 0 105px;font-size:10px;line-height:1.5; }
.math-relation-different { color:#116d51; }
.math-relation-same { color:#687b96; }
@media(max-width:850px) { .math-explore-results{grid-template-columns:1fr} .math-bounds{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media(max-width:620px) { .math-bounds{grid-template-columns:1fr 1fr} .math-mode-row>label,.math-mode-row select{width:100%;min-width:0} }
