.figure-workflow{--fw-ink:#183c3e;--fw-line:#d9e5e3;color:#233c44;max-width:1140px;margin:0 auto}.fw-heading,.fw-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.fw-heading h2{font-size:25px;margin:0 0 8px}.fw-heading p,.fw-small{color:#63787e;font-size:13px;line-height:1.65}.fw-section{margin:20px 0;padding:22px;border:1px solid var(--fw-line);border-radius:12px;background:#fff}.fw-section h3{margin:0 0 16px;font-size:18px}.fw-field{display:flex;flex-direction:column;gap:7px;margin:10px 0;min-width:0}.fw-field>span{font-size:13px;font-weight:600}.fw-field input,.fw-field textarea,.fw-field select{box-sizing:border-box;width:100%;max-width:100%;min-width:0;border:1px solid #cbdcd9;border-radius:7px;padding:10px;font:inherit;color:inherit;background:white}.fw-field textarea{resize:vertical;line-height:1.7}.fw-field :focus-visible,.figure-workflow button:focus-visible{outline:3px solid #5b9f9c;outline-offset:3px}.fw-two,.fw-node-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.fw-node-list fieldset{min-width:0;border:1px solid #dbe5e4;border-radius:9px;padding:10px 14px}.fw-node-list legend{font-size:12px;color:#4b7274}.fw-node-list blockquote{font-size:13px;line-height:1.7;white-space:pre-wrap;margin:12px 0;border-left:2px solid #aac7c2;padding-left:12px}.fw-sketch{display:block;width:100%;max-height:480px;border:1px solid #e2eae8;border-radius:8px;background:#fcfefd}.fw-relations{margin:18px 0}.fw-relations summary,.fw-node-list summary{cursor:pointer;font-size:13px;color:#365f65}.fw-edge{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}.fw-reference{display:block;width:100%;max-height:300px;background:#f9fbfb;border:1px solid #e0e8e7;margin:12px 0}.fw-reference-image{position:relative;display:inline-block;max-width:100%;cursor:crosshair}.fw-reference-image img{display:block;max-width:100%;max-height:420px}.fw-reference-image span{position:absolute;transform:translate(-50%,-50%);background:#176a69;color:white;border:2px solid white;border-radius:50%;width:25px;height:25px;text-align:center;line-height:22px;font-size:12px;pointer-events:none}.fw-notice,.fw-error{border-radius:8px;padding:12px 15px;line-height:1.7;font-size:13px}.fw-notice{background:#eef8f5;color:#265f56}.fw-error{background:#fff1ec;color:#914b32}.figure-workflow button{white-space:normal}.figure-workflow button:disabled{opacity:.55;cursor:not-allowed}.fw-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px}.fw-tabs button[aria-pressed=true]{background:#173e43;color:white}.fw-hidden{display:none!important}@media(max-width:650px){.fw-section{padding:15px}.fw-two,.fw-node-list,.fw-edge{grid-template-columns:1fr}.fw-heading h2{font-size:21px}.fw-heading{align-items:flex-start}.fw-sketch{max-height:350px}.fw-section .btn{min-height:44px}}

.fw-region{border:1px solid #d9e5e3;border-radius:8px;margin:12px 0;padding:12px}.fw-region-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.fw-plan{background:#f2f7f8;border-left:3px solid #245e76;padding:16px;margin:16px 0}.fw-reference-image i{position:absolute;box-sizing:border-box;border:2px solid #21645d;background:#ddfff740;color:#123f3b;font-style:normal;font-size:12px;pointer-events:none}.fw-plan p{line-height:1.6}@media(max-width:650px){.fw-region-values{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Material readonly preview; inherited scopes and behavior. */

.research-figure-result.material-preview-result>.material-publication-actions{display:flex;flex-flow:row wrap;align-items:center;gap:8px;margin:0;padding:0;min-height:0}
.research-figure-result.material-preview-result>.material-publication-actions>button.btn,.research-figure-result.material-preview-result .material-preview-controls>button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-height:38px;height:auto;max-width:100%;margin:0;padding:8px 12px;font:inherit;font-size:13px;line-height:1.35;white-space:normal;border:1px solid #b6c9cd;border-radius:6px;background:#fff;color:#254957;cursor:pointer}
.research-figure-result.material-preview-result>.material-publication-actions>button.btn:disabled{opacity:.55;cursor:not-allowed}
.research-figure-result.material-preview-result .material-preview-controls{display:flex;flex-wrap:wrap;gap:4px;margin-inline-start:auto}
.research-figure-result.material-preview-result .material-preview-controls>button[aria-pressed=true]{background:#285669;border-color:#285669;color:#fff}
.research-figure-result.material-preview-result .material-preview-controls>button:focus-visible,.research-figure-result.material-preview-result>.material-publication-actions>button:focus-visible{outline:2px solid #24699c;outline-offset:3px}
.research-figure-result.material-preview-result.figure-fullscreen{gap:10px}
.research-figure-result.material-preview-result.figure-fullscreen>header{flex:0 0 auto;gap:12px;padding-block:0}
.research-figure-result.material-preview-result.figure-fullscreen>header>.figure-result-actions{display:flex;flex-flow:row wrap;align-items:center;gap:8px}
.research-figure-result.material-preview-result.figure-fullscreen[data-preview-mode]>.figure-editor{flex:0 0 auto;min-height:0;height:auto}
.research-figure-result.material-preview-result.figure-fullscreen>.figure-editor>.figure-canvas[data-svg-source]{box-sizing:border-box;min-width:0;min-height:0;height:var(--material-preview-height,60dvh);padding:12px;overflow:auto;scrollbar-gutter:stable;display:grid;place-items:center}
.research-figure-result.material-preview-result.figure-fullscreen[data-preview-mode=fit]>.figure-editor>.figure-canvas[data-svg-source]>svg{display:block;width:100%;height:100%;min-width:0;max-width:none;max-height:none}
.research-figure-result.material-preview-result.figure-fullscreen[data-preview-mode=actual]>.figure-editor>.figure-canvas[data-svg-source]{display:block}
.research-figure-result.material-preview-result.figure-fullscreen[data-preview-mode=actual]>.figure-editor>.figure-canvas[data-svg-source]>svg{display:block;width:auto;height:auto;min-width:0;max-width:none;max-height:none;margin:0 auto}
@media(max-width:650px){.research-figure-result.material-preview-result>.material-publication-actions>button.btn,.research-figure-result.material-preview-result .material-preview-controls>button{min-height:44px}.research-figure-result.material-preview-result .material-preview-controls{margin-inline-start:0}.research-figure-result.material-preview-result.figure-fullscreen>.figure-editor>.figure-canvas[data-svg-source]{padding:8px}}

/* Public discovery only; existing executable library and figure preview remain unchanged. */
.format-library .fl-discovery{display:grid;gap:16px;min-width:0;padding-block:16px}
.format-library .fl-discovery header p{max-width:76ch;line-height:1.65}
.format-library .fl-discovery .fl-filters,.format-library .fl-discovery .fl-actions,.format-library .fl-discovery-search{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.format-library .fl-discovery-search label{flex:1 1 240px;display:grid;gap:6px}
.format-library .fl-discovery input,.format-library .fl-discovery select{box-sizing:border-box;max-width:100%;min-height:40px;padding:8px 10px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#0f172a;font:inherit}
.format-library .fl-discovery button{min-height:40px;padding:8px 14px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#0f172a;font:inherit;cursor:pointer}
.format-library .fl-discovery button[aria-pressed=true]{background:#e8eff6;border-color:#315b7d;color:#173e61}
.format-library .fl-discovery button:disabled{opacity:.5;cursor:default}
.format-library .fl-discovery button:focus-visible,.format-library .fl-discovery input:focus-visible,.format-library .fl-discovery select:focus-visible{outline:3px solid #315b7d;outline-offset:2px}
.format-library .fl-discovery-region{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.format-library .fl-discovery-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:14px}
.format-library .fl-discovery-card,.format-library .fl-discovery-versions{min-width:0;padding:16px;border:1px solid #d7dee7;border-radius:10px;background:#fff;overflow-wrap:anywhere}
.format-library .fl-discovery h4{margin:0 0 10px;font-size:17px;line-height:1.5}
.format-library .fl-discovery p{margin:4px 0 10px;line-height:1.6}
.format-library .fl-discovery .fl-meta{color:#475569;font-size:13px}
.format-library .fl-discovery li{margin-block:7px;line-height:1.5}
.format-library .fl-discovery-versions>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
