/* Scoped to the existing control-plane shell; no fonts or CDN dependencies. */
.math-workspace { --math-accent:var(--theme-link, #315ed5); --math-soft:var(--theme-accent-soft, #eef3ff); --math-good:var(--theme-success, #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:var(--theme-input, #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:var(--theme-surface, #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:var(--theme-surface, #f8faff);border:1px solid var(--theme-border, #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 var(--theme-focus, #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:var(--theme-surface, #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:var(--theme-input, #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:var(--theme-success-soft, #ebf7f1); }
.math-status-failed { color:var(--theme-danger, #9b2d3f);background:var(--theme-danger-soft, #fff0f2); }
.math-status-running { color:var(--theme-warning, #705319);background:var(--theme-warning-soft, #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:var(--theme-warning-soft, #fff4d8);color:var(--theme-warning, #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:var(--theme-input, #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:var(--theme-surface, #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:var(--theme-surface, #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:var(--theme-danger-soft, #fff0f2);color:var(--theme-danger, #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:var(--theme-surface, #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:var(--theme-text, #bdc9dc);stroke-width:1; }
.math-real-locus { stroke:var(--math-accent);stroke-width:2;fill:none; }
.math-real-plot text { fill:var(--theme-muted, #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 var(--theme-control-border, #d5ddea);border-radius:8px;color:var(--theme-text, #14223d);background:var(--theme-input, #fff);font:inherit;max-width:100%; }
.math-workspace select:focus-visible { outline:3px solid var(--theme-focus, #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:var(--theme-surface, #f8faff);border:1px solid var(--theme-border, #d5e0f5);border-radius:10px;padding:14px;text-align:left;cursor:pointer;color:var(--theme-text, #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:var(--theme-muted, #687b96);font-size:10px; }
.math-explore-row[aria-pressed="true"] { outline:2px solid var(--theme-link, #315ed5);outline-offset:0;background:var(--theme-accent-soft, #eef3ff); }
.math-relation-different,.math-relation-same { flex:0 0 105px;font-size:10px;line-height:1.5; }
.math-relation-different { color:var(--theme-success, #116d51); }
.math-relation-same { color:var(--theme-muted, #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} }

/* Guided exploration: preserve #math routing and the existing exact-workbench IDs. */
.math-workspace [id^="math"] { scroll-margin-top:100px; }
.math-journey { margin:0 0 13px; }
.math-journey-steps { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin:0;padding:0;list-style:none; }
.math-journey-steps li { min-width:0; }
.math-journey-steps button { font:inherit;color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:11px;padding:14px 11px;display:flex;align-items:flex-start;gap:11px;text-align:left;cursor:pointer;width:100%;height:100%;min-width:0;transition:border-color .15s,background .15s; }
.math-journey-steps button:hover,.math-journey-steps button[aria-current="step"] { border-color:var(--math-accent);background:var(--math-soft); }
.math-journey-number { flex:0 0 auto;display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--math-soft);color:var(--math-accent);font:800 11px ui-monospace,monospace; }
.math-journey-steps button[aria-current="step"] .math-journey-number { background:var(--math-accent);color:var(--on-accent,#fff); }
.math-journey-steps button>span:nth-child(2) { flex:1;min-width:0; }
.math-journey-steps strong { display:block;font-size:12px;line-height:1.35; }
.math-journey-steps small { display:block;font-size:10px;color:var(--muted);line-height:1.55;margin-top:2px; }
.math-journey-arrow { color:var(--math-accent);font-size:11px; }
.math-guide-key { display:flex;flex-wrap:wrap;gap:7px 15px;color:var(--muted);font-size:11px;line-height:1.6;margin-bottom:20px; }
.math-guide-key>span { border-left:2px solid var(--line);padding-left:10px; }
.math-guide-key strong { color:var(--ink);font-weight:700; }
.math-primer { margin-bottom:20px; }
.math-primer>.panel-heading { margin-bottom:8px; }
.math-primer>p { max-width:1000px;font-size:12px;line-height:1.75; }
.math-primer-grid,.math-bridge-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px; }
.math-primer-grid article,.math-bridge-grid article { border:1px solid var(--line);border-radius:11px;background:var(--surface-2);padding:16px;display:flex;flex-direction:column;align-items:flex-start;min-width:0; }
.math-primer-grid h3,.math-bridge-grid h3 { font-size:13px;line-height:1.35;color:var(--ink);margin:9px 0 8px; }
.math-primer-grid p,.math-bridge-grid p { font-size:11px;line-height:1.75;margin-bottom:11px; }
.math-primer-grid a,.math-bridge-grid a,.math-reading a,.math-stage-next a { font-size:11px;color:var(--math-accent);font-weight:650;text-underline-offset:2px; }
.math-primer-grid a,.math-bridge-grid article>a,.math-primer-grid .math-text-jump,.math-bridge-grid .math-text-jump { margin-top:auto; }
.math-concept-symbol { display:inline-flex;font:750 15px ui-monospace,monospace;color:var(--math-accent); }
.math-text-jump { border:0;padding:0;background:transparent;color:var(--math-accent);font-size:11px;font-weight:700;cursor:pointer;text-align:left; }
.math-text-jump:hover { text-decoration:underline; }
.math-stage-description { font-size:12px;line-height:1.75;max-width:1040px; }
.math-stage-next { display:flex;justify-content:space-between;align-items:center;gap:14px 25px;margin-top:18px;padding:15px 17px;border-radius:10px;background:var(--surface-2);border:1px solid var(--line);font-size:11px;line-height:1.75;color:var(--muted); }
.math-stage-next>span { flex:1;min-width:0; }
.math-stage-next strong { color:var(--ink); }
.math-stage-next .button { flex-shrink:0; }
.math-stage-actions { display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end; }
.math-stage-header { margin:5px 0 20px; }
.math-stage-header .eyebrow { margin-bottom:5px; }
.math-stage-header h2 { font-size:19px;margin-bottom:9px; }
.math-stage-header p { font-size:12px;line-height:1.7;margin-bottom:0;max-width:1060px; }
.math-results-stage>.math-stage-next { margin:0 0 20px; }
.math-builder>summary { display:flex;align-items:center;justify-content:space-between;gap:8px 16px;list-style:none; }
.math-builder>summary::-webkit-details-marker { display:none; }
.math-builder .math-step-kicker { font-size:10px;letter-spacing:.12em;color:var(--math-accent);font-weight:780; }
.math-builder>summary strong { font-size:14px;line-height:1.5;font-weight:750;color:var(--ink); }
.math-builder>summary .math-summary-chevron { font-size:20px;color:var(--math-accent);margin-left:auto; }
.math-builder[open]>summary .math-summary-chevron { transform:rotate(180deg); }
.math-job-notice { border-left:3px solid var(--math-accent);background:var(--surface-2);padding:9px 12px;border-radius:6px; }
.math-ecai-bridge { margin-bottom:20px; }
.math-ecai-bridge .panel-heading { margin-bottom:9px; }
.math-bridge-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.math-bridge-grid article { background:var(--paper); }
.math-bridge-grid code { font-family:ui-monospace,monospace;font-size:.94em;overflow-wrap:anywhere; }
.math-bridge-status { display:inline-block;font-size:10px;line-height:1.4;font-weight:700;color:var(--math-good);background:var(--theme-success-soft,#ebf7f1);border:1px solid var(--line);padding:4px 7px;border-radius:5px; }
.math-bridge-research { background:var(--theme-warning-soft,#fff5dc);color:var(--theme-warning,#705319); }
.math-reading { margin-top:19px;border-top:1px solid var(--line);padding-top:15px; }
.math-reading h3 { color:var(--ink);font-size:12px;margin-bottom:9px; }
.math-reading p { display:flex;flex-wrap:wrap;gap:8px 22px;margin:0; }
@media(max-width:1180px) { .math-journey-steps { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:800px) { .math-primer-grid { grid-template-columns:1fr; } .math-bridge-grid { grid-template-columns:1fr; } }
@media(max-width:620px) { .math-journey-steps { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; } .math-journey-steps button { padding:11px; } .math-journey-steps li:last-child { grid-column:1 / -1; } .math-stage-next { align-items:stretch;flex-direction:column; } .math-stage-next .button,.math-stage-actions { width:100%; } .math-stage-actions { flex-direction:column; } .math-builder>summary { align-items:flex-start;flex-direction:column; } .math-builder>summary .math-summary-chevron { display:none; } .math-workspace [id^="math"] { scroll-margin-top:140px; } }
@media(prefers-reduced-motion:reduce) { .math-journey-steps button,.math-builder>summary .math-summary-chevron { transition:none; } }
