/* Main content and discovery share a grid. Reading and narrow screens retain
   their existing single-column layouts. The sidebar follows document scrolling. */
#browse-sidebar{display:none}
@media(min-width:1001px){
 body.browse-v9.content-v6:is(.browse-public-layout,.personal-view):not(.reader-layout){--browse-content-width:1240px;--browse-sidebar-width:272px;--browse-column-gap:24px}
 body.browse-v9.content-v6.browse-public-layout:not(.reader-layout) .page>main>.content-grid{
  display:grid;grid-template-columns:minmax(0,1fr) var(--browse-sidebar-width);gap:var(--browse-column-gap);align-items:start
 }
 body.browse-v9.content-v6.browse-public-layout:not(.reader-layout) #browse-sidebar:not([hidden]){display:flex;flex-direction:column;gap:18px;min-width:0}
 body.browse-v9.content-v6:is(.browse-public-layout,.personal-view):not(.reader-layout) .page>.topbar{
  display:grid;grid-template-columns:auto auto minmax(0,1fr) var(--browse-sidebar-width);gap:var(--browse-column-gap)
 }
 body.browse-v9.content-v6.browse-public-layout:not(.reader-layout) .topbar .browse-header-search{width:100%;min-width:0;max-width:340px;justify-self:end;margin:0}
 body.browse-v9.content-v6:is(.browse-public-layout,.personal-view):not(.reader-layout) .topbar .top-right{width:100%;grid-column:4;grid-row:1;justify-content:flex-end;gap:12px;margin:0}
 body.browse-v9.content-v6.browse-public-layout:not(.reader-layout) .main-column{min-height:calc(100dvh - 220px)}
 body.browse-v9.content-v6.browse-public-layout:not(.reader-layout) #browse-results-workspace{flex:initial}
 /* Short paginated lists still fill their column, keeping the pager at the
    panel bottom instead of leaving a detached gap below the results. */
 body.browse-v9.content-v6.browse-public-layout:not(.reader-layout):not(.home-feed-view) .main-column{align-self:stretch}
 body.browse-v9.content-v6.browse-public-layout:not(.reader-layout):not(.home-feed-view) #browse-results-workspace{flex:1}
 body.browse-v9.content-v6.browse-public-layout:not(.reader-layout) :is(#pagination,#browse-page-indicator){--browse-pagination-center:calc(50% - (var(--browse-sidebar-width) + var(--browse-column-gap))/2)}
 body.browse-v9.content-v6.browse-public-layout:is(.browse-chrome-hidden,.browse-chrome-compact):not(.reader-layout):not(.browse-chrome-near-bottom) #pagination,
 body.browse-v9.content-v6.browse-public-layout.browse-chrome-hidden:not(.reader-layout):not(.browse-chrome-near-bottom) #browse-page-indicator{left:var(--browse-pagination-center)}
}
body.browse-v9.content-v6 #browse-sidebar .browse-side-panel{padding:20px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:none}
#browse-sidebar .browse-side-panel>header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px}
#browse-sidebar h2{margin:0;font-size:15px;font-weight:600;line-height:1.5;color:var(--text)}
#browse-sidebar .browse-side-more{display:inline-flex;align-items:center;gap:2px;min-height:28px;padding:0;color:var(--text-muted);font-size:12px;background:none;border:0;white-space:nowrap}
#browse-sidebar .browse-side-more .ui-icon{width:13px;height:13px}
#browse-sidebar .browse-side-more:hover{color:var(--primary)}
#browse-sidebar .browse-side-ranked{display:grid;gap:19px;list-style:none;padding:0;margin:0}
#browse-sidebar .browse-side-ranked a{display:flex;gap:10px;color:inherit;text-decoration:none;border-radius:4px}
#browse-sidebar .browse-side-rank{flex:0 0 16px;font-size:13px;line-height:23px;font-weight:600;color:var(--text-muted);font-variant-numeric:tabular-nums}
#browse-sidebar .browse-side-ranked li:nth-child(-n+3) .browse-side-rank{color:var(--primary)}
#browse-sidebar .browse-side-post{min-width:0}
#browse-sidebar .browse-side-post strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:14px;font-weight:500;line-height:1.65;overflow-wrap:anywhere}
#browse-sidebar .browse-side-ranked a:hover strong{color:var(--primary)}
#browse-sidebar .browse-side-post small{display:block;margin-top:5px;font-size:12px;line-height:1.6;color:var(--text-muted)}
#browse-sidebar .browse-side-chips{display:flex;gap:8px;flex-wrap:wrap}
#browse-sidebar .browse-side-chip{max-width:100%;min-height:34px;padding:6px 10px;background:var(--surface-subtle);border:1px solid transparent;border-radius:6px;color:var(--text-secondary);font-size:13px;line-height:1.5;overflow-wrap:anywhere;text-align:left}
#browse-sidebar .browse-side-chip:hover{color:var(--primary);background:var(--primary-soft)}
#browse-sidebar .browse-side-chip[aria-pressed=true]{color:var(--primary);background:var(--primary-soft);border-color:var(--primary-border);font-weight:500}
#browse-sidebar .browse-side-caption{margin:14px 0 0;color:var(--text-muted);font-size:12px;line-height:1.8}
#browse-sidebar .browse-side-scope{margin:-8px 0 14px;font-size:12px;color:var(--text-muted)}
#browse-sidebar .browse-side-all{margin-top:10px}
#browse-sidebar .browse-side-learning{display:grid;gap:3px;margin:-6px -8px -8px}
#browse-sidebar .browse-side-learning button{display:flex;align-items:center;gap:10px;width:100%;min-height:42px;padding:9px 8px;background:none;border:0;border-radius:6px;font-size:13px;color:var(--text-secondary);text-align:left}
#browse-sidebar .browse-side-learning button>.ui-icon{width:17px;height:17px;color:var(--text-muted)}
#browse-sidebar .browse-side-learning button>.ui-icon:last-child{margin-left:auto;width:14px;height:14px}
#browse-sidebar .browse-side-learning button:hover,#browse-sidebar .browse-side-learning button[aria-pressed=true]{background:var(--primary-soft);color:var(--primary)}
#browse-sidebar :is(a,button):focus-visible{outline:2px solid var(--primary);outline-offset:3px}
#browse-sidebar .browse-side-status{margin:0;color:var(--text-muted);font-size:12px;line-height:1.8}
#browse-sidebar .browse-side-ranked+.browse-side-status{margin-top:14px}
#browse-sidebar .browse-side-status button{padding:3px;color:var(--primary);background:none;border:0}
#browse-sidebar .browse-side-skeleton{display:grid;gap:24px}
#browse-sidebar .browse-side-skeleton i{display:block;height:42px;border-radius:5px;background:var(--surface-subtle)}
#browse-sidebar .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
