/* MS Watchlist 1.1.0 - mobile-first. Cards by default, table when the dashboard is wide. */
.msw{--msw-primary:#0a8556;--msw-ink:#065235;--msw-soft:#e0f1ea;--msw-dark:#0b2b22;--msw-bg:#f2f7f4;--msw-text:#1d2b25;--msw-muted:#656f6b;--msw-line:#e1e8e4;--msw-card:#fff;--msw-up:#07704a;--msw-upbg:#e1f4ea;--msw-down:#c0283a;--msw-downbg:#fdeaec;container:msw / inline-size;position:relative;display:block;width:100%;max-width:100%;margin:0;padding:0;background:var(--msw-bg);color:var(--msw-text);border:1px solid var(--msw-line);border-radius:16px;overflow:hidden;font-family:inherit;font-size:16px;line-height:1.5;text-align:left;-webkit-text-size-adjust:100%}
.msw *,.msw *::before,.msw *::after{box-sizing:border-box}
.msw img{max-width:100%}

/* header */
.msw .msw-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;padding:14px 16px;background:var(--msw-dark);color:#fff}
.msw .msw-brand{display:flex;align-items:center;gap:10px;min-width:0}
.msw .msw-brand-icon{flex:none;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:var(--msw-primary);color:#fff;font-size:14px;font-weight:700;line-height:1}
.msw .msw-brand-name{display:block;margin:0;font-size:18px;font-weight:700;line-height:1.2;color:#fff}
.msw .msw-brand-sub{display:block;margin:0;font-size:13px;line-height:1.3;color:rgba(255,255,255,.78)}
.msw .msw-meta{display:flex;flex-direction:column;align-items:flex-start;font-size:12px;line-height:1.4;color:rgba(255,255,255,.78)}

/* tabs */
.msw .msw-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px 12px;background:var(--msw-card);border-bottom:1px solid var(--msw-line)}
.msw .msw-tab{appearance:none;-webkit-appearance:none;display:block;width:100%;min-height:44px;margin:0;padding:8px 4px;border:1px solid var(--msw-line);border-radius:10px;background:var(--msw-bg);color:var(--msw-text);font:inherit;font-size:14px;font-weight:600;line-height:1.2;letter-spacing:0;text-transform:none;text-align:center;text-decoration:none;white-space:normal;box-shadow:none;cursor:pointer;transition:background-color .15s,color .15s,border-color .15s}
.msw .msw-tab:last-child{grid-column:1/-1}
.msw .msw-tab:hover,.msw .msw-tab:focus{background:var(--msw-soft);border-color:var(--msw-soft);color:var(--msw-ink);box-shadow:none;text-decoration:none}
.msw .msw-tab:focus-visible{outline:3px solid var(--msw-primary);outline-offset:2px}
.msw .msw-tab.is-active,.msw .msw-tab.is-active:hover,.msw .msw-tab.is-active:focus{background:var(--msw-primary);border-color:var(--msw-primary);color:#fff}

/* views */
.msw .msw-view{display:none;padding:14px}
.msw .msw-view.is-active{display:block}
.msw .msw-h{margin:0 0 4px;padding:0;font-family:inherit;font-size:20px;font-weight:700;line-height:1.25;letter-spacing:0;text-transform:none;color:var(--msw-text)}
.msw .msw-sub{margin:0 0 14px;padding:0;font-size:14px;line-height:1.5;color:var(--msw-muted)}
.msw .msw-empty{margin:0;padding:24px 16px;text-align:center;font-size:14px;color:var(--msw-muted);background:var(--msw-card);border:1px dashed var(--msw-line);border-radius:14px}
.msw .msw-note{margin:14px 0 0;padding:12px 14px;border:0;border-left:3px solid var(--msw-primary);border-radius:0;background:var(--msw-soft);font-size:13px;line-height:1.55;color:var(--msw-ink)}
.msw .msw-more{appearance:none;-webkit-appearance:none;display:block;width:100%;min-height:44px;margin:14px 0 0;padding:10px 16px;border:1px solid var(--msw-primary);border-radius:10px;background:var(--msw-card);color:var(--msw-ink);font:inherit;font-size:14px;font-weight:600;letter-spacing:0;text-transform:none;text-align:center;box-shadow:none;cursor:pointer}
.msw .msw-more:hover,.msw .msw-more:focus{background:var(--msw-soft);border-color:var(--msw-primary);color:var(--msw-ink);box-shadow:none}
.msw .msw-more:focus-visible{outline:3px solid var(--msw-primary);outline-offset:2px}

/* stats */
.msw .msw-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 18px}
.msw .msw-stat{min-width:0;padding:12px;background:var(--msw-card);border:1px solid var(--msw-line);border-radius:12px}
.msw .msw-stat-label{display:block;font-size:12px;line-height:1.3;color:var(--msw-muted)}
.msw .msw-stat-num{display:block;margin-top:4px;font-size:26px;font-weight:700;line-height:1.1;color:var(--msw-text)}

/* table, shown as cards */
.msw .msw-tablewrap{display:block;width:100%}
.msw .msw-table{display:block;width:100%;margin:0;padding:0;border:0;border-collapse:separate;border-spacing:0;background:transparent;font-size:14px}
.msw .msw-table thead{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.msw .msw-table tbody{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:0;padding:0;border:0;background:transparent}
.msw .msw-table tr.msw-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px 14px;align-items:start;margin:0;padding:14px;background:var(--msw-card);border:1px solid var(--msw-line);border-radius:14px}
.msw .msw-table .msw-cell{display:block;min-width:0;margin:0;padding:0;border:0;background:transparent;color:var(--msw-text);font-size:15px;font-weight:600;line-height:1.35;text-align:left;vertical-align:baseline;overflow-wrap:anywhere}
.msw .msw-table .msw-cell::before{content:attr(data-label);display:block;margin:0 0 2px;font-size:12px;font-weight:500;line-height:1.3;color:var(--msw-muted)}
.msw .msw-table .c-company{grid-column:1;grid-row:1;align-self:center}
.msw .msw-table .c-ret{grid-column:2;grid-row:1;justify-self:end;align-self:center}
.msw .msw-table .c-sector{grid-column:1/-1;grid-row:2}
.msw .msw-table .c-company::before,.msw .msw-table .c-ret::before,.msw .msw-table .c-sector::before,.msw .msw-table .c-status::before{display:none}
.msw .msw-t-perf .c-sector{grid-column:1}
.msw .msw-t-perf .c-status{grid-column:2;grid-row:2;justify-self:end}
.msw .msw-table .c-entry{order:1}
.msw .msw-table .c-price{order:2}
.msw .msw-table .c-entry_date{order:3}
.msw .msw-table .c-exit_date{order:4}
.msw .msw-table .c-hold{order:5}
.msw .msw-table .c-note{order:6;grid-column:1/-1;padding-top:12px;border-top:1px dashed var(--msw-line);font-size:14px;font-weight:400;line-height:1.6}
.msw .msw-table .msw-cell.is-blank{display:none}

.msw .msw-co{display:flex;align-items:center;gap:10px;min-width:0}
.msw .msw-co-text{display:block;min-width:0}
.msw .msw-logo{flex:none;display:block;width:40px;height:40px;border:0;border-radius:10px;background:var(--msw-soft);object-fit:contain}
.msw .msw-logo-ph{display:inline-flex;align-items:center;justify-content:center;color:var(--msw-ink);font-size:17px;font-weight:700;text-transform:uppercase}
.msw .msw-name{display:block;font-size:16px;font-weight:700;line-height:1.25;color:var(--msw-text)}
.msw .msw-tick{display:block;font-size:12px;font-weight:500;line-height:1.3;color:var(--msw-muted)}

.msw .msw-chip{display:inline-block;padding:4px 10px;border-radius:999px;background:var(--msw-soft);color:var(--msw-ink);font-size:12px;font-weight:600;line-height:1.3}
.msw .msw-chip.is-closed{background:#e9ecee;color:#40484d}

.msw .msw-ret{display:inline-flex;align-items:center;gap:5px;padding:7px 11px;border-radius:10px;font-size:15px;font-weight:700;line-height:1;white-space:nowrap}
.msw .msw-arrow{font-size:10px}
.msw .msw-ret.is-up{background:var(--msw-upbg);color:var(--msw-up)}
.msw .msw-ret.is-down{background:var(--msw-downbg);color:var(--msw-down)}
.msw .msw-ret.is-flat,.msw .msw-ret.is-na{background:var(--msw-bg);color:var(--msw-muted)}

/* sectors */
.msw .msw-sectors{padding:4px 16px;background:var(--msw-card);border:1px solid var(--msw-line);border-radius:14px}
.msw .msw-sector{padding:14px 0;border-top:1px solid var(--msw-line)}
.msw .msw-sector:first-child{border-top:0}
.msw .msw-sector-top{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px}
.msw .msw-sector-name{font-size:16px;font-weight:700;line-height:1.3}
.msw .msw-sector-count{flex:1 1 auto;font-size:13px;color:var(--msw-muted)}
.msw .msw-sector-pct{font-size:16px;font-weight:700;color:var(--msw-ink)}
.msw .msw-bar{display:block;height:10px;margin-top:8px;border-radius:999px;background:var(--msw-soft);overflow:hidden}
.msw .msw-bar>span{display:block;height:100%;min-width:4px;border-radius:999px;background:var(--msw-primary)}

/* performance summary */
.msw .msw-sum{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 16px}
.msw .msw-sum-item{min-width:0;padding:12px;background:var(--msw-card);border:1px solid var(--msw-line);border-radius:12px}
.msw .msw-sum-label{display:block;font-size:12px;line-height:1.3;color:var(--msw-muted)}
.msw .msw-sum-val{display:block;margin-top:4px;font-size:21px;font-weight:700;line-height:1.2;color:var(--msw-text)}
.msw .msw-sum-val.is-up{color:var(--msw-up)}
.msw .msw-sum-val.is-down{color:var(--msw-down)}
.msw .msw-sum-sub{display:block;margin-top:2px;font-size:12px;line-height:1.35;color:var(--msw-muted);overflow-wrap:anywhere}

/* disclaimer and footer */
.msw .msw-card{padding:16px;background:var(--msw-card);border:1px solid var(--msw-line);border-radius:14px}
.msw .msw-card p{margin:0 0 12px;padding:0;font-size:14px;line-height:1.7;color:var(--msw-text)}
.msw .msw-card p:last-child{margin-bottom:0}
.msw .msw-foot{padding:14px 16px;border-top:1px solid var(--msw-line);background:var(--msw-card);text-align:center;font-size:12px;line-height:1.5;color:var(--msw-muted)}

@media (prefers-reduced-motion:reduce){.msw .msw-tab{transition:none}}

/* wider dashboards: container queries follow the space the plugin really has */
@container msw (min-width:420px){
	.msw .msw-nav{grid-template-columns:repeat(4,minmax(0,1fr))}
	.msw .msw-tab:last-child{grid-column:span 2}
}
@container msw (min-width:520px){
	.msw .msw-meta{align-items:flex-end;text-align:right}
}
@container msw (min-width:640px){
	.msw .msw-head{padding:18px 24px}
	.msw .msw-nav{padding:12px 20px}
	.msw .msw-view{padding:22px 24px}
	.msw .msw-h{font-size:24px}
	.msw .msw-stats{gap:14px}
	.msw .msw-stat{padding:16px}
	.msw .msw-stat-label{font-size:13px}
	.msw .msw-stat-num{font-size:30px}
	.msw .msw-table tbody{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
	.msw .msw-sum{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
	.msw .msw-more{display:inline-block;width:auto;min-width:240px}
	.msw .msw-sectors{padding:6px 22px}
}
@container msw (min-width:720px){
	.msw .msw-nav{display:flex;flex-wrap:wrap;gap:8px}
	.msw .msw-tab{flex:0 0 auto;width:auto;min-width:104px;padding:10px 18px}
}
@container msw (min-width:1040px){
	.msw .msw-tablewrap{overflow-x:auto;background:var(--msw-card);border:1px solid var(--msw-line);border-radius:14px}
	.msw .msw-table{display:table;border-collapse:collapse}
	.msw .msw-table thead{position:static;display:table-header-group;width:auto;height:auto;margin:0;overflow:visible;clip:auto;clip-path:none;white-space:normal}
	.msw .msw-table thead tr{display:table-row}
	.msw .msw-table tbody{display:table-row-group}
	.msw .msw-table tr.msw-row{display:table-row;padding:0;border:0;border-radius:0;background:transparent}
	.msw .msw-table th.msw-th{display:table-cell;padding:12px 14px;border:0;border-bottom:1px solid var(--msw-line);background:var(--msw-bg);color:var(--msw-muted);font-size:13px;font-weight:700;line-height:1.3;text-align:left;vertical-align:middle}
	.msw .msw-table .msw-cell{display:table-cell;padding:14px;border:0;border-top:1px solid var(--msw-line);font-size:14px;font-weight:500;vertical-align:middle;overflow-wrap:normal}
	.msw .msw-table tr.msw-row:first-child .msw-cell{border-top:0}
	.msw .msw-table tr.msw-row:hover .msw-cell{background:var(--msw-bg)}
	.msw .msw-table .msw-cell::before{display:none}
	.msw .msw-table .c-company,.msw .msw-table .c-ret,.msw .msw-table .c-sector,.msw .msw-table .c-status,.msw .msw-table .c-note{grid-column:auto;grid-row:auto;justify-self:auto;align-self:auto}
	.msw .msw-t-perf .c-sector,.msw .msw-t-perf .c-status{grid-column:auto;grid-row:auto;justify-self:auto}
	.msw .msw-table .c-company{min-width:190px}
	.msw .msw-table .c-note{max-width:280px;font-weight:400;line-height:1.55;border-top:1px solid var(--msw-line)}
	.msw .msw-table tr.msw-row:first-child .c-note{border-top:0}
	.msw .msw-table .msw-cell.is-blank{display:table-cell}
	.msw .msw-table .c-entry,.msw .msw-table .c-price{white-space:nowrap}
}
