/* One catalogue, one DOM tree: sticky rail on desktop, accessible drawer on mobile. */
.ts-workflow-with-sidebar{max-width:1560px;display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:40px;align-items:start}
.ts-workflow-with-sidebar>.ts-workflow-lesson{min-width:0}
.tsws{min-width:0;position:sticky;top:20px;align-self:start;font-family:var(--tsv-sans,system-ui,sans-serif);color:var(--tsv-fg,#ece9f5)}
.tsws__panel{display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow:hidden;border:1px solid #3e304f;border-radius:20px;background:#171020;box-shadow:0 12px 36px #0002}
.tsws__panel{font-family:var(--tsv-sans,system-ui,sans-serif);max-height:calc(100vh - 160px);max-height:var(--tsws-available-height,calc(100dvh - 160px))}
.tsws__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 18px 14px;flex-shrink:0}
.tsws__eyebrow{font-size:9px;letter-spacing:.1em;color:#b8a4d1;margin:0 0 7px;line-height:1.4}
.tsws__head h2{font-size:18px;line-height:1.35;letter-spacing:-.02em;margin:0;color:#f3ecff}
.tsws__head h2 span{font-size:11px;vertical-align:middle;display:inline-block;margin-left:4px;color:#d8c6ef;background:#352544;border-radius:6px;padding:2px 6px;letter-spacing:0}
.tsws__filters{padding:0 14px 12px;flex-shrink:0}
.tsws__search{display:block}.tsws__search input{box-sizing:border-box;width:100%;min-height:42px;border:1px solid #483758;border-radius:10px;background:#0e0915;color:#f1eafa;padding:10px 12px;font:inherit;font-size:13px}
.tsws__search input::placeholder{color:#b9abc7}
.tsws__tabs{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px;max-height:90px;overflow-y:auto;scrollbar-width:thin}
.tsws__tabs button{font:inherit;font-size:11px;line-height:1.3;min-height:34px;border:1px solid transparent;border-radius:8px;padding:7px 9px;background:#251a32;color:#d3c5e3;cursor:pointer}
.tsws__tabs button[aria-pressed="true"]{background:#69469c;border-color:#a983df;color:#fff}
.tsws__list{min-height:100px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#5c446f transparent;padding:0 14px 16px;scroll-padding-block:10px;flex:1 1 auto}
.tsws__group{margin:0 0 18px}.tsws__group:last-child{margin-bottom:0}
.tsws__group h3{font-size:12px;font-weight:550;line-height:1.4;color:#cbbadf;margin:5px 0 9px}
.tsws__tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tsws__tile{position:relative;isolation:isolate;display:grid;grid-template: minmax(178px,auto) / minmax(0,1fr);overflow:hidden;border:1px solid #42304f;border-radius:12px;background:linear-gradient(135deg,#43305b,#1f172b);text-decoration:none!important;color:#fff!important;transition:border-color .15s,transform .15s}
.tsws__image{grid-area:1/1;width:100%;height:100%;min-height:0;aspect-ratio:1;object-fit:cover;display:block;margin:0!important;border-radius:0!important}
.tsws__caption{grid-area:1/1;z-index:1;align-self:end;display:flex;flex-direction:column;gap:4px;padding:34px 9px 10px;background:linear-gradient(transparent,rgba(10,6,18,.88) 26%,#0c0813);overflow-wrap:anywhere}
.tsws__caption strong{font-size:13px;font-weight:650;line-height:1.25;letter-spacing:-.01em}
.tsws__caption>span{font-size:10px;line-height:1.4;color:#d3c8df;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tsws__tile:hover{border-color:#c49cef;transform:translateY(-2px)}
.tsws__subscribe{padding:13px 14px 15px;border-top:1px solid #3b2a4b;background:#20142e;flex-shrink:0}
.tsws__subscribe p{font-size:11px;line-height:1.6;color:#cdbedc;margin:0 0 9px}
.tsws__subscribe strong{font-size:12px;color:#f4eaff;font-weight:600}
.tsws__subscribe>div{display:grid;grid-template-columns:1fr 1fr .7fr;gap:6px}
.tsws__subscribe a{display:flex;align-items:center;justify-content:center;min-height:40px;padding:3px 6px;box-sizing:border-box;border-radius:9px;font-size:12px;font-weight:650;text-decoration:none;color:#fff!important;border:1px solid #ffffff24}
.tsws__subscribe a{font-family:var(--tsv-sans,system-ui,sans-serif)}
.tsws__subscribe .tsws__boosty{background:#a44410}.tsws__subscribe .tsws__patreon{background:#8e3449}.tsws__subscribe .tsws__vk{background:#24589b}
.tsws__subscribe a:hover{filter:brightness(1.16)}
.tsws :is(a,button,input):focus-visible,.tsws__list:focus-visible,.tsws-launch:focus-visible,.tsws-dialog :is(a,button,input):focus-visible,.tsws-dialog .tsws__list:focus-visible{outline:2px solid #d2b7ff;outline-offset:2px}
.tsws__empty{font-size:13px;line-height:1.6;color:#cfc0df;margin:16px 2px}
.tsws__close{align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;border:1px solid #594068;border-radius:10px;background:#2b1d38;color:#fff;cursor:pointer}
.tsws__close svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.tsws [hidden],.tsws-dialog [hidden],.tsws-launch[hidden]{display:none!important}
.tsws-launch{display:none}
.tsws-dialog{box-sizing:border-box;color:#ece9f5;background:#171020;border:1px solid #66507b;border-radius:20px;padding:0;width:min(560px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 32px);overflow:hidden}
.tsws-dialog::backdrop{background:#08050dd9}
.tsws-dialog .tsws__panel{border:0;box-shadow:none;max-height:calc(100dvh - 34px)}
.tsws-dialog .tsws__close:not([hidden]){display:flex}
.tsws-dialog .tsws__tile{grid-template-rows:minmax(200px,auto)}
.tsws-dialog .tsws__caption strong{font-size:15px}.tsws-dialog .tsws__caption>span{font-size:12px}
@media(min-width:1200px){body.admin-bar .tsws{top:52px}body.admin-bar .tsws__panel{max-height:var(--tsws-available-height,calc(100dvh - 192px))}}
@media(max-width:1199px){
 .ts-workflow-with-sidebar{display:block;max-width:1168px}
 .tsws{position:static;margin-top:48px}.tsws__panel{max-height:none}
 .tsws__list{overflow:visible}.tsws__tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
 .tsws[data-tsws-ready]{display:none}
 .tsws-launch:not([hidden]){position:fixed;z-index:180;right:18px;bottom:calc(16px + env(safe-area-inset-bottom,0px));display:flex;align-items:center;gap:9px;min-height:48px;border:1px solid #b795e4;border-radius:14px;background:#69449c;color:#fff;box-shadow:0 5px 24px #0008;font:600 13px var(--tsv-sans,system-ui,sans-serif);padding:10px 15px;cursor:pointer}
 body.tsws-mobile-ready .ts-footer{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
 .tsws-dialog .tsws__tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
 .tsws-dialog .tsws__list{overflow-y:auto}
}
@media(max-width:599px){.tsws__tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.tsws-dialog .tsws__head{padding:15px 14px 12px}.tsws-dialog .tsws__panel{max-height:calc(100dvh - 34px)}.tsws-dialog .tsws__tile{grid-template-rows:minmax(184px,auto)}.tsws-dialog .tsws__caption strong{font-size:13px}.tsws-dialog .tsws__caption>span{font-size:11px}.tsws-launch:not([hidden]){right:12px}}
@media(max-height:550px){.tsws__eyebrow,.tsws__subscribe p{display:none}.tsws__head{padding:10px 14px}.tsws__filters{padding-bottom:7px}.tsws__tabs{max-height:40px;margin-top:5px}.tsws__subscribe{padding:8px 14px}.tsws__list{min-height:50px}}
@media(prefers-reduced-motion:reduce){.tsws__tile{transition:none}.tsws__tile:hover{transform:none}}
