/* Public workspace surfaces. The shared shell owns sidebar layout and interaction. */
:root body.beui :is(#workspace,#account-shell)[data-community-shell] {
  --ui-bg:var(--material-canvas);--ui-surface:var(--material-paper);--ui-soft:var(--material-inset);--ui-border:var(--material-line);--ui-border-strong:var(--theme-border-strong);
  --ui-fg:var(--theme-ink);--ui-muted:var(--theme-muted);--ink:var(--theme-ink);--muted:var(--theme-muted);
  --public-control-track:var(--material-inset);
  --public-control-shadow:0 1px 3px color-mix(in srgb,var(--ui-fg) 10%,transparent),0 3px 8px -4px color-mix(in srgb,var(--ui-fg) 16%,transparent),inset 0 0 0 1px var(--material-line);
  --forest-canvas:var(--ui-bg);--forest-paper:var(--ui-surface);--forest-paper-deep:var(--ui-soft);--forest-line:var(--ui-border);
  --r2-canvas:var(--ui-bg);--r2-paper:var(--ui-surface);--r2-paper-deep:var(--ui-soft);--r2-paper-raised:var(--ws-raised,var(--ui-surface));--r2-line:var(--ui-border);
  --bg:var(--ui-bg);--surface:var(--ui-surface);--border:var(--ui-border);
  display:grid;grid-template-columns:var(--shell-width) minmax(0,1fr);min-height:100dvh;background:var(--ui-bg);color:var(--ui-fg);
  --ui-font:var(--r2-sans);
  --r2-serif:var(--ui-font);
  font-family:var(--ui-font);
  font-size:15px;font-weight:400;line-height:1.65;
}
/* Reading cards stay quiet; their surrounding canvas and controls follow the theme. */
:root body.beui :is(#workspace,#account-shell)[data-community-shell]:is([data-view=gallery],[data-view=app]) {
  --ws-heading-surface:transparent;
  --ws-raised:var(--accent-raised);--ws-card-shadow:var(--material-shadow);
  --ws-card-hover-shadow:var(--material-shadow-raised);
}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] :is(h1,h2,h3,h4,strong,b) {font-weight:600}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] :is(summary,button,.button) {font-weight:500}

:root body.beui :is(#workspace,#account-shell)[data-community-shell] .shell-brand {font-weight:400}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] #ws-primary-nav a {font-weight:400}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] .ws-container {width:100%;max-width:var(--shell-content-width);margin:0 auto;padding:var(--shell-content-padding)}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] .ws-breadcrumb {margin-bottom:16px;font-size:12px}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] :is(#ws-detail-intro,#ws-public-related-slot,#ws-comments) {scroll-margin-top:84px}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] :is(a,button,input,select,textarea,summary):focus-visible {outline:2px solid var(--ui-primary);outline-offset:3px}
/* Public action controls: one tactile surface, without changing shared shell geometry. */
:root body.beui :is(#workspace,#account-shell)[data-community-shell] .shell-top-actions {gap:8px}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] .shell-account {margin-left:0;padding-left:0;border-left:0}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] .shell-top-actions :is(.shell-theme-button,.theme-palette-trigger,.shell-account-trigger) {box-sizing:border-box;min-height:44px;height:44px;border:1px solid var(--material-line);border-radius:999px;background:linear-gradient(180deg,var(--material-paper),var(--material-inset));color:var(--ui-fg);box-shadow:0 1px 2px color-mix(in srgb,var(--ui-fg) 7%,transparent),inset 0 1px 0 color-mix(in srgb,var(--material-paper) 75%,transparent);transition:background-color var(--ui-duration),border-color var(--ui-duration),box-shadow var(--ui-duration),color var(--ui-duration)}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] .shell-top-actions :is(.shell-theme-button,.theme-palette-trigger,.shell-account-trigger):is(:hover,[aria-expanded=true]) {border-color:var(--accent-border);background:var(--surface-hover);color:var(--accent-ui);box-shadow:var(--public-control-shadow)}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] .shell-top-actions :is(.shell-theme-button,.theme-palette-trigger,.shell-account-trigger):active {background:var(--surface-selected);box-shadow:inset 0 1px 3px color-mix(in srgb,var(--ui-fg) 10%,transparent)}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] .shell-account[data-signed-in=false] .shell-account-avatar {background:transparent;color:inherit}
:root body.beui :is(#workspace,#account-shell)[data-community-shell] :is(.shell-account-menu,.theme-palette-panel) {border-color:var(--material-line);border-radius:16px;background:var(--material-paper);box-shadow:var(--material-shadow-raised)}
@media(max-width:800px) {:root body.beui :is(#workspace,#account-shell)[data-community-shell] .shell-top-actions {gap:6px}}
@media(prefers-reduced-motion:reduce) {:root body.beui :is(#workspace,#account-shell)[data-community-shell] .shell-top-actions button {transition:none}}

@media(max-width:800px) {
  :root body.beui :is(#workspace,#account-shell)[data-community-shell] {display:block}
  :root body.beui :is(#workspace,#account-shell)[data-community-shell] .ws-container {padding:var(--shell-content-padding)}
}
