/* Scenario matrix (PG-92). Tokens from app.html :root only; text >= 12px. */
.sm-note{font-size:12px;color:var(--mute);line-height:1.45;margin:6px 0 0}
.sm-tops{display:flex;flex-direction:column;gap:6px}
.sm-top{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:baseline;gap:8px}
.sm-dim{font-size:12px;color:var(--mute);text-transform:capitalize}
.sm-name{font-size:12.5px;color:var(--ivory);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.sm-loss{color:var(--signal);font-size:12.5px;font-weight:700;white-space:nowrap}
.sm-gain{color:var(--felt);font-size:12.5px;font-weight:700;white-space:nowrap}
.sm-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.sm-open{padding:7px 12px;border-radius:17px;border:1px solid var(--gold);background:transparent;color:var(--gold);font-weight:700;font-size:12px;cursor:pointer;transition:background var(--t-hover) var(--e-hover),transform var(--t-instant) var(--e-out)}
.sm-open:hover{background:var(--goldT)}
.sm-open:active{transform:var(--press-btn)}
.sm-link{padding:7px 4px;border:none;background:transparent;color:var(--dim);font-size:12px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.sm-link:hover{color:var(--ivory)}
.sm-inline{padding:0 0 0 6px;font-weight:400;color:var(--gold)}
.sm-open:focus-visible,.sm-link:focus-visible,.sm-sort:focus-visible,.sm-tabs button:focus-visible,.sm-close:focus-visible{outline:2px solid var(--pre);outline-offset:2px}

.sm-dialog{width:min(860px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:0;border:1px solid var(--line2);border-radius:14px;background:var(--panel);color:var(--ivory)}
.sm-dialog[open]{animation:flyIn var(--t-base) var(--e-out)}
.sm-dialog::backdrop{background:rgba(15,13,10,.72)}
.sm-head{display:flex;align-items:flex-start;gap:12px;padding:16px 18px 10px;border-bottom:1px solid var(--line)}
.sm-head h2{margin:0;font:600 20px var(--serif);letter-spacing:-.01em}
.sm-head p{margin:4px 0 0;font-size:12.5px;color:var(--dim);line-height:1.45}
.sm-close{margin-left:auto;flex:none;width:34px;height:34px;border-radius:50%;border:1px solid var(--line2);background:transparent;color:var(--ivory);font-size:16px;cursor:pointer}
.sm-body{padding:12px 18px 18px;overflow:auto;max-height:calc(100dvh - 160px)}
.sm-tabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:10px}
.sm-tabs button{padding:6px 12px;border-radius:8px;border:1px solid var(--line);background:var(--panel2);color:var(--dim);font-size:12px;cursor:pointer}
.sm-tabs button span{color:var(--mute);margin-left:3px}
.sm-tabs button[aria-selected="true"]{border-color:var(--gold);background:var(--goldT);color:var(--gold)}
.sm-scroll{overflow-x:auto}
.sm-table{width:100%;min-width:600px;border-collapse:collapse;font-size:12.5px}
.sm-table th,.sm-table td{padding:7px 8px;border-bottom:1px solid var(--line);text-align:right}
.sm-table thead th{position:sticky;top:0;background:var(--panel);font-size:12px;color:var(--mute);font-weight:600}
.sm-table thead th:first-child,.sm-table tbody th{text-align:left}
.sm-table tbody th{max-width:320px}
.sm-sort{border:none;background:transparent;color:inherit;font:inherit;cursor:pointer;padding:0;text-align:right;white-space:nowrap}
.sm-sort.on{color:var(--gold)}
@keyframes smFlash{0%{box-shadow:0 0 0 0 rgba(201,162,39,.65)}100%{box-shadow:0 0 0 9px rgba(201,162,39,0)}}
.sm-flash{animation:smFlash var(--t-flash) var(--e-out)}
@media (max-width:640px){.sm-head{padding:14px 14px 8px}.sm-body{padding:10px 14px 14px}.sm-table{min-width:520px}.sm-table tbody th.sm-name{white-space:normal;width:140px;max-width:140px}}
/* Rail actions: two equal, aligned buttons instead of a pill plus an underline link. */
.sm-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.sm-open,.sm-link{height:32px;padding:0 10px;border-radius:8px;font-size:11.5px;font-weight:600;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sm-open{border:1px solid var(--goldD);color:var(--gold)}
.sm-link{border:1px solid var(--line2);color:var(--dim)}
.sm-link:hover{border-color:var(--goldD);color:var(--ivory)}
