/* SPM-EDIT-1: scoped styles; no application-wide layout or CSP changes. */
.spm-card-list { display:grid; gap:14px; }
.spm-card { padding:18px; border:1px solid var(--line,#d9e4e3); border-radius:12px; background:var(--paper,#fff); min-width:0; }
.spm-card-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.spm-card-top strong { font-size:1.02rem; display:block; overflow-wrap:anywhere; }
.spm-card-top p, .spm-card p { margin:5px 0 9px; }
.spm-card .spm-name { margin-top:14px; font-weight:600; overflow-wrap:anywhere; }
.spm-card-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:16px; }
.spm-inactive { background:#f7f9f9; }
.spm-version { padding-top:14px; margin-bottom:0; }
.spm-editor { display:grid; gap:20px; }
.spm-editor [hidden] { display:none !important; }
.spm-instrument { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px 20px; border-radius:12px; border:1px solid #d9e4e3; background:#f7faf9; }
.spm-instrument strong, .spm-instrument span:not(.badge) { display:block; }
.spm-instrument strong { margin:6px 0; font-size:1.2rem; }
.spm-editor .note { margin:0; }
.spm-editor .note strong { display:block; margin-bottom:6px; }
.spm-editor .form-grid { gap:18px; }
.spm-editor label { margin:0; min-width:0; }
.spm-editor label small { display:block; font-weight:400; margin:4px 0 8px; line-height:1.4; color:#526969; }
.spm-editor input, .spm-editor select, .spm-editor textarea { width:100%; box-sizing:border-box; }
.spm-editor textarea { min-height:105px; resize:vertical; }
.spm-editor .form-error { border:1px solid #e7bfb9; background:#fff5f3; border-radius:8px; padding:14px; overflow-wrap:anywhere; }
.spm-editor .form-error:focus { outline:2px solid #ba4135; outline-offset:2px; }
.spm-linked { border-top:1px solid #d9e4e3; padding-top:16px; }
.spm-linked h3 { margin:0 0 10px; font-size:1rem; }
.spm-linked ul { list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.spm-linked li { display:flex; gap:12px; justify-content:space-between; padding:9px 12px; background:#f6f9f8; border-radius:6px; }
.spm-linked li span { font-size:.85rem; white-space:nowrap; }
.spm-linked p { margin:10px 0 0; }
.spm-replacement { border:1px solid #d9e4e3; border-radius:9px; padding:14px; }
.spm-replacement summary { cursor:pointer; font-weight:600; }
.spm-replacement p { margin:14px 0; line-height:1.6; }
.spm-editor .form-actions { margin-top:0; gap:10px; }
.spm-editor button:disabled { cursor:default; opacity:.65; }
.spm-editor ol { padding-left:22px; margin:0; }
.spm-editor li { margin-bottom:12px; }
@media (max-width:600px) {
 .spm-editor .form-grid { grid-template-columns:1fr; }
 .spm-instrument { align-items:flex-start; padding:14px; }
 .spm-card { padding:14px; }
 .spm-card-top { flex-wrap:wrap; }
 .spm-linked li { flex-direction:column; gap:3px; }
 .spm-editor .form-actions { flex-wrap:wrap; }
 .spm-editor .form-actions button { flex:1 1 auto; min-height:44px; }
}
