.an-dialog { box-sizing:border-box; width:98vw; max-width:2100px; height:96dvh; max-height:96dvh; margin:auto; padding:20px; background:var(--bg,#091321); color:var(--text,#e6edf6); border:1px solid var(--line,#334155); border-radius:16px; overflow:auto; }
.an-dialog::backdrop,.an-modal::backdrop { background:#000b; }
.an-header,.an-actions,.an-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.an-header h2 { margin:0; font-size:1.625rem; }.an-header p { margin:6px 0; color:var(--muted); }
.an-header { position:sticky; top:-20px; z-index:5; display:grid; grid-template-columns:minmax(0,1fr) auto; padding:10px 0; background:var(--bg); border-bottom:1px solid var(--line); }
.an-jumps { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:8px; }
.an-dialog [data-an-section] { scroll-margin-top:calc(var(--an-header-height,140px) + 12px); }
.an-empty { padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--panel2); }
.an-actions,.an-toolbar { justify-content:flex-start; margin:12px 0; }
.an-dialog button,.an-modal button { min-height:38px; padding:8px 12px; font-size:0.8125rem; }
.an-dialog label,.an-modal label { font-size:0.8125rem; display:block; margin:8px 0; }
.an-dialog input,.an-dialog select,.an-modal input,.an-modal select,.an-modal textarea { min-height:38px; padding:8px; font-size:0.875rem; box-sizing:border-box; }
.an-dialog input[type=checkbox],.an-modal input[type=checkbox] { min-height:0; width:18px; height:18px; margin:0 7px 0 0; vertical-align:middle; }
.an-layout { display:grid; grid-template-columns:230px minmax(360px,1fr) 300px; gap:16px; align-items:start; }
.an-controls,.an-main,.an-results { min-width:0; padding:14px; border:1px solid var(--line); background:var(--panel); border-radius:12px; }
.an-main { width:100%; max-width:none; margin:0; box-sizing:border-box; }
.an-dialog .help { font-size:0.75rem; line-height:1.55; }.an-dialog details { margin:14px 0; }.an-dialog summary { cursor:pointer; font-weight:650; }
.an-dialog a,.an-modal a { color:#9ddeff; text-decoration:underline; }.an-dialog :focus-visible,.an-modal :focus-visible { outline:3px solid #f2c85b; outline-offset:3px; }
.an-toolbar label { margin:0; }.an-toolbar select { width:auto; max-width:230px; }
.an-toolbar input:not([type=checkbox]) { max-width:210px; }
.an-place-list { max-height:190px; overflow:auto; }.an-rule { padding:10px 0; border-bottom:1px solid var(--line); display:grid; gap:6px; }
#anPlot { width:100%; max-width:660px; display:block; margin:auto; border-radius:10px; touch-action:none; }
.an-legend { display:flex; flex-wrap:wrap; gap:10px; margin:12px 0; }.an-legend span { padding:2px 7px; font-size:0.75rem; }
.an-warning { color:#ffcd86; font-size:0.8125rem; line-height:1.5; }
.an-table { overflow:auto; max-height:580px; border:1px solid var(--line); border-radius:8px; }
.an-table table { border-collapse:collapse; width:max-content; min-width:100%; font-size:0.8125rem; }
.an-table th { position:sticky; top:0; background:var(--panel); z-index:1; }.an-table th button { white-space:nowrap; }
.an-table td { padding:10px; max-width:250px; min-width:60px; border-top:1px solid var(--line); white-space:pre-wrap; overflow-wrap:anywhere; }
.an-table tr.an-selected { background:#18475d; }.an-table tr.an-excluded { opacity:.7; text-decoration:line-through; }
.an-set { border:1px solid var(--line); border-radius:8px; margin:12px 0; padding:10px; }.an-set table { width:100%; font-size:0.75rem; border-collapse:collapse; }.an-set th { text-align:left; font-weight:500; padding:6px 4px; }.an-set td { text-align:right; }
#anMap { height:280px; position:relative; z-index:0; border-radius:8px; background:#e8edf0; }
.an-comparison { display:grid; grid-template-columns:1fr 1fr; gap:10px; }#anComparePlots { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; gap:12px; }#anComparePlots svg { width:100%; border-radius:8px; }
.an-modal { width:880px; max-width:94vw; max-height:90dvh; padding:24px; background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:12px; overflow:hidden; }.an-modal textarea { width:100%; font-family:monospace; }
.an-modal[open] { display:flex; flex-direction:column; }
.an-modal > h2 { flex:none; font-size:1.25rem; margin:0 0 12px; overflow-wrap:anywhere; }
.an-modal-body { min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; }
.an-modal-status { flex:none; max-height:25dvh; overflow:auto; border:1px solid var(--danger); border-radius:8px; padding:10px; overflow-wrap:anywhere; }
.an-modal > .an-actions { flex:none; margin:12px 0 0; }
.an-preview-table { max-width:100%; overflow:auto; }
.an-preview-table table { min-width:320px; }
.an-preview-table td { overflow-wrap:anywhere; max-width:180px; }
.an-mappings > label,.an-import-settings > label { min-width:0; }
.an-mappings,.an-import-settings { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 16px; }.an-modal table { width:100%; border-collapse:collapse; }.an-modal td,.an-modal th { padding:8px; border:1px solid var(--line); text-align:left; }
.an-file { border:1px solid var(--line); border-radius:8px; padding:6px 10px; }.an-file input { max-width:200px; font-size:0.75rem; }.an-download { border:1px solid var(--line); padding:8px; display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
@media(max-width:1200px) { .an-layout { grid-template-columns:200px minmax(320px,1fr); }.an-results { grid-column:1/-1; display:block; }#anStats { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:12px; } }
@media(max-width:740px) { .an-dialog { padding:10px; }.an-layout { display:flex; flex-direction:column; }.an-controls,.an-main,.an-results { width:100%; box-sizing:border-box; }.an-results { display:block; }.an-mappings,.an-import-settings { grid-template-columns:1fr 1fr; }.an-comparison,#anComparePlots { grid-template-columns:1fr; } }
@media(max-width:800px) { .an-dialog input,.an-dialog select,.an-modal input,.an-modal select,.an-modal textarea { font-size:1rem; } }
@media(max-width:740px) { .an-header { top:-10px; } .an-header h2 { font-size:1.25rem; } .an-header p { display:none; } .an-modal { padding:14px; } }
@media(max-width:420px) { .an-mappings,.an-import-settings { grid-template-columns:minmax(0,1fr); } .an-modal > .an-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } .an-modal > .an-actions button { overflow-wrap:anywhere; } }
@media(pointer:coarse) { .an-dialog button,.an-modal button { min-height:44px; } }

html[data-theme="light"] .an-warning { color:#863b08; }
html[data-theme="light"] .an-dialog a,html[data-theme="light"] .an-modal a { color:#075985; }
html[data-theme="light"] .an-table tr.an-selected { background:#c9eafa; }
.en-dialog { max-width:1180px; }
:is(.en-dialog,.en-embedded) > p { margin:12px 0; }
:is(.en-dialog,.en-embedded) nav,.en-header { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.en-header { position:sticky; top:0; background:var(--card,#101b2d); z-index:2; padding:8px 0; }
.en-header h2 { margin-right:auto; }
:is(.en-dialog,.en-embedded) nav button[aria-current="true"] { outline:2px solid #59bda4; outline-offset:2px; }
:is(.en-dialog,.en-embedded) section { padding:16px 0; min-width:0; }
:is(.en-dialog,.en-embedded) section > button { margin:5px; }
:is(.en-dialog,.en-embedded) svg { width:420px; max-width:100%; height:auto; display:inline-block; vertical-align:top; }
:is(.en-dialog,.en-embedded) textarea { width:100%; box-sizing:border-box; font:14px ui-monospace,monospace; }
:is(.en-dialog,.en-embedded) label { display:flex; flex-direction:column; gap:5px; margin:8px 0; min-width:0; }
:is(.en-dialog,.en-embedded) label:has(input[type="checkbox"]) { flex-direction:row; align-items:center; }
:is(.en-dialog,.en-embedded) input[type="checkbox"] { width:auto; }
:is(.en-dialog,.en-embedded) .an-toolbar label { flex:1 1 160px; }
:is(.en-dialog,.en-embedded) input,:is(.en-dialog,.en-embedded) select { max-width:100%; box-sizing:border-box; }
:is(.en-dialog,.en-embedded) .kin-legend { display:flex; flex-wrap:wrap; gap:10px; }
:is(.en-dialog,.en-embedded) .kin-legend svg { width:18px; height:16px; flex:none; }
:is(.en-dialog,.en-embedded) p { overflow-wrap:anywhere; }
html[data-theme="light"] .en-header { background:#fff; }
@media(max-width:600px) { .en-dialog textarea{font-size:1rem}.en-dialog nav button{flex:1 1 40%}.en-header{position:static} }
.ss-dialog { max-width:1280px; }
.ss-dialog { --ss-accent:#66c5ac; }
.ss-dialog .en-header { margin:0 -2px 16px; padding:10px 2px 14px; border-bottom:1px solid var(--line); }
.ss-dialog .en-header h2 { font-size:1.5625rem; letter-spacing:-.025em; }
.ss-dialog > nav { gap:5px; padding:6px; border:1px solid var(--line); border-radius:12px; background:var(--panel); }
.ss-dialog > nav button { flex:1 1 auto; background:transparent; border:0; color:var(--muted); font-weight:600; }
.ss-dialog > nav button[aria-current="true"] { outline:none; color:var(--text); background:var(--panel2); box-shadow:inset 0 -3px 0 var(--ss-accent); }
.ss-dialog h3 { letter-spacing:-.018em; }.ss-dialog h4 { margin:0 0 5px; font-size:1rem; }
.ss-dialog section > div > h3 { margin-top:4px; }
.ss-dialog .ss-fields fieldset { background:var(--panel); border-radius:14px; border-color:var(--line); }
.ss-dialog .ss-fields legend { color:var(--ss-accent); font-size:0.8125rem; letter-spacing:.035em; }
.ss-dialog .ss-guides { padding:18px; background:var(--panel); border:1px solid var(--line); border-radius:14px; }
.ss-dialog .ss-guides figcaption { color:var(--muted); font-size:0.75rem; }
.ss-model-card { border:1px solid var(--line); background:var(--panel); border-radius:16px; padding:18px; min-width:0; }
.ss-dialog .ss-model-card > p { margin-top:0; }.ss-dialog .ss-model-card .an-toolbar { margin-bottom:0; }
.ss-geometry-canvas { color:var(--text); border:1px solid var(--line); border-radius:12px; background:color-mix(in srgb,var(--panel2) 80%,transparent); }
.ss-result-heading { border-top:1px solid var(--line); padding-top:24px; font-size:1.4375rem; }
.ss-dialog .an-table th { color:var(--muted); font-size:0.6875rem; text-transform:uppercase; letter-spacing:.045em; padding:13px 10px; text-align:left; }
.ss-dialog .an-table tbody tr:nth-child(even) { background:color-mix(in srgb,var(--panel2) 45%,transparent); }
.ss-dialog .an-table td { font-variant-numeric:tabular-nums; }
.ss-dialog svg text { font-family:system-ui,-apple-system,"Segoe UI",sans-serif; }
.ss-dialog .ss-fields.ss-support-list { grid-template-columns:1fr; }
.ss-dialog .ss-support-list .ss-bolt-navigation { padding:0;border:0;background:transparent; }
.ss-dialog .ss-support-list .ss-bolt-step { grid-column:1/-1;min-width:0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel2);font-family:system-ui,sans-serif; }
.ss-dialog .ss-support-list .ss-bolt-step[open] { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px; }
.ss-bolt-step>summary { font-size:1.0625rem;font-weight:700;min-height:36px;cursor:pointer; }
.ss-bolt-step>summary,.ss-bolt-step>p,.ss-bolt-step>.ss-bolt-products,.ss-bolt-step>.ss-anchor-direction,.ss-bolt-step>.ss-service-capacity,.ss-bolt-step>.ss-steel-screen,.ss-bolt-step>.ss-bolt-step-figure,.ss-bolt-step>.ss-bolt-capacity-preview,.ss-bolt-step>button { grid-column:1/-1; }
.ss-bolt-step>button { justify-self:start; }
.ss-bolt-step .ss-guided-input,.ss-bolt-choice,.ss-bolt-products { min-width:0; }
.ss-bolt-step p { margin:4px 0 10px;line-height:1.5; }
.ss-bolt-choice>label { margin-bottom:6px; }
.ss-bolt-custom>summary { font-size:0.8125rem;color:var(--muted);padding:4px 0;cursor:pointer; }
.ss-bolt-custom[open] { padding:8px;border-left:3px solid var(--accent); }
.ss-bolt-choice>p { font-size:0.8125rem;color:var(--muted); }
.ss-bolt-material-values { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 14px;padding:12px;border:1px solid var(--line);border-radius:8px; }
.ss-bolt-material-values dt,.ss-bolt-material-values dd { margin:0;overflow-wrap:anywhere; }
.ss-bolt-material-values dd { font-weight:650; }
.ss-bolt-table-scroll { max-width:100%;overflow-x:auto; }
.ss-bolt-table-scroll table { border-collapse:collapse;min-width:650px;width:100%;font-size:0.875rem; }
.ss-bolt-table-scroll caption { text-align:left;padding:8px 0; }
.ss-bolt-table-scroll th,.ss-bolt-table-scroll td { text-align:left;padding:8px;border-bottom:1px solid var(--line); }
.ss-bolt-material-edits { margin-top:12px; }
.ss-bolt-material-edits>label { display:block;margin-top:10px; }
@media(max-width:700px){.ss-dialog .ss-support-list .ss-bolt-step[open]{grid-template-columns:minmax(0,1fr)}.ss-bolt-step>summary{font-size:1rem}.ss-bolt-material-values{font-size:0.875rem}}
.ss-workflow .ss-guided-input{min-width:0}
.ss-workflow .ss-fields fieldset>div.ss-guided-input,.ss-workflow .ss-support-list>fieldset>div.ss-guided-input{grid-column:auto;padding:0;border:0;background:transparent}
.ss-input-reference{font-size:0.8125rem;line-height:1.5;margin:5px 0 10px;color:var(--muted);min-width:0;overflow-wrap:anywhere}
.ss-input-reference>summary{min-height:36px;display:list-item;padding:7px 0;cursor:pointer;color:var(--ss-accent,var(--accent));font-weight:600}
.ss-input-reference p{margin:8px 0;font-weight:400}
.ss-input-reference a{overflow-wrap:anywhere}
.ss-anchor-quick-reference{padding:10px;border:1px solid var(--line);border-radius:10px;margin:12px 0}
.ss-anchor-quick-reference>summary{cursor:pointer;font-weight:600;min-height:32px}
.ss-anchor-direction{grid-column:1/-1}
.ss-anchor-direction p{margin:6px 0}
.ss-anchor-direction button{margin:4px 6px 4px 0}
.ss-steel-screen{grid-column:1/-1;border:1px solid var(--line);border-radius:10px;padding:12px}
.ss-steel-screen>summary{font-weight:600;cursor:pointer;min-height:32px}
.ss-dialog .ss-support-list > fieldset { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 24px;align-items:start; }
.ss-support-list > fieldset > p,.ss-support-list > fieldset > div,.ss-support-list > fieldset > label:has(textarea) { grid-column:1/-1; }
.ss-support-list > fieldset > div { padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--panel2); }
.ss-support-list > fieldset > div svg { width:600px;max-width:100%;display:block;margin:16px auto; }
.ss-support-list > fieldset > button { width:fit-content; }
.ss-dialog [hidden] { display:none!important; }
html[data-theme="light"] .ss-dialog { --ss-accent:#176c60; --ss-bolt-engaged:#087565; --ss-bolt-not-engaged:#b32e48; --ss-bolt-unchecked:#946000; }
@media(max-width:540px){.ss-dialog .en-header h2{font-size:1.3125rem}.ss-dialog > nav{display:grid;grid-template-columns:1fr 1fr}.ss-dialog > nav button{font-size:0.75rem;min-height:44px}.ss-dialog .ss-guides{padding:10px}.ss-model-card{padding:12px}.ss-result-heading{font-size:1.25rem}.ss-dialog .ss-support-list>fieldset{grid-template-columns:1fr}.ss-support-list>fieldset>div{padding:10px}}
.ss-dialog .ss-notice { border-left:3px solid #d9ab68; padding:10px 14px; background:color-mix(in srgb,var(--card) 90%,#d9ab68); }
.ss-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:20px 0; }
.ss-fields fieldset { min-width:0; border:1px solid var(--line); border-radius:12px; padding:12px 16px; }
.ss-fields legend { font-weight:700; padding:0 6px; }
.ss-source { margin-top:20px; }
.ss-source select { width:100%; }
.ss-guides { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:16px 0; }
.ss-guides > * { min-width:0; }
.ss-guides figure { margin:0; }
.ss-guides svg { width:100%; max-width:100%; }
.ss-guides figcaption { padding:8px 0; line-height:1.5; }
.ss-dialog .an-toolbar { min-width:0; max-width:100%; }
.ss-dialog .an-toolbar > label { max-width:100%; }
.ss-dialog .an-toolbar select { min-width:0; width:100%; max-width:100%; }
.ss-result-layout { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin:16px 0; }
.ss-result-layout svg { width:100%; }
.ss-dialog input[type="range"] { min-height:44px; }
.ss-dialog .an-table table { width:100%; }
.ss-dialog .an-table th,.ss-dialog .an-table td { white-space:normal; overflow-wrap:anywhere; min-width:65px; }
.ss-dialog .an-table td:last-child .an-toolbar { min-width:110px; }
@media(max-width:900px){ .ss-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.ss-result-layout,.ss-guides{grid-template-columns:1fr} }
@media(max-width:540px){ .ss-fields{grid-template-columns:1fr}.ss-dialog .an-toolbar{flex-direction:column;align-items:stretch;flex-wrap:nowrap}.ss-dialog .an-toolbar label{flex:0 1 auto;width:100%}.ss-dialog .an-table td:last-child .an-toolbar{min-width:90px} }

.ss-geometry-frame{max-width:100%;overflow:auto;border-radius:10px}.ss-geometry-frame svg{display:block;width:100%;height:auto}.ss-geometry-frame:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

.ss-dialog{scroll-padding-top:110px}@media(max-width:540px){.ss-dialog{scroll-padding-top:210px}}

/* Guided slope workspace: the editor scrolls while actions and model remain available. */
.ss-workflow[open]{display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:10px;width:calc(100vw - 32px);max-width:1536px;height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);overflow:hidden;padding:16px;box-sizing:border-box;scroll-padding:0}
.ss-workflow .en-header{position:static;margin:0;padding:0 0 8px;gap:8px;background:transparent}
.ss-workflow .en-header h2{margin:0 auto 0 0;font-size:1.5rem}
.ss-workflow .en-header button{min-height:44px}
.ss-workflow-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;position:relative}
.ss-workflow-tools>button,.ss-workflow .ss-scope>summary{min-height:40px;padding:8px 12px;font-size:0.8125rem}
.ss-workflow .ss-scope{margin-left:auto;max-width:100%;font-size:0.8125rem;position:relative}
.ss-workflow .ss-scope>summary{cursor:pointer;box-sizing:border-box;color:var(--muted);border:1px solid var(--line);border-radius:10px}
.ss-workflow .ss-scope[open]{position:absolute;z-index:4;right:0;top:0;width:min(520px,100%);background:var(--card);border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px #0005;max-height:50dvh;overflow:auto}
.ss-workflow .ss-scope[open]>p{padding:0 14px}
.ss-workflow .ss-step-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:0;padding:5px}
.ss-workflow .ss-step-nav>button{min-height:44px;padding:9px 6px;font-size:0.875rem;line-height:1.3}
.ss-workflow .ss-step-nav>button[aria-current="step"]{background:var(--panel2);color:var(--text);box-shadow:inset 0 -3px 0 var(--ss-accent);outline:none}
.ss-workflow .ss-step-select,.ss-workflow .ss-preview-toggle{display:none}
.ss-workflow-main{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);min-height:0;min-width:0;gap:18px;overflow:hidden}
.ss-editor,.ss-preview-panel{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:4px 12px 20px 2px;scroll-padding-block:20px}
.ss-preview-panel{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:16px}
.ss-workflow .ss-page-heading{font-size:1.4375rem;margin:8px 0}
.ss-workflow .ss-page-help{margin:0 0 12px;font-size:0.875rem;line-height:1.5}
.ss-workflow .ss-editor>section{padding:8px 0}
.ss-workflow .ss-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
.ss-workflow .ss-fields fieldset{padding:12px;min-width:0}
.ss-workflow label{font-size:0.875rem;line-height:1.4}
.ss-workflow input,.ss-workflow select,.ss-workflow textarea{min-width:0;width:100%;min-height:44px}
.ss-workflow .an-toolbar input:not([type=checkbox]){max-width:100%}
.ss-workflow input[type="checkbox"]{min-height:24px;width:24px;flex-shrink:0}
.ss-workflow .ss-field:focus-within{border-radius:6px;outline:2px solid var(--ss-accent);outline-offset:4px}
.ss-workflow [id]{scroll-margin-block:8px}
.ss-workflow [aria-invalid="true"]{border:2px solid #e98478}
.ss-field-error{display:block;color:#ec9a90;font-size:0.8125rem;font-weight:600;line-height:1.4}
html[data-theme="light"] .ss-field-error{color:#9d2626}
html[data-theme="light"] .ss-workflow{--ss-dimension:#865000}
.ss-workflow .ss-case-actions{gap:6px;margin:8px 0}
.ss-workflow .ss-case-actions button{font-size:0.75rem;min-height:40px;padding:7px 10px}
.ss-workflow .ss-source,.ss-workflow .ss-guide-details,.ss-workflow .ss-material-interpretation{margin:12px 0;border:1px solid var(--line);border-radius:10px;padding:12px}
.ss-workflow summary{cursor:pointer;min-height:28px;font-weight:600;font-size:0.875rem;line-height:1.5}
.ss-workflow .ss-guides{grid-template-columns:1fr;padding:10px}
.ss-workflow .ss-study-nav{gap:6px;margin:10px 0}
.ss-workflow .ss-study-nav button{min-height:44px}
.ss-workflow .ss-study-nav [aria-current="page"]{outline:2px solid var(--ss-accent)}
.ss-workflow-footer{min-width:0;border-top:1px solid var(--line);padding-top:8px;background:var(--card)}
.ss-workflow-footer>p{font-size:0.8125rem;line-height:1.4;margin:0 0 8px;max-height:5.5em;overflow:auto}
.ss-workflow-footer>p:empty{display:none}
.ss-actionbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ss-actionbar button{min-height:44px;padding:9px 18px}
.ss-actionbar .ss-primary{margin-left:auto;color:#06251e;background:#87d4bd;border-color:#87d4bd;font-weight:750}
.ss-actionbar button:disabled{opacity:.5}
.ss-workflow .ss-result-heading{padding:0;border:0;margin:0 0 12px;font-size:1.5625rem;line-height:1.25}
.ss-result-overview{border:1px solid var(--line);border-left:4px solid var(--ss-accent);border-radius:12px;padding:18px;margin-bottom:16px;background:var(--panel)}
.ss-result-warning{border-left-color:#d9ab68}.ss-result-danger{border-left-color:#e98478}
.ss-result-overview p,.ss-result-overview li{font-size:0.875rem;line-height:1.55}
.ss-result-overview h4{margin-top:16px!important}.ss-result-overview ul{padding-left:20px;margin:8px 0}
.ss-workflow .ss-model-view{padding:0}
.ss-model-view h3{margin:0 0 8px}.ss-model-view p{font-size:0.8125rem;line-height:1.5}
.ss-model-status{padding:8px 10px;border-radius:8px;background:var(--panel2);margin:8px 0}
.ss-model-canvas-frame{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--panel2)}
.ss-workflow .ss-model-canvas{display:block;width:100%;max-width:100%;height:auto;color:var(--text);touch-action:pan-y}
.ss-workflow .ss-model-canvas{max-height:36dvh}
.ss-model-canvas:focus-visible{outline:2px solid var(--ss-accent);outline-offset:-3px}
.ss-model-controls{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0;align-items:center}
.ss-model-controls button{font-size:0.75rem;min-height:40px;padding:7px 10px}
.ss-model-controls label{flex:1 1 100px;font-size:0.75rem!important;margin:0!important}
.ss-model-controls input[type="range"]{padding:0}
.ss-model-legend{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.ss-model-legend h4{flex:0 0 100%;font-size:0.8125rem!important}
.ss-model-legend button{font-size:0.75rem;min-height:36px;padding:6px 10px}
.ss-model-legend button[aria-pressed="true"]{outline:2px solid var(--ss-accent)}
.ss-model-dimensions{font-size:0.8125rem;line-height:1.6;overflow-wrap:anywhere;border-top:1px solid var(--line);padding-top:10px}
.ss-model-dimensions dl{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;margin:0}
.ss-model-dimensions dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}
@media(max-width:1050px) and (min-width:761px){.ss-workflow-main{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.ss-workflow .ss-fields{grid-template-columns:1fr}.ss-workflow .ss-support-list>fieldset{grid-template-columns:1fr}}
@media(max-width:760px){
 .ss-workflow[open]{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:10px;gap:7px}
 .ss-workflow .en-header{gap:6px;padding-bottom:6px}.ss-workflow .en-header h2{font-size:1.25rem}.ss-workflow .en-header button{font-size:0.75rem;padding:8px}
 .ss-workflow-tools{gap:5px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}.ss-workflow-tools>button{flex:0 0 auto;padding:7px 9px;font-size:0.75rem;min-height:40px}
 .ss-workflow .ss-scope{position:static;flex:0 0 auto;margin-left:0}.ss-workflow .ss-scope[open]{position:fixed;top:65px;right:10px;width:calc(100vw - 20px);max-height:45dvh}
 .ss-workflow .ss-preview-toggle{display:block}.ss-workflow .ss-step-nav{display:block;padding:0;border:0;background:transparent}.ss-workflow .ss-step-nav>button{display:none}
 .ss-workflow .ss-step-select{display:flex;margin:0;font-size:0.75rem;gap:3px}.ss-workflow .ss-step-select select{min-height:44px;font-size:1rem}
 .ss-workflow-main{display:flex;flex-direction:column;overflow:auto;gap:12px;overscroll-behavior:contain;padding-right:2px}
 .ss-editor{overflow:visible;min-height:auto;flex:0 0 auto;padding:0 2px 16px;scrollbar-gutter:auto}
 .ss-preview-panel{display:none;order:-1;min-height:0;flex:0 0 auto;padding:12px;max-height:65dvh;overflow:auto;scrollbar-gutter:auto}
 .ss-preview-open .ss-preview-panel{display:block}
 .ss-workflow .ss-page-heading{font-size:1.3125rem}.ss-workflow .ss-fields{grid-template-columns:1fr;gap:10px}.ss-workflow .ss-support-list>fieldset{grid-template-columns:1fr}
 .ss-workflow input,.ss-workflow select,.ss-workflow textarea{font-size:1rem}
 .ss-workflow .ss-case-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.ss-workflow .ss-case-actions button{min-height:44px}
 .ss-actionbar{display:grid;grid-template-columns:1fr 1fr;gap:6px}.ss-actionbar button{padding:8px;min-width:0;font-size:0.8125rem;min-height:44px}
 .ss-actionbar .ss-primary{margin:0;grid-column:1;grid-row:1}.ss-actionbar button:last-child{grid-column:2;grid-row:1}
 .ss-workflow-footer>p{font-size:0.75rem;max-height:3.9em;margin-bottom:6px}.ss-workflow .ss-result-heading{font-size:1.375rem}.ss-result-overview{padding:14px}
}
/* Field-level definitions and actionable slope setup review. */
.ss-workflow .ss-input-help{display:block;color:var(--muted);font-size:0.8125rem;font-weight:400;line-height:1.5;margin-top:6px}
.ss-workflow .ss-input-figure{margin:2px 0 16px;border-left:2px solid var(--ss-accent);padding:4px 0 4px 10px}
.ss-workflow .ss-input-figure>summary{color:var(--ss-accent);min-height:40px;display:list-item;padding:8px 0;box-sizing:border-box;font-size:0.8125rem}
.ss-workflow .ss-input-figure figure{margin:6px 0 0;max-width:100%}
.ss-workflow .ss-input-figure svg{display:block;width:100%;height:auto;max-width:400px;margin:auto}
.ss-workflow .ss-input-figure figcaption{color:var(--muted);font-size:0.8125rem;line-height:1.5;margin-top:8px}
.ss-workflow .ss-input-issues{border:1px solid #e98478;border-left-width:4px;border-radius:10px;padding:12px 14px;margin:4px 0 14px;background:var(--panel)}
.ss-workflow .ss-input-issues h3{font-size:1.125rem;margin:0 0 8px}
.ss-workflow .ss-input-issues ul{margin:0;padding-left:20px}
.ss-workflow .ss-input-issues li{margin:12px 0;overflow-wrap:anywhere;font-size:0.875rem}
.ss-workflow .ss-input-issues p{margin:4px 0 8px;line-height:1.5}
.ss-workflow .ss-issue-links{display:flex;gap:6px;flex-wrap:wrap}
.ss-workflow .ss-issue-links button{font-size:0.8125rem;white-space:normal;min-height:44px;max-width:100%;text-align:left}
.ss-workflow .ss-review-inputs{font-size:0.8125rem;min-height:40px;margin:0 0 8px;padding:6px 12px}
.ss-workflow .ss-section-interpretation{border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--panel);margin:12px 0}
.ss-workflow .ss-section-interpretation h4{margin:0 0 6px;color:var(--ss-accent);font-size:1rem}
.ss-workflow .ss-section-interpretation p{margin:8px 0;line-height:1.5}
.ss-workflow .ss-section-conflict{border-color:#e98478}
.ss-workflow .ss-section-ack{display:flex;align-items:flex-start;gap:10px;margin:12px 0}
.ss-workflow .ss-section-ack input{margin:0}
.ss-workflow .ss-section-interpretation>button{max-width:100%;white-space:normal;min-height:44px}
@media(max-width:760px){.ss-workflow .ss-issue-links{display:grid}.ss-workflow .ss-input-figure{padding-left:6px}.ss-workflow .ss-review-inputs{min-height:36px;margin-bottom:5px}.ss-workflow .ss-input-help{font-size:0.8125rem}}
/* A physical model, its assignments, and one review before calculation. */
.ss-object-overview,.ss-mechanism-choice,.ss-optional-setup,.ss-review-card{border:1px solid var(--line);border-radius:10px;padding:12px;margin:10px 0;background:var(--panel)}
.ss-object-overview>summary,.ss-optional-setup>summary{cursor:pointer;min-height:44px;line-height:1.5;overflow-wrap:anywhere;padding:6px 0}
.ss-object-list,.ss-object-actions{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.ss-object-list button,.ss-object-actions button,.ss-review-issue{min-height:44px;white-space:normal;overflow-wrap:anywhere;text-align:left;max-width:100%}
.ss-object-list button[aria-pressed="true"]{outline:2px solid var(--ss-accent)}
.ss-object-inspector input{width:100%;box-sizing:border-box}.ss-object-inspector p{overflow-wrap:anywhere}
.ss-readiness-line{font-size:0.8125rem;color:var(--muted);line-height:1.45}
.ss-step-nav button[data-readiness="incomplete"]{border-bottom:3px solid #e5b46d}
.ss-step-nav button[data-readiness="interpretation"]{border-bottom:3px solid #87b5dd}
.ss-step-nav button[data-readiness="complete"]{border-bottom:3px solid #80c7b1}
.ss-setup-sketch-host{min-width:0;margin:12px 0}.ss-setup-sketch-host svg{width:100%;height:auto;max-height:330px}
.ss-review-card h4{margin:0 0 6px}.ss-review-card p{overflow-wrap:anywhere;line-height:1.5}.ss-review-issue{display:block;width:100%;margin:8px 0}
.ss-property-library-host:empty{display:none}.ss-property-library-host input,.ss-property-library-host select,.ss-property-library-host textarea{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:760px){.ss-object-overview{padding:8px;margin-top:0}.ss-object-list{display:grid;grid-template-columns:1fr 1fr}.ss-object-list button{font-size:0.8125rem}.ss-setup-sketch-host svg{max-height:none}.ss-property-library-host .ss-fields{grid-template-columns:1fr}.ss-review-card{padding:10px}}
/* A landscape phone needs room to read the form, not just fixed navigation. */
@media(max-height:520px){
 .ss-workflow[open]{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:6px 10px;gap:4px}
 .ss-workflow .en-header{padding-bottom:3px;gap:6px}.ss-workflow .en-header h2{font-size:1.125rem}.ss-workflow .en-header button{font-size:0.75rem;padding:6px 10px;min-height:44px}
 .ss-workflow-tools{flex-wrap:nowrap;overflow-x:auto;gap:5px;padding:0}.ss-workflow-tools>button{flex:0 0 auto;min-height:40px;font-size:0.75rem;padding:6px 9px}
 .ss-workflow .ss-scope{flex:0 0 auto;position:static;margin-left:0}.ss-workflow .ss-scope[open]{position:fixed;top:52px;right:10px;width:min(520px,calc(100vw - 20px));max-height:60dvh}
 .ss-workflow .ss-step-nav{display:block;padding:0;border:0;background:transparent}.ss-workflow .ss-step-nav>button{display:none}
 .ss-workflow .ss-step-select{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;margin:0;font-size:0.75rem}.ss-workflow .ss-step-select select{min-height:44px;font-size:1rem}
 .ss-workflow .ss-preview-toggle{display:block}.ss-workflow-main{display:flex;flex-direction:column;overflow:auto;gap:10px;overscroll-behavior:contain}
 .ss-editor{overflow:visible;min-height:auto;flex:0 0 auto;padding:0 2px 12px;scrollbar-gutter:auto}.ss-preview-panel{display:none;order:-1;min-height:0;flex:0 0 auto;padding:8px;max-height:70dvh;overflow:auto;scrollbar-gutter:auto}.ss-preview-open .ss-preview-panel{display:block}
 .ss-workflow-footer{padding-top:4px}.ss-workflow-footer>p{font-size:0.75rem;max-height:2.8em;margin:0 0 4px}
 .ss-actionbar{display:grid;grid-template-columns:1fr 1fr;gap:6px}.ss-actionbar button{padding:6px;min-width:0;min-height:44px;font-size:0.8125rem}.ss-actionbar button:nth-child(-n+2){display:none}.ss-actionbar .ss-primary{margin:0;grid-column:1;grid-row:1}.ss-actionbar button:last-child{grid-column:2;grid-row:1}
 .ss-workflow .ss-review-inputs{min-height:36px;margin-bottom:3px}
}

.ss-step-state{display:block;font-size:0.6875rem;font-weight:400;line-height:1.3;margin-top:4px}

/* Desktop studio: presentation only. Field mode and narrow screens retain the
   compact field interface; all plots still use their original data and scale. */
@media (min-width:1000px) {
  .desktop-mode :is(.an-dialog,.an-modal) {
    border-radius:8px;
    border-color:var(--line);
    box-shadow:0 24px 80px #0005;
  }
  .desktop-mode :is(.an-dialog,.an-modal)::backdrop { background:#102328b8; }
  .desktop-mode :is(.an-dialog,.an-modal) :is(button,input,select,textarea) { border-radius:5px; }
  .desktop-mode :is(.an-dialog,.an-modal) button { line-height:1.4; }
  .desktop-mode :is(.an-dialog,.an-modal) button.secondary {
    background:var(--panel);
    border-color:var(--control-border,var(--line));
  }
  .desktop-mode :is(.an-dialog,.an-modal) :focus-visible {
    outline:3px solid var(--accent);
    outline-offset:3px;
  }
  .desktop-mode :is(.an-dialog,.an-modal) a { color:var(--accent); }
  .desktop-mode .an-dialog .help { font-size:0.8125rem; line-height:1.65; }
  .desktop-mode .an-dialog :is(h3,h4) { line-height:1.3; letter-spacing:-.025em; }
  .desktop-mode .an-dialog h3 { font-size:1.3125rem; }
  .desktop-mode .an-dialog details { border-radius:5px; }
  .desktop-mode .an-dialog summary { line-height:1.5; }
  .desktop-mode .an-dialog .an-controls,
  .desktop-mode .an-dialog .an-main,
  .desktop-mode .an-dialog .an-results {
    border-radius:6px;
    box-shadow:none;
    box-sizing:border-box;
  }
  .desktop-mode .an-dialog .an-controls,
  .desktop-mode .an-dialog .an-results { background:var(--panel); }
  .desktop-mode .an-dialog .an-main { background:var(--panel); border-top:3px solid var(--accent); }
  .desktop-mode .an-controls > label,
  .desktop-mode .an-controls details > label,
  .desktop-mode .an-results details > label { margin:12px 0; }
  .desktop-mode .an-controls :is(input:not([type=checkbox]),select),
  .desktop-mode .an-results :is(input:not([type=checkbox]),select) { width:100%; min-width:0; }
  .desktop-mode .an-controls > button,
  .desktop-mode .an-results > button { max-width:100%; margin-block:4px; white-space:normal; }
  .desktop-mode .an-controls > details { border-top:1px solid var(--line); padding-top:14px; background:transparent; }
  .desktop-mode .an-results > h3 { margin-top:0; }
  .desktop-mode .an-results > h3:not(:first-child) { margin-top:26px; padding-top:20px; border-top:1px solid var(--line); }
  .desktop-mode .an-results > details { border:1px solid var(--line); padding:14px; background:var(--panel2); }
  .desktop-mode .an-set { padding:15px; border-radius:5px; background:var(--panel2); }
  .desktop-mode .an-set :is(th,td) { padding-block:8px; border-bottom:1px solid var(--line); }
  .desktop-mode .an-set td { font-variant-numeric:tabular-nums; font-weight:650; }
  .desktop-mode .an-dialog #anPlot { border:1px solid #bac5c2; border-radius:2px; box-sizing:border-box; }
  .desktop-mode .an-main > .an-toolbar { gap:10px 16px; }
  .desktop-mode .an-main > .an-toolbar:first-child { margin-top:0; padding-bottom:14px; border-bottom:1px solid var(--line); }
  .desktop-mode .an-main > .an-toolbar label { display:flex; flex-direction:column; gap:5px; }
  .desktop-mode #anLayers { gap:6px 14px; }
  .desktop-mode #anLayers label { flex-direction:row; align-items:center; }
  .desktop-mode #anPlotInfo { font-variant-numeric:tabular-nums; }
  .desktop-mode #anRowsSection { border-top:1px solid var(--line); margin-top:24px; padding-top:20px; }
  .desktop-mode #anRowsSection > h3 { margin:0 0 8px; }
  .desktop-mode .an-table { border-radius:4px; }
  .desktop-mode .an-table th { padding:10px; text-align:left; border-bottom:1px solid var(--line); background:var(--panel2); }
  .desktop-mode .an-table th button { min-height:34px; padding:6px 8px; background:transparent; border-color:transparent; }
  .desktop-mode .an-table td { font-variant-numeric:tabular-nums; padding:11px 10px; }
  .desktop-mode .an-table tr.an-selected { background:color-mix(in srgb,var(--accent) 19%,var(--panel)); }
  .desktop-mode .an-table tr.an-selected td:first-child { box-shadow:inset 3px 0 var(--accent); }
  .desktop-mode .an-table tr.an-excluded { opacity:.8; }
  .desktop-mode .an-dialog #anMap { border:1px solid var(--line); border-radius:4px; margin-top:12px; }
  .desktop-mode .an-dialog .an-legend span { border:1px solid var(--line); border-radius:3px; background:var(--panel2); }
  .desktop-mode .an-modal { padding:28px; }
  .desktop-mode .an-modal > h2 { font-size:1.625rem; line-height:1.25; padding-bottom:18px; border-bottom:1px solid var(--line); }
  .desktop-mode .an-modal > .an-actions { padding-top:16px; border-top:1px solid var(--line); gap:10px; }
  .desktop-mode .an-modal textarea { line-height:1.6; }
  .desktop-mode .an-modal .an-mappings { padding:12px 0; border-block:1px solid var(--line); margin-block:16px; }
  .desktop-mode .an-file { border-radius:4px; background:var(--panel2); }
  .desktop-mode .en-dialog > nav:not(.ss-step-nav) { padding:10px; border:1px solid var(--line); border-radius:5px; background:var(--panel); }
  .desktop-mode .en-dialog > nav:not(.ss-step-nav) > button[aria-current="true"] { background:var(--panel2); box-shadow:inset 0 -3px var(--accent); outline:1px solid var(--accent); }
  .desktop-mode .ss-dialog { --ss-accent:var(--accent); }
  .desktop-mode .ss-dialog :is(.ss-model-card,.ss-guides,.ss-fields fieldset,.ss-preview-panel,.ss-result-overview,.ss-model-canvas-frame,.ss-geometry-canvas,.ss-object-overview,.ss-mechanism-choice,.ss-optional-setup,.ss-review-card) { border-radius:5px; }
  .desktop-mode .ss-dialog .ss-fields legend { font-size:0.75rem; font-weight:750; letter-spacing:.055em; }
  .desktop-mode .ss-dialog .ss-fields fieldset { border-top-width:2px; padding:16px; }
  .desktop-mode .ss-dialog :is(.ss-guide-details,.ss-source,.ss-material-interpretation,.ss-section-interpretation,.ss-input-issues) { border-radius:5px; }
  .desktop-mode .ss-dialog .ss-model-status { border-radius:4px; border-left:3px solid var(--accent); }
  .desktop-mode .ss-dialog .ss-model-dimensions { padding-top:16px; }
  .desktop-mode .ss-dialog .ss-model-dimensions dl { gap:8px 16px; }
  .desktop-mode .ss-dialog .ss-model-dimensions dd { font-weight:650; }
  .desktop-mode .ss-dialog .ss-model-legend button { border-radius:4px; }
  .desktop-mode .ss-dialog .ss-support-list .ss-bolt-step { border-radius:5px; padding:18px; }
  .desktop-mode .ss-dialog .ss-support-list .ss-bolt-step > summary { font-size:1.25rem; }
  .desktop-mode .ss-dialog .ss-result-overview { padding:22px; }
  .desktop-mode .ss-dialog .ss-result-overview .ss-result-heading { font-size:1.75rem; }
  .desktop-mode .ss-dialog .ss-actionbar .ss-primary { background:var(--accent); color:var(--accent-dark); border-color:var(--accent); }
  .desktop-mode .ss-dialog [aria-invalid="true"] { border-color:var(--danger,#e98478); }
  .desktop-mode .ss-dialog .ss-input-reference { border-top:1px solid var(--line); padding-top:3px; }
}

/* Keep the existing short-screen workflow available at desktop browser zoom. */
@media (min-width:1000px) and (min-height:521px) {
  .desktop-mode .an-dialog { width:calc(100vw - 40px); height:calc(100dvh - 40px); max-height:calc(100dvh - 40px); padding:24px; }
  .desktop-mode .an-dialog:not(.en-dialog) { max-width:2100px; }
  .desktop-mode .an-dialog .an-header {
    top:-24px;
    margin:-24px -24px 22px;
    padding:22px 24px 0;
    gap:16px 24px;
    background:var(--studio-ink,#152a2d);
    color:#f5f3ed;
    border-bottom:0;
  }
  .desktop-mode .an-header h2 { font-size:1.875rem; letter-spacing:-.035em; }
  .desktop-mode .an-header p { color:#c1d0cd; font-size:0.8125rem; }
  .desktop-mode .an-header button.secondary { color:#f5f3ed; background:transparent; border-color:#7a9391; }
  .desktop-mode .an-header :focus-visible { outline-color:#f3bb83; }
  .desktop-mode .an-header .an-jumps { padding:12px 0; border-top:1px solid #496362; gap:8px; }
  .desktop-mode .an-header .an-jumps button { padding:7px 16px; }
  .desktop-mode .an-dialog > .an-actions { padding:16px; margin:18px 0 22px; background:var(--panel); border:1px solid var(--line); border-radius:5px; align-items:end; gap:10px; }
  .desktop-mode .an-dialog > .an-actions > label { margin:0; font-size:0.75rem; }
  .desktop-mode .an-dialog > .an-actions .an-file { min-height:38px; box-sizing:border-box; padding:5px 10px; }
  .desktop-mode .an-dialog > .an-actions button { min-height:40px; }
  .desktop-mode .an-dialog .an-layout { grid-template-columns:224px minmax(0,1fr); gap:20px; }
  .desktop-mode .an-dialog .an-controls { padding:18px; }
  .desktop-mode .an-dialog .an-main { padding:22px; }
  .desktop-mode .an-dialog .an-results { grid-column:1/-1; padding:22px; }
  .desktop-mode .an-dialog #anPlot { max-width:clamp(360px,calc(100dvh - 400px),760px); }
  .desktop-mode .en-dialog { max-width:1440px; }
  .desktop-mode .en-dialog .en-header { background:var(--bg); padding:6px 0 18px; margin-bottom:18px; border-bottom:1px solid var(--line); }
  .desktop-mode .en-dialog .en-header h2 { font-size:1.875rem; margin:0 auto 0 0; }
  .desktop-mode .en-dialog:not(.ss-dialog) > div > section { padding-top:24px; }
  .desktop-mode .en-dialog:not(.ss-dialog) > div > section > h3 { font-size:1.5625rem; }
  .desktop-mode .ss-workflow[open] { max-width:1840px; gap:12px; }
  .desktop-mode .ss-workflow .en-header { padding:0 0 14px; margin:0; }
  .desktop-mode .ss-workflow .ss-workflow-tools { gap:10px; }
  .desktop-mode .ss-workflow .ss-step-nav { padding:0; gap:0; border-radius:5px; background:var(--panel); }
  .desktop-mode .ss-workflow .ss-step-nav > button { border-radius:0; min-height:60px; padding:12px 8px; border-right:1px solid var(--line); }
  .desktop-mode .ss-workflow .ss-step-nav > button:last-child { border-right:0; }
  .desktop-mode .ss-workflow .ss-step-nav > button[aria-current="step"] { background:var(--panel2); box-shadow:inset 0 3px var(--accent); }
  .desktop-mode .ss-workflow .ss-step-state { font-size:0.6875rem; line-height:1.35; }
  .desktop-mode .ss-workflow .ss-workflow-main { grid-template-columns:minmax(0,1fr) minmax(0,1.05fr); gap:24px; }
  .desktop-mode .ss-workflow .ss-editor { padding-right:16px; }
  .desktop-mode .ss-workflow .ss-preview-panel { padding:22px; border-top:3px solid var(--accent); }
  .desktop-mode .ss-workflow .ss-page-heading { font-size:1.6875rem; margin:12px 0; }
  .desktop-mode .ss-workflow .ss-page-help { margin-bottom:20px; max-width:72ch; line-height:1.6; }
  .desktop-mode .ss-workflow .ss-model-canvas { max-height:46dvh; }
  .desktop-mode .ss-workflow .ss-workflow-footer { padding-top:12px; background:var(--bg); }
  .desktop-mode .ss-workflow .ss-actionbar { gap:10px; }
  .desktop-mode .ss-workflow .ss-actionbar button { min-width:94px; }
}

@media (min-width:1280px) and (min-height:521px) {
  .desktop-mode .an-dialog .an-layout { grid-template-columns:234px minmax(0,1fr) 304px; gap:20px; }
  .desktop-mode .an-dialog .an-results { grid-column:auto; padding:18px; }
  .desktop-mode .an-dialog #anStats { display:block; }
}
.an-workflow-state,.an-workflow-scope{margin:.4rem .9rem;padding:.5rem .7rem;border:1px solid var(--border,#536477);border-radius:.55rem;line-height:1.4;font-size:.88rem;overflow-wrap:anywhere}
.an-workflow-state{font-weight:600}

/* Task groups keep file operations out of the plotting controls. */
.an-commandbar .an-command-group { min-width:0; padding:0; }
.an-commandbar .an-toolbar { margin:0; align-items:end; gap:8px; }
.an-commandbar .an-toolbar label { display:grid; gap:3px; font-size:0.6875rem; }
.an-commandbar .an-eyebrow { margin:0 0 7px; font-size:0.625rem; letter-spacing:.1em; font-weight:700; color:var(--muted); }
.an-commandbar button { display:inline-flex; align-items:center; gap:7px; }
.an-action-icon { width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.an-dialog .an-feedback { margin:0 0 12px; }
.an-feedback > p { margin:0 0 4px; font-size:0.75rem; line-height:1.5; }
.an-feedback .an-workflow-state { margin:0; padding:0; border:0; font-size:0.6875rem; color:var(--muted); font-weight:500; }
.an-dialog .an-export-panel { margin:0 0 16px; padding:10px 14px; border:1px solid var(--line); border-radius:6px; background:var(--panel); }
.an-export-panel > summary { min-height:28px; line-height:28px; font-size:0.8125rem; }
.an-export-groups { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-top:16px; }
.an-export-groups > section { min-width:0; padding:0; }
.an-export-groups h3 { font-size:1rem; margin:0 0 10px; }
.an-export-groups .an-file { max-width:100%; box-sizing:border-box; }
.an-export-groups .an-file input { display:block; width:100%; max-width:100%; }
.an-export-panel .an-workflow-scope,.an-controls .an-workflow-scope { margin:8px 0; padding:0; border:0; font-size:0.75rem; }
.an-main .an-plot-title { margin:0 0 8px; }
.an-main .an-workflow-scope { margin:0 0 12px; padding:8px 10px; font-size:0.75rem; background:var(--panel2); border-color:var(--line); }
.an-dialog .an-display-tools { align-items:end; margin:12px 0; gap:10px; }
.an-display-tools > label { flex:1 1 170px; display:grid; gap:3px; }
.an-display-tools select { width:100%; max-width:100%; }
.an-display-tools .an-layer-menu { margin:0; flex:1 1 100%; border-top:1px solid var(--line); padding-top:7px; }
.an-layer-menu > summary { min-height:30px; line-height:30px; font-size:0.75rem; color:var(--muted); }
.an-main .an-selection-tools { padding:8px 12px; border:1px solid var(--line); border-radius:6px; background:var(--panel2); }
.an-selection-tools .an-toolbar { align-items:end; margin:4px 0; }
.an-selection-tools > details { margin:10px 0 0; border-top:1px solid var(--line); padding-top:8px; }
.an-selection-tools summary { min-height:30px; line-height:30px; font-size:0.75rem; }
.an-dialog .an-reference-tools { margin-top:16px; padding-top:12px; border-top:1px solid var(--line); }
.an-controls h3 { margin:0 0 12px; font-size:1.0625rem; }
.an-legend .an-legend-item { display:inline-flex; align-items:center; gap:6px; }
.an-legend-item svg { width:20px; height:20px; flex:none; }
.an-results .an-field-application { border-left:3px solid var(--accent); }
.an-dialog .an-command-group { margin:0 0 18px; padding:0 0 15px; border-bottom:1px solid var(--line); }
.an-command-group .an-eyebrow { margin:0 0 8px; font-size:0.625rem; font-weight:700; letter-spacing:.08em; color:var(--muted); }
.an-command-group .an-toolbar { display:grid; gap:7px; margin:0; }
.an-command-group .an-toolbar > label { display:grid; gap:4px; }
.an-command-group .an-toolbar select { width:100%; max-width:100%; }
.an-command-group button { display:inline-flex; align-items:center; gap:7px; text-align:left; }
.an-dialog .an-export-panel > summary,.an-dialog .an-layer-menu > summary { padding:0; }
.an-dialog .an-display-tools .an-layer-menu { flex:0 1 auto; border:0; padding:0; }
.an-layer-menu[open] { flex:1 1 100%!important; }
.an-dialog .an-layer-menu:not([open]) > summary { min-height:38px; line-height:38px; padding:0 9px; border:1px solid var(--line); border-radius:5px; }
@media(min-width:1000px) {
 body.desktop-mode .an-dialog:not(.en-dialog) > .an-header { grid-template-columns:minmax(220px,1fr) auto auto; padding:14px 20px; margin-bottom:12px; gap:8px 18px; }
 body.desktop-mode .an-dialog:not(.en-dialog) .an-header > button { grid-column:3; grid-row:1; }
 body.desktop-mode .an-dialog:not(.en-dialog) .an-header .an-jumps { grid-column:2; grid-row:1; padding:0; border:0; }
 body.desktop-mode .an-dialog:not(.en-dialog) .an-header h2 { font-size:1.5625rem; }
 body.desktop-mode .an-dialog:not(.en-dialog) .an-header .an-jumps { padding:0; }
 body.desktop-mode .an-dialog:not(.en-dialog) > .an-commandbar { padding:12px 14px; margin:0 0 10px; justify-content:space-between; gap:14px; }
 body.desktop-mode .an-dialog:not(.en-dialog) .an-layout { grid-template-columns:200px minmax(0,1fr); gap:14px; }
 body.desktop-mode .an-dialog:not(.en-dialog) .an-controls { padding:14px; }
 body.desktop-mode .an-dialog:not(.en-dialog) .an-main { padding:18px; }
 body.desktop-mode .an-dialog:not(.en-dialog) #anPlot { max-width:min(760px,max(360px,calc(100dvh - 325px))); }
 body.desktop-mode .an-dialog:not(.en-dialog) .an-main > .an-toolbar { padding:0; border:0; }
 body.desktop-mode .an-dialog:not(.en-dialog) .an-results details { padding:10px; }
}
@media(min-width:1200px) {
 body.desktop-mode .an-dialog:not(.en-dialog) .an-layout { grid-template-columns:190px minmax(0,1fr) 260px; }
 body.desktop-mode .an-dialog:not(.en-dialog) .an-results { grid-column:auto; padding:14px; }
 body.desktop-mode .an-dialog:not(.en-dialog) #anStats { display:block; }
}
@media(max-width:740px) {
 .an-commandbar { gap:12px; }
 .an-commandbar .an-command-group { width:100%; }
 #anAnalysisTools { display:grid; grid-template-columns:1fr 1fr; }
 #anAnalysisTools label { grid-column:1/-1; grid-row:2; }
 #anAnalysisTools select { width:100%; max-width:none; }
 .an-export-groups { grid-template-columns:1fr; }
 .an-export-groups > section + section { border-top:1px solid var(--line); padding-top:14px; }
 .an-dialog:not(.en-dialog) .an-main { order:0; }
 .an-dialog:not(.en-dialog) .an-controls { order:1; }
 .an-dialog:not(.en-dialog) .an-results { order:2; }
 .an-dialog .an-jumps { gap:5px; }
 .an-jumps button { padding:7px 9px; }
 .an-selection-tools .an-toolbar button { flex:1 1 130px; }
 .an-selection-tools .an-toolbar label { flex:1 1 100%; }
 .an-selection-tools select { width:100%; max-width:none; }
}

.an-pole-query{padding:12px;margin:10px 0;border:1px solid var(--line);border-radius:8px;background:var(--panel2,var(--panel));overflow-wrap:anywhere}.an-pole-query h4{margin:0 0 8px}.an-pole-query-row{padding:8px 0;border-bottom:1px solid var(--line)}.an-pole-query-row p{margin:6px 0}.an-pole-query-row small{display:block;color:var(--muted)}

/* Workspace view state is temporary; every original control/value is retained. */
.an-dialog .an-view-tools { justify-content:flex-end; gap:6px; margin:0 0 10px; }
.an-dialog .an-view-tools button { font-size:0.6875rem; min-height:34px; }
.an-dialog #anPopulation { position:sticky; top:calc(var(--an-header-height,140px) + 5px); z-index:4; padding:8px 10px; margin-bottom:10px; border:1px solid var(--line); border-radius:6px; background:var(--panel); }
.an-dialog #anPopulation p { margin:3px 0; font-size:0.6875rem; line-height:1.4; overflow-wrap:anywhere; }
.an-dialog #anPopulation .an-workflow-scope,.an-dialog #anPopulation .an-workflow-state { border:0; padding:0; background:none; }
.an-dialog .an-context-filters,.an-dialog .an-symbol-key { color:var(--muted); font-size:0.6875rem; line-height:1.5; }
.an-dialog.an-filters-hidden .an-controls,.an-dialog.an-sets-hidden .an-results { display:none; }
.an-dialog.an-expanded-plot .an-controls,.an-dialog.an-expanded-plot .an-results,.an-dialog.an-expanded-plot #anRowsSection,.an-dialog.an-expanded-plot .an-selection-tools,.an-dialog.an-expanded-plot #anExportSection { display:none; }
.an-dialog.an-expanded-plot .an-layout { grid-template-columns:minmax(0,1fr)!important; }
.an-dialog.an-expanded-plot .an-main { grid-column:1/-1; }
.an-dialog.an-expanded-plot .an-plot-title,.an-dialog.an-expanded-plot #anToggleFilters,.an-dialog.an-expanded-plot #anToggleSets,.an-dialog.an-expanded-plot #anStatus:not(.an-warning),.an-dialog.an-expanded-plot .an-main>details { display:none; }
@media(min-width:1000px) {
 .an-dialog.an-expanded-plot:not(.en-dialog) .an-main { display:grid; grid-template-columns:minmax(0,1fr) 260px; grid-template-areas:"plot view" "plot context" "plot display" "plot legend" "plot info" "plot query" "plot key" "plot warnings"; gap:7px 18px; align-items:start; }
 .an-dialog.an-expanded-plot #anPlot { grid-area:plot; margin:0 auto; max-width:min(100%,max(300px,calc(100dvh - var(--an-header-height,100px) - 110px)))!important; align-self:start; }
 .an-dialog.an-expanded-plot .an-view-tools { grid-area:view; }
 .an-dialog.an-expanded-plot #anPopulation { grid-area:context; position:static; }
 .an-dialog.an-expanded-plot .an-display-tools { grid-area:display; display:grid; grid-template-columns:1fr; margin:0; }
 .an-dialog.an-expanded-plot .an-display-tools label,.an-dialog.an-expanded-plot .an-display-tools select { width:100%; max-width:none; }
 .an-dialog.an-expanded-plot #anPlotInfo { grid-area:info; }
 .an-dialog.an-expanded-plot #anPoleQuery { grid-area:query; }
 .an-dialog.an-expanded-plot #anLegend { grid-area:legend; }
 .an-dialog.an-expanded-plot #anSymbolKey { grid-area:key; }
 .an-dialog.an-expanded-plot #anWarnings { grid-area:warnings; }
}
@media(min-width:1200px) {
 body.desktop-mode .an-dialog.an-filters-hidden:not(.an-sets-hidden):not(.en-dialog) .an-layout { grid-template-columns:minmax(0,1fr) 260px; }
 body.desktop-mode .an-dialog.an-sets-hidden:not(.an-filters-hidden):not(.en-dialog) .an-layout { grid-template-columns:190px minmax(0,1fr); }
 body.desktop-mode .an-dialog.an-filters-hidden.an-sets-hidden:not(.en-dialog) .an-layout { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:1199px) {
 .an-dialog.an-filters-hidden .an-layout { grid-template-columns:minmax(0,1fr)!important; }
 .an-dialog.an-expanded-plot #anPlot { max-width:100%; }
}
@media(max-width:740px) {
 .an-dialog .an-view-tools { display:grid; grid-template-columns:1fr 1fr; }
 .an-view-tools button:last-child { grid-column:1/-1; }
 .an-dialog #anPopulation { position:static; }
}
/* Desktop inspection workspace. Mounted only in Desktop view at >=1000px;
   removing it restores the existing phone DOM and responsive layout. */
.an-dialog.an-desktop-layout { --studio-ink:#172d38; --studio-paper:#fff; --studio-muted:#526976; --studio-line:#d8e0e3; --studio-teal:#007d71; --studio-accent:#007d71; --bg:#f4f6f7; --panel:#fff; --panel2:#f5f7f8; --panel3:#eef2f3; --line:#d8e0e3; --text:#172d38; --muted:#526976; --accent:#007d71; --accent-dark:#fff; --control-bg:#fff; --control-border:#a5b6be; color-scheme:light; color:var(--text); background:var(--bg); padding:0 18px 20px; border-radius:8px; }
body.desktop-mode .an-dialog.an-desktop-layout > .an-header { position:sticky; top:0; margin:0 -18px 12px; padding:12px 22px; display:flex; justify-content:space-between; background:#fff; color:var(--text); border-bottom:1px solid var(--line); border-radius:0; }
body.desktop-mode .an-dialog.an-desktop-layout .an-header h2 { color:var(--text); line-height:1.2; }
body.desktop-mode .an-dialog.an-desktop-layout .an-header button.secondary { color:var(--text); border-color:var(--control-border); background:#fff; }
.an-desktop-layout .an-header h2 { font-size:1.5rem; }
.an-desktop-layout .an-header p { margin:4px 0 0; font-size:0.8125rem; color:var(--muted); }
.an-desktop-layout .an-header .an-jumps,.an-desktop-layout > .an-layout,.an-desktop-layout .an-view-tools,.an-desktop-layout .an-plot-title { display:none; }
.an-desktop-layout button,.an-desktop-layout button.secondary { min-height:36px; padding:7px 11px; border:1px solid var(--control-border); border-radius:5px; background:#fff; color:var(--text); font-weight:600; font-size:0.8125rem; box-shadow:none; }
.an-desktop-layout :is(#anImport,#anAssign,#anCluster) { background:var(--accent); border-color:var(--accent); color:#fff; }
.an-desktop-layout button.danger { color:#9d2839; border-color:#ac6570; background:#fff5f6; }
.an-desktop-layout input,.an-desktop-layout select,.an-desktop-layout textarea { background:#fff; color:var(--text); border-color:var(--control-border); border-radius:5px; min-height:36px; font-size:0.8125rem; padding:7px 9px; }
.an-desktop-layout label { color:var(--text); font-size:0.75rem; margin:0; }
.an-desktop-layout .help,.an-desktop-layout p { color:var(--muted); }
.an-desktop-layout .an-warning { color:#843b09; background:#fff3dd; padding:8px 10px; border-left:3px solid #a45b13; }
.an-desktop-layout .an-warning:empty { display:none; }
.an-desktop-context { position:sticky; top:var(--an-header-height,74px); z-index:4; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 14px; padding:10px 13px; background:#fff; border:1px solid var(--line); border-radius:6px; }
.an-desktop-context .an-desktop-freshness { margin:0; font-size:0.75rem; }
.an-desktop-context #anPopulation { position:static; background:transparent; border:0; padding:0; margin:0; grid-column:1; box-shadow:none; }
.an-desktop-context #anReload { grid-column:2; grid-row:1 / 3; align-self:center; }
.an-desktop-context .an-workflow-scope,.an-desktop-context .an-workflow-state { font-size:0.75rem; line-height:1.45; margin:2px 0; }
.an-desktop-context .an-workflow-state { font-weight:400; }
.an-desktop-context #anFilterBadge { margin:2px 0; padding:0; background:none; border:0; }
.an-desktop-tools { padding:10px 0; }
.an-desktop-tools .an-display-tools { display:flex; flex-wrap:wrap; margin:0; gap:14px; align-items:center; justify-content:flex-start; }
.an-desktop-tools .an-display-tools label { display:flex; align-items:center; gap:7px; }
.an-desktop-tools .an-display-tools select { width:auto; min-width:175px; margin:0; }
.an-desktop-layout .an-layer-menu { background:#fff; padding:8px 12px; border-radius:5px; }
.an-desktop-nav { display:flex; flex-wrap:wrap; gap:6px; padding-bottom:10px; }
.an-desktop-nav button[aria-pressed=true] { color:var(--accent); border-color:var(--accent); background:#ecf7f5; box-shadow:inset 0 -2px var(--accent); }
.an-desktop-stage { display:grid; grid-template-columns:300px minmax(0,1fr); align-items:start; gap:14px; }
.an-measurement-sidebar { padding:14px; border:1px solid var(--line); background:#fff; border-radius:6px; min-width:0; }
.an-measurement-sidebar h3 { margin:0 0 10px; font-size:1rem; }
.an-list-count { font-size:0.75rem; margin:8px 0 4px; }
.an-measurement-sidebar #anListHint { font-size:0.6875rem; margin:0 0 10px; }
.an-measurement-list { max-height:min(260px,35dvh); overflow-y:auto; }
.an-desktop-layout .an-measurement-item { width:100%; display:grid; grid-template-columns:15px minmax(0,1fr) auto; text-align:left; gap:8px; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:10px 4px; min-height:55px; }
.an-item-text { min-width:0; }
.an-item-text strong,.an-item-text small { display:block; overflow-wrap:anywhere; }
.an-item-text small,.an-item-angles { font-size:0.6875rem; font-weight:400; color:var(--muted); }
.an-item-angles { white-space:nowrap; font-variant-numeric:tabular-nums; }
.an-desktop-layout .an-item-selected { background:#ecf7f5; box-shadow:inset 3px 0 var(--accent); }
.an-desktop-layout .an-item-excluded { color:var(--muted); background:#f4f5f5; }
.an-list-pagination { display:flex; align-items:center; justify-content:space-between; gap:6px; padding-top:9px; font-size:0.6875rem; }
.an-desktop-layout .an-list-pagination button { font-size:0.6875rem; min-height:32px; padding:5px 8px; }
.an-desktop-layout #anPoleQuery { border:0; border-top:1px solid var(--line); padding:12px 0 0; margin:12px 0 0; background:transparent; max-height:340px; overflow-y:auto; }
.an-desktop-layout #anPoleQuery h4 { font-size:0.8125rem; margin:0 0 8px; }
.an-desktop-layout #anPoleQuery :is(p,small) { font-size:0.6875rem; line-height:1.5; overflow-wrap:anywhere; }
.an-desktop-layout #anPoleQuery strong { font-size:0.8125rem; font-variant-numeric:tabular-nums; }
.an-desktop-layout .an-pole-query-row { padding:8px 0; background:none; }
body.desktop-mode .an-dialog.an-desktop-layout .an-main { border:1px solid var(--line); border-top:1px solid var(--line); border-radius:6px; padding:12px; background:#fff; }
body.desktop-mode .an-dialog.an-desktop-layout #anPlot { display:block; max-width:min(620px,max(290px,calc(100dvh - 420px))); width:100%; margin:0 auto; }
.an-desktop-layout #anPlotInfo,.an-desktop-layout #anSymbolKey { font-size:0.6875rem; line-height:1.45; margin:5px 0; }
.an-desktop-layout .an-selection-tools { padding-top:8px; margin-top:8px; border-top:1px solid var(--line); }
.an-desktop-layout .an-selection-tools label { display:flex; align-items:center; gap:8px; }
.an-desktop-layout .an-selection-tools select { width:auto; margin:0; }
.an-desktop-layout .an-legend span { font-size:0.75rem; background:#f5f7f8; }
.an-desktop-layout details { background:#f5f7f8; border-color:var(--line); padding:10px 12px; }
.an-desktop-layout .an-desktop-panel { margin:14px 0 0; width:100%; background:#fff; border:1px solid var(--line); border-radius:6px; padding:18px; scroll-margin-top:calc(var(--an-header-height,74px) + 120px); }
.an-desktop-layout :is(#anFilterSection,#anSetsSection).an-desktop-panel { display:block; }
.an-desktop-layout [hidden] { display:none !important; }
.an-desktop-layout .an-return-plot { margin-top:14px; }
.an-desktop-layout #anFilterSection { columns:2; column-gap:28px; }
.an-desktop-layout #anFilterSection > * { break-inside:avoid; margin-bottom:14px; }
.an-desktop-layout .an-feedback:has(#anStatus:empty) { display:none; }
@media(max-height:620px) { body.desktop-mode .an-dialog.an-desktop-layout #anPlot { max-width:max(180px,calc(100dvh - 370px)); } }
@media(max-width:1120px) { .an-desktop-stage { grid-template-columns:270px minmax(0,1fr); } }

/* One canvas, one adjacent tool rail. Scrolling the tools retains the net. */
.an-inline-kinematics { border:1px solid var(--line); border-radius:8px; padding:14px; margin-top:14px; }
.an-inline-kinematics > p { font-size:0.8125rem; line-height:1.5; }
.an-kinematic-inputs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.an-kinematic-inputs label { display:block; min-width:0; }
.an-kinematic-inputs :is(input,select) { width:100%; }
.an-inline-kinematics table { width:100%; font-size:0.75rem; }
.an-inline-kinematics :is(th,td) { text-align:left; padding:6px; border-bottom:1px solid var(--line); }
body.desktop-mode .an-dialog.an-desktop-layout { height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); overflow:hidden; display:flex; flex-direction:column; }
.an-desktop-layout .an-header { flex:none; position:static; }
.an-desktop-shell { flex:1; min-height:0; display:flex; flex-direction:column; }
.an-desktop-context { position:static; flex:none; }
.an-desktop-tools { flex:none; }
.an-desktop-stage { flex:1; min-height:0; grid-template-columns:minmax(0,1fr) minmax(360px,43%); align-items:stretch; }
.an-desktop-right { display:flex; flex-direction:column; min-height:0; min-width:0; background:#fff; border:1px solid var(--line); border-radius:6px; padding:10px; }
.an-desktop-shortcuts { flex:none; margin-bottom:10px; }
.an-desktop-layout #anSlope { background:var(--accent); color:white; }
.an-desktop-nav { flex:none; }
.an-desktop-panels { min-height:0; flex:1; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.an-desktop-layout .an-desktop-panel { margin:0; border:0; padding:8px; }
.an-desktop-layout #anFilterSection { columns:1; }
body.desktop-mode .an-dialog.an-desktop-layout .an-main { min-height:0; display:flex; flex-direction:column; overflow:auto; }
body.desktop-mode .an-dialog.an-desktop-layout #anPlot { flex:1; min-height:120px; width:100%; max-width:none; height:0; object-fit:contain; }
.an-desktop-layout #anLegend { flex:none; max-height:75px; overflow:auto; }
.an-desktop-layout .an-measurement-sidebar { border:0; padding:8px; }
.an-desktop-layout .an-measurement-list { max-height:none; }
.an-desktop-layout .an-feedback { flex:none; max-height:60px; overflow:auto; }
@media(max-width:480px) { .an-kinematic-inputs { grid-template-columns:1fr; } }

.an-desktop-layout .an-desktop-freshness,.an-desktop-layout #anFilterBadge { display:none; }
.an-desktop-layout .an-live-caption { flex:none; font-size:0.6875rem; margin:5px 0 0; }
.an-inline-kinematics > h3 { margin:10px 0 6px; }

@media(min-width:1000px) and (max-height:700px) {
 .an-desktop-layout .an-header { padding:10px 18px; }
 .an-desktop-layout .an-header p,.an-desktop-layout #anSaveState { display:none; }
 .an-desktop-layout .an-desktop-context { padding:6px 10px; }
 .an-desktop-layout .an-desktop-tools { padding:6px 0; }
 .an-desktop-layout .an-inline-kinematics > p:first-of-type { display:none; }
}

/* Always available plot selection; embedded tools share the stereonet screen. */
.an-persistent-selection { display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:8px; background:var(--panel); border:1px solid var(--line); border-radius:8px; flex-shrink:0; }
.an-persistent-selection button { min-height:40px; padding:7px 12px; }
.an-persistent-selection button[aria-pressed="true"] { background:var(--accent,#8bd6c4); color:#092421; border-color:var(--accent,#8bd6c4); }
.an-persistent-selection [hidden] { display:none!important; }
.en-embedded { min-width:0; }
.en-embedded nav { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; }
.en-embedded nav button[aria-current="true"] { border-color:var(--accent,#8bd6c4); }
.en-embedded .an-toolbar { display:flex; flex-wrap:wrap; gap:10px; }
.en-embedded .an-toolbar label { flex:1 1 140px; min-width:0; }
.en-embedded :is(input,select,textarea) { max-width:100%; box-sizing:border-box; }
.en-embedded svg { max-width:100%; height:auto; }
.an-engineering-section { padding:14px; border:1px solid var(--line); border-radius:8px; margin:12px 0; }
.an-desktop-layout .an-engineering-section { margin:0; border:0; }
.an-desktop-layout .an-persistent-selection { position:sticky; top:0; z-index:2; }
.an-desktop-layout .en-embedded { color:#263b43; }
.an-desktop-layout .en-embedded .en-header { position:static; background:#edf4f4; color:#263b43; border-radius:6px; padding:10px; }
.an-desktop-layout .en-embedded .en-header h2 { color:#263b43; font-size:1.125rem; }
.an-desktop-layout .an-persistent-selection button[aria-pressed="true"] { background:#087d79; color:white; border-color:#087d79; }
.an-desktop-layout .en-embedded nav { position:sticky; top:0; z-index:2; background:#fff; padding:8px 0; }
.an-desktop-layout .en-embedded nav button[aria-current="true"] { background:#e0f2ef; color:#165a50; border-color:#087d79; }
.an-engineering-section { min-width:0; max-width:100%; box-sizing:border-box; overflow-wrap:anywhere; }
.en-embedded .en-header { display:flex; flex-wrap:wrap; gap:8px; }
.en-embedded .en-header h2 { min-width:0; }
.en-embedded > div { min-width:0; }
.an-dialog.an-expanded-plot:not(.an-desktop-layout) .an-engineering-section { display:none; }

@media(min-width:741px) and (max-width:999px){.an-layout>.an-engineering-section{grid-column:1/-1;min-width:0}}
