:root{--header-height:100px;--rail-border:#dbe2f1;--rail-ink:#182756;--rail-accent:#4734ac}
.cataloglayout{display:grid;grid-template-columns:minmax(205px,244px) minmax(0,1fr) minmax(195px,226px);align-items:start;gap:16px}
.cataloglayout .catalog-rail{position:sticky;top:calc(var(--header-height) + 14px);min-width:0;margin:0;max-height:calc(100dvh - var(--header-height) - 30px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;background:white;border:1px solid var(--rail-border);border-radius:15px;box-shadow:0 5px 18px #1c317512}
#folders.catalog-rail{padding:12px}
#buyerColumn{padding:14px}
.library-intro{padding:15px 13px;border-radius:11px;background:linear-gradient(135deg,#142654,#40329b);color:#fff;margin-bottom:17px}
.rail-kicker{display:block;margin:0 0 5px;font-size:11px;font-weight:850;letter-spacing:.09em}
.library-intro .rail-kicker{color:#cbd4ff}
#folders .library-intro h2,#buyerColumn h2{font-size:21px;letter-spacing:-.035em;line-height:1.18;margin:0;font-weight:850}
.library-intro p:not(.rail-kicker),.buyer-heading p,.buyer-help p{font-size:13px;line-height:1.5;margin:8px 0 10px}
.rail-counts{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:12px 0}
.rail-counts div{background:#ffffff16;border:1px solid #ffffff24;padding:7px;border-radius:8px}
.rail-counts strong,.rail-counts span{display:block}
.rail-counts strong{font-size:19px}
.rail-counts span{font-size:11px;color:#f2f3ff}
.library-intro button,.buyer-help a{display:block;width:100%;padding:8px 6px;text-align:center;border-radius:7px;background:#fff;color:#35278c;font-size:12px;font-weight:800}
#folderTitle,#sidebarExtra h3{color:var(--rail-ink);font-size:17px;font-weight:850}
#foldergrid summary{font-weight:750;color:#303779}
#foldergrid button:hover,#foldergrid button:focus-visible{background:#ece9ff;color:#36218f}
.buyer-heading .rail-kicker{color:var(--rail-accent)}
.buyer-heading p,.buyer-help p,.buyers-empty{color:#51617c}
.buyer-row{display:grid;grid-template-columns:30px minmax(0,1fr);gap:8px;padding:9px 0;border-top:1px solid #e8edf6}
.buyer-avatar{height:30px;border-radius:50%;display:grid;place-items:center;background:#eeebff;color:#4533a5;font-size:13px;font-weight:850}
.buyer-row strong,.buyer-row a,.buyer-row small,.buyer-row div>span{display:block}
.buyer-row strong{color:#252c66;font-size:14px;margin-bottom:3px}
.buyer-row a,.buyer-row div>span{font-size:13px;line-height:1.32;overflow-wrap:anywhere}
.buyer-row a:hover{text-decoration:underline}
.buyer-row small{font-size:11px;color:#68748b;margin-top:4px}
.buyers-empty{font-size:13px;padding:9px;background:#f4f6fe;border-radius:8px}
.buyer-help{border-top:1px solid var(--rail-border);margin-top:11px;padding-top:10px}
.buyer-help h3{font-size:14px;color:#272d6b;margin:0}
.buyer-help a{background:#eeeaff}
#library{min-width:0;scroll-margin-top:calc(var(--header-height) + 14px)}
#library .heading h2,.shelfhead h3{color:#122450;font-weight:850;letter-spacing:-.035em}
#library .shelfhead h3{font-size:clamp(20px,2.1vw,29px)}
.tilebody h3{font-weight:800;font-size:16px;line-height:1.25;color:#172650}
.tilebody p{font-size:13px;line-height:1.4}
.tilebody .price b{font-size:16px;color:#412ba3;font-weight:850}
.rail-switch{display:none}
#manage{background:#ece8ff;color:#403192;border-radius:7px;padding:6px 8px;white-space:nowrap}
@media (max-width:1250px) and (min-width:1051px){.cataloglayout{grid-template-columns:202px minmax(0,1fr) 185px;gap:12px}#library .shelf,#library #cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1050px){
 .cataloglayout{display:block}
 .rail-switch{display:flex;position:sticky;top:var(--header-height);z-index:6;gap:8px;padding:7px 0;background:#f3f6fc}
 .rail-switch button{flex:1;padding:9px 7px;border:1px solid var(--rail-border);border-radius:8px;background:white;font-size:13px;font-weight:800}
 .rail-switch button[aria-expanded=true]{background:#4233a5;color:#fff}
 #folders.catalog-rail,#buyerColumn.catalog-rail{display:none}
 #folders.catalog-rail.rail-open,#buyerColumn.catalog-rail.rail-open{display:block;top:calc(var(--header-height) + 51px);z-index:5;max-height:44dvh;margin:0 0 10px}
 #sidebarExtra{display:block}
 #library{scroll-margin-top:calc(var(--header-height) + 53px)}
 .tilebody h3{font-size:15px}
}
/* The existing #folders rule wins over the shared class selector without this override. */
#folders.catalog-rail{
 position:sticky;top:calc(var(--header-height) + 14px);
 max-height:calc(100vh - var(--header-height) - 30px);
 max-height:calc(100dvh - var(--header-height) - 30px);
}
#folderTitle{position:sticky;top:0;z-index:1;background:#fff;padding:8px 0;margin:0}
#folders #foldergrid summary{font-size:15px;color:#3b279f}
#folders #foldergrid button{font-size:14px}
#folders .library-intro h2,#buyerColumn h2{font-size:23px}
.library-intro{background:linear-gradient(145deg,#1b3c97,#6b35bd)}
#shopnav button{font-size:15px;font-weight:700}
.tilebody h3{font-size:18px}
.tilebody p{font-size:14px}
.tilebody .price b{font-size:18px;color:#5131bd}
.tileactions .buy{background:#5237bf}
#library .shelfhead h3{font-size:clamp(23px,2.4vw,33px)}
.featured[data-hue="0"]{background:linear-gradient(115deg,#132361,#5439bb)}
.featured[data-hue="1"]{background:linear-gradient(115deg,#133957,#007b82)}
.featured[data-hue="2"]{background:linear-gradient(115deg,#321750,#833dab)}
.featured[data-hue="3"]{background:linear-gradient(115deg,#193067,#2562ba)}
#featuredCourse h2{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:clamp(23px,3.1vw,48px);line-height:1.08}
#featuredCourse .banner-genre{font-weight:850;color:#e1f2ff}
#featuredCourse .banner-summary{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45}
.featured #featuredCourse img{background:#ffffff18;object-fit:contain}
#bannerCount{color:#fff;font-weight:750;padding:6px;font-size:13px}
.buyer-preview{border:1px solid #e3ddff;border-radius:10px;padding:9px;background:#f8f5ff;color:#3d2c78;font-size:13px}
.buyer-preview p{min-height:60px;margin:7px 0}
.buyer-preview p>b,.buyer-preview p>span{display:block;margin-bottom:3px}
.buyer-preview button{color:#4b32ac;padding:3px 0;font-size:12px;font-weight:750;text-decoration:underline}
@media(max-width:1050px){
 #folders.catalog-rail.rail-open{top:calc(var(--header-height) + 51px);max-height:44dvh}
}
@media(max-width:650px){
 #shopnav button{font-size:13px}
 .tilebody h3{font-size:16px}
 .tilebody p{font-size:13px}
 #featuredCourse h2{font-size:clamp(19px,4.5vw,27px)}
}
